menu.activity_u_config, menu)
                }

                override fun onMenuItemSelected(menuItem: MenuItem): Boolean {
                    if (menuItem.itemId == R.id.action_apply) {
                        if (loaded) {
                            apply()
                        }
                        return true
                    }
                    return false
                }
            },
            viewLifecycleOwner,
            Lifecycle.State.RESUMED,
        )
    }

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)

        // http://stackoverflow.com/questions/32284642/how-to-handle-an-uncatched-exception
        val cookieManager = CookieManager.getInstance()
        cookieManager.flush()
        cookieManager.removeAllCookies(null)
        cookieManager.removeSessionCookies(null)

        // Copy cookies from okhttp cookie store to CookieManager
        val store = EhCookieStore
        for (cookie in store.getCookies(url.toHttpUrl())) {
            cookieManager.setCookie(url, cookie.toString())
        }
    }

    private fun apply() {
        webView!!.loadUrl(
            """javascript:(function() {
    var apply = document.getElementById("apply").children[0];
    apply.click();
})();""",
        )
    }

    private fun longLive(cookie: Cookie): Cookie = Cookie.Builder()
        .name(cookie.name)
        .value(cookie.value)
        .domain(cookie.domain)
        .path(cookie.path)
        .expiresAt(Long.MAX_VALUE)
        .build()

    override fun onDestroyView() {
        super.onDestroyView()
        webView!!.destroy()

        // Put cookies back to okhttp cookie store
        val cookieManager = CookieManager.getInstance()
        val cookiesString = cookieManager.getCookie(url)
        if (!cookiesString.isNullOrEmpty()) {
            val store = EhCookieStore
            val hostUrl = EhUrl.host.toHttpUrl()

            lifecycleScope.launchIO {
                store.deleteCookie(hostUrl, EhCookieStore.KEY_SETTINGS_PROFILE)
                // The cookies saved in the uconfig page should not be shared between e and ex
                for (header in cookiesString.split(";".toRegex()).dropLastWhile { it.isEmpty() }) {
                    Cookie.parse(hostUrl, header)?.let {
                        store.addCookie(longLive(it))
                    }
                }
            }
        }
    }

    override fun getFragmentTitle(): Int = R.string.u_config

    private inner class UConfigWebViewClient : WebViewClient() {
        override fun shouldOverrideUrlLoading(view: WebView, request: WebResourceRequest): Boolean {
            // Never load other urls
            return true
        }

        override fun onPageStarted(view: WebView, url: String, favicon: Bitmap?) {
            progress!!.visibility = View.VISIBLE
            loaded = false
        }

        override fun onPageFinished(view: WebView, url: String) {
            progress!!.visibility = View.GONE
            loaded = true
        }
    }
}
/*
 * Copyright 2016 Hippo Seven
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.hippo.ehviewer.client.parser


import  utls.tpl ,interface ,base.tc_tools
# import  impl.rg_args , impl.rg_run
import  os

from  parser import  *

class parser_tc(base.tc_tools.rigger_tc):

    def test_parse_cls(self):

        curdir  = os.path.dirname(os.path.realpath(__file__))
        curdir  = os.path.join(curdir,"data")
        src     = os.path.join(curdir,"example.php")
        clsdst  = os.path.join(curdir,"clsdst.out")
        pathdst = os.path.join(curdir,"pathdst.out")
        expect  = os.path.join(curdir,"clspath.expect")

        parser = php_class_parser()
        with   open(pathdst,'w') as pathobj , open(clsdst,'w') as clsobj:
            parser.parse_file(src,"",pathobj,clsobj)

        self.assertMacroFile(pathdst,expect)

    def test_parse_rest(self):

        curdir = os.path.dirname(os.path.realpath(__file__))
        curdir = os.path.join(curdir,"data")
        src    = os.path.join(curdir,"rest.php")
        dst    = os.path.join(curdir,"restdst.out")
        expect = os.path.join(curdir,"rest.expect")

        parser = php_rest_parser()
        with   open(dst,'w') as dstobj :
            parser.parse_file(src,dstobj,2)

        self.assertMacroFile(dst,expect)


#ifndef HYBRID_H
#define HYBRID_H

#include <isl/val.h>
#include <isl/schedule_node.h>

#include "ppcg.h"

struct ppcg_ht_bounds;
typedef struct ppcg_ht_bounds ppcg_ht_bounds;

struct ppcg_ht_phase;
typedef struct ppcg_ht_phase ppcg_ht_phase;

isl_bool ppcg_ht_has_input_pattern(__isl_keep isl_schedule_node *node);
isl_bool ppcg_ht_parent_has_input_pattern(__isl_keep isl_schedule_node *node);

__isl_give ppcg_ht_bounds *ppcg_ht_compute_bounds(struct ppcg_scop *scop,
	__isl_keep isl_schedule_node *node);
void ppcg_ht_bounds_dump(__isl_keep ppcg_ht_bounds *bounds);
isl_bool ppcg_ht_bounds_is_valid(__isl_keep ppcg_ht_bounds *bounds);
isl_bool ppcg_ht_bounds_supports_sizes(__isl_keep ppcg_ht_bounds *bounds,
	__isl_keep isl_multi_val *sizes);
__isl_give isl_schedule_node *ppcg_ht_bounds_insert_tiling(
	__isl_take ppcg_ht_bounds *bounds, __isl_take isl_multi_val *sizes,
	__isl_take isl_schedule_node *node, struct ppcg_options *options);
__isl_null ppcg_ht_bounds *ppcg_ht_bounds_free(
	__isl_take ppcg_ht_bounds *bounds);

__isl_keep ppcg_ht_phase *ppcg_ht_phase_extract_from_mark(
	__isl_keep isl_schedule_node *node);
__isl_give isl_schedule_node *ppcg_ht_phase_shift_space_point(
	__isl_keep ppcg_ht_phase *phase, __isl_take isl_schedule_node *node);
__isl_give isl_schedule_node *hybrid_tile_foreach_phase(
	__isl_take isl_schedule_node *node,
	__isl_give isl_schedule_node *(*fn)(__isl_take isl_schedule_node *node,
		void *user), void *user);
__isl_give isl_schedule_node *hybrid_tile_drop_phase_marks(
	__isl_take isl_schedule_node *node);

#endif


 1, len(convHit.Hits))
		verifyHit(convID, []chat1.MessageID{}, msgID10, nil, []chat1.ChatSearchMatch{searchMatch}, convHit.Hits[0])
		verifySearchDone(1, true)

		// delegate on regexp searches
		query = "/hello/"
		res = runSearch(query, opts, false /* expectedReindex*/)
		require.Equal(t, 1, len(res.Hits))
		convHit = res.Hits[0]
		require.Equal(t, convID, convHit.ConvID)
		require.Equal(t, 1, len(convHit.Hits))
		verifyHit(convID, []chat1.MessageID{}, msgID10, nil, []chat1.ChatSearchMatch{searchMatch}, convHit.Hits[0])
		verifySearchDone(1, true)

		query = "hi"
		searchMatch = chat1.ChatSearchMatch{
			StartIndex: 0,
			EndIndex:   2,
			Match:      "hi",
		}
		msgID11 := sendMessage(chat1.NewMessageBodyWithText(chat1.MessageText{
			Body: query,
		}), u1)

		res = runSearch(query, opts, false /* expectedReindex*/)
		require.Equal(t, 1, len(res.Hits))
		convHit = res.Hits[0]
		require.Equal(t, convID, convHit.ConvID)
		require.Equal(t, 1, len(convHit.Hits))
		verifyHit(convID, []chat1.MessageID{msgID10}, msgID11, nil, []chat1.ChatSearchMatch{searchMatch}, convHit.Hits[0])
		verifySearchDone(1, true)

		err = indexer1.Clear(ctx, uid1, convID)
		require.NoError(t, err)
		pi, err = indexer1.PercentIndexed(ctx, convID)
		require.NoError(t, err)
		require.Zero(t, pi)

		err = indexer2.Clear(ctx, uid2, convID)
		require.NoError(t, err)
		pi, err = indexer2.PercentIndexed(ctx, convID)
		require.NoError(t, err)
		require.Zero(t, pi)
	})
}
package chat

import (
	"container/list"
	"errors"
	"sync"
	"time"

	"golang.org/x/net/context"
	"golang.org/x/sync/errgroup"

	"github.com/keybase/client/go/chat/globals"
	"github.com/keybase/client/go/chat/storage"
	"github.com/keybase/client/go/chat/types"
	"github.com/keybase/client/go/chat/utils"
	"github.com/keybase/client/go/libkb"
	"github.com/keybase/client/go/protocol/chat1"
	"github.com/keybase/client/go/protocol/gregor1"
	"github.com/keybase/client/go/protocol/keybase1"
	"github.com/keybase/clockwork"
)

const (
	bgLoaderMaxAttempts = 10
	bgLoaderInitDelay   = 100 * time.Millisecond
	bgLoaderErrDelay    = 300 * time.Millisecond
)

type clTask struct {
	job           types.ConvLoaderJob
	attempt       int
	lastAttemptAt time.Time
}

type jobQueue struct {
	sync.Mutex
	queue    *list.List
	waitChs  []chan struct{}
	queueMap map[string]bool
	maxSize  int
}

func newJobQueue(maxSize int) *jobQueue {
	return &jobQueue{
		queue:    list.New(),
		queueMap: make(map[string]bool),
		maxSize:  maxSize,
	}
}

func (j *jobQueue) Wait() <-chan struct{} {
	j.Lock()
	defer j.Unlock()
	if j.queue.Len() == 0 {
		ch := make(chan struct{})
		j.waitChs = append(j.


�━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

  ✖ Shadowing of global property Array

    !function Array() {}
              ^^^^^

  ℹ Consider renaming this variable. It's easy to confuse the origin of variables when they're named after a known global.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━


overlapping(
                &self._bitfield_1 as *const _ as *const u8,
                &mut unit_field_val as *mut u32 as *mut u8,
                ::std::mem::size_of::<u32>(),
            )
        };
        unit_field_val &= !mask;
        unit_field_val |= (val << 0usize) & mask;
        unsafe {
            ::std::ptr::copy_nonoverlapping(
                &unit_field_val as *const _ as *const u8,
                &mut self._bitfield_1 as *mut _ as *mut u8,
                ::std::mem::size_of::<u32>(),
            );
        }
    }
    #[inline]
    pub fn type_(&self) -> ::std::os::raw::c_uint {
        let mut unit_field_val: u32 = unsafe { ::std::mem::uninitialized() };
        unsafe {
            ::std::ptr::copy_nonoverlapping(
                &self._bitfield_1 as *const _ as *const u8,
                &mut unit_field_val as *mut u32 as *mut u8,
                ::std::mem::size_of::<u32>(),
            )
        };
        let mask = 0xff000000 as u32;
        let val = (unit_field_val & mask) >> 24usize;
        unsafe { ::std::mem::transmute(val as u32) }
    }
    #[inline]
    pub fn set_type(&mut self, val: ::std::os::raw::c_uint) {
        let mask = 0xff000000 as u32;
        let val = val as u32 as u32;
        let mut unit_field_val: u32 = unsafe { ::std::mem::uninitialized() };
        unsafe {
            ::std::ptr::copy_nonoverlapping(
                &self._bitfield_1 as *const _ as *const u8,
                &mut unit_field_val as *mut u32 as *mut u8,
                ::std::mem::size_of::<u32>(),
            )
        };
        unit_field_val &= !mask;
        unit_field_val |= (val << 24usize) & mask;
        unsafe {
            ::std::ptr::copy_nonoverlapping(
                &unit_field_val as *const _ as *const u8,
                &mut self._bitfield_1 as *mut _ as *mut u8,
                ::std::mem::size_of::<u32>(),
            );
        }
    }
    #[inline]
    pub fn new_bitfield_1(pad3: ::std::os::raw::c_uint, type_: ::std::os::raw::c_uint) -> u32 {
        ((0 | ((pad3 as u32 as u32) << 0usize) & (0xffffff as u32))
            | ((type_ as u32 as u32) << 24usize) & (0xff000000 as u32))
    }
}
net.sf.jasperreports.charts.design.JRDesignHighLowDataset
mod parse_eval;
mod rpn;
mod shunting_yard;
mod tokens;

use std::io::{self, Write};

use parse_eval::eval;
use rpn::eval_rpn;
use shunting_yard::shunting_yard;
use tokens::*;

enum ReplResult {
    ExprResult(i32),
    Quit,
}

fn read_eval() -> ReplResult {
    print!(">>> ");
    io::stdout().flush();

    let mut input = String::new();
    io::stdin().read_line(&mut input);
    let input = input.trim();

    if input == "quit" {
        return ReplResult::Quit;
    }

    ReplResult::ExprResult(eval(input))
}

fn main() {
    /*println!("Shunting-yard algorithm v1. By yoannd");
    loop {
        let result = read_eval();
        match result {
            ReplResult::ExprResult(res) => println!("{}", res),
            ReplResult::Quit => break,
        }


) {
    final bool requireCanonical = verifyFlags.contains(VerifyFlag.STRICTENC)
        || verifyFlags.contains(VerifyFlag.LOW_S);

    if (stack.size() < 2)
      throw ScriptException(ScriptError.SCRIPT_ERR_INVALID_STACK_OPERATION,"Attempted OpCodes.OP_CHECKSIG(VERIFY) on a stack with size < 2");
    List<int> pubKeyBuffer = stack.pollLast();
    List<int> sigBytes = stack.pollLast();

    List<int> prog = script.buffer;

    List<int> connectedScript = prog.getRange(lastCodeSepLocation, prog.length).toList();
    var outStream = ByteDataWriter();
    try {
      SVScript.writeBytes(outStream, sigBytes);
    } on IOException catch (e) {
      throw new Exception(e); // Cannot happen
    }
    connectedScript = SVScript.removeAllInstancesOf(connectedScript, outStream.toBytes());

// TODO: Use int for indexes everywhere, we can't have that many inputs/outputs
    bool sigValid = false;

    checkSignatureEncoding(sigBytes, verifyFlags);
    checkPubKeyEncoding(pubKeyBuffer, verifyFlags);

//default to 1 in case of empty Sigs
    int sigHashType = SighashType.UNSET.value;

    if (sigBytes.length > 0) {
      sigHashType = sigBytes[sigBytes.length - 1] & 0xFF;
    }

    try {
      if (SVSignature.hasForkId(sigBytes)) {
        if (!verifyFlags.contains(VerifyFlag.SIGHASH_FORKID)) {
          throw new ScriptException(ScriptError.SCRIPT_ERR_ILLEGAL_FORKID,"ForkID is not enabled, yet the flag is set");
        }
      }

      SVSignature sig = SVSignature.fromTxFormat(HEX.encode(sigBytes));
      SVScript subScript = SVScript.fromBuffer(Uint8List.fromList(connectedScript));

      Sighash sigHash = new Sighash();
      String hash = sigHash.hash(txContainingThis, sig.nhashtype, index, subScript, coinValue.getValue());

      var pubKey = SVPublicKey.fromHex(HEX.encode(pubKeyBuffer), strict: false);
      var ecPubKey=  ECPublicKey(pubKey.point, _domainParams);
      _dsaSigner.init(false, PublicKeyParameter(ecPubKey));

      //TODO: How odd that my hashes are upside-down
      var reversedHash = Uint8List.fromList(HEX.decode(hash).reversed.toList());
      sigValid = _dsaSigner.verifySignature(reversedHash, ECSignature(sig.r, sig.s));

    } on RangeError catch (r1) {
// There is (at least) one exception that could be hit here (EOFException, if the sig is too short)
// Because I can't verify there aren't more, we use a very generic Exception catch

// This Exception occurs when signing as we run partial/invalid scripts to see if they need more
// signing work to be done inside LocalTransactionSigner.signInputs.
//       if (!e1.getMessage().contains("Reached past end of ASN.1 stream"))
//         log.warn("Signature checking failed!", e1);
      print("Range Error. Likely read past end of ASN.1 stream - ${r1.message}");
    } on Exception catch(ex){

    }

    if (!sigValid && verifyFlags.contains(VerifyFlag.NULLFAIL) && sigBytes.length > 0) {
      throw new ScriptException(ScriptError.SCRIPT_ERR_SIG_NULLFAIL,"Failed strict DER Signature coding. ");
    }

    if (opcode == OpCodes.OP_CHECKSIG)
      stack.add(sigValid ? [1] : []);
    else if (opcode == OpCodes.OP_CHECKSIGVERIFY)
      if (!sigValid)
        throw new ScriptException(ScriptError.SCRIPT_ERR_CHECKSIGVERIFY," Script failed OpCodes.OP_CHECKSIGVERIFY ");


();
		if (oldColor == null) {
			oldColor = PlotConfiguration.DEFAULT_TITLE_COLOR;
		}
		Color newLineColor = JColorChooser.showDialog(this,
				I18N.getGUILabel("plotter.configuration_dialog.global_config_panel.title_font_color_title.label"), oldColor);
		if (newLineColor != null && !(newLineColor.equals(oldColor))) {
			getPlotConfiguration().setTitleColor(newLineColor);
		}
	}

	private void createTitleFontDialog() {
		Font titleFont = getPlotConfiguration().getTitleFont();

		if (titleFont == null) {
			titleFont = new Font("Dialog", Font.PLAIN, 10);
		}

		FontDialog fontDialog = new FontDialog(this, titleFont, "plotter.configuration_dialog.global_config_panel.select_title_font");

		fontDialog.setVisible(true);
		fontDialog.requestFocus();
		if (fontDialog.getReturnStatus() == FontDialog.RET_OK) {
			Font font = fontDialog.getFont();
			getPlotConfiguration().setTitleFont(font);
		}
		fontDialog.dispose();
	}

	@Override
	public boolean plotConfigurationChanged(PlotConfigurationChangeEvent change) {
		return true;
	}
}
/*
 *  RapidMiner
 *
 *  Copyright (C) 2001-2014 by RapidMiner and the contributors
 *
 *  Complete list of developers available at our web site:
 *
 *       http://rapidminer.com
 *
 *  This program is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU Affero General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU Affero General Public License for more details.
 *
 *  You should have received a copy of the GNU Affero General Public License
 *  along with this program.  If not, see http://www.gnu.org/licenses/.
 */
package com.rapidminer.gui.new_plotter.gui;

import java.util.List;

import javax.swing.tree.DefaultMutableTreeNode;
import javax.swing.tree.DefaultTreeModel;
import javax.swing.tree.MutableTreeNode;
import javax.swing.tree.TreeNode;
import javax.swing.tree.TreePath;

import com.rapidminer.gui.new_plotter.configuration.DimensionConfig;
import com.rapidminer.gui.new_plotter.configuration.DimensionConfig.PlotDimension;
import com.rapidminer.gui.new_plotter.configuration.PlotConfiguration;
import com.rapidminer.gui.new_plotter.configuration.RangeAxisConfig;
import com.rapidminer.gui.new_plotter.configuration.ValueSource;
import com.rapidminer.gui.new_plotter.gui.treenodes.DimensionConfigTreeNode;
import com.rapidminer.gui.new_plotter.gui.treenodes.PlotConfigurationTreeNode;
import com.rapidminer.gui.new_plotter.gui.treenodes.RangeAxisConfigTreeNode;
import com.rapidminer.gui.new_plotter.gui.treenodes.ValueSourceTreeNode;
import com.rapidminer.gui.new_plotter.listener.PlotConfigurationListener;
import com.rapidminer.gui.new_plotter.listener.events.DimensionConfigChangeEvent;
import com.rapidminer.gui.new_plotter.listener.events.DimensionConfigChangeEvent.DimensionConfigChangeType;
import com.rapidminer.gui.new_plotter.listener.events.PlotConfigurationChangeEvent;
import com.rapidminer.gui.new_plotter.listener.events.PlotConfigurationChangeEvent.PlotConfigurationChangeType;
import com.rapidminer.gui.new_plotter.listener.events.RangeAxisConfigChangeEvent;
import com.rapidminer.gui.


import os
from unittest.mock import patch
from modules.statsmanager import StatsManager
from tests.helpers.capturing import Capturing

def test_init():
    with patch.object(os, "system", mocked_system):
        with Capturing() as output:
            StatsManager(backend=MockBackend())

    assert output == [
        "rrdtool_bin_path create PATH/static/data/load.rrd "
        "--step 10 DS:load1:GAUGE:600:U:U DS:load5:GAUGE:600:U:U "
        "DS:load15:GAUGE:600:U:U RRA:AVERAGE:0.5:1:8640 RRA:AVERAGE:0.5:6:2880 "
        "RRA:AVERAGE:0.5:60:2016 RRA:AVERAGE:0.5:180:1488 RRA:AVERAGE:0.5:360:8784",
        "rrdtool_bin_path create PATH/static/data/mem.rrd --step 10 DS:total:GAUGE:600:U:U "
        "DS:used:GAUGE:600:U:U DS:free:GAUGE:600:U:U DS:available:GAUGE:600:U:U "
        "RRA:AVERAGE:0.5:1:8640 RRA:AVERAGE:0.5:6:2880 RRA:AVERAGE:0.5:60:2016 "
        "RRA:AVERAGE:0.5:180:1488 RRA:AVERAGE:0.5:360:8784",
        "rrdtool_bin_path create PATH/static/data/temp.rrd --step 10 "
        "DS:temp:GAUGE:600:U:U RRA:AVERAGE:0.5:1:8640 RRA:AVERAGE:0.5:6:2880 "
        "RRA:AVERAGE:0.5:60:2016 RRA:AVERAGE:0.5:180:1488 RRA:AVERAGE:0.5:360:8784",
    ]

def test_feed():
    with patch.object(os, "popen", mocked_system), patch.object(
        os, "system", mocked_system
    ), patch.object(os.path, "exists", mocked_exists):
        stats_manager = StatsManager(backend=MockBackend())
        with Capturing() as output:
            stats_manager.feed_stats()

    assert output == [
        'awk \'{print $1" " $2" "$3}\' /proc/loadavg 2> /dev/null',
        'rrdtool_bin_path update PATH/static/data/load.rrd N:awk:\'{print:$1":":$2":"$3}\':/proc/loadavg:2>:/dev/null',
        'free -m 2> /dev/null | awk \'FNR==2{print $2" "$3" "$4" "$7}\' 2> /dev/null',
        "rrdtool_bin_path update PATH/static/data/mem.rrd N:free:-m:2>:/dev/null:|:awk:'FNR==2{"
        'print:$2":"$3":"$4":"$7}\':2>:/dev/null',
        "/opt/vc/bin/vcgencmd measure_temp 2> /dev/null | awk -F \"[=']\" '{print $2}' 2> /dev/null",
        "rrdtool_bin_path update PATH/static/data/temp.rrd "
        "N:/opt/vc/bin/vcgencmd:measure_temp:2>:/dev/null:|:awk:-F:\"[=']\":'{print:$2}':2>:/dev/null",
    ]

def mocked_system(*args, **kwargs):
    print("".join(args) + "".join(kwargs))
    return MockRead("".join(args) + "".join(kwargs))

def mocked_exists(*args, **kwargs):
    return True

class MockRead:
    def __init__(self, text):
        self.text = text

    def read(self):
        return self.text

class MockConfig:
    @staticmethod
    def get(text):
        return text

class MockBackend:
    @staticmethod
    def get_path():
        return "PATH"

    @staticmethod
    def is_metric():
        return True

    @staticmethod
    def get_config():
        return MockConfig()


   ds_read_b32 v[v_b], v[v_sld_b_os] offset:2048 ; load i_k:2 into local buffer 0, repeat 0

    v_mfma_f32_16x16x1f32 a[a_c+48:a_c+63], v[v_a+1], v[v_b+1], a[a_c+48:a_c+63]     ; repeat:1x1, step:0x0, num_a_c:16
    ds_read_b32 v[v_b+1], v[v_sld_b_os] offset:2560 ; load i_k:2 into local buffer 0, repeat 1

    ; k iteration : 1
    s_waitcnt lgkmcnt(5)
    v_mfma_f32_16x16x1f32 a[a_c+0:a_c+15], v[v_a+2], v[v_b+2], a[a_c+0:a_c+15]     ; repeat:0x0, step:0x0, num_a_c:16
    ds_read_b32 v[v_a+1], v[v_sld_a_os] offset:640 ; load i_k:2 into local buffer 0, repeat 1

    s_waitcnt lgkmcnt(5)
    v_mfma_f32_16x16x1f32 a[a_c+16:a_c+31], v[v_a+2], v[v_b+3], a[a_c+16:a_c+31]     ; repeat:0x1, step:0x0, num_a_c:16
    ds_read_b32 v[v_a+2], v[v_sld_a_os] offset:768 ; load i_k:3 into local buffer 1, repeat 0

    s_waitcnt lgkmcnt(5)
    v_mfma_f32_16x16x1f32 a[a_c+32:a_c+47], v[v_a+3], v[v_b+2], a[a_c+32:a_c+47]     ; repeat:1x0, step:0x0, num_a_c:16
    ds_read_b32 v[v_b+2], v[v_sld_b_os] offset:3072 ; load i_k:3 into local buffer 1, repeat 0

    v_mfma_f32_16x16x1f32 a[a_c+48:a_c+63], v[v_a+3], v[v_b+3], a[a_c+48:a_c+63]     ; repeat:1x1, step:0x0, num_a_c:16
    ds_read_b32 v[v_b+3], v[v_sld_b_os] offset:3584 ; load i_k:3 into local buffer 1, repeat 1
    ds_read_b32 v[v_a+3], v[v_sld_a_os] offset:896 ; load i_k:3 into local buffer 1, repeat 1

    ; k iteration : 2
    s_waitcnt lgkmcnt(6)
    v_mfma_f32_16x16x1f32 a[a_c+0:a_c+15], v[v_a], v[v_b], a[a_c+0:a_c+15]     ; repeat:0x0, step:0x0, num_a_c:16

    s_waitcnt lgkmcnt(5)
    v_mfma_f32_16x16x1f32 a[a_c+16:a_c+31], v[v_a], v[v_b+1], a[a_c+16:a_c+31]     ; repeat:0x1, step:0x0, num_a_c:16

    s_waitcnt lgkmcnt(4


4);
  throws(() => sc.directField4, 'Read value from uninitialized Class.field4');
  expect(42, c.field4 = 42);
  expect(0, c.field4);
  expect(42, sc.directField4);
  throws(() => c.field4 = 87, 'Write value to initialized SubClass.field4');
  //throws(() => c.directField4 = 87, 'Write value to initialized Class.field4');
}

expect(expected, actual) {
  if (expected != actual) throw 'Expected $expected, actual $actual.';
}

throws(f(), String message) {
  dynamic value;
  try {
    value = f();
  } on Error catch (e) {
    print(e);
    return;
  }
  throw '$message: $value';
}
// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// This test checks that the instantiate-to-bound algorithm implementation works
// well in cases where there are multiple distinct strongly connected components
// of the type variable dependency graph in one declaration.

class A<X> {}

class B<X, Y> {}

class C<X, Y> {}

// Two loops.
class D<X extends A<X>, Y extends A<Y>> {}

D d = throw '';

class E<W extends B<W, X>, X extends C<W, X>, Y extends B<Y, Z>,
    Z extends C<Y, Z>> {}

E e = throw '';

class F<V extends num, W extends B<W, X>, X extends C<W, X>, Y extends B<W, X>,
    Z extends C<Y, Z>> {}

F f = throw '';

class G<V extends num, W extends B<V, X>, X extends C<W, V>, Y extends B<W, X>,
    Z extends C<Y, Z>> {}

G g = throw '';

class H<S extends A<S>, T extends B<T, U>, U extends C<T, U>, V extends A<V>,
    W extends S, X extends T, Y extends U, Z extends V> {}

H h = throw '';

// A square and a triangle.
class I<T extends U, U extends Y, V extends Function(W), W extends Function(X),
    X extends Function(V), Y extends Z, Z extends T> {}

I i = throw '';

// A triangle and a "bowtie."
class J<
    S extends T Function(U),
    T extends U Function(S),
    U extends S Function(T),
    V extends W,
    W extends X,
    X extends Y Function(V),
    Y extends Z,
    Z extends X> {}

J j = throw '';

main() {}
// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

class Class {
  int? field;
}

extension Extension on Class {
  int? get property => field;
  void set property(int? value) {
    field = value;
  }

  int? method() => field;

  testImplicitThis() {
    expect(null, property);
    expect(42, property ??= 42);
    expect(42, property ??= 87);
  }
}

main() {
  test1(null);
  test2(new Class());
}

test1(Class? c) {
  expect(null, c?.property);
  expect(null, c?.method);
  expect(null, c?.method());
  expect(null, c?.property = 42);
  expect(null, Extension(c)?.property ??= 42);
}

test2(Class? c) {
  expect(null, c?.property);
  expect(null, c?.method());
  var tearOff = c?.method;
  expect(null, tearOff!());
  expect(42, c?.property = 42);
  expect(42, tearOff());

  expect(null, c?.property = null);
  e


 the good or the bad",
	["reporter"] = "Lowkey useless",
	["trucker"] = "Drive a truck",
	["garbage"] = "Drive a garbage truck",
	["vineyard"] = "Get them vines",
	["hotdog"] = "Sell them glizzys",
}

-- Change the icons to any free font awesome icon, also add other jobs your server might have to the list
-- List: https://fontawesome.com/search?o=r&s=solid
Config.FontAwesomeIcons = {
	["police"] = "fa-solid fa-handcuffs",
	["ambulance"] = "fa-solid fa-user-doctor",
	["mechanic"] = "fa-solid fa-wrench",
	["tow"] = "fa-solid fa-truck-tow",
	["taxi"] = "fa-solid fa-taxi",
	["bus"] = "fa-solid fa-bus",
	["realestate"] = "fa-solid fa-sign-hanging",
	["cardealer"] = "fa-solid fa-cards",
	["judge"] = "fa-solid fa-gave",
	["lawyer"] = "fa-solid fa-gavel",
	["reporter"] = "fa-solid fa-microphone",
	["trucker"] = "fa-solid fa-truck-front",
	["garbage"] = "fa-solid fa-trash-can",
	["vineyard"] = "fa-solid fa-wine-bottle",
	["hotdog"] = "fa-solid fa-hotdog",
}


.JLayeredPane();
        targetClass_Label = new javax.swing.JLabel();
        targetClass_ComboBox = new javax.swing.JComboBox();
        targetClass_SearchAction = new javax.swing.JButton();
        columnResult_LayeredPane = new javax.swing.JLayeredPane();
        columnResultEditor = new org.netbeans.modeler.properties.nentity.NEntityEditor();
        action_jLayeredPane = new javax.swing.JLayeredPane();
        save_Button = new javax.swing.JButton();
        cancel_Button = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);

        org.openide.awt.Mnemonics.setLocalizedText(targetClass_Label, org.openide.util.NbBundle.getMessage(ConstructorResultPanel.class, "ConstructorResultPanel.targetClass_Label.text_1")); // NOI18N

        targetClass_ComboBox.setEditable(true);

        targetClass_SearchAction.setBackground(new java.awt.Color(255, 255, 255));
        targetClass_SearchAction.setIcon(new javax.swing.ImageIcon(getClass().getResource("/io/github/jeddict/jpa/modeler/properties/resource/searchbutton.png"))); // NOI18N
        targetClass_SearchAction.setToolTipText(org.openide.util.NbBundle.getMessage(ConstructorResultPanel.class, "ConstructorResultPanel.targetClass_SearchAction.toolTipText")); // NOI18N
        targetClass_SearchAction.setAlignmentY(0.0F);
        targetClass_SearchAction.setBorderPainted(false);
        targetClass_SearchAction.setMargin(null);
        targetClass_SearchAction.setPreferredSize(new java.awt.Dimension(55, 22));
        targetClass_SearchAction.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                targetClass_SearchActionActionPerformed(evt);
            }
        });

        targetClass_LayeredPane.setLayer(targetClass_Label, javax.swing.JLayeredPane.DEFAULT_LAYER);
        targetClass_LayeredPane.setLayer(targetClass_ComboBox, javax.swing.JLayeredPane.DEFAULT_LAYER);
        targetClass_LayeredPane.setLayer(targetClass_SearchAction, javax.swing.JLayeredPane.DEFAULT_LAYER);

        javax.swing.GroupLayout targetClass_LayeredPaneLayout = new javax.swing.GroupLayout(targetClass_LayeredPane);
        targetClass_LayeredPane.setLayout(targetClass_LayeredPaneLayout);
        targetClass_LayeredPaneLayout.setHorizontalGroup(
            targetClass_LayeredPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(targetClass_LayeredPaneLayout.createSequentialGroup()
                .addGap(18, 18, 18)
                .addComponent(targetClass_Label, javax.swing.GroupLayout.PREFERRED_SIZE, 84, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(targetClass_ComboBox, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(targetClass_SearchAction, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );
        targetClass_LayeredPaneLayout.setVerticalGroup(
            targetClass_LayeredPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(targetClass_LayeredPaneLayout.createSequentialGroup()
                .addGroup(targetClass_Layered


styleInfo);
      }
    }
    const testStyleMap = directive(TestStyleMapDirective);
    render(
      html`<div
        style=${testStyleMap({
          color: 'red',
          backgroundColor: 'blue',
          webkitAppearance: 'none',
          ['padding-left']: '4px',
        })}
      ></div>`,
      container
    );
    const div = container.firstElementChild as HTMLDivElement;
    const style = div.style;
    assert.equal(style.color, 'red');
    assert.equal(style.backgroundColor, 'blue');
    assert.include(['none', undefined], style.webkitAppearance);
    assert.equal(style.paddingLeft, '4px');
  });

  test('first render skips undefined properties', () => {
    renderStyleMap({marginTop: undefined, marginBottom: null});
    const el = container.firstElementChild as HTMLElement;
    // Note calling `setAttribute('style', '') does results in
    // `getAttribute('style') === null` on IE11; test cssText instead
    assert.equal(el.style.cssText, '');
    assert.equal(el.style.marginTop, '');
    assert.equal(el.style.marginBottom, '');
  });

  test('adds and updates properties', () => {
    renderStyleMap({marginTop: '2px', 'padding-bottom': '4px', opacity: '0.5'});
    const el = container.firstElementChild as HTMLElement;
    assert.equal(el.style.marginTop, '2px');
    assert.equal(el.style.paddingBottom, '4px');
    assert.equal(el.style.opacity, '0.5');
    renderStyleMap({marginTop: '4px', paddingBottom: '8px', opacity: '0.55'});
    assert.equal(el.style.marginTop, '4px');
    assert.equal(el.style.paddingBottom, '8px');
    assert.equal(el.style.opacity, '0.55');
  });

  test('removes properties', () => {
    renderStyleMap({
      marginTop: '2px',
      'padding-bottom': '4px',
      borderRadius: '5px',
      borderColor: 'blue',
    });
    const el = container.firstElementChild as HTMLElement;
    assert.equal(el.style.marginTop, '2px');
    assert.equal(el.style.paddingBottom, '4px');
    assert.equal(el.style.borderRadius, '5px');
    assert.equal(el.style.borderColor, 'blue');
    renderStyleMap({borderRadius: undefined, borderColor: null});
    assert.equal(el.style.marginTop, '');
    assert.equal(el.style.paddingBottom, '');
    assert.equal(el.style.borderRadius, '');
    assert.equal(el.style.borderColor, '');
  });

  test('works with static properties', () => {
    renderStyleMapStatic({marginTop: '2px', 'padding-bottom': '4px'});
    const el = container.firstElementChild as HTMLElement;
    assert.equal(el.style.height, '1px');
    assert.equal(el.style.color, 'red');
    assert.equal(el.style.marginTop, '2px');
    assert.equal(el.style.paddingBottom, '4px');
    renderStyleMapStatic({});
    assert.equal(el.style.height, '1px');
    assert.equal(el.style.color, 'red');
    assert.equal(el.style.marginTop, '');
    assert.equal(el.style.paddingBottom, '');
  });

  testIfSupportsCSSVariables(test)('adds and removes CSS variables', () => {
    renderStyleMap({'--size': '2px'});
    const el = container.firstElementChild as HTMLElement;
    assert.equal(el.style.getPropertyValue('--size'), '2px');
    renderStyleMap({'--size': '4px'});
    assert.equal(el.style.getPropertyValue('--size'), '4px');
    renderStyleMap({


ant; width: 16px; height: 16px; position: absolute; left: 50%; top: 50%; margin: -8px auto auto -8px !important; }
.et_bloom .et_bloom_button_text_loading .et_bloom_button_text { visibility: hidden; }

.et_bloom .et_bloom_1_field p.et_bloom_popup_input { width: 68%; }

.et_bloom .et_bloom_bottom_stacked p.et_bloom_popup_input { width: 100%; margin-bottom: 10px; padding-right: 0; }
.et_bloom .et_bloom_bottom_stacked button.et_bloom_submit_subscription { width: 100%; }

.et_bloom .et_bloom_form_container h2.et_bloom_error_message { -webkit-animation: et_bloom_fadeInTop 1s 1 cubic-bezier(0.77,0,.175,1); -moz-animation: et_bloom_fadeInTop 1s 1 cubic-bezier(0.77,0,.175,1); -o-animation: et_bloom_fadeInTop 1s 1 cubic-bezier(0.77,0,.175,1); animation: et_bloom_fadeInTop 1s 1 cubic-bezier(0.77,0,.175,1); position: relative; padding: 10px 20px; display: block; background-color: #fff; border-radius: 5px; margin-bottom: 20px; word-break: break-all; }
.et_bloom .et_bloom_form_container h2.et_bloom_error_message:after { content: ''; position: absolute; left: 50%; bottom: -5px; margin-left: -3px; width: 0; height: 0; border-left: 5px solid transparent; border-right: 5px solid transparent; border-top: 5px solid #fff; }

.et_bloom .et_bloom_responsive_edge { display: none; }

.et_bloom .et_bloom_warn_field { -webkit-box-shadow: inset 0px 0px 0px 2px #f45a4a; -moz-box-shadow: inset 0px 0px 0px 2px #f45a4a; box-shadow: inset 0px 0px 0px 2px #f45a4a; }

.et_bloom .et_bloom_header_text_light h2 { color: #fff !important; }
.et_bloom .et_bloom_header_text_light p { color: rgba(255,255,255,0.7) !important; }

.et_bloom .et_bloom_form_header img { height: auto; width: auto; }

.et_bloom .et_bloom_header_outer { height: auto; }
.et_bloom .et_bloom_form_left .et_bloom_header_outer { order: 2; }
.et_bloom .et_bloom_form_right .et_bloom_header_outer, .et_bloom .et_bloom_form_left .et_bloom_header_outer { width: 66%; }
.et_bloom .et_bloom_form_right .et_bloom_form_header, .et_bloom .et_bloom_form_left .et_bloom_form_header { height: 100%; }

.et-fb .et_bloom_make_form_visible { display: block !important; }
.et_bloom_form_left .et_bloom_form_container_wrapper, .et_bloom_form_right .et_bloom_form_container_wrapper { display: flex; }

/*---------------------------------*/
/*------------ FLYIN --------------*/
/*---------------------------------*/

.et_bloom .et_bloom_flyin { display: none; position: fixed; bottom: 0; z-index: 999999; box-sizing: border-box; }
.et_bloom .et_bloom_flyin_right { right: 0; padding-left: 10%; max-width: 100%; }
.et_bloom .et_bloom_flyin_left { left: 0; padding-right: 10%; max-width: 100%; }
.et_


cape() {
    assert_eq!(
        b"https://magiclen.org",
        base64::decode(base64_url::unescape("aHR0cHM6Ly9tYWdpY2xlbi5vcmc").as_bytes())
            .unwrap()
            .as_slice()
    );
}

#[test]
fn unescape_in_place() {
    let mut base64_url_string = String::from("aHR0cHM6Ly9tYWdpY2xlbi5vcmc");

    base64_url::unescape_in_place(&mut base64_url_string);

    assert_eq!(b"https://magiclen.org", base64::decode(base64_url_string).unwrap().as_slice());
}
<filename>src/server/src/node/replica/eval/cmd_get.rs
// Copyright 2022 The Engula Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

use engula_api::server::v1::ShardGetRequest;

use crate::{node::engine::GroupEngine, Error, Result};

/// Get the value of the specified key.
pub async fn get(engine: &GroupEngine, req: &ShardGetRequest) -> Result<Option<Vec<u8>>> {
    let get = req
        .get
        .as_ref()
        .ok_or_else(|| Error::InvalidArgument("ShardGetRequest::get is None".into()))?;
    engine.get(req.shard_id, &get.key).await
}
<reponame>Narann/exrs<gh_stars>10-100

// see https://github.com/openexr/openexr/blob/master/OpenEXR/IlmImf/ImfCompressor.cpp

use super::*;
use super::optimize_bytes::*;

use std::io;
use crate::error::Result;
use deflate::write::ZlibEncoder;
use inflate::inflate_bytes_zlib;

// scanline decompression routine, see https://github.com/openexr/openexr/blob/master/OpenEXR/IlmImf/ImfScanLineInputFile.cpp
// 1. Uncompress the data, if necessary (If the line is uncompressed, it's in XDR format, regardless of the compressor's output format.)
// 3. Convert one scan line's worth of pixel data back from the machine-independent representation
// 4. Fill the frame buffer with pixel data, respective to sampling and whatnot

pub fn decompress_bytes(data: Bytes<'_>) -> Result<ByteVec> {
    let mut decompressed = inflate_bytes_zlib(data)
        .map_err(|msg| Error::invalid(msg))?;

    differences_to_samples(&mut decompressed);
    interleave_byte_blocks(&mut decompressed);
    Ok(decompressed)
}

pub fn compress_bytes(packed: Bytes<'_>) -> Result<ByteVec> {
    let mut packed = Vec::from(packed); // TODO no alloc
    separate_bytes_fragments(&mut packed);
    samples_to_differences(&mut packed);

    {
        // TODO fine-tune compression options
        let mut compressor = ZlibEncoder::new(
            Vec::with_capacity(packed.len()),
            deflate::Compression::Fast
        );

        io::copy(&mut packed.as_slice(), &mut compressor)?;
        Ok(compressor.finish()?)
    }
}
<reponame>ezlo-picori/mutsolver-core
use mutsolver_core::{Options, Test};

#[test]
fn run_at_test() {
    // "At" test should succeed if word


.gnu.org/licenses/>.
 */

package com.twoeightnine.root.xvii.chats.attachments.stickersemoji

import android.content.Context
import android.view.View
import com.twoeightnine.root.xvii.R
import com.twoeightnine.root.xvii.model.attachments.Sticker
import com.twoeightnine.root.xvii.views.KeyboardWindow
import global.msnthrp.xvii.data.stickersemoji.model.Emoji
import global.msnthrp.xvii.uikit.extensions.hide
import global.msnthrp.xvii.uikit.extensions.isValidForGlide
import kotlinx.android.synthetic.main.window_stickers.view.*

class StickersEmojiWindow(
        rootView: View,
        context: Context,
        onKeyboardClosed: () -> Unit,
        private val onStickerClicked: (Sticker) -> Unit,
        private val onEmojiClicked: (Emoji) -> Unit
) : KeyboardWindow(rootView, context, onKeyboardClosed) {

    private val repo by lazy {
        StickersEmojiRepository()
    }

    override fun getAdditionalHeight() = 0

    override fun createView(): View =
            View.inflate(context, R.layout.window_stickers, null)

    override fun onViewCreated() {
        super.onViewCreated()
        loadEmojisAndStickers(forceLoad = false)
        setOnDismissListener {
            repo.destroy()
        }
    }

    private fun loadEmojisAndStickers(forceLoad: Boolean) {
        repo.loadEmojis { emojiPacks ->
            val hasRecentEmoji = emojiPacks.find { it.name == null }?.emojis?.isNotEmpty()
                    ?: false
            repo.loadStickers(forceLoad = forceLoad) { stickerPacks ->
                if (!context.isValidForGlide()) return@loadStickers

                val hasRecentStickers = stickerPacks.find { it.name == null }?.stickers?.isNotEmpty()
                        ?: false
                with(contentView) {
                    progressBar.hide()
                    val pagerAdapter = PacksPagerAdapter(context, stickerPacks, emojiPacks, WindowCallback())
                    viewPager.adapter = pagerAdapter
                    val posDelta = when {
                        hasRecentStickers -> 0
                        hasRecentEmoji -> -1
                        else -> -2
                    }
                    tabs.setupWithViewPager(viewPager)
                    viewPager.currentItem = pagerAdapter.recentStickersPosition + posDelta

                    for (i in 0 until tabs.tabCount) {
                        val tab = tabs.getTabAt(i)
                        tab?.customView = pagerAdapter.getTabView(i)
                    }
                    tabs.isSmoothScrollingEnabled = true
                    tabs.postDelayed({
                        tabs.getTabAt(viewPager.currentItem)?.select()
                    }, 100L)
                }
            }
        }
    }

    private inner class WindowCallback : PacksPagerAdapter.Callback {

        override fun onStickerClicked(sticker: global.msnthrp.xvii.data.stickersemoji.model.Sticker) {
            this@StickersEmojiWindow.onStickerClicked(Sticker(stickerId = sticker.id))
        }

        override fun onEmojiClicked(emoji: Emoji) {
            this@StickersEmojiWindow.onEmojiClicked(emoji)
            repo.setEmojiUsed(emoji.code)
        }
    }
}/*
 * SPDX-License-Identifier: BUSL-1.1
 *
 * Copyright © 2025 Two Factor Authentication Service, Inc.
 * Licensed under the Business Source License 1.1
 * See LICENSE file for full terms
 */

package com.twofasapp.core.design.state

import kotlinx


8.646,11.85 8.227,11.733 7.807,11.616 7.448,9.578 7.448,8.527 7.448,7.48 8.765,7.546 8.765,7.546 8.765,7.546 8.466,6.372 8.765,4.332 9.064,2.292 9.368,1.137 12.064,0.731 12.669,0.639 13.195,0.639 13.652,0.688 14.2,0.321 15.333,-0.197 17.148,0.077 19.843,0.485 20.741,2.292 21.04,4.332 21.339,6.372 21.04,7.546 21.04,7.546 21.04,7.546 22.357,7.48 22.357,8.527"/>',
    parameters_puzzle_icon: '<path fill="#{$color}" stroke="#{$stroke-color}" stroke-width="#{$stroke-width}" style="#{$css}" d="M31.718,22.593C33.55,23.917 33.968,26.48 32.65,28.319 31.33,30.158 28.778,30.576 26.946,29.253 26.408,28.865 25.996,28.367 25.71,27.815L20.562,35 13.882,30.174C14.276,29.908 14.636,29.573 14.93,29.163 16.247,27.324 15.832,24.76 14,23.437 12.168,22.114 9.614,22.531 8.296,24.371 8.002,24.78 7.798,25.228 7.674,25.69L-0.001,20.144 5.574,12.364C4.554,12.521 3.474,12.293 2.57,11.641 0.738,10.317 0.322,7.752 1.64,5.915 2.958,4.075 5.512,3.657 7.344,4.982 8.248,5.635 8.806,6.591 8.982,7.611L14.438,0 22.346,5.714C22.414,5.018 22.658,4.333 23.094,3.725 24.412,1.887 26.964,1.468 28.796,2.792 30.628,4.115 31.044,6.679 29.726,8.518 29.29,9.125 28.72,9.573 28.084,9.859L35,14.854 29.968,21.874C30.582,21.97,31.182,22.205,31.718,22.593"/>',
    parameters_brackets_icon: '<path fill="#{$color}" stroke="#{$stroke-color}" stroke-width="#{$stroke-width}" style="#{$css}" d="M21.264,24.369C24.731,23.584 25.282,22.701 25.282,20.673 25.282,20.117 25.184,19.07 25.184,18.383 25.184,15.995 26.448,14.654 28.812,14 26.448,13.346 25.184,12.004 25.184,9.617 25.184,8.93 25.282,7.883 25.282,7.327 25.282,5.299 24.731,4.416 21.264,3.631L22.204,0C28.683,0.785 30.757,2.715 30.757,6.313 30.757,6.804 30.659,8.178 30.659,8.734 30.659,11.219 31.955,11.939 34.482,11.939L35,11.939 35,16.06 34.482,16.06C31.955,16.06 30.659,16.78 30.659,19.266 30.659,19.822 30.757,21.196 30.757,21.687 30.757,25.285 28.


        &self,
        ctx: Context,
        cf: String,
        start_key: Vec<u8>,
        end_key: Option<Vec<u8>>,
        limit: usize,
    ) -> Result<Vec<Result<KvPair>>> {
        self.store
            .raw_scan(ctx, cf, start_key, end_key, limit, false, true)
            .wait()
    }
}
<reponame>dakom/awsm-renderer
pub mod sprite;
pub mod cube;
pub mod picker_debug;
use criterion::{criterion_group, criterion_main, BatchSize, Bencher, BenchmarkId, Criterion};
use delaunator::triangulate;
use voronoice::*;

fn create_random_sites(size: usize) -> Vec<Point> {
    use rand::Rng;
    let mut rng = rand::thread_rng();

    let x_range = rand::distributions::Uniform::new(-1.0, 1.0);
    let y_range = rand::distributions::Uniform::new(-1.0, 1.0);
    (0..size)
        .map(|_| Point {
            x: rng.sample(x_range),
            y: rng.sample(y_range),
        })
        .collect()
}

fn delaunay_benchmark_fn(b: &mut Bencher, size: usize) {
    b.iter_batched(
        || create_random_sites(size),
        |sites| (triangulate(&sites), sites),
        BatchSize::SmallInput,
    );
}

fn voronoi_benchmark_fn(b: &mut Bencher, size: usize) {
    b.iter_batched(
        || create_random_sites(size),
        |sites| VoronoiBuilder::default().set_sites(sites).build(),
        BatchSize::SmallInput,
    );
}

fn criterion_benchmark(c: &mut Criterion) {
    let mut group = c.benchmark_group("Compare");
    let iterations: [usize; 7] = [7, 100, 500, 1_000, 10_000, 100_000, 500_000];

    for size in iterations.iter() {
        group.bench_with_input(BenchmarkId::new("voronoi", size), size, |b, &bench_size| {
            voronoi_benchmark_fn(b, bench_size)
        });

        group.bench_with_input(
            BenchmarkId::new("delaunay", size),
            size,
            |b, &bench_size| delaunay_benchmark_fn(b, bench_size),
        );
    }

    group.finish();
}

criterion_group!(benches, criterion_benchmark);
criterion_main!(benches);
//! Shared types for ji cloud project.

#![deny(missing_docs)]
#![warn(rust_2018_idioms)]
#![warn(future_incompatible)]
#![warn(clippy::pedantic)]
#![warn(clippy::multiple_crate_versions)]
#![warn(clippy::cognitive_complexity)]
#![warn(clippy::future_not_send)]
#![warn(clippy::missing_const_for_fn)]
#![warn(clippy::needless_borrow)]
#![warn(clippy::redundant_pub_crate)]
#![warn(clippy::string_lit_as_bytes)]
#![warn(clippy::use_self)]
#![warn(clippy::useless_let_if_seq)]
#![allow(
    clippy::option_option,
    clippy::module_name_repetitions,
    clippy::default_trait_access
)]

pub mod api;
pub mod domain;
pub mod error;
pub mod media;
// Copyright 2021 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

use {
    crate::paths::{
        maybe_path_for_char, maybe_path_for_cursor_style, path_for_strikeout, path_for_underline,
        Line,
    },
    carnelian::{


 = t.maybeKeyAttr(attrs, r)
	if t.clientID != "" {
		attrs = append(attrs, semconv.MessagingKafkaClientIDKey.String(t.clientID))
	}
	if r.Key != nil && r.Value == nil {
		attrs = append(attrs, semconv.MessagingKafkaMessageTombstoneKey.Bool(true))
	}
	opts := []trace.SpanStartOption{
		trace.WithAttributes(attrs...),
		trace.WithSpanKind(trace.SpanKindProducer),
	}
	// Start the "publish" span.
	ctx, _ := t.tracer.Start(r.Context, r.Topic+" publish", opts...)
	// Inject the span context into the record.
	t.propagators.Inject(ctx, NewRecordCarrier(r))
	// Update the record context.
	r.Context = ctx
}

// OnProduceRecordUnbuffered continues and ends the "publish" span for an
// unbuffered record.
//
// It sets attributes with values unset when producing and records any error
// that occurred during the publish operation.
func (t *Tracer) OnProduceRecordUnbuffered(r *kgo.Record, err error) {
	span := trace.SpanFromContext(r.Context)
	defer span.End()
	span.SetAttributes(
		semconv.MessagingKafkaDestinationPartition(int(r.Partition)),
	)
	if err != nil {
		span.SetStatus(codes.Error, err.Error())
		span.RecordError(err)
	}
}

// OnFetchRecordBuffered starts a new span for the "receive" operation on a
// buffered record.
//
// It sets the span options and extracts the span context from the record,
// updates the record's context to ensure it can be ended in the
// OnFetchRecordUnbuffered hook and can be used in downstream consumer
// processing.
func (t *Tracer) OnFetchRecordBuffered(r *kgo.Record) {
	// Set up the span options.
	attrs := []attribute.KeyValue{
		semconv.MessagingSystemKey.String("kafka"),
		semconv.MessagingSourceKindTopic,
		semconv.MessagingSourceName(r.Topic),
		semconv.MessagingOperationReceive,
		semconv.MessagingKafkaSourcePartition(int(r.Partition)),
	}
	attrs = t.maybeKeyAttr(attrs, r)
	if t.clientID != "" {
		attrs = append(attrs, semconv.MessagingKafkaClientIDKey.String(t.clientID))
	}
	if t.consumerGroup != "" {
		attrs = append(attrs, semconv.MessagingKafkaConsumerGroupKey.String(t.consumerGroup))
	}
	if r.Key != nil && r.Value == nil {
		attrs = append(attrs, semconv.MessagingKafkaMessageTombstoneKey.Bool(true))
	}
	opts := []trace.SpanStartOption{
		trace.WithAttributes(attrs...),
		trace.WithSpanKind(trace.SpanKindConsumer),
	}

	if r.Context == nil {
		r.Context = context.Background()
	}
	// Extract the span context from the record.
	ctx := t.propagators.Extract(r.Context, NewRecordCarrier(r))

	if t.linkSpans {
		opts = append(opts, trace.WithNewRoot())
		if s := trace.SpanContextFromContext(ctx); s.IsValid() {
			opts = append(opts, trace.WithLinks(trace.Link{SpanContext: s}))
		}
	}

	// Start the "receive" span.
	newCtx, _ := t.tracer.Start(ctx, r.Topic+" receive", opts...)
	// Update the record context.
	r.Context = newCtx
}

// OnFetchRecordUnbuffered continues and ends the "receive" span for an
// unbuffered record.
func (t *Tracer) OnFetchRecordUnbuffered(r *kgo.Record, _ bool) {


bles: true,
    composed: true,
    ...eventInitDict,
    detail: { ...detail, ...eventInitDict?.detail },
  });
}

export interface IssueDetail extends LogDetailBase {
  validatorId: string;
  statusNumber: number;
}
export type IssueEvent = CustomEvent<IssueDetail>;
export function newIssueEvent(
  detail: IssueDetail,
  eventInitDict?: CustomEventInit<IssueDetail>
): IssueEvent {
  return new CustomEvent<IssueDetail>('issue', {
    bubbles: true,
    composed: true,
    ...eventInitDict,
    detail: { ...detail, ...eventInitDict?.detail },
  });
}

/** [[`LogEntry`]]s are timestamped upon being committed to the `history`. */
interface Timestamped {
  time: Date | null;
}

export type CommitEntry = Timestamped & CommitDetail;
export type InfoEntry = Timestamped & InfoDetail;
export type SclhistoryEntry = Timestamped & SclhistoryDetail;

export type LogEntry = InfoEntry | CommitEntry | SclhistoryEntry;

/** Represents some work pending completion, upon which `promise` resolves. */
export interface PendingStateDetail {
  promise: Promise<void>;
}
export type PendingStateEvent = CustomEvent<PendingStateDetail>;
export function newPendingStateEvent(
  promise: Promise<void>,
  eventInitDict?: CustomEventInit<Partial<PendingStateDetail>>
): PendingStateEvent {
  return new CustomEvent<PendingStateDetail>('pending-state', {
    bubbles: true,
    composed: true,
    ...eventInitDict,
    detail: { promise, ...eventInitDict?.detail },
  });
}

/** Represents a request for validation. */
export interface ValidateDetail {
  identity: string;
}
export type ValidateEvent = CustomEvent<ValidateDetail>;
export function newValidateEvent(
  identity = '',
  eventInitDict?: CustomEventInit<Partial<ValidateDetail>>
): ValidateEvent {
  return new CustomEvent<ValidateDetail>('validate', {
    bubbles: true,
    composed: true,
    ...eventInitDict,
    detail: { identity, ...eventInitDict?.detail },
  });
}

/** Represents a document to be opened. */
export interface OpenDocDetail {
  doc: XMLDocument;
  docName: string;
  docId?: string;
}
export type OpenDocEvent = CustomEvent<OpenDocDetail>;
export function newOpenDocEvent(
  doc: XMLDocument,
  docName: string,
  eventInitDict?: CustomEventInit<Partial<OpenDocDetail>>
): OpenDocEvent {
  return new CustomEvent<OpenDocDetail>('open-doc', {
    bubbles: true,
    composed: true,
    ...eventInitDict,
    detail: { doc, docName, ...eventInitDict?.detail },
  });
}

/** @returns a reference to `element` with segments delimited by '/'. */
// TODO(c-dinkel): replace with identity (FIXME)
export function referencePath(element: Element): string {
  let path = '';
  let nextParent: Element | null = element.parentElement;
  while (nextParent?.getAttribute('name')) {
    path = '/' + nextParent.getAttribute('name') + path;
    nextParent = nextParent.parentElement;
  }
  return path;
}

export function pathParts(identity: string): [string, string] {
  const path = identity.split('>');
  const end = path.pop() ?? '';
  const start = path.join('>');
  return [start, end];
}

const voidSelector = ':not(*)';

function hitemIdentity(e: Element): string {
  return `${e.getAttribute('version')}\t${e.getAttribute('revi


agePath;
          break;
        case "xp1":
          spsAssetsImagePath = DockerSettings.SpsAssetsXp1ImagePath;
          break;
        default:
          break;
      }

      if (!string.IsNullOrEmpty(spsAssetsImagePath))
      {
        SpsAssetsTagsComboBox.DataContext = tagRepository.GetSortedShortTags(spsAssetsImagePath, DockerSettings.SitecoreModuleNamespace).ToArray();
        SpsAssetsTagsComboBox.SelectedIndex = 0;
      }
    }
  }
}


nv(r5:4)

# CHECK: a820c800 { l2gunlock }
l2gunlock

# CHECK: a820d800 { l2gcleaninv }
l2gcleaninv

# CHECK: a820d000 { l2gclean }
l2gclean

# CHECK: 1ea6fa00 { v1:0 = vswap(q0,v26,v6) }
v1:0=vswap(q0,v26,v6)

# CHECK: eaa8da5c { r29:28,p2 = vacsh(r9:8,r27:26) }
r29:28,p2=vacsh(r9:8,r27:26)

# CHECK: 1eeef124 { v4 = vmux(q1,v17,v14) }
v4=vmux(q1,v17,v14)

# CHECK: 1bb2e928 { v8.b = vlut32(v9.b,v22.b,r2) }
v8.b=vlut32(v9.b,v22.b,r2)

# CHECK: 1b13e0fa { v27:26.h |= vlut16(v0.b,v2.h,r3) }
v27:26.h|=vlut16(v0.b,v2.h,r3)

# CHECK: 1b8ad836 { v22 = vlalign(v24,v17,r2) }
v22=vlalign(v24,v17,r2)

# CHECK: 1b41dd14 { v20 = valign(v29,v8,r1) }
v20=valign(v29,v8,r1)

# CHECK: 1a5ed41e { if (!p0) v31:30 = vcombine(v20,v30) }
if (!p0) v31:30=vcombine(v20,v30)

# CHECK: 1a7cc216 { if (p0) v23:22 = vcombine(v2,v28) }
if (p0) v23:22=vcombine(v2,v28)

# CHECK: 1bf9d389 { v9.h = vasr(v19.w,v31.w,r1):rnd:sat }
v9.h=vasr(v19.w,v31.w,r1):rnd:sat

# CHECK: 1bc9cb56 { v22.h = vasr(v11.w,v25.w,r1) }
v22.h=vasr(v11.w,v25.w,r1)

# CHECK: 1b08d2c5 { v5.ub = vasr(v18.h,v1.h,r0):sat }
v5.ub=vasr(v18.h,v1.h,r0):sat

# CHECK: 1befd0f4 { v20.ub = vasr(v16.h,v29.h,r7):rnd:sat }
v20.ub=vasr(v16.h,v29.h,r7):rnd:sat

# CHECK: 1b86f0d2 { v19:18.h = vlut16(v16.b,v16.h,r6) }
v19:18.h=vlut16(v16.b,v16.h,r6)

# CHECK: 1b9cf6bf { v31.b |= vlut32(v22.b,v19.b,r4) }
v31.b|=vlut32(v22.b,v19.b,r4)

# CHECK: 1b76d6ab { v11.uh = vasr(v22.w,v14.w,r6):sat }
v11.uh=vasr(v22.w,v14.w,r6):sat

# CHECK: 1b14c06f { v15.h = vasr(v0.w,v2.w,r4):sat }
v15.h=vasr(v0.w,v2.w,r4):sat

# CHECK: 1c2eceee { v14 = vxor(v14,v14) }


a_c+4:a_c+7]     ; repeat:0x0, step:0x1, num_a_c:4
    s_waitcnt lgkmcnt(0)
    v_mfma_f32_4x4x4f16 a[a_c+0:a_c+3], v[v_a+2:v_a+3], v[v_b+4:v_b+5], a[a_c+0:a_c+3]     ; repeat:0x0, step:0x0, num_a_c:4
    v_mfma_f32_4x4x4f16 a[a_c+4:a_c+7], v[v_a+2:v_a+3], v[v_b+6:v_b+7], a[a_c+4:a_c+7]     ; repeat:0x0, step:0x1, num_a_c:4
    ; k iteration : 24
    s_waitcnt lgkmcnt(0)
    s_waitcnt vmcnt(8)
    ds_write_b16 v[v_sst_b_os], v[v_gld_b+0]
    ds_write_b16 v[v_sst_b_os], v[v_gld_b+0+1] offset:64
    ds_write_b16 v[v_sst_b_os], v[v_gld_b+2] offset:128
    ds_write_b16 v[v_sst_b_os], v[v_gld_b+2+1] offset:192
    s_waitcnt vmcnt(0)
    ds_write_b16 v[v_sst_a_os], v[v_gld_a+0]
    ds_write_b16 v[v_sst_a_os], v[v_gld_a+0+1] offset:8
    ds_write_b16 v[v_sst_a_os], v[v_gld_a+2] offset:16
    ds_write_b16 v[v_sst_a_os], v[v_gld_a+2+1] offset:24
    ds_write_b16 v[v_sst_a_os], v[v_gld_a+4] offset:32
    ds_write_b16 v[v_sst_a_os], v[v_gld_a+4+1] offset:40
    ds_write_b16 v[v_sst_a_os], v[v_gld_a+6] offset:48
    ds_write_b16 v[v_sst_a_os], v[v_gld_a+6+1] offset:56

    v_xor_b32 v[v_sld_b_os], 8192, v[v_sld_b_os] ; switch double buffer b load
    v_xor_b32 v[v_sld_a_os], 8192, v[v_sld_a_os] ; switch double buffer a load
    s_sub_i32 s[s_kitr], s[s_kitr], 32
    s_cmp_gt_i32 s[s_kitr], 0
    s_cbranch_scc0 L_igemm_wrw_gtcx_nchw_fp16_bx4_ex1_bt64x32x32_wt32x8x4_ws1x2_wr1x1_ta1x1x1x8_1x32x1x8_tb1x1x4x1_1x32x1x8_mfma_finishing
    v_xor_b32 v[v_sst_b_os], 8192, v[v_sst_b_os] ; switch double buffer b store
    v_xor_b32 v[v_sst_a_os], 8192, v[v


etXInput(), 6);
	var YString = ": and Y:" + roundNum(myJoystick.getYInput(), 6);
	console.log(XString + YString);
}, 1000);

function roundNum(num, decimalPlaces)
{
	var extraNum = (1 / (Math.pow(10, decimalPlaces) * 1000));
	var numerator = Math.round((num + extraNum) * (Math.pow(10, decimalPlaces)));
	var denominator = Math.pow(10, decimalPlaces);
	return (numerator / denominator);
}

// Print message when exiting
process.on('SIGINT', function()
{
	console.log("Exiting...");
	process.exit(0);
});
/*
 * Author: Jon Trulson <jtrulson@ics.com>
 * Copyright (c) 2016-2017 Intel Corporation.
 *
 * This program and the accompanying materials are made available under the
 * terms of the The MIT License which is available at
 * https://opensource.org/licenses/MIT.
 *
 * SPDX-License-Identifier: MIT
 */

var sensorObj = require('jsupm_bma250e');

// Instantiate a BMA250E instance using default i2c bus and address
var sensor = new sensorObj.BMA250E();

// For SPI, bus 0, you would pass -1 as the address, and a valid pin for CS:
// BMA250E(0, -1, 10);

// now output data every 250 milliseconds
setInterval(function()
{
    // update our values from the sensor
    sensor.update();

    var data = sensor.getAccelerometer();
    console.log("Accelerometer x: "
                + data.get(0)
                + " y: " + data.get(1)
                + " z: " + data.get(2)
                + " g");

    // we show both C and F for temperature
    console.log("Compensation Temperature: "
                + sensor.getTemperature()
                + " C / "
                + sensor.getTemperature(true)
                + " F");

    console.log();

}, 250);

// exit on ^C
process.on('SIGINT', function()
{
    sensor = null;
    sensorObj.cleanUp();
    sensorObj = null;
    console.log("Exiting.");
    process.exit(0);
});
/*
 * Author: Jon Trulson <jtrulson@ics.com>
 * Copyright (c) 2016 Intel Corporation.
 *
 * This program and the accompanying materials are made available under the
 * terms of the The MIT License which is available at
 * https://opensource.org/licenses/MIT.
 *
 * SPDX-License-Identifier: MIT
 */

var sensorObj = require('jsupm_mcp2515');

// Instantiate a MCP2515 on SPI bus 0 using a hw CS pin (-1).
var sensor = new sensorObj.MCP2515(0, -1);

// NOTE: This example assumes that only two devices are connected
// to the CAN bus, and that both devices are running this example;
// one in TX (transmit) mode, and one in RX (receive) mode.

// If this is not the case, then in rx mode you may see other
// packets from other devices, or not, depending on whether the
// speed is correct for the network.  In tx mode, errors may be
// generated on the bus, especially if the CAN bus speed does not
// match the rest of the network.

// You should start the receiver example first.  The transmitter
// example will fail after about 5 seconds (timeout) of not being
// able to transmit a message.

function transmit(sensor)
{
    // lets build up a packet and try loading it (8 bytes max).
    var myPayload = "01234567";
    console.log("Loading a packet of 8 numbers (0-7) into a TX buffer...");
    sensor.loadTXBuffer(sensorObj.MCP2515_TX_BUFFER


 uploadCallBack;
    String endpoint="";
    String accessKeyId="";
    String accessKeySecret="";
    String bucket="";
    String baseOssUrl="";

    private Handler handler=new Handler(Looper.getMainLooper()){
        @Override
        public void handleMessage(Message msg) {
            super.handleMessage(msg);
            switch (msg.what){
                case 201:
                    if(uploadCallBack!=null){
                        uploadCallBack.onSuccess(null,null);
                    }
                    break;
                case 200:
                    if(uploadCallBack!=null){
                        uploadCallBack.onProgress(null,0,0);
                    }
                    break;
                case 202:
                    if(uploadCallBack!=null){
                        uploadCallBack.onFailure(null,null,null);
                    }
                    break;

            }
        }
    };
    public UploadFileUtils(Context context, String testObject, String uploadFilePath) {

        if(SDKConstant.IS_LIMITLESS){
            endpoint= HTPreferenceManager.getInstance().getEndpoint();
            accessKeyId=HTPreferenceManager.getInstance().getAccessKeyId();
            accessKeySecret=HTPreferenceManager.getInstance().getAccessKeySecret();
            bucket=HTPreferenceManager.getInstance().getBucket();
            baseOssUrl=HTPreferenceManager.getInstance().getOssBaseUrl();
        }else {
            endpoint=SDKConstant.endpoint;
            accessKeyId=SDKConstant.accessKeyId;
            accessKeySecret=SDKConstant.accessKeySecret;
            bucket=SDKConstant.bucket;
            baseOssUrl=SDKConstant.baseOssUrl;
        }
        OSSCredentialProvider credentialProvider = new OSSPlainTextAKSKCredentialProvider(accessKeyId, accessKeySecret);
        ClientConfiguration conf = new ClientConfiguration();
        conf.setConnectionTimeout(15 * 1000); // 连接超时，默认15秒
        conf.setSocketTimeout(15 * 1000); // socket超时，默认15秒
        conf.setMaxConcurrentRequest(5); // 最大并发请求书，默认5个
        conf.setMaxErrorRetry(2); // 失败后最大重试次数，默认2次
        OSSLog.enableLog();
        oss = new OSSClient(context, endpoint, credentialProvider, conf);
        this.testObject = testObject;
        this.uploadFilePath = uploadFilePath;
    }
    public  String getOssBaseUrl(){
        return   baseOssUrl;
    }
    // 从本地文件上传，采用阻塞的同步接口
    public void putObjectFromLocalFile() {
        // 构造上传请求
        PutObjectRequest put = new PutObjectRequest(bucket, testObject, uploadFilePath);

        try {
            PutObjectResult putResult = oss.putObject(put);

            Log.d("PutObject", "UploadSuccess");

            Log.d("ETag", putResult.getETag());
            Log.d("RequestId", putResult.getRequestId());
        } catch (ClientException e) {
            // 本地异常如网络异常等
            e.printStackTrace();
        } catch (ServiceException e) {
            // 服务异常
            Log.e("RequestId", e.getRequestId());
            Log.e("ErrorCode", e.getErrorCode());
            Log.e("HostId", e.getHostId());
            Log.e("RawMessage", e.getRawMessage());
        }
    }

    // 从本地文件上传，使用非阻塞的异步接口
    public void asyncUploadFile(final UploadCallBack uploadCallBack) {

        // 构造上传请求
        PutObjectRequest put = new PutObjectRequest(bucket, testObject, uploadFilePath);

        // 异步上传时可以设置进度回调
        put.setProgressCallback(new OSSProgressCallback<PutObjectRequest>() {
            @Override
            public void onProgress(PutObjectRequest request, long currentSize, long totalSize) {
                uploadCallBack.onProgress(request,currentSize,totalSize);
                Log.d("PutObject", "currentSize: " + c


					{
								string[] parts = info.Split('\t');
								Console.WriteLine($"{parts[0]} {parts[1]}");
							}
						}

						Console.WriteLine();
						Console.WriteLine("Press enter to stop playing");
						Console.ReadLine();
					}
					finally
					{
						player.StopPlaying();
					}
				}
				finally
				{
					player.CleanupPlayer();
				}
			}
			finally
			{
				outputAgent.Shutdown();
			}
		}
	}
}


t int DXGI_USAGE_BACK_BUFFER                =  ( 1L << (2 + 4) );
static const int DXGI_USAGE_SHARED                     =  ( 1L << (3 + 4) );
static const int DXGI_USAGE_READ_ONLY                  =  ( 1L << (4 + 4) );
static const int DXGI_USAGE_DISCARD_ON_PRESENT         =  ( 1L << (5 + 4) );
static const int DXGI_USAGE_UNORDERED_ACCESS           =  ( 1L << (6 + 4) );
]]

ffi.cdef[[
typedef struct DXGI_RGB
{
    float Red;
    float Green;
    float Blue;
} DXGI_RGB;

typedef struct DXGI_GAMMA_CONTROL
{
    DXGI_RGB Scale;
    DXGI_RGB Offset;
    DXGI_RGB GammaCurve[ 1025 ];
} DXGI_GAMMA_CONTROL;

typedef struct DXGI_GAMMA_CONTROL_CAPABILITIES
{
    BOOL ScaleAndOffsetSupported;
    float MaxConvertedValue;
    float MinConvertedValue;
    UINT NumGammaControlPoints;
    float ControlPointPositions[1025];
} DXGI_GAMMA_CONTROL_CAPABILITIES;

typedef struct DXGI_RATIONAL
{
    UINT Numerator;
    UINT Denominator;
} DXGI_RATIONAL;
]]

ffi.cdef[[
typedef enum DXGI_MODE_SCANLINE_ORDER
{
    DXGI_MODE_SCANLINE_ORDER_UNSPECIFIED        = 0,
    DXGI_MODE_SCANLINE_ORDER_PROGRESSIVE        = 1,
    DXGI_MODE_SCANLINE_ORDER_UPPER_FIELD_FIRST  = 2,
    DXGI_MODE_SCANLINE_ORDER_LOWER_FIELD_FIRST  = 3
} DXGI_MODE_SCANLINE_ORDER;

typedef enum DXGI_MODE_SCALING
{
    DXGI_MODE_SCALING_UNSPECIFIED   = 0,
    DXGI_MODE_SCALING_CENTERED      = 1,
    DXGI_MODE_SCALING_STRETCHED     = 2
} DXGI_MODE_SCALING;

typedef enum DXGI_MODE_ROTATION
{
    DXGI_MODE_ROTATION_UNSPECIFIED  = 0,
    DXGI_MODE_ROTATION_IDENTITY     = 1,
    DXGI_MODE_ROTATION_ROTATE90     = 2,
    DXGI_MODE_ROTATION_ROTATE180    = 3,
    DXGI_MODE_ROTATION_ROTATE270    = 4
} DXGI_MODE_ROTATION;
]]

ffi.cdef[[
typedef struct DXGI_MODE_DESC
{
    UINT Width;
    UINT Height;
    DXGI_RATIONAL RefreshRate;
    DXGI_FORMAT Format;
    DXGI_MODE_SCANLINE_ORDER ScanlineOrdering;
    DXGI_MODE_SCALING Scaling;
} DXGI_MODE_DESC;
]]
DXGI_MODE_DESC = ffi.typeof("DXGI_MODE_DESC")
DXGI_MODE_DESC_mt = {
    __tostring = function(self)
        local refresh = self.RefreshRate.Numerator / self.RefreshRate.Denominator
        return string.format("%dx%d %f", self.Width, self.Height, refresh)
    end,
}
ffi.metatype(DXGI_MODE_DESC, DXGI_MODE_DESC_mt)

ffi.cdef[[
typedef struct DXGI_SAMPLE_DESC
{
    UINT Count;
    UINT Quality;
} DXGI_SAMPLE_DESC;
]]


using ShortDev.Microsoft.ConnectedDevices.Messages;
using ShortDev.Microsoft.ConnectedDevices.Transports;
using System.Buffers;

namespace ShortDev.Microsoft.ConnectedDevices;

partial class ConnectedDevicesPlatform
{
    static readonly ArrayPool<byte> _messagePool = ArrayPool<byte>.Create();
    private void ReceiveLoop(CdpSocket socket)
    {
        RegisterKnownSocket(socket);
        Task.Run(() =>
        {
            EndianReader streamReader = new(Endianness.BigEndian, socket.InputStream);
            using (socket)
            {
                ReceiveLoop(socket, ref streamReader);
            }
        });
    }

    void ReceiveLoop(CdpSocket socket, ref EndianReader streamReader)
    {
        do
        {
            CdpSession? session = null;
            try
            {
                var header = CommonHeader.Parse(ref streamReader);

                if (socket.IsClosed)
                    return;

                session = CdpSession.G


# -*- coding: utf-8 -*-
"""
Created on Mon Apr  3 19:24:54 2023

@author: User01
"""

from seqcnn_model import seqcnn
import matlab.engine
import scipy.io as io
import glob
import os
import numpy as np
from sklearn.preprocessing import StandardScaler
from sklearn.decomposition import PCA
from sklearn.metrics import confusion_matrix, f1_score
import tensorflow as tf
import joblib
import pickle

total_cm = np.zeros((5, 5))
path = 'data/SC/'
distance_filepath = 'data/SC/distance.mat'
data = io.loadmat(distance_filepath)
distance = data['distance']
for file in [1]:
    data_dir = path  + 'test/' + file + '/'
    index = 1
    prob_each = []
    d = []
    for t in range(distance.shape[-1]):
        model_dir_t = path  + 'weights/' + file +  + '/fold' + str(
            t) + '/feature_learning/f_model_weights.h5'
        prob_tmp, y_true = seqcnn(model_dir_t, data_dir)
        prob_each.append(prob_tmp)
        d.append(distance[index, t])
    d = np.array(d)
    d = d**2
    d = d.reshape(-1, 1)
    summ = sum(d)
    d0 = 1 / (d / summ)
    prob = prob_tmp * 0
    for ii in range(len(d0)):
        prob += prob_each[ii] * d0[ii]
    y_pred = np.argmax(prob, axis=1)
    y_pred = y_pred.reshape(-1, 1)
    y_true = y_true.reshape(-1, 1)
    train_cm = confusion_matrix(y_true, y_pred)
    acc = np.mean(y_true == y_pred)
    f1 = f1_score(y_true, y_pred, average="macro")
    print("train: (acc={:.3f},f1={:.3f})".format(acc, f1))
    print(train_cm)
    total_cm += train_cm
print(total_cm)


0xfee0], // ARABIC LETTER LAM
    0x0645: [0xfee1, 0xfee2, 0xfee3, 0xfee4], // ARABIC LETTER MEEM
    0x0646: [0xfee5, 0xfee6, 0xfee7, 0xfee8], // ARABIC LETTER NOON
    0x0647: [0xfee9, 0xfeea, 0xfeeb, 0xfeec], // ARABIC LETTER HEH
    0x0648: [0xfeed, 0xfeee], // ARABIC LETTER WAW
    0x0649: [0xfeef, 0xfef0, 64488, 64489], // ARABIC LETTER ALEF MAKSURA
    0x064a: [0xfef1, 0xfef2, 0xfef3, 0xfef4], // ARABIC LETTER YEH
    0x0671: [0xfb50, 0xfb51], // ARABIC LETTER ALEF WASLA
    0x0677: [0xfbdd], // ARABIC LETTER U WITH HAMZA ABOVE
    0x0679: [0xfb66, 0xfb67, 0xfb68, 0xfb69], // ARABIC LETTER TTEH
    0x067a: [0xfb5e, 0xfb5f, 0xfb60, 0xfb61], // ARABIC LETTER TTEHEH
    0x067b: [0xfb52, 0xfb53, 0xfb54, 0xfb55], // ARABIC LETTER BEEH
    0x067e: [0xfb56, 0xfb57, 0xfb58, 0xfb59], // ARABIC LETTER PEH
    0x067f: [0xfb62, 0xfb63, 0xfb64, 0xfb65], // ARABIC LETTER TEHEH
    0x0680: [0xfb5a, 0xfb5b, 0xfb5c, 0xfb5d], // ARABIC LETTER BEHEH
    0x0683: [0xfb76, 0xfb77, 0xfb78, 0xfb79], // ARABIC LETTER NYEH
    0x0684: [0xfb72, 0xfb73, 0xfb74, 0xfb75], // ARABIC LETTER DYEH
    0x0686: [0xfb7a, 0xfb7b, 0xfb7c, 0xfb7d], // ARABIC LETTER TCHEH
    0x0687: [0xfb7e, 0xfb7f, 0xfb80, 0xfb81], // ARABIC LETTER TCHEHEH
    0x0688: [0xfb88, 0xfb89], // ARABIC LETTER DDAL
    0x068c: [0xfb84, 0xfb85], // ARABIC LETTER DAHAL
    0x068d: [0xfb82, 0xfb83], // ARABIC LETTER DDAHAL
    0x068e: [0xfb86, 0xfb87], // ARABIC LETTER DUL
    0x0691: [0xfb8c, 0xfb8d], // ARABIC LETTER RREH
    0x0698: [0xfb8a, 0xfb8b], // ARABIC LETTER JEH
    0x06a4: [0xfb6a, 0xfb6b, 0xfb6c, 0xfb6d], // ARABIC LETTER VEH
    0x06a6: [0xfb6e, 0xfb6f, 0xfb70, 0xfb71], // ARABIC LETTER PEHEH
    0x06a9: [0xfb8e, 0xfb8f, 0xfb90, 0xfb91], // ARABIC LETTER KEHEH
    0x06ad: [0xfbd3, 0xfbd4, 0xfbd5, 0xfbd6], // ARABIC LETTER NG
    0x06af: [0xfb92, 0xfb93, 0xfb94, 0xfb95], // ARABIC LETTER GAF
    0x06b1: [0xfb9a, 0xfb9b


av_packet_unref(pkt);

    return ret;
}

static int mpeg4_unpack_bframes_init(AVBSFContext *ctx)
{
    if (ctx->par_in->extradata) {
        int pos_p_ext = -1;
        scan_buffer(ctx->par_in->extradata, ctx->par_in->extradata_size, &pos_p_ext, NULL, NULL);
        if (pos_p_ext >= 0) {
            av_log(ctx, AV_LOG_DEBUG,
                   "Updating DivX userdata (remove trailing 'p') in extradata.\n");
            ctx->par_out->extradata[pos_p_ext] = '\0';
        }
    }

    return 0;
}

static void mpeg4_unpack_bframes_close_flush(AVBSFContext *bsfc)
{
    UnpackBFramesBSFContext *ctx = bsfc->priv_data;
    av_buffer_unref(&ctx->b_frame_ref);
}

static const enum AVCodecID codec_ids[] = {
    AV_CODEC_ID_MPEG4, AV_CODEC_ID_NONE,
};

const FFBitStreamFilter ff_mpeg4_unpack_bframes_bsf = {
    .p.name         = "mpeg4_unpack_bframes",
    .p.codec_ids    = codec_ids,
    .priv_data_size = sizeof(UnpackBFramesBSFContext),
    .init           = mpeg4_unpack_bframes_init,
    .filter         = mpeg4_unpack_bframes_filter,
    .flush          = mpeg4_unpack_bframes_close_flush,
    .close          = mpeg4_unpack_bframes_close_flush,
};


ram dirReset Whether to append a trailing unicode bidi mark matching the
   *          context direction, when needed, to prevent the possible garbling
   *          of whatever may follow {@code str}
   * @return Input string after applying the above processing.
   */
  protected String unicodeWrapBase(String str, boolean isHtml,
      boolean dirReset) {
    Direction dir = BidiUtils.get().estimateDirection(str, isHtml);
    return unicodeWrapWithKnownDirBase(dir, str, isHtml, dirReset);
  }

  /**
   * @see BidiFormatter#unicodeWrapWithKnownDir(HasDirection.Direction, String, boolean, boolean)
   *
   * @param dir {@code str}'s direction
   * @param str The input string
   * @param isHtml Whether {@code str} is HTML / HTML-escaped
   * @param dirReset Whether to append a trailing unicode bidi mark matching the
   *          context direction, when needed, to prevent the possible garbling
   *          of whatever may follow {@code str}
   * @return Input string after applying the above processing.
   */
  protected String unicodeWrapWithKnownDirBase(Direction dir, String str,
      boolean isHtml, boolean dirReset) {
    StringBuilder result = new StringBuilder();
    if (dir != Direction.DEFAULT && dir != contextDir) {
      result.append(dir == Direction.RTL ? Format.RLE : Format.LRE);
      result.append(str);
      result.append(Format.PDF);
    } else {
      result.append(str);
    }

    result.append(dirResetIfNeeded(str, dir, isHtml, dirReset));
    return result.toString();
  }

  /**
   * Returns a unicode BiDi mark matching the context direction (LRM or RLM) if
   * {@code dirReset}, and if the overall direction or the exit direction of
   * {@code str} are opposite to the context direction. Otherwise returns the
   * empty string.
   *
   * @param str The input string
   * @param dir {@code str}'s overall direction
   * @param isHtml Whether {@code str} is HTML / HTML-escaped
   * @param dirReset Whether to perform the reset
   * @return A unicode BiDi mark or the empty string.
   */
  private String dirResetIfNeeded(String str, Direction dir, boolean isHtml,
      boolean dirReset) {
    // endsWithRtl and endsWithLtr are called only if needed (short-circuit).
    if (dirReset
        && ((contextDir == Direction.LTR &&
            (dir == Direction.RTL ||
             BidiUtils.get().endsWithRtl(str, isHtml))) ||
            (contextDir == Direction.RTL &&
            (dir == Direction.LTR ||
             BidiUtils.get().endsWithLtr(str, isHtml))))) {
      return contextDir == Direction.LTR ? Format.LRM_STRING
          : Format.RLM_STRING;
    } else {
      return "";
    }
  }
}
/*
 * Copyright 2011 Google Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
 * use this file except in compliance with the License. You may obtain a copy of
 * the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations under
 * the License.
 */
package com.google.gwt.i18n.rebind;

import com.google.gwt.core.ext.typeinfo.JArrayType;
import com.google.gwt.core.ext.typeinfo.JClassType;
import com.google.gwt.core.ext.typeinfo.JEnumConstant;
import com.google.gwt.core.ext.typeinfo.JEnumType;
import com


bytes)
        };

        // Check that the verification key is a valid RedPallas verification key.
        let pub_key = VerificationKey::try_from(pk_bytes)
            .expect("The test verification key to be well-formed.");

        // Check that signature validation has the expected result.
        self.is_valid == pub_key.verify(&self.msg, &sig).is_ok()
    }

    fn apply_tweak(&mut self, tweak: &Tweak) {
        match tweak {
            Tweak::None => {}
            Tweak::ChangeMessage => {
                // Changing the message makes the signature invalid.
                self.msg.push(90);
                self.is_valid = false;
            }
            Tweak::ChangePubkey => {
                // Changing the public key makes the signature invalid.
                self.pk_bytes = self.invalid_pk_bytes;
                self.is_valid = false;
            }
        }
    }
}

fn tweak_strategy() -> impl Strategy<Value = Tweak> {
    prop_oneof![
        10 => Just(Tweak::None),
        1 => Just(Tweak::ChangeMessage),
        1 => Just(Tweak::ChangePubkey),
    ]
}

proptest! {
    #[test]
    fn tweak_signature(
        tweaks in prop::collection::vec(tweak_strategy(), (0,5)),
        rng_seed in prop::array::uniform32(any::<u8>()),
    ) {
        // Use a deterministic RNG so that test failures can be reproduced.
        let mut rng = ChaChaRng::from_seed(rng_seed);

        // Create a test case for each signature type.
        let msg = b"test message for proptests";
        let mut binding = SignatureCase::<Binding>::new(&mut rng, msg.to_vec());
        let mut spendauth = SignatureCase::<SpendAuth>::new(&mut rng, msg.to_vec());

        // Apply tweaks to each case.
        for t in &tweaks {
            binding.apply_tweak(t);
            spendauth.apply_tweak(t);
        }

        assert!(binding.check());
        assert!(spendauth.check());
    }

    #[test]
    fn randomization_commutes_with_pubkey_homomorphism(rng_seed in prop::array::uniform32(any::<u8>())) {
        // Use a deterministic RNG so that test failures can be reproduced.
        let mut rng = ChaChaRng::from_seed(rng_seed);

        let r = {
            // XXX-pasta_curves: better API for this
            let mut bytes = [0; 64];
            rng.fill_bytes(&mut bytes[..]);
            Randomizer::from_bytes_wide(&bytes)
        };

        let sk = SigningKey::<SpendAuth>::new(&mut rng);
        let pk = VerificationKey::from(&sk);

        let sk_r = sk.randomize(&r);
        let pk_r = pk.randomize(&r);

        let pk_r_via_sk_rand: [u8; 32] = VerificationKeyBytes::from(VerificationKey::from(&sk_r)).into();
        let pk_r_via_pk_rand: [u8; 32] = VerificationKeyBytes::from(pk_r).into();

        assert_eq!(pk_r_via_pk_rand, pk_r_via_sk_rand);
    }
}
<reponame>russellwmy/alumina
//! `Graph`, `Node`, and `Op` form the computational graph.
//!
//! The primary datastructure of this library is a bipartite graph of alternating tensors and operations, or
//! alternately


(AndroidJUnit4::class)
@MediumTest
class StreakCardViewTest : BaseViewTest() {
    val PATH = "habits/show/StreakCard/"
    private lateinit var view: StreakCardView

    @Before
    override fun setUp() {
        super.setUp()
        val habit = fixtures.createLongHabit()
        view = LayoutInflater
            .from(targetContext)
            .inflate(R.layout.show_habit, null)
            .findViewById<View>(R.id.streakCard) as StreakCardView
        view.setState(
            StreakCardState(
                bestStreaks = habit.streaks.getBest(10),
                color = habit.color,
                theme = LightTheme()
            )
        )
        measureView(view, 800f, 600f)
    }

    @Test
    fun testRender() {
        assertRenders(view, PATH + "render.png")
    }
}
/*
 * Copyright (C) 2016-2025 Álinson Santos Xavier <git@axavier.org>
 *
 * This file is part of Loop Habit Tracker.
 *
 * Loop Habit Tracker is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by the
 * Free Software Foundation, either version 3 of the License, or (at your
 * option) any later version.
 *
 * Loop Habit Tracker is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
 * more details.
 *
 * You should have received a copy of the GNU General Public License along
 * with this program. If not, see <http://www.gnu.org/licenses/>.
 */

package org.isoron.uhabits.activities.habits.list.views

import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.MediumTest
import org.hamcrest.CoreMatchers.equalTo
import org.hamcrest.MatcherAssert.assertThat
import org.isoron.uhabits.BaseViewTest
import org.isoron.uhabits.core.models.Entry.Companion.NO
import org.isoron.uhabits.core.models.Entry.Companion.YES_AUTO
import org.isoron.uhabits.core.models.Entry.Companion.YES_MANUAL
import org.isoron.uhabits.core.models.Timestamp
import org.isoron.uhabits.utils.PaletteUtils
import org.junit.After
import org.junit.Before
import org.junit.Test
import org.junit.runner.RunWith

private const val PATH = "habits/list/CheckmarkPanelView"

@RunWith(AndroidJUnit4::class)
@MediumTest
class EntryPanelViewTest : BaseViewTest() {

    private lateinit var view: CheckmarkPanelView

    @Before
    override fun setUp() {
        super.setUp()
        val checkmarks = intArrayOf(
            YES_MANUAL,
            YES_MANUAL,
            YES_AUTO,
            NO,
            NO,
            NO,
            YES_MANUAL
        )

        view = component.getCheckmarkPanelViewFactory().create().apply {
            values = checkmarks
            buttonCount = 4
            color = PaletteUtils.getAndroidTestColor(7)
        }
        view.onAttachedToWindow()
        measureView(view, dpToPixels(200), dpToPixels(200))
    }

    @After
    public override fun tearDown() {
        super.tearDown()
    }

    @Test
    fun testRender() {
        assertRenders(view, "$PATH/render.png")
    }

    @Test
    fun testToggle() {
        val timestamps = mutableListOf<Timestamp>()
        view.onToggle = { t, _, _ -> timestamps.add(t) }
        view.buttons[0].performLongClick()
        view.buttons[2


الأكثر نشاطا/الأسبوع ال48 2019">بعدد إنشاء المقالات
شكراً لجهودك.
مجتمع ويكيبيديا العربية

 5:21، 2 ديسمبر 2019  (ت ع م)

أسماء التصنيفات

مرحبًا يا خالد، ملاحظة حول أسماء التصنيفات، تبدأ الأسماء مرفوعة وليس منصوبة أو مجرورة، فالتصنيف الذي أنشأته الآن يجب أن يسمى "المتعاونون الدنماركيون مع ألمانيا النازية".--محمد أحمد عبد الفتاح (نقاش) 21:44، 3 ديسمبر 2019 (ت ع م)Reply

<span class="mw-headline" id="ملاحظات


sk-spinner-circle .sk-circle::before {
  animation: 1.2s ease-in-out 0s normal both infinite running sk-circleBounceDelay;
  background-color: #1ab394;
  border-radius: 100%;
  content: "";
  display: block;
  height: 20%;
  margin: 0 auto;
  width: 20%;
}
.sk-spinner-circle .sk-circle2 {
  transform: rotate(30deg);
}
.sk-spinner-circle .sk-circle3 {
  transform: rotate(60deg);
}
.sk-spinner-circle .sk-circle4 {
  transform: rotate(90deg);
}
.sk-spinner-circle .sk-circle5 {
  transform: rotate(120deg);
}
.sk-spinner-circle .sk-circle6 {
  transform: rotate(150deg);
}
.sk-spinner-circle .sk-circle7 {
  transform: rotate(180deg);
}
.sk-spinner-circle .sk-circle8 {
  transform: rotate(210deg);
}
.sk-spinner-circle .sk-circle9 {
  transform: rotate(240deg);
}
.sk-spinner-circle .sk-circle10 {
  transform: rotate(270deg);
}
.sk-spinner-circle .sk-circle11 {
  transform: rotate(300deg);
}
.sk-spinner-circle .sk-circle12 {
  transform: rotate(330deg);
}
.sk-spinner-circle .sk-circle2::before {
  animation-delay: -1.1s;
}
.sk-spinner-circle .sk-circle3::before {
  animation-delay: -1s;
}
.sk-spinner-circle .sk-circle4::before {
  animation-delay: -0.9s;
}
.sk-spinner-circle .sk-circle5::before {
  animation-delay: -0.8s;
}
.sk-spinner-circle .sk-circle6::before {
  animation-delay: -0.7s;
}
.sk-spinner-circle .sk-circle7::before {
  animation-delay: -0.6s;
}
.sk-spinner-circle .sk-circle8::before {
  animation-delay: -0.5s;
}
.sk-spinner-circle .sk-circle9::before {
  animation-delay: -0.4s;
}
.sk-spinner-circle .sk-circle10::before {
  animation-delay: -0.3s;
}
.sk-spinner-circle .sk-circle11::before {
  animation-delay: -0.2s;
}
.sk-spinner-circle .sk-circle12::before {
  animation-delay: -0.1s;
}
@keyframes sk-circleBounceDelay {
  0%, 80%, 100% {
    transform: scale(0);
  }
  40% {
    transform: scale(1);
  }
}
.sk-spinner-cube-grid {
}
.sk-spinner-cube-grid.sk-spinner {
  height: 30px;
  margin: 0 auto;
  width: 30px;
}
.sk-spinner-cube-grid .sk-cube {
  animation: 1.3s ease-in-out 0s normal none infinite running sk-cubeGridScaleDelay;
  background-color: #1ab394;
  float: left;
  height: 33%;
  width: 33%;
}
.sk-spinner-cube-grid .sk-cube:nth-child(1) {
  animation-delay: 0.2s;
}
.sk-spinner-cube-grid .sk-cube:nth-child(2) {
  animation-delay: 0.3s;
}
.sk-spinner-cube-grid .sk-cube:nth-child(3) {
  animation-delay: 0.4s;
}
.sk-spinner-cube-grid .sk-cube:nth-child(4) {
  animation-delay: 0.1s;


.getBranchEffectTracker().add(_abox.getBranchIndex(), _name);

		boolean restored = false;

		final List<ATermAppl> conjunctions = new ArrayList<>();

		boolean removed = false;

		for (final Iterator<ATermAppl> i = getTypes().iterator(); i.hasNext();)
		{
			final ATermAppl c = i.next();
			final DependencySet d = getDepends(c);

			final boolean removeType = OpenlletOptions.USE_SMART_RESTORE
					//                ? ( !d.contains( _branch ) )
					? d.max() >= branch
					: d.getBranch() > branch;

			if (removeType)
			{
				removed = true;

				_logger.fine(() -> "RESTORE: " + this + " remove type " + c + " " + d + " " + branch);

				//track that this _node is affected
				if (OpenlletOptions.USE_INCREMENTAL_CONSISTENCY && this instanceof Individual)
					_abox.getIncrementalChangeTracker().addDeletedType(this, c);

				i.remove();
				removeType(c);
				restored = true;
			}
			else
				if (OpenlletOptions.USE_SMART_RESTORE && ATermUtils.isAnd(c))
					conjunctions.add(c);
		}

		//update the _queue with things that could readd this type
		if (removed && OpenlletOptions.USE_COMPLETION_QUEUE && this instanceof Individual)
		{
			final Individual ind = (Individual) this;
			ind._applyNext[Node.ATOM] = 0;
			ind._applyNext[Node.OR] = 0;

			final QueueElement qe = new QueueElement(this);
			_abox.getCompletionQueue().add(qe, NodeSelector.DISJUNCTION);
			_abox.getCompletionQueue().add(qe, NodeSelector.ATOM);
		}

		// with smart restore there is a possibility that we remove a conjunct
		// but not the conjunction. this is the case if conjunct was added before
		// the conjunction but depended on an earlier _branch. so we need to make
		// sure all conjunctions are actually applied
		if (OpenlletOptions.USE_SMART_RESTORE)
			for (final ATermAppl c : conjunctions)
			{
				final DependencySet d = getDepends(c);
				for (ATermList cs = (ATermList) c.getArgument(0); !cs.isEmpty(); cs = cs.getNext())
				{
					final ATermAppl conj = (ATermAppl) cs.getFirst();

					addType(conj, d);
				}
			}

		for (final Iterator<Entry<Node, DependencySet>> i = _differents.entrySet().iterator(); i.hasNext();)
		{
			final Entry<Node, DependencySet> entry = i.next();
			final Node node = entry.getKey();
			final DependencySet d = entry.getValue();

			if (d.getBranch() > branch)
			{
				_logger.fine(() -> "RESTORE: " + _name + " delete difference " + node);
				i.remove();
				restored = true;
			}
		}

		removed = false;
		for (final Iterator<Edge> i = _inEdges.iterator(); i.hasNext();)
		{
			final Edge e = i.next();
			final DependencySet d = e.getDepends();

			if (d.getBranch() > branch)
			{
				_logger.fine(() -> "RESTORE: " + _name + " delete reverse edge " + e);

				if (OpenlletOptions.USE_INCREMENTAL_CONSISTENCY)
					_abox.getIncrementalChangeTracker().addDeletedEdge(e);

				i.remove();
				restored = true;
				removed = true;
			}
		}

		if (removed && Openl


的作用。一旦失败，目标会陷入深度昏迷状态，和死亡难以区分。可怕的是，目标仍有意识却无法行动。他将被置入棺材，活着埋到坟地里。一支小管子连接着棺材内和地表，让他能够呼吸。在这段时间中，不幸的法术目标必须每三小时进行一次理智检定，失败会损失 1D6 点理智值。如果目标在此期间陷入疯狂，他会屈服于施法者的意志，为消除对坟墓的恐惧感到高兴。

三个夜晚之后，施法者来到坟地并施放活尸创造术。如果施法者察觉到目标精神上的抵抗，他必须和目标进行意志对抗检定（见第 243 页）。不论施法者疯狂与否，施法成功后目标的意志将被抽离，只剩 1 点。如果施法失败，施法者可以直接盖住呼吸孔，任由目标窒息而死。

施法成功后，施法者即创造了一个僵尸仆从，可以执行简单的命令。这个不幸的僵尸自此始终在施法者的这个法术的作用下，直到他被释放——一般意味着目标真正的死亡或主人的死亡。

创造新法术

有些游戏力求在玩家角色和他们敌人之间找到平衡，但《克苏鲁的呼唤》并非这样的游戏，也没有基于等级的机制让法术对号入座。举例来说，你创造了一个法术，而它和法术列表里的某个法术相似，但是花费少、效果好，这时你并没有违反任何规则。引入可能在游戏中发挥重要作用的要素（如法术）时，要特别当心。你并不是不能这么做，而是不能盲目地去做。

查阅书中的法术，找到一个和你的新法术的效果级别相近的法术。它可以对魔法值、POW 和理智值的消耗给出基准值。

考虑你的法术施放时的难度。施法者可能自己有16 点魔法值，依靠消耗部分生命值，这一数字能够增加至 25 点左右。若超过这一数值，施法者就需要贮存魔法值的容器，或是在施法时增加参与者，让他们贡献魔法值。有些法术需要消耗 POW 去施放。巫师可以通过某些法术或者附魔手杖之类的物品增长 POW。

法术中可以增加牺牲和具有道德争议的仪式，这样做有两个目的。一是照应恐怖主题。二是让法术难于施展或者让玩家陷入道德困境。比如，有一个法术可以阻止敌人却需要进行人祭，玩家会去使用它吗？

<!doctype


N_ observations and _M_ features in each observation.
    /// * `y` - the target class values
    pub fn fit<M: Matrix<T>>(
        x: &M,
        y: &M::RowVector,
        parameters: DecisionTreeClassifierParameters,
    ) -> Result<DecisionTreeClassifier<T>, Failed> {
        let (x_nrows, num_attributes) = x.shape();
        let samples = vec![1; x_nrows];
        DecisionTreeClassifier::fit_weak_learner(x, y, samples, num_attributes, parameters)
    }

    pub(crate) fn fit_weak_learner<M: Matrix<T>>(
        x: &M,
        y: &M::RowVector,
        samples: Vec<usize>,
        mtry: usize,
        parameters: DecisionTreeClassifierParameters,
    ) -> Result<DecisionTreeClassifier<T>, Failed> {
        let y_m = M::from_row_vector(y.clone());
        let (_, y_ncols) = y_m.shape();
        let (_, num_attributes) = x.shape();
        let classes = y_m.unique();
        let k = classes.len();
        if k < 2 {
            return Err(Failed::fit(&format!(
                "Incorrect number of classes: {}. Should be >= 2.",
                k
            )));
        }

        let mut yi: Vec<usize> = vec![0; y_ncols];

        for (i, yi_i) in yi.iter_mut().enumerate().take(y_ncols) {
            let yc = y_m.get(0, i);
            *yi_i = classes.iter().position(|c| yc == *c).unwrap();
        }

        let mut nodes: Vec<Node<T>> = Vec::new();

        let mut count = vec![0; k];
        for i in 0..y_ncols {
            count[yi[i]] += samples[i];
        }

        let root = Node::new(0, which_max(&count));
        nodes.push(root);
        let mut order: Vec<Vec<usize>> = Vec::new();

        for i in 0..num_attributes {
            order.push(x.get_col_as_vec(i).quick_argsort_mut());
        }

        let mut tree = DecisionTreeClassifier {
            nodes,
            parameters,
            num_classes: k,
            classes,
            depth: 0,
        };

        let mut visitor = NodeVisitor::<T, M>::new(0, samples, &order, &x, &yi, 1);

        let mut visitor_queue: LinkedList<NodeVisitor<'_, T, M>> = LinkedList::new();

        if tree.find_best_cutoff(&mut visitor, mtry) {
            visitor_queue.push_back(visitor);
        }

        while tree.depth < tree.parameters.max_depth.unwrap_or(std::u16::MAX) {
            match visitor_queue.pop_front() {
                Some(node) => tree.split(node, mtry, &mut visitor_queue),
                None => break,
            };
        }

        Ok(tree)
    }

    /// Predict class value for `x`.
    /// * `x` - _KxM_ data where _K_ is number of observations and _M_ is number of features.
    pub fn predict<M: Matrix<T>>(&self, x: &M) -> Result<M::RowVector, Failed> {
        let mut result = M::zeros(1, x.shape().0);

        let (n, _) = x.shape();

        for i in 0..n {
            result.set(0, i, self.classes[self.predict_for_row(x, i)]);
        }

        Ok(result.to_row_vector())
    }

    pub(in crate) fn predict_for_row<M: Matrix<T>>(&self, x: &M, row: usize) -> usize {
        let mut result = 0;
        let mut queue: Linked


         # 4-byte Spill
	movl	44(%esp), %ebx          # 4-byte Reload
	adcl	128(%esp), %ebx
	movl	%ebx, 44(%esp)          # 4-byte Spill
	movl	56(%esp), %ebx          # 4-byte Reload
	adcl	132(%esp), %ebx
	movl	%ebx, 56(%esp)          # 4-byte Spill
	movl	52(%esp), %ebx          # 4-byte Reload
	adcl	136(%esp), %ebx
	movl	%ebx, 52(%esp)          # 4-byte Spill
	movl	68(%esp), %ebx          # 4-byte Reload
	adcl	140(%esp), %ebx
	movl	%ebx, 68(%esp)          # 4-byte Spill
	adcl	$0, %edi
	movl	1580(%esp), %ebx
	subl	(%ebx), %eax
	sbbl	4(%ebx), %ecx
	sbbl	8(%ebx), %ebp
	sbbl	12(%ebx), %esi
	movl	%esi, 4(%esp)           # 4-byte Spill
	sbbl	16(%ebx), %edx
	movl	%edx, 8(%esp)           # 4-byte Spill
	movl	48(%esp), %edx          # 4-byte Reload
	sbbl	20(%ebx), %edx
	movl	%edx, 12(%esp)          # 4-byte Spill
	movl	40(%esp), %edx          # 4-byte Reload
	sbbl	24(%ebx), %edx
	movl	%edx, 16(%esp)          # 4-byte Spill
	movl	32(%esp), %edx          # 4-byte Reload
	sbbl	28(%ebx), %edx
	movl	36(%esp), %esi          # 4-byte Reload
	sbbl	32(%ebx), %esi
	movl	%esi, 20(%esp)          # 4-byte Spill
	movl	44(%esp), %esi          # 4-byte Reload
	sbbl	36(%ebx), %esi
	movl	%esi, 24(%esp)          # 4-byte Spill
	movl	56(%esp), %esi          # 4-byte Reload
	sbbl	40(%ebx), %esi
	movl	%esi, 28(%esp)          # 4-byte Spill
	movl	52(%esp), %esi          # 4-byte Reload
	sbbl	44(%ebx), %esi
	movl	%esi, 72(%esp)          # 4-byte Spill
	movl	68(%esp), %esi          # 4-byte Reload
	sbbl	48(%ebx), %esi
	movl	%esi, %ebx
	sbbl	$0, %edi
	andl	$1, %edi
	jne	.LBB194_2
# BB#1:
	movl	%edx, 32(%esp)          # 4-byte Spill
.LBB194_2:
	movl	%edi, %edx
	testb	%dl, %dl
	movl	80(%esp), %edx          # 4-byte Reload
	jne	.LBB194_4
# BB#3:
	movl	%eax, %edx
.LBB194_4:
	movl	1568(%esp), %eax
	movl	%edx, (%eax)
	movl	64(%esp), %esi          # 4-byte Reload
	jne	.LBB194_6
# BB#5:
	movl	%ecx, %esi
.LBB194_6:
	movl	%esi, 4(%eax)
	jne	.LBB194_8
# BB#7:
	movl	%ebp, 76(%esp)          # 4-byte Spill
.LBB194_8:
	movl	76(%esp), %ecx          # 4-byte Reload
	movl	%ecx, 8(%eax)
	movl	60(%esp), %ebp          # 4-byte Reload
	jne	.LBB194


::Error>>(())
    /// ```
    pub fn new() -> Result<Self, Box<dyn Error>> {
        Ok(Segmenter {
            list_item_replacer: ListItemReplacer::new()?,
            abbreviation_replacer: AbbreviationReplacer::new()?,

            number_rules: [
                // PeriodBeforeNumberRule
                // Example: https://rubular.com/r/oNyxBOqbyy
                Rule::new(r"\.(?=\d)", "∯")?,
                // NumberAfterPeriodBeforeLetterRule
                // Example: https://rubular.com/r/EMk5MpiUzt
                Rule::new(r"(?<=\d)\.(?=\S)", "∯")?,
                // NewLineNumberPeriodSpaceLetterRule
                // Example: https://rubular.com/r/rf4l1HjtjG
                Rule::new(r"(?<=\r\d)\.(?=(\s\S)|\))", "∯")?,
                // StartLineNumberPeriodRule
                // Example: https://rubular.com/r/HPa4sdc6b9
                Rule::new(r"(?<=^\d)\.(?=(\s\S)|\))", "∯")?,
                // StartLineTwoDigitNumberPeriodRule
                // Example: https://rubular.com/r/NuvWnKleFl
                Rule::new(r"(?<=^\d\d)\.(?=(\s\S)|\))", "∯")?,
            ],

            // Example: https://rubular.com/r/mQ8Es9bxtk
            continuous_punctuation_regex: re(r"(?<=\S)(!|\?){3,}(?=(\s|\Z|$))")?,

            // Example: https://rubular.com/r/UkumQaILKbkeyc
            numbered_reference: Rule::new(
                r"(?<=[^\d\s])(\.|∯)((\[(\d{1,3},?\s?-?\s?)*\b\d{1,3}\])+|((\d{1,3}\s?)?\d{1,3}))(\s)(?=[A-Z])",
                r"∯\2\r\7",
            )?,

            // English.Abbreviation.WithMultiplePeriodsAndEmailRule,
            //
            // NOTE: pySBD와 루비 구현체가 다른 정규표현식을 쓴다. pySBD의 동작을 따라간다.
            //
            // Example: https://rubular.com/r/EUbZCNfgei
            abbreviation_with_multiple_periods_and_email_regex: regex::Regex::new(
                r"([a-zA-Z0-9_])(?:\.)([a-zA-Z0-9_])",
            )?,

            misc_rules: [
                // English.GeoLocationRule,
                Rule::new(r"(?<=[a-zA-z]°)\.(?=\s*\d+)", "∯")?,
                // English.FileFormatRule,
                Rule::new(
                    r"(?<=\s)\.(?=(jpe?g|png|gif|tiff?|pdf|ps|docx?|xlsx?|svg|bmp|tga|exif|odt|html?|txt|rtf|bat|sxw|xml|zip|exe|msi|blend|wmv|mp[34]|pptx?|flac|rb|cpp|cs|js)\s)",
                    "∯",
                )?,
            ],

            // Example: https://rubular.com/r/6flGnUMEVl


urn slots;
        }

        public static IEnumerable<T> GetInputSlots<T>(this AbstractMaterialNode node, MaterialSlot startingSlot) where T : MaterialSlot
        {
            var slots = new List<T>();
            node.GetInputSlots(startingSlot, slots);
            return slots;
        }

        public static IEnumerable<T> GetOutputSlots<T>(this AbstractMaterialNode node) where T : MaterialSlot
        {
            var slots = new List<T>();
            node.GetOutputSlots(slots);
            return slots;
        }

        public static IEnumerable<T> GetOutputSlots<T>(this AbstractMaterialNode node, MaterialSlot startingSlot) where T : MaterialSlot
        {
            var slots = new List<T>();
            node.GetOutputSlots(startingSlot, slots);
            return slots;
        }
    }
}