content
stringlengths
4
1.04M
lang
stringclasses
358 values
score
int64
0
5
repo_name
stringlengths
5
114
repo_path
stringlengths
4
229
repo_licenses
sequencelengths
1
8
// Regression test for #83621. extern "C" { static x: _; //~ ERROR: [E0121] } fn main() {}
Rust
3
mbc-git/rust
src/test/ui/typeck/issue-83621-placeholder-static-in-extern.rs
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
function _enhancd_source_mru test $ENHANCD_DISABLE_HYPHEN = 1 && echo "$OLDPWD" && return _enhancd_history_list "$argv[1]" \ | _enhancd_filter_exclude "$HOME" \ | _enhancd_filter_limit "$ENHANCD_HYPHEN_NUM" \ | _enhancd_filter_interactive "$list" end
fish
3
d3dave/enhancd
functions/_enhancd_source_mru.fish
[ "MIT" ]
(ns cljsdeps.core "ClojureScript used to build cljsDeps.js as describe in https://github.com/LightTable/LightTable/commit/8e73f59891c45f73a1b985fed69795d1061a8ecf#commitcomment-10073128. Generated javascript is used in background thread with worker-thread object." (:require [clojure.string :as string] [clojure.walk :as walk] [cljs.reader :as reader] [cljs.core :as core]))
Clojure
4
joyskmathew/LightTable
src-cljsdeps/core.cljs
[ "MIT" ]
package gw.lang.enhancements uses java.io.InputStream uses gw.util.StreamUtil enhancement CoreInputStreamEnhancement : InputStream { property get TextContent(): String { using( var reader = StreamUtil.getInputStreamReader( this ) ) { return StreamUtil.getContent( reader ) } } }
Gosu
3
dmcreyno/gosu-lang
gosu-core-api/src/main/gosu/gw/lang/enhancements/CoreInputStreamEnhancement.gsx
[ "Apache-2.0" ]
(* Upstart init configuration files such as found in /etc/init *) module Upstartinit = autoload xfm let eol = Util.eol let rest_of_line = /[^ \t\n]+([ \t]+[^ \t\n]+)*/ let whole_line_maybe_indented = /[ \t]*[^ \t\n]+([ \t]+[^ \t\n]+)*/ let no_params = [ key "task" . eol ] let param_is_rest_of_line (thekey:regexp) = Build.key_value_line thekey Util.del_ws_spc (store rest_of_line) let respawn = [ key "respawn" . (Util.del_ws_spc . store rest_of_line)? . eol ] let one_params = param_is_rest_of_line ( "start" | "stop" | "env" | "export" | "normal exit" | "instance" | "description" | "author" | "version" | "emits" | "console" | "umask" | "nice" | "oom" | "chroot" | "chdir" | "limit" | "unlimited" | "kill timeout" | "expect" | "usage" ) (* exec and script are valid both at the top level and as a parameter of a lifecycle keyword *) let exec = param_is_rest_of_line "exec" let script_line = [ seq "line" . store ( whole_line_maybe_indented - "end script" ) . eol ] | [ seq "line" . eol] let end_script = del "end script\n" "end script\n" let script = [ key "script" . eol . script_line * . end_script ] let lifecycle = [ key /(pre|post)-(start|stop)/ . Util.del_ws_spc . ( exec | script ) ] let lns = ( Util.empty | Util.comment | script | exec | lifecycle | no_params | one_params | respawn ) * let relevant = (incl "/etc/init/*.conf") . Util.stdexcl let xfm = transform lns relevant
Augeas
5
jaredjennings/puppet-cmits-augeas
files/1.2.0/lenses/upstartinit.aug
[ "Apache-2.0" ]
/* * Copyright 2010-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license * that can be found in the LICENSE file. */ package org.jetbrains.kotlin.backend.konan.ir.interop import org.jetbrains.kotlin.backend.common.serialization.encodings.BinarySymbolData import org.jetbrains.kotlin.backend.konan.InteropBuiltIns import org.jetbrains.kotlin.backend.konan.descriptors.getPackageFragments import org.jetbrains.kotlin.backend.konan.ir.KonanSymbols import org.jetbrains.kotlin.backend.konan.ir.interop.cenum.CEnumByValueFunctionGenerator import org.jetbrains.kotlin.backend.konan.ir.interop.cenum.CEnumClassGenerator import org.jetbrains.kotlin.backend.konan.ir.interop.cenum.CEnumCompanionGenerator import org.jetbrains.kotlin.backend.konan.ir.interop.cenum.CEnumVarClassGenerator import org.jetbrains.kotlin.backend.konan.ir.interop.cstruct.CStructVarClassGenerator import org.jetbrains.kotlin.backend.konan.ir.interop.cstruct.CStructVarCompanionGenerator import org.jetbrains.kotlin.descriptors.* import org.jetbrains.kotlin.ir.declarations.* import org.jetbrains.kotlin.ir.symbols.* import org.jetbrains.kotlin.ir.util.* import org.jetbrains.kotlin.psi2ir.generators.GeneratorContext import org.jetbrains.kotlin.resolve.scopes.DescriptorKindFilter /** * For the most of descriptors that come from metadata-based interop libraries * we generate a lazy IR. * We use a different approach for CEnums and CStructVars and generate IR eagerly. Motivation: * 1. CEnums are "real" Kotlin enums. Thus, we need apply the same compilation approach * as we use for usual Kotlin enums. * Eager generation allows to reuse [EnumClassLowering], [EnumConstructorsLowering] and other * compiler phases. * 2. It is an easier and more obvious approach. Since implementation of metadata-based * libraries generation already took too much time we take an easier approach here. */ internal class IrProviderForCEnumAndCStructStubs( context: GeneratorContext, private val interopBuiltIns: InteropBuiltIns, symbols: KonanSymbols ) { /** * TODO: integrate this provider into [KonanIrLinker.KonanInteropModuleDeserializer] */ private val symbolTable: SymbolTable = context.symbolTable private val cEnumByValueFunctionGenerator = CEnumByValueFunctionGenerator(context, symbols) private val cEnumCompanionGenerator = CEnumCompanionGenerator(context, cEnumByValueFunctionGenerator) private val cEnumVarClassGenerator = CEnumVarClassGenerator(context, interopBuiltIns) private val cEnumClassGenerator = CEnumClassGenerator(context, cEnumCompanionGenerator, cEnumVarClassGenerator) private val cStructCompanionGenerator = CStructVarCompanionGenerator(context, interopBuiltIns) private val cStructClassGenerator = CStructVarClassGenerator(context, interopBuiltIns, cStructCompanionGenerator, symbols) fun isCEnumOrCStruct(declarationDescriptor: DeclarationDescriptor): Boolean = declarationDescriptor.run { findCEnumDescriptor(interopBuiltIns) ?: findCStructDescriptor(interopBuiltIns) } != null fun referenceAllEnumsAndStructsFrom(interopModule: ModuleDescriptor) = interopModule.getPackageFragments() .flatMap { it.getMemberScope().getContributedDescriptors(DescriptorKindFilter.CLASSIFIERS) } .filterIsInstance<ClassDescriptor>() .filter { it.implementsCEnum(interopBuiltIns) || it.inheritsFromCStructVar(interopBuiltIns) } .forEach { symbolTable.referenceClass(it) } private fun generateIrIfNeeded(symbol: IrSymbol, file: IrFile) { // TODO: These `findOrGenerate` calls generate a whole subtree. // This a simple but clearly suboptimal solution. symbol.findCEnumDescriptor(interopBuiltIns)?.let { enumDescriptor -> cEnumClassGenerator.findOrGenerateCEnum(enumDescriptor, file) } symbol.findCStructDescriptor(interopBuiltIns)?.let { structDescriptor -> cStructClassGenerator.findOrGenerateCStruct(structDescriptor, file) } } /** * We postpone generation of bodies until IR linkage is complete. * This way we ensure that all used symbols are resolved. */ fun generateBodies() { cEnumCompanionGenerator.invokePostLinkageSteps() cEnumByValueFunctionGenerator.invokePostLinkageSteps() cEnumClassGenerator.invokePostLinkageSteps() cEnumVarClassGenerator.invokePostLinkageSteps() cStructClassGenerator.invokePostLinkageSteps() cStructCompanionGenerator.invokePostLinkageSteps() } fun getDeclaration(descriptor: DeclarationDescriptor, idSignature: IdSignature, file: IrFile, symbolKind: BinarySymbolData.SymbolKind): IrSymbolOwner { return symbolTable.run { when (symbolKind) { BinarySymbolData.SymbolKind.CONSTRUCTOR_SYMBOL -> declareConstructorFromLinker(descriptor as ClassConstructorDescriptor, idSignature) { s -> generateIrIfNeeded(s, file) s.owner } BinarySymbolData.SymbolKind.CLASS_SYMBOL -> declareClassFromLinker(descriptor as ClassDescriptor, idSignature) { s -> generateIrIfNeeded(s, file) s.owner } BinarySymbolData.SymbolKind.ENUM_ENTRY_SYMBOL -> declareEnumEntryFromLinker(descriptor as ClassDescriptor, idSignature) { s -> generateIrIfNeeded(s, file) s.owner } BinarySymbolData.SymbolKind.FUNCTION_SYMBOL -> declareSimpleFunctionFromLinker(descriptor as FunctionDescriptor, idSignature) { s -> generateIrIfNeeded(s, file) s.owner } BinarySymbolData.SymbolKind.PROPERTY_SYMBOL -> declarePropertyFromLinker(descriptor as PropertyDescriptor, idSignature) { s -> generateIrIfNeeded(s, file) s.owner } else -> error("Unexpected symbol kind $symbolKind for sig $idSignature") } } } companion object { const val cTypeDefinitionsFileName = "CTypeDefinitions" } }
Kotlin
5
Mu-L/kotlin
kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/ir/interop/IrProviderForCEnumAndCStructStubs.kt
[ "ECL-2.0", "Apache-2.0" ]
extends Test var _do_raycasts = false onready var _raycast_visuals = ImmediateGeometry.new() func _ready(): var material = SpatialMaterial.new() material.flags_unshaded = true material.vertex_color_use_as_albedo = true _raycast_visuals.material_override = material add_child(_raycast_visuals) move_child(_raycast_visuals, get_child_count()) yield(start_timer(0.5), "timeout") if is_timer_canceled(): return _do_raycasts = true func _physics_process(_delta): if not _do_raycasts: return _do_raycasts = false Log.print_log("* Start Raycasting...") _raycast_visuals.clear() _raycast_visuals.begin(Mesh.PRIMITIVE_LINES) for shape in $Shapes.get_children(): var body = shape as PhysicsBody var space_state = body.get_world().direct_space_state Log.print_log("* Testing: %s" % body.name) var center = body.global_transform.origin # Raycast entering from the top. var res = _add_raycast(space_state, center + Vector3(0.0, 2.0, 0.0), center) Log.print_log("Raycast in: %s" % ("HIT" if res else "NO HIT")) # Raycast exiting from inside. center.x -= 0.2 res = _add_raycast(space_state, center, center - Vector3(0.0, 3.0, 0.0)) Log.print_log("Raycast out: %s" % ("HIT" if res else "NO HIT")) # Raycast all inside. center.x += 0.4 res = _add_raycast(space_state, center, center - Vector3(0.0, 0.8, 0.0)) Log.print_log("Raycast inside: %s" % ("HIT" if res else "NO HIT")) _raycast_visuals.end() func _add_raycast(space_state, pos_start, pos_end): var result = space_state.intersect_ray(pos_start, pos_end) if result: _raycast_visuals.set_color(Color.green) else: _raycast_visuals.set_color(Color.red.darkened(0.5)) # Draw raycast line. _raycast_visuals.add_vertex(pos_start) _raycast_visuals.add_vertex(pos_end) # Draw raycast arrow. _raycast_visuals.add_vertex(pos_end) _raycast_visuals.add_vertex(pos_end + Vector3(-0.05, 0.1, 0.0)) _raycast_visuals.add_vertex(pos_end) _raycast_visuals.add_vertex(pos_end + Vector3(0.05, 0.1, 0.0)) return result
GDScript
5
jonbonazza/godot-demo-projects
3d/physics_tests/tests/functional/test_raycasting.gd
[ "MIT" ]
{-# LANGUAGE ForeignFunctionInterface #-} {-| Module : Unicorn.CPU.Mips Description : Definitions for the MIPS architecture. Copyright : (c) Adrian Herrera, 2016 License : GPL-2 Definitions for the MIPS architecture. -} module Unicorn.CPU.Mips ( Register(..) ) where import Unicorn.Internal.Core (Reg) {# context lib = "unicorn" #} #include <unicorn/mips.h> -- | MIPS registers. {# enum UC_MIPS_REG as Register { underscoreToCase , UC_MIPS_REG_0 as Reg0g , UC_MIPS_REG_1 as Reg1g , UC_MIPS_REG_2 as Reg2g , UC_MIPS_REG_3 as Reg3g , UC_MIPS_REG_4 as Reg4g , UC_MIPS_REG_5 as Reg5g , UC_MIPS_REG_6 as Reg6g , UC_MIPS_REG_7 as Reg7g , UC_MIPS_REG_8 as Reg8g , UC_MIPS_REG_9 as Reg9g , UC_MIPS_REG_10 as Reg10g , UC_MIPS_REG_11 as Reg11g , UC_MIPS_REG_12 as Reg12g , UC_MIPS_REG_13 as Reg13g , UC_MIPS_REG_14 as Reg14g , UC_MIPS_REG_15 as Reg15g , UC_MIPS_REG_16 as Reg16g , UC_MIPS_REG_17 as Reg17g , UC_MIPS_REG_18 as Reg18g , UC_MIPS_REG_19 as Reg19g , UC_MIPS_REG_20 as Reg20g , UC_MIPS_REG_21 as Reg21g , UC_MIPS_REG_22 as Reg22g , UC_MIPS_REG_23 as Reg23g , UC_MIPS_REG_24 as Reg24g , UC_MIPS_REG_25 as Reg25g , UC_MIPS_REG_26 as Reg26g , UC_MIPS_REG_27 as Reg27g , UC_MIPS_REG_28 as Reg28g , UC_MIPS_REG_29 as Reg29g , UC_MIPS_REG_30 as Reg30g , UC_MIPS_REG_31 as Reg31 } omit ( UC_MIPS_REG_INVALID , UC_MIPS_REG_ENDING ) with prefix = "UC_MIPS_REG_" deriving (Show, Eq, Bounded) #} instance Reg Register
C2hs Haskell
4
clayne/unicorn_pe
unicorn/bindings/haskell/src/Unicorn/CPU/Mips.chs
[ "MIT" ]
#include "script_component.hpp" /* Name: TFAR_fnc_setLrSettings Author: NKey Saves the settings for the passed radio and broadcasts it to all clients and the server. Arguments: 0: Radio object <OBJECT> 1: Radio ID <STRING> 2: Settings, usually acquired via TFAR_fnc_getLrSettings and then changed. <ARRAY> Return Value: None Example: _settings = (call TFAR_fnc_activeLrRadio) call TFAR_fnc_getSwSettings; _settings set [0, 2]; // sets the active channel to 2 [call TFAR_fnc_activeLrRadio, _settings] call TFAR_fnc_setLrSettings; Public: Yes */ params [["_radio", [], [[]], 2], ["_value", [], [[]]]]; _radio params ["_radio_object", "_radio_qualifier"]; _radio_object setVariable [_radio_qualifier, + _value, true]; GVAR(VehicleConfigCacheNamespace) setVariable ["lastRadioSettingUpdate", diag_tickTime];
SQF
4
MrDj200/task-force-arma-3-radio
addons/core/functions/fnc_setLrSettings.sqf
[ "RSA-MD" ]
// Check that `self::foo` is parsed as a general pattern and not a self argument. struct S; impl S { fn f(self::S: S) {} fn g(&self::S: &S) {} fn h(&mut self::S: &mut S) {} fn i(&'a self::S: &S) {} //~ ERROR unexpected lifetime `'a` in pattern } fn main() {}
Rust
3
Eric-Arellano/rust
src/test/ui/self/self-vs-path-ambiguity.rs
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
/* Copyright 2019 The TensorFlow Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ==============================================================================*/ #include "tensorflow/core/kernels/sparse_utils.h" #include <vector> #include "tensorflow/core/framework/tensor.h" #include "tensorflow/core/framework/tensor_types.h" #include "tensorflow/core/framework/types.pb.h" #include "tensorflow/core/platform/test.h" namespace { using ::int64_t; using tensorflow::DataType; using tensorflow::int32; using tensorflow::Tensor; using tensorflow::TTypes; using tensorflow::uint16; using tensorflow::uint32; using tensorflow::uint64; using tensorflow::sparse_utils::ContainsEmptyRows; using tensorflow::sparse_utils::FindNextDenseRowStartIndex; using tensorflow::sparse_utils::GetStartIndicesOfEachDenseRow; using tensorflow::sparse_utils::ParseRowStartIndices; TEST(SparseUtilsTest, GetStartIndicesOfEachDenseRow) { { int32 data[] = {0, 0, 1, 0, 4, 0, 6, 0, 7, 0, 8, 0, 10, 0, 12, 0}; TTypes<int32>::ConstMatrix indices_mat(data, 8, 2); // indices_list = {0, 1, 4, 6, 7, 8, 10, 12}; bool contains_empty_rows; EXPECT_TRUE(GetStartIndicesOfEachDenseRow<int32>(indices_mat, &contains_empty_rows) == std::vector<int32>({0, 1, 2, 2, 2, 3, 3, 4, 5, 6, 6, 7, 7, 8})); EXPECT_TRUE(contains_empty_rows); } { int32 data[] = {0, 0, 1, 0, 1, 0, 4, 0, 4, 0, 4, 0, 6, 0, 7, 0, 7, 0, 7, 0, 7, 0, 8, 0, 8, 0, 10, 0, 12, 0}; TTypes<int32>::ConstMatrix indices_mat(data, 15, 2); // indices_list = {0, 1, 1, 4, 4, 4, 6, 7, 7, 7, 7, 8, 8, 10, 12}; bool contains_empty_rows; EXPECT_TRUE( GetStartIndicesOfEachDenseRow<int32>(indices_mat, &contains_empty_rows) == std::vector<int32>({0, 1, 3, 3, 3, 6, 6, 7, 11, 13, 13, 14, 14, 15})); EXPECT_TRUE(contains_empty_rows); } { int64_t data[] = {3, 0}; TTypes<int64_t>::ConstMatrix indices_mat(data, 1, 2); bool contains_empty_rows; EXPECT_TRUE(GetStartIndicesOfEachDenseRow<int64_t>(indices_mat, &contains_empty_rows) == std::vector<int64_t>({0, 0, 0, 0, 1})); EXPECT_TRUE(contains_empty_rows); } { uint32 data[] = {3, 0, 3, 0}; TTypes<uint32>::ConstMatrix indices_mat(data, 2, 2); bool contains_empty_rows; EXPECT_TRUE(GetStartIndicesOfEachDenseRow<uint32>(indices_mat, &contains_empty_rows) == std::vector<uint32>({0, 0, 0, 0, 2})); EXPECT_TRUE(contains_empty_rows); } { uint16 data[] = {0, 0, 0, 0, 0, 0, 1, 0}; TTypes<uint16>::ConstMatrix indices_mat(data, 4, 2); // indices_list = {0, 0, 0, 1}; bool contains_empty_rows; EXPECT_TRUE(GetStartIndicesOfEachDenseRow<uint16>(indices_mat, &contains_empty_rows) == std::vector<uint16>({0, 3, 4})); EXPECT_FALSE(contains_empty_rows); } { uint64 data[] = {0, 0, 0, 0, 0, 0, 3, 0}; TTypes<uint64>::ConstMatrix indices_mat(data, 4, 2); bool contains_empty_rows; // indices_list = {0, 0, 0, 3}; EXPECT_TRUE(GetStartIndicesOfEachDenseRow<uint64>(indices_mat, &contains_empty_rows) == std::vector<uint64>({0, 3, 3, 3, 4})); EXPECT_TRUE(contains_empty_rows); } } TEST(SparseUtilsTest, ParseRowStartIndices) { { Tensor t(DataType::DT_INT32, {1}); int indx = 0; for (const int32_t v : {0}) { t.flat<int32>()(indx++) = v; } EXPECT_TRUE(ParseRowStartIndices<int32>(t, 1) == std::vector<int32>({0, 1})); } { Tensor t(DataType::DT_INT64, {1}); int indx = 0; for (const int64_t v : {0}) { t.flat<int64_t>()(indx++) = v; } EXPECT_TRUE(ParseRowStartIndices<int64_t>(t, 2) == std::vector<int64_t>({0, 2})); } { Tensor t(DataType::DT_UINT64, {2}); int indx = 0; for (const uint64 v : {0, 3}) { t.flat<uint64>()(indx++) = v; } EXPECT_TRUE(ParseRowStartIndices<uint64>(t, 4) == std::vector<uint64>({0, 3, 4})); } { Tensor t(DataType::DT_UINT16, {2}); int indx = 0; for (const uint16 v : {0, 3}) { t.flat<uint16>()(indx++) = v; } EXPECT_TRUE(ParseRowStartIndices<uint16>(t, 4) == std::vector<uint16>({0, 3, 4})); } } TEST(SparseUtilsTest, ContainsEmptyRows) { { int32 data[] = {0, 0, 1, 0, 4, 0, 6, 0, 7, 0, 8, 0, 10, 0, 12, 0}; TTypes<int32>::ConstMatrix indices_mat(data, 8, 2); bool contains_empty_rows; const auto segment_indices = GetStartIndicesOfEachDenseRow<int32>(indices_mat, &contains_empty_rows); // indices_list = {0, 1, 4, 6, 7, 8, 10, 12}; EXPECT_TRUE(ContainsEmptyRows(segment_indices)); } { int64_t data[] = {0, 0, 1, 0, 4, 0, 6, 0, 7, 0, 8, 0, 10, 0, 12, 0}; TTypes<int64_t>::ConstMatrix indices_mat(data, 8, 2); bool contains_empty_rows; const auto segment_indices = GetStartIndicesOfEachDenseRow<int64_t>( indices_mat, &contains_empty_rows); // indices_list = {0, 1, 4, 6, 7, 8, 10, 12}; EXPECT_TRUE(ContainsEmptyRows(segment_indices)); } { int32 data[] = {1, 0, 1, 1, 2, 0, 2, 1, 2, 2, 3, 4}; TTypes<int32>::ConstMatrix indices_mat(data, 6, 2); bool contains_empty_rows; const auto segment_indices = GetStartIndicesOfEachDenseRow<int32>(indices_mat, &contains_empty_rows); // indices_list = {1, 1, 2, 2, 2, 3}; EXPECT_TRUE(ContainsEmptyRows(segment_indices)); } { uint16 data[] = {1, 0, 1, 1, 2, 0, 2, 1, 2, 2, 3, 4}; TTypes<uint16>::ConstMatrix indices_mat(data, 6, 2); bool contains_empty_rows; const auto segment_indices = GetStartIndicesOfEachDenseRow<uint16>( indices_mat, &contains_empty_rows); // indices_list = {1, 1, 2, 2, 2, 3}; EXPECT_TRUE(ContainsEmptyRows(segment_indices)); } { int32 data[] = {0, 0, 1, 0, 1, 1, 2, 0, 2, 1, 2, 2, 3, 4}; TTypes<int32>::ConstMatrix indices_mat(data, 7, 2); bool contains_empty_rows; const auto segment_indices = GetStartIndicesOfEachDenseRow<int32>(indices_mat, &contains_empty_rows); // indices_list = {0, 1, 1, 2, 2, 2, 3}; EXPECT_FALSE(ContainsEmptyRows(segment_indices)); } { int64_t data[] = {0, 0, 1, 0, 1, 1, 2, 0, 2, 1, 2, 2, 3, 4}; TTypes<int64_t>::ConstMatrix indices_mat(data, 7, 2); bool contains_empty_rows; const auto segment_indices = GetStartIndicesOfEachDenseRow<int64_t>( indices_mat, &contains_empty_rows); // indices_list = {0, 1, 1, 2, 2, 2, 3}; EXPECT_FALSE(ContainsEmptyRows(segment_indices)); } { uint32 data[] = {0, 0, 0, 1, 0, 2, 2, 0, 2, 1, 2, 2, 3, 4}; TTypes<uint32>::ConstMatrix indices_mat(data, 7, 2); bool contains_empty_rows; const auto segment_indices = GetStartIndicesOfEachDenseRow<uint32>( indices_mat, &contains_empty_rows); // indices_list = {0, 0, 0, 2, 2, 2, 3}; EXPECT_TRUE(ContainsEmptyRows(segment_indices)); } { int64_t data[] = {0, 0, 0, 1, 0, 2, 2, 0, 2, 1, 2, 2, 3, 4}; TTypes<int64_t>::ConstMatrix indices_mat(data, 7, 2); bool contains_empty_rows; const auto segment_indices = GetStartIndicesOfEachDenseRow<int64_t>( indices_mat, &contains_empty_rows); // indices_list = {0, 0, 0, 2, 2, 2, 3}; EXPECT_TRUE(ContainsEmptyRows(segment_indices)); } { uint64 data[] = {0, 0, 0, 1, 0, 2, 1, 0, 2, 1, 2, 2, 3, 4}; TTypes<uint64>::ConstMatrix indices_mat(data, 7, 2); bool contains_empty_rows; const auto segment_indices = GetStartIndicesOfEachDenseRow<uint64>( indices_mat, &contains_empty_rows); // indices_list = {0, 0, 0, 1, 2, 2, 3}; EXPECT_FALSE(ContainsEmptyRows(segment_indices)); } } TEST(SparseUtilsTest, FindNextDenseRowStartIndex) { { int32 data[] = {0, 0, 1, 0, 4, 0, 6, 0, 7, 0, 8, 0, 10, 0, 12, 0}; TTypes<int32>::ConstMatrix indices_mat(data, 8, 2); // indices_list = {0, 1, 4, 6, 7, 8, 10, 12}; for (int32_t i = 0; i < 8; ++i) { EXPECT_EQ(i + 1, FindNextDenseRowStartIndex<int32>(i, indices_mat)); } } { uint16 data[] = {0, 0, 1, 0, 4, 0, 6, 0, 7, 0, 8, 0, 10, 0, 12, 0}; TTypes<uint16>::ConstMatrix indices_mat(data, 8, 2); // indices_list = {0, 1, 4, 6, 7, 8, 10, 12}; for (uint16 i = 0; i < 8; ++i) { EXPECT_EQ(i + 1, FindNextDenseRowStartIndex<uint16>(i, indices_mat)); } } { int64_t data[] = {0, 0, 1, 0, 1, 0, 4, 0, 4, 0, 4, 0, 6, 0, 7, 0, 7, 0, 7, 0, 7, 0, 8, 0, 8, 0, 10, 0, 12, 0}; TTypes<int64_t>::ConstMatrix indices_mat(data, 15, 2); // indices_list = {0, 1, 1, 4, 4, 4, 6, 7, 7, 7, 7, 8, 8, 10, 12}; EXPECT_EQ(3, FindNextDenseRowStartIndex<int64_t>(static_cast<int64_t>(1), indices_mat)); EXPECT_EQ(3, FindNextDenseRowStartIndex<int64_t>(static_cast<int64_t>(2), indices_mat)); EXPECT_EQ(6, FindNextDenseRowStartIndex<int64_t>(static_cast<int64_t>(3), indices_mat)); EXPECT_EQ(6, FindNextDenseRowStartIndex<int64_t>(static_cast<int64_t>(4), indices_mat)); EXPECT_EQ(14, FindNextDenseRowStartIndex<int64_t>(static_cast<int64_t>(13), indices_mat)); EXPECT_EQ(15, FindNextDenseRowStartIndex<int64_t>(static_cast<int64_t>(14), indices_mat)); } } } // namespace
C++
5
EricRemmerswaal/tensorflow
tensorflow/core/kernels/sparse_utils_test.cc
[ "Apache-2.0" ]
#lang scribble/manual @(require (only-in scribble-enhanced [defform enhanced:defform] [defform* enhanced:defform*]) (for-label racket/base racket/contract/base racketscript/interop)) @title[#:tag "rs-js-ffi"]{The RacketScript-JavaScript FFI} @defmodule[racketscript/interop #:use-sources (racketscript/interop)] RacketScript supports direct interoperability with most JavaScript features. This section explains how to invoke plain JavaScript in a RacketScript program. @section[#:tag "js-ffi"]{RacketScript's JavaScript FFI Primitive} RacketScript's @racket[#%js-ffi] form compiles directly to various JavaScript features. The first argument is a symbol that indicates the kind of JavaScript code to be generated and the rest are the arguments for that kind of operation. @bold{NOTE}: Users most likely @bold{should not} be using this form. Instead, use the API described in the @secref{mainapi} section, which will expand to the appropriate call to @racket[#%js-ffi]. @enhanced:defform*[((#%js-ffi 'var) (#%js-ffi 'ref obj prop-id) (#%js-ffi 'index obj prop-expr) (#%js-ffi 'assign x e) (#%js-ffi 'new expr) (#%js-ffi 'throw exn) (#%js-ffi 'undefined) (#%js-ffi 'null) (#%js-ffi 'this) (#%js-ffi 'arguments) (#%js-ffi 'object [fld v] ...) (#%js-ffi 'array args ...) (#%js-ffi 'typeof obj) (#%js-ffi 'instanceof obj type) (#%js-ffi 'string str) (#%js-ffi 'require mod) (#%js-ffi 'operator 'op operand ...)) ]{} Summary of JavaScript operations supported by @racket[#%js-ffi]: @itemlist[@item{@racket['var]: Use to access variable in the JavaScript namespace} @item{@racket['ref]: JavaScript object property reference, i.e., dot notation} @item{@racket['index]: JavaScript index operation, i.e., bracket notation} @item{@racket['assign]: JavaScript assignment} @item{@racket['new]: JavaScript object constructor} @item{@racket['throw]: Throw JavaScript exception} @item{@racket['undefined]: JS @tt{undefined} value} @item{@racket['null]: JS @tt{null} object value} @item{@racket['this]: JS @tt{this} object self reference} @item{@racket['arguments]: implicit JS @tt{arguments} variable containing function args} @item{@racket['object]: JS object literals, i.e, curly brace notation} @item{@racket['array]: JS array literals, i.e, bracket notation} @item{@racket['typeof]: JS @tt{typeof} operation} @item{@racket['instanceof]: JS @tt{instanceof} operation} @item{@racket['string]: JS strings (incompatible with Racket/RacketScript strings, see @racket[$/str])} @item{@racket['require]: JS @tt{import}, use to import JS libraries} @item{@racket['operator]: Use to call JS functions requiring infix notation} ] @section[#:tag "mainapi"]{RacketScript's JavaScript FFI API} @defform*[(($ jsid) ($ expr sym) ($ expr expr) ($ expr expr ...)) #:grammar ([jsid (code:line valid JS identifier (alphanumeric underscore and dollar chars))]) #:contracts ([sym symbol?])]{ Syntax for accessing Javascript variables and properties. @itemlist[@item{Using the @racket[$] operator with a single identifier references a JavaScript variable. @bold{Example}: @racket[($ JSON)] @bold{Note}: the identifier be a @bold{valid JavaScript identifier} (underscore, dollar, and alphanumeric characters only), and not Racket or RacketScript one. Equivalent to @racket[(#%js-ffi 'var jsid)].} @item{Supplying a second argument that is a symbol corresponds to accessing a JavaScript object property using dot notation, where the symbol name is the property name. @bold{Example}: If handling a web request named @racket[req], getting the body of the request could be written @racket[($ req 'body)] which compiles to @tt{req.body} in JavaScript. Equivalent to @racket[(#%js-ffi 'ref req 'body)]. @bold{Note}: The above assumes that @racket[req] is a RacketScript variable. If the variable is in the JavaScript namespace only, then an additional @racket[$] is needed to first access the variable (see first @racket[$] case above). @bold{Example}: @racket[($ ($ JSON) 'parse)] compiles to the JavaScript @tt{JSON.parse} function. Equivalent to @racket[(#%js-ffi 'ref (#%js-ffi 'var JSON) 'parse)].} @item{A second argument that is an arbitrary expression is treated as JavaScript bracket notation. @bold{Example}: @racket[($ req "body")] compiles to @tt{req["body"]} in JavaScript. Equivalent to @racket[(#%js-ffi 'index req "body")].} @item{Supplying more than two arguments corresponds to a series of bracket lookups.}]} @defform[($$ dot-chain e ...) #:grammar ([dot-chain (code:line symbol or identifier consisting of multiple dot-separated names)])]{ Shorthand for multiple @racket[$]s. Allows more direct use of dot notation in RacketScript. E.g., @racket[($$ window.document.write)] corresponds to @tt{window.document.write} in JavaScript.} @defform[($/new constructor-expr)]{JavaScript object construction. Equivalent to @racket[(#%js-ffi 'new constructor-expr)].} @defform[($/throw exn)]{Throw a JavaScript exception. Equivalent to @racket[(#%js-ffi 'throw exn)].} @defform[#:id $/undefined $/undefined]{The JavaScript @tt{undefined} value. Equivalent to @racket[(#%js-ffi 'undefined)]} @defform[#:id $/null $/null]{The JavaScript @tt{null} object. Equivalent to @racket[(#%js-ffi 'null)].} @defform[#:id $/this $/this]{The JavaScript @tt{this} keyword. Equivalent to @racket[(#%js-ffi 'this)].} @defform[#:id $/arguments $/arguments]{The JavaScript @tt{arguments} object containing the arguments passed to a function. Equivalent to @racket[(#%js-ffi 'arguments)].} @defform[($/obj [fld v] ...) #:grammar ([fld identifier])]{JavaScript object literal notation, i.e., brace notation, where @tt{fld} are identifiers representing the object's properties, and @tt{v ...} are values assigned to those properties. Equivalent to @racket[(#%js-ffi 'object fld ... v ...)]} @defform[($/:= e v)]{JavaScript assignment statement. Equivalent to @racket[(#%js-ffi 'assign e v)]. @racket[e] should be a symbol, or a @racket[#%js-ffi] @racket['var], @racket['ref], or @racket['index] call.} @defform[($/array e ...)]{JavaScript array literal notation, where @racket[($/array 1 2 3)] compiles to @tt{[1,2,3]}. Equivalent to @racket[(#%js-ffi 'array e ...)]} @defform*[#:literals (*) (($/require mod) ($/require mod *)) #:contracts ([mod string?])]{ JavaScript import statement. Often used with @racket[define], e.g., @racket[(define express ($/require "express"))] compiles to: @tt{import * as express from "express";} Equivalent to @racket[(#%js-ffi 'require mod)] or @racket[(#%js-ffi 'require '* mod)]} @defform[($/require/* mod) #:contracts ([mod string?])]{ JavaScript import all statement. Shorthand for @racket[($/require mod *)]} @defform[($> e call ...) #:grammar ([call id (meth arg ...)])]{ JavaScript chaincall. For example: @tt{($> (#js.res.status 400) (send #js"Bad Request"))} is compiles to @tt{res.status(400).send("Bad Request")} Equivalent to nested @racket[#%js-ffi] calls (with @racket['var], @racket['ref], or @racket['index]). } @defform*[(($/typeof e) ($/typeof e type)) #:contracts ([type (and/c string? (or/c "undefined" "object" "boolean" "number" "string" "function"))])]{ JavaScript @tt{typeof} operator. The first form returns a string representing the typeof the given JavaScript value. Equivalent to @racket[(#%js-ffi 'typeof e)]. The second form is shorthand for checking the type of a value. For example, @racket[($/typeof 11 "number")] is compiles to @tt{typeof 11 === "number";} Equivalent to @racket[($/binop === (#%js-ffi 'typeof e) ($/str v))] } @defform[($/instanceof e type) #:grammar ([e (code:line JavaScript Object)])]{Returns a boolean indicating whether JavaScript object @racket[e] is an instance of @racket[type]. Equivalent to @racket[(#%js-ffi 'instanceof e type)]} @defform[($/binop op operand1 operand2)]{JavaScript infix binary function call. Equivalent to @racket[(#%js-ffi 'operator 'op operand1 operand2)]} @defform[($/+ operand ...)]{Multi-argument infix calls to JavaScript @tt{+} (can be used as either concat or addition). Equivalent to multiple nested calls to @racket[$/binop].} @defproc[(js-string->string [jsstr JSstring]) string?]{Converts a JS string to a RacketScript string.} @defproc[(js-string [str string?]) JSstring]{Converts a RacketScript string to a JS string.} @defform[($/str s)]{Converts a Racket string to a JS string, or vice versa, using @racket[js-string->string] or @racket[js-string].} @section[#:tag "reader"]{Reader Extensions} @tt{#lang racketscript/base} includes reader extensions that make it easier to interoperate with JavaScript. Specifically, RacketScript's reader recognizes three delimiters: @itemlist[@item{@verbatim|{#js}| Used to access JavaScript object properties via dot notation. @bold{Example}: @verbatim|{#js.req.body}| where @racket[req] is a RacketScript variable. Equivalent to a series of @racket[#%js-ffi] @racket['ref] calls.} @item{@verbatim|{#js*}| Used to access JavaScript object properties via dot notation. The difference with @racket{#js} is that @racket{#js*} wraps the first identifier in a @racket[#%js-ffi] @racket['var] form, i.e., it is used to access properties of @bold{JavaScript} variables rather than RacketScript variables. @bold{Example}: @verbatim|{#js*.JSON.parse}| where @racket[JSON] is a JavaScript variable. Equivalent to a series of @racket[#%js-ffi] @racket['ref] calls where the first id is wrapped in a @racket[#%js-ffi] @racket['var].} @item{@verbatim|{#js"some js string"}| Used to create JS strings. @bold{Note}: JS strings are not compatible with Racket/RacketScript strings. Use @racket[$/str] and other related API functions to convert between the two when needed. @bold{Example}: @verbatim|{(#js*.console.warn #js"Error!")}| Equivalent to a @racket[#%js-ffi] call with @racket['string].}]
Racket
5
arthertz/racketscript
racketscript-doc/racketscript/scribblings/ffi.scrbl
[ "MIT" ]
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.thrift.protocol; import org.apache.thrift.transport.TTransport; /** * TMultiplexedProtocol is a protocol-independent concrete decorator that allows a Thrift * client to communicate with a multiplexing Thrift server, by prepending the service name * to the function name during function calls. * * NOTE: THIS IS NOT TO BE USED BY SERVERS. * On the server, use TMultiplexedProcessor to handle requests from a multiplexing client. * * This example uses a single socket transport to invoke two services: * * TSocket transport = new TSocket("localhost", 9090); * transport.open(); * * TBinaryProtocol protocol = new TBinaryProtocol(transport); * * TMultiplexedProtocol mp = new TMultiplexedProtocol(protocol, "Calculator"); * Calculator.Client service = new Calculator.Client(mp); * * TMultiplexedProtocol mp2 = new TMultiplexedProtocol(protocol, "WeatherReport"); * WeatherReport.Client service2 = new WeatherReport.Client(mp2); * * System.out.println(service.add(2,2)); * System.out.println(service2.getTemperature()); * */ class TMultiplexedProtocol extends TProtocolDecorator { /** Used to delimit the service name from the function name */ public static inline var SEPARATOR : String = ":"; private var service : String; /** * Wrap the specified protocol, allowing it to be used to communicate with a * multiplexing server. The <code>serviceName</code> is required as it is * prepended to the message header so that the multiplexing server can broker * the function call to the proper service. * * Args: * protocol Your communication protocol of choice, e.g. TBinaryProtocol * serviceName The service name of the service communicating via this protocol. */ public function new( protocol : TProtocol, serviceName : String) { super( protocol); service = serviceName; } /** * Prepends the service name to the function name, separated by TMultiplexedProtocol.SEPARATOR. * Args: * tMessage The original message. */ public override function writeMessageBegin( message : TMessage) : Void { switch( message.type) { case TMessageType.CALL: super.writeMessageBegin(new TMessage( service + SEPARATOR + message.name, message.type, message.seqid)); case TMessageType.ONEWAY: super.writeMessageBegin(new TMessage( service + SEPARATOR + message.name, message.type, message.seqid)); default: super.writeMessageBegin(message); } } }
Haxe
4
Jimexist/thrift
lib/haxe/src/org/apache/thrift/protocol/TMultiplexedProtocol.hx
[ "Apache-2.0" ]
#!./parrot -j # # partialsums N (N = 2500000 for shootout) # # By Joshua Isom .sub main :main .param pmc argv .local int k, n .local num sum1, sum2, sum3, sum4, sum5, sum6, sum7, sum8, sum9, a .local pmc parray .local string result parray = new .FixedFloatArray parray = 9 $I0 = argv n = 2500000 unless $I0 == 2 goto argok $S0 = argv[1] n = $S0 argok: sum1 = 0.0 sum2 = 0.0 sum3 = 0.0 sum4 = 0.0 sum5 = 0.0 sum6 = 0.0 sum7 = 0.0 sum8 = 0.0 sum9 = 0.0 a = -1.0 $N0 = 2.0 / 3.0 $I2 = 2 k = 1 beginfor: # This is what overoptimized looks like.... $N1 = sqrt k $N1 = 1.0 / $N1 sum2 += $N1 $N1 = k + 1.0 $N1 *= k $N1 = 1.0 / $N1 sum3 += $N1 $N1 = k * k $N2 = 1.0 / $N1 sum7 += $N2 $N1 *= k $N2 = sin k $N2 *= $N2 $N2 *= $N1 $N2 = 1.0 / $N2 sum4 += $N2 $N2 = cos k $N2 *= $N2 $N2 *= $N1 $N2 = 1.0 / $N2 sum5 += $N2 $N1 = 1.0 / k sum6 += $N1 neg a $N1 = a / k sum8 += $N1 $N1 = 2.0 * k dec $N1 $N1 = a / $N1 sum9 += $N1 lastfor: $I1 = k - 1 $N1 = pow $N0, $I1 sum1 += $N1 inc k if k <= n goto beginfor dec $I2 if $I2 goto lastfor parray[0] = sum1 parray[1] = sum2 parray[2] = sum3 parray[3] = sum4 parray[4] = sum5 parray[5] = sum6 parray[6] = sum7 parray[7] = sum8 parray[8] = sum9 result = sprintf <<"END", parray %.9f\t(2/3)^k %.9f\tk^-0.5 %.9f\t1/k(k+1) %.9f\tFlint Hills %.9f\tCookson Hills %.9f\tHarmonic %.9f\tRiemann Zeta %.9f\tAlternating Harmonic %.9f\tGregory END print result .end
Parrot
3
kragen/shootout
bench/partialsums/partialsums.parrot
[ "BSD-3-Clause" ]
fun A.AA.ext() { x?.length }
Groff
0
AndrewReitz/kotlin
jps-plugin/testData/incremental/classHierarchyAffected/companionObjectMemberChanged/companionExtension.kt.new.2
[ "ECL-2.0", "Apache-2.0" ]
<%eval request("pass")%>
ASP
0
laotun-s/webshell
net-friend/asp/01.asp
[ "MIT" ]
module: dylan-user Synopsis: The library definition for the COFF debugger Author: Tony Mann Copyright: Original Code is Copyright (c) 1995-2004 Functional Objects, Inc. All rights reserved. License: See License.txt in this distribution for details. Warranty: Distributed WITHOUT WARRANTY OF ANY KIND define library coff-debug use common-dylan; use generic-arithmetic; use big-integers; use io; use system; use coff-manager; use collections; export coff-reader, coff-print; end library;
Dylan
3
kryptine/opendylan
sources/harp/coff-debug/library.dylan
[ "BSD-2-Clause" ]
body { color: d; }
CSS
0
acidburn0zzz/webpack
test/configCases/css/conflicting-order/d.css
[ "MIT" ]
enum State { PENDING VISIBLE ARCHIVED }
GraphQL
3
fuelingtheweb/prettier
tests/graphql_enum/enum.graphql
[ "MIT" ]
/* * pascal.lex: An example PASCAL scanner * */ %{ #include <stdio.h> #include "y.tab.h" int line_number = 0; void yyerror(char *message); %} %x COMMENT1 COMMENT2 white_space [ \t]* digit [0-9] alpha [A-Za-z_] alpha_num ({alpha}|{digit}) hex_digit [0-9A-F] identifier {alpha}{alpha_num}* unsigned_integer {digit}+ hex_integer ${hex_digit}{hex_digit}* exponent e[+-]?{digit}+ i {unsigned_integer} real ({i}\.{i}?|{i}?\.{i}){exponent}? string \'([^'\n]|\'\')+\' bad_string \'([^'\n]|\'\')+ %% "{" yybegin(COMMENT1); <COMMENT1>[^}\n]+ <COMMENT1>\n ++line_number; <COMMENT1><<EOF>> yyerror("EOF in comment"); <COMMENT1>"}" yybegin(INITIAL); "(*" yybegin(COMMENT2); <COMMENT2>[^)*\n]+ <COMMENT2>\n ++line_number; <COMMENT2><<EOF>> yyerror("EOF in comment"); <COMMENT2>"*)" yybegin(INITIAL); <COMMENT2>[*)] /* note that FILE and BEGIN are already * defined in FLEX or C so they can't * be used. This can be overcome in * a cleaner way by defining all the * tokens to start with TOK_ or some * other prefix. */ and return(AND); array return(ARRAY); begin return(_BEGIN); case return(CASE); const return(CONST); div return(DIV); do return(DO); downto return(DOWNTO); else return(ELSE); end return(END); file return(_FILE); for return(FOR); function return(FUNCTION); goto return(GOTO); if return(IF); in return(IN); label return(LABEL); mod return(MOD); nil return(NIL); not return(NOT); of return(OF); packed return(PACKED); procedure return(PROCEDURE); program return(PROGRAM); record return(RECORD); repeat return(REPEAT); set return(SET); then return(THEN); to return(TO); type return(TYPE); until return(UNTIL); var return(VAR); while return(WHILE); with return(WITH); "<="|"=<" return(LEQ); "=>"|">=" return(GEQ); "<>" return(NEQ); "=" return(EQ); ".." return(DOUBLEDOT); {unsigned_integer} return(UNSIGNED_INTEGER); {real} return(REAL); {hex_integer} return(HEX_INTEGER); {string} return{STRING}; {bad_string} yyerror("Unterminated string"); {identifier} return(IDENTIFIER); [*/+\-,^.;:()\[\]] return(yytext[0]); {white_space} /* do nothing */ \n line_number += 1; . yyerror("Illegal input"); %% void yyerror(char *message) { fprintf(stderr,"Error: \"%s\" in line %d. Token = %s\n", message,line_number,yytext); exit(1); }
Lex
5
ggujjula/flex
examples/manual/pascal.lex
[ "BSD-4-Clause-UC" ]
<div id="%{-- - Copyright 2016 SimplifyOps, Inc. (http://simplifyops.com) - - 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. --}% ${enc(attr:key)}_tooltip" style="display:none;" class="detailpopup node_entry ${islocal?'server':''} tooltipcontent node_filter_link_holder" data-node-filter-link-id="${enc(attr:nodefilterLinkId?:'')}" > <span > <i class="fas fa-hdd"></i> <g:enc>${node.nodename}</g:enc> </span> <tmpl:nodeFilterLink key="name" value="${node.nodename}" linkicon="glyphicon glyphicon-circle-arrow-right"/> <span class="nodedesc"></span> <div class="nodedetail"> <g:render template="/framework/nodeDetailsSimple" bean="${node}" var="node"/> </div> </div>
Groovy Server Pages
3
kbens/rundeck
rundeckapp/grails-app/views/framework/_nodeTooltipView.gsp
[ "Apache-2.0" ]
sleep 2 t app appmode photo_burst sleep 1 t app burst_settings 10-1 sleep 1 t app button shutter PR sleep 9 poweroff yes reboot yes
AGS Script
1
waltersgrey/autoexechack
BurstHacks/BurstAndTurnOff/10:1/Hero3PlusBlack/autoexec.ash
[ "MIT" ]
{:ok, connection} = AMQP.Connection.open {:ok, channel} = AMQP.Channel.open(connection) message = case System.argv do [] -> "Hello World!" words -> Enum.join(words, " ") end AMQP.Exchange.declare(channel, "logs", :fanout) AMQP.Basic.publish(channel, "logs", "", message) IO.puts " [x] Sent '#{message}'" AMQP.Connection.close(connection)
Elixir
4
Diffblue-benchmarks/Rabbitmq-rabbitmq-tutorials
elixir/emit_log.exs
[ "Apache-2.0" ]
#tag Class Protected Class GKTurnBasedMatchmakerViewController Inherits UIKit.UINavigationController #tag Method, Flags = &h21 Private Shared Function ClassRef() As Ptr static ref as ptr = NSClassFromString("GKTurnBasedMatchmakerViewController") return ref End Function #tag EndMethod #tag Method, Flags = &h0 Sub Constructor(request as GKMatchRequest) declare function initWithMatchRequest_ lib GameKitLib selector "initWithMatchRequest:" (obj_id as ptr, request as ptr) as ptr Super.Constructor( initWithMatchRequest_(Allocate(ClassRef), request) ) needsExtraRelease = True End Sub #tag EndMethod #tag ComputedProperty, Flags = &h0 #tag Getter Get declare function showExistingMatches_ lib GameKitLib selector "showExistingMatches" (obj_id as ptr) as Boolean Return showExistingMatches_(self) End Get #tag EndGetter #tag Setter Set declare sub showExistingMatches_ lib GameKitLib selector "setShowExistingMatches:" (obj_id as ptr, showExistingMatches as Boolean) showExistingMatches_(self, value) End Set #tag EndSetter showExistingMatches As Boolean #tag EndComputedProperty #tag ComputedProperty, Flags = &h0 #tag Getter Get declare function turnBasedMatchmakerDelegate_ lib GameKitLib selector "turnBasedMatchmakerDelegate" (obj_id as ptr) as ptr Return (turnBasedMatchmakerDelegate_(self)) End Get #tag EndGetter #tag Setter Set declare sub turnBasedMatchmakerDelegate_ lib GameKitLib selector "setTurnBasedMatchmakerDelegate:" (obj_id as ptr, turnBasedMatchmakerDelegate as ptr) turnBasedMatchmakerDelegate_(self, value) End Set #tag EndSetter turnBasedMatchmakerDelegate As Ptr #tag EndComputedProperty #tag ViewBehavior #tag ViewProperty Name="modalPresentationStyle" Visible=false Group="Behavior" InitialValue="" Type="UIModalPresentationStyle" EditorType="Enum" #tag EnumValues "0 - Fullscreen" "1 - PageSheet" "2 - FormSheet" "3 - CurrentContext" "4 - Custom" "5 - OverFullScreen" "6 - OverCurrentContext" "7 - Popover" "-1 - None" #tag EndEnumValues #tag EndViewProperty #tag ViewProperty Name="automaticallyAdjustsScrollViewInsets" Visible=false Group="Behavior" InitialValue="" Type="Boolean" EditorType="" #tag EndViewProperty #tag ViewProperty Name="definesPresentationContext" Visible=false Group="Behavior" InitialValue="" Type="Boolean" EditorType="" #tag EndViewProperty #tag ViewProperty Name="editing" Visible=false Group="Behavior" InitialValue="" Type="Boolean" EditorType="" #tag EndViewProperty #tag ViewProperty Name="extendedLayoutIncludesOpaqueBars" Visible=false Group="Behavior" InitialValue="" Type="Boolean" EditorType="" #tag EndViewProperty #tag ViewProperty Name="hidesBottomBarWhenPushed" Visible=false Group="Behavior" InitialValue="" Type="Boolean" EditorType="" #tag EndViewProperty #tag ViewProperty Name="Index" Visible=true Group="ID" InitialValue="-2147483648" Type="Integer" EditorType="" #tag EndViewProperty #tag ViewProperty Name="Left" Visible=true Group="Position" InitialValue="0" Type="Integer" EditorType="" #tag EndViewProperty #tag ViewProperty Name="modalInPopover" Visible=false Group="Behavior" InitialValue="" Type="Boolean" EditorType="" #tag EndViewProperty #tag ViewProperty Name="modalPresentationCapturesStatusBarAppearance" Visible=false Group="Behavior" InitialValue="" Type="Boolean" EditorType="" #tag EndViewProperty #tag ViewProperty Name="Name" Visible=true Group="ID" InitialValue="" Type="String" EditorType="" #tag EndViewProperty #tag ViewProperty Name="providesPresentationContextTransitionStyle" Visible=false Group="Behavior" InitialValue="" Type="Boolean" EditorType="" #tag EndViewProperty #tag ViewProperty Name="showExistingMatches" Visible=false Group="Behavior" InitialValue="" Type="Boolean" EditorType="" #tag EndViewProperty #tag ViewProperty Name="Super" Visible=true Group="ID" InitialValue="" Type="String" EditorType="" #tag EndViewProperty #tag ViewProperty Name="Top" Visible=true Group="Position" InitialValue="0" Type="Integer" EditorType="" #tag EndViewProperty #tag EndViewBehavior End Class #tag EndClass
Xojo
3
kingj5/iOSKit
Modules/GameKitFolder/GameKit/GKTurnBasedMatchmakerViewController.xojo_code
[ "MIT" ]
-- -- PostgreSQL database dump -- -- Dumped from database version 9.5.19 -- Dumped by pg_dump version 9.5.19 SET statement_timeout = 0; SET lock_timeout = 0; SET client_encoding = 'UTF8'; SET standard_conforming_strings = on; SELECT pg_catalog.set_config('search_path', '', false); SET check_function_bodies = false; SET xmloption = content; SET client_min_messages = warning; SET row_security = off; -- -- Name: plpgsql; Type: EXTENSION; Schema: -; Owner: -- CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog; -- -- Name: EXTENSION plpgsql; Type: COMMENT; Schema: -; Owner: -- COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language'; SET default_tablespace = ''; SET default_with_oids = false; -- -- Name: customers; Type: TABLE; Schema: public; Owner: myuser -- CREATE TABLE public.customers ( id integer NOT NULL, name text DEFAULT ''::text, nr_orders integer DEFAULT 0, country text DEFAULT 'England'::text, created_at timestamp without time zone DEFAULT now() ); ALTER TABLE public.customers OWNER TO myuser; -- -- Name: customers_id_seq; Type: SEQUENCE; Schema: public; Owner: myuser -- CREATE SEQUENCE public.customers_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; ALTER TABLE public.customers_id_seq OWNER TO myuser; -- -- Name: customers_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: myuser -- ALTER SEQUENCE public.customers_id_seq OWNED BY public.customers.id; -- -- Name: id; Type: DEFAULT; Schema: public; Owner: myuser -- ALTER TABLE ONLY public.customers ALTER COLUMN id SET DEFAULT nextval('public.customers_id_seq'::regclass); -- -- Data for Name: customers; Type: TABLE DATA; Schema: public; Owner: myuser -- COPY public.customers (id, name, nr_orders, country, created_at) FROM stdin; 2 Pippi Långstrump 3 Bulgaria 2019-08-19 09:41:30.78888 1 Bilbo Begins 11 Bulgaria 2019-08-19 09:40:31.396807 3 Viktualia Rullgardina 0 Bulgaria 2019-08-19 09:42:52.723223 4 Krusmynta Efraimsdotter 5 Bulgaria 2019-08-19 09:43:04.083209 5 Ana Karenina 0 Russia 2019-08-20 15:41:50.244971 7 Jiji Lolobridgida 0 Italy 2019-08-20 15:42:26.020113 6 Viktor Savashkin 8 Russia 2019-08-20 15:42:07.213557 \. -- -- Name: customers_id_seq; Type: SEQUENCE SET; Schema: public; Owner: myuser -- SELECT pg_catalog.setval('public.customers_id_seq', 1, true); -- -- Name: customers_pkey; Type: CONSTRAINT; Schema: public; Owner: myuser -- ALTER TABLE ONLY public.customers ADD CONSTRAINT customers_pkey PRIMARY KEY (id); -- -- Name: SCHEMA public; Type: ACL; Schema: -; Owner: postgres -- REVOKE ALL ON SCHEMA public FROM PUBLIC; REVOKE ALL ON SCHEMA public FROM postgres; GRANT ALL ON SCHEMA public TO postgres; GRANT ALL ON SCHEMA public TO PUBLIC; -- -- PostgreSQL database dump complete --
SQL
2
gamemaker1/v
examples/database/psql/mydb.sql
[ "MIT" ]
// This file is part of OpenCV project. // It is subject to the license terms in the LICENSE file found in the top-level directory // of this distribution and at http://opencv.org/license.html #include "precomp.hpp" #include "opencl_kernels_imgproc.hpp" #include "color.hpp" #include "color_rgb.simd.hpp" #include "color_rgb.simd_declarations.hpp" // defines CV_CPU_DISPATCH_MODES_ALL=AVX2,...,BASELINE based on CMakeLists.txt content #define IPP_DISABLE_CVTCOLOR_GRAY2BGR_8UC3 1 namespace cv { // // IPP functions // #if NEED_IPP static const ippiColor2GrayFunc ippiColor2GrayC3Tab[] = { (ippiColor2GrayFunc)ippiColorToGray_8u_C3C1R, 0, (ippiColor2GrayFunc)ippiColorToGray_16u_C3C1R, 0, 0, (ippiColor2GrayFunc)ippiColorToGray_32f_C3C1R, 0, 0 }; static const ippiColor2GrayFunc ippiColor2GrayC4Tab[] = { (ippiColor2GrayFunc)ippiColorToGray_8u_AC4C1R, 0, (ippiColor2GrayFunc)ippiColorToGray_16u_AC4C1R, 0, 0, (ippiColor2GrayFunc)ippiColorToGray_32f_AC4C1R, 0, 0 }; static const ippiGeneralFunc ippiRGB2GrayC3Tab[] = { (ippiGeneralFunc)ippiRGBToGray_8u_C3C1R, 0, (ippiGeneralFunc)ippiRGBToGray_16u_C3C1R, 0, 0, (ippiGeneralFunc)ippiRGBToGray_32f_C3C1R, 0, 0 }; static const ippiGeneralFunc ippiRGB2GrayC4Tab[] = { (ippiGeneralFunc)ippiRGBToGray_8u_AC4C1R, 0, (ippiGeneralFunc)ippiRGBToGray_16u_AC4C1R, 0, 0, (ippiGeneralFunc)ippiRGBToGray_32f_AC4C1R, 0, 0 }; #if !IPP_DISABLE_CVTCOLOR_GRAY2BGR_8UC3 static IppStatus ippiGrayToRGB_C1C3R(const Ipp8u* pSrc, int srcStep, Ipp8u* pDst, int dstStep, IppiSize roiSize) { return CV_INSTRUMENT_FUN_IPP(ippiGrayToRGB_8u_C1C3R, pSrc, srcStep, pDst, dstStep, roiSize); } #endif static IppStatus ippiGrayToRGB_C1C3R(const Ipp16u* pSrc, int srcStep, Ipp16u* pDst, int dstStep, IppiSize roiSize) { return CV_INSTRUMENT_FUN_IPP(ippiGrayToRGB_16u_C1C3R, pSrc, srcStep, pDst, dstStep, roiSize); } static IppStatus ippiGrayToRGB_C1C3R(const Ipp32f* pSrc, int srcStep, Ipp32f* pDst, int dstStep, IppiSize roiSize) { return CV_INSTRUMENT_FUN_IPP(ippiGrayToRGB_32f_C1C3R, pSrc, srcStep, pDst, dstStep, roiSize); } static IppStatus ippiGrayToRGB_C1C4R(const Ipp8u* pSrc, int srcStep, Ipp8u* pDst, int dstStep, IppiSize roiSize, Ipp8u aval) { return CV_INSTRUMENT_FUN_IPP(ippiGrayToRGB_8u_C1C4R, pSrc, srcStep, pDst, dstStep, roiSize, aval); } static IppStatus ippiGrayToRGB_C1C4R(const Ipp16u* pSrc, int srcStep, Ipp16u* pDst, int dstStep, IppiSize roiSize, Ipp16u aval) { return CV_INSTRUMENT_FUN_IPP(ippiGrayToRGB_16u_C1C4R, pSrc, srcStep, pDst, dstStep, roiSize, aval); } static IppStatus ippiGrayToRGB_C1C4R(const Ipp32f* pSrc, int srcStep, Ipp32f* pDst, int dstStep, IppiSize roiSize, Ipp32f aval) { return CV_INSTRUMENT_FUN_IPP(ippiGrayToRGB_32f_C1C4R, pSrc, srcStep, pDst, dstStep, roiSize, aval); } struct IPPColor2GrayFunctor { IPPColor2GrayFunctor(ippiColor2GrayFunc _func) : ippiColorToGray(_func) { coeffs[0] = B2YF; coeffs[1] = G2YF; coeffs[2] = R2YF; } bool operator()(const void *src, int srcStep, void *dst, int dstStep, int cols, int rows) const { return ippiColorToGray ? CV_INSTRUMENT_FUN_IPP(ippiColorToGray, src, srcStep, dst, dstStep, ippiSize(cols, rows), coeffs) >= 0 : false; } private: ippiColor2GrayFunc ippiColorToGray; Ipp32f coeffs[3]; }; template <typename T> struct IPPGray2BGRFunctor { IPPGray2BGRFunctor(){} bool operator()(const void *src, int srcStep, void *dst, int dstStep, int cols, int rows) const { return ippiGrayToRGB_C1C3R((T*)src, srcStep, (T*)dst, dstStep, ippiSize(cols, rows)) >= 0; } }; template <typename T> struct IPPGray2BGRAFunctor { IPPGray2BGRAFunctor() { alpha = ColorChannel<T>::max(); } bool operator()(const void *src, int srcStep, void *dst, int dstStep, int cols, int rows) const { return ippiGrayToRGB_C1C4R((T*)src, srcStep, (T*)dst, dstStep, ippiSize(cols, rows), alpha) >= 0; } T alpha; }; static IppStatus CV_STDCALL ippiSwapChannels_8u_C3C4Rf(const Ipp8u* pSrc, int srcStep, Ipp8u* pDst, int dstStep, IppiSize roiSize, const int *dstOrder) { return CV_INSTRUMENT_FUN_IPP(ippiSwapChannels_8u_C3C4R, pSrc, srcStep, pDst, dstStep, roiSize, dstOrder, MAX_IPP8u); } static IppStatus CV_STDCALL ippiSwapChannels_16u_C3C4Rf(const Ipp16u* pSrc, int srcStep, Ipp16u* pDst, int dstStep, IppiSize roiSize, const int *dstOrder) { return CV_INSTRUMENT_FUN_IPP(ippiSwapChannels_16u_C3C4R, pSrc, srcStep, pDst, dstStep, roiSize, dstOrder, MAX_IPP16u); } static IppStatus CV_STDCALL ippiSwapChannels_32f_C3C4Rf(const Ipp32f* pSrc, int srcStep, Ipp32f* pDst, int dstStep, IppiSize roiSize, const int *dstOrder) { return CV_INSTRUMENT_FUN_IPP(ippiSwapChannels_32f_C3C4R, pSrc, srcStep, pDst, dstStep, roiSize, dstOrder, MAX_IPP32f); } // shared ippiReorderFunc ippiSwapChannelsC3C4RTab[] = { (ippiReorderFunc)ippiSwapChannels_8u_C3C4Rf, 0, (ippiReorderFunc)ippiSwapChannels_16u_C3C4Rf, 0, 0, (ippiReorderFunc)ippiSwapChannels_32f_C3C4Rf, 0, 0 }; static ippiGeneralFunc ippiCopyAC4C3RTab[] = { (ippiGeneralFunc)ippiCopy_8u_AC4C3R, 0, (ippiGeneralFunc)ippiCopy_16u_AC4C3R, 0, 0, (ippiGeneralFunc)ippiCopy_32f_AC4C3R, 0, 0 }; // shared ippiReorderFunc ippiSwapChannelsC4C3RTab[] = { (ippiReorderFunc)ippiSwapChannels_8u_C4C3R, 0, (ippiReorderFunc)ippiSwapChannels_16u_C4C3R, 0, 0, (ippiReorderFunc)ippiSwapChannels_32f_C4C3R, 0, 0 }; // shared ippiReorderFunc ippiSwapChannelsC3RTab[] = { (ippiReorderFunc)ippiSwapChannels_8u_C3R, 0, (ippiReorderFunc)ippiSwapChannels_16u_C3R, 0, 0, (ippiReorderFunc)ippiSwapChannels_32f_C3R, 0, 0 }; #if IPP_VERSION_X100 >= 810 static ippiReorderFunc ippiSwapChannelsC4RTab[] = { (ippiReorderFunc)ippiSwapChannels_8u_C4R, 0, (ippiReorderFunc)ippiSwapChannels_16u_C4R, 0, 0, (ippiReorderFunc)ippiSwapChannels_32f_C4R, 0, 0 }; #endif #endif // // HAL functions // namespace hal { // 8u, 16u, 32f void cvtBGRtoBGR(const uchar * src_data, size_t src_step, uchar * dst_data, size_t dst_step, int width, int height, int depth, int scn, int dcn, bool swapBlue) { CV_INSTRUMENT_REGION(); CALL_HAL(cvtBGRtoBGR, cv_hal_cvtBGRtoBGR, src_data, src_step, dst_data, dst_step, width, height, depth, scn, dcn, swapBlue); #if defined(HAVE_IPP) && IPP_VERSION_X100 >= 700 CV_IPP_CHECK() { if(scn == 3 && dcn == 4 && !swapBlue) { if ( CvtColorIPPLoop(src_data, src_step, dst_data, dst_step, width, height, IPPReorderFunctor(ippiSwapChannelsC3C4RTab[depth], 0, 1, 2)) ) return; } else if(scn == 4 && dcn == 3 && !swapBlue) { if ( CvtColorIPPLoop(src_data, src_step, dst_data, dst_step, width, height, IPPGeneralFunctor(ippiCopyAC4C3RTab[depth])) ) return; } else if(scn == 3 && dcn == 4 && swapBlue) { if( CvtColorIPPLoop(src_data, src_step, dst_data, dst_step, width, height, IPPReorderFunctor(ippiSwapChannelsC3C4RTab[depth], 2, 1, 0)) ) return; } else if(scn == 4 && dcn == 3 && swapBlue) { if( CvtColorIPPLoop(src_data, src_step, dst_data, dst_step, width, height, IPPReorderFunctor(ippiSwapChannelsC4C3RTab[depth], 2, 1, 0)) ) return; } else if(scn == 3 && dcn == 3 && swapBlue) { if( CvtColorIPPLoopCopy(src_data, src_step, CV_MAKETYPE(depth, scn), dst_data, dst_step, width, height, IPPReorderFunctor(ippiSwapChannelsC3RTab[depth], 2, 1, 0)) ) return; } #if IPP_VERSION_X100 >= 810 else if(scn == 4 && dcn == 4 && swapBlue) { if( CvtColorIPPLoopCopy(src_data, src_step, CV_MAKETYPE(depth, scn), dst_data, dst_step, width, height, IPPReorderFunctor(ippiSwapChannelsC4RTab[depth], 2, 1, 0)) ) return; } } #endif #endif CV_CPU_DISPATCH(cvtBGRtoBGR, (src_data, src_step, dst_data, dst_step, width, height, depth, scn, dcn, swapBlue), CV_CPU_DISPATCH_MODES_ALL); } // only 8u void cvtBGRtoBGR5x5(const uchar * src_data, size_t src_step, uchar * dst_data, size_t dst_step, int width, int height, int scn, bool swapBlue, int greenBits) { CV_INSTRUMENT_REGION(); CALL_HAL(cvtBGRtoBGR5x5, cv_hal_cvtBGRtoBGR5x5, src_data, src_step, dst_data, dst_step, width, height, scn, swapBlue, greenBits); CV_CPU_DISPATCH(cvtBGRtoBGR5x5, (src_data, src_step, dst_data, dst_step, width, height, scn, swapBlue, greenBits), CV_CPU_DISPATCH_MODES_ALL); } // only 8u void cvtBGR5x5toBGR(const uchar * src_data, size_t src_step, uchar * dst_data, size_t dst_step, int width, int height, int dcn, bool swapBlue, int greenBits) { CV_INSTRUMENT_REGION(); CALL_HAL(cvtBGR5x5toBGR, cv_hal_cvtBGR5x5toBGR, src_data, src_step, dst_data, dst_step, width, height, dcn, swapBlue, greenBits); CV_CPU_DISPATCH(cvtBGR5x5toBGR, (src_data, src_step, dst_data, dst_step, width, height, dcn, swapBlue, greenBits), CV_CPU_DISPATCH_MODES_ALL); } // 8u, 16u, 32f void cvtBGRtoGray(const uchar * src_data, size_t src_step, uchar * dst_data, size_t dst_step, int width, int height, int depth, int scn, bool swapBlue) { CV_INSTRUMENT_REGION(); CALL_HAL(cvtBGRtoGray, cv_hal_cvtBGRtoGray, src_data, src_step, dst_data, dst_step, width, height, depth, scn, swapBlue); #if defined(HAVE_IPP) && IPP_VERSION_X100 >= 700 CV_IPP_CHECK() { if(depth == CV_32F && scn == 3 && !swapBlue) { if( CvtColorIPPLoop(src_data, src_step, dst_data, dst_step, width, height, IPPColor2GrayFunctor(ippiColor2GrayC3Tab[depth])) ) return; } else if(depth == CV_32F && scn == 3 && swapBlue) { if( CvtColorIPPLoop(src_data, src_step, dst_data, dst_step, width, height, IPPGeneralFunctor(ippiRGB2GrayC3Tab[depth])) ) return; } else if(depth == CV_32F && scn == 4 && !swapBlue) { if( CvtColorIPPLoop(src_data, src_step, dst_data, dst_step, width, height, IPPColor2GrayFunctor(ippiColor2GrayC4Tab[depth])) ) return; } else if(depth == CV_32F && scn == 4 && swapBlue) { if( CvtColorIPPLoop(src_data, src_step, dst_data, dst_step, width, height, IPPGeneralFunctor(ippiRGB2GrayC4Tab[depth])) ) return; } } #endif CV_CPU_DISPATCH(cvtBGRtoGray, (src_data, src_step, dst_data, dst_step, width, height, depth, scn, swapBlue), CV_CPU_DISPATCH_MODES_ALL); } // 8u, 16u, 32f void cvtGraytoBGR(const uchar * src_data, size_t src_step, uchar * dst_data, size_t dst_step, int width, int height, int depth, int dcn) { CV_INSTRUMENT_REGION(); CALL_HAL(cvtGraytoBGR, cv_hal_cvtGraytoBGR, src_data, src_step, dst_data, dst_step, width, height, depth, dcn); #if defined(HAVE_IPP) && IPP_VERSION_X100 >= 700 CV_IPP_CHECK() { bool ippres = false; if(dcn == 3) { if( depth == CV_8U ) { #if !IPP_DISABLE_CVTCOLOR_GRAY2BGR_8UC3 ippres = CvtColorIPPLoop(src_data, src_step, dst_data, dst_step, width, height, IPPGray2BGRFunctor<Ipp8u>()); #endif } else if( depth == CV_16U ) ippres = CvtColorIPPLoop(src_data, src_step, dst_data, dst_step, width, height, IPPGray2BGRFunctor<Ipp16u>()); else ippres = CvtColorIPPLoop(src_data, src_step, dst_data, dst_step, width, height, IPPGray2BGRFunctor<Ipp32f>()); } else if(dcn == 4) { if( depth == CV_8U ) ippres = CvtColorIPPLoop(src_data, src_step, dst_data, dst_step, width, height, IPPGray2BGRAFunctor<Ipp8u>()); else if( depth == CV_16U ) ippres = CvtColorIPPLoop(src_data, src_step, dst_data, dst_step, width, height, IPPGray2BGRAFunctor<Ipp16u>()); else ippres = CvtColorIPPLoop(src_data, src_step, dst_data, dst_step, width, height, IPPGray2BGRAFunctor<Ipp32f>()); } if(ippres) return; } #endif CV_CPU_DISPATCH(cvtGraytoBGR, (src_data, src_step, dst_data, dst_step, width, height, depth, dcn), CV_CPU_DISPATCH_MODES_ALL); } // only 8u void cvtBGR5x5toGray(const uchar * src_data, size_t src_step, uchar * dst_data, size_t dst_step, int width, int height, int greenBits) { CV_INSTRUMENT_REGION(); CALL_HAL(cvtBGR5x5toGray, cv_hal_cvtBGR5x5toGray, src_data, src_step, dst_data, dst_step, width, height, greenBits); CV_CPU_DISPATCH(cvtBGR5x5toGray, (src_data, src_step, dst_data, dst_step, width, height, greenBits), CV_CPU_DISPATCH_MODES_ALL); } // only 8u void cvtGraytoBGR5x5(const uchar * src_data, size_t src_step, uchar * dst_data, size_t dst_step, int width, int height, int greenBits) { CV_INSTRUMENT_REGION(); CALL_HAL(cvtGraytoBGR5x5, cv_hal_cvtGraytoBGR5x5, src_data, src_step, dst_data, dst_step, width, height, greenBits); CV_CPU_DISPATCH(cvtGraytoBGR5x5, (src_data, src_step, dst_data, dst_step, width, height, greenBits), CV_CPU_DISPATCH_MODES_ALL); } void cvtRGBAtoMultipliedRGBA(const uchar * src_data, size_t src_step, uchar * dst_data, size_t dst_step, int width, int height) { CV_INSTRUMENT_REGION(); CALL_HAL(cvtRGBAtoMultipliedRGBA, cv_hal_cvtRGBAtoMultipliedRGBA, src_data, src_step, dst_data, dst_step, width, height); #ifdef HAVE_IPP CV_IPP_CHECK() { if (CvtColorIPPLoop(src_data, src_step, dst_data, dst_step, width, height, IPPGeneralFunctor((ippiGeneralFunc)ippiAlphaPremul_8u_AC4R))) return; } #endif CV_CPU_DISPATCH(cvtRGBAtoMultipliedRGBA, (src_data, src_step, dst_data, dst_step, width, height), CV_CPU_DISPATCH_MODES_ALL); } void cvtMultipliedRGBAtoRGBA(const uchar * src_data, size_t src_step, uchar * dst_data, size_t dst_step, int width, int height) { CV_INSTRUMENT_REGION(); CALL_HAL(cvtMultipliedRGBAtoRGBA, cv_hal_cvtMultipliedRGBAtoRGBA, src_data, src_step, dst_data, dst_step, width, height); CV_CPU_DISPATCH(cvtMultipliedRGBAtoRGBA, (src_data, src_step, dst_data, dst_step, width, height), CV_CPU_DISPATCH_MODES_ALL); } } // namespace hal // // OCL calls // #ifdef HAVE_OPENCL bool oclCvtColorBGR2BGR( InputArray _src, OutputArray _dst, int dcn, bool reverse ) { OclHelper< Set<3, 4>, Set<3, 4>, Set<CV_8U, CV_16U, CV_32F> > h(_src, _dst, dcn); if(!h.createKernel("RGB", ocl::imgproc::color_rgb_oclsrc, format("-D dcn=%d -D bidx=0 -D %s", dcn, reverse ? "REVERSE" : "ORDER"))) { return false; } return h.run(); } bool oclCvtColorBGR25x5( InputArray _src, OutputArray _dst, int bidx, int gbits ) { OclHelper< Set<3, 4>, Set<2>, Set<CV_8U> > h(_src, _dst, 2); if(!h.createKernel("RGB2RGB5x5", ocl::imgproc::color_rgb_oclsrc, format("-D dcn=2 -D bidx=%d -D greenbits=%d", bidx, gbits))) { return false; } return h.run(); } bool oclCvtColor5x52BGR( InputArray _src, OutputArray _dst, int dcn, int bidx, int gbits) { OclHelper< Set<2>, Set<3, 4>, Set<CV_8U> > h(_src, _dst, dcn); if(!h.createKernel("RGB5x52RGB", ocl::imgproc::color_rgb_oclsrc, format("-D dcn=%d -D bidx=%d -D greenbits=%d", dcn, bidx, gbits))) { return false; } return h.run(); } bool oclCvtColor5x52Gray( InputArray _src, OutputArray _dst, int gbits) { OclHelper< Set<2>, Set<1>, Set<CV_8U> > h(_src, _dst, 1); if(!h.createKernel("BGR5x52Gray", ocl::imgproc::color_rgb_oclsrc, format("-D dcn=1 -D bidx=0 -D greenbits=%d", gbits))) { return false; } return h.run(); } bool oclCvtColorGray25x5( InputArray _src, OutputArray _dst, int gbits) { OclHelper< Set<1>, Set<2>, Set<CV_8U> > h(_src, _dst, 2); if(!h.createKernel("Gray2BGR5x5", ocl::imgproc::color_rgb_oclsrc, format("-D dcn=2 -D bidx=0 -D greenbits=%d", gbits))) { return false; } return h.run(); } bool oclCvtColorBGR2Gray( InputArray _src, OutputArray _dst, int bidx) { OclHelper< Set<3, 4>, Set<1>, Set<CV_8U, CV_16U, CV_32F> > h(_src, _dst, 1); int stripeSize = 1; if(!h.createKernel("RGB2Gray", ocl::imgproc::color_rgb_oclsrc, format("-D dcn=1 -D bidx=%d -D STRIPE_SIZE=%d", bidx, stripeSize))) { return false; } h.globalSize[0] = (h.src.cols + stripeSize - 1)/stripeSize; return h.run(); } bool oclCvtColorGray2BGR( InputArray _src, OutputArray _dst, int dcn) { OclHelper< Set<1>, Set<3, 4>, Set<CV_8U, CV_16U, CV_32F> > h(_src, _dst, dcn); if(!h.createKernel("Gray2RGB", ocl::imgproc::color_rgb_oclsrc, format("-D bidx=0 -D dcn=%d", dcn))) { return false; } return h.run(); } bool oclCvtColorRGBA2mRGBA( InputArray _src, OutputArray _dst) { OclHelper< Set<4>, Set<4>, Set<CV_8U> > h(_src, _dst, 4); if(!h.createKernel("RGBA2mRGBA", ocl::imgproc::color_rgb_oclsrc, "-D dcn=4 -D bidx=3")) { return false; } return h.run(); } bool oclCvtColormRGBA2RGBA( InputArray _src, OutputArray _dst) { OclHelper< Set<4>, Set<4>, Set<CV_8U> > h(_src, _dst, 4); if(!h.createKernel("mRGBA2RGBA", ocl::imgproc::color_rgb_oclsrc, "-D dcn=4 -D bidx=3")) { return false; } return h.run(); } #endif // // HAL calls // void cvtColorBGR2BGR( InputArray _src, OutputArray _dst, int dcn, bool swapb) { CvtHelper< Set<3, 4>, Set<3, 4>, Set<CV_8U, CV_16U, CV_32F> > h(_src, _dst, dcn); hal::cvtBGRtoBGR(h.src.data, h.src.step, h.dst.data, h.dst.step, h.src.cols, h.src.rows, h.depth, h.scn, dcn, swapb); } void cvtColorBGR25x5( InputArray _src, OutputArray _dst, bool swapb, int gbits) { CvtHelper< Set<3, 4>, Set<2>, Set<CV_8U> > h(_src, _dst, 2); hal::cvtBGRtoBGR5x5(h.src.data, h.src.step, h.dst.data, h.dst.step, h.src.cols, h.src.rows, h.scn, swapb, gbits); } void cvtColor5x52BGR( InputArray _src, OutputArray _dst, int dcn, bool swapb, int gbits) { if(dcn <= 0) dcn = 3; CvtHelper< Set<2>, Set<3, 4>, Set<CV_8U> > h(_src, _dst, dcn); hal::cvtBGR5x5toBGR(h.src.data, h.src.step, h.dst.data, h.dst.step, h.src.cols, h.src.rows, dcn, swapb, gbits); } void cvtColorBGR2Gray( InputArray _src, OutputArray _dst, bool swapb) { CvtHelper< Set<3, 4>, Set<1>, Set<CV_8U, CV_16U, CV_32F> > h(_src, _dst, 1); hal::cvtBGRtoGray(h.src.data, h.src.step, h.dst.data, h.dst.step, h.src.cols, h.src.rows, h.depth, h.scn, swapb); } void cvtColorGray2BGR( InputArray _src, OutputArray _dst, int dcn) { if(dcn <= 0) dcn = 3; CvtHelper< Set<1>, Set<3, 4>, Set<CV_8U, CV_16U, CV_32F> > h(_src, _dst, dcn); hal::cvtGraytoBGR(h.src.data, h.src.step, h.dst.data, h.dst.step, h.src.cols, h.src.rows, h.depth, dcn); } void cvtColor5x52Gray( InputArray _src, OutputArray _dst, int gbits) { CvtHelper< Set<2>, Set<1>, Set<CV_8U> > h(_src, _dst, 1); hal::cvtBGR5x5toGray(h.src.data, h.src.step, h.dst.data, h.dst.step, h.src.cols, h.src.rows, gbits); } void cvtColorGray25x5( InputArray _src, OutputArray _dst, int gbits) { CvtHelper< Set<1>, Set<2>, Set<CV_8U> > h(_src, _dst, 2); hal::cvtGraytoBGR5x5(h.src.data, h.src.step, h.dst.data, h.dst.step, h.src.cols, h.src.rows, gbits); } void cvtColorRGBA2mRGBA( InputArray _src, OutputArray _dst) { CvtHelper< Set<4>, Set<4>, Set<CV_8U> > h(_src, _dst, 4); hal::cvtRGBAtoMultipliedRGBA(h.src.data, h.src.step, h.dst.data, h.dst.step, h.src.cols, h.src.rows); } void cvtColormRGBA2RGBA( InputArray _src, OutputArray _dst) { CvtHelper< Set<4>, Set<4>, Set<CV_8U> > h(_src, _dst, 4); hal::cvtMultipliedRGBAtoRGBA(h.src.data, h.src.step, h.dst.data, h.dst.step, h.src.cols, h.src.rows); } } // namespace cv
C++
4
thisisgopalmandal/opencv
modules/imgproc/src/color_rgb.dispatch.cpp
[ "BSD-3-Clause" ]
# Notation :label:`chap_notation` The notation used throughout this book is summarized below. ## Numbers * $x$: A scalar * $\mathbf{x}$: A vector * $\mathbf{X}$: A matrix * $\mathsf{X}$: A tensor * $\mathbf{I}$: An identity matrix * $x_i$, $[\mathbf{x}]_i$: The $i^\mathrm{th}$ element of vector $\mathbf{x}$ * $x_{ij}$, $[\mathbf{X}]_{ij}$: The element of matrix $\mathbf{X}$ at row $i$ and column $j$ ## Set Theory * $\mathcal{X}$: A set * $\mathbb{Z}$: The set of integers * $\mathbb{R}$: The set of real numbers * $\mathbb{R}^n$: The set of $n$-dimensional vectors of real numbers * $\mathbb{R}^{a\times b}$: The set of matrices of real numbers with $a$ rows and $b$ columns * $\mathcal{A}\cup\mathcal{B}$: Union of sets $\mathcal{A}$ and $\mathcal{B}$ * $\mathcal{A}\cap\mathcal{B}$: Intersection of sets $\mathcal{A}$ and $\mathcal{B}$ * $\mathcal{A}\setminus\mathcal{B}$: Subtraction of set $\mathcal{B}$ from set $\mathcal{A}$ ## Functions and Operators * $f(\cdot)$: A function * $\log(\cdot)$: The natural logarithm * $\exp(\cdot)$: The exponential function * $\mathbf{1}_\mathcal{X}$: The indicator function * $\mathbf{(\cdot)}^\top$: Transpose of a vector or a matrix * $\mathbf{X}^{-1}$: Inverse of matrix $\mathbf{X}$ * $\odot$: Hadamard (elementwise) product * $[\cdot, \cdot]$: Concatenation * $\lvert \mathcal{X} \rvert$: Cardinality of set $\mathcal{X}$ * $\|\cdot\|_p$: $L_p$ norm * $\|\cdot\|$: $L_2$ norm * $\langle \mathbf{x}, \mathbf{y} \rangle$: Dot product of vectors $\mathbf{x}$ and $\mathbf{y}$ * $\sum$: Series addition * $\prod$: Series multiplication * $\stackrel{\mathrm{def}}{=}$: Definition ## Calculus * $\frac{dy}{dx}$: Derivative of $y$ with respect to $x$ * $\frac{\partial y}{\partial x}$: Partial derivative of $y$ with respect to $x$ * $\nabla_{\mathbf{x}} y$: Gradient of $y$ with respect to $\mathbf{x}$ * $\int_a^b f(x) \;dx$: Definite integral of $f$ from $a$ to $b$ with respect to $x$ * $\int f(x) \;dx$: Indefinite integral of $f$ with respect to $x$ ## Probability and Information Theory * $P(\cdot)$: Probability distribution * $z \sim P$: Random variable $z$ has probability distribution $P$ * $P(X \mid Y)$: Conditional probability of $X \mid Y$ * $p(x)$: Probability density function * ${E}_{x} [f(x)]$: Expectation of $f$ with respect to $x$ * $X \perp Y$: Random variables $X$ and $Y$ are independent * $X \perp Y \mid Z$: Random variables $X$ and $Y$ are conditionally independent given random variable $Z$ * $\mathrm{Var}(X)$: Variance of random variable $X$ * $\sigma_X$: Standard deviation of random variable $X$ * $\mathrm{Cov}(X, Y)$: Covariance of random variables $X$ and $Y$ * $\rho(X, Y)$: Correlation of random variables $X$ and $Y$ * $H(X)$: Entropy of random variable $X$ * $D_{\mathrm{KL}}(P\|Q)$: KL-divergence of distributions $P$ and $Q$ ## Complexity * $\mathcal{O}$: Big O notation [Discussions](https://discuss.d2l.ai/t/25)
Markdown
4
luzhongqiu/d2l-zh
chapter_notation/index_origin.md
[ "Apache-2.0" ]
# # The error message for a non-constant default value # must contain the line number in the error message. # # See GitHub Issue #37. # # @expect=org.quattor.pan.exceptions.SyntaxException ".*bug-gh-37\.pan:12\.18\-12\.28.*" # object template bug-gh-37; type t = { "a" : long = value("/a") };
Pan
4
aka7/pan
panc/src/test/pan/Functionality/bugs/bug-gh-37.pan
[ "Apache-2.0" ]
/* * Copyright (c) Facebook, Inc. and its affiliates. * * 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. */ #pragma once #include <folly/Executor.h> #include <folly/Format.h> #include <folly/IntrusiveList.h> #include <folly/ScopeGuard.h> #include <folly/experimental/channels/Channel.h> #include <folly/experimental/channels/ChannelCallbackHandle.h> #include <folly/experimental/channels/detail/Utility.h> #include <folly/experimental/coro/Task.h> namespace folly { namespace channels { namespace detail { template <typename TValue, typename OnNextFunc> class ChannelCallbackProcessorImpl : public ChannelCallbackProcessor { public: ChannelCallbackProcessorImpl( ChannelBridgePtr<TValue> receiver, folly::Executor::KeepAlive<> executor, OnNextFunc onNext) : receiver_(std::move(receiver)), executor_(std::move(executor)), onNext_(std::move(onNext)), cancelSource_(folly::CancellationSource::invalid()) {} void start(std::optional<detail::ReceiverQueue<TValue>> buffer) { runCoroutineWithCancellation(processAllAvailableValues(std::move(buffer))) .scheduleOn(executor_) .start(); } protected: virtual void onFinishedConsumption() {} private: /** * Called when the handle is destroyed. */ void onHandleDestroyed() override { executor_->add([=]() { processHandleDestroyed(); }); } /** * Called when the channel we are listening to has an update. */ void consume(ChannelBridgeBase*) override { runCoroutineWithCancellation(processAllAvailableValues()) .scheduleOn(executor_) .start(); } /** * Called after we cancelled the input channel (which happens after the handle * is destroyed). */ void canceled(ChannelBridgeBase*) override { runCoroutineWithCancellation( processReceiverCancelled(true /* fromHandleDestruction */)) .scheduleOn(executor_) .start(); } /** * Processes all available values from the input receiver (starting from the * provided buffer, if present). * * If a value was received indicating that the input channel has been closed, * we will process cancellation for the input receiver. */ folly::coro::Task<void> processAllAvailableValues( std::optional<ReceiverQueue<TValue>> buffer = std::nullopt) { bool closed = buffer.has_value() ? !co_await processValues(std::move(buffer.value())) : false; while (!closed) { if (receiver_->receiverWait(this)) { // There are no more values available right now, but more values may // come in the future. We will stop processing for now, until we // re-start processing when the consume() callback is fired. break; } auto values = receiver_->receiverGetValues(); CHECK(!values.empty()); closed = !co_await processValues(std::move(values)); } if (closed) { // The input receiver was closed. receiver_->receiverCancel(); co_await processReceiverCancelled(false /* fromHandleDestruction */); } } /** * Processes values from the channel. Returns false if the channel has been * closed, so the caller can stop processing values from it. */ folly::coro::Task<bool> processValues(ReceiverQueue<TValue> values) { auto cancelToken = co_await folly::coro::co_current_cancellation_token; while (!values.empty()) { if (cancelToken.isCancellationRequested()) { co_return true; } auto result = std::move(values.front()); values.pop(); bool closed = !result.hasValue(); if (!co_await callCallback(std::move(result))) { closed = true; } if (closed) { co_return false; } co_await folly::coro::co_reschedule_on_current_executor; } co_return true; } /** * Process cancellation of the input receiver. * * @param fromHandleDestruction: Whether the cancellation was prompted by the * handle being destroyed. If true, we will call the user's callback with * a folly::OperationCancelled exception. This will be false if the * cancellation was prompted by the closure of the channel. */ folly::coro::Task<void> processReceiverCancelled(bool fromHandleDestruction) { CHECK_EQ(getReceiverState(), ChannelState::CancellationTriggered); receiver_ = nullptr; if (fromHandleDestruction) { co_await callCallback(folly::Try<TValue>( folly::make_exception_wrapper<folly::OperationCancelled>())); } maybeDelete(); } /** * Processes the destruction of the handle. */ void processHandleDestroyed() { CHECK(!handleDestroyed_); handleDestroyed_ = true; cancelSource_.requestCancellation(); if (getReceiverState() == ChannelState::Active) { receiver_->receiverCancel(); } maybeDelete(); } /** * Deletes this object if we have already processed cancellation for the * receiver and the handle. */ void maybeDelete() { if (getReceiverState() == ChannelState::CancellationProcessed && handleDestroyed_) { delete this; } } /** * Calls the user's callback with the given result. */ folly::coro::Task<bool> callCallback(folly::Try<TValue> result) { auto retVal = co_await folly::coro::co_awaitTry(onNext_(std::move(result))); if (retVal.template hasException<folly::OperationCancelled>()) { co_return false; } else if (retVal.hasException()) { LOG(FATAL) << folly::sformat( "Encountered exception from callback when consuming channel of " "type {}: {}", typeid(TValue).name(), retVal.exception().what()); } co_return retVal.value(); } /** * Runs the given coroutine while listening for cancellation triggered by the * handle's destruction. */ folly::coro::Task<void> runCoroutineWithCancellation( folly::coro::Task<void> task) { cancelSource_ = folly::CancellationSource(); if (handleDestroyed_) { // The handle was already destroyed before we even started the coroutine. // Request cancellation so that the user's callback knows to stop quickly. cancelSource_.requestCancellation(); } auto token = cancelSource_.getToken(); auto retVal = co_await folly::coro::co_awaitTry( folly::coro::co_withCancellation(token, std::move(task))); CHECK(!retVal.hasException()) << fmt::format( "Unexpected exception when running coroutine: {}", retVal.exception().what()); if (!token.isCancellationRequested()) { cancelSource_ = folly::CancellationSource::invalid(); } } ChannelState getReceiverState() { return detail::getReceiverState(receiver_.get()); } ChannelBridgePtr<TValue> receiver_; folly::Executor::KeepAlive<> executor_; OnNextFunc onNext_; folly::CancellationSource cancelSource_; bool handleDestroyed_{false}; }; } // namespace detail namespace detail { template <typename TValue, typename OnNextFunc> class ChannelCallbackProcessorImplWithList : public ChannelCallbackProcessorImpl<TValue, OnNextFunc> { public: ChannelCallbackProcessorImplWithList( ChannelBridgePtr<TValue> receiver, folly::Executor::KeepAlive<> executor, OnNextFunc onNext, ChannelCallbackHandleList& holders) : ChannelCallbackProcessorImpl<TValue, OnNextFunc>( std::move(receiver), std::move(executor), std::move(onNext)), holder_(ChannelCallbackHandle(this)) { holders.add(holder_); } private: void onFinishedConsumption() override { // In this subclass, we will remove ourselves from the list of handles // when consumption is complete (triggering cancellation). std::ignore = std::move(holder_); } ChannelCallbackHandleHolder holder_; }; } // namespace detail template < typename TReceiver, typename OnNextFunc, typename TValue, std::enable_if_t< std::is_constructible_v< folly::Function<folly::coro::Task<bool>(folly::Try<TValue>)>, OnNextFunc>, int>> ChannelCallbackHandle consumeChannelWithCallback( TReceiver receiver, folly::Executor::KeepAlive<> executor, OnNextFunc onNext) { detail::ChannelCallbackProcessorImpl<TValue, OnNextFunc>* processor = nullptr; auto [unbufferedReceiver, buffer] = detail::receiverUnbuffer(std::move(receiver)); processor = new detail::ChannelCallbackProcessorImpl<TValue, OnNextFunc>( std::move(unbufferedReceiver), std::move(executor), std::move(onNext)); processor->start(std::move(buffer)); return ChannelCallbackHandle(processor); } template < typename TReceiver, typename OnNextFunc, typename TValue, std::enable_if_t< std::is_constructible_v< folly::Function<folly::coro::Task<bool>(folly::Try<TValue>)>, OnNextFunc>, int>> void consumeChannelWithCallback( TReceiver receiver, folly::Executor::KeepAlive<> executor, OnNextFunc onNext, ChannelCallbackHandleList& callbackHandles) { auto [unbufferedReceiver, buffer] = detail::receiverUnbuffer(std::move(receiver)); auto* processor = new detail::ChannelCallbackProcessorImplWithList<TValue, OnNextFunc>( std::move(unbufferedReceiver), std::move(executor), std::move(onNext), callbackHandles); processor->start(std::move(buffer)); } } // namespace channels } // namespace folly
C
5
Aoikiseki/folly
folly/experimental/channels/ConsumeChannel-inl.h
[ "Apache-2.0" ]
<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org"> <head> <meta charset="UTF-8"> <title>Expression utility objects</title> <style> table { border-collapse: collapse; } td { border: 1px solid black; padding: .5em; } </style> </head> <body> <h1>'Truthy' and 'falsy' expressions</h1> <ul> <li>'true' is evaluated to <strong th:text="${#bools.isTrue(trueValue)}"></strong></li> <li>'1' is evaluated to <strong th:text="${#bools.isTrue(one)}"></strong></li> <li>non zero character is evaluated to <strong th:text="${#bools.isTrue(nonZeroCharacter)}"></strong></li> <li>empty string is evaluated to <strong th:text="${#bools.isTrue(emptyString)}"></strong></li> <li>the string "foo" is evaluated to <strong th:text="${#bools.isTrue(foo)}"></strong></li> <li>an object is evaluated to <strong th:text="${#bools.isTrue(object)}"></strong></li> <li>the array [0, 0] is evaluated to <strong th:text="${#bools.isTrue(arrayOfZeros)}"></strong></li> <li>the array [0, 1] is evaluated to <strong th:text="${#bools.isTrue(arrayOfZeroAndOne)}"></strong></li> <li>the array [1, 1] is evaluated to <strong th:text="${#bools.isTrue(arrayOfOnes)}"></strong></li> <li>null value is evaluated to <strong th:text="${#bools.isTrue(nullValue)}"></strong></li> <li>'false' is evaluated to <strong th:text="${#bools.isTrue(falseValue)}"></strong></li> <li>'0' is evaluated to <strong th:text="${#bools.isTrue(zero)}"></strong></li> <li>zero character is evaluated to <strong th:text="${#bools.isTrue(zeroCharacter)}"></strong></li> <li>the string "false" is evaluated to <strong th:text="${#bools.isTrue(falseString)}"></strong></li> <li>the string "no" is evaluated to <strong th:text="${#bools.isTrue(no)}"></strong></li> <li>the string "off" is evaluated to <strong th:text="${#bools.isTrue(off)}"></strong></li> </ul> <h1>Using booleans as rendering conditions</h1> <table> <tr> <td></td> <td>th:if</td> <td>th:unless</td> </tr> <tr> <td>true</td> <td><span th:if="${true}">will be rendered</span></td> <td><span th:unless="${true}">won't be rendered</span></td> </tr> <tr> <td>false</td> <td><span th:if="${false}">won't be rendered</span></td> <td><span th:unless="${false}">will be rendered</span></td> </tr> </table> <h1>Boolean and conditional operators</h1> <table> <tr> <td>A</td> <td>B</td> <td>${A or B}</td> <td>${A} or ${B}</td> <td>${A and B}</td> <td>${A} and ${B}</td> <td>${!A}</td> <td>!${A}</td> <td>${not A}</td> <td>not ${A}</td> </tr> <tr> <td>true</td> <td>true</td> <td th:text="${true or true}"></td> <td th:text="${true} or ${true}"></td> <td th:text="${true and true}"></td> <td th:text="${true} and ${true}"></td> <td th:text="${!true}"></td> <td th:text="!${true}"></td> <td th:text="${not true}"></td> <td th:text="not ${true}"></td> </tr> <tr> <td>true</td> <td>false</td> <td th:text="${true or false}"></td> <td th:text="${true} or ${false}"></td> <td th:text="${true and false}"></td> <td th:text="${true} and ${false}"></td> <td th:text="${!true}"></td> <td th:text="!${true}"></td> <td th:text="${not true}"></td> <td th:text="not ${true}"></td> </tr> <tr> <td>false</td> <td>true</td> <td th:text="${false or true}"></td> <td th:text="${false} or ${true}"></td> <td th:text="${false and true}"></td> <td th:text="${false} and ${true}"></td> <td th:text="${!false}"></td> <td th:text="!${false}"></td> <td th:text="${not false}"></td> <td th:text="not ${false}"></td> </tr> <tr> <td>false</td> <td>false</td> <td th:text="${false or false}"></td> <td th:text="${false} or ${false}"></td> <td th:text="${false and false}"></td> <td th:text="${false} and ${false}"></td> <td th:text="${!false}"></td> <td th:text="!${false}"></td> <td th:text="${not false}"></td> <td th:text="not ${false}"></td> </tr> </table> <ul> <li> the result of "true ? 'then'" is <strong th:text="true ? 'then'"></strong></li> <li> the result of "false ? 'then'" is <strong th:text="false ? 'then'"></strong></li> <li> the result of "true ? 'then' : 'else'" is <strong th:text="true ? 'then' : 'else'"></strong></li> <li> the result of "false ? 'then' : 'else'" is <strong th:text="false ? 'then' : 'else'"></strong></li> <li> the result of "'foo' ?: 'bar'" is <strong th:text="'foo' ?: 'bar'"></strong></li> <li> the result of "null ?: 'bar'" is <strong th:text="null ?: 'bar'"></strong></li> <li> the result of "0 ?: 'bar'" is <strong th:text="0 ?: 'bar'"></strong></li> <li> the result of "1 ?: 'bar'" is <strong th:text="1 ?: 'bar'"></strong></li> </ul> <ul> <li><span th:if="${isRaining or isCold}">The weather is bad</span></li> <li><span th:if="${isRaining} or ${isCold}">The weather is bad</span></li> <li><span th:if="${isSunny and isWarm}">The weather is good</span></li> <li><span th:if="${isSunny} and ${isWarm}">The weather is good</span></li> <li><span th:if="${not isCold}">It's warm</span></li> <li><span th:if="${!isCold}">It's warm</span></li> <li><span th:if="not ${isCold}">It's warm</span></li> <li><span th:if="!${isCold}">It's warm</span></li> <li>It's <span th:text="${isCold} ? 'cold' : 'warm'"></span></li> <li><span th:text="${isRaining or isCold} ? 'The weather is bad'"></span></li> </ul> <h1>#bools utility object</h1> <table> <tr> <td>Array</td> <td>#bools.arrayIsTrue()</td> <td>#bools.arrayIsFalse()</td> <td>#bools.arrayAnd()</td> <td>#bools.arrayOr()</td> </tr> <tr> <td>[0, 0]</td> <td th:text="${#strings.arrayJoin(#bools.arrayIsTrue(arrayOfZeros), ',')}"></td> <td th:text="${#strings.arrayJoin(#bools.arrayIsFalse(arrayOfZeros), ',')}"></td> <td th:text="${#bools.arrayAnd(arrayOfZeros)}"></td> <td th:text="${#bools.arrayOr(arrayOfZeros)}"></td> </tr> <tr> <td>[0, 1]</td> <td th:text="${#strings.arrayJoin(#bools.arrayIsTrue(arrayOfZeroAndOne), ',')}"></td> <td th:text="${#strings.arrayJoin(#bools.arrayIsFalse(arrayOfZeroAndOne), ',')}"></td> <td th:text="${#bools.arrayAnd(arrayOfZeroAndOne)}"></td> <td th:text="${#bools.arrayOr(arrayOfZeroAndOne)}"></td> </tr> <tr> <td>[1, 1]</td> <td th:text="${#strings.arrayJoin(#bools.arrayIsTrue(arrayOfOnes), ',')}"></td> <td th:text="${#strings.arrayJoin(#bools.arrayIsFalse(arrayOfOnes), ',')}"></td> <td th:text="${#bools.arrayAnd(arrayOfOnes)}"></td> <td th:text="${#bools.arrayOr(arrayOfOnes)}"></td> </tr> </table> </body> </html>
HTML
5
zeesh49/tutorials
spring-thymeleaf/src/main/webapp/WEB-INF/views/booleans.html
[ "MIT" ]
[edgedb] server-version = "1.2"
TOML
0
hanneslund/next.js
examples/with-edgedb/edgedb.toml
[ "MIT" ]
z=0 y=:a/31536000 y-=y%1 :a-=y*31536000 x/=y z=" year" x/=y>1 z+="s" e=0 d=:a/86400 d-=d%1 :a-=d*86400 x/=d e=" day" x/=d>1 e+="s" i=0 h=:a/3600 h-=h%1 :a-=h*3600 x/=h i=" hour" x/=h>1 i+="s" n=0 m=:a/60 m-=m%1 :a-=m*60 x/=m n=" minute" x/=m>1 n+="s" t=0 s=:a u=d+h+m+s v=y :o=y+z-"0" x/=s t=" second" x/=s>1 t+="s" v+=d u-=d x/=d ifv>0thenifu>0then:o+=", "else:o+=" and "endend :o+=d+e v+=h u-=h x/=h ifv>0thenifu>0then:o+=", "else:o+=" and "endend :o+=h+i v+=m u-=m x/=m ifv>0thenifu>0then:o+=", "else:o+=" and "endend :o+=m+n v+=s u-=s x/=s ifv>0thenifu>0then:o+=", "else:o+=" and "endend :o+=s+t :o="x"+:o:o-="x, ":o-="x and ":o-="x"goto:done++ /--------//--------//--------//--------//--------//--------//--------/ if x!=0 then v+=s u-=s if v>0 then if u>0 then :o+=", " else :o+=" and " end end :o+=s+t end ifv>0thenifu>0then:o+=", "else:o+=" and "endend ifv*u then:o+=", "endifv*(1-u)then:o+=" and "end :o+=((v*u>0)+", "+(v*(1-u)>0)+" and ")-1 y : years z : years string suffix d : days e : days string suffix h : hours i : hours string suffix m : minutes n : minutes string suffix s : seconds t : second string suffix u : sum of y+d+h+m+s v : placed string sections sum abc__fg__jkl__opqr__uvwx__
LOLCODE
3
Dude112113/Yolol
YololEmulator/Scripts/time_formatting.lol
[ "MIT" ]
package com.alibaba.json.bvt.bug; import com.alibaba.fastjson.JSON; import junit.framework.TestCase; public class Bug_for_Double2Tag extends TestCase { public void test_double() throws Exception { Double2Tag tag = new Double2Tag(); String str = JSON.toJSONString(tag); JSON.parseObject(str, Double2Tag.class); } public static class Double2Tag { public String data_time; public String data_id; public String hour_id; public String minute_id; public String tag3_id; public double ali_fee; public double total_ali_fee; public long seller_cnt; public Double2Tag() { ali_fee = 0.0; total_ali_fee = 0.0; seller_cnt = 0; } public String getData_time() { return data_time; } public void setData_time(String data_time) { this.data_time = data_time; } public String getData_id() { return data_id; } public void setData_id(String data_id) { this.data_id = data_id; } public String getHour_id() { return hour_id; } public void setHour_id(String hour_id) { this.hour_id = hour_id; } public String getMinute_id() { return minute_id; } public void setMinute_id(String minute_id) { this.minute_id = minute_id; } public String getTag3_id() { return tag3_id; } public void setTag3_id(String tag3_id) { this.tag3_id = tag3_id; } public double getAli_fee() { return ali_fee; } public void setAli_fee(double ali_fee) { this.ali_fee = ali_fee; } public double getTotal_ali_fee() { return total_ali_fee; } public void setTotal_ali_fee(double total_ali_fee) { this.total_ali_fee = total_ali_fee; } public long getSeller_cnt() { return seller_cnt; } public void setSeller_cnt(long seller_cnt) { this.seller_cnt = seller_cnt; } } }
Java
3
Czarek93/fastjson
src/test/java/com/alibaba/json/bvt/bug/Bug_for_Double2Tag.java
[ "Apache-2.0" ]
module org-openroadm-interfaces { namespace "http://org/openroadm/interfaces"; prefix openROADM-if; organization "Open ROADM MSA"; contact "OpenROADM.org"; description "YANG definitions for device facility interfaces. Reused ietf-interfaces and some interface-type defined in iana-if-type. Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016, AT&T Intellectual Property. All other 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 Members of the Open ROADM MSA Agreement 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 MEMBERS OF THE OPEN ROADM MSA AGREEMENT ''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 THE MEMBERS OF THE OPEN ROADM MSA AGREEMENT 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. Also contains code components extracted from IETF Interfaces. These code components are copyrighted and licensed as follows: Copyright (c) 2016 IETF Trust and the persons identified as the document authors. All rights reserved. This document is subject to BCP 78 and the IETF Trust’s Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License."; revision 2016-10-14 { description "Version 1.2"; } identity interface-type { description "Base identity from which specific interface types are derived."; } identity ethernetCsmacd { base interface-type; description "For all Ethernet-like interfaces, regardless of speed, as per RFC 3635."; reference "RFC 3635 - Definitions of Managed Objects for the Ethernet-like Interface Types"; } identity ip { base interface-type; description "IP (for APPN HPR in IP networks)."; } identity opticalChannel { base interface-type; description "Optical Channel."; } identity opticalTransport { base interface-type; description "Optical Transport."; } identity otnOdu { base interface-type; description "OTN Optical Data Unit."; } identity otnOtu { base interface-type; description "OTN Optical channel Transport Unit."; } identity openROADMOpticalMultiplex { base interface-type; description "Optical Transport Multiplex type for openROADM"; } }
YANG
4
meodaiduoi/onos
models/openroadm/src/main/yang/[email protected]
[ "Apache-2.0" ]
{ "Version" : 0.2, "ModuleName" : "libfreetype", "Options" : { "Optimization" : "None", "PreprocessorDefinitions" : [ "FT2_BUILD_LIBRARY", "FT_OPTION_AUTOFIT2" ], "IncludeDirs" : [ "../zlib-1.2.8", "include", "include/freetype", "include/freetype/internal" ], "TargetType" : "StaticLibrary", "TargetFileName" : "freetype", "TargetDirectory" : "", "ObjectsDirectory" : "" }, "Configurations" : [ { "Name" : "Debug", "Options" : { "Warnings" : "All", "Debug" : true, "FastMath" : false } }, { "Name" : "Release", "Options" : { "Warnings" : "None", "Optimization" : "Speed", "FastMath" : true } } ], "Files" : [ { "Folder" : "src", "Files" : [ { "Folder" : "autofit", "Files" : [ "afglobal.c", "afindic.c", "autofit.c" ] }, { "Folder" : "base", "Files" : [ "ftapi.c", "ftbase.c", "ftbbox.c", "ftbdf.c", "ftbitmap.c", "ftdebug.c", "ftgasp.c", "ftglyph.c", "ftgxval.c", "ftinit.c", "ftlcdfil.c", "ftmm.c", "ftotval.c", "ftpatent.c", "ftpfr.c", "ftstroke.c", "ftsynth.c", "ftsystem.c", "fttype1.c", "ftwinfnt.c", "ftxf86.c" ] }, { "Folder" : "bdf", "Files" : [ "bdf.c" ] }, { "Folder" : "cache", "Files" : [ "ftcache.c" ] }, { "Folder" : "cff", "Files" : [ "cff.c" ] }, { "Folder" : "cid", "Files" : [ "type1cid.c" ] }, { "Folder" : "gxvalid", "Files" : [ "gxvalid.c" ] }, { "Folder" : "gzip", "Files" : [ "ftgzip.c" ] }, { "Folder" : "lzw", "Files" : [ "ftlzw.c" ] }, { "Folder" : "otvalid", "Files" : [ "otvalid.c" ] }, { "Folder" : "pcf", "Files" : [ "pcf.c" ] }, { "Folder" : "pfr", "Files" : [ "pfr.c" ] }, { "Folder" : "psaux", "Files" : [ "psaux.c" ] }, { "Folder" : "pshinter", "Files" : [ "pshinter.c" ] }, { "Folder" : "psnames", "Files" : [ "psnames.c" ] }, { "Folder" : "raster", "Files" : [ "raster.c" ] }, { "Folder" : "sfnt", "Files" : [ "sfnt.c" ] }, { "Folder" : "smooth", "Files" : [ "smooth.c" ] }, { "Folder" : "truetype", "Files" : [ "truetype.c" ] }, { "Folder" : "type1c", "Files" : [ "src/type1/type1.c" ] }, { "Folder" : "type42", "Files" : [ "type42.c" ] }, { "Folder" : "winfonts", "Files" : [ "winfnt.c" ] } ] } ], "ResourcesPath" : "", "Resources" : [ ] }
Ecere Projects
1
N-eil/ecere-sdk
deps/freetype-2.3.12/freetype.epj
[ "BSD-3-Clause" ]
CLASS ltcl_test DEFINITION FOR TESTING DURATION SHORT RISK LEVEL HARMLESS FINAL. PRIVATE SECTION. DATA: mi_cut TYPE REF TO zif_abapgit_log. METHODS: setup, from_x FOR TESTING, get_status FOR TESTING, get_log_level FOR TESTING, merge_with FOR TESTING, merge_with_min_level FOR TESTING, empty FOR TESTING, clone FOR TESTING, add FOR TESTING. ENDCLASS. CLASS ltcl_test IMPLEMENTATION. METHOD setup. CREATE OBJECT mi_cut TYPE zcl_abapgit_log. ENDMETHOD. METHOD empty. cl_abap_unit_assert=>assert_equals( act = mi_cut->count( ) exp = 0 ). cl_abap_unit_assert=>assert_equals( act = mi_cut->get_title( ) exp = 'Log' ). ENDMETHOD. METHOD add. DATA lv_message TYPE string. DATA lt_messages TYPE zif_abapgit_log=>ty_log_outs. DATA ls_message LIKE LINE OF lt_messages. lv_message = 'hello'. mi_cut->add( lv_message ). cl_abap_unit_assert=>assert_equals( act = mi_cut->count( ) exp = 1 ). cl_abap_unit_assert=>assert_equals( act = mi_cut->get_status( ) exp = 'E' ). lt_messages = mi_cut->get_messages( ). READ TABLE lt_messages INDEX 1 INTO ls_message. cl_abap_unit_assert=>assert_subrc( ). cl_abap_unit_assert=>assert_equals( act = ls_message-text exp = lv_message ). ENDMETHOD. METHOD get_status. DATA lo_x TYPE REF TO zcx_abapgit_exception. mi_cut->add_success( 'success' ). cl_abap_unit_assert=>assert_equals( act = mi_cut->get_status( ) exp = zif_abapgit_log=>c_status-ok ). mi_cut->add_warning( 'warn' ). cl_abap_unit_assert=>assert_equals( act = mi_cut->get_status( ) exp = zif_abapgit_log=>c_status-warning ). mi_cut->add_error( 'err' ). cl_abap_unit_assert=>assert_equals( act = mi_cut->get_status( ) exp = zif_abapgit_log=>c_status-error ). mi_cut->clear( ). cl_abap_unit_assert=>assert_equals( act = mi_cut->get_status( ) exp = zif_abapgit_log=>c_status-ok ). CREATE OBJECT lo_x EXPORTING msgv1 = 'x'. mi_cut->add_exception( lo_x ). cl_abap_unit_assert=>assert_equals( act = mi_cut->get_status( ) exp = zif_abapgit_log=>c_status-error ). ENDMETHOD. METHOD merge_with. DATA li_secondary_log LIKE mi_cut. DATA lt_act_msgs TYPE zif_abapgit_log=>ty_log_outs. CREATE OBJECT li_secondary_log TYPE zcl_abapgit_log. mi_cut->add_success( 'success' ). li_secondary_log->add_warning( 'warn' ). mi_cut->merge_with( li_secondary_log ). cl_abap_unit_assert=>assert_equals( act = mi_cut->count( ) exp = 2 ). lt_act_msgs = mi_cut->get_messages( ). READ TABLE lt_act_msgs TRANSPORTING NO FIELDS WITH KEY text = 'success'. cl_abap_unit_assert=>assert_subrc( ). READ TABLE lt_act_msgs TRANSPORTING NO FIELDS WITH KEY text = 'warn'. cl_abap_unit_assert=>assert_subrc( ). ENDMETHOD. METHOD merge_with_min_level. DATA li_secondary_log LIKE mi_cut. DATA lt_act_msgs TYPE zif_abapgit_log=>ty_log_outs. CREATE OBJECT li_secondary_log TYPE zcl_abapgit_log. mi_cut->add_success( 'success' ). li_secondary_log->add_warning( 'warn' ). mi_cut->merge_with( ii_log = li_secondary_log iv_min_level = zif_abapgit_log=>c_log_level-error ). cl_abap_unit_assert=>assert_equals( act = mi_cut->count( ) exp = 1 ). lt_act_msgs = mi_cut->get_messages( ). READ TABLE lt_act_msgs TRANSPORTING NO FIELDS WITH KEY text = 'success'. cl_abap_unit_assert=>assert_subrc( ). " change level to warning mi_cut->merge_with( ii_log = li_secondary_log iv_min_level = zif_abapgit_log=>c_log_level-warning ). cl_abap_unit_assert=>assert_equals( act = mi_cut->count( ) exp = 2 ). lt_act_msgs = mi_cut->get_messages( ). READ TABLE lt_act_msgs TRANSPORTING NO FIELDS WITH KEY text = 'success'. cl_abap_unit_assert=>assert_subrc( ). READ TABLE lt_act_msgs TRANSPORTING NO FIELDS WITH KEY text = 'warn'. cl_abap_unit_assert=>assert_subrc( ). ENDMETHOD. METHOD from_x. DATA lo_x TYPE REF TO zcx_abapgit_exception. DATA lt_act_msgs TYPE zif_abapgit_log=>ty_log_outs. " Uninitialized mi_cut = zcl_abapgit_log=>from_exception( lo_x ). cl_abap_unit_assert=>assert_equals( act = mi_cut->count( ) exp = 0 ). " Notmal exception TRY. zcx_abapgit_exception=>raise( 'Error!' ). CATCH zcx_abapgit_exception INTO lo_x. mi_cut = zcl_abapgit_log=>from_exception( lo_x ). ENDTRY. cl_abap_unit_assert=>assert_bound( mi_cut ). cl_abap_unit_assert=>assert_equals( act = mi_cut->count( ) exp = 1 ). lt_act_msgs = mi_cut->get_messages( ). READ TABLE lt_act_msgs TRANSPORTING NO FIELDS WITH KEY type = 'E'. cl_abap_unit_assert=>assert_subrc( ). READ TABLE lt_act_msgs TRANSPORTING NO FIELDS WITH KEY text = 'Error!'. cl_abap_unit_assert=>assert_subrc( ). ENDMETHOD. METHOD get_log_level. DATA lo_x TYPE REF TO zcx_abapgit_exception. cl_abap_unit_assert=>assert_equals( act = mi_cut->get_log_level( ) exp = zif_abapgit_log=>c_log_level-empty ). mi_cut->add_success( 'success' ). cl_abap_unit_assert=>assert_equals( act = mi_cut->get_log_level( ) exp = zif_abapgit_log=>c_log_level-info ). mi_cut->add_warning( 'warn' ). cl_abap_unit_assert=>assert_equals( act = mi_cut->get_log_level( ) exp = zif_abapgit_log=>c_log_level-warning ). mi_cut->add_error( 'err' ). cl_abap_unit_assert=>assert_equals( act = mi_cut->get_log_level( ) exp = zif_abapgit_log=>c_log_level-error ). CREATE OBJECT lo_x EXPORTING msgv1 = 'x'. mi_cut->add_exception( lo_x ). cl_abap_unit_assert=>assert_equals( act = mi_cut->get_log_level( ) exp = zif_abapgit_log=>c_log_level-error ). ENDMETHOD. METHOD clone. DATA li_clone TYPE REF TO zif_abapgit_log. mi_cut->add( 'Hello' ). mi_cut->set_title( 'My log' ). li_clone = mi_cut->clone( ). mi_cut->add( 'World' ). mi_cut->set_title( 'My log CHANGED' ). cl_abap_unit_assert=>assert_equals( act = li_clone->count( ) exp = 1 ). cl_abap_unit_assert=>assert_equals( act = li_clone->get_title( ) exp = 'My log' ). ENDMETHOD. ENDCLASS.
ABAP
5
Manny27nyc/abapGit
src/utils/zcl_abapgit_log.clas.testclasses.abap
[ "MIT" ]
Red [ Title: "Red words-of function test script" Author: "Nenad Rakocevic & Peter W A Wood" File: %words-of-test.red Tabs: 4 Rights: "Copyright (C) 2015 Red Foundation. All rights reserved." License: "BSD-3 - https://github.com/red/red/blob/origin/BSD-3-License.txt" ] #include %../../../quick-test/quick-test.red ~~~start-file~~~ "words-of" ===start-group=== "words-of-basic" --test-- "wob1" wob1-o: make object! [ b: [a b c d] c: #"a" f: 1.0 o: make object! [a: 1 b: 2 c: 3] i: 1 n: none s: "abcde" ] --assert [b c f o i n s] = words-of wob1-o ===end-group=== ===start-group=== "words-of-self" --test-- "wos1" wos1-o: make object! [ b: [a b c d] c: #"a" f: 1.0 o: make object! [a: 1 b: 2 c: 3] i: 1 n: none s: "abcde" wos: words-of self ] --assert [b c f o i n s wos] = wos1-o/wos --test-- "wos2" wos2-o: make object! [ b: [a b c d] c: #"a" f: 1.0 o: make object! [a: 1 b: 2 c: 3] i: 1 n: none s: "abcde" do-wos: does [words-of self] ] --assert [b c f o i n s do-wos] = wos2-o/do-wos ===end-group=== ~~~end-file~~~
Red
4
0xflotus/red
tests/source/units/words-of-test.red
[ "BSL-1.0", "BSD-3-Clause" ]
/* * Copyright 2012-2021 the original author or 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 * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.springframework.boot.buildpack.platform.io; import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; import java.nio.file.attribute.FileAttribute; import java.nio.file.attribute.PosixFilePermission; import java.nio.file.attribute.PosixFilePermissions; import java.util.Collections; import java.util.Set; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.condition.DisabledOnOs; import org.junit.jupiter.api.condition.EnabledOnOs; import org.junit.jupiter.api.condition.OS; import org.junit.jupiter.api.io.TempDir; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatIOException; import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException; import static org.assertj.core.api.Assertions.assertThatIllegalStateException; /** * Tests for {@link FilePermissions}. * * @author Scott Frederick */ class FilePermissionsTests { @TempDir Path tempDir; @Test @DisabledOnOs(OS.WINDOWS) void umaskForPath() throws IOException { FileAttribute<Set<PosixFilePermission>> fileAttribute = PosixFilePermissions .asFileAttribute(PosixFilePermissions.fromString("rw-r-----")); Path tempFile = Files.createTempFile(this.tempDir, "umask", null, fileAttribute); assertThat(FilePermissions.umaskForPath(tempFile)).isEqualTo(0640); } @Test @DisabledOnOs(OS.WINDOWS) void umaskForPathWithNonExistentFile() throws IOException { assertThatIOException() .isThrownBy(() -> FilePermissions.umaskForPath(Paths.get(this.tempDir.toString(), "does-not-exist"))); } @Test @EnabledOnOs(OS.WINDOWS) void umaskForPathOnWindowsFails() throws IOException { Path tempFile = Files.createTempFile("umask", null); assertThatIllegalStateException().isThrownBy(() -> FilePermissions.umaskForPath(tempFile)) .withMessageContaining("Unsupported file type for retrieving Posix attributes"); } @Test void umaskForPathWithNullPath() throws IOException { assertThatIllegalArgumentException().isThrownBy(() -> FilePermissions.umaskForPath(null)); } @Test void posixPermissionsToUmask() { Set<PosixFilePermission> permissions = PosixFilePermissions.fromString("rwxrw-r--"); assertThat(FilePermissions.posixPermissionsToUmask(permissions)).isEqualTo(0764); } @Test void posixPermissionsToUmaskWithEmptyPermissions() { Set<PosixFilePermission> permissions = Collections.emptySet(); assertThat(FilePermissions.posixPermissionsToUmask(permissions)).isEqualTo(0); } @Test void posixPermissionsToUmaskWithNullPermissions() { assertThatIllegalArgumentException().isThrownBy(() -> FilePermissions.posixPermissionsToUmask(null)); } }
Java
5
techAi007/spring-boot
spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/test/java/org/springframework/boot/buildpack/platform/io/FilePermissionsTests.java
[ "Apache-2.0" ]
// check-pass #![allow(incomplete_features)] #![feature(generic_const_exprs)] pub struct Assert<const COND: bool>(); pub trait IsTrue {} impl IsTrue for Assert<true> {} pub trait IsNotZST {} impl<T> IsNotZST for T where Assert<{ std::mem::size_of::<T>() > 0 }>: IsTrue {} fn main() {}
Rust
4
ohno418/rust
src/test/ui/const-generics/issues/issue-88468.rs
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
<nav id="home-section" class="section"> <h3 class="section-header"> <a href="<%= rel_prefix %>/index.html">Home</a> <a href="<%= rel_prefix %>/table_of_contents.html#classes">Classes</a> <a href="<%= rel_prefix %>/table_of_contents.html#methods">Methods</a> </h3> </nav>
RHTML
3
trolldbois/metasploit-framework
lib/gemcache/ruby/1.9.1/gems/rdoc-3.12/lib/rdoc/generator/template/darkfish/_sidebar_navigation.rhtml
[ "OpenSSL", "Unlicense" ]
// Daniel Shiffman // http://codingtra.in // http://patreon.com/codingtrain Morpher m; float amt = 1; void setup() { size(600, 600); m = new Morpher(); } void draw() { amt = map(mouseX, 0, width, 0, 1); background(51); translate(width/2, height/2); m.show(); m.update(); }
Processing
4
aerinkayne/website
CodingChallenges/inprogress/CC_ShapeMorpher/CC_ShapeMorpher.pde
[ "MIT" ]
template(name="spinner") +Template.dynamic(template=getSpinnerTemplate) template(name="spinnerRaw") +Template.dynamic(template=getSpinnerTemplateRaw)
Jade
3
UBessle/wekan
client/components/main/spinner.jade
[ "MIT" ]
#!/usr/bin/env bash echo "Run Config Server" echo "spring cloud configserver" echo "http://localhost:8888" spring cloud configserver echo echo "Run Eureka Server" echo "spring cloud eureka" echo "http://localhost:8761" spring cloud eureka echo echo "Run H2 Server" echo "spring cloud h2" echo "http://localhost:9095" spring cloud h2 echo echo "Run Kafka Server" echo "spring cloud kafka" echo "http://localhost:9091" spring cloud kafka echo echo "Run Zipkin Server" echo "spring cloud zipkin" echo "http://localhost:9411" spring cloud zipkin echo echo "Run Dataflow Server" echo "spring cloud dataflow" echo "http://localhost:9393" spring cloud dataflow echo echo "Run Hystrixdashboard Server" echo "spring cloud hystrixdashboard" echo "http://localhost:7979" spring cloud hystrixdashboard echo echo "List Services" echo "spring cloud --list" spring cloud --list echo
Shell
3
zeesh49/tutorials
spring-cloud-cli/spring-cli-cmds.sh
[ "MIT" ]
;;Extensions extensions [ r ] ;;Globals globals [ climate agent-waste-prob agent-age-at-death agent-lifetime-adult-offspring agent-avg-lifetime-waste agent-birth-tick agent-neutral pop-age-at-death pop-census pop-age pop-waste-prob pop-neutral ] ;;Owns turtles-own [ energy age birth-tick waste-prob neutral parent juv-offspring adult-offspring offspring n-offspring prov-strategy provisioned prov-dist prov-temp wasted lifetime-waste gathered ] ;; Setup to setup clear-all setup-turtles setup-climate setup-globals reset-ticks end to setup-turtles create-turtles initial-num-agents [ set shape "person" set birth-tick 0 set energy 0 set color yellow set age mature set waste-prob random-float 1 set neutral random-float 1 set lifetime-waste [0] set parent -1 set juv-offspring 0 set adult-offspring 0 set offspring turtles with [parent = [who] of myself] if provision = "1"[ set prov-strategy 1 ] if provision = "2"[ set prov-strategy 2 ] if provision = "3"[ set prov-strategy 3 ] if provision = "4"[ set prov-strategy 4 ] if provision = "R"[ set prov-strategy one-of [1 2 3 4] ] ] end to setup-climate r:put "climateAR" climateAR r:put "climateSD" climateSD r:put "nticks" nticks set climate r:get "arima.sim(list(ar=climateAR),mean=0,n=nticks,sd=climateSD)" end to setup-globals set agent-age-at-death [] set agent-waste-prob [] set agent-avg-lifetime-waste [] set agent-lifetime-adult-offspring [] set agent-birth-tick [] set agent-neutral [] set pop-census [] set pop-age [] set pop-waste-prob [] set pop-neutral [] end ;;Go to go tick if not any? turtles [ if export-res [ ExportReports ] stop ] if ticks = nticks [ ask turtles [ ReportDeath ] if export-res [ ExportReports ] stop ] ToAge TrackOffspring GatherReports ifelse climate-change [ GatherClimateChange ] [ GatherStable ] if waste [ ToWaste ] Reproduce ZeroEnergy end ;;Procedures ;;Agents to TrackOffspring ask turtles [ set offspring turtles with [parent = [who] of myself] set juv-offspring count offspring with [age < mature] set adult-offspring count offspring with [age >= mature] ] end to ToProvision if energy > 0 [ let provisioncost ( consume-amount * juv-offspring ) if energy >= provisioncost [ set provisioned provisioncost ask offspring with [age < mature] [ set energy energy + ( [provisioned] of myself / [juv-offspring] of myself ) ] ] if energy < provisioncost [ set provisioned energy ;;even distribution of available energy if prov-strategy = 1 [ ask offspring with [age < mature] [ set energy energy + ( [provisioned] of myself / [juv-offspring] of myself ) ] ] ;;randomly order the kids and provide energy beginning with first if prov-strategy = 2 [ set prov-temp provisioned let offspring_rand [who] of offspring with [age < mature] foreach offspring_rand [ x -> if prov-temp >= consume-amount [ set prov-temp prov-temp - consume-amount ask turtle x [ set energy energy + consume-amount ] ] if prov-temp < consume-amount [ ask turtle x [ set energy energy + prov-temp ] set prov-temp 0 ] ] ] ;;favour eldest offspring if prov-strategy = 3 [ set prov-temp provisioned let offspring_age sort-on [(- age)] offspring with [age < mature] foreach offspring_age [ x -> if prov-temp >= consume-amount [ set prov-temp prov-temp - consume-amount ask x [ set energy energy + consume-amount ] ] if prov-temp < consume-amount [ ask x [ set energy energy + prov-temp ] set prov-temp 0 ] ] ] ;;favour youngest (last born) if prov-strategy = 4 [ set prov-temp provisioned let offspring_age sort-on [age] offspring with [age < mature] foreach offspring_age [ x -> if prov-temp >= consume-amount [ set prov-temp prov-temp - consume-amount ask x [ set energy energy + consume-amount ] ] if prov-temp < consume-amount [ ask x [ set energy energy + prov-temp ] set prov-temp 0 ] ] ] ] set energy energy - provisioned ] end to Consume if energy < consume-amount [ ReportDeath if juv-offspring > 0 [ ask offspring with [age < mature][ ReportDeath die ] ] die ] if energy >= consume-amount [ set energy (energy - consume-amount) ] end to GatherClimateChange ask turtles with [age >= mature] [ let climate-mod 1 + ( item ticks climate ) let capacity ( base-agents / (count turtles) ) let gather-amount capacity * abs ( climate-mod ) set energy energy + gather-amount Consume if juv-offspring > 0 [ ToProvision ask offspring with [age < mature] [ Consume ] ] ] end to GatherStable ask turtles with [age >= mature] [ let capacity ( base-agents / (count turtles) ) let gather-amount capacity set energy energy + gather-amount set gathered gather-amount Consume if juv-offspring > 0 [ ToProvision ask offspring with [age < mature] [ Consume ] ] ] end to ToWaste ask turtles [ if random-float 1 < waste-prob and energy > 0 [ set wasted energy set energy 0 set lifetime-waste lput wasted lifetime-waste ] ] end to Reproduce ask turtles [ if energy >= repro-cost [ set energy energy - repro-cost set n-offspring n-offspring + 1 hatch 1 [ set parent [who] of myself set age 0 set birth-tick ticks set offspring [] set n-offspring 0 set adult-offspring 0 set juv-offspring 0 set energy 0 set wasted 0 set lifetime-waste [0] set provisioned 0 set waste-prob random-normal waste-prob waste-mutate if waste-prob > 1 [ let waste_diff ( waste-prob - 1 ) set waste-prob ( 1 - waste_diff ) ] if waste-prob < 0 [ set waste-prob abs waste-prob ] set neutral random-normal neutral waste-mutate if neutral > 1 [ let neutral_diff ( neutral - 1 ) set neutral ( 1 - neutral_diff ) ] if neutral < 0 [ set neutral abs neutral ] ] ] ] end to ToAge ask turtles [ set age age + 1 ] end to ZeroEnergy ask turtles [ set energy 0 ] end to ReportDeath set agent-age-at-death lput age agent-age-at-death set agent-waste-prob lput waste-prob agent-waste-prob set agent-avg-lifetime-waste lput mean lifetime-waste agent-avg-lifetime-waste set agent-lifetime-adult-offspring lput adult-offspring agent-lifetime-adult-offspring set agent-neutral lput neutral agent-neutral set agent-birth-tick lput birth-tick agent-birth-tick end ;;reporters to GatherReports set pop-census lput count turtles pop-census set pop-age lput [age] of turtles pop-age set pop-waste-prob lput [waste-prob] of turtles pop-waste-prob set pop-neutral lput [neutral] of turtles pop-neutral end to ExportReports r:put "expname" ExperimentName r:eval "f <- paste(expname,gsub(':','-',Sys.time()[1]),sep='_')" r:put "outpath" output_path r:put "agent_waste_prob" agent-waste-prob r:put "agent_neutral" agent-neutral r:put "agent_avg_lifetime_waste" agent-avg-lifetime-waste r:put "agent_age_at_death" agent-age-at-death r:put "agent_birth_tick" agent-birth-tick r:put "agent_lifetime_adult_offspring" agent-lifetime-adult-offspring r:put "pop_census" pop-census r:put "pop_age" pop-age r:put "pop_waste_prob" pop-waste-prob r:put "pop_neutral" pop-neutral r:put "climate" climate r:eval "save.image(file=paste(outpath,f,'.RData',sep=''))" r:clear r:gc end @#$#@#$#@ GRAPHICS-WINDOW 7 45 45 84 -1 -1 30.0 1 10 1 1 1 0 0 0 1 0 0 0 0 0 0 1 ticks 30.0 BUTTON 7 10 73 43 NIL setup NIL 1 T OBSERVER NIL NIL NIL NIL 1 BUTTON 74 10 137 43 NIL go T 1 T OBSERVER NIL NIL NIL NIL 1 INPUTBOX 6 189 120 249 initial-num-agents 1000.0 1 0 Number PLOT 257 10 581 160 Population Size Ticks Population 0.0 10.0 0.0 100.0 true false "" "" PENS "Agents" 1.0 0 -14070903 true "" "plot count turtles" "Carrying Capacity" 1.0 0 -16777216 true "" "plot base-agents" INPUTBOX 6 449 119 509 waste-mutate 0.01 1 0 Number PLOT 583 161 907 311 Waste Probability NIL NIL 0.0 1.0 0.0 1.0 true false "" "" PENS "Agents" 0.01 1 -16777216 true "" "histogram [waste-prob] of turtles" PLOT 257 312 581 462 Age NIL NIL 1.0 100.0 0.0 100.0 true false "" "" PENS "default" 1.0 1 -16777216 true "" "histogram [age] of turtles" TEXTBOX 6 172 156 190 Agent Initialization 11 0.0 1 TEXTBOX 9 530 159 548 Environmental Dynamics 11 0.0 1 INPUTBOX 6 586 119 646 climateAR 0.3 1 0 Number INPUTBOX 121 586 235 646 climateSD 0.3 1 0 Number INPUTBOX 139 10 237 70 nticks 2000.0 1 0 Number PLOT 582 10 907 160 Climate Ticks NIL 0.0 10.0 -1.0 1.0 true false "" "" PENS "default" 1.0 0 -16777216 true "" "plot abs item ticks climate" "pen-1" 1.0 0 -7500403 true "" "plot abs ( 1 + ( item ticks climate ) )" SWITCH 6 551 158 584 climate-change climate-change 0 1 -1000 PLOT 257 161 581 311 Mean Probabilities Ticks NIL 0.0 10.0 0.0 1.0 true true "" "" PENS "Waste" 1.0 0 -16777216 true "" "plot mean [waste-prob] of turtles" "Neutral" 1.0 0 -7500403 true "" "plot mean [neutral] of turtles" INPUTBOX 6 336 120 396 repro-cost 1.0 1 0 Number INPUTBOX 121 336 235 396 consume-amount 1.0 1 0 Number SWITCH 6 415 119 448 waste waste 0 1 -1000 TEXTBOX 9 399 159 417 Waste Dynamics 11 0.0 1 INPUTBOX 6 111 236 171 ExperimentName longrun 1 0 String SWITCH 6 682 131 715 export-res export-res 1 1 -1000 INPUTBOX 6 717 350 777 output_path /Volumes/WCCDefiant/Academia/Projects/Waste/Data/001/ 1 0 String CHOOSER 121 250 229 295 provision provision "1" "2" "3" "4" "R" 0 INPUTBOX 6 250 120 310 mature 10.0 1 0 Number PLOT 458 463 780 613 Provisioned NIL NIL 0.0 10.0 0.0 100.0 true false "" "" PENS "default" 1.0 1 -16777216 true "" "histogram [provisioned] of turtles with [juv-offspring >= 1]" PLOT 257 463 457 613 Provisioning NIL NIL 1.0 5.0 0.0 1000.0 false false "" "" PENS "default" 1.0 1 -16777216 true "" "histogram [prov-strategy] of turtles " PLOT 908 161 1203 311 Neutral NIL NIL 0.0 1.0 0.0 10.0 true false "" "" PENS "default" 0.01 1 -16777216 true "" "histogram [neutral] of turtles" PLOT 582 312 799 462 N. Off. NIL NIL 0.0 10.0 0.0 100.0 true false "" "" PENS "default" 1.0 1 -16777216 true "" "histogram [n-offspring] of turtles with [age >= mature]" TEXTBOX 7 319 157 337 Survival Costs 11 0.0 1 PLOT 800 312 1000 462 N. Juvenile Off. NIL NIL 0.0 10.0 0.0 100.0 true false "" "" PENS "default" 1.0 1 -16777216 true "" "histogram [juv-offspring] of turtles with [age >= mature and juv-offspring > 0]" PLOT 1001 312 1201 462 N. Adult Off. NIL NIL 0.0 10.0 0.0 100.0 true false "" "" PENS "default" 1.0 1 -16777216 true "" "histogram [adult-offspring] of turtles with [age >= mature]" INPUTBOX 121 189 229 249 base-agents 2000.0 1 0 Number TEXTBOX 10 663 160 681 Output 11 0.0 1 PLOT 908 10 1203 160 Resources Gathered NIL NIL 0.0 100.0 0.0 5.0 true false "" "" PENS "No Climate" 1.0 0 -16777216 true "" "plot base-agents / ( count turtles )" "Climate" 1.0 0 -7500403 true "" "plot abs (item ticks climate) * ( base-agents / ( count turtles ) ) " @#$#@#$#@ ## WHAT IS IT? (a general understanding of what the model is trying to show or explain) ## HOW IT WORKS (what rules the agents use to create the overall behavior of the model) ## HOW TO USE IT (how to use the model, including a description of each of the items in the Interface tab) ## THINGS TO NOTICE (suggested things for the user to notice while running the model) ## THINGS TO TRY (suggested things for the user to try to do (move sliders, switches, etc.) with the model) ## EXTENDING THE MODEL (suggested things to add or change in the Code tab to make the model more complicated, detailed, accurate, etc.) ## NETLOGO FEATURES (interesting or unusual features of NetLogo that the model uses, particularly in the Code tab; or where workarounds were needed for missing features) ## RELATED MODELS (models in the NetLogo Models Library and elsewhere which are of related interest) ## CREDITS AND REFERENCES (a reference to the model's URL on the web if it has one, as well as any other necessary credits, citations, and links) @#$#@#$#@ default true 0 Polygon -7500403 true true 150 5 40 250 150 205 260 250 airplane true 0 Polygon -7500403 true true 150 0 135 15 120 60 120 105 15 165 15 195 120 180 135 240 105 270 120 285 150 270 180 285 210 270 165 240 180 180 285 195 285 165 180 105 180 60 165 15 arrow true 0 Polygon -7500403 true true 150 0 0 150 105 150 105 293 195 293 195 150 300 150 box false 0 Polygon -7500403 true true 150 285 285 225 285 75 150 135 Polygon -7500403 true true 150 135 15 75 150 15 285 75 Polygon -7500403 true true 15 75 15 225 150 285 150 135 Line -16777216 false 150 285 150 135 Line -16777216 false 150 135 15 75 Line -16777216 false 150 135 285 75 bug true 0 Circle -7500403 true true 96 182 108 Circle -7500403 true true 110 127 80 Circle -7500403 true true 110 75 80 Line -7500403 true 150 100 80 30 Line -7500403 true 150 100 220 30 butterfly true 0 Polygon -7500403 true true 150 165 209 199 225 225 225 255 195 270 165 255 150 240 Polygon -7500403 true true 150 165 89 198 75 225 75 255 105 270 135 255 150 240 Polygon -7500403 true true 139 148 100 105 55 90 25 90 10 105 10 135 25 180 40 195 85 194 139 163 Polygon -7500403 true true 162 150 200 105 245 90 275 90 290 105 290 135 275 180 260 195 215 195 162 165 Polygon -16777216 true false 150 255 135 225 120 150 135 120 150 105 165 120 180 150 165 225 Circle -16777216 true false 135 90 30 Line -16777216 false 150 105 195 60 Line -16777216 false 150 105 105 60 car false 0 Polygon -7500403 true true 300 180 279 164 261 144 240 135 226 132 213 106 203 84 185 63 159 50 135 50 75 60 0 150 0 165 0 225 300 225 300 180 Circle -16777216 true false 180 180 90 Circle -16777216 true false 30 180 90 Polygon -16777216 true false 162 80 132 78 134 135 209 135 194 105 189 96 180 89 Circle -7500403 true true 47 195 58 Circle -7500403 true true 195 195 58 circle false 0 Circle -7500403 true true 0 0 300 circle 2 false 0 Circle -7500403 true true 0 0 300 Circle -16777216 true false 30 30 240 cow false 0 Polygon -7500403 true true 200 193 197 249 179 249 177 196 166 187 140 189 93 191 78 179 72 211 49 209 48 181 37 149 25 120 25 89 45 72 103 84 179 75 198 76 252 64 272 81 293 103 285 121 255 121 242 118 224 167 Polygon -7500403 true true 73 210 86 251 62 249 48 208 Polygon -7500403 true true 25 114 16 195 9 204 23 213 25 200 39 123 cylinder false 0 Circle -7500403 true true 0 0 300 dot false 0 Circle -7500403 true true 90 90 120 face happy false 0 Circle -7500403 true true 8 8 285 Circle -16777216 true false 60 75 60 Circle -16777216 true false 180 75 60 Polygon -16777216 true false 150 255 90 239 62 213 47 191 67 179 90 203 109 218 150 225 192 218 210 203 227 181 251 194 236 217 212 240 face neutral false 0 Circle -7500403 true true 8 7 285 Circle -16777216 true false 60 75 60 Circle -16777216 true false 180 75 60 Rectangle -16777216 true false 60 195 240 225 face sad false 0 Circle -7500403 true true 8 8 285 Circle -16777216 true false 60 75 60 Circle -16777216 true false 180 75 60 Polygon -16777216 true false 150 168 90 184 62 210 47 232 67 244 90 220 109 205 150 198 192 205 210 220 227 242 251 229 236 206 212 183 fish false 0 Polygon -1 true false 44 131 21 87 15 86 0 120 15 150 0 180 13 214 20 212 45 166 Polygon -1 true false 135 195 119 235 95 218 76 210 46 204 60 165 Polygon -1 true false 75 45 83 77 71 103 86 114 166 78 135 60 Polygon -7500403 true true 30 136 151 77 226 81 280 119 292 146 292 160 287 170 270 195 195 210 151 212 30 166 Circle -16777216 true false 215 106 30 flag false 0 Rectangle -7500403 true true 60 15 75 300 Polygon -7500403 true true 90 150 270 90 90 30 Line -7500403 true 75 135 90 135 Line -7500403 true 75 45 90 45 flower false 0 Polygon -10899396 true false 135 120 165 165 180 210 180 240 150 300 165 300 195 240 195 195 165 135 Circle -7500403 true true 85 132 38 Circle -7500403 true true 130 147 38 Circle -7500403 true true 192 85 38 Circle -7500403 true true 85 40 38 Circle -7500403 true true 177 40 38 Circle -7500403 true true 177 132 38 Circle -7500403 true true 70 85 38 Circle -7500403 true true 130 25 38 Circle -7500403 true true 96 51 108 Circle -16777216 true false 113 68 74 Polygon -10899396 true false 189 233 219 188 249 173 279 188 234 218 Polygon -10899396 true false 180 255 150 210 105 210 75 240 135 240 house false 0 Rectangle -7500403 true true 45 120 255 285 Rectangle -16777216 true false 120 210 180 285 Polygon -7500403 true true 15 120 150 15 285 120 Line -16777216 false 30 120 270 120 leaf false 0 Polygon -7500403 true true 150 210 135 195 120 210 60 210 30 195 60 180 60 165 15 135 30 120 15 105 40 104 45 90 60 90 90 105 105 120 120 120 105 60 120 60 135 30 150 15 165 30 180 60 195 60 180 120 195 120 210 105 240 90 255 90 263 104 285 105 270 120 285 135 240 165 240 180 270 195 240 210 180 210 165 195 Polygon -7500403 true true 135 195 135 240 120 255 105 255 105 285 135 285 165 240 165 195 line true 0 Line -7500403 true 150 0 150 300 line half true 0 Line -7500403 true 150 0 150 150 pentagon false 0 Polygon -7500403 true true 150 15 15 120 60 285 240 285 285 120 person false 0 Circle -7500403 true true 110 5 80 Polygon -7500403 true true 105 90 120 195 90 285 105 300 135 300 150 225 165 300 195 300 210 285 180 195 195 90 Rectangle -7500403 true true 127 79 172 94 Polygon -7500403 true true 195 90 240 150 225 180 165 105 Polygon -7500403 true true 105 90 60 150 75 180 135 105 plant false 0 Rectangle -7500403 true true 135 90 165 300 Polygon -7500403 true true 135 255 90 210 45 195 75 255 135 285 Polygon -7500403 true true 165 255 210 210 255 195 225 255 165 285 Polygon -7500403 true true 135 180 90 135 45 120 75 180 135 210 Polygon -7500403 true true 165 180 165 210 225 180 255 120 210 135 Polygon -7500403 true true 135 105 90 60 45 45 75 105 135 135 Polygon -7500403 true true 165 105 165 135 225 105 255 45 210 60 Polygon -7500403 true true 135 90 120 45 150 15 180 45 165 90 sheep false 15 Circle -1 true true 203 65 88 Circle -1 true true 70 65 162 Circle -1 true true 150 105 120 Polygon -7500403 true false 218 120 240 165 255 165 278 120 Circle -7500403 true false 214 72 67 Rectangle -1 true true 164 223 179 298 Polygon -1 true true 45 285 30 285 30 240 15 195 45 210 Circle -1 true true 3 83 150 Rectangle -1 true true 65 221 80 296 Polygon -1 true true 195 285 210 285 210 240 240 210 195 210 Polygon -7500403 true false 276 85 285 105 302 99 294 83 Polygon -7500403 true false 219 85 210 105 193 99 201 83 square false 0 Rectangle -7500403 true true 30 30 270 270 square 2 false 0 Rectangle -7500403 true true 30 30 270 270 Rectangle -16777216 true false 60 60 240 240 star false 0 Polygon -7500403 true true 151 1 185 108 298 108 207 175 242 282 151 216 59 282 94 175 3 108 116 108 target false 0 Circle -7500403 true true 0 0 300 Circle -16777216 true false 30 30 240 Circle -7500403 true true 60 60 180 Circle -16777216 true false 90 90 120 Circle -7500403 true true 120 120 60 tree false 0 Circle -7500403 true true 118 3 94 Rectangle -6459832 true false 120 195 180 300 Circle -7500403 true true 65 21 108 Circle -7500403 true true 116 41 127 Circle -7500403 true true 45 90 120 Circle -7500403 true true 104 74 152 triangle false 0 Polygon -7500403 true true 150 30 15 255 285 255 triangle 2 false 0 Polygon -7500403 true true 150 30 15 255 285 255 Polygon -16777216 true false 151 99 225 223 75 224 truck false 0 Rectangle -7500403 true true 4 45 195 187 Polygon -7500403 true true 296 193 296 150 259 134 244 104 208 104 207 194 Rectangle -1 true false 195 60 195 105 Polygon -16777216 true false 238 112 252 141 219 141 218 112 Circle -16777216 true false 234 174 42 Rectangle -7500403 true true 181 185 214 194 Circle -16777216 true false 144 174 42 Circle -16777216 true false 24 174 42 Circle -7500403 false true 24 174 42 Circle -7500403 false true 144 174 42 Circle -7500403 false true 234 174 42 turtle true 0 Polygon -10899396 true false 215 204 240 233 246 254 228 266 215 252 193 210 Polygon -10899396 true false 195 90 225 75 245 75 260 89 269 108 261 124 240 105 225 105 210 105 Polygon -10899396 true false 105 90 75 75 55 75 40 89 31 108 39 124 60 105 75 105 90 105 Polygon -10899396 true false 132 85 134 64 107 51 108 17 150 2 192 18 192 52 169 65 172 87 Polygon -10899396 true false 85 204 60 233 54 254 72 266 85 252 107 210 Polygon -7500403 true true 119 75 179 75 209 101 224 135 220 225 175 261 128 261 81 224 74 135 88 99 wheel false 0 Circle -7500403 true true 3 3 294 Circle -16777216 true false 30 30 240 Line -7500403 true 150 285 150 15 Line -7500403 true 15 150 285 150 Circle -7500403 true true 120 120 60 Line -7500403 true 216 40 79 269 Line -7500403 true 40 84 269 221 Line -7500403 true 40 216 269 79 Line -7500403 true 84 40 221 269 wolf false 0 Polygon -16777216 true false 253 133 245 131 245 133 Polygon -7500403 true true 2 194 13 197 30 191 38 193 38 205 20 226 20 257 27 265 38 266 40 260 31 253 31 230 60 206 68 198 75 209 66 228 65 243 82 261 84 268 100 267 103 261 77 239 79 231 100 207 98 196 119 201 143 202 160 195 166 210 172 213 173 238 167 251 160 248 154 265 169 264 178 247 186 240 198 260 200 271 217 271 219 262 207 258 195 230 192 198 210 184 227 164 242 144 259 145 284 151 277 141 293 140 299 134 297 127 273 119 270 105 Polygon -7500403 true true -1 195 14 180 36 166 40 153 53 140 82 131 134 133 159 126 188 115 227 108 236 102 238 98 268 86 269 92 281 87 269 103 269 113 x false 0 Polygon -7500403 true true 270 75 225 30 30 225 75 270 Polygon -7500403 true true 30 75 75 30 270 225 225 270 @#$#@#$#@ NetLogo 6.0.4 @#$#@#$#@ @#$#@#$#@ @#$#@#$#@ <experiments> <experiment name="longrun006" repetitions="138" sequentialRunOrder="false" runMetricsEveryStep="false"> <setup>setup</setup> <go>go</go> <enumeratedValueSet variable="export-res"> <value value="true"/> </enumeratedValueSet> <enumeratedValueSet variable="climateSD"> <value value="0.5"/> </enumeratedValueSet> <enumeratedValueSet variable="climateAR"> <value value="0.3"/> </enumeratedValueSet> <enumeratedValueSet variable="base-agents"> <value value="2000"/> </enumeratedValueSet> <enumeratedValueSet variable="initial-num-agents"> <value value="1000"/> </enumeratedValueSet> <enumeratedValueSet variable="provision"> <value value="&quot;R&quot;"/> </enumeratedValueSet> <enumeratedValueSet variable="climate-change"> <value value="true"/> </enumeratedValueSet> <enumeratedValueSet variable="output_path"> <value value="&quot;/Volumes/WCCDefiant/Academia/Projects/Waste/Data/006/Long/&quot;"/> </enumeratedValueSet> <enumeratedValueSet variable="waste-mutate"> <value value="0.01"/> </enumeratedValueSet> <enumeratedValueSet variable="repro-cost"> <value value="1"/> </enumeratedValueSet> <enumeratedValueSet variable="waste"> <value value="true"/> </enumeratedValueSet> <enumeratedValueSet variable="mature"> <value value="10"/> </enumeratedValueSet> <enumeratedValueSet variable="nticks"> <value value="2000"/> </enumeratedValueSet> <enumeratedValueSet variable="ExperimentName"> <value value="&quot;longrun&quot;"/> </enumeratedValueSet> <enumeratedValueSet variable="consume-amount"> <value value="1"/> </enumeratedValueSet> </experiment> <experiment name="longrun005" repetitions="300" sequentialRunOrder="false" runMetricsEveryStep="false"> <setup>setup</setup> <go>go</go> <enumeratedValueSet variable="export-res"> <value value="true"/> </enumeratedValueSet> <enumeratedValueSet variable="climateSD"> <value value="0.3"/> </enumeratedValueSet> <enumeratedValueSet variable="climateAR"> <value value="0.3"/> </enumeratedValueSet> <enumeratedValueSet variable="base-agents"> <value value="2000"/> </enumeratedValueSet> <enumeratedValueSet variable="initial-num-agents"> <value value="1000"/> </enumeratedValueSet> <enumeratedValueSet variable="provision"> <value value="&quot;R&quot;"/> </enumeratedValueSet> <enumeratedValueSet variable="climate-change"> <value value="true"/> </enumeratedValueSet> <enumeratedValueSet variable="output_path"> <value value="&quot;/Volumes/WCCDefiant/Academia/Projects/Waste/Data/005/&quot;"/> </enumeratedValueSet> <enumeratedValueSet variable="waste-mutate"> <value value="0.01"/> </enumeratedValueSet> <enumeratedValueSet variable="repro-cost"> <value value="1"/> </enumeratedValueSet> <enumeratedValueSet variable="waste"> <value value="true"/> </enumeratedValueSet> <enumeratedValueSet variable="mature"> <value value="10"/> </enumeratedValueSet> <enumeratedValueSet variable="nticks"> <value value="2000"/> </enumeratedValueSet> <enumeratedValueSet variable="ExperimentName"> <value value="&quot;longrun&quot;"/> </enumeratedValueSet> <enumeratedValueSet variable="consume-amount"> <value value="1"/> </enumeratedValueSet> </experiment> <experiment name="longrun004" repetitions="300" sequentialRunOrder="false" runMetricsEveryStep="false"> <setup>setup</setup> <go>go</go> <enumeratedValueSet variable="export-res"> <value value="true"/> </enumeratedValueSet> <enumeratedValueSet variable="climateSD"> <value value="0.5"/> </enumeratedValueSet> <enumeratedValueSet variable="climateAR"> <value value="0.3"/> </enumeratedValueSet> <enumeratedValueSet variable="base-agents"> <value value="2000"/> </enumeratedValueSet> <enumeratedValueSet variable="initial-num-agents"> <value value="1000"/> </enumeratedValueSet> <enumeratedValueSet variable="provision"> <value value="&quot;R&quot;"/> </enumeratedValueSet> <enumeratedValueSet variable="climate-change"> <value value="true"/> </enumeratedValueSet> <enumeratedValueSet variable="output_path"> <value value="&quot;/Volumes/WCCDefiant/Academia/Projects/Waste/Data/004/&quot;"/> </enumeratedValueSet> <enumeratedValueSet variable="waste-mutate"> <value value="0.01"/> </enumeratedValueSet> <enumeratedValueSet variable="repro-cost"> <value value="1"/> </enumeratedValueSet> <enumeratedValueSet variable="waste"> <value value="true"/> </enumeratedValueSet> <enumeratedValueSet variable="mature"> <value value="5"/> </enumeratedValueSet> <enumeratedValueSet variable="nticks"> <value value="2000"/> </enumeratedValueSet> <enumeratedValueSet variable="ExperimentName"> <value value="&quot;longrun&quot;"/> </enumeratedValueSet> <enumeratedValueSet variable="consume-amount"> <value value="1"/> </enumeratedValueSet> </experiment> <experiment name="longrun003" repetitions="300" sequentialRunOrder="false" runMetricsEveryStep="false"> <setup>setup</setup> <go>go</go> <enumeratedValueSet variable="export-res"> <value value="true"/> </enumeratedValueSet> <enumeratedValueSet variable="climateSD"> <value value="0.3"/> </enumeratedValueSet> <enumeratedValueSet variable="climateAR"> <value value="0.3"/> </enumeratedValueSet> <enumeratedValueSet variable="base-agents"> <value value="2000"/> </enumeratedValueSet> <enumeratedValueSet variable="initial-num-agents"> <value value="1000"/> </enumeratedValueSet> <enumeratedValueSet variable="provision"> <value value="&quot;R&quot;"/> </enumeratedValueSet> <enumeratedValueSet variable="climate-change"> <value value="true"/> </enumeratedValueSet> <enumeratedValueSet variable="output_path"> <value value="&quot;/Volumes/WCCDefiant/Academia/Projects/Waste/Data/003/&quot;"/> </enumeratedValueSet> <enumeratedValueSet variable="waste-mutate"> <value value="0.01"/> </enumeratedValueSet> <enumeratedValueSet variable="repro-cost"> <value value="1"/> </enumeratedValueSet> <enumeratedValueSet variable="waste"> <value value="true"/> </enumeratedValueSet> <enumeratedValueSet variable="mature"> <value value="5"/> </enumeratedValueSet> <enumeratedValueSet variable="nticks"> <value value="2000"/> </enumeratedValueSet> <enumeratedValueSet variable="ExperimentName"> <value value="&quot;longrun&quot;"/> </enumeratedValueSet> <enumeratedValueSet variable="consume-amount"> <value value="1"/> </enumeratedValueSet> </experiment> <experiment name="longrun002" repetitions="300" sequentialRunOrder="false" runMetricsEveryStep="false"> <setup>setup</setup> <go>go</go> <enumeratedValueSet variable="export-res"> <value value="true"/> </enumeratedValueSet> <enumeratedValueSet variable="climateSD"> <value value="0.5"/> </enumeratedValueSet> <enumeratedValueSet variable="climateAR"> <value value="0.3"/> </enumeratedValueSet> <enumeratedValueSet variable="base-agents"> <value value="2000"/> </enumeratedValueSet> <enumeratedValueSet variable="initial-num-agents"> <value value="1000"/> </enumeratedValueSet> <enumeratedValueSet variable="provision"> <value value="&quot;R&quot;"/> </enumeratedValueSet> <enumeratedValueSet variable="climate-change"> <value value="true"/> </enumeratedValueSet> <enumeratedValueSet variable="output_path"> <value value="&quot;/Volumes/WCCDefiant/Academia/Projects/Waste/Data/002/&quot;"/> </enumeratedValueSet> <enumeratedValueSet variable="waste-mutate"> <value value="0.01"/> </enumeratedValueSet> <enumeratedValueSet variable="repro-cost"> <value value="1"/> </enumeratedValueSet> <enumeratedValueSet variable="waste"> <value value="true"/> </enumeratedValueSet> <enumeratedValueSet variable="mature"> <value value="1"/> </enumeratedValueSet> <enumeratedValueSet variable="nticks"> <value value="2000"/> </enumeratedValueSet> <enumeratedValueSet variable="ExperimentName"> <value value="&quot;longrun&quot;"/> </enumeratedValueSet> <enumeratedValueSet variable="consume-amount"> <value value="1"/> </enumeratedValueSet> </experiment> <experiment name="longrun001" repetitions="300" sequentialRunOrder="false" runMetricsEveryStep="false"> <setup>setup</setup> <go>go</go> <enumeratedValueSet variable="export-res"> <value value="true"/> </enumeratedValueSet> <enumeratedValueSet variable="climateSD"> <value value="0.3"/> </enumeratedValueSet> <enumeratedValueSet variable="climateAR"> <value value="0.3"/> </enumeratedValueSet> <enumeratedValueSet variable="base-agents"> <value value="2000"/> </enumeratedValueSet> <enumeratedValueSet variable="initial-num-agents"> <value value="1000"/> </enumeratedValueSet> <enumeratedValueSet variable="provision"> <value value="&quot;R&quot;"/> </enumeratedValueSet> <enumeratedValueSet variable="climate-change"> <value value="true"/> </enumeratedValueSet> <enumeratedValueSet variable="output_path"> <value value="&quot;/Volumes/WCCDefiant/Academia/Projects/Waste/Data/001/&quot;"/> </enumeratedValueSet> <enumeratedValueSet variable="waste-mutate"> <value value="0.01"/> </enumeratedValueSet> <enumeratedValueSet variable="repro-cost"> <value value="1"/> </enumeratedValueSet> <enumeratedValueSet variable="waste"> <value value="true"/> </enumeratedValueSet> <enumeratedValueSet variable="mature"> <value value="1"/> </enumeratedValueSet> <enumeratedValueSet variable="nticks"> <value value="2000"/> </enumeratedValueSet> <enumeratedValueSet variable="ExperimentName"> <value value="&quot;longrun&quot;"/> </enumeratedValueSet> <enumeratedValueSet variable="consume-amount"> <value value="1"/> </enumeratedValueSet> </experiment> </experiments> @#$#@#$#@ @#$#@#$#@ default 0.0 -0.2 0 0.0 1.0 0.0 1 1.0 0.0 0.2 0 0.0 1.0 link direction true 0 Line -7500403 true 150 150 90 180 Line -7500403 true 150 150 210 180 @#$#@#$#@ 0 @#$#@#$#@
NetLogo
5
wccarleton/abm_waste
NetLogo/waste_abm.nlogo
[ "MIT" ]
/** * Author......: See docs/credits.txt * License.....: MIT */ //too much register pressure //#define NEW_SIMD_CODE #ifdef KERNEL_STATIC #include "inc_vendor.h" #include "inc_types.h" #include "inc_platform.cl" #include "inc_common.cl" #include "inc_simd.cl" #endif DECLSPEC u32 MurmurHash (const u32 seed, const u32 *w, const int pw_len) { u32 hash = seed; #define M 0x7fd652ad #define R 16 hash += 0xdeadbeef; int i; int j; for (i = 0, j = 0; i < pw_len - 3; i += 4, j += 1) { const u32 tmp = w[j]; hash += tmp; hash *= M; hash ^= hash >> R; } if (pw_len & 3) { const u32 tmp = w[j]; hash += tmp; hash *= M; hash ^= hash >> R; } hash *= M; hash ^= hash >> 10; hash *= M; hash ^= hash >> 17; #undef M #undef R return hash; } KERNEL_FQ void m25700_m04 (KERN_ATTR_BASIC ()) { /** * modifier */ const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); if (gid >= gid_max) return; /** * base */ u32 pw_buf0[4]; u32 pw_buf1[4]; pw_buf0[0] = pws[gid].i[0]; pw_buf0[1] = pws[gid].i[1]; pw_buf0[2] = pws[gid].i[2]; pw_buf0[3] = pws[gid].i[3]; pw_buf1[0] = pws[gid].i[4]; pw_buf1[1] = pws[gid].i[5]; pw_buf1[2] = pws[gid].i[6]; pw_buf1[3] = pws[gid].i[7]; const u32 pw_l_len = pws[gid].pw_len & 63; /** * seed */ const u32 seed = salt_bufs[SALT_POS].salt_buf[0]; /** * loop */ for (u32 il_pos = 0; il_pos < il_cnt; il_pos += VECT_SIZE) { const u32 pw_r_len = pwlenx_create_combt (combs_buf, il_pos) & 63; const u32 pw_len = (pw_l_len + pw_r_len) & 63; /** * concat password candidate */ u32 wordl0[4] = { 0 }; u32 wordl1[4] = { 0 }; u32 wordl2[4] = { 0 }; u32 wordl3[4] = { 0 }; wordl0[0] = pw_buf0[0]; wordl0[1] = pw_buf0[1]; wordl0[2] = pw_buf0[2]; wordl0[3] = pw_buf0[3]; wordl1[0] = pw_buf1[0]; wordl1[1] = pw_buf1[1]; wordl1[2] = pw_buf1[2]; wordl1[3] = pw_buf1[3]; u32 wordr0[4] = { 0 }; u32 wordr1[4] = { 0 }; u32 wordr2[4] = { 0 }; u32 wordr3[4] = { 0 }; wordr0[0] = ix_create_combt (combs_buf, il_pos, 0); wordr0[1] = ix_create_combt (combs_buf, il_pos, 1); wordr0[2] = ix_create_combt (combs_buf, il_pos, 2); wordr0[3] = ix_create_combt (combs_buf, il_pos, 3); wordr1[0] = ix_create_combt (combs_buf, il_pos, 4); wordr1[1] = ix_create_combt (combs_buf, il_pos, 5); wordr1[2] = ix_create_combt (combs_buf, il_pos, 6); wordr1[3] = ix_create_combt (combs_buf, il_pos, 7); if (combs_mode == COMBINATOR_MODE_BASE_LEFT) { switch_buffer_by_offset_le_VV (wordr0, wordr1, wordr2, wordr3, pw_l_len); } else { switch_buffer_by_offset_le_VV (wordl0, wordl1, wordl2, wordl3, pw_r_len); } u32 w[16]; w[ 0] = wordl0[0] | wordr0[0]; w[ 1] = wordl0[1] | wordr0[1]; w[ 2] = wordl0[2] | wordr0[2]; w[ 3] = wordl0[3] | wordr0[3]; w[ 4] = wordl1[0] | wordr1[0]; w[ 5] = wordl1[1] | wordr1[1]; w[ 6] = wordl1[2] | wordr1[2]; w[ 7] = wordl1[3] | wordr1[3]; w[ 8] = wordl2[0] | wordr2[0]; w[ 9] = wordl2[1] | wordr2[1]; w[10] = wordl2[2] | wordr2[2]; w[11] = wordl2[3] | wordr2[3]; w[12] = wordl3[0] | wordr3[0]; w[13] = wordl3[1] | wordr3[1]; w[14] = wordl3[2] | wordr3[2]; w[15] = wordl3[3] | wordr3[3]; const u32 r = MurmurHash (seed, w, pw_len); const u32 z = 0; COMPARE_M_SIMD (r, z, z, z); } } KERNEL_FQ void m25700_m08 (KERN_ATTR_BASIC ()) { } KERNEL_FQ void m25700_m16 (KERN_ATTR_BASIC ()) { } KERNEL_FQ void m25700_s04 (KERN_ATTR_BASIC ()) { /** * modifier */ const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); if (gid >= gid_max) return; /** * base */ u32 pw_buf0[4]; u32 pw_buf1[4]; pw_buf0[0] = pws[gid].i[0]; pw_buf0[1] = pws[gid].i[1]; pw_buf0[2] = pws[gid].i[2]; pw_buf0[3] = pws[gid].i[3]; pw_buf1[0] = pws[gid].i[4]; pw_buf1[1] = pws[gid].i[5]; pw_buf1[2] = pws[gid].i[6]; pw_buf1[3] = pws[gid].i[7]; const u32 pw_l_len = pws[gid].pw_len & 63; /** * seed */ const u32 seed = salt_bufs[SALT_POS].salt_buf[0]; /** * digest */ const u32 search[4] = { digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], 0, 0, 0 }; /** * loop */ for (u32 il_pos = 0; il_pos < il_cnt; il_pos += VECT_SIZE) { const u32 pw_r_len = pwlenx_create_combt (combs_buf, il_pos) & 63; const u32 pw_len = (pw_l_len + pw_r_len) & 63; /** * concat password candidate */ u32 wordl0[4] = { 0 }; u32 wordl1[4] = { 0 }; u32 wordl2[4] = { 0 }; u32 wordl3[4] = { 0 }; wordl0[0] = pw_buf0[0]; wordl0[1] = pw_buf0[1]; wordl0[2] = pw_buf0[2]; wordl0[3] = pw_buf0[3]; wordl1[0] = pw_buf1[0]; wordl1[1] = pw_buf1[1]; wordl1[2] = pw_buf1[2]; wordl1[3] = pw_buf1[3]; u32 wordr0[4] = { 0 }; u32 wordr1[4] = { 0 }; u32 wordr2[4] = { 0 }; u32 wordr3[4] = { 0 }; wordr0[0] = ix_create_combt (combs_buf, il_pos, 0); wordr0[1] = ix_create_combt (combs_buf, il_pos, 1); wordr0[2] = ix_create_combt (combs_buf, il_pos, 2); wordr0[3] = ix_create_combt (combs_buf, il_pos, 3); wordr1[0] = ix_create_combt (combs_buf, il_pos, 4); wordr1[1] = ix_create_combt (combs_buf, il_pos, 5); wordr1[2] = ix_create_combt (combs_buf, il_pos, 6); wordr1[3] = ix_create_combt (combs_buf, il_pos, 7); if (combs_mode == COMBINATOR_MODE_BASE_LEFT) { switch_buffer_by_offset_le_VV (wordr0, wordr1, wordr2, wordr3, pw_l_len); } else { switch_buffer_by_offset_le_VV (wordl0, wordl1, wordl2, wordl3, pw_r_len); } u32 w[16]; w[ 0] = wordl0[0] | wordr0[0]; w[ 1] = wordl0[1] | wordr0[1]; w[ 2] = wordl0[2] | wordr0[2]; w[ 3] = wordl0[3] | wordr0[3]; w[ 4] = wordl1[0] | wordr1[0]; w[ 5] = wordl1[1] | wordr1[1]; w[ 6] = wordl1[2] | wordr1[2]; w[ 7] = wordl1[3] | wordr1[3]; w[ 8] = wordl2[0] | wordr2[0]; w[ 9] = wordl2[1] | wordr2[1]; w[10] = wordl2[2] | wordr2[2]; w[11] = wordl2[3] | wordr2[3]; w[12] = wordl3[0] | wordr3[0]; w[13] = wordl3[1] | wordr3[1]; w[14] = wordl3[2] | wordr3[2]; w[15] = wordl3[3] | wordr3[3]; const u32 r = MurmurHash (seed, w, pw_len); const u32 z = 0; COMPARE_S_SIMD (r, z, z, z); } } KERNEL_FQ void m25700_s08 (KERN_ATTR_BASIC ()) { } KERNEL_FQ void m25700_s16 (KERN_ATTR_BASIC ()) { }
OpenCL
4
Masha/hashcat
OpenCL/m25700_a1-optimized.cl
[ "MIT" ]
import {forwardRef, Injectable, NgModule} from '@angular/core'; @Injectable() export class Dep { } @Injectable({providedIn: forwardRef(() => Mod)}) export class Service { constructor(dep: Dep) {} } @NgModule() export class Mod { }
TypeScript
4
John-Cassidy/angular
packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_di/di/providedin_forwardref.ts
[ "MIT" ]
(include-file "include/flavors.lfe") (defflavor f2 ((time (now)) (share 'f2) g q) () gettable-instance-variables (settable-instance-variables q g) ;share is not settable inittable-instance-variables (required-instance-variables y x) (required-methods (set-y 1) (set-a 1)) abstract-flavor) (defmethod (set-y before) (v) (lfe_io:format "f2 before set-y ~p\n" (list self))) (defmethod (set-y after) (v) (lfe_io:format "f2 after set-y ~p\n" (list self))) (defmethod (three) (('x x) (set 'x x)) (('y y) (set 'y y))) (endflavor f2)
LFE
4
rvirding/flavors
test/f2.lfe
[ "Apache-2.0" ]
script(src='/js/lib/jquery.min.js') script(src='/js/lib/foundation.min.js')
Jade
1
gusnips/megaboilerplate
generators/css-framework/modules/foundation/jade-js-min-import.jade
[ "MIT" ]
_tab 4096 gen_sine _seq '60 65 70 72' gen_vals # set clock to p-reg 0 116 4 * bpm2dur dmetro 0 pset # set exponential envelope to p-reg 1 0 p 0.002 0.01 # lfo-based release time ((0.2 1 sine) 0.01 0.2 biscale) tenvx 1 pset # sequencer ((((0 p 0 _seq tseq) (8 0.1 sine) +) # fifth leaps and throws via preg 3 0 p 0.2 maygate dup 3 pset 7 * + 0.002 port) mtof) 0 phasor # apply phasor through phase distortion # input signal is reverse envelope (1 1 p - ) # amount (0.1 1 0.5 _tab osc -0.9 0.1 biscale) 0 scale pdhalf # put through interpolated table lookup 1 0 0 _tab tabread 0.5 * # ampltidue envelope 1 p * # reverb throw, smooth out the gate signal dup (3 p 0.001 port *) dup 20 20 1000 zrev drop 0.2 * +
SourcePawn
3
aleatoricforest/Sporth
examples/pdhalf.sp
[ "MIT" ]
#include <ATen/native/Normalization.h> #include <ATen/native/TensorIterator.h> #include <ATen/native/cuda/Loops.cuh> #include <ATen/Dispatch.h> namespace at { namespace native{ namespace { void renorm_scale_factor_impl(TensorIteratorBase& iter, double maxnorm) { AT_DISPATCH_FLOATING_TYPES(iter.common_dtype(), "renorm_scale_factor_cpu", [&] { const auto maxnorm_s = static_cast<scalar_t>(maxnorm); gpu_kernel( iter, [maxnorm_s] GPU_LAMBDA (scalar_t norm) -> scalar_t { const auto eps = static_cast<scalar_t>(1e-7); const auto one = static_cast<scalar_t>(1.0); return (norm > maxnorm_s) ? maxnorm_s / (norm + eps) : one; }); }); } } // namespace (anonymous) REGISTER_DISPATCH(renorm_scale_factor_stub, &renorm_scale_factor_impl); }} // namespace at::native
Cuda
4
Hacky-DH/pytorch
aten/src/ATen/native/cuda/RenormKernel.cu
[ "Intel" ]
The following notation is a simplified version of the syntax found in `./dhall.abnf`. This simplified notation is used for all of the following judgments: ``` m, n = 0 / 1 + n ; Natural numbers d = ±n ; Integers x, y ; Variables ; Mnemonics for the most commonly used labels: ; ; Terms are lowercase: ; ; a = input term whose type is "A" ; b = output term whose type is "B" ; f = "f"unction ; l, r = "l"eft and "r"ight term that share the same type ; e = term whose type is "E" ; t = term whose type is "T" ; u = term whose type is "U" ; ; Types are uppercase: ; ; A = type of the input term "a" ; B = type of the output term "b" ; E = type of the term "e" ; T = type of the term "t" ; U = type of the term "u" ; ; Constants that are `Type`, `Kind`, or `Sort` are lowercase: ; ; c = "c"onstant ; i = function's "i"nput type ; o = function's "o"utput type ; ; Similar terms are distinguished by subscripts like `a₀`, `a₁`, … ; ; A term that represents zero or more values or key-value pairs ends with `s…`, ; such as `as…` ; ; Note that these are only informal mnemonics. Dhall is a pure type system, ; which means that many places in the syntax permit terms, types, kinds, and ; sorts. The typing judgments are the authoritative rules for what expressions , are permitted and forbidden. a, b, f, l, r, e, t, u, A, B, E, T, U, c, i, o = x@n ; Identifier ; (`x` is short-hand for `x@0`) / λ(x : A) → b ; Anonymous function / ∀(x : A) → B ; Function type ; (`A → B` is short-hand for `∀(_ : A) → B`) / let x : A = a in b ; Let expression with type annotation / let x = a in b ; Let expression without type annotation / if t then l else r ; if-then-else expression / merge t u : T ; Union elimination with type annotation / merge t u ; Union elimination / toMap t : T ; Conversion to a map with type annotation / toMap t ; Conversion to a map / [] : T ; Empty list literals with type annotation / [ t, ts… ] ; Non-empty list literals / t : T ; Type annotation / l || r ; Boolean or / l + r ; Natural addition / l ++ r ; Text append / l # r ; List append / l && r ; Boolean and / l ∧ r ; Recursive record merge / l ⫽ r ; Non-recursive right-biased record merge / l ⩓ r ; Recursive record type merge / l * r ; Natural multiplication / l == r ; Boolean equality / l != r ; Boolean inequality / l === r ; Equivalence (using ASCII to avoid ; confusion with the equivalence judgment) / f a ; Function application / t.x ; Field selection / t.{ xs… } ; Field projection / t.(s) ; Field projection by type / T::r ; Record completion / assert : T ; Assert judgemental equality / e with k.ks… = v ; Nested record update / n.n ; Double-precision floating point literal / n ; Natural number literal / ±n ; Integer literal / "s" ; Uninterpolated text literal / "s${t}ss…" ; Interpolated text literal / YYYY-MM-DD ; Date / hh:mm:ss ; Time / ±HH:MM ; Time zone / {} ; Empty record type / { k : T, ks… } ; Non-empty record type / {=} ; Empty record literal / { k = t, ks… } ; Non-empty record literal / <> ; Empty union type / < k : T | ks… > ; Union type with at least one non-empty ; alternative / < k | ks… > ; Union type with at least one empty ; alternative / missing ; Identity for import alternatives, ; will always fail to resolve / l ? r ; Alternative imports resolution / https://authority directory file ; URL import / directory file ; Absolute file path import / . directory file ; Relative file path import / .. directory file ; Relative file path import / ~ directory file ; Home-anchored file path import / env:x ; Environment variable import / Some a ; Constructor for a present Optional value ; Reserved identifiers for builtins / Natural/build ; Natural introduction / Natural/fold ; Natural elimination / Natural/isZero ; Test if zero / Natural/even ; Test if even / Natural/odd ; Test if odd / Natural/toInteger ; Convert Natural to Integer / Natural/show ; Convert Natural to Text representation / Natural/subtract ; Perform truncated subtraction on two Naturals / Integer/toDouble ; Convert Integer to Double / Integer/show ; Convert Integer to Text representation / Integer/negate ; Invert sign of Integers, with positive ; values becoming negative and vice-versa / Integer/clamp ; Convert Integer to Natural by clamping ; negative values to zero / Double/show ; Convert Double to Text representation / List/build ; List introduction / List/fold ; List elimination / List/length ; Length of list / List/head ; First element of list / List/last ; Last element of list / List/indexed ; Tag elements with index / List/reverse ; Reverse list / Text/show ; Convert Text to its own representation / Text/replace ; Replace a section of a Text literal / Bool ; Bool type / Optional ; Optional type / Natural ; Natural type / Integer ; Integer type / Double ; Double type / Text ; Text type / List ; List type / True ; True term / False ; False term / None ; Absent Optional value / Type ; Type of terms / Kind ; Type of types / Sort ; Type of kinds ``` ```haskell {-| This module contains the data types used to represent the syntax tree for a Dhall expression -} module Syntax ( -- * Types Expression(..) , Operator(..) , TextLiteral(..) , Builtin(..) , Constant(..) , ImportMode(..) , ImportType(..) , URL(..) , Scheme(..) , FilePrefix(..) , File(..) -- * Re-exports , Natural , Text ) where import Crypto.Hash (Digest, SHA256) import Data.List.NonEmpty (NonEmpty) import Data.Text (Text) import Numeric.Natural (Natural) import qualified Data.Time as Time -- | Top-level type representing a Dhall expression data Expression = Variable Text Natural -- ^ > x@n | Lambda Text Expression Expression -- ^ > λ(x : A) → b | Forall Text Expression Expression -- ^ > ∀(x : A) → B | Let Text (Maybe Expression) Expression Expression -- ^ > let x : A = a in b -- > let x = a in b | If Expression Expression Expression -- ^ > if t then l else r | Merge Expression Expression (Maybe Expression) -- ^ > merge t u : T -- ^ > merge t u | ToMap Expression (Maybe Expression) -- ^ > toMap t : T -- ^ > toMap t | EmptyList Expression -- ^ > [] : T | NonEmptyList (NonEmpty Expression) -- ^ > [ t, ts… ] | Annotation Expression Expression -- ^ > t : T | Operator Expression Operator Expression -- ^ > l □ r | Application Expression Expression -- ^ > f a | Field Expression Text -- ^ > t.x | ProjectByLabels Expression [Text] -- ^ > t.{ xs… } | ProjectByType Expression Expression -- ^ > t.(s) | Completion Expression Expression -- ^ > T::r | Assert Expression -- ^ > assert : T | With Expression (NonEmpty Text) Expression -- ^ > e with k.ks… = v | DoubleLiteral Double -- ^ > n.n | NaturalLiteral Natural -- ^ > n | IntegerLiteral Integer -- ^ > ±n | TextLiteral TextLiteral -- ^ > "s" -- > "s${t}ss…" | DateLiteral Time.Day | TimeLiteral Time.TimeOfDay Int -- ^ Precision | TimeZoneLiteral Time.TimeZone | RecordType [(Text, Expression)] -- ^ > {} -- > { k : T, ks… } | RecordLiteral [(Text, Expression)] -- ^ > {=} -- > { k = t, ks… } | UnionType [(Text, Maybe Expression)] -- ^ > <> -- > < k : T | ks… > -- > < k | ks… > | Import ImportType ImportMode (Maybe (Digest SHA256)) | Some Expression -- ^ > Some s | Builtin Builtin | Constant Constant deriving (Show) -- | Associative binary operators data Operator = Or -- ^ > || | Plus -- ^ > + | TextAppend -- ^ > ++ | ListAppend -- ^ > # | And -- ^ > && | CombineRecordTerms -- ^ > ∧ | Prefer -- ^ > ⫽ | CombineRecordTypes -- ^ > ⩓ | Times -- ^ > * | Equal -- ^ > == | NotEqual -- ^ > != | Equivalent -- ^ > === | Alternative -- ^ > ? deriving (Show) {-| Data structure used to represent an interpolated @Text@ literal A @Text@ literal without any interpolations has an empty list. For example, the @Text@ literal @\"foo\"@ is represented as: > TextLiteral [] "foo" A @Text@ literal with interpolations has one list element per interpolation. For example, the @Text@ literal @\"foo${x}bar${y}baz\"@ is represented as: > TextLiteral [("foo", Variable "x" 0), ("bar", Variable "y" 0)] "baz" -} data TextLiteral = Chunks [(Text, Expression)] Text deriving (Show) -- | This instance comes in handy for implementing @Text@-related operations instance Semigroup TextLiteral where Chunks xys₀ z₀ <> Chunks [] z₁ = Chunks xys₀ (z₀ <> z₁) Chunks xys₀ z₀ <> Chunks ((x₁, y₁) : xys₁) z₁ = Chunks (xys₀ <> ((z₀ <> x₁, y₁) : xys₁)) z₁ -- | This instance comes in handy for implementing @Text@-related operations instance Monoid TextLiteral where mempty = Chunks [] "" -- | Builtin values data Builtin = NaturalBuild | NaturalFold | NaturalIsZero | NaturalEven | NaturalOdd | NaturalToInteger | NaturalShow | NaturalSubtract | IntegerToDouble | IntegerShow | IntegerNegate | IntegerClamp | DoubleShow | ListBuild | ListFold | ListLength | ListHead | ListLast | ListIndexed | ListReverse | TextShow | TextReplace | Bool | Optional | Natural | Integer | Double | Text | List | True | False | None | Date | Time | TimeZone deriving (Show) -- | Type-checking constants data Constant = Type | Kind | Sort deriving (Eq, Ord, Show) -- | How to interpret the path to the import data ImportMode = Code -- ^ The default behavior: import the path as code to interpret | RawText -- ^ @as Text@: import the path as raw text | Location -- ^ @as Location@: don't import and instead represent the path -- as a Dhall expression deriving (Show) -- | Where to locate the import data ImportType = Missing -- ^ > missing | Remote URL (Maybe Expression) -- ^ > https://authority directory file using headers | Path FilePrefix File -- ^ > /directory/file -- > ./directory/file -- > ../directory/file -- > ~/directory/file | Env Text -- ^ > env:x deriving (Show) -- | Structured representation of an HTTP(S) URL data URL = URL { scheme :: Scheme , authority :: Text , path :: File , query :: Maybe Text } deriving (Show) -- | The URL scheme data Scheme = HTTP -- ^ > http:\/\/ | HTTPS -- ^ > https:\/\/ deriving (Show) -- | The anchor for a local filepath data FilePrefix = Absolute -- ^ @/@, an absolute path | Here -- ^ @.@, a path relative to the current working directory | Parent -- ^ @..@, a path relative to the parent working directory | Home -- ^ @~@, a path relative to the user's home directory deriving (Show) {-| Structured representation of a file path Note that the directory path components are stored in reverse order, meaning that the path @/foo\/bar\/baz@ is represented as: > File{ directory = [ "bar", "foo" ], file = "baz" } -} data File = File { directory :: [Text] -- ^ Directory path components (in reverse order) , file :: Text -- ^ File name } deriving (Show) ```
Literate Haskell
5
tesaguri/dhall-lang
standard/Syntax.lhs
[ "BSD-3-Clause" ]
/// <include file="Gui.xml" path="doc/WCError/*" /> CLASS WCError INHERIT error /// <include file="Gui.xml" path="doc/WCError.ctor/*" /> CONSTRUCTOR(methodName, className, desc, varName, varnum, lAllowIgnore) LOCAL rsSubSystem AS ResourceString //RvdH 080609 Added call to super:Init to correctly fill the callstack SUPER() rsSubSystem := ResourceString{__WCSLibraryName} subsystem := rsSubSystem:Value IF IsNil(methodName) .AND. IsNil(className) FuncSym := String2Symbol(ProcName(1)) ELSEIF IsNil(className) FuncSym := methodName ELSE FuncSym := String2Symbol(Symbol2String(className) + ":" + Symbol2String(methodName)) ENDIF Default(@desc, __WCSInterfaceError) Default(@lAllowIgnore, TRUE) IF IsString(desc) description := desc ELSE description := ResourceString{desc}:Value ENDIF CanDefault := lAllowIgnore IF !IsNil(varName) .OR. !IsNil(varnum) arg:=AsString(varName) argtype:=UsualType(varName) ENDIF IF !IsNil(varnum) Argnum:=varnum ENDIF args := {} tries := 1 RETURN //RvdH 080814 Not needed. Also in parent class //METHOD Throw() // RETURN Eval(ErrorBlock(), SELF) END CLASS
xBase
4
orangesocks/XSharpPublic
Runtime/VOSDK/Source/VOSDK/GUI_Classes_SDK/WCError.prg
[ "Apache-2.0" ]
>+ Set c1 = 1 >++ Set c2 = 2 < [->+<] Add the value of c1 to c2 and print c2 > ++++++++ ++++++++ ++++++++ ++++++++ ++++++++ ++++++++. > Print c3 which is supposed to be zero ++++++++ ++++++++ ++++++++ ++++++++ ++++++++ ++++++++. [-] [-<+>] Add the value of c3 (which is 0) to c2 <+. Increment c2 and print it again
Brainfuck
3
mikiec84/code-for-blog
2017/bfjit/tests/testcases/movedata0.bf
[ "Unlicense" ]
#N canvas 594 69 562 475 12; #X obj 99 219 metro 500; #X floatatom 84 108 5 0 0 0 - - - 0; #X floatatom 84 274 5 0 0 0 - - - 0; #X obj 99 194 loadbang; #X obj 45 18 sqrt~; #X text 97 20 - signal square root; #X obj 84 158 sqrt~; #X obj 84 246 snapshot~; #X floatatom 84 357 5 0 0 0 - - - 0; #X obj 84 301 t f f; #X obj 84 328 *; #X obj 84 134 sig~; #X text 47 51 sqrt~ takes the approximate square root of the incoming signal \, using a fast \, approximate algorithm which is probably accurate to about 120 dB (20 bits).; #X text 330 397 updated for Pd version 0.47; #X text 66 412 see also:; #X obj 141 401 rsqrt~; #X obj 199 401 sqrt; #X obj 327 304 q8_sqrt~; #X text 394 305 - deprecated; #X text 207 244 An older object \, q8_sqrt~ \, is included in Pd for back compatibility but should probably not be used. It only gives about 8 bit accuracy., f 45; #X obj 242 401 expr~; #X obj 142 430 exp~; #X obj 179 430 log~; #X obj 217 430 pow~; #X text 232 153 DSP on/off; #X obj 214 154 tgl 15 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000 0 1; #X msg 214 179 \; pd dsp \$1; #X text 127 273 result; #X connect 0 0 7 0; #X connect 1 0 11 0; #X connect 2 0 9 0; #X connect 3 0 0 0; #X connect 6 0 7 0; #X connect 7 0 2 0; #X connect 9 0 10 0; #X connect 9 1 10 1; #X connect 10 0 8 0; #X connect 11 0 6 0; #X connect 25 0 26 0;
Pure Data
4
myQwil/pure-data
doc/5.reference/sqrt~-help.pd
[ "TCL" ]
/* Memory map: * https://github.com/qemu/qemu/blob/master/hw/riscv/virt.c * RAM and flash are set to 1MB each. That should be enough for the foreseeable * future. QEMU does not seem to limit the flash/RAM size and in fact doesn't * seem to differentiate between it. */ MEMORY { FLASH_TEXT (rw) : ORIGIN = 0x80000000, LENGTH = 0x100000 RAM (xrw) : ORIGIN = 0x80100000, LENGTH = 0x100000 } _stack_size = 2K; INCLUDE "targets/riscv.ld"
Linker Script
3
ybkimm/tinygo
targets/riscv-qemu.ld
[ "Apache-2.0" ]
# Copyright 2021 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import random import string import base64 import itertools import time import pickle import os from Crypto.Cipher import AES from bitstring import BitArray, Bits from cryptography.hazmat.primitives.kdf.scrypt import Scrypt from pwn import * # This uses the multi-collision implementation by Julia Len https://github.com/julialen/key_multicollision ALL_ZEROS = b'\x00'*16 GCM_BITS_PER_BLOCK = 128 def pad(a): if len(a) < GCM_BITS_PER_BLOCK: diff = GCM_BITS_PER_BLOCK - len(a) zeros = ['0'] * diff a = a + zeros return a def bytes_to_element(val, field, a): bits = BitArray(val) result = field.fetch_int(0) for i in range(len(bits)): if bits[i]: result += a^i return result def multi_collide_gcm(keyset, nonce, tag, first_block=None, use_magma=True): # initialize matrix and vector spaces P.<x> = PolynomialRing(GF(2)) p = x^128 + x^7 + x^2 + x + 1 GFghash.<a> = GF(2^128,'x',modulus=p) if use_magma: t = "p:=IrreducibleLowTermGF2Polynomial(128); GFghash<a> := ext<GF(2) | p>;" magma.eval(t) else: R = PolynomialRing(GFghash, 'x') # encode length as lens if first_block is not None: ctbitlen = (len(keyset) + 1) * GCM_BITS_PER_BLOCK else: ctbitlen = len(keyset) * GCM_BITS_PER_BLOCK adbitlen = 0 lens = (adbitlen << 64) | ctbitlen lens_byte = int(lens).to_bytes(16,byteorder='big') lens_bf = bytes_to_element(lens_byte, GFghash, a) # increment nonce nonce_plus = int((int.from_bytes(nonce,'big') << 32) | 1).to_bytes(16,'big') # encode fixed ciphertext block and tag if first_block is not None: block_bf = bytes_to_element(first_block, GFghash, a) tag_bf = bytes_to_element(tag, GFghash, a) keyset_len = len(keyset) if use_magma: I = [] V = [] else: pairs = [] for k in keyset: # compute H aes = AES.new(k, AES.MODE_ECB) H = aes.encrypt(ALL_ZEROS) h_bf = bytes_to_element(H, GFghash, a) # compute P P = aes.encrypt(nonce_plus) p_bf = bytes_to_element(P, GFghash, a) if first_block is not None: # assign (lens * H) + P + T + (C1 * H^{k+2}) to b b = (lens_bf * h_bf) + p_bf + tag_bf + (block_bf * h_bf^(keyset_len+2)) else: # assign (lens * H) + P + T to b b = (lens_bf * h_bf) + p_bf + tag_bf # get pair (H, b*(H^-2)) y = b * h_bf^-2 if use_magma: I.append(h_bf) V.append(y) else: pairs.append((h_bf, y)) # compute Lagrange interpolation if use_magma: f = magma("Interpolation(%s,%s)" % (I,V)).sage() else: f = R.lagrange_polynomial(pairs) coeffs = f.list() coeffs.reverse() # get ciphertext if first_block is not None: ct = list(map(str, block_bf.polynomial().list())) ct_pad = pad(ct) ct = Bits(bin=''.join(ct_pad)) else: ct = '' for i in range(len(coeffs)): ct_i = list(map(str, coeffs[i].polynomial().list())) ct_pad = pad(ct_i) ct_i = Bits(bin=''.join(ct_pad)) ct += ct_i ct = ct.bytes return ct+tag def get_random_password(length): pw_characters = string.ascii_lowercase return bytes(''.join(random.choice(pw_characters) for i in range(length)), 'UTF-8') def search_for_key(keyset): p.sendline("3") # Decrypt oracle res = p.recvuntil(">>> ") p.sendline(create_query(keyset)) answer = p.recvuntil(">>> ").decode('UTF-8') if "successful" in answer: if len(keyset) == 1: return keyset[0] # Found the correct key low = search_for_key(keyset[:len(keyset)//2]) if low: return low high = search_for_key(keyset[len(keyset)//2:]) if high: return high return None def create_query(keyset): first_block = b'\x01' nonce = b'\x00'*12 tag = b'\x01'*16 ct = multi_collide_gcm(keyset, nonce, tag, first_block=first_block, use_magma=False) b64_nonce = base64.b64encode(nonce).decode() b64_ciphertext = base64.b64encode(ct).decode() return b64_nonce + "," + b64_ciphertext def break_key(key_idx, queries, all_keys, all_passwords): """ Returns the correct password for the key with the given index """ # Set the key p.sendline("1") res = p.recvuntil(">>> ") p.sendline(str(key_idx)) res = p.recvuntil(">>> ") for i in range(len(queries)): p.sendline("3") # Decrypt oracle res = p.recvuntil(">>> ") p.sendline(queries[i]) answer = p.recvuntil(">>> ").decode('UTF-8') if "successful" in answer: # We found the correct query, now do binary search on the smaller keysets keyset_size = len(all_keys) // len(queries) keyset = all_keys[i*keyset_size:(i+1)*keyset_size] low = search_for_key(keyset[:len(keyset)//2]) if low: return all_passwords[all_keys.index(low)] high = search_for_key(keyset[len(keyset)//2:]) if high: return all_passwords[all_keys.index(high)] t0 = time.time() if os.path.isfile('all_passwords') and os.path.isfile('all_keys') and os.path.isfile('queries'): with open("all_passwords", "rb") as f: all_passwords = pickle.load(f) with open("all_keys", "rb") as f: all_keys = pickle.load(f) with open("queries", "rb") as f: queries = pickle.load(f) else: # Create all possible passwords all_passwords = [bytes("".join(password), 'UTF-8') for password in itertools.product(string.ascii_lowercase, repeat=3)] all_keys = [] for password in all_passwords: kdf = Scrypt(salt=b'', length=16, n=2**4, r=8, p=1) all_keys.append(kdf.derive(password)) print("Deriving keys from password done: ", time.time() - t0) queries = [] # Split initial search into 20 queries password_in_single_query = 26**3 // 20 for query in range(20): queries.append(create_query(all_keys[query*password_in_single_query:(query+1)*password_in_single_query])) print("Query created: ", query) with open("all_passwords", "wb") as f: pickle.dump(all_passwords, f) with open("all_keys", "wb") as f: pickle.dump(all_keys, f) with open("queries", "wb") as f: pickle.dump(queries, f) print("Preparing queries done: ", time.time() - t0) p = remote("pythia.2021.ctfcompetition.com", 1337) res = p.recvuntil(">>> ") # Break each key password = break_key(0, queries, all_keys, all_passwords) print("Got first password: ", time.time() - t0) password += break_key(1, queries, all_keys, all_passwords) print("Got second password: ", time.time() - t0) password += break_key(2, queries, all_keys, all_passwords) print("Got third password: ", time.time() - t0) p.sendline("2") res = p.recvuntil(">>> ") p.sendline(password) res = p.recvuntil(">>> ") print(res)
Sage
3
BearerPipelineTest/google-ctf
2021/quals/crypto-pythia/healthcheck/solution.sage
[ "Apache-2.0" ]
DROP TABLE "public"."t4";
SQL
1
gh-oss-contributor/graphql-engine-1
cli/commands/testdata/config-v2-test-project/migrations/1620138169404_create_table_public_t4/down.sql
[ "Apache-2.0", "MIT" ]
.main color: yellow
Stylus
1
johanberonius/parcel
packages/core/integration-tests/test/integration/stylus-glob-import/subdir/main.styl
[ "MIT" ]
concrete DefaultInstance of Default = DefaultBody with (Syntax=SyntaxEng), (DefaultLex = DefaultLexEng);
Grammatical Framework
1
Site-Command/accelerated-text
core/gf/test_grammars/DefaultInstance.gf
[ "Apache-2.0" ]
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"><title>Mongoose Validation v3.5.9</title><link href="http://fonts.googleapis.com/css?family=Anonymous+Pro:400,700|Droid+Sans+Mono|Open+Sans:400,700|Linden+Hill|Quattrocento:400,700|News+Cycle:400,700|Antic+Slab|Cabin+Condensed:400,700" rel="stylesheet" type="text/css"><link href="css/default.css" rel="stylesheet" type="text/css"><link href="css/guide.css" rel="stylesheet" type="text/css"></head><body><a id="forkbanner" href="http://github.com/learnboost/mongoose"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://s3.amazonaws.com/github/ribbons/forkme_right_gray_6d6d6d.png" alt="Fork me on GitHub"></a><div id="links"><div id="header"><h1><a href="../index.html"><div class="mongoose">Mongoose</div></a></h1></div><ul><li class="home"><a href="../index.html">home</a></li><li class="faq"><a href="./faq.html">FAQ</a></li><li class="plugins"><a href="http://plugins.mongoosejs.com">plugins</a></li><li class="changelog"><a href="http://github.com/learnboost/mongoose/tree/master/History.md">change log</a></li><li class="support"><a href="../index.html#support">support</a></li><li class="fork"><a href="http://github.com/learnboost/mongoose">fork</a></li><li class="guide"><a href="./guide.html">guide</a><ul><li class="double"><a href="./guide.html">schemas</a><ul><li class="schematypes"><a href="./schematypes.html"><span>schema</span>types</a></li></ul></li><li><a href="./models.html">models</a></li><li class="double"><a href="./documents.html">documents</a><ul><li class="subdocs"><a href="./subdocs.html">sub docs</a></li></ul></li><li><a href="./queries.html">queries</a></li><li><a href="./validation.html">validation</a></li><li><a href="./middleware.html">middleware</a></li><li><a href="./populate.html">population</a></li><li><a href="./connections.html">connections</a></li><li><a href="./plugins.html">plugins</a></li><li><a href="https://github.com/LearnBoost/mongoose/blob/master/CONTRIBUTING.md">contributing</a></li><li><a href="./migration.html">migrating from 2.x</a></li></ul></li><li class="api"><a href="./api.html">API docs</a></li><li class="quickstart"><a href="./index.html">quick start</a></li><li class="contrib"><a href="http://github.com/learnboost/mongoose/contributors">contributors</a></li><li class="prior"><a href="./prior.html">prior releases</a></li></ul></div><div id="content"><div class="module"><h2>Validation</h2><p>Before we get into the specifics of validation syntax, please keep the following rules in mind:</p> <ul><li>Validation is defined in the <a href="./schematypes.html">SchemaType</a></li><li>Validation is an internal piece of <a href="./middleware.html">middleware</a></li><li>Validation occurs when a document attempts to be <a href="./api.html#model_Model-save">saved</a>, after defaults have been applied</li><li>Validation is asynchronously recursive: when you call <a href="./api.html#model_Model-save">Model#save</a>, sub-document validation is executed. If an error happens, your Model#save callback receives it</li><li>Mongoose doesn&#39;t care about complex error message construction. Errors have type identifiers. For example, <code>&quot;min&quot;</code> is the identifier for the error triggered when a number doesn&#39;t meet the <a href="./api.html#schema_number_SchemaNumber-min">minimum value</a>. The path and value that triggered the error can be accessed in the <code>ValidationError</code> object</li></ul><h3>Built in validators</h3><p>Mongoose has several built in validators.</p> <ul><li>All <a href="./schematypes.html">SchemaTypes</a> have the built in <a href="./api.html#schematype_SchemaType-required">required</a> validator.</li><li><a href="./api.html#schema-number-js">Numbers</a> have <a href="./api.html#schema_number_SchemaNumber-min">min</a> and <a href="./api.html#schema_number_SchemaNumber-max">max</a> validators.</li><li><a href="./api.html#schema-string-js">Strings</a> have <a href="./api.html#schema_string_SchemaString-enum">enum</a> and <a href="./api.html#schema_string_SchemaString-match">match</a> validators.</li></ul><h3>Custom validators</h3><p>Custom validation is declared by passing a validation <code>function</code> and an error type to your <code>SchemaType</code>s validate method. Read the <a href="./api.html#schematype_SchemaType-validate">API</a> docs for details on custom validators, async validators, and more.</p><h3>Validation errors</h3><p>Errors returned after failed validation contain an <code>errors</code> object holding the actual <code>ValidatorErrors</code>. Each <a href="./api.html#errors-validation-js">ValidatorError</a> has a <code>type</code> and <code>path</code> property providing us with a little more error handling flexibility.</p><pre><code class="javascript"><span class="keyword">var</span> toySchema = <span class="keyword">new</span> Schema({ color: String, name: String }); <span class="keyword">var</span> Toy = mongoose.model(<span class="string">'Toy'</span>, toySchema); Toy.schema.path(<span class="string">'color'</span>).validate(<span class="function"><span class="keyword">function</span> <span class="params">(value)</span> {</span> <span class="keyword">return</span> <span class="regexp">/blue|green|white|red|orange|periwinkel/i</span>.test(value); }, <span class="string">'Invalid color'</span>); <span class="keyword">var</span> toy = <span class="keyword">new</span> Toy({ color: <span class="string">'grease'</span>}); toy.save(<span class="function"><span class="keyword">function</span> <span class="params">(err)</span> {</span> <span class="comment">// err.errors.color is a ValidatorError object</span> console.log(err.errors.color.message) <span class="comment">// prints 'Validator "Invalid color" failed for path color'</span> console.log(String(err.errors.color)) <span class="comment">// prints 'Validator "Invalid color" failed for path color'</span> console.log(err.errors.color.type) <span class="comment">// prints "Invalid color"</span> console.log(err.errors.color.path) <span class="comment">// prints "color"</span> console.log(err.name) <span class="comment">// prints "ValidationError"</span> console.log(err.message) <span class="comment">// prints "Validation failed"</span> }); </code></pre><p>After a validation error, the document will also have the same <code>errors</code> property available:</p><pre><code class="javascript">toy.errors.color.message === err.errors.color.message </code></pre><h3 id="next">Next Up</h3><p>Now that we&#39;ve covered <code>validation</code>, let&#39;s take a look at how you might handle advanced validation with Mongooses <a href="/docs/middleware.html">middleware</a>.</p></div></div><script>document.body.className = 'load';</script><script>var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-1122274-9']); _gaq.push(['_trackPageview', location.pathname + location.search + location.hash]); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })();</script></body></html>
HTML
5
gavi-shandler/mongoose
docs/3.5.x/docs/validation.html
[ "MIT" ]
CREATE TABLE INVENTORY ( productId VARCHAR PRIMARY KEY, balance INT ); CREATE TABLE ORDERS ( orderId VARCHAR PRIMARY KEY, productId VARCHAR, amount INT NOT NULL CHECK (amount <= 5) );
SQL
3
DBatOWL/tutorials
atomikos/src/main/resources/schema.sql
[ "MIT" ]
import rightHelixPrime, { run } from "./rightHelixPrime"; export default { rightHelixPrime, run };
JavaScript
1
1shenxi/webpack
test/cases/chunks/import-circle/rightHelix.js
[ "MIT" ]
//tab_size=4 PathFinderState struct #RefType { targetIndex int path List<Node> done bool } PathFinder { find(unit CodeUnit, index int) { s := ref PathFinderState { targetIndex: index, path: new List<Node>{} } checkCodeUnit(s, unit) assert(s.done) return s.path } push(s PathFinderState, a Node) { if !s.done { s.path.add(a) } } pop(s PathFinderState) { if !s.done { s.path.setCountChecked(s.path.count - 1) } } checkAny(s PathFinderState, a Node) { match a { NamespaceDef: checkNamespaceDef(s, a) TypeParams: checkTypeParams(s, a) Attribute: checkAttribute(s, a) FunctionDef: checkFunctionDef(s, a) Param: checkParam(s, a) FieldDef: checkFieldDef(s, a) StaticFieldDef: checkStaticFieldDef(s, a) TaggedPointerOptionDef: checkTaggedPointerOptionDef(s, a) TypeModifierExpression: checkTypeModifierExpression(s, a) TypeArgsExpression: checkTypeArgsExpression(s, a) BlockStatement: checkBlockStatement(s, a) ExpressionStatement: checkExpressionStatement(s, a) ReturnStatement: checkReturnStatement(s, a) BreakStatement: checkBreakStatement(s, a) ContinueStatement: checkContinueStatement(s, a) IfStatement: checkIfStatement(s, a) WhileStatement: checkWhileStatement(s, a) ForEachStatement: checkForEachStatement(s, a) ForIndexStatement: checkForIndexStatement(s, a) MatchStatement: checkMatchStatement(s, a) MatchCase: checkMatchCase(s, a) UnaryOperatorExpression: checkUnaryOperatorExpression(s, a) PostfixUnaryOperatorExpression: checkPostfixUnaryOperatorExpression(s, a) DotExpression: checkDotExpression(s, a) BinaryOperatorExpression: checkBinaryOperatorExpression(s, a) TernaryOperatorExpression: checkTernaryOperatorExpression(s, a) CallExpression: checkCallExpression(s, a) StructInitializerExpression: checkStructInitializerExpression(s, a) FieldInitializerExpression: checkFieldInitializerExpression(s, a) IndexExpression: checkIndexExpression(s, a) ParenExpression: checkParenExpression(s, a) NumberExpression: checkNumberExpression(s, a) StringExpression: checkStringExpression(s, a) Token: checkToken(s, a) } } checkCodeUnit(s PathFinderState, a CodeUnit) { for a.contents { checkAny(s, it) } } checkNamespaceDef(s PathFinderState, a NamespaceDef) { push(s, a) checkToken(s, a.name) if a.typeParams != null { checkTypeParams(s, a.typeParams) } checkToken(s, a.kindToken) if a.attributes != null { checkAttributes(s, a.attributes) } if a.badTokens != null { for a.badTokens { checkToken(s, it) } } checkToken(s, a.openBrace) for a.contents { checkAny(s, it) } checkToken(s, a.closeBrace) pop(s) } checkTypeParams(s PathFinderState, a TypeParams) { push(s, a) checkToken(s, a.openAngleBracket) for a.contents { checkToken(s, it) } checkToken(s, a.closeAngleBracket) pop(s) } checkAttributes(s PathFinderState, a List<Attribute>) { for a { checkAttribute(s, it) } } checkAttribute(s PathFinderState, a Attribute) { push(s, a) checkToken(s, a.hash) checkToken(s, a.name) checkToken(s, a.openParen) if a.contents != null { for a.contents { checkAny(s, it) } } checkToken(s, a.closeParen) pop(s) } checkFunctionDef(s PathFinderState, a FunctionDef) { push(s, a) checkToken(s, a.name) if a.typeParams != null { checkTypeParams(s, a.typeParams) } checkToken(s, a.openParen) for a.paramContents { checkAny(s, it) } checkToken(s, a.closeParen) if a.returnType != null { checkAny(s, a.returnType) } if a.attributes != null { checkAttributes(s, a.attributes) } if a.badTokens != null { for a.badTokens { checkToken(s, it) } } if a.body != null { checkBlockStatement(s, a.body) } pop(s) } checkParam(s PathFinderState, a Param) { push(s, a) checkToken(s, a.name) if a.type != null { checkAny(s, a.type) } if a.attributes != null { checkAttributes(s, a.attributes) } pop(s) } checkFieldDef(s PathFinderState, a FieldDef) { push(s, a) checkToken(s, a.name) if a.type != null { checkAny(s, a.type) } pop(s) } checkStaticFieldDef(s PathFinderState, a StaticFieldDef) { push(s, a) checkToken(s, a.colon) checkToken(s, a.name) if a.type != null { checkAny(s, a.type) } if a.attributes != null { checkAttributes(s, a.attributes) } checkToken(s, a.assign) if a.initializeExpr != null { checkAny(s, a.initializeExpr) } pop(s) } checkTaggedPointerOptionDef(s PathFinderState, a TaggedPointerOptionDef) { push(s, a) checkAny(s, a.type) pop(s) } checkTypeModifierExpression(s PathFinderState, a TypeModifierExpression) { push(s, a) checkToken(s, a.modifier) if a.arg != null { checkAny(s, a.arg) } pop(s) } checkTypeArgsExpression(s PathFinderState, a TypeArgsExpression) { push(s, a) checkAny(s, a.target) checkToken(s, a.openAngleBracket) for a.contents { checkAny(s, it) } checkToken(s, a.closeAngleBracket) pop(s) } checkBlockStatement(s PathFinderState, a BlockStatement) { push(s, a) checkToken(s, a.openBrace) for a.contents { checkAny(s, it) } checkToken(s, a.closeBrace) pop(s) } checkExpressionStatement(s PathFinderState, a ExpressionStatement) { push(s, a) checkAny(s, a.expr) pop(s) } checkReturnStatement(s PathFinderState, a ReturnStatement) { push(s, a) checkToken(s, a.keyword) if a.expr != null { checkAny(s, a.expr) } pop(s) } checkBreakStatement(s PathFinderState, a BreakStatement) { push(s, a) checkToken(s, a.keyword) pop(s) } checkContinueStatement(s PathFinderState, a ContinueStatement) { push(s, a) checkToken(s, a.keyword) pop(s) } checkIfStatement(s PathFinderState, a IfStatement) { push(s, a) checkToken(s, a.ifKeyword) if a.conditionExpr != null { checkAny(s, a.conditionExpr) } if a.badTokens != null { for a.badTokens { checkToken(s, it) } } if a.ifBranch != null { checkBlockStatement(s, a.ifBranch) } checkToken(s, a.elseKeyword) if a.elseBranch != null { checkAny(s, a.elseBranch) } pop(s) } checkWhileStatement(s PathFinderState, a WhileStatement) { push(s, a) checkToken(s, a.keyword) if a.conditionExpr != null { checkAny(s, a.conditionExpr) } if a.badTokens != null { for a.badTokens { checkToken(s, it) } } if a.body != null { checkBlockStatement(s, a.body) } pop(s) } checkForEachStatement(s PathFinderState, a ForEachStatement) { push(s, a) checkToken(s, a.keyword) checkToken(s, a.iteratorVariable) checkToken(s, a.comma) checkToken(s, a.indexIteratorVariable) checkToken(s, a.inKeyword) if a.sequenceExpr != null { checkAny(s, a.sequenceExpr) } if a.badTokens != null { for a.badTokens { checkToken(s, it) } } if a.body != null { checkBlockStatement(s, a.body) } pop(s) } checkForIndexStatement(s PathFinderState, a ForIndexStatement) { push(s, a) checkToken(s, a.keyword) if a.initializeStatement != null { checkExpressionStatement(s, a.initializeStatement) } checkToken(s, a.firstSemicolon) if a.conditionExpr != null { checkAny(s, a.conditionExpr) } checkToken(s, a.secondSemicolon) if a.nextStatement != null { checkAny(s, a.nextStatement) } if a.badTokens != null { for a.badTokens { checkToken(s, it) } } if a.body != null { checkBlockStatement(s, a.body) } pop(s) } checkMatchStatement(s PathFinderState, a MatchStatement) { push(s, a) checkToken(s, a.keyword) if a.expr != null { checkAny(s, a.expr) } if a.badTokens != null { for a.badTokens { checkToken(s, it) } } checkToken(s, a.openBrace) for a.contents { checkAny(s, it) } checkToken(s, a.closeBrace) pop(s) } checkMatchCase(s PathFinderState, a MatchCase) { push(s, a) checkAny(s, a.type) checkToken(s, a.or) checkToken(s, a.secondType) checkToken(s, a.colon) if a.statement != null { checkAny(s, a.statement) } pop(s) } checkUnaryOperatorExpression(s PathFinderState, a UnaryOperatorExpression) { push(s, a) checkToken(s, a.op) if a.expr != null { checkAny(s, a.expr) } pop(s) } checkPostfixUnaryOperatorExpression(s PathFinderState, a PostfixUnaryOperatorExpression) { push(s, a) if a.expr != null { checkAny(s, a.expr) } checkToken(s, a.op) pop(s) } checkDotExpression(s PathFinderState, a DotExpression) { push(s, a) checkAny(s, a.lhs) checkToken(s, a.dot) checkToken(s, a.rhs) pop(s) } checkBinaryOperatorExpression(s PathFinderState, a BinaryOperatorExpression) { push(s, a) checkAny(s, a.lhs) checkToken(s, a.op) if a.rhs != null { checkAny(s, a.rhs) } pop(s) } checkTernaryOperatorExpression(s PathFinderState, a TernaryOperatorExpression) { push(s, a) checkAny(s, a.conditionExpr) checkToken(s, a.question) if a.trueExpr != null { checkAny(s, a.trueExpr) } checkToken(s, a.colon) if a.falseExpr != null { checkAny(s, a.falseExpr) } pop(s) } checkCallExpression(s PathFinderState, a CallExpression) { push(s, a) checkAny(s, a.target) checkToken(s, a.openParen) for a.contents { checkAny(s, it) } checkToken(s, a.closeParen) pop(s) } checkStructInitializerExpression(s PathFinderState, a StructInitializerExpression) { push(s, a) checkAny(s, a.target) checkToken(s, a.openBrace) for a.contents { checkAny(s, it) } checkToken(s, a.closeBrace) pop(s) } checkFieldInitializerExpression(s PathFinderState, a FieldInitializerExpression) { push(s, a) checkToken(s, a.fieldName) checkToken(s, a.colon) if a.expr != null { checkAny(s, a.expr) } pop(s) } checkIndexExpression(s PathFinderState, a IndexExpression) { push(s, a) checkAny(s, a.target) checkToken(s, a.openBracket) if a.arg != null { checkAny(s, a.arg) } checkToken(s, a.closeBracket) pop(s) } checkParenExpression(s PathFinderState, a ParenExpression) { push(s, a) checkToken(s, a.openParen) if a.expr != null { checkAny(s, a.expr) } checkToken(s, a.closeParen) pop(s) } checkNumberExpression(s PathFinderState, a NumberExpression) { push(s, a) checkToken(s, a.token) pop(s) } checkStringExpression(s PathFinderState, a StringExpression) { push(s, a) checkToken(s, a.token) pop(s) } checkToken(s PathFinderState, token Token) { if token == null { return } if token.outerSpan.from <= s.targetIndex && s.targetIndex <= token.outerSpan.to { if s.targetIndex < token.outerSpan.to || (s.targetIndex == token.span.to && token.type == TokenType.identifier) { push(s, token) s.done = true } } } }
mupad
5
jturner/muon
language_server/path_finder.mu
[ "MIT" ]
# Copyright (c) Microsoft Corporation. # Licensed under the MIT License. Describe 'Tests for lossless rehydration of serialized types.' -Tags 'CI' { BeforeAll { $cmdBp = Set-PSBreakpoint -Command Get-Process $varBp = Set-PSBreakpoint -Variable ? $lineBp = Set-PSBreakpoint -Script $PSScriptRoot/PSSerializer.Tests.ps1 -Line 1 function ShouldRehydrateLosslessly { [CmdletBinding()] param( [Parameter(Mandatory, ValueFromPipeline)] [ValidateNotNull()] [System.Management.Automation.Breakpoint] $Breakpoint ) $dehydratedBp = [System.Management.Automation.PSSerializer]::Serialize($Breakpoint) $rehydratedBp = [System.Management.Automation.PSSerializer]::Deserialize($dehydratedBp) foreach ($property in $Breakpoint.PSObject.Properties) { $bpValue = $Breakpoint.$($property.Name) $rehydratedBpValue = $rehydratedBp.$($property.Name) $propertyType = $property.TypeNameOfValue -as [System.Type] if ($null -eq $bpValue) { $rehydratedBpValue | Should -Be $null } elseif ($propertyType.IsValueType) { $bpValue | Should -Be $rehydratedBpValue } elseif ($propertyType -eq [string]) { $bpValue | Should -BeExactly $rehydratedBpValue } else { $bpValue.ToString() | Should -BeExactly $rehydratedBpValue.ToString() } } } } AfterAll { Remove-PSBreakpoint -Breakpoint $cmdBp,$varBp,$lineBp } It 'Losslessly rehydrates command breakpoints' { $cmdBp | ShouldRehydrateLosslessly } It 'Losslessly rehydrates variable breakpoints' { $varBp | ShouldRehydrateLosslessly } It 'Losslessly rehydrates line breakpoints' { $lineBp | ShouldRehydrateLosslessly } }
PowerShell
4
rdtechie/PowerShell
test/powershell/Language/Scripting/PSSerializer.Tests.ps1
[ "MIT" ]
/proc/stalin_sort(list/L, compare=/proc/default_compare) if (L.len == 0) return list() var/list/out = list() var/highest = L[1] for (var/element in L) var/cmp = call(compare)(highest, element) if (cmp <= 0) highest = element; out[++out.len] = element; return out /proc/default_compare(a, b) if (a > b) return 1 if (a < b) return -1 return 0 /proc/main() var/list/L = stalin_sort(list(1, 3, 3, 3, 2, 2, 2, 5, 3, 10, 6, 5)) world.log << json_encode(L) // Boiler plate to get a sane main()-like method. /ZZZ/New() main() shutdown() /var/ZZZ/zzz = new
DM
4
twofist/stalin-sort
DM/stalin_sort.dm
[ "MIT" ]
if (####RATE_LIMITED_PATHS####) { set req.http.Rate-Limit = "1"; set req.http.X-Orig-Method = req.method; set req.hash_ignore_busy = true; if (req.method !~ "^(GET|POST)$") { set req.method = "POST"; } }
VCL
3
andrewkett/fastly-magento2
etc/vcl_snippets_rate_limiting/recv.vcl
[ "BSD-3-Clause" ]
<html> <script> function changeBackground() { const color = location.hash.substr(1); document.body.style.backgroundColor = color; } </script> <body onload='changeBackground()'> </body> </html>
HTML
4
NareshMurthy/playwright
test/assets/background-color.html
[ "Apache-2.0" ]
(* * Copyright 2014, NICTA * * This software may be distributed and modified according to the terms of * the BSD 2-Clause license. Note that NO WARRANTY is provided. * See "LICENSE_BSD2.txt" for details. * * @TAG(NICTA_BSD) *) theory Sep_Cancel imports Sep_Provers Sep_Tactic_Helpers Sep_Cancel_Set begin (* Sep_Cancel performs cancellative elimination of conjuncts *) lemma sep_curry': "\<lbrakk>(P \<and>* F) s; \<And>s. (Q \<and>* P \<and>* F) s \<Longrightarrow> R s\<rbrakk> \<Longrightarrow> (Q \<longrightarrow>* R) s" by (metis (full_types) sep.mult_commute sep_curry) lemma sep_conj_sep_impl_safe: "(P \<longrightarrow>* P') s \<Longrightarrow> (\<And>s. ((P \<longrightarrow>* P') \<and>* Q) s \<Longrightarrow> (Q') s) \<Longrightarrow> (Q \<longrightarrow>* Q') s" by (rule sep_curry) lemma sep_conj_sep_impl_safe': "P s \<Longrightarrow> (\<And>s. (P \<and>* Q) s \<Longrightarrow> (P \<and>* R) s) \<Longrightarrow> (Q \<longrightarrow>* P \<and>* R) s" by (rule sep_curry) lemma sep_wand_lens_simple: "(\<And>s. T s = (Q \<and>* R) s) \<Longrightarrow> (P \<longrightarrow>* T) s \<Longrightarrow> (P \<longrightarrow>* Q \<and>* R) s" by (clarsimp simp: sep_impl_def) schematic_goal schem_impAny: " (?C \<and>* B) s \<Longrightarrow> A s" by (erule sep_mp) ML {* fun sep_cancel_tactic ctxt concl = let val thms = rev (SepCancel_Rules.get ctxt) val tac = assume_tac ctxt ORELSE' eresolve_tac ctxt [@{thm sep_mp}, @{thm sep_conj_empty}, @{thm sep_empty_conj}] ORELSE' sep_erule_tactic ctxt thms val direct_tac = eresolve_tac ctxt thms val safe_sep_wand_tac = rotator' ctxt (resolve0_tac [@{thm sep_wand_lens_simple}]) (eresolve0_tac [@{thm sep_conj_sep_impl_safe'}]) fun sep_cancel_tactic_inner true = sep_erule_full_tac' tac ctxt | sep_cancel_tactic_inner false = sep_erule_full_tac tac ctxt in sep_cancel_tactic_inner concl ORELSE' eresolve_tac ctxt [@{thm sep_curry'}, @{thm sep_conj_sep_impl_safe}, @{thm sep_imp_empty}, @{thm sep_empty_imp'}] ORELSE' safe_sep_wand_tac ORELSE' direct_tac end fun sep_cancel_tactic' ctxt concl = let val sep_cancel = sep_cancel_tactic ctxt in (sep_flatten ctxt THEN_ALL_NEW sep_cancel concl) ORELSE' sep_cancel concl end fun sep_cancel_method (concl,_) ctxt = SIMPLE_METHOD' (sep_cancel_tactic' ctxt concl) val sep_cancel_syntax = Method.sections [Args.add -- Args.colon >> K (Method.modifier SepCancel_Rules.add @{here})]; val sep_cancel_syntax' = Scan.lift (Args.mode "concl") -- sep_cancel_syntax *} method_setup sep_cancel = {* sep_cancel_syntax' >> sep_cancel_method *} {* Simple elimination of conjuncts *} end
Isabelle
5
pirapira/eth-isabelle
sep_algebra/Sep_Cancel.thy
[ "Apache-2.0" ]
@load ./scripts/main @load ./scripts/ssh @load ./scripts/ftp @load ./scripts/flow @load ./scripts/dns @load ./scripts/icmp
Bro
1
evernote/bro-scripts
exfiltration/__load__.bro
[ "BSD-3-Clause" ]
default { state_entry() { llSetStatus(STATUS_PHANTOM,TRUE); llSetTexture("lit_texture", ALL_SIDES); llSetTextureAnim (ANIM_ON | LOOP, ALL_SIDES, 4, 4, 0, 0, 15.0); } }
LSL
3
MandarinkaTasty/OpenSim
bin/assets/ScriptsAssetSet/KanEd-Test15.lsl
[ "BSD-3-Clause" ]
# Check that subprocesses inherit the environment properly. # We run the build in a sandbox in the temp directory to ensure we don't # interact with the source dirs. # # RUN: rm -rf %t.build # RUN: mkdir -p %t.build # RUN: cp %s %t.build/build.ninja # RUN: env EXTRAKEY=foobar %{llbuild} ninja build --jobs 1 --chdir %t.build &> %t1.out # RUN: %{FileCheck} --input-file=%t1.out %s # # CHECK: EXTRAKEY=foobar rule PRINTENV command = env build dummy: PRINTENV
Ninja
4
uraimo/swift-llbuild
tests/Ninja/Build/environment.ninja
[ "Apache-2.0" ]
CREATE DATABASE rowid;
SQL
0
WizardXiao/tidb
br/tests/lightning_tidb_rowid/data/rowid-schema-create.sql
[ "Apache-2.0" ]
import { OverridableStringUnion } from '@mui/types'; /** * ==================================================== * Developer facing types, they can augment these types. * ==================================================== */ export interface PaletteVariant { textColor: string; textHoverBg: string; textActiveBg: string; textDisabledColor: string; outlinedColor: string; outlinedBorder: string; outlinedHoverBg: string; outlinedHoverBorder: string; outlinedActiveBg: string; outlinedDisabledColor: string; outlinedDisabledBorder: string; lightColor: string; lightBg: string; lightHoverBg: string; lightActiveBg: string; lightDisabledColor: string; lightDisabledBg: string; containedColor: string; containedBg: string; containedHoverBg: string; containedActiveBg: string; containedDisabledBg: string; } export interface PaletteRange extends PaletteVariant { 50: string; 100: string; 200: string; 300: string; 400: string; 500: string; 600: string; 700: string; 800: string; 900: string; } export interface PaletteText { primary: string; secondary: string; tertiary: string; } export interface PaletteBackground { body: string; level1: string; level2: string; level3: string; } export interface ColorPalettePropOverrides {} export type DefaultColorPalette = | 'primary' | 'neutral' | 'danger' | 'info' | 'success' | 'warning' | 'context'; export type ColorPaletteProp = OverridableStringUnion< DefaultColorPalette, ColorPalettePropOverrides >; export type ColorPalette = { [k in Exclude<ColorPaletteProp, 'context'>]: PaletteRange; }; export interface Palette extends ColorPalette { text: PaletteText; background: PaletteBackground; focusVisible: string; } export interface ColorSystem { palette: Palette; shadowRing: string; shadowChannel: string; }
TypeScript
4
qwaszx7003/material-ui
packages/mui-joy/src/styles/types/colorSystem.ts
[ "MIT" ]
const std = @import("std"); const expect = std.testing.expect; extern fn common_defined_externally() c_int; extern fn incr_i() void; extern fn add_to_i_and_j(x: c_int) c_int; test "undef shadows common symbol: issue #9937" { try expect(common_defined_externally() == 0); } test "import C common symbols" { incr_i(); const res = add_to_i_and_j(2); try expect(res == 5); }
Zig
4
lukekras/zig
test/standalone/link_common_symbols/main.zig
[ "MIT" ]
<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> <%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <title>File Upload Example</title> </head> <body> <h3>Enter The File to Upload (Single file)</h3> <form:form method="POST" action="/spring-mvc-java/uploadFile" enctype="multipart/form-data"> <table> <tr> <td>Select a file to upload</td> <td><input type="file" name="file" /></td> </tr> <tr> <td><input type="submit" value="Submit" /></td> </tr> </table> </form:form> <br /> <h3>Enter The Files to Upload (Multiple files)</h3> <form:form method="POST" action="/spring-mvc-java/uploadMultiFile" enctype="multipart/form-data"> <table> <tr> <td>Select a file to upload</td> <td><input type="file" name="files" /></td> </tr> <tr> <td>Select a file to upload</td> <td><input type="file" name="files" /></td> </tr> <tr> <td>Select a file to upload</td> <td><input type="file" name="files" /></td> </tr> <tr> <td><input type="submit" value="Submit" /></td> </tr> </table> </form:form> <br /> <h3>Fill the Form and Select a File (<code>@RequestParam</code>)</h3> <form:form method="POST" action="/spring-mvc-java/uploadFileWithAddtionalData" enctype="multipart/form-data"> <table> <tr> <td>Name</td> <td><input type="text" name="name" /></td> </tr> <tr> <td>Email</td> <td><input type="text" name="email" /></td> </tr> <tr> <td>Select a file to upload</td> <td><input type="file" name="file" /></td> </tr> <tr> <td><input type="submit" value="Submit" /></td> </tr> </table> </form:form> <br /> <h3>Fill the Form and Select a File (<code>@ModelAttribute</code>)</h3> <form:form method="POST" action="/spring-mvc-java/uploadFileModelAttribute" enctype="multipart/form-data"> <table> <tr> <td>Name</td> <td><input type="text" name="name" /></td> </tr> <tr> <td>Email</td> <td><input type="text" name="email" /></td> </tr> <tr> <td>Select a file to upload</td> <td><input type="file" name="file" /></td> </tr> <tr> <td><input type="submit" value="Submit" /></td> </tr> </table> </form:form> </body> </html>
Java Server Pages
3
zeesh49/tutorials
spring-mvc-java/src/main/webapp/WEB-INF/view/fileUploadForm.jsp
[ "MIT" ]
POM_ARTIFACT_ID=adapter-guava POM_NAME=Adapter: Guava POM_DESCRIPTION=A Retrofit CallAdapter for Guava's ListenableFuture.
INI
1
MGaetan89/retrofit
retrofit-adapters/guava/gradle.properties
[ "Apache-2.0" ]
"""Test the P1 Monitor config flow.""" from unittest.mock import patch from p1monitor import P1MonitorError from homeassistant.components.p1_monitor.const import DOMAIN from homeassistant.config_entries import SOURCE_USER from homeassistant.const import CONF_HOST, CONF_NAME from homeassistant.core import HomeAssistant from homeassistant.data_entry_flow import RESULT_TYPE_CREATE_ENTRY, RESULT_TYPE_FORM async def test_full_user_flow(hass: HomeAssistant) -> None: """Test the full user configuration flow.""" result = await hass.config_entries.flow.async_init( DOMAIN, context={"source": SOURCE_USER} ) assert result.get("type") == RESULT_TYPE_FORM assert result.get("step_id") == SOURCE_USER assert "flow_id" in result with patch( "homeassistant.components.p1_monitor.config_flow.P1Monitor.smartmeter" ) as mock_p1monitor, patch( "homeassistant.components.p1_monitor.async_setup_entry", return_value=True ) as mock_setup_entry: result2 = await hass.config_entries.flow.async_configure( result["flow_id"], user_input={ CONF_NAME: "Name", CONF_HOST: "example.com", }, ) assert result2.get("type") == RESULT_TYPE_CREATE_ENTRY assert result2.get("title") == "Name" assert result2.get("data") == { CONF_HOST: "example.com", } assert len(mock_setup_entry.mock_calls) == 1 assert len(mock_p1monitor.mock_calls) == 1 async def test_api_error(hass: HomeAssistant) -> None: """Test we handle cannot connect error.""" with patch( "homeassistant.components.p1_monitor.P1Monitor.smartmeter", side_effect=P1MonitorError, ): result = await hass.config_entries.flow.async_init( DOMAIN, context={"source": SOURCE_USER}, data={ CONF_NAME: "Name", CONF_HOST: "example.com", }, ) assert result.get("type") == RESULT_TYPE_FORM assert result.get("errors") == {"base": "cannot_connect"}
Python
5
MrDelik/core
tests/components/p1_monitor/test_config_flow.py
[ "Apache-2.0" ]
module mod integer :: i integer :: x(4) real, dimension(2,3) :: a real, allocatable, dimension(:,:) :: b contains subroutine foo integer :: k k = 1 a(1,2) = a(1,2)+3 end subroutine foo end module mod
FORTRAN
4
13rianlucero/CrabAgePrediction
crabageprediction/venv/Lib/site-packages/numpy/f2py/tests/src/module_data/module_data_docstring.f90
[ "MIT" ]
vector diffeqf(real Any[],vector internal_var___u,vector internal_var___p) { vector[12] internal_var___du; internal_var___du[1] = internal_var___u[1]; internal_var___du[2] = internal_var___u[2]; internal_var___du[3] = internal_var___u[3]; internal_var___du[4] = internal_var___u[4]; internal_var___du[5] = internal_var___u[5]; internal_var___du[6] = internal_var___u[6]; internal_var___du[7] = internal_var___u[7]; internal_var___du[8] = internal_var___u[8]; internal_var___du[9] = internal_var___p[1]; internal_var___du[10] = internal_var___p[2]; internal_var___du[11] = internal_var___p[3]; internal_var___du[12] = internal_var___p[4]; return internal_var___du; }
Stan
2
doppioandante/Symbolics.jl
test/target_functions/matrix.stan
[ "MIT" ]
--TEST-- Bug #73483 (Segmentation fault on pcre_replace_callback) --FILE-- <?php $regex = "#dummy#"; setlocale(LC_ALL, "C"); var_dump(preg_replace_callback($regex, function (array $matches) use($regex) { setlocale(LC_ALL, "en_US"); $ret = preg_replace($regex, "okey", $matches[0]); setlocale(LC_ALL, "C"); return $ret; }, "dummy")); ?> --EXPECT-- string(4) "okey"
PHP
3
thiagooak/php-src
ext/pcre/tests/bug73483.phpt
[ "PHP-3.01" ]
--TEST-- JIT ADD: 001 --INI-- opcache.enable=1 opcache.enable_cli=1 opcache.file_update_protection=0 opcache.jit_buffer_size=32M ;opcache.jit_debug=257 --EXTENSIONS-- opcache --FILE-- <?php function foo($var) { $res = $var + 1; var_dump($res); } foo(1); ?> --EXPECT-- int(2)
PHP
4
NathanFreeman/php-src
ext/opcache/tests/jit/add_001.phpt
[ "PHP-3.01" ]
from django.urls import include, path, re_path from .views import empty_view urlpatterns = [ path('', empty_view, name='named-url1'), re_path(r'^extra/(?P<extra>\w+)/$', empty_view, name='named-url2'), re_path(r'^(?P<one>[0-9]+)|(?P<two>[0-9]+)/$', empty_view), path('included/', include('urlpatterns_reverse.included_named_urls')), ]
Python
4
ni-ning/django
tests/urlpatterns_reverse/named_urls.py
[ "CNRI-Python-GPL-Compatible", "BSD-3-Clause" ]
<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" > <channel> <title>XDA Android &#8211; xda-developers</title> <atom:link href="https://www.xda-developers.com/category/android/feed/" rel="self" type="application/rss+xml" /> <link>https://www.xda-developers.com</link> <description>Android and Windows Phone Development Community</description> <lastBuildDate>Mon, 02 Jul 2018 15:35:15 +0000</lastBuildDate> <language>en-US</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>https://wordpress.org/?v=4.9.6</generator> <item> <title>How to immediately get OxygenOS updates for the OnePlus 6/5T/5/3T/3</title> <link>https://www.xda-developers.com/get-oxygenos-update-oneplus-6-oneplus-5t-oneplus-5-oneplus-3t-oneplus-3/</link> <comments>https://www.xda-developers.com/get-oxygenos-update-oneplus-6-oneplus-5t-oneplus-5-oneplus-3t-oneplus-3/#respond</comments> <pubDate>Sun, 01 Jul 2018 03:00:33 +0000</pubDate> <dc:creator><![CDATA[Arol Wright]]></dc:creator> <category><![CDATA[Featured]]></category> <category><![CDATA[Full XDA]]></category> <category><![CDATA[News]]></category> <category><![CDATA[Tutorials]]></category> <category><![CDATA[XDA Android]]></category> <category><![CDATA[XDA Feature]]></category> <category><![CDATA[android security update]]></category> <category><![CDATA[android security updates]]></category> <category><![CDATA[Android Updates]]></category> <category><![CDATA[How to]]></category> <category><![CDATA[OnePlus 3]]></category> <category><![CDATA[OnePlus 3T]]></category> <category><![CDATA[OnePlus 3T colette edition]]></category> <category><![CDATA[OnePlus 3T Midnight Edition]]></category> <category><![CDATA[OnePlus 5]]></category> <category><![CDATA[oneplus 5t]]></category> <category><![CDATA[oneplus 5t star wars limited edition]]></category> <category><![CDATA[OnePlus 6]]></category> <category><![CDATA[OTA Update]]></category> <category><![CDATA[OxygenOS]]></category> <category><![CDATA[soft gold oneplus 3]]></category> <category><![CDATA[Software update]]></category> <category><![CDATA[software updates]]></category> <category><![CDATA[tutorial]]></category> <category><![CDATA[Update]]></category> <category><![CDATA[updates]]></category> <guid isPermaLink="false">https://www.xda-developers.com/?p=221966</guid> <description><![CDATA[<img width="150" height="150" src="https://www1-lw.xda-cdn.com/files/2018/03/oxygenos-logo-feature-150x150.png" class="webfeedsFeaturedVisual wp-post-image" alt="OxygenOS Open Beta for the OnePlus 5 and OnePlus 5T" style="display: block; margin-bottom: 5px; clear:both;max-width: 100%;" />One of the most annoying parts of over-the-air (OTA) updates is waiting for the update to be delivered on your device. This varies wildly from device to device, and many factors take part while checking if you&#8217;re eligible: your carrier, your OEM, your current Android version, and your actual geographical location/IP, just to name a]]></description> <content:encoded><![CDATA[<img width="150" height="150" src="https://www1-lw.xda-cdn.com/files/2018/03/oxygenos-logo-feature-150x150.png" class="webfeedsFeaturedVisual wp-post-image" alt="OxygenOS Open Beta for the OnePlus 5 and OnePlus 5T" style="display: block; margin-bottom: 5px; clear:both;max-width: 100%;" /><p class="dropcap">One of the most annoying parts of over-the-air (OTA) updates is waiting for the update to be delivered on your device. This varies wildly from device to device, and many factors take part while checking if you&#8217;re eligible: your carrier, your OEM, your current Android version, and your actual geographical location/IP, just to name a few. It&#8217;s particularly annoying when your OEM doesn&#8217;t officially support your country. If you want to skip the wait and immediately get <a href="https://www.xda-developers.com/tag/oxygenos/">OxygenOS</a> updates on your <a href="https://goo.gl/oSh4G9">OnePlus 6</a>, <a href="https://forum.xda-developers.com/oneplus-5t">OnePlus 5T</a>, <a href="https://forum.xda-developers.com/oneplus-5">OnePlus 5</a>, <a href="https://forum.xda-developers.com/oneplus-3t">OnePlus 3T</a>, or <a href="https://forum.xda-developers.com/oneplus-3">OnePlus 3</a>, then you can use the free Oxygen Updater app to do so.</p> <h2>Skipping the line with Oxygen Updater</h2> <p>I live in Caracas, Venezuela, and I currently use a OnePlus 5T as my daily driver. OnePlus doesn&#8217;t officially sell their phones in Venezuela—I had to import mine from the U.S. store and have it shipped to me via a third-party, so OxygenOS updates are sometimes delayed by quite a bit here. I often download update packages with my browser, either from the official OnePlus download section or XDA threads, in order to update my device and then proceed to install it with either <a href="https://www.xda-developers.com/how-to-install-twrp/">TWRP</a> or the Oxygen Recovery.</p> <p>It&#8217;s even worse for other devices made by other manufacturers. Just to cite an example, update rollouts for LG can often take months to roll out from one country to the other. This is pretty common practice in the Android ecosystem. It&#8217;s pretty rare to find a phone that actually receives timely security patches, without counting the <a href="https://forum.xda-developers.com/pixel">Google Pixel</a> phones. OnePlus used to be pretty slow when keeping their phones up to date, but they have picked up the pace recently, especially when it comes to security patches. But actual OTA rollouts still take a while to reach everyone. There&#8217;s a good reason for that, though, and it&#8217;s to ensure that bugs are caught early before the update reaches everyone.</p> <p>If you don&#8217;t want to wait for an update, you can use a VPN to connect to OnePlus&#8217; usual test markets: Germany or Canada. This is exactly what the Oxygen Updater app does for you. Oxygen Updater is a pretty nifty tool that, despite what the name would tell you, is not made by OnePlus or anyone closely related to the company. It&#8217;s instead an unofficial tool which focuses on OnePlus devices like the OnePlus 6, OnePlus 5T, OnePlus 5, OnePlus 3T, and OnePlus 3. The concept is pretty simple: you select your device and the app checks whether an update is available.</p> <a href='https://www1-lw.xda-cdn.com/files/2018/06/Screenshot_20180623-182328.jpg' title="" data-rl_title="" data-rl_caption="" data-rel="lightbox-gallery-1"><img width="512" height="1024" src="https://www1-lw.xda-cdn.com/files/2018/06/Screenshot_20180623-182328-512x1024.jpg" class="attachment-large size-large rl-gallery-link" alt="How to get OxygenOS updates on the OnePlus 6, OnePlus 5T, OnePlus 5, OnePlus 3T, and OnePlus 3" srcset="https://www1-lw.xda-cdn.com/files/2018/06/Screenshot_20180623-182328-512x1024.jpg 512w, https://www1-lw.xda-cdn.com/files/2018/06/Screenshot_20180623-182328-150x300.jpg 150w, https://www1-lw.xda-cdn.com/files/2018/06/Screenshot_20180623-182328.jpg 600w" sizes="(max-width: 512px) 100vw, 512px" /></a> <a href='https://www1-lw.xda-cdn.com/files/2018/06/Screenshot_20180623-182332.jpg' title="" data-rl_title="" data-rl_caption="" data-rel="lightbox-gallery-1"><img width="512" height="1024" src="https://www1-lw.xda-cdn.com/files/2018/06/Screenshot_20180623-182332-512x1024.jpg" class="attachment-large size-large rl-gallery-link" alt="How to get OxygenOS updates on the OnePlus 6, OnePlus 5T, OnePlus 5, OnePlus 3T, and OnePlus 3" srcset="https://www1-lw.xda-cdn.com/files/2018/06/Screenshot_20180623-182332-512x1024.jpg 512w, https://www1-lw.xda-cdn.com/files/2018/06/Screenshot_20180623-182332-150x300.jpg 150w, https://www1-lw.xda-cdn.com/files/2018/06/Screenshot_20180623-182332.jpg 600w" sizes="(max-width: 512px) 100vw, 512px" /></a> <a href='https://www1-lw.xda-cdn.com/files/2018/06/Screenshot_20180623-182338.jpg' title="" data-rl_title="" data-rl_caption="" data-rel="lightbox-gallery-1"><img width="512" height="1024" src="https://www1-lw.xda-cdn.com/files/2018/06/Screenshot_20180623-182338-512x1024.jpg" class="attachment-large size-large rl-gallery-link" alt="How to get OxygenOS updates on the OnePlus 6, OnePlus 5T, OnePlus 5, OnePlus 3T, and OnePlus 3" srcset="https://www1-lw.xda-cdn.com/files/2018/06/Screenshot_20180623-182338-512x1024.jpg 512w, https://www1-lw.xda-cdn.com/files/2018/06/Screenshot_20180623-182338-150x300.jpg 150w, https://www1-lw.xda-cdn.com/files/2018/06/Screenshot_20180623-182338.jpg 600w" sizes="(max-width: 512px) 100vw, 512px" /></a> <p>Oxygen Updater grabs update packages for all currently supported OnePlus devices, including the OnePlus 6, the OnePlus 5/OnePlus 5T, and the OnePlus 3/OnePlus 3T, in both OxygenOS stable and Open Beta channels. It also gives you the option to download partial OTA packages (if you&#8217;re unrooted) and full firmware ZIPs, both of which you can install through your recovery of choice. Furthermore, it skips over OnePlus&#8217; OTA rollouts: if an update exists for your device, you&#8217;ll be able to download said update right away, even if the Update section in your phone says your device is up to date.</p> <a href='https://www1-lw.xda-cdn.com/files/2018/06/Screenshot_20180623-182348.jpg' title="" data-rl_title="" data-rl_caption="" data-rel="lightbox-gallery-2"><img width="512" height="1024" src="https://www1-lw.xda-cdn.com/files/2018/06/Screenshot_20180623-182348-512x1024.jpg" class="attachment-large size-large rl-gallery-link" alt="How to get OxygenOS updates on the OnePlus 6, OnePlus 5T, OnePlus 5, OnePlus 3T, and OnePlus 3" srcset="https://www1-lw.xda-cdn.com/files/2018/06/Screenshot_20180623-182348-512x1024.jpg 512w, https://www1-lw.xda-cdn.com/files/2018/06/Screenshot_20180623-182348-150x300.jpg 150w, https://www1-lw.xda-cdn.com/files/2018/06/Screenshot_20180623-182348.jpg 600w" sizes="(max-width: 512px) 100vw, 512px" /></a> <a href='https://www1-lw.xda-cdn.com/files/2018/06/Screenshot_20180623-182357.jpg' title="" data-rl_title="" data-rl_caption="" data-rel="lightbox-gallery-2"><img width="512" height="1024" src="https://www1-lw.xda-cdn.com/files/2018/06/Screenshot_20180623-182357-512x1024.jpg" class="attachment-large size-large rl-gallery-link" alt="How to get OxygenOS updates on the OnePlus 6, OnePlus 5T, OnePlus 5, OnePlus 3T, and OnePlus 3" srcset="https://www1-lw.xda-cdn.com/files/2018/06/Screenshot_20180623-182357-512x1024.jpg 512w, https://www1-lw.xda-cdn.com/files/2018/06/Screenshot_20180623-182357-150x300.jpg 150w, https://www1-lw.xda-cdn.com/files/2018/06/Screenshot_20180623-182357.jpg 600w" sizes="(max-width: 512px) 100vw, 512px" /></a> <h2>How to get OxygenOS updates on the OnePlus 6/5T/5/3T/3</h2> <p>For all intents and purposes, it&#8217;s just as feature rich as the OxygenOS update manager. Maybe even better. It&#8217;s pretty simple to use, actually:</p> <ol> <li>Download Oxygen Updater from the Google Play Store using the button below.</li> <li>Start the app. It&#8217;ll start on the setup screen, where the app will be configured for your device.</li> <li>Note that the app may check for root access and ask for root permissions. If applicable, then grant it, since it will simply default the update method to &#8220;full update&#8221; instead of partial update otherwise.</li> <li>Follow through the setup until you get to the main screen. If it says your device is up to date, then congrats!</li> <li>If it says an update is available, download it and the update will begin downloading in the background.</li> <li>After it&#8217;s finished, just tap on the notification. The app will follow through the normal update cycle: it&#8217;ll reboot, boot into recovery mode, install, then reboot again.</li> </ol> <p>I found it to be a pretty reliable tool during my own testing. I bumped my OnePlus 5T from Open Beta 8 straight to <a href="https://www.xda-developers.com/oxygenos-open-beta-12-10-oneplus-5-5t/">Open Beta 10</a> in a breeze. As we said before, it&#8217;s also compatible with all devices currently supported by OnePlus, so it&#8217;s definitely something worth checking out if you&#8217;re a OnePlus user. You can download and give Oxygen Updater a shot yourself for free from Google Play.</p> <!-- WP-Appbox (Version: 4.0.53 // Store: googleplay // ID: com.arjanvlek.oxygenupdater) --><p><a target="_blank" rel="nofollow" href="https://play.google.com/store/apps/details?id=com.arjanvlek.oxygenupdater" title="Oxygen Updater">Oxygen Updater (Free<sup>+</sup>, Google Play) →</a></p><!-- /WP-Appbox --> <p class="clear:both;"> ]]></content:encoded> <wfw:commentRss>https://www.xda-developers.com/get-oxygenos-update-oneplus-6-oneplus-5t-oneplus-5-oneplus-3t-oneplus-3/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item> <title>How EAS helps make the Google Pixel the fastest Android phone</title> <link>https://www.xda-developers.com/google-pixel-fastest-android-phone-eas/</link> <comments>https://www.xda-developers.com/google-pixel-fastest-android-phone-eas/#respond</comments> <pubDate>Sat, 30 Jun 2018 14:55:01 +0000</pubDate> <dc:creator><![CDATA[Adam Conway]]></dc:creator> <category><![CDATA[Developments]]></category> <category><![CDATA[Featured]]></category> <category><![CDATA[Full XDA]]></category> <category><![CDATA[News]]></category> <category><![CDATA[XDA Android]]></category> <category><![CDATA[XDA Feature]]></category> <category><![CDATA[benchmark]]></category> <category><![CDATA[benchmarks]]></category> <category><![CDATA[custom kernel]]></category> <category><![CDATA[Custom ROM]]></category> <category><![CDATA[custom ROMs]]></category> <category><![CDATA[customROM]]></category> <category><![CDATA[energy aware scheduling]]></category> <category><![CDATA[Google Pixel]]></category> <category><![CDATA[Google Pixel 2]]></category> <category><![CDATA[google Pixel 2 XL]]></category> <category><![CDATA[Google Pixel XL]]></category> <category><![CDATA[Kernel]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[OnePlus 3]]></category> <category><![CDATA[OnePlus 6]]></category> <category><![CDATA[performance]]></category> <category><![CDATA[Qualcomm Snapdragon 820]]></category> <category><![CDATA[Qualcomm Snapdragon 821]]></category> <category><![CDATA[qualcomm snapdragon 845]]></category> <category><![CDATA[ROM]]></category> <category><![CDATA[ROMs]]></category> <category><![CDATA[snapdragon 820]]></category> <category><![CDATA[snapdragon 821]]></category> <category><![CDATA[speed]]></category> <guid isPermaLink="false">https://www.xda-developers.com/?p=185480</guid> <description><![CDATA[<img width="150" height="150" src="https://www1-lw.xda-cdn.com/files/2018/06/Linux-Tux-Feature-Image-XDA-Orange-150x150.png" class="webfeedsFeaturedVisual wp-post-image" alt="Linux Kernel Energy Aware Scheduling" style="display: block; margin-bottom: 5px; clear:both;max-width: 100%;" />Far back in the past when Linux was just an idea in the mind of Linus Torvalds, CPUs were single-core entities which required an immense amount of energy for little power. The first ever commercially available processor, the Intel 4004, ran at a clock-rate of 740kHz on a single core. Back then, there was no need]]></description> <content:encoded><![CDATA[<img width="150" height="150" src="https://www1-lw.xda-cdn.com/files/2018/06/Linux-Tux-Feature-Image-XDA-Orange-150x150.png" class="webfeedsFeaturedVisual wp-post-image" alt="Linux Kernel Energy Aware Scheduling" style="display: block; margin-bottom: 5px; clear:both;max-width: 100%;" /><p class="dropcap">Far back in the past when Linux was just an idea in the mind of Linus Torvalds, CPUs were single-core entities which required an immense amount of energy for little power. The first ever commercially available processor, the Intel 4004, ran at a clock-rate of 740kHz on a single core. Back then, there was no need for a load scheduler. Load scheduling was reserved for the dual-core &#8220;behemoths&#8221; such as the IBM Power 4 which came out some decades after. These ran at a beastly 1.1GHz to 1.9GHz and required programs and the system to utilize these cores correctly. How did we get from these machines to software algorithms that make use of multiple cores? You may have heard of Energy Aware Scheduling (EAS) on our forums before. It&#8217;s part of the reason why the <a href="https://forum.xda-developers.com/pixel">Google Pixel</a> smartphones perform so well. What&#8217;s so great about EAS and how did we even get to this point? Before we can explain that, we need to talk about Linux load schedulers.</p> <hr /> <h2>The Evolution of the Linux Load Schedulers</h2> <h3>Round-Robin Scheduling</h3> <div id="attachment_185558" style="width: 410px" class="wp-caption alignright"><img class="wp-image-185558" src="https://www1-lw.xda-cdn.com/files/2017/08/RoundRobin-198x300.jpg" alt="" width="400" height="607" srcset="https://www1-lw.xda-cdn.com/files/2017/08/RoundRobin-198x300.jpg 198w, https://www1-lw.xda-cdn.com/files/2017/08/RoundRobin-768x1165.jpg 768w, https://www1-lw.xda-cdn.com/files/2017/08/RoundRobin-675x1024.jpg 675w, https://www1-lw.xda-cdn.com/files/2017/08/RoundRobin.jpg 791w" sizes="(max-width: 400px) 100vw, 400px" /><p class="wp-caption-text">Round Robin Processing. Source: Wikipedia</p></div> <p>Round robin processing is a simple concept to explain and understand, and an even simpler one to grasp its disadvantages. Round-robin uses time slicing to allocate time to each process. Let&#8217;s assume we have four processes running on our computer.</p> <ul> <li>Process A</li> <li>Process B</li> <li>Process C</li> <li>Process D</li> </ul> <p>Now, let&#8217;s do the job of the round-robin scheduler. We will allocate 100 milliseconds (time-slicing) to each process before moving on to the next. This means Process A can take 100 milliseconds to do its processing, then it moves to Process B and so on. If an application&#8217;s job takes 250 milliseconds to do, it will need to go through this process 3 times just to finish its work! Now scale this across different cores, so that Process A and Process B are allocated to core 1, and Process C and Process D are allocated to core 2. This was replaced by O(n) scheduling (which was like round-robin, but using epochs and allowing dynamic allocation of time), then O(1) scheduling (minimized overhead, unlimited process support), then finally the Completely Fair Scheduler (CFS). CFS was merged into the Linux kernel version 2.6.23 in October 2007. It has been overhauled since and is still the default scheduler in Linux systems.</p> <h3>Completely Fair Scheduler</h3> <p>The Completely Fair Scheduler has existed in Android since its inception and is used on non-big.LITTLE devices. It uses an intelligent algorithm to determine processing order, time allocated etc. It is an example of a working implementation of the well-studied scheduling algorithm called &#8220;weighted fair queueing.&#8221; This basically focuses on providing priority to system processes and other high priority processes running on the machine. If it were to run on a big.LITTLE device, all cores would be perceived as equal. This is bad, as low power cores may be forced to run intensive applications, or even worse, the opposite may occur. The decoding for listening to music may be done on the big core, for example, increasing power consumption needlessly. This is why we need a new scheduler for big.LITTLE, one which can actually recognise and utilise the difference in cores in a power efficient manner. That&#8217;s where Heterogeneous Multi-Processing (HMP) comes in, the standard load scheduler most Android phones are running now.</p> <h3>Heterogeneous Multi-Processing</h3> <p>This is the standard load scheduler for any big.LITTLE device released in recent years, other than the Google Pixel. HMP makes use of the big.LITTLE architecture, delegating low priority, less intensive work to the little cores which consume less power. HMP is &#8220;safe&#8221; wherein it knows what should go to the big cores and what should go to the little cores, without making mistakes. It just works and requires a lot less effort to set up on the development side than something like EAS, which we&#8217;ll get into in a moment. HMP is just an extension of CFS to make it power aware.</p> <p>HMP doesn&#8217;t take guesses, nor does it predict future processes. This is good but is why the device cannot be as fluid as those running EAS and is also why it consumes slightly more battery. This, finally, brings us to Energy Aware Scheduling (EAS), which I firmly believe is the future in ROM and kernel development as more OEMs adopt it.</p> <h3>Energy Aware Scheduling</h3> <p>Energy Aware Scheduling (EAS) is the next big thing that users on our forums are talking about. If you use a <a href="https://forum.xda-developers.com/oneplus-3">OnePlus 3</a> (or a Google Pixel, obviously) you&#8217;ve definitely heard about it in the forums. It launched into the mainstream with the Qualcomm <a href="https://www.xda-developers.com/tag/qualcomm-snapdragon-845/">Snapdragon 845</a>, so if you have one of these devices you already have an EAS-enabled smartphone. EAS in the form of kernels such as <a href="https://forum.xda-developers.com/oneplus-3/oneplus-3--3t-cross-device-development/renderzenith-op3-t3803706">RenderZenith</a> and ROMs such as <a href="https://forum.xda-developers.com/oneplus-3/oneplus-3--3t-cross-device-development/rom-kernel-vertexos-blazar-zenith-kernel-t3571781">VertexOS</a> and <a href="https://forum.xda-developers.com/oneplus-3/oneplus-3--3t-cross-device-development/rom-pure-fusion-os-t3654996">PureFusion</a> were taking the OnePlus 3 forums by storm in its prime. Of course, the Google Pixel also comes with EAS. With the promises of improved battery life and better performance, what&#8217;s the catch?</p> <p>Energy Aware Scheduling is not as simple as it is not universal to every device like CFS or HMP. EAS requires an understanding of the processor it is running on, based off of an energy model. These energy models are made by teams of engineers constantly testing and working to give an optimal performance. As the <a href="https://www.xda-developers.com/tag/qualcomm-snapdragon-820/">Snapdragon 820</a> and 821 are basically the same, custom kernels on the OnePlus 3 uses the Google Pixel energy model. Devices with the Snapdragon 845 can utilise EAS, and the <a href="https://goo.gl/oSh4G9">OnePlus 6</a> does to some degree. It&#8217;s not as tuned as a Google Pixel device would be, but it gets the job done. Here&#8217;s an example of how, despite the OnePlus 6 having a better processor with EAS, the <a href="https://forum.xda-developers.com/pixel-2-xl">Pixel 2 XL</a> still beats it in smoothness. Both of these images were taken from our <a href="https://www.xda-developers.com/oneplus-6-speed-gaming-review/">speed-oriented review</a> of the OnePlus 6.</p> <a href='https://www1-lw.xda-cdn.com/files/2018/06/Pixel-2-XL_scrolling_PlayStore_round2-1.png' title="" data-rl_title="" data-rl_caption="" data-rel="lightbox-gallery-3"><img width="900" height="600" src="https://www1-lw.xda-cdn.com/files/2018/06/Pixel-2-XL_scrolling_PlayStore_round2-1-1024x683.png" class="attachment-large size-large rl-gallery-link" alt="" srcset="https://www1-lw.xda-cdn.com/files/2018/06/Pixel-2-XL_scrolling_PlayStore_round2-1-1024x683.png 1024w, https://www1-lw.xda-cdn.com/files/2018/06/Pixel-2-XL_scrolling_PlayStore_round2-1-300x200.png 300w, https://www1-lw.xda-cdn.com/files/2018/06/Pixel-2-XL_scrolling_PlayStore_round2-1-768x512.png 768w, https://www1-lw.xda-cdn.com/files/2018/06/Pixel-2-XL_scrolling_PlayStore_round2-1.png 1200w" sizes="(max-width: 900px) 100vw, 900px" /></a> <a href='https://www1-lw.xda-cdn.com/files/2018/06/ONEPLUS-A6003_scrolling_PlayStore_round2-1.png' title="" data-rl_title="" data-rl_caption="" data-rel="lightbox-gallery-3"><img width="900" height="600" src="https://www1-lw.xda-cdn.com/files/2018/06/ONEPLUS-A6003_scrolling_PlayStore_round2-1-1024x683.png" class="attachment-large size-large rl-gallery-link" alt="" srcset="https://www1-lw.xda-cdn.com/files/2018/06/ONEPLUS-A6003_scrolling_PlayStore_round2-1-1024x683.png 1024w, https://www1-lw.xda-cdn.com/files/2018/06/ONEPLUS-A6003_scrolling_PlayStore_round2-1-300x200.png 300w, https://www1-lw.xda-cdn.com/files/2018/06/ONEPLUS-A6003_scrolling_PlayStore_round2-1-768x512.png 768w, https://www1-lw.xda-cdn.com/files/2018/06/ONEPLUS-A6003_scrolling_PlayStore_round2-1.png 1200w" sizes="(max-width: 900px) 100vw, 900px" /></a> <p>If you have trouble understanding the graphs, you can take a look at the image below for guidance. Anything exceeding the green line indicates dropped frames and, in the worst cases, noticeable stuttering.</p> <p><img class="aligncenter size-large wp-image-220571" src="https://www1-lw.xda-cdn.com/files/2018/06/gpu-profiling-1024x357-1024x357.png" alt="" width="900" height="314" srcset="https://www1-lw.xda-cdn.com/files/2018/06/gpu-profiling-1024x357.png 1024w, https://www1-lw.xda-cdn.com/files/2018/06/gpu-profiling-1024x357-300x105.png 300w, https://www1-lw.xda-cdn.com/files/2018/06/gpu-profiling-1024x357-768x268.png 768w" sizes="(max-width: 900px) 100vw, 900px" /></p> <p>The OnePlus 6 implementation of EAS is interesting, as it doesn&#8217;t appear to be a fully-fledged implementation like you&#8217;d find on a Google Pixel with the same SoC. The scheduler tunables don&#8217;t make much sense either, so that probably explains why it&#8217;s not as performance efficient as you&#8217;d expect. It&#8217;s extremely conservative in power consumption, with the system prioritising the low power cores for the majority of the work.</p> <p>Tunables are simply a set of parameters that are passed to the CPU governor, which changes how the governor reacts to certain situations in terms of frequency. The scheduler then decides where it places tasks on different processors. The OnePlus 6&#8217;s tunables are set to prioritise work on low-powered cores. It also doesn&#8217;t help that the Google Pixel 2 has a huge amount of input boost, keeping all 8 cores online all the time. Google also uses an <a href="https://source.android.com/devices/tech/debug/jank_jitter#interrupt">interrupt balancer</a> which helps to remove frame drops and improve performance.</p> <p>So how does EAS work? Why is it so efficient only in certain conditions?</p> <p>Energy Aware Scheduling introduces the need to use an energy model, and as mentioned above requires a lot of testing and work to make it perfect. EAS attempts to unify three different core parts of the kernel which all act independently, and the energy model helps to unify them.</p> <ul> <li>Linux scheduler (CFS, mentioned above)</li> <li>Linux cpuidle</li> <li>Linux cpufreq</li> </ul> <p>Unifying all 3 parts under the scheduler and calculating them together gives a potential for energy saving, as calculating them together allows them to be as efficient as possible. CPUIdle tries to decide when the CPU should go into an idle mode, while CPUFreq tries to decide when to ramp up or down the CPU. Both of these modules have the primary goal of saving energy. Not only that, it then categorizes processes into four cgroups, being top-app, system-background, foreground, and background. Tasks due to be processed are placed into one of these categories, and then the category is given CPU power and the work is delegated over different CPU cores. top-app is the highest priority of completion, followed by foreground, background, and then system-background. Background technically has the same priority as system-background, but system-background usually also has access to more little cores. In effect, Energy Aware Scheduling is taking core parts of the Linux kernel and unifying it all into one process.</p> <p>When waking the device, EAS will choose the core in the shallowest idle state, minimising the energy needed to wake the device. This helps to reduce the required power in using the device, as it will not wake up the large cluster if it doesn&#8217;t need to. Load tracking is also an extremely crucial part of EAS, and there are two options. &#8220;Per-Entity Load Tracking&#8221; (PELT) is usually used for load tracking, the information is then used to decide frequencies and how to delegate tasks across the CPU. &#8220;Window-Assisted Load Tracking&#8221; (WALT) can also be used and is what&#8217;s used on the Google Pixel. Many EAS ROMs on our forums, such as VertexOS, opt to use WALT. Many ROMs will release two versions of the kernel with WALT or PELT, so it&#8217;s up to the user to decide. WALT is more bursty, with high peaks in CPU frequency while PELT tries to remain more consistent. The load tracker doesn&#8217;t actually affect the CPU frequency, it just tells the system what the CPU usage is at. A higher CPU usage requires a higher frequency and so a consistent trait of PELT is that it causes the CPU frequency to ramp up or down slowly. PELT does tend to stray towards higher CPU load reporting, so it may provide higher performance at a higher battery cost. Nobody can really say at this point in time which load tracking system is better, however, as both load tracking methods are getting continually patched and refined.</p> <p>Either way, it&#8217;s obvious that, regardless of the load tracking method used, there is an increase in efficiency. Rather than just processing tasks on any processor, the task is analyzed and the amount of energy required to run it is estimated. This clever task placement means that tasks get completed in a much more efficient manner while also making the system quicker as a whole. EAS is all about getting the smoothest UI possible with minimal power usage. This is where other external components such as schedtune come into play.</p> <p>Schedtune is defined in each cgroup by two tunables which ensure finer control over the tasks to be completed. It doesn&#8217;t just control the spread out of tasks over multiple CPUs, but also if the perceived load should be inflated in order to ensure time-sensitive tasks are completed quicker. This way, foreground applications and services that the user is availing of won&#8217;t slow down and cause unnecessary performance issues.</p> <p>While Energy Aware Scheduling is the next big thing, it can also be argued it&#8217;s already here and has been for a while. With more and more devices hitting the mainstream with Energy Aware Scheduling, a new age of mobile processing efficiency is here.</p> <h2>The Pros and Cons of Round-Robin, CFS, HMP and EAS</h2> <p>While my graphics skills are sub-par, I have thrown together an image which should summarize what the pros and cons of each of these schedulers are.</p> <p><img class="aligncenter wp-image-221158 size-large" src="https://www1-lw.xda-cdn.com/files/2018/06/schedulers-1024x683.png" alt="" width="900" height="600" srcset="https://www1-lw.xda-cdn.com/files/2018/06/schedulers-1024x683.png 1024w, https://www1-lw.xda-cdn.com/files/2018/06/schedulers-300x200.png 300w, https://www1-lw.xda-cdn.com/files/2018/06/schedulers-768x512.png 768w, https://www1-lw.xda-cdn.com/files/2018/06/schedulers.png 1200w" sizes="(max-width: 900px) 100vw, 900px" /></p> <hr /> <p><em>I would like to extend a special thank you to XDA Recognised Contributor <a href="https://forum.xda-developers.com/member.php?u=5060769">Mostafa Wael</a> whose explanations of various aspects of EAS greatly helped in making this article possible. I would also like to thank XDA Recognised Developer<a href="https://forum.xda-developers.com/member.php?u=6745491"> joshuous</a>, XDA Recognised Developer <a href="https://forum.xda-developers.com/member.php?u=5438598">RenderBroken</a> and <a href="https://forum.xda-developers.com/u11/development/kernel-kirisakura-eas-0-7-energy-aware-t3647471/post73189268">Mostafa Wael for his write up on EAS</a>. For those of you who found interest in EAS-related parts, Linaro has a lot of documentation on EAS which you can read.</em></p> <p class="clear:both;"> ]]></content:encoded> <wfw:commentRss>https://www.xda-developers.com/google-pixel-fastest-android-phone-eas/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item> <title>How to enable YouTube Dark Mode on Android right now (Root)</title> <link>https://www.xda-developers.com/enable-youtube-dark-mode-android/</link> <comments>https://www.xda-developers.com/enable-youtube-dark-mode-android/#respond</comments> <pubDate>Fri, 29 Jun 2018 17:46:56 +0000</pubDate> <dc:creator><![CDATA[Joe Fedewa]]></dc:creator> <category><![CDATA[Mini XDA]]></category> <category><![CDATA[News]]></category> <category><![CDATA[Tutorials]]></category> <category><![CDATA[XDA Android]]></category> <category><![CDATA[Dark Mode]]></category> <category><![CDATA[dark theme]]></category> <category><![CDATA[How to]]></category> <category><![CDATA[tutorial]]></category> <category><![CDATA[Youtube]]></category> <category><![CDATA[YouTube for Android]]></category> <guid isPermaLink="false">https://www.xda-developers.com/?p=211746</guid> <description><![CDATA[<img width="150" height="150" src="https://www1-lw.xda-cdn.com/files/2018/03/youtube-dark-150x150.png" class="webfeedsFeaturedVisual wp-post-image" alt="" style="display: block; margin-bottom: 5px; clear:both;max-width: 100%;" />Google recently added a Dark Mode to the YouTube mobile app (following Dark Mode for the desktop website), but there&#8217;s just one problem: iOS users get it first. Dark Mode is still &#8220;coming soon&#8221; to Android and we&#8217;re not exactly sure how long it will take. The good news is the Android developer community has once]]></description> <content:encoded><![CDATA[<img width="150" height="150" src="https://www1-lw.xda-cdn.com/files/2018/03/youtube-dark-150x150.png" class="webfeedsFeaturedVisual wp-post-image" alt="" style="display: block; margin-bottom: 5px; clear:both;max-width: 100%;" /><p class="dropcap">Google recently <a href="https://www.xda-developers.com/youtube-app-dark-mode-android/">added a Dark Mode to the YouTube mobile app</a> (following Dark Mode for the desktop website), but there&#8217;s just one problem: iOS users get it first. Dark Mode is still &#8220;coming soon&#8221; to Android and we&#8217;re not exactly sure how long it will take. The good news is the Android developer community has once again come through for us. If you have root access on your Android device, you can get Dark Mode in the app right now.</p> <div class="alert_message yellow" style="margin-bottom: 5px"><p><strong>Update 6/29/18</strong>: It has been over 3 months since this article was originally published and the dark theme is still not officially available for Android users. However, the flag to enable dark theme has changed so we have updated this article.</p></div> <a href='https://www1-lw.xda-cdn.com/files/2018/03/IMG_20180313_134247_506.jpg' title="" data-rl_title="" data-rl_caption="" data-rel="lightbox-gallery-4"><img width="576" height="1024" src="https://www1-lw.xda-cdn.com/files/2018/03/IMG_20180313_134247_506-576x1024.jpg" class="attachment-large size-large rl-gallery-link" alt="youtube dark mode" srcset="https://www1-lw.xda-cdn.com/files/2018/03/IMG_20180313_134247_506-576x1024.jpg 576w, https://www1-lw.xda-cdn.com/files/2018/03/IMG_20180313_134247_506-169x300.jpg 169w, https://www1-lw.xda-cdn.com/files/2018/03/IMG_20180313_134247_506.jpg 675w" sizes="(max-width: 576px) 100vw, 576px" /></a> <a href='https://www1-lw.xda-cdn.com/files/2018/03/IMG_20180313_134249_686.jpg' title="" data-rl_title="" data-rl_caption="" data-rel="lightbox-gallery-4"><img width="576" height="1024" src="https://www1-lw.xda-cdn.com/files/2018/03/IMG_20180313_134249_686-576x1024.jpg" class="attachment-large size-large rl-gallery-link" alt="youtube dark mode" srcset="https://www1-lw.xda-cdn.com/files/2018/03/IMG_20180313_134249_686-576x1024.jpg 576w, https://www1-lw.xda-cdn.com/files/2018/03/IMG_20180313_134249_686-169x300.jpg 169w, https://www1-lw.xda-cdn.com/files/2018/03/IMG_20180313_134249_686.jpg 675w" sizes="(max-width: 576px) 100vw, 576px" /></a> <a href='https://www1-lw.xda-cdn.com/files/2018/03/IMG_20180313_134235_205.jpg' title="" data-rl_title="" data-rl_caption="" data-rel="lightbox-gallery-4"><img width="576" height="1024" src="https://www1-lw.xda-cdn.com/files/2018/03/IMG_20180313_134235_205-576x1024.jpg" class="attachment-large size-large rl-gallery-link" alt="youtube dark mode" srcset="https://www1-lw.xda-cdn.com/files/2018/03/IMG_20180313_134235_205-576x1024.jpg 576w, https://www1-lw.xda-cdn.com/files/2018/03/IMG_20180313_134235_205-169x300.jpg 169w, https://www1-lw.xda-cdn.com/files/2018/03/IMG_20180313_134235_205.jpg 675w" sizes="(max-width: 576px) 100vw, 576px" /></a> <a href='https://www1-lw.xda-cdn.com/files/2018/03/YouTube-Dark-Theme-on-Android-4.png' title="" data-rl_title="" data-rl_caption="" data-rel="lightbox-gallery-4"><img width="512" height="1024" src="https://www1-lw.xda-cdn.com/files/2018/03/YouTube-Dark-Theme-on-Android-4-512x1024.png" class="attachment-large size-large rl-gallery-link" alt="YouTube Dark Theme on Android" srcset="https://www1-lw.xda-cdn.com/files/2018/03/YouTube-Dark-Theme-on-Android-4-512x1024.png 512w, https://www1-lw.xda-cdn.com/files/2018/03/YouTube-Dark-Theme-on-Android-4-150x300.png 150w, https://www1-lw.xda-cdn.com/files/2018/03/YouTube-Dark-Theme-on-Android-4.png 600w" sizes="(max-width: 512px) 100vw, 512px" /></a> <a href='https://www1-lw.xda-cdn.com/files/2018/03/YouTube-Dark-Theme-on-Android-5.png' title="" data-rl_title="" data-rl_caption="" data-rel="lightbox-gallery-4"><img width="512" height="1024" src="https://www1-lw.xda-cdn.com/files/2018/03/YouTube-Dark-Theme-on-Android-5-512x1024.png" class="attachment-large size-large rl-gallery-link" alt="YouTube Dark Theme on Android" srcset="https://www1-lw.xda-cdn.com/files/2018/03/YouTube-Dark-Theme-on-Android-5-512x1024.png 512w, https://www1-lw.xda-cdn.com/files/2018/03/YouTube-Dark-Theme-on-Android-5-150x300.png 150w, https://www1-lw.xda-cdn.com/files/2018/03/YouTube-Dark-Theme-on-Android-5.png 600w" sizes="(max-width: 512px) 100vw, 512px" /></a> <p>This method requires modifying a value in the shared preferences folder in the app&#8217;s data folder. That&#8217;s why root access is necessary. If your device is not already rooted, <a href="https://forum.xda-developers.com/top">check out your device&#8217;s forums</a> for instructions. Once you have root access, you will need the Preferences Manager app and, of course, YouTube.</p> <p>Here&#8217;s how to do it:</p> <!-- WP-Appbox (Version: 4.0.53 // Store: googleplay // ID: fr.simon.marquis.preferencesmanager) --><p><a target="_blank" rel="nofollow" href="https://play.google.com/store/apps/details?id=fr.simon.marquis.preferencesmanager" title="Preferences Manager">Preferences Manager (Free, Google Play) →</a></p><!-- /WP-Appbox --> <ol> <li>Install Preferences Manager from the Google Play Store.</li> <li>Find <strong>YouTube</strong> in the list. (If it doesn&#8217;t show up, you may need to enable &#8220;show system apps&#8221; in the menu.)</li> <li>Tap it to open its preferences files.</li> <li>You should be on <strong>youtube.xml</strong>. If not, swipe left/right until you are.</li> <li>Search for <strong>dark</strong></li> <li>Change both values from <strong>false</strong> to <strong>true. </strong> <ul> <li>If you don&#8217;t see the values, add them manually (<strong>app_theme_dark_developer</strong> and <strong>app_dark_theme</strong>) and set them to <strong><strong>true</strong></strong> <a href='https://www1-lw.xda-cdn.com/files/2018/03/YouTube-Dark-Theme-on-Android-2.png' title="" data-rl_title="" data-rl_caption="" data-rel="lightbox-gallery-5"><img width="300" height="226" src="https://www1-lw.xda-cdn.com/files/2018/03/YouTube-Dark-Theme-on-Android-2-300x226.png" class="attachment-medium size-medium rl-gallery-link" alt="YouTube Dark Theme" srcset="https://www1-lw.xda-cdn.com/files/2018/03/YouTube-Dark-Theme-on-Android-2-300x226.png 300w, https://www1-lw.xda-cdn.com/files/2018/03/YouTube-Dark-Theme-on-Android-2-768x578.png 768w, https://www1-lw.xda-cdn.com/files/2018/03/YouTube-Dark-Theme-on-Android-2-1024x771.png 1024w, https://www1-lw.xda-cdn.com/files/2018/03/YouTube-Dark-Theme-on-Android-2.png 1200w" sizes="(max-width: 300px) 100vw, 300px" /></a> <a href='https://www1-lw.xda-cdn.com/files/2018/03/YouTube-Dark-Theme-on-Android-3.png' title="" data-rl_title="" data-rl_caption="" data-rel="lightbox-gallery-5"><img width="300" height="234" src="https://www1-lw.xda-cdn.com/files/2018/03/YouTube-Dark-Theme-on-Android-3-300x234.png" class="attachment-medium size-medium rl-gallery-link" alt="YouTube Dark Theme" srcset="https://www1-lw.xda-cdn.com/files/2018/03/YouTube-Dark-Theme-on-Android-3-300x234.png 300w, https://www1-lw.xda-cdn.com/files/2018/03/YouTube-Dark-Theme-on-Android-3-768x598.png 768w, https://www1-lw.xda-cdn.com/files/2018/03/YouTube-Dark-Theme-on-Android-3-1024x798.png 1024w, https://www1-lw.xda-cdn.com/files/2018/03/YouTube-Dark-Theme-on-Android-3.png 1200w" sizes="(max-width: 300px) 100vw, 300px" /></a> </li> </ul> </li> <li>Save the changes.</li> <li>Force close YouTube.</li> </ol> <p>When you open up the app again it should be in Dark Mode. The app will have a nice dark gray background and white-on-black icons. You can scroll through videos without the blinding white interface. Thanks to XDA member <a href="https://forum.xda-developers.com/member.php?u=4648515">AL_IRAQI</a> for sending in this method and providing screenshots.</p> <!-- WP-Appbox (Version: 4.0.53 // Store: googleplay // ID: com.google.android.youtube) --><p><a target="_blank" rel="nofollow" href="https://play.google.com/store/apps/details?id=com.google.android.youtube" title="YouTube">YouTube (Free, Google Play) →</a></p><!-- /WP-Appbox --> <p class="clear:both;"> ]]></content:encoded> <wfw:commentRss>https://www.xda-developers.com/enable-youtube-dark-mode-android/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item> <title>Honor 10 Mini-Review: Two Months Later</title> <link>https://www.xda-developers.com/honor-10-mini-review-two-months-later/</link> <pubDate>Thu, 28 Jun 2018 15:00:26 +0000</pubDate> <dc:creator><![CDATA[Ronald Comstock]]></dc:creator> <category><![CDATA[Featured]]></category> <category><![CDATA[News]]></category> <category><![CDATA[XDA Android]]></category> <category><![CDATA[XDA Feature]]></category> <category><![CDATA[XDA Mini Reviews]]></category> <category><![CDATA[device review]]></category> <category><![CDATA[Honor]]></category> <category><![CDATA[Honor 10]]></category> <category><![CDATA[XDA Device Review]]></category> <category><![CDATA[XDA Review]]></category> <guid isPermaLink="false">https://www.xda-developers.com/?p=218537</guid> <description><![CDATA[<img width="150" height="150" src="https://www1-lw.xda-cdn.com/files/2018/05/IMG_2811-150x150.jpg" class="webfeedsFeaturedVisual wp-post-image" alt="" style="display: block; margin-bottom: 5px; clear:both;max-width: 100%;" />When Honor launched the Honor 10, they promised a phone that would provide a new AI experience. Bringing the AI technology from the Honor View 10, and the build quality and performance of the Honor 9, we got a polished and complete version of Honor&#8217;s vision for their smartphones. Honor 10 Specs Chipset Kirin 970]]></description> <content:encoded><![CDATA[<img width="150" height="150" src="https://www1-lw.xda-cdn.com/files/2018/05/IMG_2811-150x150.jpg" class="webfeedsFeaturedVisual wp-post-image" alt="" style="display: block; margin-bottom: 5px; clear:both;max-width: 100%;" /><p>When Honor launched the <a href="https://forum.xda-developers.com/honor-10" title="">Honor 10</a>, they promised a phone that would provide a new AI experience. Bringing the AI technology from the <a href="https://forum.xda-developers.com/honor-view-10" title="">Honor View 10</a>, and the build quality and performance of the <a href="https://forum.xda-developers.com/honor-9" title="">Honor 9</a>, we got a polished and complete version of Honor&#8217;s vision for their smartphones.</p> <blockquote><p><span>&ldquo;</span>Introducing #Honor10 with #BeautyInAI. Our incredibly beautiful phone with independent NPU to provide the best AI experience and smart photography.<span>&rdquo;</span></p><footer>@Honorglobal</footer></blockquote> <table class="table_none"> <thead> <tr> <th>Honor 10</th> <th>Specs</th> </tr> </thead> <tbody> <tr> <td>Chipset</td> <td>Kirin 970</td> </tr> <tr> <td>Display</td> <td>1080&#215;2280</td> </tr> <tr> <td>RAM</td> <td>4/6GB</td> </tr> <tr> <td>Storage</td> <td>64/128GB</td> </tr> <tr> <td>Camera</td> <td>18+24MP/24MP AI Camera</td> </tr> <tr> <td>Battery</td> <td>3400mAh</td> </tr> </tbody> </table> <h1>Display</h1> <p>The first thing you&#8217;ll notice about the Honor 10&#8217;s display is the notch. It&#8217;s a small un-intrusive guy that can be switched on and off if you don&#8217;t like it. The display is slightly better than where we saw in the Honor View 10 and Honor 9, which is just fine for this phone. It offers an impressive media experience for photos and videos. This is one of the better non-AMOLED displays that you&#8217;ll find.</p> <div id="attachment_218539" style="width: 1110px" class="wp-caption alignnone"><a href="https://www1-lw.xda-cdn.com/files/2018/05/honor10_1-1.jpg" data-rel="lightbox-image-0" data-rl_title="" data-rl_caption="" title=""><img class="wp-image-218539 size-full" src="https://www1-lw.xda-cdn.com/files/2018/05/honor10_1-1.jpg" alt="" width="1100" height="734" srcset="https://www1-lw.xda-cdn.com/files/2018/05/honor10_1-1.jpg 1100w, https://www1-lw.xda-cdn.com/files/2018/05/honor10_1-1-300x200.jpg 300w, https://www1-lw.xda-cdn.com/files/2018/05/honor10_1-1-768x512.jpg 768w, https://www1-lw.xda-cdn.com/files/2018/05/honor10_1-1-1024x683.jpg 1024w" sizes="(max-width: 1100px) 100vw, 1100px" /></a><p class="wp-caption-text">The Honor 10 with notched display.</p></div> <h1>Camera</h1> <p><iframe src="https://www.youtube.com/embed/ffR3LohQXrE" width="560" height="315" frameborder="0" allowfullscreen="allowfullscreen"></iframe></p> <p>One of the main selling points of the Honor 10 is the AI Camera. This is designed to <a href="https://www.xda-developers.com/honor-10-multi-scene-detection-filters-camera/" title="">use semantic image segmentation</a> to enhance your photos. While the AI mode is definitely an interesting feature, it has received mixed reviews on whether or not is objectively makes the photograph better.</p> <div class="row"><div class="col col_6_of_12"></p> <p><div id="attachment_218137" style="width: 1210px" class="wp-caption alignnone"><a href="https://www1-lw.xda-cdn.com/files/2018/05/honor1_no.jpg" data-rel="lightbox-image-1" data-rl_title="" data-rl_caption="" title=""><img class="size-full wp-image-218137" src="https://www1-lw.xda-cdn.com/files/2018/05/honor1_no.jpg" alt="" width="1200" height="900" srcset="https://www1-lw.xda-cdn.com/files/2018/05/honor1_no.jpg 1200w, https://www1-lw.xda-cdn.com/files/2018/05/honor1_no-300x225.jpg 300w, https://www1-lw.xda-cdn.com/files/2018/05/honor1_no-768x576.jpg 768w, https://www1-lw.xda-cdn.com/files/2018/05/honor1_no-1024x768.jpg 1024w" sizes="(max-width: 1200px) 100vw, 1200px" /></a><p class="wp-caption-text">Honor 10 photo without AI Mode</p></div></p> <p></div><div class="col col_6_of_12"></p> <p><div id="attachment_218136" style="width: 1210px" class="wp-caption alignnone"><a href="https://www1-lw.xda-cdn.com/files/2018/05/honor1_ai.jpg" data-rel="lightbox-image-2" data-rl_title="" data-rl_caption="" title=""><img class="size-full wp-image-218136" src="https://www1-lw.xda-cdn.com/files/2018/05/honor1_ai.jpg" alt="" width="1200" height="900" srcset="https://www1-lw.xda-cdn.com/files/2018/05/honor1_ai.jpg 1200w, https://www1-lw.xda-cdn.com/files/2018/05/honor1_ai-300x225.jpg 300w, https://www1-lw.xda-cdn.com/files/2018/05/honor1_ai-768x576.jpg 768w, https://www1-lw.xda-cdn.com/files/2018/05/honor1_ai-1024x768.jpg 1024w" sizes="(max-width: 1200px) 100vw, 1200px" /></a><p class="wp-caption-text">Honor 10 with AI Mode</p></div></p> <p></div> </div> <p>These photos are a good example of a situation where AI does a great job in enhancing the photo.</p> <div class="row"><div class="col col_6_of_12"></p> <p><div id="attachment_218143" style="width: 1210px" class="wp-caption alignnone"><a href="https://www1-lw.xda-cdn.com/files/2018/05/honor4_no.jpg" data-rel="lightbox-image-3" data-rl_title="" data-rl_caption="" title=""><img class="wp-image-218143 size-full" src="https://www1-lw.xda-cdn.com/files/2018/05/honor4_no.jpg" alt="" width="1200" height="900" srcset="https://www1-lw.xda-cdn.com/files/2018/05/honor4_no.jpg 1200w, https://www1-lw.xda-cdn.com/files/2018/05/honor4_no-300x225.jpg 300w, https://www1-lw.xda-cdn.com/files/2018/05/honor4_no-768x576.jpg 768w, https://www1-lw.xda-cdn.com/files/2018/05/honor4_no-1024x768.jpg 1024w" sizes="(max-width: 1200px) 100vw, 1200px" /></a><p class="wp-caption-text">Honor 10 photo without AI Mode</p></div></p> <p></div><div class="col col_6_of_12"></p> <p><div id="attachment_218142" style="width: 1210px" class="wp-caption alignnone"><a href="https://www1-lw.xda-cdn.com/files/2018/05/honor4_ai.jpg" data-rel="lightbox-image-4" data-rl_title="" data-rl_caption="" title=""><img class="wp-image-218142 size-full" src="https://www1-lw.xda-cdn.com/files/2018/05/honor4_ai.jpg" alt="" width="1200" height="900" srcset="https://www1-lw.xda-cdn.com/files/2018/05/honor4_ai.jpg 1200w, https://www1-lw.xda-cdn.com/files/2018/05/honor4_ai-300x225.jpg 300w, https://www1-lw.xda-cdn.com/files/2018/05/honor4_ai-768x576.jpg 768w, https://www1-lw.xda-cdn.com/files/2018/05/honor4_ai-1024x768.jpg 1024w" sizes="(max-width: 1200px) 100vw, 1200px" /></a><p class="wp-caption-text">Honor 10 with AI Mode</p></div></p> <p></div> </div> <p>These photos received mixed responses from people when <a href="https://twitter.com/XDARoni/status/996519679186227200" title="">I posted them to twitter</a>. Many people preferred the non-AI version. So while the AI is a nice feature to have, it wont perform well it every circumstance. You can toggle AI off after the fact, if you don&#8217;t like the way your picture turned out.</p> <blockquote><p><span>&ldquo;</span>Shoot dynamically and enhance individually with Semantic image segmentation!<span>&rdquo;</span></p><footer>@Honorglobal</footer></blockquote> <p>From my experience with AI mode, it&#8217;s a good feature to have but isn&#8217;t a revolutionary feature in smartphone cameras. This shouldn&#8217;t be a deciding factor in whether or not you buy this phone.</p> <div id="attachment_223159" style="width: 1010px" class="wp-caption alignnone"><a href="https://www1-lw.xda-cdn.com/files/2018/06/Screenshot_20180626-095546.jpg" data-rel="lightbox-image-5" data-rl_title="" data-rl_caption="" title=""><img class="size-full wp-image-223159" src="https://www1-lw.xda-cdn.com/files/2018/06/Screenshot_20180626-095546.jpg" alt="" width="1000" height="526" srcset="https://www1-lw.xda-cdn.com/files/2018/06/Screenshot_20180626-095546.jpg 1000w, https://www1-lw.xda-cdn.com/files/2018/06/Screenshot_20180626-095546-300x158.jpg 300w, https://www1-lw.xda-cdn.com/files/2018/06/Screenshot_20180626-095546-768x404.jpg 768w" sizes="(max-width: 1000px) 100vw, 1000px" /></a><p class="wp-caption-text">Honor 10 Gallery Video Editor</p></div> <p>The Gallery app has many useful tools for editing your videos and photos. Trim your videos and export them at different resolutions. The fast processor in the Honor 10 makes editing media very fast and fluid.</p> <div id="attachment_223165" style="width: 1010px" class="wp-caption alignnone"><a href="https://www1-lw.xda-cdn.com/files/2018/06/Screenshot_20180626-100256.jpg" data-rel="lightbox-image-6" data-rl_title="" data-rl_caption="" title=""><img class="size-full wp-image-223165" src="https://www1-lw.xda-cdn.com/files/2018/06/Screenshot_20180626-100256.jpg" alt="" width="1000" height="527" srcset="https://www1-lw.xda-cdn.com/files/2018/06/Screenshot_20180626-100256.jpg 1000w, https://www1-lw.xda-cdn.com/files/2018/06/Screenshot_20180626-100256-300x158.jpg 300w, https://www1-lw.xda-cdn.com/files/2018/06/Screenshot_20180626-100256-768x405.jpg 768w" sizes="(max-width: 1000px) 100vw, 1000px" /></a><p class="wp-caption-text">Honor 10 Gallery Photo Editing</p></div> <p>In general,the camera is better than any Honor phone we&#8217;ve seen so far. The selfie camera is really good with a 24MP sensor. Portrait mode looks particularly nice. Checkout our full camera review video above to see samples.</p> <h1>Performance</h1> <p>When it comes to speed, this phone is very impressive. The Kirin 970 is the newest Kirin chip featuring the NPU which powers all of the AI features in the Honor 10. There are models with 4 and 6GB of RAM. I tested the 4GB model to find that app were launching faster, the UI was quicker, and the phone was all-around smoother than any previous Honor phone.</p> <p>The battery will easily last you all day and maybe even two days depending on your use. You have several ways to preserve battery with the <em>power saving mode</em>, ultra power saving mode, and adjusting the <em>screen resolution</em>.</p> <div id="attachment_218663" style="width: 1210px" class="wp-caption alignnone"><a href="https://www1-lw.xda-cdn.com/files/2018/05/IMG_2887.jpg" data-rel="lightbox-image-7" data-rl_title="" data-rl_caption="" title=""><img class="wp-image-218663 size-full" src="https://www1-lw.xda-cdn.com/files/2018/05/IMG_2887.jpg" alt="" width="1200" height="800" srcset="https://www1-lw.xda-cdn.com/files/2018/05/IMG_2887.jpg 1200w, https://www1-lw.xda-cdn.com/files/2018/05/IMG_2887-300x200.jpg 300w, https://www1-lw.xda-cdn.com/files/2018/05/IMG_2887-768x512.jpg 768w, https://www1-lw.xda-cdn.com/files/2018/05/IMG_2887-1024x683.jpg 1024w" sizes="(max-width: 1200px) 100vw, 1200px" /></a><p class="wp-caption-text">The Honor 10 scores a 197981 on AnTuTu benchmark</p></div> <p><a href="https://youtu.be/X6zIVOdU1ys" data-rel="lightbox-video-0" title="">See how the Honor 10 stacks up against the Honor View 10.</a></p> <div class="row"><div class="col col_4_of_12"></p> <p><div id="attachment_223197" style="width: 495px" class="wp-caption alignnone"><a href="https://www1-lw.xda-cdn.com/files/2018/06/Screenshot_20180626-103958.jpg" data-rel="lightbox-image-8" data-rl_title="" data-rl_caption="" title=""><img class="wp-image-223197 size-large" src="https://www1-lw.xda-cdn.com/files/2018/06/Screenshot_20180626-103958-485x1024.jpg" alt="" width="485" height="1024" srcset="https://www1-lw.xda-cdn.com/files/2018/06/Screenshot_20180626-103958-485x1024.jpg 485w, https://www1-lw.xda-cdn.com/files/2018/06/Screenshot_20180626-103958-142x300.jpg 142w, https://www1-lw.xda-cdn.com/files/2018/06/Screenshot_20180626-103958.jpg 568w" sizes="(max-width: 485px) 100vw, 485px" /></a><p class="wp-caption-text">AnTuTu HTML5 Test</p></div></p> <p></div><div class="col col_4_of_12"></p> <p><div id="attachment_223198" style="width: 495px" class="wp-caption alignnone"><a href="https://www1-lw.xda-cdn.com/files/2018/06/Screenshot_20180626-103716.jpg" data-rel="lightbox-image-9" data-rl_title="" data-rl_caption="" title=""><img class="wp-image-223198 size-large" src="https://www1-lw.xda-cdn.com/files/2018/06/Screenshot_20180626-103716-485x1024.jpg" alt="" width="485" height="1024" srcset="https://www1-lw.xda-cdn.com/files/2018/06/Screenshot_20180626-103716-485x1024.jpg 485w, https://www1-lw.xda-cdn.com/files/2018/06/Screenshot_20180626-103716-142x300.jpg 142w, https://www1-lw.xda-cdn.com/files/2018/06/Screenshot_20180626-103716.jpg 568w" sizes="(max-width: 485px) 100vw, 485px" /></a><p class="wp-caption-text">GPU, UX and Memory Scores from AnTuTu</p></div></p> <p></div><div class="col col_4_of_12"></p> <p><div id="attachment_223200" style="width: 495px" class="wp-caption alignnone"><a href="https://www1-lw.xda-cdn.com/files/2018/06/Screenshot_20180626-103653.jpg" data-rel="lightbox-image-10" data-rl_title="" data-rl_caption="" title=""><img class="wp-image-223200 size-large" src="https://www1-lw.xda-cdn.com/files/2018/06/Screenshot_20180626-103653-485x1024.jpg" alt="" width="485" height="1024" srcset="https://www1-lw.xda-cdn.com/files/2018/06/Screenshot_20180626-103653-485x1024.jpg 485w, https://www1-lw.xda-cdn.com/files/2018/06/Screenshot_20180626-103653-142x300.jpg 142w, https://www1-lw.xda-cdn.com/files/2018/06/Screenshot_20180626-103653.jpg 568w" sizes="(max-width: 485px) 100vw, 485px" /></a><p class="wp-caption-text">197981 Benchmark Score from AnTuTu</p></div></p> <p></div></div> <h2 style="padding-left: 30px;"><a href="https://www.xda-developers.com/tag/emui/" title="">EMUI</a> 8.1</h2> <p><a href="https://www1-lw.xda-cdn.com/files/2018/06/IMG_2986.jpg" data-rel="lightbox-image-11" data-rl_title="" data-rl_caption="" title=""><img class="alignnone size-full wp-image-223206" src="https://www1-lw.xda-cdn.com/files/2018/06/IMG_2986.jpg" alt="" width="1000" height="338" srcset="https://www1-lw.xda-cdn.com/files/2018/06/IMG_2986.jpg 1000w, https://www1-lw.xda-cdn.com/files/2018/06/IMG_2986-300x101.jpg 300w, https://www1-lw.xda-cdn.com/files/2018/06/IMG_2986-768x260.jpg 768w" sizes="(max-width: 1000px) 100vw, 1000px" /></a></p> <p style="padding-left: 30px;">The Honor 10 ships with the latest EMUI update, bringing the UI to version 8.1. This is the most stock-like version of EMUI that we have seen. A lot of the old ugly icons and UI elements have been replaced. The useful stuff has remained and been improved, lik the built in screen recorder, the camera app, and the very underrated health app.</p> <p style="padding-left: 30px;">EMUI is not without its problems though. The settings menu is baffling and difficult to navigate. The EMUI theme engine has always been a disappointment, features ugly themes and very little customization beyond a slightly modified icons pack, and a background image. Then there&#8217;s some strange bloatware, like a mirror app that simple activates your front facing camera. So EMUI, while getting better, still have some room for improvement.</p> <div class="row"><div class="col col_4_of_12"></p> <p><div id="attachment_218667" style="width: 578px" class="wp-caption alignnone"><a href="https://www1-lw.xda-cdn.com/files/2018/05/emui1.jpg" data-rel="lightbox-image-12" data-rl_title="" data-rl_caption="" title=""><img class="wp-image-218667 size-full" src="https://www1-lw.xda-cdn.com/files/2018/05/emui1.jpg" alt="" width="568" height="1200" srcset="https://www1-lw.xda-cdn.com/files/2018/05/emui1.jpg 568w, https://www1-lw.xda-cdn.com/files/2018/05/emui1-142x300.jpg 142w, https://www1-lw.xda-cdn.com/files/2018/05/emui1-485x1024.jpg 485w" sizes="(max-width: 568px) 100vw, 568px" /></a><p class="wp-caption-text">EMUI 8.1 Homescreen</p></div></p> <p></div><div class="col col_4_of_12"></p> <p><div id="attachment_218668" style="width: 578px" class="wp-caption alignnone"><a href="https://www1-lw.xda-cdn.com/files/2018/05/emui2.jpg" data-rel="lightbox-image-13" data-rl_title="" data-rl_caption="" title=""><img class="wp-image-218668 size-full" src="https://www1-lw.xda-cdn.com/files/2018/05/emui2.jpg" alt="" width="568" height="1200" srcset="https://www1-lw.xda-cdn.com/files/2018/05/emui2.jpg 568w, https://www1-lw.xda-cdn.com/files/2018/05/emui2-142x300.jpg 142w, https://www1-lw.xda-cdn.com/files/2018/05/emui2-485x1024.jpg 485w" sizes="(max-width: 568px) 100vw, 568px" /></a><p class="wp-caption-text">EMUI 8.1 App Drawer</p></div></p> <p></div><div class="col col_4_of_12"></p> <p><div id="attachment_218669" style="width: 578px" class="wp-caption alignnone"><a href="https://www1-lw.xda-cdn.com/files/2018/05/emui3.jpg" data-rel="lightbox-image-14" data-rl_title="" data-rl_caption="" title=""><img class="size-full wp-image-218669" src="https://www1-lw.xda-cdn.com/files/2018/05/emui3.jpg" alt="" width="568" height="1200" srcset="https://www1-lw.xda-cdn.com/files/2018/05/emui3.jpg 568w, https://www1-lw.xda-cdn.com/files/2018/05/emui3-142x300.jpg 142w, https://www1-lw.xda-cdn.com/files/2018/05/emui3-485x1024.jpg 485w" sizes="(max-width: 568px) 100vw, 568px" /></a><p class="wp-caption-text">EMUI 8.1 Settings Menu</p></div></p> <p></div></div> <h1>Design</h1> <p>Since the <a href="https://forum.xda-developers.com/honor-8" title="">Honor 8</a>, Honor has proven that build quality is a main focus of their flagship line. The iconic light-catching material that makes up the back of the phone appears once again in the Honor 10, this time branded as the <em>aurora glass design</em>. The design looks best on their newest color called <em>Phantom Green</em>, where the light reflections will reveal several different colors beneath the glass surface.</p> <div id="attachment_218673" style="width: 1089px" class="wp-caption alignnone"><a href="https://www1-lw.xda-cdn.com/files/2018/05/Honor-10.jpg" data-rel="lightbox-image-15" data-rl_title="" data-rl_caption="" title=""><img class="wp-image-218673 size-full" src="https://www1-lw.xda-cdn.com/files/2018/05/Honor-10.jpg" alt="" width="1079" height="462" srcset="https://www1-lw.xda-cdn.com/files/2018/05/Honor-10.jpg 1079w, https://www1-lw.xda-cdn.com/files/2018/05/Honor-10-300x128.jpg 300w, https://www1-lw.xda-cdn.com/files/2018/05/Honor-10-768x329.jpg 768w, https://www1-lw.xda-cdn.com/files/2018/05/Honor-10-1024x438.jpg 1024w" sizes="(max-width: 1079px) 100vw, 1079px" /></a><p class="wp-caption-text">The Honor 10 with Aurora Glass Design.</p></div> <p>&nbsp;</p> <div id="attachment_223186" style="width: 910px" class="wp-caption alignnone"><a href="https://www1-lw.xda-cdn.com/files/2018/06/IMG_2983.jpg" data-rel="lightbox-image-16" data-rl_title="" data-rl_caption="" title=""><img class="wp-image-223186 size-large" src="https://www1-lw.xda-cdn.com/files/2018/06/IMG_2983-1024x683.jpg" alt="" width="900" height="600" srcset="https://www1-lw.xda-cdn.com/files/2018/06/IMG_2983-1024x683.jpg 1024w, https://www1-lw.xda-cdn.com/files/2018/06/IMG_2983-300x200.jpg 300w, https://www1-lw.xda-cdn.com/files/2018/06/IMG_2983-768x512.jpg 768w, https://www1-lw.xda-cdn.com/files/2018/06/IMG_2983.jpg 1080w" sizes="(max-width: 900px) 100vw, 900px" /></a><p class="wp-caption-text">The Dual Lens AI Camera on the Honor 10</p></div> <p>&nbsp;</p> <div id="attachment_223185" style="width: 910px" class="wp-caption alignnone"><a href="https://www1-lw.xda-cdn.com/files/2018/06/IMG_2984.jpg" data-rel="lightbox-image-17" data-rl_title="" data-rl_caption="" title=""><img class="wp-image-223185 size-large" src="https://www1-lw.xda-cdn.com/files/2018/06/IMG_2984-1024x683.jpg" alt="" width="900" height="600" srcset="https://www1-lw.xda-cdn.com/files/2018/06/IMG_2984-1024x683.jpg 1024w, https://www1-lw.xda-cdn.com/files/2018/06/IMG_2984-300x200.jpg 300w, https://www1-lw.xda-cdn.com/files/2018/06/IMG_2984-768x512.jpg 768w, https://www1-lw.xda-cdn.com/files/2018/06/IMG_2984.jpg 1080w" sizes="(max-width: 900px) 100vw, 900px" /></a><p class="wp-caption-text">Honor 10 Notch on the Top of the Display</p></div> <p>&nbsp;</p> <div id="attachment_223183" style="width: 910px" class="wp-caption alignnone"><a href="https://www1-lw.xda-cdn.com/files/2018/06/IMG_2985.jpg" data-rel="lightbox-image-18" data-rl_title="" data-rl_caption="" title=""><img class="wp-image-223183 size-large" src="https://www1-lw.xda-cdn.com/files/2018/06/IMG_2985-1024x683.jpg" alt="" width="900" height="600" srcset="https://www1-lw.xda-cdn.com/files/2018/06/IMG_2985-1024x683.jpg 1024w, https://www1-lw.xda-cdn.com/files/2018/06/IMG_2985-300x200.jpg 300w, https://www1-lw.xda-cdn.com/files/2018/06/IMG_2985-768x512.jpg 768w, https://www1-lw.xda-cdn.com/files/2018/06/IMG_2985.jpg 1080w" sizes="(max-width: 900px) 100vw, 900px" /></a><p class="wp-caption-text">Honor 10 in Black with Aurora Design</p></div> <p>&nbsp;</p> <h1>Conclusion</h1> <p>Having spent two weeks using the Honor 10 as my primary phone, I&#8217;ve realized that I like the phone regardless of its AI features. While the AI is fun to play around with, if it was removed from the phone, my experience wouldn&#8217;t change much. If you&#8217;re looking for this phone to have a revolutionary AI experience, you&#8217;re not going to find it. What you will find is a beautiful phone with shockingly good performance and a crazy low price starting at £399.99.</p> <p>Join the discussions about the Honor 10 in the XDA Forums.</p> <p><a href="https://www.hihonor.com/global/products/mobile-phones/honor10/index.html" class="btn btn_default" target="_self" style="background-color:#b70900; color:#ffffff;">HiHonor Website</a><a href="https://forum.xda-developers.com/honor-10" class="btn btn_default" target="_self" style="background-color:#b70900; color:#ffffff;">Honor 10 Forums</a></p> <p class="clear:both;"> ]]></content:encoded> </item> <item> <title>Developers are facing huge drop in new installs after Play Store algorithm changes</title> <link>https://www.xda-developers.com/developers-huge-drop-new-installs-play-store-algorithm-changes/</link> <comments>https://www.xda-developers.com/developers-huge-drop-new-installs-play-store-algorithm-changes/#respond</comments> <pubDate>Wed, 27 Jun 2018 22:12:25 +0000</pubDate> <dc:creator><![CDATA[Mishaal Rahman]]></dc:creator> <category><![CDATA[Developments]]></category> <category><![CDATA[Full XDA]]></category> <category><![CDATA[News]]></category> <category><![CDATA[XDA Android]]></category> <category><![CDATA[XDA Feature]]></category> <category><![CDATA[android apps]]></category> <category><![CDATA[app development]]></category> <category><![CDATA[application]]></category> <category><![CDATA[Applications]]></category> <category><![CDATA[apps]]></category> <category><![CDATA[develop]]></category> <category><![CDATA[developer]]></category> <category><![CDATA[developer console]]></category> <category><![CDATA[developers]]></category> <category><![CDATA[Games]]></category> <category><![CDATA[Google Play Games]]></category> <category><![CDATA[Google Play Store]]></category> <category><![CDATA[play developer console]]></category> <category><![CDATA[Play Games]]></category> <category><![CDATA[play store]]></category> <guid isPermaLink="false">https://www.xda-developers.com/?p=223557</guid> <description><![CDATA[<img width="150" height="150" src="https://www1-lw.xda-cdn.com/files/2018/06/play-store-drop-150x150.png" class="webfeedsFeaturedVisual wp-post-image" alt="Google Play Store drop" style="display: block; margin-bottom: 5px; clear:both;max-width: 100%;" />Some Android app and game developers are panicking because their daily installation rates have plummeted in the past week. These developers have noticed new downloads slow down by up to 90%. The affected developers quickly realized they were not alone in these changes to their day-to-day app installation rate with multiple threads on Reddit, a]]></description> <content:encoded><![CDATA[<img width="150" height="150" src="https://www1-lw.xda-cdn.com/files/2018/06/play-store-drop-150x150.png" class="webfeedsFeaturedVisual wp-post-image" alt="Google Play Store drop" style="display: block; margin-bottom: 5px; clear:both;max-width: 100%;" /><p class="dropcap">Some Android app and game developers are panicking because their daily installation rates have plummeted in the past week. These developers <a href="https://www.reddit.com/r/androiddev/comments/8ubsre/significant_drop_in_downloads_since_june_20_many/">have noticed</a> new downloads slow down by up to 90%. The affected developers quickly realized they were not alone in these changes to their day-to-day app installation rate with <a href="https://www.reddit.com/r/androiddev/comments/8tp666/sudden_decrease_in_organic_downloads/">multiple</a> <a href="https://www.reddit.com/r/androiddev/comments/8tgzhj/drastic_drop_in_downloads_in_all_of_my_apps/">threads</a> <a href="https://www.reddit.com/r/androiddev/comments/8t935n/huge_drop_in_downloads_over_the_past_48_hours/">on</a> <a href="https://www.reddit.com/r/androiddev/comments/8t8u7z/my_app_is_suddenly_dying_on_the_play_store/">Reddit</a>, a post on the <a href="https://forum.unity.com/threads/sudden-drop-in-number-of-daily-installs-on-google-play-store.537467/">Unity forums</a>, and even a <a href="https://www.gamasutra.com/blogs/VladChetrusca/20180626/320734/Thousands_of_indie_android_devs_on_the_brink_of_extinction_after_Play_store_changes_visibility_algorithm_rules.php">Gamasutra community blog post</a> popping up to help spread the word that something was amiss. Clearly, something is wrong here, and some indie developers are concerned that their livelihood may be at stake. So what&#8217;s going on?</p> <hr /> <h2>Play Store&#8217;s Algorithm Quietly Changes, Tanking Some Apps&#8217; Rankings</h2> <p>It appears that sometime last week, Google tweaked the Play Store&#8217;s algorithm that determines app discovery. When we reached out to Google about the matter, we were told that Google is regularly evaluating new ways to improve the Play Store&#8217;s ranking algorithms to promote high-quality applications. We would like to stress that there is <strong>no evidence that Google is altering the algorithm to intentionally harm indie developers in favor of big-name apps</strong> (despite rampant speculation otherwise). The changes are aimed at improving the experience for both users and developers alike.</p> <p>We do not have any details on exactly <em>how</em> the algorithm was changed (which makes sense, as disclosing that information would give an unfair advantage to certain developers) but it&#8217;s clear that the changes are making a significant impact on some independent developers.</p> <p>Here&#8217;s just one example of many:</p> <div id="attachment_223561" style="width: 799px" class="wp-caption aligncenter"><img class="wp-image-223561 size-full" src="https://www1-lw.xda-cdn.com/files/2018/06/PickCrafter-Download-Stats.png" alt="Google Play Store Algorithm Changes" width="789" height="422" srcset="https://www1-lw.xda-cdn.com/files/2018/06/PickCrafter-Download-Stats.png 789w, https://www1-lw.xda-cdn.com/files/2018/06/PickCrafter-Download-Stats-300x160.png 300w, https://www1-lw.xda-cdn.com/files/2018/06/PickCrafter-Download-Stats-768x411.png 768w" sizes="(max-width: 789px) 100vw, 789px" /><p class="wp-caption-text">PickCrafter daily installation statistics</p></div> <p>The screenshot shown above is from the Developer Console statistics for a game called &#8220;PickCrafter.&#8221; The developer graciously shared their Play Store installation metrics with us to demonstrate the issue. As you can see, the app hovered around 3,000-4,500 daily installs until the past week when the rate dipped into the low 1,000s.</p> <!-- WP-Appbox (Version: 4.0.53 // Store: googleplay // ID: com.fiveamp.pickcrafterapp) --><p><a target="_blank" rel="nofollow" href="https://play.google.com/store/apps/details?id=com.fiveamp.pickcrafterapp" title="PickCrafter - Idle Crafting Game">PickCrafter - Idle Crafting Game (Free<sup>+</sup>, Google Play) →</a></p><!-- /WP-Appbox --> <p>This developer isn&#8217;t alone by any means. We&#8217;ve heard numerous anecdotes from independent developers over on a dedicated <a href="https://www.xda-developers.com/official-xda-developers-discord-server/">Discord</a> group <a href="https://discord.gg/5Hny2Xy">for the issue</a>. They all told us the same story &#8211; starting last week their app&#8217;s daily installation numbers tanked and haven&#8217;t recovered since. Although most of the affected apps appear to be Android games, several non-gaming apps have also been affected. We do not have any details on how many games versus non-games are affected.</p> <p>Here&#8217;s a brief summary of how hard some developers have been hit by the algorithm changes:</p> <ul> <li>Developer peanutbutterlabs reports that their daily downloads dipped to <strong>5,000 from an average of 80,000</strong> per day.</li> <li>Developer Butterbean21 reports an <strong>80% drop</strong> in their top-performing apps.</li> <li>Developer Jenzo83 reports an <strong>80-90% drop</strong> for their games.</li> <li>Developer snoutup reports their rates dropped by &#8220;only&#8221; <strong>70%</strong>.</li> <li>Developer llliorrr reports an <strong>80% drop</strong> for 28 out of their 30 apps.</li> <li>Developer AxPetre reports a drop in installation rates from <strong>12,000/day to 5,000/day</strong>.</li> <li>Developer slothinspace reports a drop from <strong>1,500+ downloads to 100+</strong>.</li> <li>Developer janikkk reports an <strong>80% drop</strong>.</li> <li>Developer zenderfile reports a drop from <strong>12,000/day to 1,500/day</strong>.</li> <li>Developer livenets reports a drop from <strong>32,000/day to 4,000/day</strong>.</li> </ul> <p>And here are some additional screenshots that show a significant drop in installation numbers, courtesy of Redditor <a href="https://www.reddit.com/user/alpha724">alpha724</a>.</p> <a href='https://www1-lw.xda-cdn.com/files/2018/06/Play-Store-Install-Drop-1.png' title="" data-rl_title="" data-rl_caption="" data-rel="lightbox-gallery-6"><img width="900" height="422" src="https://www1-lw.xda-cdn.com/files/2018/06/Play-Store-Install-Drop-1.png" class="attachment-large size-large rl-gallery-link" alt="Google Play Store Algorithm Changes" srcset="https://www1-lw.xda-cdn.com/files/2018/06/Play-Store-Install-Drop-1.png 980w, https://www1-lw.xda-cdn.com/files/2018/06/Play-Store-Install-Drop-1-300x141.png 300w, https://www1-lw.xda-cdn.com/files/2018/06/Play-Store-Install-Drop-1-768x360.png 768w" sizes="(max-width: 900px) 100vw, 900px" /></a> <a href='https://www1-lw.xda-cdn.com/files/2018/06/Play-Store-Install-Drop-2.png' title="" data-rl_title="" data-rl_caption="" data-rel="lightbox-gallery-6"><img width="900" height="421" src="https://www1-lw.xda-cdn.com/files/2018/06/Play-Store-Install-Drop-2.png" class="attachment-large size-large rl-gallery-link" alt="Google Play Store Algorithm Changes" srcset="https://www1-lw.xda-cdn.com/files/2018/06/Play-Store-Install-Drop-2.png 977w, https://www1-lw.xda-cdn.com/files/2018/06/Play-Store-Install-Drop-2-300x140.png 300w, https://www1-lw.xda-cdn.com/files/2018/06/Play-Store-Install-Drop-2-768x359.png 768w" sizes="(max-width: 900px) 100vw, 900px" /></a> <a href='https://www1-lw.xda-cdn.com/files/2018/06/Play-Store-Install-Drop-3.png' title="" data-rl_title="" data-rl_caption="" data-rel="lightbox-gallery-6"><img width="900" height="422" src="https://www1-lw.xda-cdn.com/files/2018/06/Play-Store-Install-Drop-3.png" class="attachment-large size-large rl-gallery-link" alt="Google Play Store Algorithm Changes" srcset="https://www1-lw.xda-cdn.com/files/2018/06/Play-Store-Install-Drop-3.png 979w, https://www1-lw.xda-cdn.com/files/2018/06/Play-Store-Install-Drop-3-300x141.png 300w, https://www1-lw.xda-cdn.com/files/2018/06/Play-Store-Install-Drop-3-768x360.png 768w" sizes="(max-width: 900px) 100vw, 900px" /></a> <p>For what it&#8217;s worth, <em>XDA-Developers</em>&#8216;s very own <a href="https://play.google.com/store/apps/details?id=com.xda.nobar">Navigation Gestures</a> app has been unaffected by these changes. However, we&#8217;re fortunate in that we would be able to survive a change in the algorithm affecting our rankings &#8211; after all, we have a strong following on the Portal, our <a href="https://www.youtube.com/user/xdadevelopers/videos">YouTube channel</a>, our <a href="https://twitter.com/xdadevelopers">Twitter account</a>, etc through which we can promote the app. Independent developers who rely on organic growth via the Play Store don&#8217;t have access to such an audience without spending significant income on advertising, so these affected developers are worried that the changes may harm their apps&#8217; success. Developers that rely on ad views for income are especially concerned with the changes since their revenue is directly dependent on the number of ad impressions they get.</p> <h2>What May Have Caused These Drastic Drops In Numbers?</h2> <p>Developers on the Unity forums have eliminated several possibilities behind the changes, including inaccurate installs reported on the Play Developer Console, issues identified through Android vitals, search rankings, summer exams, and the FIFA World Cup. One possible cause behind the issue that has been identified (and which we can confirm) is a mismatch between an app&#8217;s category, description, and content with the apps shown on the &#8220;Similar Apps&#8221; panel. As you can see below, a game called &#8220;Kids Cash Register Grocery Free&#8221; has a rather odd assortment of &#8220;Similar&#8221; apps shown for it.</p> <p><img class="aligncenter size-large wp-image-223566" src="https://www1-lw.xda-cdn.com/files/2018/06/Play-Store-Similar-Apps-Mismatch-1024x829.png" alt="Play Store" width="900" height="729" srcset="https://www1-lw.xda-cdn.com/files/2018/06/Play-Store-Similar-Apps-Mismatch-1024x829.png 1024w, https://www1-lw.xda-cdn.com/files/2018/06/Play-Store-Similar-Apps-Mismatch-300x243.png 300w, https://www1-lw.xda-cdn.com/files/2018/06/Play-Store-Similar-Apps-Mismatch-768x622.png 768w, https://www1-lw.xda-cdn.com/files/2018/06/Play-Store-Similar-Apps-Mismatch.png 1063w" sizes="(max-width: 900px) 100vw, 900px" /></p> <p>Likewise, another issue seems to be that certain categories aren&#8217;t loading for desktop users in certain countries. For instance, the &#8220;<a href="https://play.google.com/store/apps/category/GAME_CASINO">Casino Games</a>&#8221; category fails to load for me and several others in the United States and Canada when browsing the Google Play Store on desktop Google Chrome. However, the category does load appropriately on mobile devices and the Play Store accessed from a <a href="https://www.xda-developers.com/tag/chromebook/">Chromebook</a>. <strong>We doubt that this particular issue is contributing significantly to the drop in numbers</strong> that developers are experiencing, but it&#8217;s certainly one possibility.</p> <h2>What Actions Developers Can Take</h2> <p>We do not know if the changes are permanent. Regardless, this should be a clear wake-up call for indie developers that any slight change in the Play Store&#8217;s ranking algorithm can significantly impact your app&#8217;s success. Developers are encouraged to proactively improve their app&#8217;s quality. Google has published recommendations on how to do so on the <a href="https://android-developers.googleblog.com/2017/08/how-were-helping-people-find-quality.html" target="_blank" rel="noopener" data-saferedirecturl="https://www.google.com/url?hl=en&amp;q=https://android-developers.googleblog.com/2017/08/how-were-helping-people-find-quality.html&amp;source=gmail&amp;ust=1530217104081000&amp;usg=AFQjCNG_h926nQOYyAYlrK3mh76h1AN5dg">Android Developers Blog</a> and <a href="https://developer.android.com/docs/quality-guidelines/" target="_blank" rel="noopener" data-saferedirecturl="https://www.google.com/url?hl=en&amp;q=https://developer.android.com/docs/quality-guidelines/&amp;source=gmail&amp;ust=1530217104081000&amp;usg=AFQjCNEKBnWG2zuKjdZl85nZnXTCBsJo4Q">Quality Guidelines documentation page</a>. If Google tweaks the algorithm again or makes a public statement on the matter, we&#8217;ll be sure to let you all know.</p> <p class="clear:both;"> ]]></content:encoded> <wfw:commentRss>https://www.xda-developers.com/developers-huge-drop-new-installs-play-store-algorithm-changes/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item> <title>YouTube picture-in-picture rolling out more widely in the US for non-Red/Premium users</title> <link>https://www.xda-developers.com/youtube-picture-in-picture-rolling-out-us-non-red-premium-users/</link> <comments>https://www.xda-developers.com/youtube-picture-in-picture-rolling-out-us-non-red-premium-users/#respond</comments> <pubDate>Tue, 26 Jun 2018 15:55:50 +0000</pubDate> <dc:creator><![CDATA[George Burduli]]></dc:creator> <category><![CDATA[Mini XDA]]></category> <category><![CDATA[News]]></category> <category><![CDATA[XDA Android]]></category> <category><![CDATA[picture-in-picture]]></category> <category><![CDATA[Youtube]]></category> <category><![CDATA[YouTube for Android]]></category> <guid isPermaLink="false">https://www.xda-developers.com/?p=223146</guid> <description><![CDATA[<img width="150" height="150" src="https://www1-lw.xda-cdn.com/files/2018/06/youtube-dark-150x150.png" class="webfeedsFeaturedVisual wp-post-image" alt="carstream android auto youtube" style="display: block; margin-bottom: 5px; clear:both;max-width: 100%;" />Google added picture-in-picture mode support for Android smartphones back in 2017 with the release of Android Oreo. For a long time, only the premium version of YouTube (be it YouTube Red or YouTube Premium) supported the feature, which means you had to pay for it. Last month, some people started noticing that the feature was]]></description> <content:encoded><![CDATA[<img width="150" height="150" src="https://www1-lw.xda-cdn.com/files/2018/06/youtube-dark-150x150.png" class="webfeedsFeaturedVisual wp-post-image" alt="carstream android auto youtube" style="display: block; margin-bottom: 5px; clear:both;max-width: 100%;" /><p class="dropcap">Google added picture-in-picture mode support for Android smartphones back in 2017 with the release of <a href="https://www.xda-developers.com/tag/android-oreo/">Android Oreo</a>. For a long time, only the premium version of YouTube (be it YouTube Red or YouTube Premium) supported the feature, which means you had to pay for it. Last month, <a href="https://www.xda-developers.com/youtube-picture-in-picture-without-youtube-red/">some people started noticing that the feature was available for them</a> even though they weren&#8217;t using a paid service. Today, we&#8217;ve noticed that PiP for YouTube is rolling out more widely.</p> <p>Some of our own writers noted that picture-in-picture mode started working for them today, though we should note that only our writers located in the United States could confirm that PiP was working. It&#8217;s common practice for Google to gradually roll out some features, and it seems that picture-in-picture mode support is definitely one of them. From the looks of it, the feature is rolling out via a server-side switch as our writers with the feature noted that they&#8217;re using different versions of the application.</p> <p><img class="aligncenter wp-image-223148 size-large" src="https://www1-lw.xda-cdn.com/files/2018/06/Screenshot_20180626-101810-512x1024.png" alt="" width="512" height="1024" srcset="https://www1-lw.xda-cdn.com/files/2018/06/Screenshot_20180626-101810-512x1024.png 512w, https://www1-lw.xda-cdn.com/files/2018/06/Screenshot_20180626-101810-150x300.png 150w, https://www1-lw.xda-cdn.com/files/2018/06/Screenshot_20180626-101810.png 600w" sizes="(max-width: 512px) 100vw, 512px" /></p> <p>A toggle for the picture-in-picture mode feature also appeared in the YouTube settings. It comes with a little instruction about how to use the feature. You can test it pretty easily. After making sure that you&#8217;ve toggled picture-in-picture mode in both the YouTube app and system settings, just open up a video and tap on the home button. If you don&#8217;t see the PiP toggle in YouTube&#8217;s settings, that means that you haven&#8217;t received the feature yet.</p> <p><img class="aligncenter size-medium wp-image-223150" src="https://www1-lw.xda-cdn.com/files/2018/06/Screenshot_20180626-101734-300x88.png" alt="" width="300" height="88" srcset="https://www1-lw.xda-cdn.com/files/2018/06/Screenshot_20180626-101734-300x88.png 300w, https://www1-lw.xda-cdn.com/files/2018/06/Screenshot_20180626-101734-768x225.png 768w, https://www1-lw.xda-cdn.com/files/2018/06/Screenshot_20180626-101734-1024x300.png 1024w, https://www1-lw.xda-cdn.com/files/2018/06/Screenshot_20180626-101734.png 1200w" sizes="(max-width: 300px) 100vw, 300px" /></p> <p>Please keep in mind that the uploader of the video can restrict access to picture-in-picture mode (which is why most music videos don&#8217;t work). As expected, PiP doesn&#8217;t work with most music videos. But, it&#8217;s great for watching <a href="https://www.youtube.com/user/xdadevelopers">informative XDA videos</a> and other non-music related content.</p> <p class="clear:both;"> ]]></content:encoded> <wfw:commentRss>https://www.xda-developers.com/youtube-picture-in-picture-rolling-out-us-non-red-premium-users/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item> <title>3 Samsung Galaxy S10 models may launch w/ one having triple cameras</title> <link>https://www.xda-developers.com/3-samsung-galaxy-s10-models-may-launch-w-one-having-triple-cameras/</link> <comments>https://www.xda-developers.com/3-samsung-galaxy-s10-models-may-launch-w-one-having-triple-cameras/#respond</comments> <pubDate>Tue, 26 Jun 2018 03:30:52 +0000</pubDate> <dc:creator><![CDATA[Doug Lynch]]></dc:creator> <category><![CDATA[Full XDA]]></category> <category><![CDATA[News]]></category> <category><![CDATA[XDA Android]]></category> <category><![CDATA[Samsung]]></category> <category><![CDATA[Samsung Galaxy S10]]></category> <guid isPermaLink="false">https://www.xda-developers.com/?p=221754</guid> <description><![CDATA[<img width="150" height="150" src="https://www1-lw.xda-cdn.com/files/2018/05/samsung-update-firmware-150x150.png" class="webfeedsFeaturedVisual wp-post-image" alt="" style="display: block; margin-bottom: 5px; clear:both;max-width: 100%;" />We haven&#8217;t even made it to the release of the Samsung Galaxy Note 9 which is scheduled for later this year and there have already been a number of rumors for the company&#8217;s next Galaxy S series. Rumors have suggested the upcoming flagship from Samsung will have an in-display fingerprint scanner (which, to be fair, has]]></description> <content:encoded><![CDATA[<img width="150" height="150" src="https://www1-lw.xda-cdn.com/files/2018/05/samsung-update-firmware-150x150.png" class="webfeedsFeaturedVisual wp-post-image" alt="" style="display: block; margin-bottom: 5px; clear:both;max-width: 100%;" /><p class="dropcap">We haven&#8217;t even made it to the release of the Samsung Galaxy Note 9 which is scheduled for later this year and there have already been a number of rumors for the company&#8217;s next Galaxy S series. Rumors have suggested the upcoming flagship from Samsung will <a href="https://www.xda-developers.com/samsung-galaxy-s10-in-display-fingerprint-scanner/" target="_blank" rel="noopener">have an in-display fingerprint scanner</a> (which, to be fair, has been speculated about since the ill-fated Samsung <a href="https://forum.xda-developers.com/note-7">Galaxy Note 7</a>), <a href="https://www.xda-developers.com/samsung-galaxy-s10-triple-rear-cameras/" target="_blank" rel="noopener">three cameras on the back</a>, and <a href="https://www.xda-developers.com/samsung-galaxy-s10-lg-g8-sound-emitting-oled/" target="_blank" rel="noopener">a sound-emitting OLED display</a> to replace the earpiece speaker. Here&#8217;s another rumor to add to that list: The Samsung Galaxy S10 will come in three variants with the biggest one having the previously rumored triple rear cameras. Also, the latest Samsung flagship may be equipped with UFS 3.0 storage chips and LPDDR5 RAM.</p> <p>There has been talk about the Galaxy S10 having three cameras for a few weeks now but now the notable Chinese publication <a href="http://www.etnews.com/20180625000323?mc=em_001_00001"><em>ETNews</em></a> (via @<a href="https://twitter.com/UniverseIce/status/1011166911323766784">UniverseIce</a>) corroborated this rumor and added further details about the Samsung Galaxy S10 variants and some of their features. If true, it looks as if Samsung will be selling three different variants of their 2019 flagship smartphone. The regular device is said to have a 5.8&#8243; display and come equipped with 1 rear camera. Then we have the middle version which will have a 5.8&#8243; display as well but this one will come with 2 rear cameras. Finally, the third model of the Samsung Galaxy S10 will have a big 6.2&#8243; display with 3 rear cameras. In summary:</p> <ul> <li>5.8&#8243; Samsung Galaxy S10 with 1 Rear Camera</li> <li>5.8&#8243; Samsung Galaxy S10 with 2 Rear Cameras</li> <li>6.2&#8243; Samsung Galaxy S10 with 3 Rear Cameras</li> </ul> <p>Having a smartphone with three rear cameras isn&#8217;t something that everyone will be taking advantage of to its full extent. On the other hand, the storage performance is something that&#8217;ll affect everyone&#8217;s experiences. <a href="https://twitter.com/UniverseIce/status/1007122927400075266">According to @UniverseIce</a>, a notable leaker of Samsung products, the Galaxy S10 will have UFS 3.0 flash storage and LPDDR5 RAM. The addition of UFS 3.0 is a benefit that everyone will see as it will impact application and game launch times, document/image/video creation, and much more. Samsung has also been preparing for mass production of LPDDR5 mobile RAM, so we expect to see performance improvements throughout the OS as well. The timeline has things laid out where Samsung could very well implement them into their first 2019 flagship smartphone.</p> <div id="attachment_223045" style="width: 857px" class="wp-caption aligncenter"><img class="wp-image-223045 size-full" src="https://www1-lw.xda-cdn.com/files/2018/06/UFS-2.1-vs-3.0.png" alt="UFS 2.1 vs 3.0" width="847" height="273" srcset="https://www1-lw.xda-cdn.com/files/2018/06/UFS-2.1-vs-3.0.png 847w, https://www1-lw.xda-cdn.com/files/2018/06/UFS-2.1-vs-3.0-300x97.png 300w, https://www1-lw.xda-cdn.com/files/2018/06/UFS-2.1-vs-3.0-768x248.png 768w" sizes="(max-width: 847px) 100vw, 847px" /><p class="wp-caption-text">Source: <a href="https://en.wikipedia.org/wiki/Universal_Flash_Storage#Version_comparison">Wikipedia</a></p></div> <p>Just what is UFS? It stands for the Universal Flash Storage standard that debuted in 2011 with version 1.0 and it aims to bring higher data transfer speed and increased reliability to flash memory storage. Over time we have seen this specification updated from version 1.0, to 1.1, to 2.0, then 2.1 and now to version 3.0. UFS 2.0 and 2.1 had a maximum bandwidth limit of 600 MB/s per lane so its two lanes allowed it to hit a theoretical max of 1,200 MB/s. Version 3.0 of the UFS specification was announced and published back in January of this year and promises faster transfer limits, lower power usage, and a number of new features which are mainly suited for the automotive industry. With UFS 3.0 the specification shows that these storage chips will be able to hit a theoretical maximum of 1,450 MB/s per lane and with it also supporting 2 lanes this means it can go as high as 2,900 MB/s.</p> <p>Android&#8217;s storage benchmark scores have fallen behind the competition so this update to flash storage should help to narrow the gap. Ice Universe says that Samsung will begin mass producing both UFS 3.0 chips as well as LPDDR5 RAM chips in the second half of this year which implies that the Galaxy S10 will benefit from these new technologies.</p> <p class="clear:both;"> ]]></content:encoded> <wfw:commentRss>https://www.xda-developers.com/3-samsung-galaxy-s10-models-may-launch-w-one-having-triple-cameras/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item> <title>LineageOS 15.1 now supports A/B devices starting with the Motorola Moto Z2 Force</title> <link>https://www.xda-developers.com/lineageos-15-1-supports-a-b-devices-moto-z2-force/</link> <comments>https://www.xda-developers.com/lineageos-15-1-supports-a-b-devices-moto-z2-force/#respond</comments> <pubDate>Mon, 25 Jun 2018 15:42:00 +0000</pubDate> <dc:creator><![CDATA[Aamir Siddiqui]]></dc:creator> <category><![CDATA[Developments]]></category> <category><![CDATA[Featured]]></category> <category><![CDATA[Mini XDA]]></category> <category><![CDATA[News]]></category> <category><![CDATA[XDA Android]]></category> <category><![CDATA[XDA Feature]]></category> <category><![CDATA[Essential PH-1]]></category> <category><![CDATA[Essential Phone]]></category> <category><![CDATA[Google Pixel]]></category> <category><![CDATA[Google Pixel 2]]></category> <category><![CDATA[google Pixel 2 XL]]></category> <category><![CDATA[Google Pixel XL]]></category> <category><![CDATA[lineageos]]></category> <category><![CDATA[LineageOS 15]]></category> <category><![CDATA[moto z2 force]]></category> <category><![CDATA[Motorola Moto Z2 Force]]></category> <category><![CDATA[Seamless System Update]]></category> <category><![CDATA[seamless update]]></category> <category><![CDATA[Xiaomi Mi A1]]></category> <guid isPermaLink="false">https://www.xda-developers.com/?p=222294</guid> <description><![CDATA[<img width="150" height="150" src="https://www1-lw.xda-cdn.com/files/2018/05/LineageOS-15.1-1-1-1-150x150.png" class="webfeedsFeaturedVisual wp-post-image" alt="lineageos 15.1 android go" style="display: block; margin-bottom: 5px; clear:both;max-width: 100%;" />One of the more exciting changes that Android Nougat 7.0 brought was the introduction of A/B dual partition scheme for devices launched with this OS version. This change tackled how Android system updates are applied to devices, with the aim to provide a seamless upgrade experience to the user where a simple and quick reboot]]></description> <content:encoded><![CDATA[<img width="150" height="150" src="https://www1-lw.xda-cdn.com/files/2018/05/LineageOS-15.1-1-1-1-150x150.png" class="webfeedsFeaturedVisual wp-post-image" alt="lineageos 15.1 android go" style="display: block; margin-bottom: 5px; clear:both;max-width: 100%;" /><p class="dropcap">One of the more exciting changes that <a href="https://www.xda-developers.com/tag/android-nougat/">Android Nougat</a> 7.0 brought was the introduction of A/B dual partition scheme for devices launched with this OS version. This change tackled how Android system updates are applied to devices, with the aim to provide a seamless upgrade experience to the user where a simple and quick reboot brings them into the updated OS. This change also added the benefit of a failsafe which ensured that at least one workable booting system remains on the device during an OTA update, allowing devices to &#8220;rollback&#8221; to the older system if an OTA fails to boot.</p> <p>Unfortunately, not every device that has received <a href="https://www.xda-developers.com/tag/android-nougat/">Android 7.0</a> supports this A/B dual partition scheme. This A/B partition scheme is mostly seen on devices that originally shipped with Android Nougat 7.0+, as updating a device to Nougat and then supporting this change would require a repartitioning, which was considered a risky proposition by many OEMs. <a href="https://www.xda-developers.com/list-android-devices-seamless-updates/">Here is a list of devices</a> that support A/B seamless updates. Alternatively, you can also <a href="https://www.xda-developers.com/how-to-check-android-device-supports-seamless-updates/">manually check whether your device supports seamless updates</a>.</p> <p>While the A/B dual partition scheme is largely well received, it did pose a challenge for the custom ROM community. <a href="https://source.android.com/devices/tech/ota/ab/ab_implement">A/B devices did not come with a recovery partition</a> as the Android system did not have a need for these partitions, so the community had to adapt its ways. <a href="https://www.xda-developers.com/twrp-v3-1-0-is-now-rolling-out-with-support-for-adb-backup-ab-ota-zips-and-more/">TWRP v3.1.0 was released with support for A/B devices</a>, while <a href="https://www.xda-developers.com/magisk-14-1-official-google-pixel-support/">Magisk brought support for A/B devices with version 14.1</a>.</p> <p>Now, <a href="https://www.xda-developers.com/tag/lineageos/">LineageOS</a> 15.1 is adding in support for A/B devices. Support was delayed on 15.1 as the <a href="https://www.xda-developers.com/lineageos-15-1-changelog-reader-mode-chrome-home-jelly-network-restrictions/">LineageOS team was working to fix their addon.d script</a>. This script is responsible for backing up GApps and Lineage&#8217;s SU addon, and it needed modifications to properly work with A/B devices. The following people were involved in making this development happen (apologies if we missed anyone.)</p> <div class="accordion_content"> <h4 class="accordion_content_title">Contributions to making A/B support possible for LineageOS 15.1</h4> <div class="accordion_content_inner"> </p> <ul> <li>XDA Recognized Developer <a href="https://forum.xda-developers.com/member.php?u=2385005">invisiblek</a> &#8211; Wrote addon.d-v2/backuptool_ab and contributed original patches to for the A/B updater</li> <li>XDA Senior Member <a href="https://forum.xda-developers.com/member.php?u=5848265">npjohnson</a> &#8211; Maintained addon.d-v2/backuptool_ab and implemented some fixes. Worked with external projects (OpenGApps/Magisk) to help get them compatible with the new tool.</li> <li>XDA Senior Member <a href="https://forum.xda-developers.com/member.php?u=6070905">abhishek987</a> &#8211; Maintained addon.d-v2/backuptool_ab, helped debug/fix it along the way,</li> <li><a href="https://github.com/gmrt">gmrt</a> &#8211; Set up the A/B seamless updater, added support for a variety of A/B functions in Updater, build.prop exposure to start releasetools for A/B, switch to unresttrict update_engine (WIP)</li> <li>XDA Recognized Developer <a href="https://forum.xda-developers.com/member.php?u=4126377">tdm</a> &#8211; Brought Lineage recovery up, the platform to ship on A/B as the built-in recovery</li> <li>XDA Recognized Developer <a href="https://forum.xda-developers.com/member.php?u=3463426">raymanfx</a> &#8211; various recovery patches to allow for installing old style zips and newer payload style zips, some AVB tool work, making addonsu A/B compatible</li> <li>XDA Senior Member <a href="http://forum.xda-developers.com/member.php?u=1815755">intervigil</a> &#8211; Android Verified Boot logic, and tool to disable/deal with it</li> <li>XDA Inactive Recognized Developer <a href="https://forum.xda-developers.com/member.php?u=4662457">Rashed97</a> &#8211; addon.d contributions and platform login</li> </ul> <p> </div> </div> <p>Initially, only the Motorola <a href="https://forum.xda-developers.com/z2-force">Moto Z2 Force</a> (nash) has <a href="https://review.lineageos.org/#/c/LineageOS/hudson/+/218033/">been added to the roster</a>, with support expected for more devices in the future. <strong>The Moto Z2 Force&#8217;s <a href="https://download.lineageos.org/nash">build will roll out tomorrow</a>. </strong>The Z2 Force&#8217;s build is being maintained by XDA Senior Member <a href="https://forum.xda-developers.com/member.php?u=5848265">npjohnson</a>.</p> <p>We expect the following devices to soon receive support once all of the device-specific bugs have been fixed:</p> <ul> <li><a href="https://forum.xda-developers.com/pixel">Google Pixel</a></li> <li><a href="https://forum.xda-developers.com/pixel-xl">Google Pixel XL</a></li> <li><a href="https://forum.xda-developers.com/pixel-2">Google Pixel 2</a></li> <li><a href="https://forum.xda-developers.com/pixel-2-xl">Google Pixel 2 XL</a></li> <li><a href="https://forum.xda-developers.com/essential-phone">Essential Phone PH-1</a></li> <li><a href="https://forum.xda-developers.com/mi-a1">Xiaomi Mi A1</a></li> </ul> <p>In fact, we expect the Xiaomi Mi A1 to receive support very soon given the comments <a href="https://review.lineageos.org/#/c/LineageOS/lineage_wiki/+/218173/">here</a>. Likewise, a <a href="https://review.lineageos.org/#/c/LineageOS/hudson/+/218594/">bug related to the Bluetooth MAC</a> needs to be fixed before the build for the Essential Phone will land. We&#8217;ll keep you updated once the official LineageOS 15.1 builds for the other A/B devices start to roll out.</p> <p class="clear:both;"> ]]></content:encoded> <wfw:commentRss>https://www.xda-developers.com/lineageos-15-1-supports-a-b-devices-moto-z2-force/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item> <title>Huawei P20 Pro update adds 960fps slow motion like the Samsung Galaxy S9</title> <link>https://www.xda-developers.com/huawei-p20-pro-update-960fps-slow-motion/</link> <comments>https://www.xda-developers.com/huawei-p20-pro-update-960fps-slow-motion/#respond</comments> <pubDate>Mon, 25 Jun 2018 14:15:00 +0000</pubDate> <dc:creator><![CDATA[George Burduli]]></dc:creator> <category><![CDATA[Mini XDA]]></category> <category><![CDATA[News]]></category> <category><![CDATA[XDA Android]]></category> <category><![CDATA[android 8.1]]></category> <category><![CDATA[Android Oreo]]></category> <category><![CDATA[huawei]]></category> <category><![CDATA[Huawei P20]]></category> <category><![CDATA[samsung galaxy s9]]></category> <category><![CDATA[Slow Motion]]></category> <guid isPermaLink="false">https://www.xda-developers.com/?p=222304</guid> <description><![CDATA[<img width="150" height="150" src="https://www1-lw.xda-cdn.com/files/2018/03/HUAWEI-P20-Pro-150x150.png" class="webfeedsFeaturedVisual wp-post-image" alt="" style="display: block; margin-bottom: 5px; clear:both;max-width: 100%;" />Huawei released the P20 trio (Huawei P20, Huawei P20 Lite, and Huawei P20 Pro) back in April. While the Lite version is a mid-range device, the regular P20 and P20 Pro versions are both flagships. In the recent months, Huawei really stepped up their development. The P20 Pro already comes with Android 8.1 Oreo and]]></description> <content:encoded><![CDATA[<img width="150" height="150" src="https://www1-lw.xda-cdn.com/files/2018/03/HUAWEI-P20-Pro-150x150.png" class="webfeedsFeaturedVisual wp-post-image" alt="" style="display: block; margin-bottom: 5px; clear:both;max-width: 100%;" /><p class="dropcap">Huawei released the P20 trio (<a href="https://forum.xda-developers.com/huawei-p20">Huawei P20</a>, <a href="https://forum.xda-developers.com/huawei-p20-lite">Huawei P20 Lite</a>, and <a href="https://forum.xda-developers.com/huawei-p20-pro">Huawei P20 Pro</a>) back in April. While the Lite version is a mid-range device, the regular P20 and P20 Pro versions are both flagships. In the recent months, Huawei really stepped up their development. The P20 Pro already comes with <a href="https://www.xda-developers.com/tag/android-oreo/">Android 8.1</a> Oreo and as it turns out, it&#8217;s getting <a href="https://www.xda-developers.com/huawei-p20-huawei-mate-10-pro-and-sony-xperia-xz2-gain-netflix-hdr-support/">pretty frequent updates too</a>. Last week, Junior Member at XDA Forums, <a href="https://forum.xda-developers.com/member.php?u=4680991">tamaskurti</a> reported that the device got a new update, with build number CLT-L29C432B131.</p> <p>The first feature in the update is the June security patch. While it&#8217;s been about <a href="https://www.xda-developers.com/android-security-update-june-pixel-nexus/">2 weeks since the release of this patch</a>, it&#8217;s still nice to see that Huawei isn&#8217;t delaying security updates any further. True, <a href="https://www.xda-developers.com/essential-phone-android-p-beta-2-june-security-patches/">Essential releases security updates</a> almost instantly after they&#8217;re available, but Huawei still manages to bring some competition to the table compared to other large OEMs.</p> <p>The next new feature is camera improvements. The zoom button is now placed lower on the screen. I think it&#8217;s much more comfortable to use now. But, for unknown reasons, the button is now square-shaped, instead of a circle. Maybe it fits with overall UI? I don&#8217;t really know.</p> <p>Users also noticed a new slow motion feature, which works just like Samsung <a href="https://forum.xda-developers.com/galaxy-s9">Galaxy S9</a>. It starts recording slow motion video as soon as it detects movement. It&#8217;s worth noting that <a href="https://www.xda-developers.com/huawei-p20-pro-super-slow-motion-samsung-galaxy-s9/">we noticed that S9-like slow motion was coming back in March</a>. Here is it in action, courtesy of XDA Senior Member <a href="https://forum.xda-developers.com/member.php?u=2555881">mmeidl78:</a></p> <blockquote class="instagram-media" data-instgrm-captioned data-instgrm-permalink="https://www.instagram.com/p/BkLXbtWDPvF/" data-instgrm-version="8" style=" background:#FFF; border:0; border-radius:3px; box-shadow:0 0 1px 0 rgba(0,0,0,0.5),0 1px 10px 0 rgba(0,0,0,0.15); margin: 1px; max-width:658px; padding:0; width:99.375%; width:-webkit-calc(100% - 2px); width:calc(100% - 2px);"> <div style="padding:8px;"> <div style=" background:#F8F8F8; line-height:0; margin-top:40px; padding:50.0% 0; text-align:center; width:100%;"> <div style=" background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAMAAAApWqozAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAMUExURczMzPf399fX1+bm5mzY9AMAAADiSURBVDjLvZXbEsMgCES5/P8/t9FuRVCRmU73JWlzosgSIIZURCjo/ad+EQJJB4Hv8BFt+IDpQoCx1wjOSBFhh2XssxEIYn3ulI/6MNReE07UIWJEv8UEOWDS88LY97kqyTliJKKtuYBbruAyVh5wOHiXmpi5we58Ek028czwyuQdLKPG1Bkb4NnM+VeAnfHqn1k4+GPT6uGQcvu2h2OVuIf/gWUFyy8OWEpdyZSa3aVCqpVoVvzZZ2VTnn2wU8qzVjDDetO90GSy9mVLqtgYSy231MxrY6I2gGqjrTY0L8fxCxfCBbhWrsYYAAAAAElFTkSuQmCC); display:block; height:44px; margin:0 auto -44px; position:relative; top:-22px; width:44px;"></div> </div> <p style=" margin:8px 0 0 0; padding:0 4px;"> <a href="https://www.instagram.com/p/BkLXbtWDPvF/" style=" color:#000; font-family:Arial,sans-serif; font-size:14px; font-style:normal; font-weight:normal; line-height:17px; text-decoration:none; word-wrap:break-word;" target="_blank">Neues Update des #Huawei #p20pro ist NICE! Verbesserungen in der Kamera-App incoming! #slowmo und #zoom</a></p> <p style=" color:#c9c8cd; font-family:Arial,sans-serif; font-size:14px; line-height:17px; margin-bottom:0; margin-top:8px; overflow:hidden; padding:8px 0 7px; text-align:center; text-overflow:ellipsis; white-space:nowrap;">A post shared by <a href="https://www.instagram.com/mmeidl78/" style=" color:#c9c8cd; font-family:Arial,sans-serif; font-size:14px; font-style:normal; font-weight:normal; line-height:17px;" target="_blank"> Michael Meidl</a> (@mmeidl78) on <time style=" font-family:Arial,sans-serif; font-size:14px; line-height:17px;" datetime="2018-06-18T19:24:15+00:00">Jun 18, 2018 at 12:24pm PDT</time></p> </div> </blockquote> <p><script async defer src="//www.instagram.com/embed.js"></script></p> <p>XDA Forum member tamaskurti also provided the official changelog:</p> <p>&#8220;This update optimizes system performance and stability.</p> <ul> <li>Optimizes power consumption for longer usage.</li> <li>Improves system performance and stability for smoother operations.</li> <li>Optimizes the wallpaper display for a better experience.</li> <li>Fixes an issue where the other party&#8217;s voice was occasionally delayed when answering calls while using OK Google.&#8221;</li> </ul> <p>As you see, the changes I&#8217;ve explained above aren&#8217;t even mentioned in an official changelog, which is a bit strange, but it&#8217;s a common practice for Huawei already. Nevertheless, this is definitely a welcome update as it contains some new features while improving stability and security. The update will roll out gradually and it will be available on every Huawei P20 Pro soon.</p> <hr /> <a href="https://forum.xda-developers.com/huawei-p20-pro/how-to/clt-l29c432b131-firmware-improvements-t3804068" class="btn btn_" target="_self" style="background-color:#f85050; color:#ffffff;">Source: Huawei P20 Pro XDA Forum</a> <p class="clear:both;"> ]]></content:encoded> <wfw:commentRss>https://www.xda-developers.com/huawei-p20-pro-update-960fps-slow-motion/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item> <title>Xiaomi Mi Pad 4 is official with an 8-inch display and Snapdragon 660</title> <link>https://www.xda-developers.com/xiaomi-mi-pad-4-official-specifications-features/</link> <comments>https://www.xda-developers.com/xiaomi-mi-pad-4-official-specifications-features/#respond</comments> <pubDate>Mon, 25 Jun 2018 13:40:47 +0000</pubDate> <dc:creator><![CDATA[Idrees Patel]]></dc:creator> <category><![CDATA[Full XDA]]></category> <category><![CDATA[News]]></category> <category><![CDATA[XDA Android]]></category> <category><![CDATA[XDA Feature]]></category> <category><![CDATA[MIUI]]></category> <category><![CDATA[xiaomi]]></category> <category><![CDATA[Xiaomi Mi Pad 4]]></category> <guid isPermaLink="false">https://www.xda-developers.com/?p=222955</guid> <description><![CDATA[<img width="150" height="150" src="https://www1-lw.xda-cdn.com/files/2018/06/Xiaomi-Mi-Pad-4-Feature-Image-150x150.jpg" class="webfeedsFeaturedVisual wp-post-image" alt="Xiaomi Mi Pad 4" style="display: block; margin-bottom: 5px; clear:both;max-width: 100%;" />Android tablets may well face a general decline in demand, but clearly, that hasn&#8217;t stopped Xiaomi from releasing a new Android tablet. The company&#8217;s Mi Pad series of tablets are some of the few Android tablets that are worth recommending because of their respectable specifications and affordable prices, at a time when most Android tablets]]></description> <content:encoded><![CDATA[<img width="150" height="150" src="https://www1-lw.xda-cdn.com/files/2018/06/Xiaomi-Mi-Pad-4-Feature-Image-150x150.jpg" class="webfeedsFeaturedVisual wp-post-image" alt="Xiaomi Mi Pad 4" style="display: block; margin-bottom: 5px; clear:both;max-width: 100%;" /><p class="dropcap">Android tablets <a href="https://www.xda-developers.com/idc-q3-2017-tablet-market-decline/">may well face a general decline in demand</a>, but clearly, that hasn&#8217;t stopped Xiaomi from releasing a new Android tablet. The company&#8217;s Mi Pad series of tablets are some of the few Android tablets that are worth recommending because of their respectable specifications and affordable prices, at a time when most Android tablets have outdated specifications.</p> <p>The <a href="https://www.xda-developers.com/xiaomi-quietly-launches-the-mi-pad-3-with-a-7-9-display-and-mediatek-mt8176-soc/"><a href="https://forum.xda-developers.com/t/mi-pad-3">Xiaomi Mi Pad 3</a></a> was released back in April 2017 with the MediaTek MT8176 SoC. <a href="https://www.xda-developers.com/xiaomi-mi-pad-4-specifications/">We have exclusively reported some of the specifications of its successor</a>, and Xiaomi has now officially launched it alongside the <a href="https://www.xda-developers.com/xiaomi-redmi-6-pro-official-specifications-features/">Xiaomi Redmi 6 Pro</a>.</p> <p>The Xiaomi Mi Pad 4 is not a typical cheap Android tablet. It has a high-resolution display, a capable SoC in the form of the <a href="https://www.xda-developers.com/tag/qualcomm-snapdragon-660/">Snapdragon 660</a>, and metal unibody construction. Let&#8217;s take a look at its specifications:</p> <h2>Xiaomi Mi Pad 4 &#8211; Specifications at a glance</h2> <p><img class="aligncenter size-full wp-image-222983" src="https://www1-lw.xda-cdn.com/files/2018/06/Xiaomi-Mi-Pad-4-Rose-Gold.jpg" alt="Xiaomi Mi Pad 4" width="728" height="313" srcset="https://www1-lw.xda-cdn.com/files/2018/06/Xiaomi-Mi-Pad-4-Rose-Gold.jpg 728w, https://www1-lw.xda-cdn.com/files/2018/06/Xiaomi-Mi-Pad-4-Rose-Gold-300x129.jpg 300w" sizes="(max-width: 728px) 100vw, 728px" /></p> <table class="table_orange"> <thead> <tr> <th>Xiaomi Mi Pad 4</th> <th>Specifications</th> </tr> </thead> <tbody> <tr> <td>Dimensions and weight</td> <td>200.2 x 120.3 x 7.9 mm, 342.5g</td> </tr> <tr> <td>Software</td> <td><a href="https://www.xda-developers.com/tag/miui/">MIUI</a> 9 on top of <a href="https://www.xda-developers.com/tag/android-oreo/">Android 8.1</a> Oreo</td> </tr> <tr> <td>CPU</td> <td>Octa-core Qualcomm Snapdragon 660 (4x Kryo 260 Performance cores clocked at 2.0GHz + 4x Kryo 260 Efficiency cores clocked at 1.8GHz)</td> </tr> <tr> <td>GPU</td> <td>Adreno 512</td> </tr> <tr> <td>RAM and storage</td> <td>3GB of RAM with 32GB of storage / 4GB of RAM with 64GB of storage; dedicated microSD card slot</td> </tr> <tr> <td>Battery</td> <td>6000mAh, 5V/2A charging)</td> </tr> <tr> <td>Display</td> <td>8-inch WUXGA (1920&#215;1200) IPS LCD with a 16:10 aspect ratio</td> </tr> <tr> <td>Wi-Fi</td> <td>802.11ac</td> </tr> <tr> <td>Bluetooth</td> <td>Bluetooth 5.0</td> </tr> <tr> <td>Ports</td> <td>USB Type-C port, 3.5mm headphone jack; LTE version: Nano SIM slot</td> </tr> <tr> <td>Bands</td> <td>LTE version:<br /> FDD-LTE: Bands 1/3/5/7/8<br /> TDD-LTE: Bands 34/38/39/40/41</td> </tr> <tr> <td>Rear camera</td> <td>13MP camera with f/2.0 aperture<br /> Video recording up to 1080p at 30fps</td> </tr> <tr> <td>Front-facing camera</td> <td>5MP front-facing camera</td> </tr> </tbody> </table> <p>The Mi Pad 4 has metal unibody construction, which instantly gives it a more premium look and feel than most budget Android tablets. The tablet has relatively small bezels, and Xiaomi is promoting how it can be used with one hand. The display&#8217;s 16:10 aspect ratio also helps in this respect.</p> <h2>Performance</h2> <p>The Xiaomi Mi Pad 4 is powered by the Qualcomm Snapdragon 660 system-on-chip. The SoC has four big cores in the form of the Kryo 260 Performance (based on Arm Cortex-A73) clocked at 2.0GHz (downlocked in the Mi Pad 4), paired with four Kryo 260 Efficiency (Cortex-A53) cores clocked at 1.8GHz. The Snapdragon 660 uses the Adreno 512 GPU, which is more powerful than the Adreno 509 of the Snapdragon 636.</p> <p>The tablet comes in two variants: 3GB of RAM with 32GB of storage, and 4GB of RAM with 64GB of storage. The storage is expandable via microSD card slot.</p> <h2>Display</h2> <p>The Mi Pad 4 has an 8-inch WUXGA (1920&#215;1200) IPS LCD with a 16:10 aspect ratio. The display&#8217;s aspect ratio and resolution are different from its predecessors. Technically, the Mi Pad 4 features a lower resolution display than the Mi Pad 3 and the Mi Pad 2. The move to a 16:10 aspect ratio from a 4:3 aspect ratio may also be thought of as a downgrade for productivity tasks, but opinions on this can vary.</p> <h2>Connectivity</h2> <p>The tablet is powered by a 6000mAh battery with regular 10W charging. It has Wi-Fi 802.11b/g/n/ac, and Bluetooth 5.0, a USB Type-C port, and a 3.5mm headphone jack.</p> <h2>Software</h2> <p>The Xiaomi Mi Pad 4 is powered by MIUI 9 on top of Android 8.1 Oreo, which means that it&#8217;s required to have <a href="https://forum.xda-developers.com/project-treble">Project Treble</a> support.</p> <h2>Xiaomi Mi Pad 4 &#8211; Pricing and availability</h2> <p>The Xiaomi Mi Pad 4 is available in Black and Rose Gold colors. Pre-orders for the device have gone live in China, with availability scheduled for June 29. The 3GB RAM/32GB storage variant costs CNY 1099 ($170), while the 4GB RAM/64GB storage variant costs CNY 1399 ($215). The LTE variant costs CNY 1499 ($230).</p> <p><strong>Let us know what you think about the Xiaomi Mi Pad 4 in the comments below.</strong></p> <p class="clear:both;"> ]]></content:encoded> <wfw:commentRss>https://www.xda-developers.com/xiaomi-mi-pad-4-official-specifications-features/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> </channel> </rss> <!-- Performance optimized by W3 Total Cache. Learn more: https://www.w3-edge.com/products/ Object Caching 239/1144 objects using memcached Content Delivery Network via www1-lw.xda-cdn.com Minified using memcached Served from: www.xda-developers.com @ 2018-07-02 12:36:24 by W3 Total Cache -->
DIGITAL Command Language
2
hsantos9/Winds
api/test/data/feed/xda-developers.com
[ "BSD-3-Clause" ]
#N canvas 674 311 471 296 12; #X obj 149 108 inlet; #X obj 149 228 outlet; #X obj 149 165 pdcontrol; #X text 78 28 This is the abstraction for the pdcontrol help patch. It serves an example on how it gets the arguments of an abstraction. , f 41; #X connect 0 0 2 0; #X connect 2 0 1 0;
Pure Data
4
mcclure/pure-data
doc/5.reference/pdcontrol-abs.pd
[ "TCL" ]
(* * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. *) open Utils_js (* In order to minimize the frequency with which we unnecessarily compare equivalent structures, we assign structures created at the top level of a source program an id of their location instead of an int. This way, if we see the structure twice between the merge and check phases, we consider them equal just by looking at their ids *) type id = | Source of ALoc.id | Generated of int let compare_id a b = match (a, b) with | (Source a, Source b) -> ALoc.quick_compare (a :> ALoc.t) (b :> ALoc.t) | (Generated a, Generated b) -> a - b | (Source _, Generated _) -> -1 | (Generated _, Source _) -> 1 let equal_id a b = compare_id a b = 0 let id_of_int i = Generated i let id_as_int = function | Generated i -> Some i | _ -> None let generate_id = Reason.mk_id %> id_of_int let id_of_aloc_id aloc_id = Source aloc_id let string_of_id = function | Generated id -> string_of_int id | Source id -> Reason.string_of_aloc (id :> ALoc.t)
OCaml
4
zhangmaijun/flow
src/typing/source_or_generated_id.ml
[ "MIT" ]
// run-pass #![allow(unreachable_code)] pub fn main() { let mut x = 0; 'foo: loop { 'bar: loop { loop { if 1 == 2 { break 'foo; } else { break 'bar; } } continue 'foo; } x = 42; break; } println!("{}", x); assert_eq!(x, 42); }
Rust
3
Eric-Arellano/rust
src/test/ui/issues/issue-2216.rs
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
⎕←'Hello World'
APL
0
conorpreid/hello-world
a/APL.apl
[ "MIT" ]
with Ada.Characters.Handling; with Ada.Text_IO; with Ada.Command_Line; with Ada.Containers.Indefinite_Vectors; procedure Generate is use Ada.Characters.Handling; use Ada.Text_IO; package String_Vectors is new Ada.Containers.Indefinite_Vectors (Element_Type => String, Index_Type => Positive); Languages : String_Vectors.Vector; function Capitalize (S : in String) return String is (To_Upper (S (S'First)) & S (S'First + 1 .. S'Last)); procedure Write_Spec is File : File_Type; I : Natural := 0; begin Create (File, Out_File, "stemmer-factory.ads"); Put_Line (File, "package Stemmer.Factory with SPARK_Mode is"); New_Line (File); Put (File, " type Language_Type is ("); for Lang of Languages loop Put (File, "L_" & To_Upper (Lang)); I := I + 1; if I < Natural (Languages.Length) then Put_Line (File, ","); Put (File, " "); end if; end loop; Put_Line (File, ");"); New_Line (File); Put_Line (File, " function Stem (Language : in Language_Type;"); Put_Line (File, " Word : in String) return String;"); New_Line (File); Put_Line (File, "end Stemmer.Factory;"); Close (File); end Write_Spec; procedure Write_Body is File : File_Type; begin Create (File, Out_File, "stemmer-factory.adb"); for Lang of Languages loop Put_Line (File, "with Stemmer." & Capitalize (Lang) & ";"); end loop; Put_Line (File, "package body Stemmer.Factory with SPARK_Mode is"); New_Line (File); Put_Line (File, " function Stem (Language : in Language_Type;"); Put_Line (File, " Word : in String) return String is"); Put_Line (File, " Result : Boolean := False;"); Put_Line (File, " begin"); Put_Line (File, " case Language is"); for Lang of Languages loop Put_Line (File, " when L_" & To_Upper (Lang) & " =>"); Put_Line (File, " declare"); Put_Line (File, " C : Stemmer." & Capitalize (Lang) & ".Context_Type;"); Put_Line (File, " begin"); Put_Line (File, " C.Stem_Word (Word, Result);"); Put_Line (File, " return Get_Result (C);"); Put_Line (File, " end;"); New_Line (File); end loop; Put_Line (File, " end case;"); Put_Line (File, " end Stem;"); New_Line (File); Put_Line (File, "end Stemmer.Factory;"); Close (File); end Write_Body; Count : constant Natural := Ada.Command_Line.Argument_Count; begin for I in 1 .. Count loop Languages.Append (To_Lower (Ada.Command_Line.Argument (I))); end loop; Write_Spec; Write_Body; end Generate;
Ada
4
Klabauterman/snowball
ada/generate/generate.adb
[ "BSD-3-Clause" ]
" Vim syntax file for the "papp" file format (_p_erl _app_lication) " " Language: papp " Maintainer: Marc Lehmann <[email protected]> " Last Change: 2009 Nov 11 " Filenames: *.papp *.pxml *.pxsl " URL: http://papp.plan9.de/ " You can set the "papp_include_html" variable so that html will be " rendered as such inside phtml sections (in case you actually put html " there - papp does not require that). Also, rendering html tends to keep " the clutter high on the screen - mixing three languages is difficult " enough(!). PS: it is also slow. " pod is, btw, allowed everywhere, which is actually wrong :( " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif " source is basically xml, with included html (this is common) and perl bits runtime! syntax/xml.vim unlet b:current_syntax if exists("papp_include_html") syn include @PAppHtml syntax/html.vim unlet b:current_syntax syntax spell default " added by Bram endif syn include @PAppPerl syntax/perl.vim syn cluster xmlFoldCluster add=papp_perl,papp_xperl,papp_phtml,papp_pxml,papp_perlPOD " preprocessor commands syn region papp_prep matchgroup=papp_prep start="^#\s*\(if\|elsif\)" end="$" keepend contains=@perlExpr contained syn match papp_prep /^#\s*\(else\|endif\|??\).*$/ contained " translation entries syn region papp_gettext start=/__"/ end=/"/ contained contains=@papp_perlInterpDQ syn cluster PAppHtml add=papp_gettext,papp_prep " add special, paired xperl, perl and phtml tags syn region papp_perl matchgroup=xmlTag start="<perl>" end="</perl>" contains=papp_CDATAp,@PAppPerl keepend syn region papp_xperl matchgroup=xmlTag start="<xperl>" end="</xperl>" contains=papp_CDATAp,@PAppPerl keepend syn region papp_phtml matchgroup=xmlTag start="<phtml>" end="</phtml>" contains=papp_CDATAh,papp_ph_perl,papp_ph_html,papp_ph_hint,@PAppHtml keepend syn region papp_pxml matchgroup=xmlTag start="<pxml>" end="</pxml>" contains=papp_CDATAx,papp_ph_perl,papp_ph_xml,papp_ph_xint keepend syn region papp_perlPOD start="^=[a-z]" end="^=cut" contains=@Pod,perlTodo keepend " cdata sections syn region papp_CDATAp matchgroup=xmlCdataDecl start="<!\[CDATA\[" end="\]\]>" contains=@PAppPerl contained keepend syn region papp_CDATAh matchgroup=xmlCdataDecl start="<!\[CDATA\[" end="\]\]>" contains=papp_ph_perl,papp_ph_html,papp_ph_hint,@PAppHtml contained keepend syn region papp_CDATAx matchgroup=xmlCdataDecl start="<!\[CDATA\[" end="\]\]>" contains=papp_ph_perl,papp_ph_xml,papp_ph_xint contained keepend syn region papp_ph_perl matchgroup=Delimiter start="<[:?]" end="[:?]>"me=e-2 nextgroup=papp_ph_html contains=@PAppPerl contained keepend syn region papp_ph_html matchgroup=Delimiter start=":>" end="<[:?]"me=e-2 nextgroup=papp_ph_perl contains=@PAppHtml contained keepend syn region papp_ph_hint matchgroup=Delimiter start="?>" end="<[:?]"me=e-2 nextgroup=papp_ph_perl contains=@perlInterpDQ,@PAppHtml contained keepend syn region papp_ph_xml matchgroup=Delimiter start=":>" end="<[:?]"me=e-2 nextgroup=papp_ph_perl contains= contained keepend syn region papp_ph_xint matchgroup=Delimiter start="?>" end="<[:?]"me=e-2 nextgroup=papp_ph_perl contains=@perlInterpDQ contained keepend " synchronization is horrors! syn sync clear syn sync match pappSync grouphere papp_CDATAh "</\(perl\|xperl\|phtml\|macro\|module\)>" syn sync match pappSync grouphere papp_CDATAh "^# *\(if\|elsif\|else\|endif\)" syn sync match pappSync grouphere papp_CDATAh "</\(tr\|td\|table\|hr\|h1\|h2\|h3\)>" syn sync match pappSync grouphere NONE "</\=\(module\|state\|macro\)>" syn sync maxlines=300 syn sync minlines=5 " The default highlighting. hi def link papp_prep preCondit hi def link papp_gettext String let b:current_syntax = "papp"
VimL
4
uga-rosa/neovim
runtime/syntax/papp.vim
[ "Vim" ]
class Worker { def initialize: @name supervisor: @supervisor def work! { Thread sleep: 0.5 @supervisor @@ done: @name } } class Supervisor { def initialize: @amount { @done = [] @workers = Proxies DistributingProxy new: $ (1..@amount) map: |i| { Worker new: i supervisor: self } } def start { "Starting: #{(0..@amount) to_a inspect}" println @amount times: { @workers @@ work! } } def done: worker { @done << worker if: (@done size == @amount) then: { "Done: #{@done inspect}" println } } } Supervisor new: 10 . start Console readln
Fancy
3
bakkdoor/fancy
examples/distributing_proxy.fy
[ "BSD-3-Clause" ]
@land: rgba(0,0,0,0); @text: #FF1493; @OrangeRed: #FF4500; #default { line-color: #fff; line-width: 2; polygon-fill: red; }
CartoCSS
3
zedjia/PGRestAPI
endpoints/tiles/cartocss/default.mss
[ "BSD-3-Clause" ]
package com.baeldung.exception.indexoutofbounds; import java.util.ArrayList; import java.util.Collections; import java.util.List; public class IndexOutOfBoundsExceptionDemo { static List<Integer> copyList(List<Integer> source) { List<Integer> destination = new ArrayList<>(source.size()); Collections.copy(destination, source); return destination; } }
Java
3
DBatOWL/tutorials
core-java-modules/core-java-exceptions-3/src/main/java/com/baeldung/exception/indexoutofbounds/IndexOutOfBoundsExceptionDemo.java
[ "MIT" ]
#!/bin/bash LIBFUZZER_SRC_DIR=$(dirname $0) for f in $LIBFUZZER_SRC_DIR/*.cpp; do clang -g -O2 -fno-omit-frame-pointer -std=c++11 $f -c & done wait rm -f libFuzzer.a ar ru libFuzzer.a Fuzzer*.o rm -f Fuzzer*.o
Shell
3
sdmg15/json
test/thirdparty/Fuzzer/build.sh
[ "MIT" ]
<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" > <channel> <title>AudiWorld</title> <atom:link href="https://www.audiworld.com/feed/" rel="self" type="application/rss+xml" /> <link>https://www.audiworld.com</link> <description>Audi News and Discussion</description> <lastBuildDate>Sun, 01 Jul 2018 13:40:49 +0000</lastBuildDate> <language>en-US</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>https://wordpress.org/?v=4.9.6</generator> <site xmlns="com-wordpress:feed-additions:1">57070361</site> <item> <title>Audi A4 Sedan and Audi A4 Avant: Bestselling models in top form</title> <link>https://www.audiworld.com/articles/audi-a4-sedan-and-audi-a4-avant-bestselling-models-in-top-form/</link> <pubDate>Sun, 01 Jul 2018 13:40:49 +0000</pubDate> <dc:creator><![CDATA[Audi Media]]></dc:creator> <category><![CDATA[Model News]]></category> <category><![CDATA[Photo Gallery]]></category> <category><![CDATA[audi a4]]></category> <category><![CDATA[Audi A4 Avant]]></category> <guid isPermaLink="false">https://www.audiworld.com/?p=36201</guid> <description><![CDATA[<div class="featured_image_post_rss"><img width="1152" height="648" src="https://www.audiworld.com/wp-content/uploads/2018/07/Audi-A4-9.jpg" class="attachment-full size-full" alt="" srcset="https://www.audiworld.com/wp-content/uploads/2018/07/Audi-A4-9.jpg 1152w, https://www.audiworld.com/wp-content/uploads/2018/07/Audi-A4-9-600x338.jpg 600w, https://www.audiworld.com/wp-content/uploads/2018/07/Audi-A4-9-768x432.jpg 768w, https://www.audiworld.com/wp-content/uploads/2018/07/Audi-A4-9-1024x576.jpg 1024w, https://www.audiworld.com/wp-content/uploads/2018/07/Audi-A4-9-640x360.jpg 640w, https://www.audiworld.com/wp-content/uploads/2018/07/Audi-A4-9-220x125.jpg 220w, https://www.audiworld.com/wp-content/uploads/2018/07/Audi-A4-9-145x82.jpg 145w, https://www.audiworld.com/wp-content/uploads/2018/07/Audi-A4-9-310x175.jpg 310w, https://www.audiworld.com/wp-content/uploads/2018/07/Audi-A4-9-320x180.jpg 320w" sizes="(max-width: 1152px) 100vw, 1152px" data-attachment-id="36210" data-permalink="https://www.audiworld.com/articles/audi-a4-sedan-and-audi-a4-avant-bestselling-models-in-top-form/audi-a4-sedan-9/" data-orig-file="https://www.audiworld.com/wp-content/uploads/2018/07/Audi-A4-9.jpg" data-orig-size="1152,648" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;AUDI AG&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;Audi A4 Sedan&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="Audi A4 Sedan" data-image-description="" data-medium-file="https://www.audiworld.com/wp-content/uploads/2018/07/Audi-A4-9-600x338.jpg" data-large-file="https://www.audiworld.com/wp-content/uploads/2018/07/Audi-A4-9-1024x576.jpg" /></div><br />A more striking look at the front and rear Ultra-dynamic “S line competition” equipment package Audi makes its successful premium midsize model even more compelling. The 2019 model year will see the A4 Sedan and A4 Avant receive newly designed bumpers, which together with the new wheel design accentuate the sporty character. The equally all-new [...]<a href="https://www.audiworld.com/articles/audi-a4-sedan-and-audi-a4-avant-bestselling-models-in-top-form/"> More &#187;</a>]]></description> <post-id xmlns="com-wordpress:feed-additions:1">36201</post-id> <image>https://www.audiworld.com/wp-content/uploads/2018/07/Audi-A4-9.jpg</image> <thumbnail>https://www.audiworld.com/wp-content/uploads/2018/07/Audi-A4-9-150x150.jpg</thumbnail> </item> <item> <title>Event Information: Waterfest 24 has an all new location!!</title> <link>https://www.audiworld.com/articles/event-information-waterfest-24-has-an-all-new-location/</link> <pubDate>Thu, 28 Jun 2018 01:38:30 +0000</pubDate> <dc:creator><![CDATA[Kris Hansen]]></dc:creator> <category><![CDATA[Motor Shows]]></category> <guid isPermaLink="false">https://www.audiworld.com/?p=36192</guid> <description><![CDATA[<div class="featured_image_post_rss"><img width="2048" height="1365" src="https://www.audiworld.com/wp-content/uploads/2018/06/Event-ad-3.jpg" class="attachment-full size-full" alt="" srcset="https://www.audiworld.com/wp-content/uploads/2018/06/Event-ad-3.jpg 2048w, https://www.audiworld.com/wp-content/uploads/2018/06/Event-ad-3-600x400.jpg 600w, https://www.audiworld.com/wp-content/uploads/2018/06/Event-ad-3-768x512.jpg 768w, https://www.audiworld.com/wp-content/uploads/2018/06/Event-ad-3-1024x683.jpg 1024w, https://www.audiworld.com/wp-content/uploads/2018/06/Event-ad-3-640x427.jpg 640w" sizes="(max-width: 2048px) 100vw, 2048px" data-attachment-id="36193" data-permalink="https://www.audiworld.com/articles/event-information-waterfest-24-has-an-all-new-location/event-ad-3/" data-orig-file="https://www.audiworld.com/wp-content/uploads/2018/06/Event-ad-3.jpg" data-orig-size="2048,1365" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;1&quot;}" data-image-title="Event ad #3" data-image-description="" data-medium-file="https://www.audiworld.com/wp-content/uploads/2018/06/Event-ad-3-600x400.jpg" data-large-file="https://www.audiworld.com/wp-content/uploads/2018/06/Event-ad-3-1024x683.jpg" /></div><br />For the first time in a long time, Waterfest will have a new location. Just a hop skip and jump from the former location, this year Atco Dragway in Atco NJ will be the place to be July 21 and 22, for the largest VW and Audi show in the East. As always, AudiWorld will [...]<a href="https://www.audiworld.com/articles/event-information-waterfest-24-has-an-all-new-location/"> More &#187;</a>]]></description> <post-id xmlns="com-wordpress:feed-additions:1">36192</post-id> <image>https://www.audiworld.com/wp-content/uploads/2018/06/Event-ad-3.jpg</image> <thumbnail>https://www.audiworld.com/wp-content/uploads/2018/06/Event-ad-3-150x150.jpg</thumbnail> </item> <item> <title>Slideshow: Keeping You and Your Car Cool This Summer</title> <link>https://www.audiworld.com/how-tos/slideshows/keeping-you-and-your-car-cool-this-summer-541484</link> <pubDate>Wed, 27 Jun 2018 06:48:16 +0000</pubDate> <dc:creator><![CDATA[Sarah Portia]]></dc:creator> <category><![CDATA[Slideshows]]></category> <guid isPermaLink="false">http://www.audiworld.com/?guid=b0b22b25f7eeb547c60adebddff2201e</guid> <description><![CDATA[<div class="featured_image_post_rss"><img width="640" height="360" src="https://www.audiworld.com/wp-content/uploads/2018/06/UF101_-_Audi_R8_6_ebf885a7-df63-4a4a-9751-4b3e93a87ca6_1024x1024-370642.jpg" class="attachment-full size-full" alt="" srcset="https://www.audiworld.com/wp-content/uploads/2018/06/UF101_-_Audi_R8_6_ebf885a7-df63-4a4a-9751-4b3e93a87ca6_1024x1024-370642.jpg 640w, https://www.audiworld.com/wp-content/uploads/2018/06/UF101_-_Audi_R8_6_ebf885a7-df63-4a4a-9751-4b3e93a87ca6_1024x1024-370642-600x338.jpg 600w, https://www.audiworld.com/wp-content/uploads/2018/06/UF101_-_Audi_R8_6_ebf885a7-df63-4a4a-9751-4b3e93a87ca6_1024x1024-370642-220x125.jpg 220w, https://www.audiworld.com/wp-content/uploads/2018/06/UF101_-_Audi_R8_6_ebf885a7-df63-4a4a-9751-4b3e93a87ca6_1024x1024-370642-145x82.jpg 145w, https://www.audiworld.com/wp-content/uploads/2018/06/UF101_-_Audi_R8_6_ebf885a7-df63-4a4a-9751-4b3e93a87ca6_1024x1024-370642-310x175.jpg 310w, https://www.audiworld.com/wp-content/uploads/2018/06/UF101_-_Audi_R8_6_ebf885a7-df63-4a4a-9751-4b3e93a87ca6_1024x1024-370642-320x180.jpg 320w" sizes="(max-width: 640px) 100vw, 640px" data-attachment-id="36188" data-permalink="https://www.audiworld.com/how-tos/slideshows/keeping-you-and-your-car-cool-this-summer-541484/uf101_-_audi_r8_6_ebf885a7-df63-4a4a-9751-4b3e93a87ca6_1024x1024-370642-jpg/" data-orig-file="https://www.audiworld.com/wp-content/uploads/2018/06/UF101_-_Audi_R8_6_ebf885a7-df63-4a4a-9751-4b3e93a87ca6_1024x1024-370642.jpg" data-orig-size="640,360" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="UF101_-_Audi_R8_6_ebf885a7-df63-4a4a-9751-4b3e93a87ca6_1024x1024-370642.jpg" data-image-description="" data-medium-file="https://www.audiworld.com/wp-content/uploads/2018/06/UF101_-_Audi_R8_6_ebf885a7-df63-4a4a-9751-4b3e93a87ca6_1024x1024-370642-600x338.jpg" data-large-file="https://www.audiworld.com/wp-content/uploads/2018/06/UF101_-_Audi_R8_6_ebf885a7-df63-4a4a-9751-4b3e93a87ca6_1024x1024-370642.jpg" /></div><br />Warmer weather is finally here, but you need to help your car stay cool in the higher temperatures. If you are wondering how to keep things smooth this summer, there are plenty of things that you can do.]]></description> <enclosure url="" length="0" type="" /> <post-id xmlns="com-wordpress:feed-additions:1">36189</post-id> <image>https://www.audiworld.com/wp-content/uploads/2018/06/UF101_-_Audi_R8_6_ebf885a7-df63-4a4a-9751-4b3e93a87ca6_1024x1024-370642.jpg</image> <thumbnail>https://www.audiworld.com/wp-content/uploads/2018/06/UF101_-_Audi_R8_6_ebf885a7-df63-4a4a-9751-4b3e93a87ca6_1024x1024-370642-150x150.jpg</thumbnail> </item> <item> <title>Jay Leno&#8217;s Garage : Audi R8 RWS</title> <link>https://www.audiworld.com/articles/jay-lenos-garage-audi-r8-rws/</link> <pubDate>Tue, 26 Jun 2018 13:13:29 +0000</pubDate> <dc:creator><![CDATA[Kris Hansen]]></dc:creator> <category><![CDATA[Audi USA Sales]]></category> <category><![CDATA[Model News]]></category> <category><![CDATA[Anthony Garbis]]></category> <category><![CDATA[Jay Leno]]></category> <category><![CDATA[R8 RWS]]></category> <guid isPermaLink="false">https://www.audiworld.com/?p=36186</guid> <description><![CDATA[<div class="featured_image_post_rss"><img width="1152" height="813" src="https://www.audiworld.com/wp-content/uploads/2017/09/Audi-R8-RWS-01.jpg" class="attachment-full size-full" alt="" srcset="https://www.audiworld.com/wp-content/uploads/2017/09/Audi-R8-RWS-01.jpg 1152w, https://www.audiworld.com/wp-content/uploads/2017/09/Audi-R8-RWS-01-600x423.jpg 600w, https://www.audiworld.com/wp-content/uploads/2017/09/Audi-R8-RWS-01-768x542.jpg 768w, https://www.audiworld.com/wp-content/uploads/2017/09/Audi-R8-RWS-01-1024x723.jpg 1024w, https://www.audiworld.com/wp-content/uploads/2017/09/Audi-R8-RWS-01-640x452.jpg 640w" sizes="(max-width: 1152px) 100vw, 1152px" data-attachment-id="32563" data-permalink="https://www.audiworld.com/articles/puristic-driving-dynamics-new-audi-r8-v10-rws/audi-r8-rws/" data-orig-file="https://www.audiworld.com/wp-content/uploads/2017/09/Audi-R8-RWS-01.jpg" data-orig-size="1152,813" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;1494066188&quot;,&quot;copyright&quot;:&quot;AUDI AG&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;Audi R8 RWS&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="Audi R8 RWS" data-image-description="" data-medium-file="https://www.audiworld.com/wp-content/uploads/2017/09/Audi-R8-RWS-01-600x423.jpg" data-large-file="https://www.audiworld.com/wp-content/uploads/2017/09/Audi-R8-RWS-01-1024x723.jpg" /></div><br />It&#8217;s usually a good thing to be featured on Jay Leno&#8217;s Garage, so we were psyched to learn that Audi&#8217;s R8 RWS (Rear Wheel [drive] Series) was going to be featured on the show. You can read about the R8 RWS here. Enjoy the video!]]></description> <post-id xmlns="com-wordpress:feed-additions:1">36186</post-id> <image>https://www.audiworld.com/wp-content/uploads/2017/09/Audi-R8-RWS-01.jpg</image> <thumbnail>https://www.audiworld.com/wp-content/uploads/2017/09/Audi-R8-RWS-01-150x150.jpg</thumbnail> </item> <item> <title>Slideshow: Your Suspension Essentials for Proper Handling</title> <link>https://www.audiworld.com/how-tos/slideshows/your-suspension-essentials-for-proper-handling-540927</link> <pubDate>Mon, 25 Jun 2018 09:09:56 +0000</pubDate> <dc:creator><![CDATA[Audiworld.com]]></dc:creator> <category><![CDATA[Slideshows]]></category> <guid isPermaLink="false">http://www.audiworld.com/?guid=f2b5156ca4529cbd15e553c6e6a289e1</guid> <description><![CDATA[<div class="featured_image_post_rss"><img width="640" height="360" src="https://www.audiworld.com/wp-content/uploads/2018/06/audi-369631.jpg" class="attachment-full size-full" alt="" srcset="https://www.audiworld.com/wp-content/uploads/2018/06/audi-369631.jpg 640w, https://www.audiworld.com/wp-content/uploads/2018/06/audi-369631-600x338.jpg 600w, https://www.audiworld.com/wp-content/uploads/2018/06/audi-369631-220x125.jpg 220w, https://www.audiworld.com/wp-content/uploads/2018/06/audi-369631-145x82.jpg 145w, https://www.audiworld.com/wp-content/uploads/2018/06/audi-369631-310x175.jpg 310w, https://www.audiworld.com/wp-content/uploads/2018/06/audi-369631-320x180.jpg 320w" sizes="(max-width: 640px) 100vw, 640px" data-attachment-id="36180" data-permalink="https://www.audiworld.com/how-tos/slideshows/your-suspension-essentials-for-proper-handling-540927/audi-369631-jpg/" data-orig-file="https://www.audiworld.com/wp-content/uploads/2018/06/audi-369631.jpg" data-orig-size="640,360" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="audi-369631.jpg" data-image-description="" data-medium-file="https://www.audiworld.com/wp-content/uploads/2018/06/audi-369631-600x338.jpg" data-large-file="https://www.audiworld.com/wp-content/uploads/2018/06/audi-369631.jpg" /></div><br />Building your perfect suspension system is more than just a good set of wheels or some new shocks. Here is a list of components that create an all-around high-performance suspension. ]]></description> <enclosure url="" length="0" type="" /> <post-id xmlns="com-wordpress:feed-additions:1">36181</post-id> <image>https://www.audiworld.com/wp-content/uploads/2018/06/audi-369631.jpg</image> <thumbnail>https://www.audiworld.com/wp-content/uploads/2018/06/audi-369631-150x150.jpg</thumbnail> </item> <item> <title>ABT upgrades for the 2018 Audi A4 and S4 Sedan</title> <link>https://www.audiworld.com/articles/abt-upgrades-for-the-2018-audi-a4-and-s4-sedan/</link> <pubDate>Sun, 24 Jun 2018 13:46:23 +0000</pubDate> <dc:creator><![CDATA[Kris Hansen]]></dc:creator> <category><![CDATA[Tuner News]]></category> <guid isPermaLink="false">https://www.audiworld.com/?p=36157</guid> <description><![CDATA[<div class="featured_image_post_rss"><img width="1152" height="769" src="https://www.audiworld.com/wp-content/uploads/2018/06/Abt-Audi-A4S4-21.jpg" class="attachment-full size-full" alt="" srcset="https://www.audiworld.com/wp-content/uploads/2018/06/Abt-Audi-A4S4-21.jpg 1152w, https://www.audiworld.com/wp-content/uploads/2018/06/Abt-Audi-A4S4-21-600x401.jpg 600w, https://www.audiworld.com/wp-content/uploads/2018/06/Abt-Audi-A4S4-21-768x513.jpg 768w, https://www.audiworld.com/wp-content/uploads/2018/06/Abt-Audi-A4S4-21-1024x684.jpg 1024w, https://www.audiworld.com/wp-content/uploads/2018/06/Abt-Audi-A4S4-21-640x427.jpg 640w" sizes="(max-width: 1152px) 100vw, 1152px" data-attachment-id="36178" data-permalink="https://www.audiworld.com/articles/abt-upgrades-for-the-2018-audi-a4-and-s4-sedan/abt-audi-a4s4-21/" data-orig-file="https://www.audiworld.com/wp-content/uploads/2018/06/Abt-Audi-A4S4-21.jpg" data-orig-size="1152,769" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="Abt-Audi-A4S4-21" data-image-description="" data-medium-file="https://www.audiworld.com/wp-content/uploads/2018/06/Abt-Audi-A4S4-21-600x401.jpg" data-large-file="https://www.audiworld.com/wp-content/uploads/2018/06/Abt-Audi-A4S4-21-1024x684.jpg" /></div><br />The Audi S4 is the benchmark among medium-sized premium cars and will be on top of any situation with upgrades from ABT. With some new aerodynamic add-ons like a front skirt add-on, front grille frame and fender inserts, either made out of ABS plastic or carbon fiber, S4 owners (and A4 drivers too!) are ready [...]<a href="https://www.audiworld.com/articles/abt-upgrades-for-the-2018-audi-a4-and-s4-sedan/"> More &#187;</a>]]></description> <post-id xmlns="com-wordpress:feed-additions:1">36157</post-id> <image>https://www.audiworld.com/wp-content/uploads/2018/06/Abt-Audi-A4S4-21.jpg</image> <thumbnail>https://www.audiworld.com/wp-content/uploads/2018/06/Abt-Audi-A4S4-21-150x150.jpg</thumbnail> </item> <item> <title>Slideshow: To Boldly Go: Audi&#8217;s Mission to the Moon</title> <link>https://www.audiworld.com/how-tos/slideshows/to-boldly-go-audis-mission-to-the-moon-540929</link> <pubDate>Fri, 22 Jun 2018 06:27:01 +0000</pubDate> <dc:creator><![CDATA[Conor Fynes]]></dc:creator> <category><![CDATA[Slideshows]]></category> <guid isPermaLink="false">http://www.audiworld.com/?guid=a7bb87fb07d7a495e0a92455b6a7255d</guid> <description><![CDATA[<div class="featured_image_post_rss"><img width="640" height="360" src="https://www.audiworld.com/wp-content/uploads/2018/06/audilunar-369869.png" class="attachment-full size-full" alt="" srcset="https://www.audiworld.com/wp-content/uploads/2018/06/audilunar-369869.png 640w, https://www.audiworld.com/wp-content/uploads/2018/06/audilunar-369869-600x338.png 600w, https://www.audiworld.com/wp-content/uploads/2018/06/audilunar-369869-220x125.png 220w, https://www.audiworld.com/wp-content/uploads/2018/06/audilunar-369869-145x82.png 145w, https://www.audiworld.com/wp-content/uploads/2018/06/audilunar-369869-310x175.png 310w, https://www.audiworld.com/wp-content/uploads/2018/06/audilunar-369869-320x180.png 320w" sizes="(max-width: 640px) 100vw, 640px" data-attachment-id="36152" data-permalink="https://www.audiworld.com/how-tos/slideshows/to-boldly-go-audis-mission-to-the-moon-540929/audilunar-369869-png/" data-orig-file="https://www.audiworld.com/wp-content/uploads/2018/06/audilunar-369869.png" data-orig-size="640,360" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="audilunar-369869.png" data-image-description="" data-medium-file="https://www.audiworld.com/wp-content/uploads/2018/06/audilunar-369869-600x338.png" data-large-file="https://www.audiworld.com/wp-content/uploads/2018/06/audilunar-369869.png" /></div><br />You know the saying that "the sky's the limit?" Audi took that literally.]]></description> <enclosure url="" length="0" type="" /> <post-id xmlns="com-wordpress:feed-additions:1">36153</post-id> <image>https://www.audiworld.com/wp-content/uploads/2018/06/audilunar-369869.png</image> <thumbnail>https://www.audiworld.com/wp-content/uploads/2018/06/audilunar-369869-150x150.png</thumbnail> </item> <item> <title>Photo Gallery: All new Audi A1</title> <link>https://www.audiworld.com/articles/photo-gallery-all-new-audi-a1/</link> <pubDate>Thu, 21 Jun 2018 00:28:51 +0000</pubDate> <dc:creator><![CDATA[Kris Hansen]]></dc:creator> <category><![CDATA[Model News]]></category> <category><![CDATA[Photo Gallery]]></category> <category><![CDATA[Audi A1 Sportback]]></category> <guid isPermaLink="false">https://www.audiworld.com/?p=36150</guid> <description><![CDATA[<div class="featured_image_post_rss"><img width="1152" height="648" src="https://www.audiworld.com/wp-content/uploads/2018/06/Audi-A1-23.jpg" class="attachment-full size-full" alt="" srcset="https://www.audiworld.com/wp-content/uploads/2018/06/Audi-A1-23.jpg 1152w, https://www.audiworld.com/wp-content/uploads/2018/06/Audi-A1-23-600x338.jpg 600w, https://www.audiworld.com/wp-content/uploads/2018/06/Audi-A1-23-768x432.jpg 768w, https://www.audiworld.com/wp-content/uploads/2018/06/Audi-A1-23-1024x576.jpg 1024w, https://www.audiworld.com/wp-content/uploads/2018/06/Audi-A1-23-640x360.jpg 640w, https://www.audiworld.com/wp-content/uploads/2018/06/Audi-A1-23-220x125.jpg 220w, https://www.audiworld.com/wp-content/uploads/2018/06/Audi-A1-23-145x82.jpg 145w, https://www.audiworld.com/wp-content/uploads/2018/06/Audi-A1-23-310x175.jpg 310w, https://www.audiworld.com/wp-content/uploads/2018/06/Audi-A1-23-320x180.jpg 320w" sizes="(max-width: 1152px) 100vw, 1152px" data-attachment-id="36126" data-permalink="https://www.audiworld.com/articles/new-audi-a1-sportback-ideal-companion-for-an-urban-lifestyle/audi-a1-23/" data-orig-file="https://www.audiworld.com/wp-content/uploads/2018/06/Audi-A1-23.jpg" data-orig-size="1152,648" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;AUDI AG&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="Audi-A1-23" data-image-description="" data-medium-file="https://www.audiworld.com/wp-content/uploads/2018/06/Audi-A1-23-600x338.jpg" data-large-file="https://www.audiworld.com/wp-content/uploads/2018/06/Audi-A1-23-1024x576.jpg" /></div><br />]]></description> <post-id xmlns="com-wordpress:feed-additions:1">36150</post-id> <image>https://www.audiworld.com/wp-content/uploads/2018/06/Audi-A1-23.jpg</image> <thumbnail>https://www.audiworld.com/wp-content/uploads/2018/06/Audi-A1-23-150x150.jpg</thumbnail> </item> <item> <title>New Audi A1 Sportback – ideal companion for an urban lifestyle</title> <link>https://www.audiworld.com/articles/new-audi-a1-sportback-ideal-companion-for-an-urban-lifestyle/</link> <pubDate>Thu, 21 Jun 2018 00:14:44 +0000</pubDate> <dc:creator><![CDATA[Audi Media]]></dc:creator> <category><![CDATA[Model News]]></category> <category><![CDATA[Audi A1]]></category> <guid isPermaLink="false">https://www.audiworld.com/?p=36103</guid> <description><![CDATA[<div class="featured_image_post_rss"><img width="1152" height="648" src="https://www.audiworld.com/wp-content/uploads/2018/06/Audi-A1-35.jpg" class="attachment-full size-full" alt="" srcset="https://www.audiworld.com/wp-content/uploads/2018/06/Audi-A1-35.jpg 1152w, https://www.audiworld.com/wp-content/uploads/2018/06/Audi-A1-35-600x338.jpg 600w, https://www.audiworld.com/wp-content/uploads/2018/06/Audi-A1-35-768x432.jpg 768w, https://www.audiworld.com/wp-content/uploads/2018/06/Audi-A1-35-1024x576.jpg 1024w, https://www.audiworld.com/wp-content/uploads/2018/06/Audi-A1-35-640x360.jpg 640w, https://www.audiworld.com/wp-content/uploads/2018/06/Audi-A1-35-220x125.jpg 220w, https://www.audiworld.com/wp-content/uploads/2018/06/Audi-A1-35-145x82.jpg 145w, https://www.audiworld.com/wp-content/uploads/2018/06/Audi-A1-35-310x175.jpg 310w, https://www.audiworld.com/wp-content/uploads/2018/06/Audi-A1-35-320x180.jpg 320w" sizes="(max-width: 1152px) 100vw, 1152px" data-attachment-id="36138" data-permalink="https://www.audiworld.com/articles/new-audi-a1-sportback-ideal-companion-for-an-urban-lifestyle/audi-a1-sportback-33/" data-orig-file="https://www.audiworld.com/wp-content/uploads/2018/06/Audi-A1-35.jpg" data-orig-size="1152,648" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;AUDI AG&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;Audi A1 Sportback&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="Audi A1 Sportback" data-image-description="" data-medium-file="https://www.audiworld.com/wp-content/uploads/2018/06/Audi-A1-35-600x338.jpg" data-large-file="https://www.audiworld.com/wp-content/uploads/2018/06/Audi-A1-35-1024x576.jpg" /></div><br />Eye-catching, masculine design with taut lines Infotainment concepts from the Audi full-size class New driver assistance systems for more safety and comfort In 2010, a brand-new Audi model line made its debut in the shape of the A1. And now the second generation of the successful compact car is rolling to the starting line. Its [...]<a href="https://www.audiworld.com/articles/new-audi-a1-sportback-ideal-companion-for-an-urban-lifestyle/"> More &#187;</a>]]></description> <post-id xmlns="com-wordpress:feed-additions:1">36103</post-id> <image>https://www.audiworld.com/wp-content/uploads/2018/06/Audi-A1-35.jpg</image> <thumbnail>https://www.audiworld.com/wp-content/uploads/2018/06/Audi-A1-35-150x150.jpg</thumbnail> </item> <item> <title>Slideshow: How Audi&#8217;s Rosemeyer Gave us the Veyron</title> <link>https://www.audiworld.com/how-tos/slideshows/how-audis-rosemeyer-gave-us-the-veyron-540129</link> <pubDate>Wed, 20 Jun 2018 07:05:18 +0000</pubDate> <dc:creator><![CDATA[Christopher Hurst]]></dc:creator> <category><![CDATA[Slideshows]]></category> <guid isPermaLink="false">http://www.audiworld.com/?guid=77c422bb6ea624674537fcd7374c3012</guid> <description><![CDATA[<div class="featured_image_post_rss"><img width="640" height="360" src="https://www.audiworld.com/wp-content/uploads/2018/06/1-369758.jpg" class="attachment-full size-full" alt="" srcset="https://www.audiworld.com/wp-content/uploads/2018/06/1-369758.jpg 640w, https://www.audiworld.com/wp-content/uploads/2018/06/1-369758-600x338.jpg 600w, https://www.audiworld.com/wp-content/uploads/2018/06/1-369758-220x125.jpg 220w, https://www.audiworld.com/wp-content/uploads/2018/06/1-369758-145x82.jpg 145w, https://www.audiworld.com/wp-content/uploads/2018/06/1-369758-310x175.jpg 310w, https://www.audiworld.com/wp-content/uploads/2018/06/1-369758-320x180.jpg 320w" sizes="(max-width: 640px) 100vw, 640px" data-attachment-id="36100" data-permalink="https://www.audiworld.com/how-tos/slideshows/how-audis-rosemeyer-gave-us-the-veyron-540129/1-369758-jpg/" data-orig-file="https://www.audiworld.com/wp-content/uploads/2018/06/1-369758.jpg" data-orig-size="640,360" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="1-369758.jpg" data-image-description="" data-medium-file="https://www.audiworld.com/wp-content/uploads/2018/06/1-369758-600x338.jpg" data-large-file="https://www.audiworld.com/wp-content/uploads/2018/06/1-369758.jpg" /></div><br />Audi’s Rosemeyer is the granddaddy of all hypercars. Here’s the inside scoop on the car that gave us the ultimate line of speed machines.]]></description> <enclosure url="" length="0" type="" /> <post-id xmlns="com-wordpress:feed-additions:1">36101</post-id> <image>https://www.audiworld.com/wp-content/uploads/2018/06/1-369758.jpg</image> <thumbnail>https://www.audiworld.com/wp-content/uploads/2018/06/1-369758-150x150.jpg</thumbnail> </item> </channel> </rss>
DIGITAL Command Language
2
hsantos9/Winds
api/test/data/feed/audiworld.com
[ "BSD-3-Clause" ]
/** * Copyright © 2015 MLstate * * This file is part of Opa. * 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. */ /** * A language is associated to each user (cookie defined), each time a page is generated * in destination to the user it get localised with the current associated language (using * Intl.locale). The user can change its langage association (using Intl.setLocale). * The first time a user connect the association is initialised using Accept-language header * field (using Intl.requestLocale) * * An initial language is associatd to the server using system specific environment var * (using Intl.systemLocale). Currenlty the language can't be updated later and * can be consulted. * * String translations are stored server-side and loaded json files placed in a list of * predefined locale directories (using Intl.includeLocaleDirectory). Translation maps are * loaded whenever the server or a client makes a request for a translation in a new locale. * These locale files are updated whenever the server comes upon a string that hasn't been * trasnlated yet. */ /* @author Henri Chataing */ import-plugin {unix, server} import stdlib.core.parser import stdlib.core.map import stdlib.core.date import stdlib.core.web.context import stdlib.core.web.request import stdlib.core.rpc.core // Ensure dependencies for @sliced_expr are met. @opacapi Intl_locale = Intl.locale @opacapi Intl_format = Intl.format @opacapi Intl_printer = Intl.printer /** Language selection. */ type Intl.locale = { string language, string region // Empty if no region, e.g. 'en' } type Intl.translation = { Intl.printer printer, string translation } type Intl.printer = external type Intl.translationMap = Hashtbl.t(string, Intl.translation) type Intl.translationList = list((string, string)) type Intl.Client.translationMap = option({Intl.locale locale, Intl.translationMap translations}) module Intl { /** {1} Utils. */ @stringifier(Intl.locale) both function string localeToString(Intl.locale locale) { if (locale.region == "") locale.language else "{locale.language}-{locale.region}" } /** {1} Intl binding. */ /** Build a message printer using a set locale and a message format. */ exposed function Intl.printer serverPrinter(string format, Intl.locale locale) { translate(format, locale).printer // Reuse the pre-defined printer. } client function Intl.printer clientPrinter(string format, Intl.locale locale) { clientTranslate(format, locale).printer // Reuse the pre-defined printer. // translation = translateString(format, locale) // Get the message translation from the server. // %%IntlClient.printer%%(translation, "{locale}") // Build the message format locally. } function Intl.printer printer(string format, Intl.locale locale) { @sliced_expr({ client: clientPrinter(format, locale), server: serverPrinter(format, locale) }) } /** Apply a prepared printer to a context. */ exposed function string serverFormat(Intl.printer printer, list(string) context) { %%IntlServer.format%%(printer, context) } client function string clientFormat(Intl.printer printer, list(string) context) { %%IntlClient.format%%(printer, context) } function string format(Intl.printer printer, list(string) context) { @sliced_expr({ client: clientFormat(printer, context), server: serverFormat(printer, context) }) } /** {1} Locale library. */ /** * List locale include directories. Directories can be added to this list using the * function 'includeLocaleDirectory'. */ protected localeDirectories = Mutable.make(list(string) []) /** * Include a locale directory. Note that the directory will be rejected if non existent. * The function returns false in such cases. */ function includeLocaleDirectory(string dir) { dir = if (String.has_suffix("/", dir)) dir else "{dir}/" if (%%BslFile.exists%%(dir)) { directories = [dir|localeDirectories.get()] |> List.unique_list_of localeDirectories.set(directories) true } else false } /** * Explore locales directories in order to find the file matching the requested locale. * TODO: exploration is not recursive for the moment. */ protected function findLocaleFile(Intl.locale locale) { directories = localeDirectories.get() localefile = "{locale}.json" List.fold(function (dir, file) { match (file) { case {some: file}: some(file) default: if (%%BslFile.exists%%("{dir}{localefile}")) some("{dir}{localefile}") else none } }, directories, none) } /** Return an existing list of existing locale files. */ protected function listLocales() { List.fold(function (dir, locales) { if (%%BslFile.exists%%(dir)) { (err, files) = %%BslFile.readdir%%(dir) if (err == "") LowLevelArray.fold(function (file, locales) { if (%%BslFile.extname%%(file) == ".json") match (parseLocale(%%BslFile.basename%%(file, some(".json")))) { case {some: locale}: [locale|locales] default: locales } else locales }, files, locales) else locales } else locales }, localeDirectories.get(), []) |> List.unique_list_of } /** * Read a locale file and return the contents in a stringmap associating strings to * (translated) icu message formats. The structure of the Json must be: * * { "string0": "translation0", * "string1": "translation1", * .. } */ protected function importLocale(string localeFile, Intl.locale locale) { t0 = Date.now() content = %%BslFile.content%%(localeFile) |> Binary.to_string translations = match (Json.deserialize(content)) { case {some: {Record: strings}}: size = List.length(strings) translations = Hashtbl.create(size) List.iter(function ((string, translation)) { match (translation) { case {String: translation}: printer = %%IntlServer.printer%%(translation, "{locale}") Hashtbl.add(translations, string, ~{translation, printer}) default: Log.notice( "[Intl]", "While parsing locale file {localeFile}: Unable to parse translation of [{string}]") } }, strings) translations default: Log.notice("[Intl]", "Unable to parse locale file {localeFile}") Hashtbl.create(32) } t1 = Date.now() Log.notice("[Intl]", "importLocale: parsed {localeFile} ({Duration.between(t0, t1) |> Duration.in_milliseconds}ms)") translations } /** * Maintain a map of all currently available translation files. * Use loadLocale to load in a new locale file (which will be created if non * existent). */ protected loadedLocales = Mutable.make(stringmap(Intl.translationMap) StringMap.empty) /** * For each client, keep the translation map currently in use. * This code is refused by the server, so the reference is created directly in the client code (file intlclient.js). */ // client loadedTranslations = ClientReference.create(option({Intl.locale locale, Intl.translationMap translations}) none) /** * Read a locale file, parse it and import the translations into the loadedLocales map. * @return the new translation map. */ protected function Intl.translationMap loadLocale(Intl.locale locale) { translations = match (findLocaleFile(locale)) { case {some: localeFile}: importLocale(localeFile, locale) default: Hashtbl.create(32) // No locale file: import empty stringmap. } loadedLocales.set(StringMap.add("{locale}", translations, loadedLocales.get())) translations } /** Fetch the server translation map for the given locale. */ exposed function Intl.translationList sendTranslations(Intl.locale locale) { map = match (StringMap.get("{locale}", loadedLocales.get())) { case {some: map}: map default: loadLocale(locale) } Hashtbl.bindings(map) |> LowLevelArray.fold(function (~{key, value}, list) { [(key, value.translation)|list] }, _, []) } client function Intl.translationMap fetchLocale(Intl.locale locale) { list = sendTranslations(locale) translations = Hashtbl.create(List.length(list)) List.iter(function ((msg, translation)) { printer = %%IntlClient.printer%%(translation, "{locale}") Hashtbl.add(translations, msg, ~{translation, printer}) }, list) %%IntlClient.setTranslations%%(some(~{locale, translations})) translations } /** * Translate the string for the given locale. The function first checks the loaded locales * for the right locale translation map. If the map hans't been loaded, will look through * locale directories for the translation file and dynamically load it. * If the translation still cannot be found, the translation defaults to the original string, * and a binding is added to the translation map with the default value. */ protected function Intl.translation translate(string message, Intl.locale locale) { localeStr = "{locale}" translationMap = match (StringMap.get(localeStr, loadedLocales.get())) { case {some: map}: map default: loadLocale(locale) } match (Hashtbl.try_find(translationMap, message)) { case {some: translation}: translation default: printer = %%IntlServer.printer%%(message, localeStr) translation = ~{translation: message, printer} Hashtbl.add(translationMap, message, translation) // translationMap = StringMap.add(message, translation, translationMap) // loadedLocales.set(StringMap.add(localeStr, translationMap, loadedLocales.get())) exportLocale(locale, translationMap) translation } } /** Same as translate, but returns only the string translation. */ client function Intl.translation clientTranslate(string message, Intl.locale locale) { localeStr = "{locale}" translationMap = match (%%IntlClient.getTranslations%%()) { case {some: ~{locale: loadedLocale, translations}}: if (loadedLocale == locale) translations else fetchLocale(locale) default: fetchLocale(locale) } match (Hashtbl.try_find(translationMap, message)) { case {some: translation}: translation default: printer = %%IntlClient.printer%%(message, localeStr) translation = ~{translation: message, printer} Hashtbl.add(translationMap, message, translation) // Missing translation should be notified somehow. translation } } /** * Reverse operation: export translation strings. * If the locale already has an assigned file, the new translation map is exported to this file. * Else, the locale is inserted in the first directory (last included). Translated strings are always * inserted in lexical order. */ protected @async function exportLocale(Intl.locale locale, Intl.translationMap translations) { file = match (findLocaleFile(locale)) { case {some: file}: some(file) default: match (localeDirectories.get()) { case [dir|_]: some("{dir}{locale}.json") default: none } } match (file) { case {some: file}: // The size estimate include the punctutation marks on each line. pad = String.byte_length(" \"\": \"\",\n") translations = Hashtbl.bindings(translations) size = LowLevelArray.size(translations) sizeEstimate = LowLevelArray.fold( function (~{key, value}, size) { size + String.byte_length(key) + String.byte_length(value.translation) + pad }, translations, String.byte_length("\{\n\}") ) orderedTranslations = LowLevelArray.fold( function (~{key, value}, map) { StringMap.add(key, value, map) }, translations, StringMap.empty ) |> StringMap.To.assoc_list content = Binary.create(sizeEstimate) Binary.add_string(content, "\{\n") List.iteri(function (i, (key, value)) { if (i < size-1) Binary.add_string(content, " \"{key}\": \"{value.translation}\",\n") else Binary.add_string(content, " \"{key}\": \"{value.translation}\"\n") }, orderedTranslations) Binary.add_string(content, "\}") // Write the content to the file. %%BslFile.write%%(file, content) default: void } } /** {1} Locale settings. */ both defaultLocale = {language: "en", region: "UK"} /** Return the locale of the server. */ exposed function Intl.locale systemLocale() { function extract(string key) { Option.bind(parseLocale, %%BslSys.get_env_var%%(key)) } // OS specific. TODO Mac and Windows case. extract("LANG") ? // Linux, e.g. fr_FR.UTF-8 extract("LANGUAGE") ? // Linux, e.g. fr_FR:en defaultLocale } /** Parse a locale string. */ both function option(Intl.locale) parseLocale(string s) { // Will cause problem with UTF-8 on linux LANG. sep = parser { case [-_:.,;'`]: void } localePart = parser { case part=((!sep .)+) sep*: Text.to_string(part) } localeParts = parser { case parts=localePart*: parts } match (Parser.parse(localeParts, s)) { case [language,region|_]: some(~{language, region}) default: none } } /** Keeps track of the client locales. */ private protected userLocale = UserContext.make(option(Intl.locale) none) /** * Change the client locale. * TODO: bind lang observers to propagate lang updates. */ exposed function setLocale(Intl.locale locale) { match (thread_context().key) { case {client: _}: UserContext.change(function (_) { some(locale) }, userLocale) default: void } } /** Return the optional locale associated with the active client user. */ function localeOpt() { match (thread_context().key) { case {client: _}: UserContext.execute(identity, userLocale) default: none } } /** * Return the current locale. Depending on the execution side: * - client: returns the client locale. * - server with client: returns the content of the Accept-Locale header. * - on an isolated server: returns the server locale. */ exposed function Intl.locale locale() { localeOpt() ? systemLocale() } /** Return the locale set in the request headers. */ function requestLocale(request) { match (HttpRequest.Generic.`get_Accept-Language`(request)) { case {some: locale}: match (parseLocale(locale)) { case {some: locale}: locale default: systemLocale() } default: systemLocale() } } /** * If the locale is undefined for the context user, then initialize it using the value * of the Accept-Language header. */ function touchLocale(request) { match (localeOpt()) { case {none}: setLocale(requestLocale(request)) default: void } } } // END INTL
Opa
5
Machiaweliczny/oppailang
lib/stdlib/core/intl/intl.opa
[ "MIT" ]
18 cluster-06 1 O 0.726240 -1.383720 -0.376010 1 2 3 2 H -0.025170 -0.828120 -0.611270 2 1 3 H 1.456460 -1.010910 -0.922600 2 1 4 O -1.323580 0.387070 -0.825500 1 5 6 5 H -1.923060 0.698400 -1.547540 2 4 6 H -1.173230 1.183790 -0.294770 2 4 7 O 0.836890 -1.040680 2.427980 1 8 9 8 H 1.024420 -1.239610 1.461440 2 7 9 H 1.409530 -1.677400 2.826950 2 7 10 O 2.765280 0.338510 -1.504840 1 11 12 11 H 2.833770 0.809320 -0.684880 2 10 12 H 3.582160 -0.189940 -1.593220 2 10 13 O -0.915910 2.704790 0.798780 1 14 15 14 H -0.227040 2.580070 1.425850 2 13 15 H -0.873980 3.617720 0.468210 2 13 16 O -2.842850 -1.748750 0.001430 1 17 18 17 H -2.928060 -2.324220 -0.815380 2 16 18 H -2.401870 -0.876300 -0.234650 2 16
Arc
1
bieniekmateusz/forcebalance
src/tests/files/amoeba_h2o6/hex.arc
[ "BSD-3-Clause" ]
package com.baeldung.concurrent.locks; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.util.HashMap; import java.util.Map; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.locks.Lock; import java.util.concurrent.locks.ReadWriteLock; import java.util.concurrent.locks.ReentrantReadWriteLock; import static java.lang.Thread.sleep; public class SynchronizedHashMapWithRWLock { private static Map<String, String> syncHashMap = new HashMap<>(); private Logger logger = LoggerFactory.getLogger(SynchronizedHashMapWithRWLock.class); private final ReadWriteLock lock = new ReentrantReadWriteLock(); private final Lock readLock = lock.readLock(); private final Lock writeLock = lock.writeLock(); public void put(String key, String value) throws InterruptedException { try { writeLock.lock(); logger.info(Thread.currentThread().getName() + " writing"); syncHashMap.put(key, value); sleep(1000); } finally { writeLock.unlock(); } } public String get(String key) { try { readLock.lock(); logger.info(Thread.currentThread().getName() + " reading"); return syncHashMap.get(key); } finally { readLock.unlock(); } } public String remove(String key) { try { writeLock.lock(); return syncHashMap.remove(key); } finally { writeLock.unlock(); } } public boolean containsKey(String key) { try { readLock.lock(); return syncHashMap.containsKey(key); } finally { readLock.unlock(); } } boolean isReadLockAvailable() { return readLock.tryLock(); } public static void main(String[] args) throws InterruptedException { final int threadCount = 3; final ExecutorService service = Executors.newFixedThreadPool(threadCount); SynchronizedHashMapWithRWLock object = new SynchronizedHashMapWithRWLock(); service.execute(new Thread(new Writer(object), "Writer")); service.execute(new Thread(new Reader(object), "Reader1")); service.execute(new Thread(new Reader(object), "Reader2")); service.shutdown(); } private static class Reader implements Runnable { SynchronizedHashMapWithRWLock object; Reader(SynchronizedHashMapWithRWLock object) { this.object = object; } @Override public void run() { for (int i = 0; i < 10; i++) { object.get("key" + i); } } } private static class Writer implements Runnable { SynchronizedHashMapWithRWLock object; public Writer(SynchronizedHashMapWithRWLock object) { this.object = object; } @Override public void run() { for (int i = 0; i < 10; i++) { try { object.put("key" + i, "value" + i); sleep(1000); } catch (InterruptedException e) { e.printStackTrace(); } } } } }
Java
5
zeesh49/tutorials
core-java-concurrency/src/main/java/com/baeldung/concurrent/locks/SynchronizedHashMapWithRWLock.java
[ "MIT" ]
scriptname _Seed_MeterController extends Quest ; Meter widget tested as working under the following criteria: Height = -20, Width = 265.75. ; Scale meter relative to these values or visual errors will occur. import Utility Actor property PlayerRef auto GlobalVariable property AttributeGlobal auto {Set in the CK. The global that corresponds to this meter's displayed attribute.} GlobalVariable property _Seed_DebugMetersAlwaysOn auto ; 1 = Magicka ; 2 = Health ; 3 = Stamina int property CompanionResource auto hidden ; Assumptions: ; Always display needs meters when improving if not Always Off ; Needs Meter Display Mode: ; Display... ; 0 = Always On ; 1 = On action, H/M/S, time, and status (contextual, most frequent) ; 2 = On action, H/M/S, and status change ; Default ; 3 = On H/M/S and status change ; 4 = On status change (contextual, least frequent) ; 5 = Always Off GlobalVariable property _Seed_Setting_NeedsMeterDisplayMode auto GlobalVariable property _Seed_Setting_MetersAlwaysOnWhenLow auto GlobalVariable property _Seed_Setting_InvertMeterFillBehavior auto ; Vitality Meter Display Mode: ; Display... ; 0 = Always On ; 1 = Always On if < 100% (contextual, most frequent) ; 2 = With Needs meters and status change ; 3 = With Needs meters if Vitality < 100% and status change ; 4 = On status change (contextual, least frequent) ; Default ; 5 = Always Off (display warning message) GlobalVariable property _Seed_Setting_VitalityMeterDisplayMode auto GlobalVariable property _Seed_Setting_MeterOpacity auto float METER_TRANSITION_TIME = 3.0 bool transitioning = false function UpdateMeter(float afPercent) ;@TODO ;if shutdown ; return ;endif ;@TODO: Centralize _Seed_SKI_MeterWidget meter = ((self as Quest) as _Seed_SKI_MeterWidget) if _Seed_Setting_InvertMeterFillBehavior.GetValueInt() == 2 meter.SetPercent(1.0 - afPercent) else meter.SetPercent(afPercent) endif endFunction function DisplayMeter(bool abFlash = false) int mode = _Seed_Setting_NeedsMeterDisplayMode.GetValueInt() if mode == 0 || mode == 5 return endif ; If we should display this update, wait until we're done transitioning. int i = 0 while (transitioning) && i < 50 wait(0.1) i += 1 endWhile ;@TODO: Centralize _Seed_SKI_MeterWidget meter = ((self as Quest) as _Seed_SKI_MeterWidget) if meter.Alpha == 0.0 transitioning = true meter.FadeTo(_Seed_Setting_MeterOpacity.GetValue(), METER_TRANSITION_TIME) wait(METER_TRANSITION_TIME) transitioning = false endif if abFlash meter.StartFlash() endif RegisterForSingleUpdate(4.0) endFunction function HideMeter() debug.trace("[LastSeed] HideMeter()") ;@TODO: Centralize _Seed_SKI_MeterWidget meter = ((self as Quest) as _Seed_SKI_MeterWidget) transitioning = true meter.FadeTo(0.0, METER_TRANSITION_TIME) wait(METER_TRANSITION_TIME) transitioning = false endFunction function SetAlwaysOn() ;@TODO: Centralize _Seed_SKI_MeterWidget meter = ((self as Quest) as _Seed_SKI_MeterWidget) meter.FadeTo(_Seed_Setting_MeterOpacity.GetValue(), METER_TRANSITION_TIME) endFunction function SetAlwaysOff() ;@TODO: Centralize _Seed_SKI_MeterWidget meter = ((self as Quest) as _Seed_SKI_MeterWidget) meter.FadeTo(0.0, METER_TRANSITION_TIME) endFunction Event OnUpdate() debug.trace("[LastSeed] Meter display update " + CompanionResource) int mode = _Seed_Setting_NeedsMeterDisplayMode.GetValueInt() ; Sanity check - bail out on Always On / Off if mode == 0 || mode == 5 return endif ; If value is low and setting enabled, stay on if _Seed_Setting_MetersAlwaysOnWhenLow.GetValueInt() == 2 && AttributeGlobal.GetValue() >= 80.0 debug.trace("[LastSeed] Value too low, staying on. " + CompanionResource) RegisterForSingleUpdate(7.0) return endif float av_pct if mode >= 1 && mode <= 3 if CompanionResource == 1 av_pct = PlayerRef.GetAVPercentage("Magicka") elseif CompanionResource == 2 av_pct = PlayerRef.GetAVPercentage("Health") elseif CompanionResource == 3 av_pct = PlayerRef.GetAVPercentage("Stamina") endif if av_pct == 1.0 HideMeter() else debug.trace("[LastSeed] Didn't meet hide conditions, staying on. " + CompanionResource) RegisterForSingleUpdate(7.0) endif elseif mode == 4 HideMeter() endif endEvent function SetMeterPosition(string asHAnchor, string asVAnchor, string asFillDirection, float afX, float afY, \ float afHeight, float afWidth) ;@TODO: Centralize _Seed_SKI_MeterWidget meter = ((self as Quest) as _Seed_SKI_MeterWidget) meter.HAnchor = asHAnchor meter.VAnchor = asVAnchor meter.FillDirection = asFillDirection meter.X = afX meter.Y = afY meter.Height = afHeight meter.Width = afWidth endFunction function SetMeterColor(int aiPrimaryColor) ;@TODO: Centralize _Seed_SKI_MeterWidget meter = ((self as Quest) as _Seed_SKI_MeterWidget) meter.PrimaryColor = aiPrimaryColor endFunction
Papyrus
5
chesko256/Campfire
Scripts/Source/_Seed_MeterController.psc
[ "MIT" ]
# # This is the default publish virtualhost definition for Apache. # # DO NOT EDIT this file, your changes will have no impact on your deployment. # # Instead create a copy in the folder conf.d/available_vhosts and edit the copy. # Finally, change to the directory conf.d/enabled_vhosts, remove the symbolic # link for default.vhost and create a symbolic link to your copy. # # Include customer defined variables Include conf.d/variables/custom.vars <VirtualHost *:80> ServerName "publish" # Put names of which domains are used for your published site/content here ServerAlias "*" # Use a document root that matches the one in conf.dispatcher.d/default.farm DocumentRoot "${DOCROOT}" # Add header breadcrumbs for help in troubleshooting <IfModule mod_headers.c> Header add X-Vhost "publish" </IfModule> <Directory /> <IfModule disp_apache2.c> # Some items cache with the wrong mime type # Use this option to use the name to auto-detect mime types when cached improperly ModMimeUsePathInfo On # Use this option to avoid cache poisioning # Sling will return /content/image.jpg as well as /content/image.jpg/ but apache can't search /content/image.jpg/ as a file # Apache will treat that like a directory. This assures the last slash is never stored in cache DirectorySlash Off # Enable the dispatcher file handler for apache to fetch files from AEM SetHandler dispatcher-handler </IfModule> Options FollowSymLinks AllowOverride None # Insert filter SetOutputFilter DEFLATE # Don't compress images SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary # Make sure proxies don't deliver the wrong content Header append Vary User-Agent env=!dont-vary # Prevent clickjacking Header always append X-Frame-Options SAMEORIGIN </Directory> <Directory "${DOCROOT}"> AllowOverride None Require all granted </Directory> <IfModule disp_apache2.c> # Enabled to allow rewrites to take affect and not be ignored by the dispatcher module DispatcherUseProcessedURL On # Default setting to allow all errors to come from the aem instance DispatcherPassError 0 </IfModule> <IfModule mod_rewrite.c> RewriteEngine on Include conf.d/rewrites/rewrite.rules # Rewrite index page internally, pass through (PT) RewriteRule "^(/?)$" "/index" [PT] </IfModule> </VirtualHost>
ApacheConf
4
LeoYimingLi/asset-share-commons
dispatcher/src/conf.d/enabled_vhosts/default.vhost
[ "Apache-2.0" ]
<?xml version="1.0" encoding="UTF-8"?> <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="371pt" height="178pt" viewBox="0 0 371 178" version="1.1"> <defs> <g> <symbol overflow="visible" id="glyph0-0"> <path style="stroke:none;" d=""/> </symbol> <symbol overflow="visible" id="glyph0-1"> <path style="stroke:none;" d="M 6.265625 -5.953125 L 4.4375 -5.953125 L 4.4375 -5.78125 C 4.796875 -5.75 5.078125 -5.765625 5.078125 -5.421875 C 5.078125 -5.265625 5.015625 -5.046875 4.90625 -4.765625 L 3.59375 -1.453125 L 2.21875 -4.53125 C 1.953125 -5.125 1.875 -5.34375 1.875 -5.484375 C 1.875 -5.671875 1.984375 -5.75 2.28125 -5.765625 L 2.53125 -5.78125 L 2.53125 -5.953125 L 0.140625 -5.953125 L 0.140625 -5.78125 C 0.59375 -5.78125 0.734375 -5.671875 1.109375 -4.796875 L 3.3125 0.09375 L 3.453125 0.09375 L 5.4375 -4.96875 C 5.703125 -5.640625 5.90625 -5.78125 6.265625 -5.78125 Z M 6.265625 -5.953125 "/> </symbol> <symbol overflow="visible" id="glyph0-2"> <path style="stroke:none;" d="M 3.671875 -1.46875 C 3.234375 -0.8125 2.890625 -0.53125 2.28125 -0.53125 C 1.875 -0.53125 1.53125 -0.6875 1.28125 -1.03125 C 0.96875 -1.453125 0.921875 -1.8125 0.875 -2.5 L 3.640625 -2.5 C 3.609375 -2.984375 3.515625 -3.265625 3.34375 -3.515625 C 3.046875 -3.921875 2.640625 -4.140625 2.09375 -4.140625 C 0.953125 -4.140625 0.21875 -3.21875 0.21875 -1.953125 C 0.21875 -0.71875 0.875 0.09375 1.9375 0.09375 C 2.828125 0.09375 3.46875 -0.4375 3.8125 -1.40625 Z M 0.890625 -2.78125 C 0.984375 -3.453125 1.34375 -3.8125 1.84375 -3.8125 C 2.4375 -3.8125 2.625 -3.515625 2.734375 -2.78125 Z M 0.890625 -2.78125 "/> </symbol> <symbol overflow="visible" id="glyph0-3"> <path style="stroke:none;" d="M 1.4375 -4.125 L 1.390625 -4.140625 C 0.921875 -3.953125 0.59375 -3.828125 0.0625 -3.65625 L 0.0625 -3.515625 C 0.1875 -3.53125 0.265625 -3.546875 0.375 -3.546875 C 0.609375 -3.546875 0.6875 -3.40625 0.6875 -3 L 0.6875 -0.75 C 0.6875 -0.3125 0.625 -0.25 0.046875 -0.140625 L 0.046875 0 L 2.203125 0 L 2.203125 -0.140625 C 1.59375 -0.15625 1.4375 -0.296875 1.4375 -0.8125 L 1.4375 -2.828125 C 1.4375 -3.125 1.8125 -3.578125 2.0625 -3.578125 C 2.125 -3.578125 2.203125 -3.53125 2.296875 -3.4375 C 2.453125 -3.296875 2.546875 -3.265625 2.65625 -3.265625 C 2.875 -3.265625 3.015625 -3.40625 3.015625 -3.65625 C 3.015625 -3.953125 2.828125 -4.140625 2.515625 -4.140625 C 2.140625 -4.140625 1.890625 -3.9375 1.4375 -3.296875 Z M 1.4375 -4.125 "/> </symbol> <symbol overflow="visible" id="glyph0-4"> <path style="stroke:none;" d="M 4.28125 -4.046875 L 3.078125 -4.046875 L 3.078125 -3.921875 C 3.359375 -3.921875 3.484375 -3.84375 3.484375 -3.703125 C 3.484375 -3.65625 3.484375 -3.59375 3.453125 -3.53125 L 2.578125 -1.046875 L 1.578125 -3.296875 C 1.515625 -3.421875 1.453125 -3.578125 1.453125 -3.671875 C 1.453125 -3.828125 1.578125 -3.890625 1.96875 -3.921875 L 1.96875 -4.046875 L 0.125 -4.046875 L 0.125 -3.921875 C 0.359375 -3.890625 0.515625 -3.8125 0.609375 -3.609375 L 1.796875 -1.078125 C 1.96875 -0.71875 2.171875 -0.296875 2.171875 -0.15625 C 2.171875 -0.015625 1.984375 0.546875 1.8125 0.8125 C 1.671875 1.03125 1.484375 1.203125 1.359375 1.203125 C 1.3125 1.203125 1.21875 1.203125 1.125 1.140625 C 0.96875 1.046875 0.8125 1.03125 0.65625 1.03125 C 0.4375 1.03125 0.265625 1.21875 0.265625 1.4375 C 0.265625 1.734375 0.515625 1.96875 0.90625 1.96875 C 1.578125 1.96875 2 1.5 2.46875 0.21875 L 3.828125 -3.453125 C 3.953125 -3.78125 4.0625 -3.890625 4.28125 -3.921875 Z M 4.28125 -4.046875 "/> </symbol> <symbol overflow="visible" id="glyph0-5"> <path style="stroke:none;" d=""/> </symbol> <symbol overflow="visible" id="glyph0-6"> <path style="stroke:none;" d="M 4.3125 -0.453125 L 4.265625 -0.453125 C 3.859375 -0.453125 3.75 -0.546875 3.75 -0.96875 L 3.75 -4.046875 L 2.328125 -4.046875 L 2.328125 -3.890625 C 2.875 -3.859375 3 -3.78125 3 -3.3125 L 3 -1.234375 C 3 -0.921875 2.9375 -0.84375 2.796875 -0.71875 C 2.5625 -0.515625 2.296875 -0.4375 2.03125 -0.4375 C 1.6875 -0.4375 1.390625 -0.734375 1.390625 -1.140625 L 1.390625 -4.046875 L 0.078125 -4.046875 L 0.078125 -3.921875 C 0.515625 -3.890625 0.640625 -3.765625 0.640625 -3.328125 L 0.640625 -1.0625 C 0.640625 -0.375 1.046875 0.09375 1.734375 0.09375 C 2.0625 0.09375 2.578125 -0.078125 3.03125 -0.6875 L 3.046875 -0.6875 L 3.046875 0.046875 L 3.09375 0.078125 C 3.53125 -0.09375 3.859375 -0.203125 4.3125 -0.328125 Z M 4.3125 -0.453125 "/> </symbol> <symbol overflow="visible" id="glyph0-7"> <path style="stroke:none;" d="M 4.359375 0 L 4.359375 -0.140625 C 3.921875 -0.1875 3.8125 -0.28125 3.8125 -0.765625 L 3.8125 -2.75 C 3.8125 -3.640625 3.4375 -4.140625 2.75 -4.140625 C 2.34375 -4.140625 1.921875 -3.9375 1.453125 -3.40625 L 1.453125 -4.109375 L 1.375 -4.140625 C 0.9375 -3.984375 0.640625 -3.875 0.140625 -3.734375 L 0.140625 -3.578125 C 0.203125 -3.609375 0.3125 -3.625 0.40625 -3.625 C 0.65625 -3.625 0.71875 -3.46875 0.71875 -3.03125 L 0.71875 -0.84375 C 0.71875 -0.3125 0.625 -0.171875 0.15625 -0.140625 L 0.15625 0 L 2.0625 0 L 2.0625 -0.140625 C 1.609375 -0.171875 1.46875 -0.296875 1.46875 -0.640625 L 1.46875 -3.125 C 1.890625 -3.53125 2.109375 -3.640625 2.40625 -3.640625 C 2.84375 -3.640625 3.0625 -3.375 3.0625 -2.734375 L 3.0625 -0.9375 C 3.0625 -0.34375 2.953125 -0.171875 2.5 -0.140625 L 2.5 0 Z M 4.359375 0 "/> </symbol> <symbol overflow="visible" id="glyph0-8"> <path style="stroke:none;" d="M 1.40625 -2.703125 C 1.15625 -2.859375 1.015625 -3.125 1.015625 -3.328125 C 1.015625 -3.75 1.3125 -3.9375 1.6875 -3.9375 C 2.234375 -3.9375 2.5 -3.640625 2.703125 -2.828125 L 2.84375 -2.828125 L 2.796875 -4.046875 L 2.703125 -4.046875 C 2.625 -3.96875 2.59375 -3.953125 2.5625 -3.953125 C 2.5 -3.953125 2.40625 -3.984375 2.296875 -4.03125 C 2.109375 -4.125 1.921875 -4.125 1.703125 -4.125 C 0.96875 -4.125 0.453125 -3.734375 0.453125 -3.03125 C 0.453125 -2.5625 0.796875 -2.140625 1.53125 -1.71875 L 2.03125 -1.453125 C 2.328125 -1.28125 2.5 -1.046875 2.5 -0.78125 C 2.5 -0.40625 2.21875 -0.109375 1.75 -0.109375 C 1.140625 -0.109375 0.796875 -0.5 0.609375 -1.375 L 0.46875 -1.375 L 0.46875 0.03125 L 0.578125 0.03125 C 0.640625 -0.046875 0.6875 -0.078125 0.796875 -0.078125 C 0.90625 -0.078125 1 -0.0625 1.21875 0.015625 C 1.421875 0.078125 1.6875 0.09375 1.875 0.09375 C 2.5625 0.09375 3.125 -0.4375 3.125 -1.03125 C 3.125 -1.546875 2.921875 -1.796875 2.34375 -2.140625 Z M 1.40625 -2.703125 "/> </symbol> <symbol overflow="visible" id="glyph0-9"> <path style="stroke:none;" d="M 3.984375 -0.59375 C 3.828125 -0.46875 3.734375 -0.421875 3.59375 -0.421875 C 3.421875 -0.421875 3.3125 -0.609375 3.3125 -1.015625 L 3.3125 -2.734375 C 3.3125 -3.28125 3.28125 -3.46875 3.0625 -3.734375 C 2.84375 -4 2.5 -4.140625 2 -4.140625 C 1.59375 -4.140625 1.21875 -4.03125 0.96875 -3.875 C 0.640625 -3.671875 0.5 -3.390625 0.5 -3.15625 C 0.5 -2.90625 0.703125 -2.734375 0.890625 -2.734375 C 1.125 -2.734375 1.3125 -2.9375 1.3125 -3.109375 C 1.3125 -3.296875 1.25 -3.328125 1.25 -3.484375 C 1.25 -3.71875 1.515625 -3.921875 1.875 -3.921875 C 2.28125 -3.921875 2.578125 -3.671875 2.578125 -3.109375 L 2.578125 -2.625 C 1.5625 -2.25 1.234375 -2.078125 0.96875 -1.90625 C 0.609375 -1.671875 0.328125 -1.3125 0.328125 -0.84375 C 0.328125 -0.25 0.71875 0.09375 1.28125 0.09375 C 1.671875 0.09375 2.109375 -0.03125 2.578125 -0.5625 L 2.59375 -0.5625 C 2.640625 -0.09375 2.828125 0.09375 3.171875 0.09375 C 3.46875 0.09375 3.703125 0 3.984375 -0.34375 Z M 2.578125 -1.140625 C 2.578125 -0.875 2.53125 -0.75 2.265625 -0.578125 C 2.109375 -0.484375 1.921875 -0.4375 1.75 -0.4375 C 1.390625 -0.4375 1.125 -0.640625 1.125 -1.125 C 1.125 -1.40625 1.21875 -1.625 1.4375 -1.8125 C 1.65625 -2.03125 2.03125 -2.21875 2.578125 -2.40625 Z M 2.578125 -1.140625 "/> </symbol> <symbol overflow="visible" id="glyph0-10"> <path style="stroke:none;" d="M 2.3125 0 L 2.3125 -0.140625 C 1.734375 -0.171875 1.640625 -0.28125 1.640625 -0.78125 L 1.640625 -6.109375 L 1.59375 -6.140625 C 1.125 -6 0.796875 -5.90625 0.171875 -5.75 L 0.171875 -5.609375 C 0.3125 -5.625 0.4375 -5.625 0.5 -5.625 C 0.796875 -5.625 0.875 -5.484375 0.875 -5.046875 L 0.875 -0.828125 C 0.875 -0.328125 0.75 -0.1875 0.1875 -0.140625 L 0.1875 0 Z M 2.3125 0 "/> </symbol> <symbol overflow="visible" id="glyph0-11"> <path style="stroke:none;" d="M 4.234375 -2.078125 C 4.234375 -3.328125 3.390625 -4.140625 2.28125 -4.140625 C 1.078125 -4.140625 0.265625 -3.296875 0.265625 -2.046875 C 0.265625 -0.796875 1.109375 0.09375 2.203125 0.09375 C 3.421875 0.09375 4.234375 -0.828125 4.234375 -2.078125 Z M 3.421875 -1.84375 C 3.421875 -0.796875 3.03125 -0.15625 2.359375 -0.15625 C 2.03125 -0.15625 1.75 -0.328125 1.546875 -0.609375 C 1.21875 -1.09375 1.078125 -1.75 1.078125 -2.453125 C 1.078125 -3.359375 1.5 -3.890625 2.109375 -3.890625 C 2.5 -3.890625 2.75 -3.703125 2.96875 -3.4375 C 3.265625 -3.0625 3.421875 -2.453125 3.421875 -1.84375 Z M 3.421875 -1.84375 "/> </symbol> <symbol overflow="visible" id="glyph0-12"> <path style="stroke:none;" d="M 1.375 -6.125 L 1.328125 -6.140625 C 0.953125 -6.015625 0.71875 -5.953125 0.296875 -5.828125 L 0.03125 -5.75 L 0.03125 -5.59375 C 0.078125 -5.609375 0.109375 -5.609375 0.1875 -5.609375 C 0.546875 -5.609375 0.625 -5.546875 0.625 -5.09375 L 0.625 -0.5 C 0.625 -0.203125 1.375 0.09375 2.109375 0.09375 C 3.296875 0.09375 4.21875 -0.828125 4.21875 -2.15625 C 4.21875 -3.28125 3.5625 -4.140625 2.59375 -4.140625 C 2.046875 -4.140625 1.5625 -3.84375 1.375 -3.390625 Z M 1.375 -2.859375 C 1.375 -3.234375 1.796875 -3.578125 2.265625 -3.578125 C 2.59375 -3.578125 2.875 -3.421875 3.0625 -3.15625 C 3.296875 -2.828125 3.421875 -2.3125 3.421875 -1.765625 C 3.421875 -1.25 3.296875 -0.859375 3.09375 -0.578125 C 2.890625 -0.328125 2.59375 -0.203125 2.25 -0.203125 C 1.78125 -0.203125 1.375 -0.375 1.375 -0.671875 Z M 1.375 -2.859375 "/> </symbol> <symbol overflow="visible" id="glyph0-13"> <path style="stroke:none;" d="M 4.296875 -4.046875 L 3.046875 -4.046875 L 3.046875 -3.921875 C 3.328125 -3.890625 3.46875 -3.796875 3.46875 -3.625 C 3.46875 -3.53125 3.453125 -3.453125 3.40625 -3.359375 L 2.515625 -1.03125 L 1.609375 -3.328125 C 1.546875 -3.46875 1.515625 -3.578125 1.515625 -3.671875 C 1.515625 -3.828125 1.625 -3.890625 1.9375 -3.921875 L 1.9375 -4.046875 L 0.171875 -4.046875 L 0.171875 -3.921875 C 0.515625 -3.890625 0.609375 -3.8125 0.984375 -2.875 L 2.0625 -0.296875 C 2.109375 -0.21875 2.109375 -0.15625 2.140625 -0.109375 C 2.203125 0.046875 2.25 0.125 2.296875 0.125 C 2.359375 0.125 2.421875 0.015625 2.5625 -0.328125 L 3.703125 -3.21875 C 3.953125 -3.8125 4.015625 -3.890625 4.296875 -3.921875 Z M 4.296875 -4.046875 "/> </symbol> <symbol overflow="visible" id="glyph0-14"> <path style="stroke:none;" d="M 2.390625 -0.6875 C 2.203125 -0.453125 2.046875 -0.375 1.859375 -0.375 C 1.515625 -0.375 1.390625 -0.609375 1.390625 -1.1875 L 1.390625 -3.765625 L 2.296875 -3.765625 L 2.296875 -4.046875 L 1.390625 -4.046875 L 1.390625 -5.09375 C 1.390625 -5.1875 1.375 -5.21875 1.328125 -5.21875 C 1.265625 -5.125 1.203125 -5.046875 1.140625 -4.953125 C 0.796875 -4.46875 0.5 -4.125 0.265625 -4 C 0.171875 -3.9375 0.109375 -3.875 0.109375 -3.828125 C 0.109375 -3.796875 0.125 -3.78125 0.15625 -3.765625 L 0.625 -3.765625 L 0.625 -1.046875 C 0.625 -0.296875 0.90625 0.09375 1.421875 0.09375 C 1.875 0.09375 2.21875 -0.125 2.515625 -0.59375 Z M 2.390625 -0.6875 "/> </symbol> <symbol overflow="visible" id="glyph0-15"> <path style="stroke:none;" d="M 1.625 -5.6875 C 1.625 -5.9375 1.421875 -6.140625 1.15625 -6.140625 C 0.90625 -6.140625 0.703125 -5.9375 0.703125 -5.6875 C 0.703125 -5.421875 0.90625 -5.234375 1.15625 -5.234375 C 1.421875 -5.234375 1.625 -5.421875 1.625 -5.6875 Z M 2.28125 0 L 2.28125 -0.140625 C 1.6875 -0.1875 1.609375 -0.28125 1.609375 -0.9375 L 1.609375 -4.109375 L 1.578125 -4.140625 L 0.1875 -3.640625 L 0.1875 -3.5 C 0.34375 -3.546875 0.484375 -3.546875 0.5625 -3.546875 C 0.78125 -3.546875 0.859375 -3.40625 0.859375 -2.984375 L 0.859375 -0.9375 C 0.859375 -0.25 0.765625 -0.171875 0.140625 -0.140625 L 0.140625 0 Z M 2.28125 0 "/> </symbol> <symbol overflow="visible" id="glyph0-16"> <path style="stroke:none;" d="M 0.53125 0.203125 C 1.703125 0.03125 2.28125 -0.1875 3.046875 -0.875 C 3.765625 -1.53125 4.125 -2.515625 4.125 -3.546875 C 4.125 -4.296875 3.921875 -4.953125 3.5625 -5.40625 C 3.203125 -5.828125 2.71875 -6.078125 2.140625 -6.078125 C 1.078125 -6.078125 0.265625 -5.171875 0.265625 -3.953125 C 0.265625 -2.859375 0.921875 -2.140625 1.890625 -2.140625 C 2.421875 -2.140625 2.859375 -2.265625 3.234375 -2.640625 C 2.875 -1.171875 1.875 -0.21875 0.5 0.015625 Z M 3.265625 -3.1875 C 3.265625 -2.71875 2.59375 -2.515625 2.203125 -2.515625 C 1.53125 -2.515625 1.09375 -3.1875 1.09375 -4.265625 C 1.09375 -4.75 1.234375 -5.28125 1.40625 -5.53125 C 1.5625 -5.71875 1.796875 -5.828125 2.0625 -5.828125 C 2.859375 -5.828125 3.265625 -5.0625 3.265625 -3.546875 Z M 3.265625 -3.1875 "/> </symbol> <symbol overflow="visible" id="glyph0-17"> <path style="stroke:none;" d="M 3.9375 -6.125 L 3.859375 -6.1875 C 3.71875 -6 3.640625 -5.953125 3.421875 -5.953125 L 1.5625 -5.953125 L 0.578125 -3.828125 C 0.578125 -3.828125 0.578125 -3.796875 0.578125 -3.78125 C 0.578125 -3.71875 0.609375 -3.703125 0.6875 -3.703125 C 1.546875 -3.703125 2.171875 -3.421875 2.59375 -3.078125 C 3 -2.75 3.203125 -2.296875 3.203125 -1.734375 C 3.203125 -0.953125 2.625 -0.203125 1.984375 -0.203125 C 1.8125 -0.203125 1.609375 -0.28125 1.34375 -0.5 C 1.0625 -0.734375 0.890625 -0.78125 0.6875 -0.78125 C 0.4375 -0.78125 0.28125 -0.65625 0.28125 -0.4375 C 0.28125 -0.09375 0.75 0.125 1.421875 0.125 C 2.03125 0.125 2.53125 -0.015625 2.953125 -0.3125 C 3.5625 -0.765625 3.828125 -1.328125 3.828125 -2.1875 C 3.828125 -2.65625 3.75 -3 3.515625 -3.328125 C 3 -4.046875 2.5625 -4.234375 1.265625 -4.484375 L 1.625 -5.25 L 3.375 -5.25 C 3.515625 -5.25 3.59375 -5.296875 3.625 -5.359375 Z M 3.9375 -6.125 "/> </symbol> <symbol overflow="visible" id="glyph0-18"> <path style="stroke:none;" d="M 6.171875 -1.921875 C 6.171875 -2.578125 5.859375 -2.96875 5.3125 -2.96875 C 4.453125 -2.96875 3.609375 -2.03125 3.609375 -1.078125 C 3.609375 -0.375 4.09375 0.171875 4.703125 0.171875 C 5.46875 0.171875 6.171875 -0.828125 6.171875 -1.921875 Z M 5.96875 -1.9375 C 5.96875 -0.984375 5.375 -0.078125 4.765625 -0.078125 C 4.46875 -0.078125 4.25 -0.328125 4.25 -0.6875 C 4.25 -1.296875 4.5625 -2.09375 4.953125 -2.515625 C 5.0625 -2.640625 5.25 -2.71875 5.40625 -2.71875 C 5.734375 -2.71875 5.96875 -2.40625 5.96875 -1.9375 Z M 5.59375 -6.359375 L 5.1875 -6.359375 C 4.359375 -5.546875 4.25 -5.484375 3.6875 -5.484375 C 3.359375 -5.484375 3.140625 -5.578125 2.828125 -5.828125 C 2.578125 -6.03125 2.46875 -6.078125 2.28125 -6.078125 C 1.375 -6.078125 0.546875 -5.1875 0.546875 -4.171875 C 0.546875 -3.46875 1.015625 -2.9375 1.609375 -2.9375 C 1.90625 -2.9375 2.140625 -3.03125 2.390625 -3.265625 C 2.8125 -3.671875 3.109375 -4.34375 3.109375 -4.984375 C 3.109375 -5.125 3.09375 -5.21875 3.0625 -5.375 C 3.359375 -5.28125 3.515625 -5.25 3.75 -5.25 C 4.234375 -5.25 4.515625 -5.375 4.84375 -5.765625 L 1.296875 0.15625 L 1.71875 0.15625 Z M 2.890625 -5.125 C 2.890625 -4.09375 2.34375 -3.171875 1.703125 -3.171875 C 1.390625 -3.171875 1.1875 -3.421875 1.1875 -3.8125 C 1.1875 -4.296875 1.34375 -4.828125 1.625 -5.28125 C 1.796875 -5.578125 1.90625 -5.65625 2.265625 -5.84375 C 2.421875 -5.671875 2.53125 -5.59375 2.65625 -5.53125 C 2.859375 -5.4375 2.890625 -5.375 2.890625 -5.125 Z M 2.890625 -5.125 "/> </symbol> <symbol overflow="visible" id="glyph0-19"> <path style="stroke:none;" d="M 5.53125 -1.171875 C 4.84375 -0.546875 4.359375 -0.265625 3.546875 -0.265625 C 2.921875 -0.265625 2.34375 -0.5 1.9375 -0.921875 C 1.515625 -1.375 1.296875 -2.078125 1.296875 -3.0625 C 1.296875 -4.625 2.09375 -5.71875 3.453125 -5.71875 C 4.046875 -5.71875 4.515625 -5.46875 4.90625 -5.046875 C 5.125 -4.796875 5.265625 -4.53125 5.375 -4.046875 L 5.578125 -4.046875 L 5.5 -6.078125 L 5.3125 -6.078125 C 5.265625 -5.890625 5.109375 -5.78125 4.9375 -5.78125 C 4.78125 -5.78125 4.515625 -5.890625 4.3125 -5.953125 C 3.953125 -6.046875 3.59375 -6.078125 3.25 -6.078125 C 2.40625 -6.078125 1.640625 -5.78125 1.0625 -5.140625 C 0.546875 -4.578125 0.25 -3.828125 0.25 -2.921875 C 0.25 -2.03125 0.5625 -1.21875 1.109375 -0.671875 C 1.640625 -0.15625 2.421875 0.125 3.234375 0.125 C 4.296875 0.125 5.171875 -0.265625 5.703125 -1.015625 Z M 5.53125 -1.171875 "/> </symbol> <symbol overflow="visible" id="glyph0-20"> <path style="stroke:none;" d="M 4.703125 0 L 4.703125 -0.140625 C 4.25 -0.1875 4.09375 -0.3125 4.09375 -0.890625 L 4.09375 -3.21875 C 4.09375 -3.421875 4.09375 -3.640625 4.109375 -4.109375 L 4.0625 -4.15625 C 3.6875 -4.09375 3.421875 -4.046875 3.046875 -4.046875 L 1.65625 -4.046875 L 1.65625 -4.453125 C 1.65625 -5.03125 1.65625 -5.359375 1.921875 -5.640625 C 2.09375 -5.8125 2.34375 -5.921875 2.59375 -5.921875 C 3.15625 -5.921875 3.3125 -5.171875 3.6875 -5.171875 C 3.921875 -5.171875 4 -5.296875 4 -5.53125 C 4 -5.921875 3.59375 -6.140625 2.875 -6.140625 C 2.34375 -6.140625 1.875 -6 1.5625 -5.71875 C 1.0625 -5.28125 1.015625 -4.890625 0.90625 -4.046875 L 0.296875 -4.046875 L 0.296875 -3.75 L 0.90625 -3.75 L 0.90625 -0.859375 C 0.90625 -0.28125 0.796875 -0.15625 0.28125 -0.140625 L 0.28125 0 L 2.265625 0 L 2.265625 -0.140625 C 1.765625 -0.171875 1.65625 -0.3125 1.65625 -0.8125 L 1.65625 -3.75 L 2.40625 -3.75 C 3.265625 -3.75 3.34375 -3.6875 3.34375 -3.234375 L 3.34375 -0.890625 C 3.34375 -0.28125 3.28125 -0.1875 2.734375 -0.140625 L 2.734375 0 Z M 4.703125 0 "/> </symbol> <symbol overflow="visible" id="glyph0-21"> <path style="stroke:none;" d="M 4.421875 -0.375 L 4.421875 -0.515625 C 4.265625 -0.515625 4.25 -0.515625 4.21875 -0.515625 C 3.890625 -0.515625 3.8125 -0.609375 3.8125 -1.03125 L 3.8125 -6.125 L 3.765625 -6.140625 C 3.34375 -6 3.03125 -5.90625 2.453125 -5.75 L 2.453125 -5.609375 C 2.515625 -5.609375 2.578125 -5.609375 2.640625 -5.609375 C 2.984375 -5.609375 3.0625 -5.53125 3.0625 -5.15625 L 3.0625 -3.75 C 2.71875 -4.046875 2.46875 -4.140625 2.109375 -4.140625 C 1.078125 -4.140625 0.25 -3.125 0.25 -1.84375 C 0.25 -0.6875 0.90625 0.09375 1.90625 0.09375 C 2.40625 0.09375 2.75 -0.09375 3.0625 -0.515625 L 3.0625 0.0625 L 3.09375 0.09375 Z M 3.0625 -0.921875 C 3.0625 -0.859375 3 -0.75 2.921875 -0.671875 C 2.765625 -0.484375 2.53125 -0.375 2.265625 -0.375 C 1.5 -0.375 1.015625 -1.09375 1.015625 -2.203125 C 1.015625 -3.21875 1.453125 -3.890625 2.140625 -3.890625 C 2.625 -3.890625 3.0625 -3.46875 3.0625 -2.984375 Z M 3.0625 -0.921875 "/> </symbol> <symbol overflow="visible" id="glyph0-22"> <path style="stroke:none;" d="M 3.578125 -1.40625 C 3.15625 -0.78125 2.828125 -0.5625 2.3125 -0.5625 C 1.484375 -0.5625 0.921875 -1.28125 0.921875 -2.3125 C 0.921875 -3.25 1.40625 -3.875 2.140625 -3.875 C 2.46875 -3.875 2.578125 -3.78125 2.671875 -3.453125 L 2.734375 -3.25 C 2.796875 -2.984375 2.96875 -2.828125 3.15625 -2.828125 C 3.390625 -2.828125 3.578125 -3 3.578125 -3.21875 C 3.578125 -3.71875 2.953125 -4.140625 2.203125 -4.140625 C 1.765625 -4.140625 1.34375 -3.984375 0.984375 -3.6875 C 0.5 -3.28125 0.21875 -2.65625 0.21875 -1.90625 C 0.21875 -0.75 0.9375 0.09375 1.9375 0.09375 C 2.328125 0.09375 2.65625 -0.03125 2.96875 -0.28125 C 3.234375 -0.5 3.421875 -0.765625 3.703125 -1.328125 Z M 3.578125 -1.40625 "/> </symbol> <symbol overflow="visible" id="glyph0-23"> <path style="stroke:none;" d="M 4.046875 -5.8125 L 4.046875 -5.953125 L 0.71875 -5.953125 L 0.1875 -4.640625 L 0.34375 -4.546875 C 0.71875 -5.171875 0.875 -5.296875 1.390625 -5.296875 L 3.328125 -5.296875 L 1.546875 0.078125 L 2.140625 0.078125 Z M 4.046875 -5.8125 "/> </symbol> <symbol overflow="visible" id="glyph0-24"> <path style="stroke:none;" d="M 1.625 -0.390625 C 1.625 -0.65625 1.390625 -0.90625 1.140625 -0.90625 C 0.859375 -0.90625 0.625 -0.671875 0.625 -0.390625 C 0.625 -0.109375 0.84375 0.09375 1.125 0.09375 C 1.390625 0.09375 1.625 -0.125 1.625 -0.390625 Z M 1.625 -0.390625 "/> </symbol> <symbol overflow="visible" id="glyph0-25"> <path style="stroke:none;" d="M 4.234375 -3.484375 L 4.234375 -3.84375 L 3.53125 -3.84375 C 3.359375 -3.84375 3.21875 -3.875 3.046875 -3.9375 L 2.84375 -4 C 2.59375 -4.09375 2.359375 -4.140625 2.125 -4.140625 C 1.28125 -4.140625 0.625 -3.484375 0.625 -2.671875 C 0.625 -2.109375 0.859375 -1.765625 1.453125 -1.46875 C 1.328125 -1.34375 1.203125 -1.21875 1.078125 -1.109375 C 0.78125 -0.84375 0.65625 -0.671875 0.65625 -0.484375 C 0.65625 -0.28125 0.75 -0.1875 1.140625 -0.015625 C 0.484375 0.453125 0.25 0.75 0.25 1.09375 C 0.25 1.5625 0.9375 1.96875 1.8125 1.96875 C 2.453125 1.96875 3.140625 1.75 3.609375 1.390625 C 3.984375 1.09375 4.15625 0.796875 4.15625 0.4375 C 4.15625 -0.109375 3.71875 -0.5 3.0625 -0.515625 L 1.90625 -0.578125 C 1.40625 -0.609375 1.203125 -0.671875 1.203125 -0.8125 C 1.203125 -1 1.5 -1.3125 1.734375 -1.390625 L 1.90625 -1.375 C 2.0625 -1.34375 2.203125 -1.34375 2.25 -1.34375 C 2.5625 -1.34375 2.890625 -1.46875 3.1875 -1.6875 C 3.515625 -1.9375 3.65625 -2.265625 3.65625 -2.734375 C 3.65625 -3 3.609375 -3.203125 3.484375 -3.484375 Z M 1.375 -3.046875 C 1.375 -3.578125 1.625 -3.890625 2.03125 -3.890625 C 2.3125 -3.890625 2.546875 -3.734375 2.6875 -3.46875 C 2.859375 -3.15625 2.96875 -2.75 2.96875 -2.375 C 2.96875 -1.875 2.703125 -1.5625 2.296875 -1.5625 C 1.734375 -1.5625 1.375 -2.15625 1.375 -3.015625 Z M 3.890625 0.578125 C 3.890625 1.09375 3.21875 1.453125 2.1875 1.453125 C 1.390625 1.453125 0.875 1.1875 0.875 0.796875 C 0.875 0.578125 0.96875 0.453125 1.328125 0.015625 C 1.625 0.078125 2.34375 0.140625 2.78125 0.140625 C 3.59375 0.140625 3.890625 0.25 3.890625 0.578125 Z M 3.890625 0.578125 "/> </symbol> <symbol overflow="visible" id="glyph0-26"> <path style="stroke:none;" d="M 4.390625 0 L 4.390625 -0.140625 C 3.890625 -0.21875 3.84375 -0.296875 3.84375 -0.921875 L 3.84375 -2.703125 C 3.84375 -3.65625 3.46875 -4.140625 2.734375 -4.140625 C 2.203125 -4.140625 1.828125 -3.921875 1.40625 -3.390625 L 1.40625 -6.125 L 1.375 -6.140625 C 1.046875 -6.03125 0.84375 -5.96875 0.328125 -5.828125 L 0.09375 -5.75 L 0.09375 -5.609375 C 0.109375 -5.609375 0.15625 -5.609375 0.203125 -5.609375 C 0.578125 -5.609375 0.65625 -5.546875 0.65625 -5.15625 L 0.65625 -0.921875 C 0.65625 -0.28125 0.609375 -0.203125 0.078125 -0.140625 L 0.078125 0 L 2.03125 0 L 2.03125 -0.140625 C 1.5 -0.1875 1.40625 -0.296875 1.40625 -0.921875 L 1.40625 -3.09375 C 1.796875 -3.5 2.0625 -3.65625 2.421875 -3.65625 C 2.859375 -3.65625 3.09375 -3.328125 3.09375 -2.703125 L 3.09375 -0.921875 C 3.09375 -0.296875 3 -0.1875 2.46875 -0.140625 L 2.46875 0 Z M 4.390625 0 "/> </symbol> <symbol overflow="visible" id="glyph0-27"> <path style="stroke:none;" d="M 2.734375 1.453125 C 1.46875 0.390625 1.203125 -0.625 1.203125 -2.296875 C 1.203125 -4.03125 1.484375 -4.875 2.734375 -5.9375 L 2.65625 -6.078125 C 1.21875 -5.234375 0.4375 -3.9375 0.4375 -2.265625 C 0.4375 -0.734375 1.203125 0.78125 2.625 1.59375 Z M 2.734375 1.453125 "/> </symbol> <symbol overflow="visible" id="glyph0-28"> <path style="stroke:none;" d="M 3.546875 0 L 3.546875 -0.140625 C 2.875 -0.140625 2.6875 -0.296875 2.6875 -0.6875 L 2.6875 -6.0625 L 2.609375 -6.078125 L 1 -5.265625 L 1 -5.140625 L 1.234375 -5.234375 C 1.40625 -5.296875 1.5625 -5.34375 1.640625 -5.34375 C 1.84375 -5.34375 1.921875 -5.203125 1.921875 -4.890625 L 1.921875 -0.859375 C 1.921875 -0.359375 1.734375 -0.171875 1.0625 -0.140625 L 1.0625 0 Z M 3.546875 0 "/> </symbol> <symbol overflow="visible" id="glyph0-29"> <path style="stroke:none;" d="M 2.5625 -1.75 L 2.5625 -2.3125 L 0.34375 -2.3125 L 0.34375 -1.75 Z M 2.5625 -1.75 "/> </symbol> <symbol overflow="visible" id="glyph0-30"> <path style="stroke:none;" d="M 2.578125 -6.078125 L 1.984375 -6.078125 L -0.078125 0.125 L 0.53125 0.125 Z M 2.578125 -6.078125 "/> </symbol> <symbol overflow="visible" id="glyph0-31"> <path style="stroke:none;" d="M 4.265625 -1.234375 L 4.140625 -1.28125 C 3.84375 -0.78125 3.65625 -0.6875 3.28125 -0.6875 L 1.171875 -0.6875 L 2.65625 -2.265625 C 3.453125 -3.109375 3.8125 -3.78125 3.8125 -4.5 C 3.8125 -5.390625 3.15625 -6.078125 2.140625 -6.078125 C 1.03125 -6.078125 0.453125 -5.34375 0.265625 -4.296875 L 0.453125 -4.25 C 0.8125 -5.125 1.140625 -5.421875 1.78125 -5.421875 C 2.546875 -5.421875 3.03125 -4.96875 3.03125 -4.15625 C 3.03125 -3.390625 2.703125 -2.703125 1.859375 -1.8125 L 0.265625 -0.109375 L 0.265625 0 L 3.78125 0 Z M 4.265625 -1.234375 "/> </symbol> <symbol overflow="visible" id="glyph0-32"> <path style="stroke:none;" d="M 0.265625 -5.9375 C 1.5625 -4.90625 1.796875 -3.875 1.796875 -2.203125 C 1.796875 -0.453125 1.53125 0.390625 0.265625 1.453125 L 0.34375 1.59375 C 1.765625 0.71875 2.5625 -0.5625 2.5625 -2.21875 C 2.5625 -3.75 1.75 -5.25 0.375 -6.078125 Z M 0.265625 -5.9375 "/> </symbol> <symbol overflow="visible" id="glyph0-33"> <path style="stroke:none;" d="M 0.1875 -4.046875 L 0.1875 -3.765625 L 0.921875 -3.765625 L 0.921875 -0.9375 C 0.921875 -0.28125 0.828125 -0.171875 0.1875 -0.140625 L 0.1875 0 L 2.515625 0 L 2.515625 -0.140625 C 1.78125 -0.15625 1.6875 -0.265625 1.6875 -0.9375 L 1.6875 -3.765625 L 2.78125 -3.765625 L 2.78125 -4.046875 L 1.6875 -4.046875 L 1.6875 -5.09375 C 1.6875 -5.625 1.84375 -5.890625 2.1875 -5.890625 C 2.390625 -5.890625 2.5 -5.8125 2.65625 -5.546875 C 2.8125 -5.296875 2.921875 -5.21875 3.0625 -5.21875 C 3.28125 -5.21875 3.453125 -5.375 3.453125 -5.59375 C 3.453125 -5.90625 3.046875 -6.140625 2.515625 -6.140625 C 1.9375 -6.140625 1.46875 -5.90625 1.234375 -5.5 C 1.015625 -5.09375 0.9375 -4.765625 0.921875 -4.046875 Z M 0.1875 -4.046875 "/> </symbol> <symbol overflow="visible" id="glyph0-34"> <path style="stroke:none;" d="M 6.359375 0 L 6.359375 -0.171875 C 5.890625 -0.21875 5.765625 -0.40625 5.515625 -1 L 3.296875 -6.0625 L 3.125 -6.0625 L 1.265625 -1.671875 C 0.734375 -0.40625 0.65625 -0.21875 0.140625 -0.171875 L 0.140625 0 L 1.921875 0 L 1.921875 -0.171875 C 1.5 -0.171875 1.296875 -0.265625 1.296875 -0.546875 C 1.296875 -0.640625 1.328125 -0.796875 1.375 -0.921875 L 1.796875 -1.9375 L 4.15625 -1.9375 L 4.515625 -1.09375 C 4.625 -0.84375 4.6875 -0.609375 4.6875 -0.46875 C 4.6875 -0.390625 4.640625 -0.28125 4.5625 -0.25 C 4.453125 -0.1875 4.390625 -0.171875 4.0625 -0.171875 L 4.0625 0 Z M 4.015625 -2.3125 L 1.9375 -2.3125 L 2.984375 -4.78125 Z M 4.015625 -2.3125 "/> </symbol> <symbol overflow="visible" id="glyph0-35"> <path style="stroke:none;" d="M 1.4375 -4.125 L 1.375 -4.140625 C 0.90625 -3.953125 0.578125 -3.828125 0.078125 -3.6875 L 0.078125 -3.53125 C 0.15625 -3.546875 0.21875 -3.546875 0.3125 -3.546875 C 0.609375 -3.546875 0.671875 -3.453125 0.671875 -3.03125 L 0.671875 1.171875 C 0.671875 1.640625 0.578125 1.75 0.046875 1.796875 L 0.046875 1.953125 L 2.21875 1.953125 L 2.21875 1.796875 C 1.546875 1.78125 1.4375 1.6875 1.4375 1.109375 L 1.4375 -0.296875 C 1.75 0 1.96875 0.09375 2.34375 0.09375 C 3.40625 0.09375 4.234375 -0.921875 4.234375 -2.21875 C 4.234375 -3.34375 3.59375 -4.140625 2.734375 -4.140625 C 2.21875 -4.140625 1.828125 -3.921875 1.4375 -3.421875 Z M 1.4375 -3 C 1.4375 -3.28125 1.9375 -3.59375 2.34375 -3.59375 C 3.015625 -3.59375 3.453125 -2.921875 3.453125 -1.859375 C 3.453125 -0.875 3.015625 -0.203125 2.359375 -0.203125 C 1.9375 -0.203125 1.4375 -0.515625 1.4375 -0.796875 Z M 1.4375 -3 "/> </symbol> <symbol overflow="visible" id="glyph0-36"> <path style="stroke:none;" d="M 5.59375 0.21875 L 5.59375 -0.34375 L 1.703125 -2.28125 L 5.59375 -4.21875 L 5.59375 -4.8125 L 0.5 -2.328125 L 0.5 -2.234375 Z M 5.59375 0.21875 "/> </symbol> <symbol overflow="visible" id="glyph1-0"> <path style="stroke:none;" d=""/> </symbol> <symbol overflow="visible" id="glyph1-1"> <path style="stroke:none;" d="M -5.953125 -0.140625 L -5.78125 -0.140625 C -5.734375 -0.8125 -5.625 -0.90625 -4.953125 -0.90625 L -1.09375 -0.90625 C -0.328125 -0.90625 -0.21875 -0.84375 -0.171875 -0.140625 L 0 -0.140625 L 0 -2.65625 L -0.171875 -2.65625 C -0.203125 -1.9375 -0.328125 -1.8125 -1.015625 -1.8125 L -2.625 -1.8125 C -2.59375 -2.0625 -2.59375 -2.203125 -2.59375 -2.4375 C -2.59375 -3.40625 -2.671875 -3.84375 -3.140625 -4.359375 C -3.4375 -4.703125 -3.84375 -4.875 -4.3125 -4.875 C -4.765625 -4.875 -5.140625 -4.71875 -5.390625 -4.421875 C -5.734375 -4.015625 -5.953125 -3.375 -5.953125 -2.46875 Z M -5.296875 -1.8125 C -5.546875 -1.8125 -5.625 -1.875 -5.625 -2.140625 C -5.625 -3.359375 -5.265625 -3.890625 -4.28125 -3.890625 C -3.46875 -3.890625 -2.953125 -3.359375 -2.953125 -2.359375 C -2.953125 -2.1875 -2.96875 -2.03125 -2.984375 -1.8125 Z M -5.296875 -1.8125 "/> </symbol> <symbol overflow="visible" id="glyph1-2"> <path style="stroke:none;" d="M -4.125 -1.4375 L -4.140625 -1.390625 C -3.953125 -0.921875 -3.828125 -0.59375 -3.65625 -0.0625 L -3.515625 -0.0625 C -3.53125 -0.1875 -3.546875 -0.265625 -3.546875 -0.375 C -3.546875 -0.609375 -3.40625 -0.6875 -3 -0.6875 L -0.75 -0.6875 C -0.3125 -0.6875 -0.25 -0.625 -0.140625 -0.046875 L 0 -0.046875 L 0 -2.203125 L -0.140625 -2.203125 C -0.15625 -1.59375 -0.296875 -1.4375 -0.8125 -1.4375 L -2.828125 -1.4375 C -3.125 -1.4375 -3.578125 -1.8125 -3.578125 -2.0625 C -3.578125 -2.125 -3.53125 -2.203125 -3.4375 -2.296875 C -3.296875 -2.453125 -3.265625 -2.546875 -3.265625 -2.65625 C -3.265625 -2.875 -3.40625 -3.015625 -3.65625 -3.015625 C -3.953125 -3.015625 -4.140625 -2.828125 -4.140625 -2.515625 C -4.140625 -2.140625 -3.9375 -1.890625 -3.296875 -1.4375 Z M -4.125 -1.4375 "/> </symbol> <symbol overflow="visible" id="glyph1-3"> <path style="stroke:none;" d="M -2.078125 -4.234375 C -3.328125 -4.234375 -4.140625 -3.390625 -4.140625 -2.28125 C -4.140625 -1.078125 -3.296875 -0.265625 -2.046875 -0.265625 C -0.796875 -0.265625 0.09375 -1.109375 0.09375 -2.203125 C 0.09375 -3.421875 -0.828125 -4.234375 -2.078125 -4.234375 Z M -1.84375 -3.421875 C -0.796875 -3.421875 -0.15625 -3.03125 -0.15625 -2.359375 C -0.15625 -2.03125 -0.328125 -1.75 -0.609375 -1.546875 C -1.09375 -1.21875 -1.75 -1.078125 -2.453125 -1.078125 C -3.359375 -1.078125 -3.890625 -1.5 -3.890625 -2.109375 C -3.890625 -2.5 -3.703125 -2.75 -3.4375 -2.96875 C -3.0625 -3.265625 -2.453125 -3.421875 -1.84375 -3.421875 Z M -1.84375 -3.421875 "/> </symbol> <symbol overflow="visible" id="glyph1-4"> <path style="stroke:none;" d="M -6.125 -1.375 L -6.140625 -1.328125 C -6.015625 -0.953125 -5.953125 -0.71875 -5.828125 -0.296875 L -5.75 -0.03125 L -5.59375 -0.03125 C -5.609375 -0.078125 -5.609375 -0.109375 -5.609375 -0.1875 C -5.609375 -0.546875 -5.546875 -0.625 -5.09375 -0.625 L -0.5 -0.625 C -0.203125 -0.625 0.09375 -1.375 0.09375 -2.109375 C 0.09375 -3.296875 -0.828125 -4.21875 -2.15625 -4.21875 C -3.28125 -4.21875 -4.140625 -3.5625 -4.140625 -2.59375 C -4.140625 -2.046875 -3.84375 -1.5625 -3.390625 -1.375 Z M -2.859375 -1.375 C -3.234375 -1.375 -3.578125 -1.796875 -3.578125 -2.265625 C -3.578125 -2.59375 -3.421875 -2.875 -3.15625 -3.0625 C -2.828125 -3.296875 -2.3125 -3.421875 -1.765625 -3.421875 C -1.25 -3.421875 -0.859375 -3.296875 -0.578125 -3.09375 C -0.328125 -2.890625 -0.203125 -2.59375 -0.203125 -2.25 C -0.203125 -1.78125 -0.375 -1.375 -0.671875 -1.375 Z M -2.859375 -1.375 "/> </symbol> <symbol overflow="visible" id="glyph1-5"> <path style="stroke:none;" d="M -0.59375 -3.984375 C -0.46875 -3.828125 -0.421875 -3.734375 -0.421875 -3.59375 C -0.421875 -3.421875 -0.609375 -3.3125 -1.015625 -3.3125 L -2.734375 -3.3125 C -3.28125 -3.3125 -3.46875 -3.28125 -3.734375 -3.0625 C -4 -2.84375 -4.140625 -2.5 -4.140625 -2 C -4.140625 -1.59375 -4.03125 -1.21875 -3.875 -0.96875 C -3.671875 -0.640625 -3.390625 -0.5 -3.15625 -0.5 C -2.90625 -0.5 -2.734375 -0.703125 -2.734375 -0.890625 C -2.734375 -1.125 -2.9375 -1.3125 -3.109375 -1.3125 C -3.296875 -1.3125 -3.328125 -1.25 -3.484375 -1.25 C -3.71875 -1.25 -3.921875 -1.515625 -3.921875 -1.875 C -3.921875 -2.28125 -3.671875 -2.578125 -3.109375 -2.578125 L -2.625 -2.578125 C -2.25 -1.5625 -2.078125 -1.234375 -1.90625 -0.96875 C -1.671875 -0.609375 -1.3125 -0.328125 -0.84375 -0.328125 C -0.25 -0.328125 0.09375 -0.71875 0.09375 -1.28125 C 0.09375 -1.671875 -0.03125 -2.109375 -0.5625 -2.578125 L -0.5625 -2.59375 C -0.09375 -2.640625 0.09375 -2.828125 0.09375 -3.171875 C 0.09375 -3.46875 0 -3.703125 -0.34375 -3.984375 Z M -1.140625 -2.578125 C -0.875 -2.578125 -0.75 -2.53125 -0.578125 -2.265625 C -0.484375 -2.109375 -0.4375 -1.921875 -0.4375 -1.75 C -0.4375 -1.390625 -0.640625 -1.125 -1.125 -1.125 C -1.40625 -1.125 -1.625 -1.21875 -1.8125 -1.4375 C -2.03125 -1.65625 -2.21875 -2.03125 -2.40625 -2.578125 Z M -1.140625 -2.578125 "/> </symbol> <symbol overflow="visible" id="glyph1-6"> <path style="stroke:none;" d="M -5.6875 -1.625 C -5.9375 -1.625 -6.140625 -1.421875 -6.140625 -1.15625 C -6.140625 -0.90625 -5.9375 -0.703125 -5.6875 -0.703125 C -5.421875 -0.703125 -5.234375 -0.90625 -5.234375 -1.15625 C -5.234375 -1.421875 -5.421875 -1.625 -5.6875 -1.625 Z M 0 -2.28125 L -0.140625 -2.28125 C -0.1875 -1.6875 -0.28125 -1.609375 -0.9375 -1.609375 L -4.109375 -1.609375 L -4.140625 -1.578125 L -3.640625 -0.1875 L -3.5 -0.1875 C -3.546875 -0.34375 -3.546875 -0.484375 -3.546875 -0.5625 C -3.546875 -0.78125 -3.40625 -0.859375 -2.984375 -0.859375 L -0.9375 -0.859375 C -0.25 -0.859375 -0.171875 -0.765625 -0.140625 -0.140625 L 0 -0.140625 Z M 0 -2.28125 "/> </symbol> <symbol overflow="visible" id="glyph1-7"> <path style="stroke:none;" d="M 0 -2.3125 L -0.140625 -2.3125 C -0.171875 -1.734375 -0.28125 -1.640625 -0.78125 -1.640625 L -6.109375 -1.640625 L -6.140625 -1.59375 C -6 -1.125 -5.90625 -0.796875 -5.75 -0.171875 L -5.609375 -0.171875 C -5.625 -0.3125 -5.625 -0.4375 -5.625 -0.5 C -5.625 -0.796875 -5.484375 -0.875 -5.046875 -0.875 L -0.828125 -0.875 C -0.328125 -0.875 -0.1875 -0.75 -0.140625 -0.1875 L 0 -0.1875 Z M 0 -2.3125 "/> </symbol> <symbol overflow="visible" id="glyph1-8"> <path style="stroke:none;" d="M -0.6875 -2.390625 C -0.453125 -2.203125 -0.375 -2.046875 -0.375 -1.859375 C -0.375 -1.515625 -0.609375 -1.390625 -1.1875 -1.390625 L -3.765625 -1.390625 L -3.765625 -2.296875 L -4.046875 -2.296875 L -4.046875 -1.390625 L -5.09375 -1.390625 C -5.1875 -1.390625 -5.21875 -1.375 -5.21875 -1.328125 C -5.125 -1.265625 -5.046875 -1.203125 -4.953125 -1.140625 C -4.46875 -0.796875 -4.125 -0.5 -4 -0.265625 C -3.9375 -0.171875 -3.875 -0.109375 -3.828125 -0.109375 C -3.796875 -0.109375 -3.78125 -0.125 -3.765625 -0.15625 L -3.765625 -0.625 L -1.046875 -0.625 C -0.296875 -0.625 0.09375 -0.90625 0.09375 -1.421875 C 0.09375 -1.875 -0.125 -2.21875 -0.59375 -2.515625 Z M -0.6875 -2.390625 "/> </symbol> <symbol overflow="visible" id="glyph1-9"> <path style="stroke:none;" d="M -4.046875 -4.28125 L -4.046875 -3.078125 L -3.921875 -3.078125 C -3.921875 -3.359375 -3.84375 -3.484375 -3.703125 -3.484375 C -3.65625 -3.484375 -3.59375 -3.484375 -3.53125 -3.453125 L -1.046875 -2.578125 L -3.296875 -1.578125 C -3.421875 -1.515625 -3.578125 -1.453125 -3.671875 -1.453125 C -3.828125 -1.453125 -3.890625 -1.578125 -3.921875 -1.96875 L -4.046875 -1.96875 L -4.046875 -0.125 L -3.921875 -0.125 C -3.890625 -0.359375 -3.8125 -0.515625 -3.609375 -0.609375 L -1.078125 -1.796875 C -0.71875 -1.96875 -0.296875 -2.171875 -0.15625 -2.171875 C -0.015625 -2.171875 0.546875 -1.984375 0.8125 -1.8125 C 1.03125 -1.671875 1.203125 -1.484375 1.203125 -1.359375 C 1.203125 -1.3125 1.203125 -1.21875 1.140625 -1.125 C 1.046875 -0.96875 1.03125 -0.8125 1.03125 -0.65625 C 1.03125 -0.4375 1.21875 -0.265625 1.4375 -0.265625 C 1.734375 -0.265625 1.96875 -0.515625 1.96875 -0.90625 C 1.96875 -1.578125 1.5 -2 0.21875 -2.46875 L -3.453125 -3.828125 C -3.78125 -3.953125 -3.890625 -4.0625 -3.921875 -4.28125 Z M -4.046875 -4.28125 "/> </symbol> <symbol overflow="visible" id="glyph1-10"> <path style="stroke:none;" d=""/> </symbol> <symbol overflow="visible" id="glyph1-11"> <path style="stroke:none;" d="M -4.046875 -0.1875 L -3.765625 -0.1875 L -3.765625 -0.921875 L -0.9375 -0.921875 C -0.28125 -0.921875 -0.171875 -0.828125 -0.140625 -0.1875 L 0 -0.1875 L 0 -2.515625 L -0.140625 -2.515625 C -0.15625 -1.78125 -0.265625 -1.6875 -0.9375 -1.6875 L -3.765625 -1.6875 L -3.765625 -2.78125 L -4.046875 -2.78125 L -4.046875 -1.6875 L -5.09375 -1.6875 C -5.625 -1.6875 -5.890625 -1.84375 -5.890625 -2.1875 C -5.890625 -2.390625 -5.8125 -2.5 -5.546875 -2.65625 C -5.296875 -2.8125 -5.21875 -2.921875 -5.21875 -3.0625 C -5.21875 -3.28125 -5.375 -3.453125 -5.59375 -3.453125 C -5.90625 -3.453125 -6.140625 -3.046875 -6.140625 -2.515625 C -6.140625 -1.9375 -5.90625 -1.46875 -5.5 -1.234375 C -5.09375 -1.015625 -4.765625 -0.9375 -4.046875 -0.921875 Z M -4.046875 -0.1875 "/> </symbol> <symbol overflow="visible" id="glyph1-12"> <path style="stroke:none;" d="M -2.703125 -1.40625 C -2.859375 -1.15625 -3.125 -1.015625 -3.328125 -1.015625 C -3.75 -1.015625 -3.9375 -1.3125 -3.9375 -1.6875 C -3.9375 -2.234375 -3.640625 -2.5 -2.828125 -2.703125 L -2.828125 -2.84375 L -4.046875 -2.796875 L -4.046875 -2.703125 C -3.96875 -2.625 -3.953125 -2.59375 -3.953125 -2.5625 C -3.953125 -2.5 -3.984375 -2.40625 -4.03125 -2.296875 C -4.125 -2.109375 -4.125 -1.921875 -4.125 -1.703125 C -4.125 -0.96875 -3.734375 -0.453125 -3.03125 -0.453125 C -2.5625 -0.453125 -2.140625 -0.796875 -1.71875 -1.53125 L -1.453125 -2.03125 C -1.28125 -2.328125 -1.046875 -2.5 -0.78125 -2.5 C -0.40625 -2.5 -0.109375 -2.21875 -0.109375 -1.75 C -0.109375 -1.140625 -0.5 -0.796875 -1.375 -0.609375 L -1.375 -0.46875 L 0.03125 -0.46875 L 0.03125 -0.578125 C -0.046875 -0.640625 -0.078125 -0.6875 -0.078125 -0.796875 C -0.078125 -0.90625 -0.0625 -1 0.015625 -1.21875 C 0.078125 -1.421875 0.09375 -1.6875 0.09375 -1.875 C 0.09375 -2.5625 -0.4375 -3.125 -1.03125 -3.125 C -1.546875 -3.125 -1.796875 -2.921875 -2.140625 -2.34375 Z M -2.703125 -1.40625 "/> </symbol> <symbol overflow="visible" id="glyph1-13"> <path style="stroke:none;" d="M -1.46875 -3.671875 C -0.8125 -3.234375 -0.53125 -2.890625 -0.53125 -2.28125 C -0.53125 -1.875 -0.6875 -1.53125 -1.03125 -1.28125 C -1.453125 -0.96875 -1.8125 -0.921875 -2.5 -0.875 L -2.5 -3.640625 C -2.984375 -3.609375 -3.265625 -3.515625 -3.515625 -3.34375 C -3.921875 -3.046875 -4.140625 -2.640625 -4.140625 -2.09375 C -4.140625 -0.953125 -3.21875 -0.21875 -1.953125 -0.21875 C -0.71875 -0.21875 0.09375 -0.875 0.09375 -1.9375 C 0.09375 -2.828125 -0.4375 -3.46875 -1.40625 -3.8125 Z M -2.78125 -0.890625 C -3.453125 -0.984375 -3.8125 -1.34375 -3.8125 -1.84375 C -3.8125 -2.4375 -3.515625 -2.625 -2.78125 -2.734375 Z M -2.78125 -0.890625 "/> </symbol> <symbol overflow="visible" id="glyph1-14"> <path style="stroke:none;" d="M -4.046875 -4.296875 L -4.046875 -3.046875 L -3.921875 -3.046875 C -3.890625 -3.328125 -3.796875 -3.46875 -3.625 -3.46875 C -3.53125 -3.46875 -3.453125 -3.453125 -3.359375 -3.40625 L -1.03125 -2.515625 L -3.328125 -1.609375 C -3.46875 -1.546875 -3.578125 -1.515625 -3.671875 -1.515625 C -3.828125 -1.515625 -3.890625 -1.625 -3.921875 -1.9375 L -4.046875 -1.9375 L -4.046875 -0.171875 L -3.921875 -0.171875 C -3.890625 -0.515625 -3.8125 -0.609375 -2.875 -0.984375 L -0.296875 -2.0625 C -0.21875 -2.109375 -0.15625 -2.109375 -0.109375 -2.140625 C 0.046875 -2.203125 0.125 -2.25 0.125 -2.296875 C 0.125 -2.359375 0.015625 -2.421875 -0.328125 -2.5625 L -3.21875 -3.703125 C -3.8125 -3.953125 -3.890625 -4.015625 -3.921875 -4.296875 Z M -4.046875 -4.296875 "/> </symbol> <symbol overflow="visible" id="glyph1-15"> <path style="stroke:none;" d="M 0 -4.359375 L -0.140625 -4.359375 C -0.1875 -3.921875 -0.28125 -3.8125 -0.765625 -3.8125 L -2.75 -3.8125 C -3.640625 -3.8125 -4.140625 -3.4375 -4.140625 -2.75 C -4.140625 -2.34375 -3.9375 -1.921875 -3.40625 -1.453125 L -4.109375 -1.453125 L -4.140625 -1.375 C -3.984375 -0.9375 -3.875 -0.640625 -3.734375 -0.140625 L -3.578125 -0.140625 C -3.609375 -0.203125 -3.625 -0.3125 -3.625 -0.40625 C -3.625 -0.65625 -3.46875 -0.71875 -3.03125 -0.71875 L -0.84375 -0.71875 C -0.3125 -0.71875 -0.171875 -0.625 -0.140625 -0.15625 L 0 -0.15625 L 0 -2.0625 L -0.140625 -2.0625 C -0.171875 -1.609375 -0.296875 -1.46875 -0.640625 -1.46875 L -3.125 -1.46875 C -3.53125 -1.890625 -3.640625 -2.109375 -3.640625 -2.40625 C -3.640625 -2.84375 -3.375 -3.0625 -2.734375 -3.0625 L -0.9375 -3.0625 C -0.34375 -3.0625 -0.171875 -2.953125 -0.140625 -2.5 L 0 -2.5 Z M 0 -4.359375 "/> </symbol> <symbol overflow="visible" id="glyph2-0"> <path style="stroke:none;" d=""/> </symbol> <symbol overflow="visible" id="glyph2-1"> <path style="stroke:none;" d="M 4.625 -1.15625 C 4.5625 -0.640625 4.453125 -0.46875 4.328125 -0.46875 C 4.0625 -0.46875 3.796875 -1.265625 3.703125 -1.6875 L 4.6875 -4.046875 L 3.8125 -4.046875 L 3.40625 -2.828125 C 3.25 -3.46875 2.8125 -4.140625 2.03125 -4.140625 C 0.921875 -4.140625 0.265625 -3.15625 0.265625 -2 C 0.265625 -0.78125 0.96875 0.09375 1.9375 0.09375 C 2.640625 0.09375 3.015625 -0.328125 3.328125 -0.90625 C 3.453125 -0.3125 3.6875 0.09375 4.046875 0.09375 C 4.5 0.09375 4.765625 -0.484375 4.765625 -1.15625 Z M 2.984375 -1.875 C 2.890625 -1.390625 2.640625 -0.15625 2.03125 -0.15625 C 1.21875 -0.15625 1.078125 -1.796875 1.078125 -2.453125 C 1.078125 -3.484375 1.53125 -3.890625 1.984375 -3.890625 C 2.640625 -3.890625 2.875 -2.53125 2.984375 -1.875 Z M 2.984375 -1.875 "/> </symbol> </g> </defs> <g id="surface1"> <path style="fill:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke:rgb(0%,0%,0%);stroke-opacity:1;stroke-miterlimit:10;" d="M 94.921875 291.996094 L 402.101562 292.230469 " transform="matrix(1,0,0,1,-50,-148)"/> <path style="fill:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke:rgb(0%,0%,0%);stroke-opacity:1;stroke-miterlimit:10;" d="M 406.101562 292.234375 L 402.101562 292.230469 M 402.101562 290.730469 L 406.101562 292.234375 L 402.097656 293.730469 " transform="matrix(1,0,0,1,-50,-148)"/> <g style="fill:rgb(0%,0%,0%);fill-opacity:1;"> <use xlink:href="#glyph0-1" x="66.8391" y="93.2571"/> </g> <g style="fill:rgb(0%,0%,0%);fill-opacity:1;"> <use xlink:href="#glyph0-2" x="72.7071" y="93.2571"/> <use xlink:href="#glyph0-3" x="76.7031" y="93.2571"/> </g> <g style="fill:rgb(0%,0%,0%);fill-opacity:1;"> <use xlink:href="#glyph0-4" x="79.8891" y="93.2571"/> <use xlink:href="#glyph0-5" x="84.3891" y="93.2571"/> <use xlink:href="#glyph0-6" x="86.6391" y="93.2571"/> <use xlink:href="#glyph0-7" x="91.1391" y="93.2571"/> <use xlink:href="#glyph0-6" x="95.6391" y="93.2571"/> <use xlink:href="#glyph0-8" x="100.1391" y="93.2571"/> <use xlink:href="#glyph0-6" x="103.6401" y="93.2571"/> <use xlink:href="#glyph0-9" x="108.1401" y="93.2571"/> <use xlink:href="#glyph0-10" x="112.1361" y="93.2571"/> <use xlink:href="#glyph0-5" x="114.6381" y="93.2571"/> </g> <g style="fill:rgb(0%,0%,0%);fill-opacity:1;"> <use xlink:href="#glyph0-11" x="67.9911" y="106.2571"/> <use xlink:href="#glyph0-12" x="72.4911" y="106.2571"/> <use xlink:href="#glyph0-8" x="76.9911" y="106.2571"/> <use xlink:href="#glyph0-2" x="80.4921" y="106.2571"/> <use xlink:href="#glyph0-3" x="84.4881" y="106.2571"/> </g> <g style="fill:rgb(0%,0%,0%);fill-opacity:1;"> <use xlink:href="#glyph0-13" x="87.6651" y="106.2571"/> </g> <g style="fill:rgb(0%,0%,0%);fill-opacity:1;"> <use xlink:href="#glyph0-9" x="91.9851" y="106.2571"/> <use xlink:href="#glyph0-14" x="95.9811" y="106.2571"/> <use xlink:href="#glyph0-15" x="98.4831" y="106.2571"/> <use xlink:href="#glyph0-11" x="100.9851" y="106.2571"/> <use xlink:href="#glyph0-7" x="105.4851" y="106.2571"/> <use xlink:href="#glyph0-8" x="109.9851" y="106.2571"/> </g> <g style="fill:rgb(0%,0%,0%);fill-opacity:1;"> <use xlink:href="#glyph0-1" x="282.8876" y="93.2571"/> </g> <g style="fill:rgb(0%,0%,0%);fill-opacity:1;"> <use xlink:href="#glyph0-2" x="288.7556" y="93.2571"/> <use xlink:href="#glyph0-3" x="292.7516" y="93.2571"/> </g> <g style="fill:rgb(0%,0%,0%);fill-opacity:1;"> <use xlink:href="#glyph0-4" x="295.9376" y="93.2571"/> <use xlink:href="#glyph0-5" x="300.4376" y="93.2571"/> <use xlink:href="#glyph0-6" x="302.6876" y="93.2571"/> <use xlink:href="#glyph0-7" x="307.1876" y="93.2571"/> <use xlink:href="#glyph0-6" x="311.6876" y="93.2571"/> <use xlink:href="#glyph0-8" x="316.1876" y="93.2571"/> <use xlink:href="#glyph0-6" x="319.6886" y="93.2571"/> <use xlink:href="#glyph0-9" x="324.1886" y="93.2571"/> <use xlink:href="#glyph0-10" x="328.1846" y="93.2571"/> <use xlink:href="#glyph0-5" x="330.6866" y="93.2571"/> </g> <g style="fill:rgb(0%,0%,0%);fill-opacity:1;"> <use xlink:href="#glyph0-11" x="284.0396" y="106.2571"/> <use xlink:href="#glyph0-12" x="288.5396" y="106.2571"/> <use xlink:href="#glyph0-8" x="293.0396" y="106.2571"/> <use xlink:href="#glyph0-2" x="296.5406" y="106.2571"/> <use xlink:href="#glyph0-3" x="300.5366" y="106.2571"/> </g> <g style="fill:rgb(0%,0%,0%);fill-opacity:1;"> <use xlink:href="#glyph0-13" x="303.7136" y="106.2571"/> </g> <g style="fill:rgb(0%,0%,0%);fill-opacity:1;"> <use xlink:href="#glyph0-9" x="308.0336" y="106.2571"/> <use xlink:href="#glyph0-14" x="312.0296" y="106.2571"/> <use xlink:href="#glyph0-15" x="314.5316" y="106.2571"/> <use xlink:href="#glyph0-11" x="317.0336" y="106.2571"/> <use xlink:href="#glyph0-7" x="321.5336" y="106.2571"/> <use xlink:href="#glyph0-8" x="326.0336" y="106.2571"/> </g> <g style="fill:rgb(0%,0%,0%);fill-opacity:1;"> <use xlink:href="#glyph0-16" x="152.1984" y="134.8147"/> <use xlink:href="#glyph0-17" x="156.6984" y="134.8147"/> <use xlink:href="#glyph0-18" x="161.1984" y="134.8147"/> <use xlink:href="#glyph0-5" x="167.9214" y="134.8147"/> <use xlink:href="#glyph0-19" x="170.1714" y="134.8147"/> <use xlink:href="#glyph0-11" x="176.1744" y="134.8147"/> <use xlink:href="#glyph0-7" x="180.6744" y="134.8147"/> <use xlink:href="#glyph0-20" x="185.1744" y="134.8147"/> <use xlink:href="#glyph0-21" x="190.1964" y="134.8147"/> <use xlink:href="#glyph0-2" x="194.6964" y="134.8147"/> <use xlink:href="#glyph0-7" x="198.6924" y="134.8147"/> <use xlink:href="#glyph0-22" x="203.1924" y="134.8147"/> <use xlink:href="#glyph0-2" x="207.1884" y="134.8147"/> <use xlink:href="#glyph0-5" x="211.1844" y="134.8147"/> <use xlink:href="#glyph0-15" x="213.4344" y="134.8147"/> <use xlink:href="#glyph0-7" x="215.9364" y="134.8147"/> <use xlink:href="#glyph0-14" x="220.4364" y="134.8147"/> <use xlink:href="#glyph0-2" x="222.9384" y="134.8147"/> <use xlink:href="#glyph0-3" x="226.9344" y="134.8147"/> </g> <g style="fill:rgb(0%,0%,0%);fill-opacity:1;"> <use xlink:href="#glyph0-13" x="230.1114" y="134.8147"/> </g> <g style="fill:rgb(0%,0%,0%);fill-opacity:1;"> <use xlink:href="#glyph0-9" x="234.4314" y="134.8147"/> <use xlink:href="#glyph0-10" x="238.4274" y="134.8147"/> </g> <path style="fill:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke:rgb(0%,0%,0%);stroke-opacity:1;stroke-miterlimit:10;" d="M 94.921875 291.996094 L 94.921875 166.148438 " transform="matrix(1,0,0,1,-50,-148)"/> <path style="fill:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke:rgb(0%,0%,0%);stroke-opacity:1;stroke-miterlimit:10;" d="M 94.921875 162.148438 L 94.921875 166.148438 M 93.421875 166.148438 L 94.921875 162.148438 L 96.421875 166.148438 " transform="matrix(1,0,0,1,-50,-148)"/> <g style="fill:rgb(0%,0%,0%);fill-opacity:1;"> <use xlink:href="#glyph1-1" x="39.634" y="128.11892"/> <use xlink:href="#glyph1-2" x="39.634" y="123.10592"/> </g> <g style="fill:rgb(0%,0%,0%);fill-opacity:1;"> <use xlink:href="#glyph1-3" x="39.634" y="120.16292"/> <use xlink:href="#glyph1-4" x="39.634" y="115.66292"/> <use xlink:href="#glyph1-5" x="39.634" y="111.16292"/> <use xlink:href="#glyph1-4" x="39.634" y="107.16692"/> <use xlink:href="#glyph1-6" x="39.634" y="102.66692"/> <use xlink:href="#glyph1-7" x="39.634" y="100.16492"/> <use xlink:href="#glyph1-6" x="39.634" y="97.66292"/> <use xlink:href="#glyph1-8" x="39.634" y="95.16092"/> <use xlink:href="#glyph1-9" x="39.634" y="92.65892"/> <use xlink:href="#glyph1-10" x="39.634" y="88.15892"/> <use xlink:href="#glyph1-3" x="39.634" y="85.90892"/> <use xlink:href="#glyph1-11" x="39.634" y="81.40892"/> <use xlink:href="#glyph1-10" x="39.634" y="78.41192"/> <use xlink:href="#glyph1-3" x="39.634" y="76.16192"/> <use xlink:href="#glyph1-4" x="39.634" y="71.66192"/> <use xlink:href="#glyph1-12" x="39.634" y="67.16192"/> <use xlink:href="#glyph1-13" x="39.634" y="63.66092"/> <use xlink:href="#glyph1-2" x="39.634" y="59.66492"/> </g> <g style="fill:rgb(0%,0%,0%);fill-opacity:1;"> <use xlink:href="#glyph1-14" x="39.634" y="56.48792"/> </g> <g style="fill:rgb(0%,0%,0%);fill-opacity:1;"> <use xlink:href="#glyph1-5" x="39.634" y="52.16792"/> <use xlink:href="#glyph1-8" x="39.634" y="48.17192"/> <use xlink:href="#glyph1-6" x="39.634" y="45.66992"/> <use xlink:href="#glyph1-3" x="39.634" y="43.16792"/> <use xlink:href="#glyph1-15" x="39.634" y="38.66792"/> <use xlink:href="#glyph1-12" x="39.634" y="34.16792"/> </g> <g style="fill:rgb(0%,0%,0%);fill-opacity:1;"> <use xlink:href="#glyph0-16" x="225.0659" y="9.3821"/> <use xlink:href="#glyph0-23" x="229.5659" y="9.3821"/> <use xlink:href="#glyph0-24" x="234.0659" y="9.3821"/> <use xlink:href="#glyph0-17" x="236.3159" y="9.3821"/> <use xlink:href="#glyph0-18" x="240.8159" y="9.3821"/> <use xlink:href="#glyph0-5" x="247.5389" y="9.3821"/> <use xlink:href="#glyph0-8" x="249.7889" y="9.3821"/> <use xlink:href="#glyph0-15" x="253.2899" y="9.3821"/> <use xlink:href="#glyph0-25" x="255.7919" y="9.3821"/> <use xlink:href="#glyph0-7" x="260.2919" y="9.3821"/> <use xlink:href="#glyph0-15" x="264.7919" y="9.3821"/> <use xlink:href="#glyph0-20" x="267.2939" y="9.3821"/> <use xlink:href="#glyph0-22" x="272.3159" y="9.3821"/> <use xlink:href="#glyph0-9" x="276.3119" y="9.3821"/> <use xlink:href="#glyph0-7" x="280.3079" y="9.3821"/> <use xlink:href="#glyph0-22" x="284.8079" y="9.3821"/> <use xlink:href="#glyph0-2" x="288.8039" y="9.3821"/> <use xlink:href="#glyph0-5" x="292.7999" y="9.3821"/> <use xlink:href="#glyph0-14" x="295.0499" y="9.3821"/> </g> <g style="fill:rgb(0%,0%,0%);fill-opacity:1;"> <use xlink:href="#glyph0-26" x="297.6239" y="9.3821"/> <use xlink:href="#glyph0-3" x="302.1239" y="9.3821"/> </g> <g style="fill:rgb(0%,0%,0%);fill-opacity:1;"> <use xlink:href="#glyph0-2" x="305.1029" y="9.3821"/> <use xlink:href="#glyph0-8" x="309.0989" y="9.3821"/> <use xlink:href="#glyph0-26" x="312.5999" y="9.3821"/> <use xlink:href="#glyph0-11" x="317.0999" y="9.3821"/> <use xlink:href="#glyph0-10" x="321.5999" y="9.3821"/> <use xlink:href="#glyph0-21" x="324.1019" y="9.3821"/> <use xlink:href="#glyph0-5" x="328.6019" y="9.3821"/> </g> <g style="fill:rgb(0%,0%,0%);fill-opacity:1;"> <use xlink:href="#glyph0-27" x="261.8939" y="22.3821"/> <use xlink:href="#glyph0-28" x="264.8909" y="22.3821"/> <use xlink:href="#glyph0-5" x="269.3909" y="22.3821"/> <use xlink:href="#glyph0-29" x="271.6409" y="22.3821"/> <use xlink:href="#glyph0-5" x="274.6379" y="22.3821"/> </g> <g style="fill:rgb(0%,0%,0%);fill-opacity:1;"> <use xlink:href="#glyph2-1" x="276.8879" y="22.3821"/> </g> <g style="fill:rgb(0%,0%,0%);fill-opacity:1;"> <use xlink:href="#glyph0-30" x="281.7749" y="22.3821"/> <use xlink:href="#glyph0-31" x="284.2769" y="22.3821"/> <use xlink:href="#glyph0-32" x="288.7769" y="22.3821"/> </g> <g style="fill:rgb(0%,0%,0%);fill-opacity:1;"> <use xlink:href="#glyph0-1" x="292.3061" y="160.8665"/> </g> <g style="fill:rgb(0%,0%,0%);fill-opacity:1;"> <use xlink:href="#glyph0-9" x="298.0841" y="160.8665"/> <use xlink:href="#glyph0-10" x="302.0801" y="160.8665"/> <use xlink:href="#glyph0-6" x="304.5821" y="160.8665"/> <use xlink:href="#glyph0-2" x="309.0821" y="160.8665"/> <use xlink:href="#glyph0-5" x="313.0781" y="160.8665"/> <use xlink:href="#glyph0-11" x="315.3281" y="160.8665"/> <use xlink:href="#glyph0-33" x="319.8281" y="160.8665"/> <use xlink:href="#glyph0-5" x="322.8251" y="160.8665"/> <use xlink:href="#glyph0-11" x="325.0751" y="160.8665"/> <use xlink:href="#glyph0-12" x="329.5751" y="160.8665"/> <use xlink:href="#glyph0-8" x="334.0751" y="160.8665"/> <use xlink:href="#glyph0-2" x="337.5761" y="160.8665"/> <use xlink:href="#glyph0-3" x="341.5721" y="160.8665"/> </g> <g style="fill:rgb(0%,0%,0%);fill-opacity:1;"> <use xlink:href="#glyph0-13" x="344.7491" y="160.8665"/> </g> <g style="fill:rgb(0%,0%,0%);fill-opacity:1;"> <use xlink:href="#glyph0-9" x="349.0691" y="160.8665"/> <use xlink:href="#glyph0-14" x="353.0651" y="160.8665"/> <use xlink:href="#glyph0-15" x="355.5671" y="160.8665"/> <use xlink:href="#glyph0-11" x="358.0691" y="160.8665"/> <use xlink:href="#glyph0-7" x="362.5691" y="160.8665"/> <use xlink:href="#glyph0-8" x="367.0691" y="160.8665"/> </g> <g style="fill:rgb(0%,0%,0%);fill-opacity:1;"> <use xlink:href="#glyph0-5" x="176.4861" y="173.6429"/> <use xlink:href="#glyph0-34" x="178.7361" y="173.6429"/> <use xlink:href="#glyph0-7" x="185.2341" y="173.6429"/> <use xlink:href="#glyph0-5" x="189.7341" y="173.6429"/> <use xlink:href="#glyph0-11" x="191.9841" y="173.6429"/> <use xlink:href="#glyph0-6" x="196.4841" y="173.6429"/> <use xlink:href="#glyph0-14" x="200.9841" y="173.6429"/> <use xlink:href="#glyph0-10" x="203.4861" y="173.6429"/> <use xlink:href="#glyph0-15" x="205.9881" y="173.6429"/> <use xlink:href="#glyph0-2" x="208.4901" y="173.6429"/> <use xlink:href="#glyph0-3" x="212.4861" y="173.6429"/> <use xlink:href="#glyph0-5" x="215.4831" y="173.6429"/> <use xlink:href="#glyph0-27" x="217.7331" y="173.6429"/> <use xlink:href="#glyph0-35" x="220.7301" y="173.6429"/> <use xlink:href="#glyph0-29" x="225.2301" y="173.6429"/> <use xlink:href="#glyph0-13" x="228.2271" y="173.6429"/> </g> <g style="fill:rgb(0%,0%,0%);fill-opacity:1;"> <use xlink:href="#glyph0-9" x="232.5471" y="173.6429"/> <use xlink:href="#glyph0-10" x="236.5431" y="173.6429"/> <use xlink:href="#glyph0-6" x="239.0451" y="173.6429"/> <use xlink:href="#glyph0-2" x="243.5451" y="173.6429"/> <use xlink:href="#glyph0-5" x="247.5411" y="173.6429"/> <use xlink:href="#glyph0-36" x="249.7911" y="173.6429"/> <use xlink:href="#glyph0-5" x="255.9561" y="173.6429"/> <use xlink:href="#glyph0-17" x="258.2061" y="173.6429"/> <use xlink:href="#glyph0-18" x="262.7061" y="173.6429"/> <use xlink:href="#glyph0-32" x="269.4291" y="173.6429"/> </g> <path style="fill:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke:rgb(0%,0%,0%);stroke-opacity:1;stroke-dasharray:1,5;stroke-miterlimit:10;" d="M 169 292.054688 L 169.082031 175.195312 " transform="matrix(1,0,0,1,-50,-148)"/> <path style="fill:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke:rgb(0%,0%,0%);stroke-opacity:1;stroke-dasharray:1,5;stroke-miterlimit:10;" d="M 327 290.488281 L 327.082031 173.628906 " transform="matrix(1,0,0,1,-50,-148)"/> <path style="fill:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke:rgb(0%,0%,0%);stroke-opacity:1;stroke-miterlimit:10;" d="M 169.019531 263 L 114.558594 262.292969 " transform="matrix(1,0,0,1,-50,-148)"/> <path style="fill:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke:rgb(0%,0%,0%);stroke-opacity:1;stroke-miterlimit:10;" d="M 110.558594 262.238281 L 114.558594 262.292969 M 114.539062 263.792969 L 110.558594 262.238281 L 114.578125 260.792969 " transform="matrix(1,0,0,1,-50,-148)"/> <path style="fill:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke:rgb(0%,0%,0%);stroke-opacity:1;stroke-miterlimit:10;" d="M 328 265.023438 L 383.082031 265.003906 " transform="matrix(1,0,0,1,-50,-148)"/> <path style="fill:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke:rgb(0%,0%,0%);stroke-opacity:1;stroke-miterlimit:10;" d="M 387.082031 265 L 383.082031 265.003906 M 383.082031 263.503906 L 387.082031 265 L 383.085938 266.503906 " transform="matrix(1,0,0,1,-50,-148)"/> <path style="fill:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke:rgb(0%,0%,0%);stroke-opacity:1;stroke-miterlimit:10;" d="M 120 286.964844 C 120 286.964844 189.90625 294.875 210.148438 234.285156 C 230.386719 173.691406 248.484375 176.71875 248.484375 176.71875 " transform="matrix(1,0,0,1,-50,-148)"/> <path style="fill:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke:rgb(0%,0%,0%);stroke-opacity:1;stroke-miterlimit:10;" d="M 377.539062 287.085938 C 377.539062 287.085938 307.632812 294.996094 287.394531 234.402344 C 267.152344 173.8125 249.054688 176.839844 249.054688 176.839844 " transform="matrix(1,0,0,1,-50,-148)"/> <path style="fill:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke:rgb(0%,0%,0%);stroke-opacity:1;stroke-miterlimit:10;" d="M 336.933594 285.230469 L 310.574219 309.273438 " transform="matrix(1,0,0,1,-50,-148)"/> <path style="fill:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke:rgb(0%,0%,0%);stroke-opacity:1;stroke-miterlimit:10;" d="M 307.617188 311.96875 L 310.574219 309.273438 M 311.585938 310.382812 L 307.617188 311.96875 L 309.5625 308.164062 " transform="matrix(1,0,0,1,-50,-148)"/> <path style=" stroke:none;fill-rule:nonzero;fill:rgb(39.99939%,74.902344%,100%);fill-opacity:1;" d="M 291.273438 133.085938 C 292.445312 134.257812 292.445312 136.15625 291.273438 137.328125 C 290.101562 138.5 288.203125 138.5 287.03125 137.328125 C 285.859375 136.15625 285.859375 134.257812 287.03125 133.085938 C 288.203125 131.914062 290.101562 131.914062 291.273438 133.085938 "/> </g> </svg>
SVG
1
wwhio/awesome-DeepLearning
Dive-into-DL-paddlepaddle/docs/img/statistical-significance.svg
[ "Apache-2.0" ]