"""
@Time    : 2018/7/18 20:10
@Author  : 郭家兴
@Email   : 302802003@qq.com
@File    : error.py
@Desc    :
"""
from flask import request, json
from werkzeug.exceptions import HTTPException

class APIException(HTTPException):
    code = 500
    msg = 'sorry,We make a mistake'
    error_code = 999

    def __init__(self,msg=None,code=None,error_code=None,headers=None):
        if code:
            self.code = code
        if error_code:
            self.error_code = error_code
        if msg:
            self.msg = msg
        super(APIException,self).__init__(msg,None)

    def get_body(self, environ=None):
        body = dict(
            msg = self.msg,
            error_code = self.error_code,
            request = request.method + ' ' + self.get_url_no_param()
        )
        text = json.dumps(body)
        return text

    def get_headers(self, environ=None):
        return [('Content-Type','application/json')]

    @staticmethod
    def get_url_no_param():
        full_path = str(request.full_path)
        main_path = full_path.split('?')
        return main_path[0]


for (var element in config) {
            list?.add(Favorite.fromJson(element));
          }
        } catch (e, t) {
          logger.e('收藏列表解析失败', error: e, stackTrace: t);
        }
      }
    }
    return list!;
  }

  /// 添加收藏
  static Future<void> addFavorite(HttpRequest request) async {
    var favorites = await FavoriteStorage.favorites;
    if (favorites.any((element) => element.request == request)) {
      return;
    }

    favorites.addFirst(Favorite(request));
    flushConfig();
    //通知
    addNotifier?.call();
  }

  static Future<void> removeFavorite(Favorite favorite) async {
    var list = await favorites;
    list.remove(favorite);
    flushConfig();
  }

  //刷新配置
  static void flushConfig() async {
    var list = await favorites;
    Paths.getPath("favorites.json").then((file) => file.writeAsString(toJson(list)));
  }

  static String toJson(Queue<Favorite> list) {
    return jsonEncode(list.map((e) => e.toJson()).toList());
  }
}

class Favorite {
  String? name;
  final HttpRequest request;
  HttpResponse? response;

  Favorite(this.request, {this.name, this.response}) {
    response ??= request.response;
    request.response = response;
    response?.request = request;
  }

  factory Favorite.fromJson(Map<String, dynamic> json) {
    return Favorite(HttpRequest.fromJson(json['request']),
        name: json['name'], response: json['response'] == null ? null : HttpResponse.fromJson(json['response']));
  }

  Map<String, dynamic> toJson() {
    return {
      'name': name,
      'request': request.toJson(),
      'response': response?.toJson(),
    };
  }
}
/*
 * Copyright 2023 Hongen Wang
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
abstract class ListenerListEvent<T> {
  /// 监听的源
  sourceAware(List<T> source) {}

  void onAdd(T item);

  void onRemove(T item);

  void onUpdate(T item) {}

  void onBatchRemove(List<T> items);

  clear();
}

class OnchangeListEvent<T> extends ListenerListEvent<T> {
  final Function onChange;

  OnchangeListEvent(this.onChange);

  @override
  void onAdd(T item) => onChange.call();

  @override
  void onRemove(T item) => onChange.call();

  @override
  void onUpdate(T item) => onChange.call();

  @override
  void onBatchRemove(List<T> items) => onChange.call();

  @override
  clear() => onChange.call();
}

/// 可监听list
/// @author wanghongen
/// 2024/01/30
class ListenableList<T> extends Iterable<T> {
  List<T> source = [];
  final List<ListenerListEvent<T>> _listeners = [];

  ListenableList([List<T>? source]) {
    if (source != null) this.source = source;
  }

  addListener(ListenerListEvent<T>


import os
import argparse
import random
import tqdm

if __name__ == "__main__":
    parser = argparse.ArgumentParser()
    parser.add_argument("--flan_v2_data_dir", type=str, default="../open-instruct/data/raw_train/flan_v2")
    parser.add_argument("--total_num_samples", type=int, default=50000)
    parser.add_argument("--output_path", type=str, default="data/raw_train/flan_v2/flan_v2_50k.jsonl")
    parser.add_argument("--seed", type=int, default=42)
    args = parser.parse_args()
    random.seed(args.seed)

    # The following portions are based on the flan_v2 code: https://github.com/google-research/FLAN/blob/main/flan/v2/run_example.py
    # This is used to build tulu mixture v1.
    portions = {
        "flan_zsopt": 0.1,
        "flan_fsopt": 0.1,
        "flan_zsnoopt": 0.1,
        "flan_fsnoopt": 0.1,
        "t0_zsopt": 0.08,
        "t0_fsopt": 0.08,
        "t0_zsnoopt": 0.08,
        "t0_fsnoopt": 0.08,
        "niv2_zsopt": 0.1,
        "niv2_fsopt": 0.1,
        "cot_zsopt": 0.025,
        "cot_fsopt": 0.025,
        "dialog_zsopt": 0.015,
        "dialog_fsopt": 0.015,
    }

    # For tulu mixture v2, for only keep the few shot ones since those zero-shot outputs might not be optimal in terms of styles.
    # We also remove dialog since it might be too easy for LLMs.
    portions = {
        "flan_zsopt": 0,
        "flan_fsopt": 0.2,
        "flan_zsnoopt": 0,
        "flan_fsnoopt": 0.2,
        "t0_zsopt": 0,
        "t0_fsopt": 0.16,
        "t0_zsnoopt": 0,
        "t0_fsnoopt": 0.16,
        "niv2_zsopt": 0,
        "niv2_fsopt": 0.23,
        "cot_zsopt": 0,
        "cot_fsopt": 0.05,
        "dialog_zsopt": 0,
        "dialog_fsopt": 0,
    }

    assert sum(portions.values()) == 1.0

    num_samples = {k: int(v * args.total_num_samples) for k, v in portions.items()}

    with open(args.output_path, "w") as fout:
        for task_name, num_sample in num_samples.items():
            if num_sample == 0:
                continue
            print(f"Sampling {num_sample} samples from {task_name}")
            task_data_path = os.path.join(args.flan_v2_data_dir, task_name, f"{task_name}.jsonl")
            # randomly sample num_sample lines from task_data_path, the data might be very large so we can't load it all into memory
            # we need to first count the total number of lines in the file and then only load the lines we need
            num_lines = 0
            with open(task_data_path, "r") as fin:
                for line in tqdm.tqdm(fin, desc=f"Counting lines in {task_data_path}"):
                    num_lines += 1
            print(f"Sampling {num_sample} lines from {num_lines} lines")
            sampled_lines = random.sample(range(num_lines), num_sample)
            sampled_lines = set(sampled_lines)
            with open(task_data_path, "r") as fin:
                for i, line in tqdm.tqdm(enumerate(fin), desc=f"Reading the file to save the sampled lines"):
                    if i in sampled_lines:
                        fout.write(line)


MultipartUpload(testInfo: TestInfo) {
    val bucketName = givenBucket(testInfo)
    val objectMetadata = mapOf("key" to "value")
    val createMultipartUploadResponseCompletableFuture =
      autoS3CrtAsyncClient
        .createMultipartUpload {
          it.bucket(bucketName)
          it.key(UPLOAD_FILE_NAME)
          it.metadata(objectMetadata)
        }
    val initiateMultipartUploadResult = createMultipartUploadResponseCompletableFuture.join()
    val uploadId = initiateMultipartUploadResult.uploadId()
    // upload part 1, >5MB
    val randomBytes = randomBytes()
    val partETag = uploadPart(bucketName, UPLOAD_FILE_NAME, uploadId, 1, randomBytes)
    // upload part 2, <5MB
    val uploadPartResponse =
      autoS3CrtAsyncClient
        .uploadPart(
          {
            it.bucket(initiateMultipartUploadResult.bucket())
            it.key(initiateMultipartUploadResult.key())
            it.uploadId(uploadId)
            it.partNumber(2)
            it.contentLength(UPLOAD_FILE_LENGTH)
            // it.lastPart(true)
          },
          AsyncRequestBody.fromFile(UPLOAD_FILE),
        ).join()

    val completeMultipartUploadResponse =
      autoS3CrtAsyncClient
        .completeMultipartUpload {
          it.bucket(initiateMultipartUploadResult.bucket())
          it.key(initiateMultipartUploadResult.key())
          it.uploadId(initiateMultipartUploadResult.uploadId())
          it.multipartUpload {
            it.parts(
              {
                it.eTag(partETag)
                it.partNumber(1)
              },
              {
                it.eTag(uploadPartResponse.eTag())
                it.partNumber(2)
              },
            )
          }
        }.join()

    // Verify only 1st and 3rd counts
    val getObjectResponse =
      autoS3CrtAsyncClient
        .getObject({
          it.bucket(bucketName)
          it.key(UPLOAD_FILE_NAME)
        }, AsyncResponseTransformer.toBytes())
        .join()

    val uploadFileBytes = readStreamIntoByteArray(UPLOAD_FILE.inputStream())
    (DigestUtils.md5(randomBytes) + DigestUtils.md5(uploadFileBytes)).also {
      // verify special etag
      assertThat(completeMultipartUploadResponse.eTag()).isEqualTo("\"${DigestUtils.md5Hex(it)}-2\"")
    }

    // verify content size
    assertThat(getObjectResponse.response().contentLength())
      .isEqualTo(randomBytes.size.toLong() + uploadFileBytes.size.toLong())

    // verify contents
    assertThat(readStreamIntoByteArray(getObjectResponse.asInputStream()))
      .isEqualTo(concatByteArrays(randomBytes, uploadFileBytes))

    assertThat(completeMultipartUploadResponse.location())
      .matches("http.*/$bucketName/${UriUtils.encode(UPLOAD_FILE_NAME, StandardCharsets.UTF_8)}")
  }

  private fun uploadPart(
    bucketName: String,
    key: String,
    uploadId: String,
    partNumber: Int,
    randomBytes: ByteArray,
  ): String =
    autoS3CrtAsyncClient
      .uploadPart(
        {
          it.bucket(bucketName)
          it.key(key)
          it.uploadId(uploadId)
          it.partNumber(partNumber)
          it.contentLength(randomBytes.size.toLong())
        },
        AsyncRequestBody.fromBytes(randomBytes),
      ).join()
      .eTag()

  @Test
  @S3VerifiedSuccess(year = 2025)
  fun testStreamUploadOfUnknownSize(testInfo: TestInfo) {
    val bucketName = givenBucket(testInfo)

    val body = AsyncRequestBody.forBlockingInputStream(null)
    val putObjectResponseFuture =
      autoS3CrtAsyncClient.pu


safe void Dispose()
    {
        _resources.Api.DestroySemaphore(_resources.Device, Handle, null);
    }

    public unsafe IntPtr ExportSharedEvent()
    {
        if (!_resources.Api.TryGetDeviceExtension<ExtMetalObjects>(_resources.Instance, _resources.Device, out var ext))
            throw new InvalidOperationException();
        var eventExport = new ExportMetalSharedEventInfoEXT()
        {
            SType = StructureType.ExportMetalSharedEventInfoExt,
            Semaphore = Handle,
        };
        var export = new ExportMetalObjectsInfoEXT()
        {
            SType = StructureType.ExportMetalObjectsInfoExt,
            PNext = &eventExport
        };
        ext.ExportMetalObjects(_resources.Device, ref export);
        if (eventExport.MtlSharedEvent == IntPtr.Zero)
            throw new Exception("Unable to export IOSurfaceRef");
        return eventExport.MtlSharedEvent;
    }
    public IPlatformHandle Export()
    {
        if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
            return new PlatformHandle(ExportSharedEvent(),
                KnownPlatformGraphicsExternalSemaphoreHandleTypes.MetalSharedEvent);
        throw new PlatformNotSupportedException();
    }
}


1, 0x40
/* 80165500 00161160  48 06 1C 75 */	bl _restgpr_27
/* 80165504 00161164  80 01 00 44 */	lwz r0, 0x44(r1)
/* 80165508 00161168  7C 08 03 A6 */	mtlr r0
/* 8016550C 0016116C  38 21 00 40 */	addi r1, r1, 0x40
/* 80165510 00161170  4E 80 00 20 */	blr

.global func_80165514
func_80165514:
/* 80165514 00161174  38 A0 00 01 */	li r5, 1
/* 80165518 00161178


;
; Ullrich von Bassewitz, 2004-07-17
;
; size_t __fastcall__ _heapblocksize (const void* ptr);
;
; Return the size of an allocated block.
;

        .importzp       ptr1, ptr2
        .export         ___heapblocksize

        .include        "_heap.inc"

        .macpack        generic
        .macpack        cpu

;-----------------------------------------------------------------------------
; Code

___heapblocksize:

; Below the user data is a pointer that points to the start of the real
; (raw) memory block. The first word of this block is the size. To access
; the raw block pointer, we will decrement the high byte of the pointer,
; the pointer is then at offset 254/255.

        sta     ptr1
        dex
        stx     ptr1+1
        ldy     #$FE
        lda     (ptr1),y
        sta     ptr2            ; Place the raw block pointer into ptr2
        iny
        lda     (ptr1),y


3Gib9ut7IFDxrkbTbs7LFAJYhe0w0LXEtYrH7HyODglOFY3oXQ+kCfoFcvqvZnAD6K5UavO2c=")
	assert.Equal(t, host1.Shapes().Instance("shape2").Id(), "12D3KooWG2eK9dVPazdxSF6eDS1ESgD5N3n2xfsGDKaZuifuE57t")

	host2 := p.Hosts().Host("host2")
	assertDeepEqualSortedStrings(t, host2.Addresses().List(), []string{"8.2.3.4/24", "4.3.2.8/24"})
	assert.Equal(t, host2.SSH().Address(), "8.2.3.4")
	assert.Equal(t, host2.SSH().Port(), uint16(4242))
	assert.DeepEqual(t, host2.SSH().Auth().List(), []string{"main"})

	lat, lng = host2.Location()
	assert.Equal(t, lat, float32(1.25))
	assert.Equal(t, lng, float32(25.1))

	assert.Equal(t, host2.Shapes().Instance("shape1").Key(), "CAESQDpF3eQuEbGsjSRkf3uE6E4SV3dvwSSMUcNJkimOUc0hO6gPoZjsq/NO/FwVz8FoZ4LG/5DSF2B/Rl+vJCNLlUI=")
	assert.Equal(t, host2.Shapes().Instance("shape1").Id(), "12D3KooWDqErfJk5kUTfpAcYSPwr4nztSHkDqVZjC1wpkJ9EDsDK")

	assert.Equal(t, host2.Shapes().Instance("shape2").Key(), "CAESQIA03gtBTeL8eYNQKcJ+VqKLgarHfofd5I/CV/zEsxHiqfihV9ZXjl0qtaTPEWExBgqRn+w2YLD6FQy8zBdEabI=")
	assert.Equal(t, host2.Shapes().Instance("shape2").Id(), "12D3KooWMFrxcHhw2gvnp8iBVTcqZ3f1B4m5W1vpGoi6q5jxv1Ms")
}

func TestParserDelAppendClear(t *testing.T) {
	p, err := New(afero.NewBasePathFs(afero.NewOsFs(), "fixtures"), "/config")
	assert.NilError(t, err)

	assertDeepEqualSortedStrings(t, p.Auth().List(), []string{"main", "withkey"})
	assert.NilError(t, p.Auth().Delete("main"))
	assert.DeepEqual(t, p.Auth().List(), []string{"withkey"})

	assert.NilError(t, p.Hosts().Host("host1").Shapes().Delete("shape1"))
	assert.DeepEqual(t, p.Hosts().Host("host1").Shapes().List(), []string{"shape2"})
	assert.Equal(t, p.Hosts().Host("host1").Shapes().Instance("shape1").Id(), "")

	assert.NilError(t, p.Hosts().Delete("host1"))
	assert.DeepEqual(t, p.Hosts().List(), []string{"host2"})

	assert.NilError(t, p.Hosts().Host("host2").Addresses().Delete("8.2.3.4/24"))
	assert.DeepEqual(t, p.Hosts().Host("host2").Addresses().List(), []string{"4.3.2.8/24"})

	assert.NilError(t, p.Hosts().Host("host2").Addresses().Append("8.2.3.4/24"))
	assert.DeepEqual(t, p.Hosts().Host("host2").Addresses().List(), []string{"4.3.2.8/24", "8.2.3.4/24"})
	assert.NilError(t, p.Hosts().Host("host2").Addresses().Clear())
	assert.DeepEqual(t, p.Hosts().Host("host2").Addresses().List(), []string{})

	assert.Nil


-- This software is copyright Kong Inc. and its licensors.
-- Use of the software is subject to the agreement between your organization
-- and Kong Inc. If there is no such agreement, use is governed by and
-- subject to the terms of the Kong Master Software License Agreement found
-- at https://konghq.com/enterprisesoftwarelicense/.
-- [ END OF LICENSE 0867164ffc95e54f04670b5169c09574bdbd9bba ]

local BasePlugin = require "kong.plugins.base_plugin"
local LoggerHandler = require "spec.fixtures.custom_plugins.kong.plugins.logger.handler"

local LoggerLastHandler = BasePlugin:extend()

LoggerLas


/****************************************************************************
 * boards/arm/rp2040/common/src/rp2040_lcd_backpack.c
 *
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.  The
 * ASF licenses this file to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance with the
 * License.  You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
 * License for the specific language governing permissions and limitations
 * under the License.
 *
 ****************************************************************************/

/****************************************************************************
 * Included Files
 ****************************************************************************/

#include <nuttx/config.h>

#include <errno.h>
#include <debug.h>
#include <syslog.h>
#include <stdio.h>

#include <nuttx/board.h>
#include <nuttx/lcd/lcd.h>
#include <nuttx/lcd/pcf8574_lcd_backpack.h>
#include <nuttx/i2c/i2c_master.h>

#include "rp2040_i2c.h"

/****************************************************************************
 * Pre-processor Definitions
 ****************************************************************************/

/****************************************************************************
 * Public Functions
 ****************************************************************************/

/****************************************************************************
 * Name: board_lcd_backpack_init
 *
 * Description:
 *   Initialize the LCD1602 display controlled by Backpack with PCF8574
 *
 * Input Parameters:
 *   devpath - The full path to the driver to register. E.g., "/dev/slcd0"
 *
 * Returned Value:
 *   Zero (OK) on success; a negated errno value on failure.
 *
 ****************************************************************************/

int board_lcd_backpack_init(int devno, int busno, int rows, int cols)
{
  struct pcf8574_lcd_backpack_config_s cfg =
             LCD_I2C_BACKPACK_CFG_ROBOT;
  struct i2c_master_s *i2c;
  char devpath[12];
  int ret;

  /* Setup the LCD row and cols size.
   * Note: We are using the LCD_I2C_BACKPACK_CFG_SAINSMART config that
   *       defined the I2C Address to 0x27 to PCF8574. Double check if all
   *       the bits (pins) from PCF8574 connected to the LCD controller
   *       are correct with this LCD CFG definition.
   */

  cfg.rows = rows;
  cfg.cols = cols;

  /* Initialize the I2C0 */

  i2c = rp2040_i2cbus_initialize(busno);
  if (i2c == NULL)
    {
      return -ENODEV;
    }

  /* Register the Segment LCD */

  snprintf(devpath, sizeof(devpath), "/dev/slcd%d", devno);
  ret = pcf8574_lcd_backpack_register(devpath, i2c, &cfg);
  if (ret < 0)
    {
      lcderr("ERROR: pcf8574_lcd_backpack_register(%s) failed: %d\n",
             devpath, ret);
      return ret;
    }

  return OK;
}


// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.

using System;
using System.Collections.Generic;
using osu.Framework.Allocation;
using osu.Framework.Extensions.LocalisationExtensions;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes;
using osu.Game.Graphics;
using osu.Game.Graphics.Sprites;
using osu.Game.Online.API.Requests.Responses;

namespace osu.Game.Overlays.Changelog
{
    public partial class ChangelogListing : ChangelogContent
    {
        private readonly List<APIChangelogBuild>? entries;

        public ChangelogListing(List<APIChangelogBuild>? entries)
        {
            this.entries = entries;
        }

        [BackgroundDependencyLoader]
        private void load(OverlayColourProvider colourProvider)
        {
            var currentDate = DateTime.MinValue;

            if (entries == null) return;

            foreach (var build in entries)
            {
                if (build.CreatedAt.Date != currentDate)
                {
                    if (Children.Count != 0)
                    {
                        Add(new Box
                        {
                            RelativeSizeAxes = Axes.X,
                            Height = 2,
                            Colour


owing settings groups:
 *
 *  * Proxy
 *
 *
 * @author Tobias Wich
 */
class ConnectionsSettingsPanel : SettingsPanel() {
	private val proxy: SettingsGroup

	init {
		proxy = ConnectionSettingsGroup()
		addSettingsGroup(proxy)
	}

	companion object {
		private const val serialVersionUID: Long = 1L
	}
}
/****************************************************************************
 * Copyright (C) 2014 ecsec GmbH.
 * All rights reserved.
 * Contact: ecsec GmbH (info@ecsec.de)
 *
 * This file is part of the Open eCard App.
 *
 * GNU General Public License Usage
 * This file may be used under the terms of the GNU General Public
 * License version 3.0 as published by the Free Software Foundation
 * and appearing in the file LICENSE.GPL included in the packaging of
 * this file. Please review the following information to ensure the
 * GNU General Public License version 3.0 requirements will be met:
 * http://www.gnu.org/copyleft/gpl.html.
 *
 * Other Usage
 * Alternatively, this file may be used in accordance with the terms
 * and conditions contained in a signed written agreement between
 * you and ecsec GmbH.
 *
 ***************************************************************************/

package org.openecard.richclient.gui.manage.core

import ch.qos.logback.core.joran.spi.JoranException
import io.github.oshai.kotlinlogging.KotlinLogging
import org.openecard.common.util.FileUtils.resolveResourceAsStream
import org.openecard.i18n.I18N
import org.openecard.richclient.AddonPropertiesException
import org.openecard.richclient.LogbackConfig
import org.openecard.richclient.gui.manage.SettingsFactory
import org.openecard.richclient.gui.manage.SettingsGroup
import org.openecard.utils.serialization.XmlUtils
import org.openecard.utils.serialization.XmlUtils.Companion.doc2str
import org.openecard.utils.serialization.XmlUtils.Companion.str2doc
import org.w3c.dom.DOMException
import org.w3c.dom.Document
import org.w3c.dom.Element
import org.xml.sax.SAXException
import java.awt.Desktop
import java.io.File
import java.io.FileInputStream
import java.io.FileOutputStream
import java.io.FileWriter
import java.io.IOException
import java.io.InputStream
import java.net.URI
import java.net.URISyntaxException
import java.util.Properties
import javax.swing.JComboBox
import javax.swing.event.HyperlinkEvent
import javax.xml.transform.TransformerException
import javax.xml.xpath.XPath
import javax.xml.xpath.XPathConstants
import javax.xml.xpath.XPathExpression
import javax.xml.xpath.XPathExpressionException
import javax.xml.xpath.XPathFactory

private val LOG = KotlinLogging.logger { }

/**
 * Custom settings group for logging settings.
 * The settings are made dynamic to reflect the choice made by the user.
 *
 * @author Tobias Wich
 */
class LogSettingsGroup(
	private val xmlUtils: XmlUtils = XmlUtils(),
) : SettingsGroup(
		I18N.strings.addon_core_logging_group_name.localized(),
		SettingsFactory.getInstance(
			loadProperties(xmlUtils),
		),
	) {
	init {
		addSelectionItem(
			I18N.strings.addon_core_logging_root.localized(),
			I18N.strings.addon_core_logging_root_desc.localized(),
			ROOT_KEY,
			"ERROR",
			"WARN",
			"INFO",
			"DEBUG",
		)
		addLogLevelBox(
			I18N.strings.addon_core_logging_paos.localized(),
			I18N.strings.addon_core_logging_paos_desc.localized(),
			PAOS_KEY,
		)
		addLogLevelBox(
			I18N.strings.addon_core_logging_eac.localized(),
			I18N.strings.addon_core_logging_eac_desc.localized(),
			EAC_KEY,
		)
		addLogLevelBox(
			I18N.strings.addon_core_logging_


TEM le tube existe bien mais impossible pour le client d'ouvrir la pipeline car des mécanismes de sécurité existent pour que tout le monde n'accéde pas à ce tube (comme pour des fichiers). Il faut donc à la création du tube indiquer des droits spécifiques permettant à tout le monde d'y accéder.

    Cette opération se fait lors de la création du pipe en passant comme dernier argument une structure SECURITY_ATTRIBUTES que l'on aura initialisé via InitializeSecurityDescriptor puis correctement rempli avec SetSecurityDescriptorDacl. L'opération dans notre cas est assez simple : il convient de passer NULL comme 3ème paramêtre (pDacl) pour indiquer que tout le monde a les accès.

Pour reprendre sur les communications entre le client et le serveur, le protocole choisi sera le suivant :

    Lorsqu'un client se connecte au serveur (ouverture du tube), ce dernier envoi le message d'accueil I'm here to serve you master. au client. Cela permet au client de vérifier que la connexion a bien été établie. Evidemment on peut placer un message plus discret pour éviter aux curieux d'analyser la situation dans les détails :p

C'est ensuite le client qui spécifie ce qu'il souhaite. La commande CWD empruntée au FTP permet d'afficher le répertoire courant du processus serveur. Suvi d'un argument elle permet de lui faire changer de répertoire courant. La commande CMD sera la plus pratique, facile et sans doute la plus fiable à utiliser : elle ouvrera un shell (cmd.exe) dans l'environement de l'utilisateur et ce avec les droits SYSTEM.

Enfin la commande RUN permettra comme son nom l'indique de lancer un exécutable avec les droits SYSTEM. Il faudra forcément passer comme argument le chemin de l'exécutable voulu. Il est préférable d'avoir CWD dans son dossier auparavant. On pourra transférer des paramêtres à ce programme en rajoutant à la fin de la commande RUN les options séparées par le caractère '|' (ex: RUN ping.exe|8.8.8.8 pour pinger le serveur DNS de Google).

Seulement si on lance depuis le client un CMD ou un RUN quelquechose, la fenêtre du programme n'apparait pas alors que l'on voit bien le processus demandé exécuté en tant que SYSTEM dans le gestionnaire des taches... C'est parce que Windows inclus des mécanismes de sécurité de la session graphique qui sont apparu aux fur et à mesure des versions, par exemple pour se prrotéger des shatter attacks. On pourrait comparer ce système basé sur des jetons (tokens) et sessions au système xauth de Linux et ses magic-cookies mais sur ce niveau Windows est beaucoup plus avancé.

Comment alors faire en sorte que notre exécutable tournant en SYSTEM ait accès à la session en cours et puisse générer des processus avec ses privilèges dans cette même session ?

    C'est sans doute sur le site CodeProjet que l'on trouve la plus intéressante bibliothèque de documents traitant de ces mécanismes de sécurité, et en particulier (pour notre cas), le document <a href="http://www


ponent.displayName ||
      Component.name ||
      (Component.constructor ? Component.constructor.name : undefined) ||
      "";
  }

  public updateRoute(route: SharedElementRoute) {
    if (route.key !== this.route.key) {
      throw new Error(
        "SharedElementNavigation: Integrity error, route key should never change"
      );
    }
    // @ts-ignore
    this.route = route;
  }

  setAnimimationContextValue(value: any) {
    this.animationContextValue = value;
  }

  getAnimValue(closing: boolean): SharedElementAnimatedValue | undefined {
    const { animationContextValue } = this;
    if (!animationContextValue) return;
    const { progress } = animationContextValue.current;
    return closing ? progress.interpolate(INVERT_OPTIONS) : progress;
  }

  getAncestor(): SharedElementNode | undefined {
    return this.ancestorNode;
  }

  setAncestor(ancestorNode: SharedElementNode | null) {
    // console.log('SharedElementSceneData.setAncestor');
    if (this.ancestorNode === ancestorNode) return;
    this.ancestorNode = ancestorNode || undefined;
    this.emitUpdateEvent("ancestor", this.ancestorNode, "");
  }

  addNode(id: string, node: SharedElementNode): void {
    // console.log('SharedElementSceneData.addNode: ', id);
    this.nodes[id] = node;
    this.emitUpdateEvent("add", node, id);
  }

  removeNode(id: string, node: SharedElementNode): void {
    // console.log('SharedElementSceneData.removeNode: ', id);
    delete this.nodes[id];
    this.emitUpdateEvent("remove", node, id);
  }

  getNode(id: string): SharedElementNode | undefined {
    return this.nodes[id];
  }

  addUpdateListener(
    handler: SharedElementSceneUpdateHandler
  ): SharedElementEventSubscription {
    this.updateSubscribers.add(handler);
    return () => this.updateSubscribers.delete(handler);
  }

  private emitUpdateEvent(
    eventType: SharedElementSceneUpdateHandlerEventType,
    node: SharedElementNode | undefined,
    id: string
  ): void {
    this.updateSubscribers.forEach((handler) => handler(eventType, node, id));
  }
}
import IPregnancyEvent from '../../Body/Pregnancy/IPregnancyEvent';
import DisplayText from '../../display/DisplayText';
import Player from '../Player';

export default class PregSatyr implements IPregnancyEvent {
    public incubationDisplay(player: Player, incubationTime: number) {
        // Stage 1:
        if (incubationTime === 150) {
            DisplayText("\nYou find that you're feeling quite sluggish these days; you just don't have as much energy as you used to.  You're also putting on weight.\n").bold();
        }
        // Stage 2:
        if (incubationTime === 125) {
            DisplayText("\nYour belly is getting bigger and bigger.  Maybe your recent urges are to blame for this development?\n").bold();
        }
        // Stage 3:
        if (incubationTime === 100) {
            DisplayText("\nYou can feel the strangest fluttering sensations in your distended belly; it must be a pregnancy.  You should eat more and drink plenty of wine so your baby can grow properly.  Wait, wine...?\n").bold();
        }
        // Stage 4:
        if (incubationTime === 75) {
            DisplayText("\nSometimes you feel a bump in your pregnant belly.  You wonder if it's your baby complaining about your moving about.\n").bold();
        }
        // Stage 5:
        if (incubationTime === 50) {
            DisplayText("\nWith your bloating gut, you are loathe to exert yourself in any meaningful manner; you feel horny and hungry all the time...\n").bold();
            // temp min lust up +5
        }
        // Stage


/**
 * `map` can be used to turn functions `(a: A) => B` into functions `(fa: F<A>) => F<B>` whose argument and return types
 * use the type constructor `F` to represent some computational context.
 *
 * @category Functor
 * @since 2.0.0
 */
export const map: <A, B>(f: (a: A) => B) => <R, E>(fa: ReaderEither<R, E, A>) => ReaderEither<R, E, B> = (f) =>
  R.map(E.map(f))

/**
 * Map a pair of functions over the two last type arguments of the bifunctor.
 *
 * @category Bifunctor
 * @since 2.0.0
 */
export const bimap: <E, G, A, B>(
  f: (e: E) => G,
  g: (a: A) => B
) => <R>(fa: ReaderEither<R, E, A>) => ReaderEither<R, G, B> =
  /*#__PURE__*/
  flow(E.bimap, R.map)

/**
 * Map a function over the second type argument of a bifunctor.
 *
 * @category Bifunctor
 * @since 2.0.0
 */
export const mapLeft: <E, G>(f: (e: E) => G) => <R, A>(fa: ReaderEither<R, E, A>) => ReaderEither<R, G, A> = (f) =>
  R.map(E.mapLeft(f))

/**
 * Less strict version of [`ap`](#ap).
 *
 * @category Apply
 * @since 2.8.0
 */
export const apW = <Q, D, A>(
  fa: ReaderEither<Q, D, A>
): (<R, E, B>(fab: ReaderEither<R, E, (a: A) => B>) => ReaderEither<Q & R, D | E, B>) =>
  flow(
    R.map((gab) => (ga: E.Either<D, A>) => E.apW(ga)(gab)),
    R.apW(fa)
  )

/**
 * Apply a function to an argument under a type constructor.
 *
 * @category Apply
 * @since 2.0.0
 */
export const ap: <R, E, A>(
  fa: ReaderEither<R, E, A>
) => <B>(fab: ReaderEither<R, E, (a: A) => B>) => ReaderEither<R, E, B> = apW

/**
 * Combine two effectful actions, keeping only the result of the first.
 *
 * Derivable from `Apply`.
 *
 * @category combinators
 * @since 2.0.0
 */
export const apFirst: <R, E, B>(
  fb: ReaderEither<R, E, B>
) => <A>(fa: ReaderEither<R, E, A>) => ReaderEither<R, E, A> = (fb) =>
  flow(
    map((a) => () => a),
    ap(fb)
  )

/**
 * Combine two effectful actions, keeping only the result of the second.
 *
 * Derivable from `Apply`.
 *
 * @category combinators
 * @since 2.0.0
 */
export const apSecond = <R, E, B>(
  fb: ReaderEither<R, E, B>
): (<A>(fa: ReaderEither<R, E, A>) => ReaderEither<R, E, B>) =>
  flow(
    map(() => (b: B) => b),
    ap(fb)
  )

/**
 * Wrap a value into the type constructor.
 *
 * Equivalent to [`right`](#right).
 *
 * @category Applicative
 * @since 2.8.5
 */
export const of: Applicative3<URI>['of'] = right

/**
 * Less strict version of [`chain`](#chain).
 *
 * @category Monad
 * @since 2.6.0
 */
export const chainW = <R, E, A, B>(f: (a: A) => ReaderEither<R, E, B>) => <Q, D>(
  ma: ReaderEither<Q, D, A>
): ReaderEither<Q & R, D | E, B> => pipe(ma, R.chain(E.fold<D, A, ReaderEither<Q & R, D | E, B>


TE ], // Rebellion Drive
	[ "dmc3.exe+1CD944 - 48 8D 0D 4503BA00 - LEA RCX,[dmc3.exe+D6DC90]" ], //
	[ "dmc3.exe+1CD97B - 48 8D 0D 0E03BA00 - LEA RCX,[dmc3.exe+D6DC90]", CHANNEL_STYLE_WEAPON, HELPER_STYLE_WEAPON_DANTE ], // Rebellion Sword Pierce Hurl Back
	[ "dmc3.exe+1CE059 - 48 8D 0D 30FCB900 - LEA RCX,[dmc3.exe+D6DC90]", CHANNEL_STYLE_WEAPON, HELPER_STYLE_WEAPON_DANTE ], // Rebellion Sword Pierce
	[ "dmc3.exe+1CE0AC - 48 8D 0D DDFBB900 - LEA RCX,[dmc3.exe+D6DC90]", CHANNEL_STYLE_WEAPON, HELPER_STYLE_WEAPON_DANTE ], // Rebellion Sword Pierce
	[ "dmc3.exe+1CE0D8 - 48 8D 0D B1FBB900 - LEA RCX,[dmc3.exe+D6DC90]" ], //
	[ "dmc3.exe+1CE9B8 - 48 8D 0D D1F2B900 - LEA RCX,[dmc3.exe+D6DC90]", CHANNEL_STYLE_WEAPON, HELPER_STYLE_WEAPON_DANTE ], // Spiral Crazy Combo
	[ "dmc3.exe+1CF013 - 48 8D 0D 76ECB900 - LEA RCX,[dmc3.exe+D6DC90]", CHANNEL_STYLE_WEAPON, HELPER_STYLE_WEAPON_DANTE ], // Spiral Shot
	[ "dmc3.exe+1CFDDC - 48 8D 0D ADDEB900 - LEA RCX,[dmc3.exe+D6DC90]", CHANNEL_STYLE_WEAPON, HELPER_STYLE_WEAPON_DANTE ], // Artemis Shot
	[ "dmc3.exe+1CFE53 - 48 8D 0D 36DEB900 - LEA RCX,[dmc3.exe+D6DC90]", CHANNEL_STYLE_WEAPON, HELPER_STYLE_WEAPON_DANTE ], // Artemis Shot
	[ "dmc3.exe+1D0010 - 48 8D 0D 79DCB900 - LEA RCX,[dmc3.exe+D6DC90]", CHANNEL_STYLE_WEAPON, HELPER_STYLE_WEAPON_DANTE ], // Artemis Shot
	[ "dmc3.exe+1D0A1E - 48 8D 0D 6BD2B900 - LEA RCX,[dmc3.exe+D6DC90]", CHANNEL_STYLE_WEAPON, HELPER_STYLE_WEAPON_DANTE ], // Artemis Shot
	[ "dmc3.exe+1D0F34 - 48 8D 0D 55CDB900 - LEA RCX,[dmc3.exe+D6DC90]", CHANNEL_STYLE_WEAPON, HELPER_STYLE_WEAPON_DANTE ], // Kalina Ann Shot
	[ "dmc3.exe+1D195D - 48 8D 0D 2CC3B900 - LEA RCX,[dmc3.exe+D6DC90]", CHANNEL_STYLE_WEAPON, HELPER_STYLE_WEAPON_DANTE ], // Kalina Ann Hysteric
	[ "dmc3.exe+1D255F - 48 8D 0D 2AB7B900 - LEA RCX,[dmc3.exe+D6DC90]", CHANNEL_STYLE_WEAPON, HELPER_STYLE_WEAPON_DANTE ], // Kalina Ann Grapple
	[ "dmc3.exe+1D34C4 - 48 8D 0D C5A7B900 - LEA RCX,[dmc3.exe+D6DC90]" ], //
	[ "dmc3.exe+1D34FA - 48 8D 0


t: string) => (options?: XhrLoaderOptions): FutureInstance<XMLHttpRequest, T> =>
    fletch<T> (endpoint) ({ ...options, responseType });

const _fetchUrlOverride = <T>(responseType: XhrResponseType) => (endpoint: string): FutureInstance<XMLHttpRequest, T> =>
    fletch<T> (endpoint) ({responseType});

//Fetches the specific data. Overrides the responseType, but otherwise all Xhr settings are allowed
export const fetchArrayBuffer = _fetchOverride<ArrayBuffer>("arraybuffer");
export const fetchText = _fetchOverride<string>("text");
export const fetchBlob = _fetchOverride<Blob>("blob");
export const fetchXml = _fetchOverride<Document | XMLDocument>("document");

//Json will use query as default here since it's the typical case here (and can still be overridden)
export const fetchJson = (endpoint: string) => (options?: XhrLoaderOptions) => _fetchOverride<any>("json")(endpoint)({ requestType: "query", ...options });

//wrapper over fletch for cases it's just the url
//Same as fetch* but without any Xhr options (simple url get)
export const fetchArrayBufferUrl= _fetchUrlOverride<ArrayBuffer>("arraybuffer");
export const fetchJsonUrl = _fetchUrlOverride<any>("json");
export const fetchTextUrl = _fetchUrlOverride<string>("text");
export const fetchBlobUrl = _fetchUrlOverride<Blob>("blob");
export const fetchXmlUrl = _fetchUrlOverride<Document | XMLDocument>("document");
import axios, { AxiosRequestConfig } from "axios"
import { useState } from "react"

export const useApi = (endpoint: string, accessToken?: string) => {
  let baseUrl = process.env.REACT_APP_API_URL

  // Staging and Production env checking
  if (baseUrl.includes("{prefix}")) {
    const subdomainPrefix = window.location.hostname.split("-")[0]
    baseUrl = baseUrl.replace("{prefix}", subdomainPrefix)
  }

  const api = axios.create({
    baseURL: baseUrl,
    headers: {
      Authorization: accessToken ? `Bearer ${accessToken}` : undefined,
    },
  })

  const tokenExpired = (e) => {
    if (e.response.status === 401 && window.location.pathname !== "/signin") {
      localStorage.removeItem("token")
      window.location.replace("/signin")
    }
    return null
  }

  const post = (payload?: Record<string, any>, customEndpoint?: string) => {
    return api
      .post(customEndpoint ?? endpoint, payload)
      .then((res) => {
        return res.data
      })
      .catch((e) => tokenExpired(e))
  }

  const put = (payload?: Record<string, any>, customEndpoint?: string) => {
    return api
      .put(customEndpoint ?? endpoint, payload)
      .then((res) => {
        return res.data
      })
      .catch((e) => tokenExpired(e))
  }

  const get = (query?: string, config?: AxiosRequestConfig, customEndpoint?: string) => {
    return api
      .get(customEndpoint ?? endpoint, config)
      .then((res) => {
        return res.data
      })
      .catch((e) => tokenExpired(e))
  }

  return {
    get,
    post,
    put,
  }
}

export const useApiWithAuth = (endpoint?: string) => {
  const accessToken = localStorage.getItem("token")

  return useApi(endpoint || "", accessToken || undefined)
}
import { Injectable, HttpException, HttpStatus, Logger } from '@nestjs/common';
import { InjectRepository } from '@nestjs/typeorm';
import { Repository, QueryFailedError } from 'typeorm';

import { Category } from './entity';
import {CreateCategoryDto, DeleteCategoryD


n";
    height: "100%"
}

#rfaModalCountries {
    max-height: 300px;
    overflow: auto
}

#creditCountries {
    max-height: 300px;
    overflow: auto
}

.success-gif {
    width: 30%
}

.state-dropdown {
    max-height: 300px;
    overflow: auto
}

.cc-state-dropdown {
    max-height: 300px;
    overflow: auto
}

.phone-popover {
    position: absolute;
    right: 20px;
    top: 10px
}

.phone-popover-addr {
    position: absolute;
    right: 20px;
    top: 5px;
    color: #222;
    font-size: 1.2em
}

.no-padding-right {
    padding-right: 0
}

.no-padding-left {
    padding-left: 0
}

.rfa-new-cc-container .dropdown-toggle.btn-default {
    width: 100%
}

.dropdown-menu-height {
    margin-top: -17px
}

.cc-block {
    position: relative;
    margin-left: 5px;
    width: 50px;
    display: flex;
    align-items: center;
    height: 0;
    line-height: 2.2em;
    top: 20px
}

    .cc-block > i {
        font-size: 2.2em;
        z-index: 5
    }

.ccNumber {
    padding-left: 56px
}

#ccTypeIcon {
    transition-timing-function: ease-out;
    transition: .25s
}

.fa-cc-visa {
    color: #0057a0
}

.fa-cc-amex {
    color: #1fa2cf
}

.fa-cc-discover {
    color: #f07622
}

.fa-cc-mastercard {
    color: #063375
}

.fa-credit-card-alt {
    color: #dcdfde
}

.form-group .link,
.form-group > .form-w-link a {
    color: #222
}

.phone-popover-addr:hover,
.phone-popover:hover {
    color: #000
}

.smaller {
    font-size: 80%;
    font-weight: 400
}

.modal-content-rfa {
    box-shadow: none;
    border: none;
    max-height: 95vh;
    overflow: auto;
    max-width: 100vw
}

.has-error > .multiple-inputs-group {
    margin-bottom: 0
}

@media(max-width: 767px) {
    .modalShipFirstName {
        padding: 0
    }

    .modalShipLastName {
        padding: 0
    }
}

.modal-open .modal {
    overflow-x: hidden;
    overflow-y: hidden
}

    .modal-open .modal #ssoGoogleButtonLogin {
        width: 270px;
        height: 40px;
        cursor: wait;
        border-radius: 5px;
        background-color: #eaeaea
    }

.modal.modal-sliding {
    width: 70%
}

    .modal.modal-sliding .modal-body a {
        font-size: 15px
    }

    .modal.modal-sliding .link {
        color: #fff
    }

    .modal.modal-sliding .fa-angle-up,
    .modal.modal-sliding .fa-angle-down {
        font-size: 2em
    }

    .modal.modal-sliding .taxonomy-title {
        width: 90%;
        display: inline-block;
        margin-top: 7px
    }

    .modal.modal-sliding .menu-options {
        padding-bottom: 44px
    }

        .modal.modal-sliding .menu-options h5,
        .modal.modal-sliding .menu-options a {
            color: #333


ستخدام المتصفح',
    'Login using token': 'تسجيل الدخول باستخدام الرمز المميز',
    'Enter ARL': 'أدخل الرمز المميز (arl)',
    'Token (ARL)': 'الرمز المميز (ARL)',
    'Save': 'حفظ',
    "If you don't have account, you can register on deezer.com for free.":
        'إذا لم يكن لديك حساب ، يمكنك التسجيل على deezer.com مجانًا.',
    'Open in browser': 'افتح في المتصفح',
    "By using this app, you don't agree with the Deezer ToS":
        'باستخدام هذا التطبيق ، أنت لا توافق على شروط خدمة ديزر',
    'Play next': 'شغل التالي',
    'Add to queue': 'إضافة إلى قائمة الانتظار',
    'Add track to favorites': 'اضافة الاغنية الى المفضلة',
    'Add to playlist': 'اضافة الى قائمة التشغيل',
    'Select playlist': 'اختيار قائمة التشغيل',
    'Track added to': 'تم اضافة الاغنية الى',
    'Remove from playlist': 'إزالة من قائمة التشغيل',
    'Track removed from': 'تم إزالة الاغنية من',
    'Remove favorite': 'إزالة المفضلة',
    'Track removed from library': 'تم إزالة الاغنية من المكتبة',
    'Go to': 'الذهاب الى',
    'Make offline': 'جعله في وضع عدم الاتصال',
    'Add to library': 'إضافة إلى مكتبة',
    'Remove album': 'إزالة الالبوم',
    'Album removed': 'تم إزالة الالبوم',
    'Remove from favorites': 'تم الإزالة من المفضلة',
    'Artist removed from library': 'تم إزالة الفنان من المكتبة',
    'Add to favorites': 'اضافة الى المفضلة',
    'Remove from library': 'إزالة من المكتبة',
    'Add playlist to library': 'أضف قائمة التشغيل إلى المكتبة',
    'Added playlist to library': 'تم اضافة قائمة التشغيل الى المكتبة',
    'Make playlist offline': 'جعل قائمة التشغيل في وضع عدم الاتصال',
    'Download playlist': 'تنزيل قائمة التشغيل',
    'Create playlist': 'إنشاء قائمة التشغيل',
    'Title': 'عنوان',
    'Description': 'وصف',
    'Private': 'خاص',
    'Collaborative': 'التعاونيه',
    'Create': 'إنشاء',
    'Playlist created!': 'تم إنشاء قائمة التشغيل',
    'Playing from:': 'التشغيل من:',
    'Queue': 'قائمة الانتظار',
    'Offline search': 'البحث دون اتصال',
    'Search Results': 'نتائج البحث',
    'No results!': 'لا نتائج!',
    'Show all tracks': 'عرض كل الاغاني',
    'Show all playlists': 'عرض كل ق


le exists
                return true;
            }
        }
    }

    // Return false if cycle
    // does not exist
    return false;
}

// Function to add edges
// from u to v
void addEdge(int u, int v)
{
    adj[u].push_back(v);
}

// Driver Code
int main()
{
    n = 4, m = 5;

    // Insert edges
    addEdge(0, 1);
    addEdge(0, 2);
    addEdge(1, 2);
    addEdge(2, 0);
    addEdge(2, 3);

    for (int i = 0; i < n; i++) {
        if (visited[i] == 0) {
            dfs(i);
        }
    }

    // If cycle exist
    if (check_cycle())
        cout << "Yes";
    else
        cout << "No";

    return 0;
}

```

## Java

```java

// Java program to implement
// the above approach
import java.util.*;

class GFG{

static int t, n, m, a;

// Stack to store the
// visited vertices in
// the Topological Sort
static Stack<Integer> s;

// Store Topological Order
static ArrayList<Integer> tsort;

// Adjacency list to store edges
static ArrayList<ArrayList<Integer>> adj;

// To ensure visited vertex
static int[] visited = new int[(int)1e5 + 1];

// Function to perform DFS
static void dfs(int u)
{

    // Set the vertex as visited
    visited[u] = 1;

    for(Integer it : adj.get(u))
    {

        // Visit connected vertices
        if (visited[it] == 0)
            dfs(it);
    }

    // Push into the stack on
    // complete visit of vertex
    s.push(u);
}

// Function to check and return
// if a cycle exists or not
static boolean check_cycle()
{

    // Stores the position of
    // vertex in topological order
    Map<Integer, Integer> pos = new HashMap<>();

    int ind = 0;

    // Pop all elements from stack
    while (!s.isEmpty())
    {
        pos.put(s.peek(), ind);

        // Push element to get
        // Topological Order
        tsort.add(s.peek());

        ind += 1;

        // Pop from the stack
        s.pop();
    }

    for(int i = 0; i < n; i++)
    {
        for(Integer it : adj.get(i))
        {

            // If parent vertex
            // does not appear first
            if (pos.get(i) > pos.get(it))
            {

                // Cycle exists
                return true;
            }
        }
    }

    // Return false if cycle
    // does not exist
    return false;
}

// Function to add


0.226 4.17904,0.321 6.66081,0.346 5.37713,0.282 6.07424,0.281 3.26265,0.154 1.19809,0.06 1.33359,0.07 -0.16224,3.518 0.10519,9.554 -0.35301,8.027 -1.69551,-0.08 -9.82005,-0.522 -9.84322,-0.617 -9.82005,-0.692 -0.57765,-0.05 0.61449,-9.34013 -0.29654,-0.0317 0.24365,-7.20003 -0.14913,-0.004 0.20621,-4.29448"},"31161":{"name":"Sheridan, NE","path":"m 421.33313,193.26714 -0.20621,4.29448 0.14913,0.004 -0.24365,7.20003 0.29654,0.0317 -0.61449,9.34013 0.57765,0.05 -0.15774,2.02227 -0.99756,-0.0773 -10.37452,-0.602 -0.34588,-0.02 0.12542,-1.735 -0.79532,-0.1184 0.50944,-8.2466 -0.40293,-0.02 0.46712,-6.643 -0.22465,-1.344 0.36014,-4.948 11.87748,0.817"},"33007":{"name":"Coos, NH","path":"m 922.5264,90.736143 0.61865,1.767 3.39994,10.252997 0.24068,0.772 3.01484,9.586 -0.23534,1.181 -3.15541,0.6777 -0.34945,2.42076 0.20206,1.22582 -0.42315,0.24557 -0.59353,-1.55406 -0.47862,-0.26719 -0.54756,-0.74977 -0.44689,0.15617 -0.65075,-0.708 -0.48315,-0.128 -1.61946,0.50533 -0.51642,-1.01133 -1.76504,-0.298 -1.65094,-1.23 0.34409,0.03 0.51525,-0.378 0.041,-0.06 0.22464,-0.29 0.0945,-0.137 0.066,-0.104 0.79516,-1.398 0.0802,-0.137 0,0 0.18542,-0.515 -0.32106,-1.06649 0.53678,-0.93451 -0.41719,-0.673 -0.0713,-0.115 -0.40293,-0.499 -0.73811,-0.907 -0.60439,-0.596 -0.1355,-0.383 1.15498,-4.11309 -1.13178,-1.529907 0.38688,-0.795 -0.1355,-1.366 0.3851,-4.154 1.29258,-1.688 0.17829,-0.127 0.34409,0.177 0.14442,0.287 0.0731,0.08 0.51525,0.257 0.8433,0.06 0.70602,-0.147 0.10519,-0.09 0.3851,-1.526"},"33009":{"name":"Grafton, NH","path":"m 916.01001,114.97814 1.07685,-1.398 1.65094,1.23 1.76504,0.298 0.51642,1.01133 1.61946,-0.50533 0.48315,0.128 0.65075,0.708 0.78981,1.139 1.1553,1.76 0.6668,3.487 -3.10933,1.35 0.9057,2.074 0.36192,0.65 0.62303,1.21255 -1.86733,0.95167 0.2047


a
/* 8016F360 0016C2A0  38 63 1C 34 */	addi r3, r3, "__vt__29ObjectMgr<16GenericObjectMgr>"@l
/* 8016F364 0016C2A4  90 7F 00 00 */	stw r3, 0(r31)
/* 8016F368 0016C2A8  38 03 00 2C */	addi r0, r3, 0x2c
/* 8016F36C 0016C2AC  90 1F 00 1C */	stw r0, 0x1c(r31)
/* 8016F370 0016C2B0  41 82 00 2C */	beq .L_8016F39C
/* 8016F374 0016C2B4  3C 60 80 4B */	lis r3, "__vt__29Container<16GenericObjectMgr>"@ha
/* 8016F378 0016C2B8  38 03 1C B0 */	addi r0, r3, "__vt__29Container<16GenericObjectMgr>"@l
/* 8016F37C 0016C2BC  90 1F 00 00 */	stw r0, 0(r31)
/* 8016F380 0016C2C0  41 82 00 1C */	beq .L_8016F39C
/* 8016F384 0016C2C4  3C 80 80 4B */	lis r4, __vt__16GenericContainer@ha
/* 8016F388 0016C2C8  7F E3 FB 78 */	mr r3, r31
/* 8016F38C 0016C2CC  38 04 AC DC */	addi r0, r4, __vt__16GenericContainer@l
/* 8016F390 0016C2D0  38 80 00 00 */	li r4, 0
/* 8016F394 0016C2D4  90 1F 00 00 */	stw r0, 0(r31)
/* 8016F398 0016C2D8  48 2A 21 F1 */	bl __dt__5CNodeFv
.L_8016F39C:
/* 8016F39C 0016C2DC  7F C0 07 35 */	extsh. r0, r30
/* 8016F3A0 0016C2E0  40 81 00 0C */	ble .L_8016F3AC
/* 8016F3A4 0016C2E4  7F E3 FB 78 */	mr r3, r31
/* 8016F3A8 0016C2E8  4B EB 4D 0D */	bl __dl__FPv
.L_8016F3AC:
/* 8016F3AC 0016C2EC  80 01 00 14 */	lwz r0, 0x14(r1)
/* 8016F3B0 0016C2F0  7F E3 FB 78 */	mr r3, r31
/* 8016F3B4 0016C2F4  83 E1 00 0C */	lwz r31, 0xc(r1)
/* 8016F3B8 0016C2F8  83 C1 00 08 */	lwz r30, 8(r1)
/* 8016F3BC 0016C2FC  7C 08 03 A6 */	mtlr r0
/* 8016F3C0 0016C300  38 21 00 10 */	addi r1, r1, 0x10
/* 8016F3C4 0016C304  4E 80 00 20 */	blr
.endfn __dt__Q24Game9PelletMgrFv

.fn getMgrName__Q24Game9PelletMgrFv, weak
/* 8016F3C8 0016C308  3C 60 80 48 */	lis r3, lbl_8047E494@ha
/* 8016F3CC 0016C30C  38 63 E4 94 */	addi r3, r3, lbl_8047E494@l
/* 8016F3D0 0016C310  4E 80 00 20 */	blr
.endfn getMgrName__Q24Game9PelletMgrFv

.fn "__ml__28Iterator<16GenericObjectMgr>Fv", weak
/* 8016F


, d18
    vsubl.u8        q15, d3, d19
    vsubl.u8        q0, d4, d20
    vsubl.u8        q1, d5, d21
    vsubl.u8        q2, d6, d22
    vsubl.u8        q3, d7, d23
    vst1.s16        {q12, q13}, [r0]!
    vst1.s16        {q14, q15}, [r0]!
    vst1.s16        {q0, q1}, [r0]!
    vst1.s16        {q2, q3}, [r0], r1
.endr
    bne             loop_sub64
    pop             {r4, r5}
    bx              lr
endfunc

// chroma sub_ps
function x265_pixel_sub_ps_4x8_neon
    push            {r4}
    lsl             r1, r1, #1
    ldr             r4, [sp, #4]
    ldr             r12, [sp, #8]
.rept 4
    vld1.u8         {d0}, [r2], r4
    vld1.u8         {d1}, [r3], r12
    vld1.u8         {d2}, [r2], r4
    vld1.u8         {d3}, [r3], r12
    vsubl.u8        q2, d0, d1
    vsubl.u8        q3, d2, d3
    vst1.s16        {d4}, [r0], r1
    vst1.s16        {d6}, [r0], r1
.endr
    pop             {r4}
    bx              lr
endfunc

function x265_pixel_sub_ps_8x16_neon
    push            {r4}
    lsl             r1, r1, #1
    ldr             r4, [sp, #4]
    ldr             r12, [sp, #8]
.rept 8
    vld1.u8         {d0}, [r2], r4
    vld1.u8         {d1}, [r3], r12
    vld1.u8         {d2}, [r2], r4
    vld1.u8         {d3}, [r3], r12
    vsubl.u8        q2, d0, d1
    vsubl.u8        q3, d2, d3
    vst1.s16        {q2}, [r0], r1
    vst1.s16        {q3}, [r0], r1
.endr
    pop             {r4}
    bx              lr
endfunc

function x265_pixel_sub_ps_16x32_neon
    push            {r4, r5}
    lsl             r1, r1, #1
    ldr             r4, [sp, #8]
    ldr             r12, [sp, #12]
    mov             r5, #4
loop_sub_16x32:
    subs            r5, r5, #1
.rept 4
    vld1.u8         {q0}, [r2], r4
    vld1.u8         {q1}, [r3], r12
    vld1.u8         {q2}, [r2], r4
    vld1.u8         {q3}, [r3], r12
    vsubl.u8        q8, d0, d2
    vsubl.u8        q9, d1, d3
    vsubl.u8        q10, d4, d6
    vsubl.u8        q11, d5, d7
    vst1.s16        {q8, q9}, [r0], r1
    vst1.s16        {q10, q11}, [r0], r1
.endr
    bne             loop_sub_16x32
    pop             {r4, r5}
    bx              l


p>

\"Just as water is wet in a way that individual water molecules aren\u2019t, big data can reveal information in a way that individual bits of data can\u2019t. The authors show us the surprising ways that enormous, complex, and messy collections of data can be used to predict everything from shopping patterns to flu outbreaks.\"
\u2014Clay Shirky, author of Cognitive Surplus and *Here Comes Everybody

\"The book teems with great insights on the new ways of harnessing information, and offers a convincing vision of the future. It is essential reading for anyone who uses \u2014 or is affected by \u2014 big data.\"
\u2014Jeff Jonas, IBM Fellow & Chief Scientist, IBM Entity Analytics

\u201cWhat I\u2019m certain about is that\u00a0Big Data\u00a0will be the defining text in the discussion for some time to come.\u201d
\u2014Forbes.com

\u201cThe authors make clear that \u2018big data\u2019 is much more than a Silicon Valley buzzword\u2026 No other book offers such an accessible and balanced tour of the many benefits and downsides of our continuing infatuation with data.\u201d
\u2014Wall Street Journal

\"Plenty of books extol the technical marvels of our information society, but this is an original analysis of the information itself\u2014trillions of searches, calls, clicks, queries and purchases....A fascinating, enthusiastic view of the possibilities of vast computer correlations and the entrepreneurs who are taking advantage of them.\"
\u2014STARRED Kirkus Reviews

\"This book offers important insights and information\"
\u2014Booklist

\"'big data' [is] one of the buzzwords of corporate executives, tech-savvy politicians, and worried civil libertarians. If you want to know what they\u2019re all talking about, then Big Data is the book for you, a comprehensive and entertaining introduction to a very large topic....Mayer-Sch\u00f6nberger and Cukier offer up some sensible suggestions on how we can have the blessings of big data and our freedoms, too. Just as well; their lively book leaves no doubt that big data\u2019s growth spurt is just beginning.\"
\u2014Boston Globe

", "tags": [], "timestamp": "2015-02-14T18:21:04+00:00", "application_id": 20, "title_sort": "MCL0_16"}, {"uuid": "00df3b2a-a230-4ece-8456-5dca5131b0ec", "authors": ["Alessandro Delfanti Seventeenth"], "pubdate": "0101-01-01T00:00:00+00:00", "librarian": "Michel Leblond", "identifiers": {}, "format_metadata": {"EPUB": {"size": 279186, "path": "/home/m/devel/letssharebooks/mock_calibre_library_0/Alessandro Delfanti Seventeenth/MCL0_17 (21)/MCL0_17 - Alessandro Delfanti Seventeenth.epub"}}, "last_modified": "2015-02-14T18:22:16+00:00", "publisher": "Pluto Press", "formats": ["EPUB"], "title": "MCL0_17", "comments": null, "tags": [], "timestamp": "2015-02-14T18:21:58+00:00", "application_id": 21, "title_sort": "MCL0_17"}]}};/*
    json2.js
    2014-02-04

    Public Domain.

    NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.

    See http://www.JSON.org/js.html

    This code should be minified before deployment.
    See http://javascript.crockford.com/jsmin.html


#include "ULUS10536_MYTHREAD-MAIN.BIN.h"

void FUN_08961cac(int param_1,uint param_2)

{
  int iVar1;
  int iVar2;
  int iVar3;

  iVar1 = FUN_0880dc00("DWCardName");
  FUN_088cc354(iVar1);
  iVar3 = param_1 + 0x5030;
  strcpy(iVar3,*(undefined4 *)(iVar1 + (param_2 & 0xff) * 4));
  iVar1 = *(int *)(param_1 + 0x5028);
  FUN_089f51b8(iVar1);
  *(undefined4 *)(iVar1 + 0x84) = 0;
  iVar2 = *(int *)(*(int *)(param_1 + 0x5028) + 0x74);
  iVar1 = *(int *)(*(int *)(param_1 + 0x1c) +
                  ((uint)*(ushort *)(param_1 + 0x5186) + (int)*(char *)(param_1 + 0x4cdb)) * 4);
  (**(code **)(iVar2 + 0x14))
            (*(undefined4 *)(iVar1 + 0x60),*(float *)(iVar1 + 100) - 40.0,0,
             *(int *)(param_1 + 0x5028) + (int)*(short *)(iVar2 + 0x10),iVar3,1,0,0);
  FUN_088184e8(0,*(undefined4 *)(param_1 + 0x5028),iVar3,param_1 + 0x50f0,param_1 + 0x50f8,
               param_1 + 0x5100);
  *(undefined4 *)(param_1 + 0x50e8) = *(undefined4 *)(*(int *)(param_1 + 0x5028) + 0x84);
  *(float *)(param_1 + 0x50e0) = (float)*(int *)(*(int *)(param_1 + 0x5028) + 0x88);
  return;
}


) + (i14 + i15)))) +
        ((((i16 + i17) + (i18 + i19)) + ((i20 + i21) + (i22 + i23))) +
        (((i24 + i25) + (i26 + i27)) + ((i28 + i29) + (i30 + i31)))));
        t076.goldChecker.println(a);
        t076.goldChecker.check();
    }
}
/*
 * Copyright (c) 2008, 2020, Oracle and/or its affiliates. All rights reserved.
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 *
 * This code is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License version 2 only, as
 * published by the Free Software Foundation.
 *
 * This code is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 * version 2 for more details (a copy is included in the LICENSE file that
 * accompanied this code).
 *
 * You should have received a copy of the GNU General Public License version
 * 2 along with this work; if not, write to the Free Software Foundation,
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
 *
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
 * or visit www.oracle.com if you need additional information or have any
 * questions.
 */

/*
 * @test
 *
 * @summary converted from VM Testbase jit/t/t067.
 * VM Testbase keywords: [jit, quick]
 *
 * @library /vmTestbase
 *          /test/lib
 * @run main/othervm jit.t.t067.t067
 */

package jit.t.t067;

import nsk.share.TestFailure;
import nsk.share.GoldChecker;

public class t067
{
  public static final GoldChecker goldChecker = new GoldChecker( "t067" );

  static int i = -1;

  static void chkCond(String s, boolean b)
  {
      t067.goldChecker.print(s);
      if(b)
          t067.goldChecker.println(" ok");
      else
          t067.goldChecker.println(" fubar");
  }

  private static void check_sign()
  {
   // dividend is positive
   //
     chkCond("err_1", (Integer.MAX_VALUE%Integer.MIN_VALUE)>=0);
     chkCond("err_2", (Integer.MAX_VALUE%i)>=0);
     chkCond("err_3", (1%Integer.MIN_VALUE)>=0);
     chkCond("err_4", (1%(-1))>=0);
     chkCond("err_5", (3%4)>=0);

   // dividend is negative
   //
     chkCond("err_6", (Integer.MIN_VALUE%Integer.MAX_VALUE)<=0);
     chkCond("err_7", (Integer.MIN_VALUE%1)<=0);

     // This one fails because the division raises some sort of
     // hardware arithmetic exception.  I guess the hardware notices
     // that it can't represent the result of 0x80000000 / -1 or
     // something.  Anyhow, the behavior is the same, jit or no jit.
     // If they ever get the VM fixed, I'll have to make the
     // corresponding fix to the jit.
     // chkCond("err_8", (Integer.MIN_VALUE%(i))<=0);

     chkCond("err_9", ((-1)%Integer.MAX_VALUE)<=0);
     chkCond("err_10", ((-1)%Integer.MIN_VALUE)<=0);
     chkCond("err_11", (-2)%(-1)<=0);
     chkCond("err_12", (-2)%(-3)<=0);

   // dividend is zero
   //
     chkCond("err_13", (0%Integer.MIN_VALUE)==0);
  }

  public static void main(String argv[])
  {
      t067.goldChecker.println("Integer.MIN_VALUE == " + Integer.MIN_VALUE);
      check_sign();


   {AnswerPost} answerPost
     * @return  {AnswerPost}
     */
    protected convertDateFromClient(answerPost: AnswerPost): AnswerPost {
        return Object.assign({}, answerPost, {
            creationDate: answerPost.creationDate && moment(answerPost.creationDate).isValid() ? moment(answerPost.creationDate).toJSON() : undefined,
        });
    }

    /**
     * Takes a answerPost and converts the date from the server
     * @param   {EntityResponseType} res
     * @return  {AnswerPost}
     */
    protected convertDateFromServer(res: EntityResponseType): EntityResponseType {
        if (res.body) {
            res.body.creationDate = res.body.creationDate ? moment(res.body.creationDate) : undefined;
        }
        return res;
    }

    /**
     * Takes an array of answerPosts and converts the date from the server
     * @param   {EntityArrayResponseType} res
     * @return  {EntityArrayResponseType}
     */
    protected convertDateArrayFromServer(res: EntityArrayResponseType): EntityArrayResponseType {
        if (res.body) {
            res.body.forEach((answerPost: AnswerPost) => {
                answerPost.creationDate = answerPost.creationDate ? moment(answerPost.creationDate) : undefined;
            });
        }
        return res;
    }
}
import DailySerie from './../models/DailySerie';
import { FETCH_ALL_DAILY_SERIES, RESET_DAILY_SERIES } from './../actions/daily-series.action';
import dailySeries from './daily-series.reducer';

const NOT_EXISTENT_ACTION = {
	type: 'NOT_EXISTENT',
	companies: ['BLA']
};
const NEW_DAILY_SERIE = new DailySerie('Symbol 1', 1, [2, 3], 4);
const FETCH_ALL_DAILY_SERIES_ACTION = {
	type: FETCH_ALL_DAILY_SERIES,
	dailySerie: NEW_DAILY_SERIE
};
const RESET_DAILY_SERIES_ACTION = {
	type: RESET_DAILY_SERIES
};

describe('dailySeries', () => {
	it('should be defined', () => {
		expect(dailySeries).toBeDefined();
		expect(typeof dailySeries).toEqual('function');
	});

	it('should return the initial state if the action not exist', () => {
		expect(dailySeries([], NOT_EXISTENT_ACTION)).toEqual([]);
	});

	it('should concatenate the dailySeries into the state', () => {
		expect(dailySeries([], FETCH_ALL_DAILY_SERIES_ACTION)).toEqual([NEW_DAILY_SERIE]);
	});

	it('should reset the dailySeries in the state', () => {
		expect(dailySeries([NEW_DAILY_SERIE], RESET_DAILY_SERIES_ACTION)).toEqual([]);
	});
});import { Injectable } from '@angular/core';
import { BehaviorSubject, Observable, Subject } from 'rxjs';
import { takeUntil } from 'rxjs/operators';

import { StreamState } from '../interfaces/stream-state';

@Injectable({
  providedIn: "root"
})
export class StreamService {
  private stop$ = new Subject();
  private audio = new Audio();
  private state$ = new BehaviorSubject<StreamState>(new StreamState());
  private AUDIO_EVENTS = [
    "ended",
    "error",
    "play",
    "playing",
    "pause",
    "timeupdate",
    "canplay",
    "loadedmetadata",
    "loadstart"
  ];

  playStream(url) {
    return this.streamObservable(url).pipe(takeUntil(this.stop$));
  }

  play() {
    this.audio.play();
  }

  pause() {
    this.audio.pause();
  }

  stop() {
    this.stop$.next();
  }

  seekTo(seconds) {
    this.audio.currentTime = seconds;
  }

  setVolume(value: number) {
    this.audio


MA 02111-1307, USA.  */

package gnu.testlet.java.awt.geom.CubicCurve2D.Float;

import gnu.testlet.Testlet;
import gnu.testlet.TestHarness;
import java.awt.geom.CubicCurve2D;

/**
 * Checks whether the CubicCurve2D.Float.getCtrlP1() method works
 * correctly.
 *
 * @author Sascha Brawer (brawer@dandelis.ch)
 */
public class getCtrlP1
  implements Testlet
{
  public void test(TestHarness harness)
  {
    CubicCurve2D.Float curve;

    curve = new CubicCurve2D.Float(-1, -2, -3.141f, 42, -5, -6, -77, 88);
    harness.check(curve.getCtrlP1().getX(), -3.141f); // Check 1
    harness.check(curve.getCtrlP1().getY(), 42);      // Check 2
  }
}
//Tags: JDK1.2

//Copyright (C) 2004 David Gilbert <david.gilbert@object-refinery.com>

//Mauve is free software; you can redistribute it and/or modify
//it under the terms of the GNU General Public License as published by
//the Free Software Foundation; either version 2, or (at your option)
//any later version.

//Mauve 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 Mauve; see the file COPYING.  If not, write to
//the Free Software Foundation, 59 Temple Place - Suite 330,
//Boston, MA 02111-1307, USA.  */

package gnu.testlet.java.awt.geom.Rectangle2D.Float;

import gnu.testlet.TestHarness;
import gnu.testlet.Testlet;

import java.awt.geom.Rectangle2D;

/**
 * Some checks for the clone() method in the {@link Rectangle2D.Float} class.
 */
public class clone implements Testlet
{

  /**
   * Runs the test using the specified harness.
   *
   * @param harness  the test harness (null not permitted).
   */
  public void test(TestHarness harness)
  {
    Rectangle2D r1 = new Rectangle2D.Float(1.0f, 2.0f, 3.0f, 4.0f);
    Rectangle2D r2 = null;
    r2 = (Rectangle2D) r1.clone();
    harness.check(r1.getX() == r2.getX());
    harness.check(r1.getY() == r2.getY());
    harness.check(r1.getWidth() == r2.getWidth());
    harness.check(r1.getHeight() == r2.getHeight());
    harness.check(r1.getClass() == r2.getClass());
    harness.check(r1 != r2);
  }

}
// Tags: JDK1.2

// Copyright (C) 2004 David Gilbert <david.gilbert@object-refinery.com>

// Mauve is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2, or (at your option)
// any later version.

// Mauve 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 Mauve; see the file COPYING.  If not, write to
// the Free Software Foundation, 59 Temple Place - Suite 330,
// Boston, MA 02111-1307, U


 </summary>
        /// <param name="expression"></param>
        /// <returns></returns>
        IGroupByQueryable1<TKey, TEntity> OrderBy<TResult>(Expression<Func<INetSqlGrouping1<TKey, TEntity>, TResult>> expression);

        /// <summary>
        /// 倒序排序
        /// </summary>
        /// <param name="expression"></param>
        /// <returns></returns>
        IGroupByQueryable1<TKey, TEntity> OrderByDescending<TResult>(Expression<Func<INetSqlGrouping1<TKey, TEntity>, TResult>> expression);

        /// <summary>
        /// 查询列
        /// </summary>
        /// <typeparam name="TResult"></typeparam>
        /// <param name="expression"></param>
        /// <returns></returns>
        IGroupByQueryable1<TKey, TEntity> Select<TResult>(Expression<Func<INetSqlGrouping1<TKey, TEntity>, TResult>> expression);

        /// <summary>
        /// 限制
        /// </summary>
        /// <param name="skip">跳过前几条数据</param>
        /// <param name="take">取前几条数据</param>
        /// <returns></returns>
        IGroupByQueryable1<TKey, TEntity> Limit(int skip, int take);
    }
}


g, dynamic>;
}

bool test9() {
  M2<dynamic> m2 = new M2<dynamic>();
  return m2 is Iface<String, num>;
}

bool test10() {
  M2<dynamic> m2 = new M2<dynamic>();
  return m2 is Iface<num, String>;
}

bool test11() {
  M2<dynamic> m2 = new M2<dynamic>();
  return m2 is Iface<num, String>;
}

String main() {
  // dynamic is a top-type, equivalent to Object at runtime.

  var b1 = dynamic is Type;
  var b2 = dynamic == dynamic;

  // dynamic is not a subtype of num or String.
  M1<dynamic, dynamic> m1 = new M1<dynamic, dynamic>();

  var b3 = m1 is Iface<dynamic, num>;
  var b4 = m1 is Iface<String, dynamic>;
  var b5 = m1 is Iface<String, num>;
  var b6 = m1 is Iface<num, String>;

  M2<dynamic> m2 = new M2<dynamic>(); // is Iface<dynamic, dynamic>.
  var b7 = m2 is Iface<dynamic, num>;
  var b8 = m2 is Iface<String, dynamic>;
  var b9 = m2 is Iface<String, num>;
  var b10 = m2 is Iface<num, String>;

  M3 m3 = new M3(); // is IFace<String, dynamic>.

  var b11 = m3 is Iface<dynamic, num>;
  var b12 = m3 is Iface<String, dynamic>;
  var b13 = m3 is Iface<String, num>;
  var b14 = m3 is! Iface<num, String>;

  F1<int> f1 = (dynamic s, int i) => s[i]; // is dynamic Function(dynamic, int).

  var b15 = f1 is F1<int>;

  // "dynamic" is not a reserved word or built-in identifier.

  HasFieldDynamic has_field = new HasFieldDynamic();

  var b16 = "dynamic" == has_field.dynamic;

  HasMethodDynamic has_method = new HasMethodDynamic();

  var b17 = "dynamic" == has_method.dynamic();

  var list = [
    b1,
    b2,
    b3,
    b4,
    b5,
    b6,
    b7,
    b8,
    b9,
    b10,
    b11,
    b12,
    b13,
    b14,
    b15,
    b16,
    b17
  ];
  print(list);
  var r = list.join();
  print(r);
  return list.join();
}
class A<T> {
  String method1(num o) {
    return "A<T> method1 $o";
  }

  String method2(T o) {
    return "A<T> method2 $o";
  }
}

class B {
  String method1(covariant int o) {
    return "B method1 $o";
  }

  String method2(int o) {
    return "B method2 $o";
  }
}

class C implements A<int>, B {
  // Abstract forwarding stub needed because the parameter is
  // covariant in `B.method1` but not in `A.method1`.

  @override
  String method1(covariant num o) {
    return "C method1 $o";
  }

  // Abstract forwarding stub needed because the parameter is a
  // generic covariant impl in `A.method2` but not in `B.method2`.

  @override
  String method2(/*generic-covariant-impl*/ int o) {
    return "C method2 $o";
  }
}

class C2 extends A<int> implements B {
  // Abstract forwarding stub needed because the parameter is
  // covariant in `B.method1` but not in `A.method1`.


expect(observer.subject).toBe('Done')
})

test('Should fire observers as expected', () => {
  let observer1 = new op.Observer('click')
  let observer2 = new op.Observer('click')
  let subjects = new op.Subject()
  subjects.add('click', observer1)
  subjects.add('click', observer2)
  subjects.fire('click')
  expect(observer1.subject).toBe('Done')
  expect(observer2.subject).toBe('Done')
})

test('Should fire different observers as expected', () => {
  let observer1 = new op.Observer('click')
  let observer2 = new op.Observer('hover')
  let subjects = new op.Subject()
  subjects.add('click', observer1)
  subjects.add('hover', observer2)
  subjects.fire('click')
  expect(observer1.subject).toBe('Done')
  expect(observer2.subject).toBe('hover')
})

test('Should remove observer as expected', () => {
  let observer = new op.Observer('click')
  let subjects = new op.Subject()
  subjects.add('click', observer)
  subjects.remove('click', observer)
  subjects.fire('click')
  expect(observer.subject).toBe('click')
})
export enum photoAction {
    SET,
    ADD,
    DELETE,
    GET,
    PAGE_INCREASE
}

export const setPhotos = (photos: any[]) => {
    return {
        type: photoAction.SET,
        payload: photos
    }
}

export const addPhotos = (photos: any[]) => {
    return {
        type: photoAction.ADD,
        payload: photos
    }
}

export const increasePage = () => {
    return {
        type: photoAction.PAGE_INCREASE
    }
}import * as fs from "fs";
import * as path from "path";
import * as assert from "assert";
import * as pngjs from "pngjs";

const shell = require("shelljs");
const pixelmatch = require("pixelmatch");
const akashicCliServeModule = require("./akashicCliServeModule");
const saveScreenshots = require("./saveScreenshots");

const assertScreenshot = (expectedPath: string, targetPath: string, diffPath: string) => {
	// 予め用意しているスクリーンショットと画像を比較する時diffをどこまで許容するかの値
	// このdiffの値域は0～1で、2つの画像でdiffがある領域の割合を示していて、閾値は5%に設定している
	const screenshotDiffThreshold = 0.05;
	const expected = pngjs.PNG.sync.read(fs.readFileSync(expectedPath));
	const actual = pngjs.PNG.sync.read(fs.readFileSync(targetPath));
	const {width, height} = expected;
	const diff = new pngjs.PNG({width, height});
	// thresholdはピクセルごとの差異の閾値を表している
	const value = pixelmatch(expected.data, actual.data, diff.data, width, height, {threshold: 0.1});
	console.log(`diff: ${100 * value / (width * height)}%`);
	fs.writeFileSync(diffPath, pngjs.PNG.sync.write(diff));
	assert(value <= screenshotDiffThreshold * width * height);
};

module.exports = async (targetDir: string, imgDirName: string) => {
	try {
		console.log("start to get screenshots and run tests");
		const url = await akashicCliServeModule.start(targetDir);
		const outputDir = path.join(targetDir, imgDirName, "out");
		if (!fs.existsSync(outputDir)) {
			shell.mkdir("-p", [outputDir]);
		}
		await saveScreenshots(url, outputDir);
		const diffDir = path.join(targetDir, imgDirName, "diff");
		if (!fs.existsSync(d


[i];

        if (readNumeric && !isDigit(c) && c != '.')
        {
            readNumeric = false;
            l.append(sb);
            sb.clear();
            if (isLetter(c)) sb.append(c);
        } else if (isDigit(c) || c == '.' || c == '-')
        {
            sb.append(c);
            readNumeric = true;
        } else if (isLetter(c)) sb.append(c);
    }

    if (sb.length() > 0) l.append(sb);

//    QChar c;

//    for (int i = 0; i < command.length(); i++) {
//        c = command[i];

//        if (readNumeric && !c.isDigit() && c != '.') {
//            readNumeric = false;
//            l.append(sb);
//            sb = "";
//            if (c.isLetter()) sb.append(c);
//        } else if (c.isDigit() || c == '.' || c == '-') {
//            sb.append(c);
//            readNumeric = true;
//        } else if (c.isLetter()) sb.append(c);
//    }

//    if (sb.length() > 0) l.append(sb);

    return l;
}

// TODO: Replace everything that uses this with a loop that loops through
// the string and creates a hash with all the values.
double GcodePreprocessorUtils::parseCoord(QStringList argList, char c)
{
//    int n = argList.length();

//    for (int i = 0; i < n; i++) {
//        if (argList[i].length() > 0 && argList[i][0].toUpper() == c) return argList[i].mid(1).toDouble();
//    }

        foreach (QString t, argList)
        {
            if (t.length() > 0 && t[0].toUpper() == c) return t.mid(1).toDouble();
        }
    return qQNaN();
}

//static public List<String> convertArcsToLines(Point3d start, Point3d end) {
//    List<String> l = new ArrayList<String>();

//    return l;
//}

QVector3D GcodePreprocessorUtils::convertRToCenter(QVector3D start, QVector3D end, double radius, bool absoluteIJK,
                                                   bool clockwise)
{
    double R = radius;
    QVector3D center;

    double x = end.x() - start.x();
    double y = end.y() - start.y();

    double h_x2_div_d = 4 * R * R - x * x - y * y;
    if (h_x2_div_d < 0)
    { qDebug() << "Error computing arc radius."; }
    h_x2_div_d = (-sqrt(h_x2_div_d)) / hypot(x, y);

    if (!clockwise) h_x2_div_d = -h_x2_div_d;

    // Special message from gcoder to software for which radius
    // should be used.
    if (R < 0)
    {
        h_x2_div_d = -h_x2_div_d;
        // TODO: Places that use this need to run ABS on radius.
        radius = -radius;
    }

    double offsetX = 0.5 * (x - (y * h_x2_div_d));
    double offsetY = 0.5 * (y + (x * h_x2_div_d));

    if (!absoluteIJK)
    {
        center.setX(start.x() + offsetX);
        center.setY(start.y() + offsetY);
    } else
    {
        center.setX(offsetX);
        center.setY(offsetY);
    }

    return center;
}

/**
* Return the angle in radians when going from start to end.
*/
double GcodePreprocessorUtils::getAngle(QVector3D start, QVector3D end)
{
    double deltaX = end.x() - start.x();
    double deltaY = end.y() - start.y();

    double angle = 0.0;

    if (deltaX != 0)
    { // prevent div b


et = roll + save + modifier;
	assert(fx);
	int spellLevel = fx->SpellLevel;
	int saveBonus = fx->SavingThrowBonus;
	int saveDC = 10 + spellLevel + saveBonus;

	// handle special bonuses (eg. vs poison, which doesn't have a separate stat any more)
	// same hardcoded list as in the original
	if (savingThrows[type] == IE_SAVEFORTITUDE && fx->Opcode == 25) {
		if (BaseStats[IE_RACE] == 4 /* DWARF */) ret += 2;
		if (HasFeat(Feat::SnakeBlood)) ret += 2;
		if (HasFeat(Feat::ResistPoison)) ret += 4;
	}

	// the original had a sourceType == TRIGGER check, but we handle more than ST_TRIGGER
	Scriptable* caster = area ? area->GetScriptableByGlobalID(fx->CasterID) : nullptr;
	if (savingThrows[type] == IE_SAVEREFLEX && caster && caster->Type != ST_ACTOR) {
		// loop over all classes and add TRAPSAVE.2DA values to the bonus
		for (int cls = 0; cls < ISCLASSES; cls++) {
			int level = GetClassLevel(cls);
			if (!level) continue;
			ret += gamedata->GetTrapSaveBonus(level, classesiwd2[cls]);
		}
	}

	if (savingThrows[type] == IE_SAVEWILL) {
		// aura of courage
		if (Modified[IE_EA] < EA_GOODCUTOFF && fx->SourceRef != "SPWI420" && area) {
			// look if an ally paladin of at least level 2 is near
			std::vector<Actor*> neighbours = area->GetAllActorsInRadius(Pos, GA_NO_LOS | GA_NO_DEAD | GA_NO_UNSCHEDULED | GA_NO_ENEMY | GA_NO_NEUTRAL | GA_NO_SELF, 10);
			for (const Actor* ally : neighbours) {
				if (ally->GetPaladinLevel() >= 2 && !ally->CheckSilenced()) {
					ret += 4;
					break;
				}
			}
		}

		if (fx->Opcode == 24 && BaseStats[IE_RACE] == 5 /* HALFLING */) ret += 2;
		if (GetSubRace() == 0x20001 /* DROW */) ret += 2;

		// Tyrant's dictum for clerics of Bane
		const Actor* cleric = Scriptable::As<Actor>(caster);
		if (cleric && cleric->GetClericLevel() && BaseStats[IE_KIT] & 0x200000) {
			// the original limited this to domain spells, but that's pretty lame
			saveDC += 1;
		}
	}

	// general bonuses
	if (Modified[IE_EA] != EA_PC) ret += CFGCache.difficultySaveMod;
	// (half)elven resistance to enchantment, gnomish to illusions and dwarven to spells
	if ((BaseStats[IE_RACE] == 2 || BaseStats[IE_RACE] == 3) && fx->PrimaryType == 4) ret += 2;
	if (BaseStats[IE_RACE] == 6 && fx->PrimaryType == 5) ret += 2;
	if (BaseStats[IE_RACE] == 4 && fx->Resistance <= FX_CAN_RESIST_CAN_DISPEL) ret += 2;
	// monk's clear mind and mage specialists
	if (GetMonkLevel() >= 3 && fx->PrimaryType == 4) ret += 2;
	if (GetMageLevel() && (1 << (fx->PrimaryType + 5)) & BaseStats[IE_KIT]) ret += 2;

	// handle animal taming last
	// must roll a Will Save of 5 + player's total skill or higher to save
	if (fx->SourceRef != "SPIN108" && fx->Opcode == 5) {
		saveDC = 5;
		const Actor* caster = core->GetGame()->GetActorByGlobalID(fx->CasterID);
		if (caster) {
			saveDC += caster->GetSkill(IE_ANIMALS);
		}
	}

	ret = AdjustSaveVsSchool(ret,


padding: 5px;
    }
    </style>

    <button on-tap="exportRawCsv_">raw CSV</button>
    <button on-tap="exportRawJson_">raw JSON</button>
    <button on-tap="exportMergedCsv_">merged CSV</button>
    <button on-tap="exportMergedJson_">merged JSON</button>
  </template>
</dom-module><dom-module id="tr-v-ui-histogram-set-controls">
  <template>

        <input id="search" placeholder="Find Histogram name" value="{{searchQuery::keyup}}"/>
        <svg id="clear_search" on-tap="clearSearch_" viewBox="0 0 128 128">
          <g>
          <title>Clear search</title>
          <line x1="28" x2="100" y1="28" y2="100"></line>
          <line x1="28" x2="100" y1="100" y2="28"></line>
          </g>
        </svg>

      <svg id="show_overview" on-tap="toggleOverviewLineCharts_" viewBox="0 0 128 128">
        <g>
        <title>Show overview charts</title>
        <line x1="19" x2="49" y1="109" y2="49"></line>
        <line x1="49" x2="79" y1="49" y2="79"></line>
        <line x1="79" x2="109" y1="79" y2="19"></line>
        </g>
      </svg>
      <svg id="hide_overview" on-tap="toggleOverviewLineCharts_" viewBox="0 0 128 128">
        <g>
        <title>Hide overview charts</title>
        <line x1="28" x2="100" y1="28


/* SPDX-License-Identifier: GPL-2.0+ */

#undef TRACE_SYSTEM
#define TRACE_SYSTEM	vas

#if !defined(_VAS_TRACE_H) || defined(TRACE_HEADER_MULTI_READ)

#define _VAS_TRACE_H
#include <linux/tracepoint.h>
#include <linux/sched.h>
#include <asm/vas.h>

TRACE_EVENT(	vas_rx_win_open,

		TP_PROTO(struct task_struct *tsk,
			 int vasid,
			 int cop,
			 struct vas_rx_win_attr *rxattr),

		TP_ARGS(tsk, vasid, cop, rxattr),

		TP_STRUCT__entry(
			__field(struct task_struct *, tsk)
			__field(int, pid)
			__field(int, cop)
			__field(int, vasid)
			__field(struct vas_rx_win_attr *, rxattr)
			__field(int, lnotify_lpid)
			__field(int, lnotify_pid)
			__field(int, lnotify_tid)
		),

		TP_fast_assign(
			__entry->pid = tsk->pid;
			__entry->vasid = vasid;
			__entry->cop = cop;
			__entry->lnotify_lpid = rxattr->lnotify_lpid;
			__entry->lnotify_pid = rxattr->lnotify_pid;
			__entry->lnotify_tid = rxattr->lnotify_tid;
		),

		TP_printk("pid=%d, vasid=%d, cop=%d, lpid=%d, pid=%d, tid=%d",
			__entry->pid, __entry->vasid, __entry->cop,
			__entry->lnotify_lpid, __entry->lnotify_pid,
			__entry->lnotify_tid)
);

TRACE_EVENT(	vas_tx_win_open,

		TP_PROTO(struct task_struct *tsk,
			 int vasid,
			 int cop,
			 struct vas_tx_win_attr *txattr),

		TP_ARGS(tsk, vasid, cop, txattr),

		TP_STRUCT__entry(
			__field(struct task_struct *, tsk)
			__field(int, pid)
			__field(int, cop)
			__field(int, vasid)
			__field(struct vas_tx_win_attr *, txattr)
			__field(int, lpid)
			__field(int, pidr)
		),

		TP_fast_assign(
			__entry->pid = tsk->pid;
			__entry->vasid = vasid;
			__entry->cop = cop;
			__entry->lpid = txattr->lpid;
			__entry->pidr = txattr->pidr;
		),

		TP_printk("pid=%d, vasid=%d, cop=%d, lpid=%d, pidr=%d",
			__entry->pid, __entry->vasid, __entry->cop,
			__entry->lpid, __entry->pidr)
);

TRACE_EVENT(	vas_paste_crb,

		TP_PROTO(struct task_struct *tsk,
			struct pnv_vas_window *win),

		TP_ARGS(tsk, win),

		TP_STRUCT__entry(
			__field(struct task_struct *, tsk)
			__field(struct vas_window *, win)
			__field(int, pid)
			__field(int, vasid)
			__field(int, winid)
			__field(unsigned long, paste_kaddr)
		),

		TP_fast_assign(
			__entry->pid = tsk->pid;
			__entry->vasid = win->vinst->vas_id;
			__entry->winid = win->vas_win.winid;
			__entry->paste_kaddr = (unsigned long)win->paste_kaddr
		),

		TP_printk("pid=%d, vasid=%d, winid=%d, paste_kaddr=0x%016lx\n",
			__entry->pid, __entry->vasid, __entry->winid,
			__entry->paste_kaddr)
);

#endif /* _VAS_TRACE_H */

#undef TRACE_INCLUDE_PATH
#define TRACE_INCLUDE_PATH ../../arch/powerpc/platforms/powernv
#define TRACE_INCLUDE_FILE vas-trace
#include <trace/define_trace.h>


(target, res)
	if err != nil {
		return nil, err
	}
	c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "dataportability.archiveJobs.cancel", "response", internallog.HTTPResponse(res, b))
	return ret, nil
}

type ArchiveJobsGetPortabilityArchiveStateCall struct {
	s            *Service
	name         string
	urlParams_   gensupport.URLParams
	ifNoneMatch_ string
	ctx_         context.Context
	header_      http.Header
}

// GetPortabilityArchiveState: Retrieves the state of an Archive job for the
// Portability API.
//
//   - name: The archive job ID that is returned when you request the state of
//     the job. The format is: archiveJobs/{archive_job}/portabilityArchiveState.
//     archive_job is the job ID returned by the
//     InitiatePortabilityArchiveResponse.
func (r *ArchiveJobsService) GetPortabilityArchiveState(name string) *ArchiveJobsGetPortabilityArchiveStateCall {
	c := &ArchiveJobsGetPortabilityArchiveStateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
	c.name = name
	return c
}

// Fields allows partial responses to be retrieved. See
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
// details.
func (c *ArchiveJobsGetPortabilityArchiveStateCall) Fields(s ...googleapi.Field) *ArchiveJobsGetPortabilityArchiveStateCall {
	c.urlParams_.Set("fields", googleapi.CombineFields(s))
	return c
}

// IfNoneMatch sets an optional parameter which makes the operation fail if the
// object's ETag matches the given value. This is useful for getting updates
// only after the object has changed since the last request.
func (c *ArchiveJobsGetPortabilityArchiveStateCall) IfNoneMatch(entityTag string) *ArchiveJobsGetPortabilityArchiveStateCall {
	c.ifNoneMatch_ = entityTag
	return c
}

// Context sets the context to be used in this call's Do method.
func (c *ArchiveJobsGetPortabilityArchiveStateCall) Context(ctx context.Context) *ArchiveJobsGetPortabilityArchiveStateCall {
	c.ctx_ = ctx
	return c
}

// Header returns a http.Header that can be modified by the caller to add
// headers to the request.
func (c *ArchiveJobsGetPortabilityArchiveStateCall) Header() http.Header {
	if c.header_ == nil {
		c.header_ = make(http.Header)
	}
	return c.header_
}

func (c *ArchiveJobsGetPortabilityArchiveStateCall) doRequest(alt string) (*http.Response, error) {
	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
	if c.ifNoneMatch_ != "" {
		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
	}
	c.urlParams_.Set("alt", alt)
	c.urlParams_.Set("prettyPrint", "false")
	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}")
	urls += "?" + c.urlParams_.Encode()
	req, err := http.NewRequest("GET", urls, nil)
	if err != nil {
		return nil, err
	}
	req.Header = reqHeaders
	googleapi.Expand(req.URL, map[string]string{
		"name": c.name,
	})
	c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "dataportability.archiveJobs.getPortabilityArchiveState", "request", internallog.HTTPRequest(req, nil))
	return gensupport.SendRequest(c.ctx_, c.s.client, req)
}

// Do executes the "dataportability.archiveJobs.getPortabilityArchiveState" call.
// Any non-2xx status code


 GNU General Public License for more details.                          #
//#                                                                        #
//#          COPYRIGHT: EDF R&D / TELECOM ParisTech (ENST-TSI)             #
//#                                                                        #
//##########################################################################

#include "ccLog.h"

//Local
#include "ccPlatform.h"

//System
#include <assert.h>

#if !defined(CC_WINDOWS)
#define _vsnprintf vsnprintf
#endif

/***************
 *** Globals ***
 ***************/

//buffer for formated string generation
static char s_buffer[4096];

//unique console instance
static ccLog* s_instance = 0;

ccLog* ccLog::TheInstance()
{
    return s_instance;
}

void ccLog::RegisterInstance(ccLog* logInstance)
{
	s_instance = logInstance;
}

bool ccLog::Print(const char* format, ...)
{
	if (s_instance)
	{
		//we get the "..." parameters as "printf" would do
		va_list args;
		va_start(args, format);
		_vsnprintf(s_buffer, (size_t)4096, format, args);
		va_end(args);

		s_instance->displayMessage(QString(s_buffer), LOG_STANDARD);
	}

	return true;
}

bool ccLog::Print(const QString& message)
{
	if (s_instance)
		s_instance->displayMessage(message, LOG_STANDARD);

	return true;
}

bool ccLog::Warning(const char* format, ...)
{
	if (s_instance)
	{
		//we get the "..." parameters as "printf" would do
		va_list args;
		va_start(args, format);
		_vsnprintf(s_buffer, (size_t)4096, format, args);
		va_end(args);

		s_instance->displayMessage(QString(s_buffer), LOG_WARNING);
	}

	return false;
}

bool ccLog::Warning(const QString& message)
{
	if (s_instance)
		s_instance->displayMessage(message, LOG_WARNING);

	return false;
}

bool ccLog::Error(const char* format, ...)
{
	if (s_instance)
	{
		//we get the "..." parameters as "printf" would do
		va_list args;
		va_start(args, format);
		_vsnprintf(s_buffer, (size_t)4096, format, args);
		va_end(args);

		s_instance->displayMessage(QString(s_buffer), LOG_ERROR);
	}

	return false;
}

bool ccLog::Error(const QString& message)
{
	if (s_instance)
		s_instance->displayMessage(message, LOG_ERROR);

	return false;
}

bool ccLog::PrintDebug(const char* format, ...)
{
	if (s_instance)
	{
		//we get the "..." parameters as "printf" would do
		va_list args;
		va_start(args, format);
		_vsnprintf(s_buffer, (size_t)4096, format, args);
		va_end(args);

		s_instance->displayMessage(QString(s_buffer), LOG_STANDARD_DEBUG);
	}

	return true;
}

bool ccLog::PrintDebug(const QString& message)
{
	if (s_instance)
		s_instance->displayMessage(message, LOG_STANDARD_DEBUG);

	return true;
}

bool ccLog::WarningDebug(const char* format, ...)
{
	if (s_instance)
	{
		//we get the "..." parameters as "printf" would do
		va_list args;
		va_start(args, format);
		_vsnprintf(s_buffer, (size_t)4096, format, args);
		va_end(args);

		s_instance->displayMessage(QString(s_buffer), LOG_WARNING_DEBUG);
	}

	return false;
}

bool ccLog::WarningDebug(const QString& message)
{
	if (s_instance)
		s_instance->displayMessage(message, LOG_WARNING_DEBUG);

	return false;
}

bool cc


IMPLEMENT_CTOR_CALLBACK (Rhythmic_music_iterator);
/*
  This file is part of LilyPond, the GNU music typesetter.

  Copyright (C) 1997--2023 Han-Wen Nienhuys <hanwen@xs4all.nl>

  LilyPond 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.

  LilyPond 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 LilyPond.  If not, see <http://www.gnu.org/licenses/>.
*/

#include "rhythmic-head.hh"

#include "item.hh"
#include "rest.hh"
#include "staff-symbol-referencer.hh"
#include "stem.hh"
#include "warn.hh"

Item *
Rhythmic_head::get_dots (Grob *me)
{
  SCM s = get_object (me, "dot");
  return unsmob<Item> (s);
}

Item *
Rhythmic_head::get_stem (Grob *me)
{
  SCM s = get_object (me, "stem");
  return unsmob<Item> (s);
}

int
Rhythmic_head::dot_count (Grob *me)
{
  return get_dots (me) ? from_scm (get_property (get_dots (me), "dot-count"), 0)
                       : 0;
}

void
Rhythmic_head::set_dots (Grob *me, Item *dot)
{
  set_object (me, "dot", dot->self_scm ());
}

// TODO: shouldn't this be in note-head-interface?  It also
// declares duration-log in its properties.
int
Rhythmic_head::duration_log (Grob *me)
{
  SCM s = get_property (me, "duration-log");
  return scm_is_number (s) ? from_scm<int> (s) : 0;
}

ADD_INTERFACE (Rhythmic_head,
               R"(
Note head or rest.
               )",

               /* properties */
               R"(
dot
duration-log
glissando-skip
stem
               )");
/*
  This file is part of LilyPond, the GNU music typesetter.

  Copyright (C) 2020--2023 Daniel Eble <nine.fierce.ballads@gmail.com>

  LilyPond 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.

  LilyPond 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 LilyPond.  If not, see <http://www.gnu.org/licenses/>.
*/

#include "music-wrapper-iterator.hh"

#include "alternative-sequence-iterator.hh"
#include "context.hh"
#include "input.hh"
#include "lily-imports.hh"
#include "music.hh"

class Volta_specced_music_iterator final : public Music_wrapper_iterator
{
public:
  DECLARE_SCHEME_CALLBACK (constructor, ());
  Volta_specced_music_iterator () = default;

protected:
  SCM create_event (Direction d);
  void process (Moment) override;

private:
  Context_handle event_handler_;
  size_t volta_depth_ = 0;
  bool started_ = false;
  bool stopped_ = false;
};

SCM
Volta_specced_music_i


@RunWith(AndroidJUnit4::class)
class FileUploadInputDaoTest {

    private lateinit var db: AppDatabase
    private lateinit var fileUploadInputDao: FileUploadInputDao

    @Before
    fun setUp() {
        val context = ApplicationProvider.getApplicationContext<Context>()
        db = Room.inMemoryDatabaseBuilder(context, AppDatabase::class.java).build()
        fileUploadInputDao = db.fileUploadInputDao()
    }

    @After
    fun tearDown() {
        db.close()
    }

    @Test
    fun findCorrectEntityByWorkerId() = runTest {
        fileUploadInputDao.insert(FileUploadInputEntity(workerId = "2", action = "upload 2", filePaths = emptyList()))
        fileUploadInputDao.insert(FileUploadInputEntity(workerId = "1", action = "upload", filePaths = emptyList()))
        fileUploadInputDao.insert(FileUploadInputEntity(workerId = "3", action = "upload 3", filePaths = emptyList()))

        val result = fileUploadInputDao.findByWorkerId("1")

        Assert.assertEquals("upload", result!!.action)
    }
}/*
 * Copyright (C) 2023 - present Instructure, Inc.
 *
 *     This program is free software: you can redistribute it and/or modify
 *     it under the terms of the GNU General Public License as published by
 *     the Free Software Foundation, version 3 of the License.
 *
 *     This program is distributed in the hope that it will be useful,
 *     but WITHOUT ANY WARRANTY; without even the implied warranty of
 *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *     GNU 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 com.instructure.pandautils.room.offline.daos

import android.content.Context
import android.database.sqlite.SQLiteConstraintException
import androidx.room.Room
import androidx.test.core.app.ApplicationProvider
import androidx.test.ext.junit.runners.AndroidJUnit4
import com.instructure.canvasapi2.models.*
import com.instructure.pandautils.room.offline.OfflineDatabase
import com.instructure.pandautils.room.offline.entities.*
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.runBlocking
import kotlinx.coroutines.test.runTest
import org.junit.After
import org.junit.Assert
import org.junit.Before
import org.junit.Test
import org.junit.runner.RunWith

@RunWith(AndroidJUnit4::class)
class RubricCriterionDaoTest {

    private lateinit var db: OfflineDatabase
    private lateinit var rubricCriterionDao: RubricCriterionDao
    private lateinit var assignmentDao: AssignmentDao
    private lateinit var courseDao: CourseDao
    private lateinit var assignmentGroupDao: AssignmentGroupDao

    @Before
    fun setUp() {
        val context = ApplicationProvider.getApplicationContext<Context>()
        db = Room.inMemoryDatabaseBuilder(context, OfflineDatabase::class.java).build()
        rubricCriterionDao = db.rubricCriterionDao()
        assignmentDao = db.assignmentDao()
        courseDao = db.courseDao()
        assignmentGroupDao = db.assignmentGroupDao()

        runBlocking {
            courseDao.insert(CourseEntity(Course(1L)))
            assignmentGroupDao.insert(AssignmentGroupEntity(AssignmentGroup(1L), 1L))
            assignmentDao.insert(AssignmentEntity(Assignment(1L, assignmentGroupId = 1L), null, null, null, null))
        }
    }

    @After
    fun tearDown() {
        db.close()
    }

    @Test
    fun testFindById() = run


/*
 * Chinese AVS video (AVS1-P2, JiZhun profile) decoder.
 * Copyright (c) 2006  Stefan Gehrer <stefan.gehrer@gmx.de>
 *
 * This file is part of FFmpeg.
 *
 * FFmpeg is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * FFmpeg is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with FFmpeg; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
 */

#include "cavs.h"

const uint8_t ff_cavs_partition_flags[30] = {
  0,                                 //I_8X8
  0,                                 //P_SKIP
  0,                                 //P_16X16
                      SPLITH,        //P_16X8
                             SPLITV, //P_8X16
                      SPLITH|SPLITV, //P_8X8
                      SPLITH|SPLITV, //B_SKIP
                      SPLITH|SPLITV, //B_DIRECT
  0,                                 //B_FWD_16X16
  0,                                 //B_BWD_16X16
  0,                                 //B_SYM_16X16
  FWD0|FWD1          |SPLITH,
  FWD0|FWD1                 |SPLITV,
  BWD0|BWD1          |SPLITH,
  BWD0|BWD1                 |SPLITV,
  FWD0|BWD1          |SPLITH,
  FWD0|BWD1                 |SPLITV,
  BWD0|FWD1          |SPLITH,
  BWD0|FWD1                 |SPLITV,
  FWD0|FWD1     |SYM1|SPLITH,
  FWD0|FWD1     |SYM1       |SPLITV,
  BWD0|FWD1     |SYM1|SPLITH,
  BWD0|FWD1     |SYM1       |SPLITV,
  FWD0|FWD1|SYM0     |SPLITH,
  FWD0|FWD1|SYM0            |SPLITV,
  FWD0|BWD1|SYM0     |SPLITH,
  FWD0|BWD1|SYM0            |SPLITV,
  FWD0|FWD1|SYM0|SYM1|SPLITH,
  FWD0|FWD1|SYM0|SYM1       |SPLITV,
                      SPLITH|SPLITV, //B_8X8 = 29
};

const uint8_t ff_cavs_chroma_qp[64] = {
   0,  1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12, 13, 14, 15,
  16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
  32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 42, 43, 43, 44, 44,
  45, 45, 46, 46, 47, 47, 48, 48, 48, 49, 49, 49, 50, 50, 50, 51
};

/** mark block as "no prediction from this direction"
    e.g. forward motion vector in BWD partition */
const cavs_vector ff_cavs_dir_mv   = {0,0,1,REF_DIR};

/** mark block as using intra prediction */
const cavs_vector ff_cavs_intra_mv = {0,0,1,REF_INTRA};