, albedo.z);
    shader.setFloat(17, config.ior.clamp(0.0, 2.0));
    shader.setFloat(18, config.lightAttenuation.clamp(0.0, 1.0));
    shader.setFloat(19, ambientLight.x);
    shader.setFloat(20, ambientLight.y);
    shader.setFloat(21, ambientLight.z);
    shader.setFloat(22, config.ambientLightDepthFactor.clamp(0.0, 1.0));
    shader.setFloat(23, energy);

    canvas.drawRect(
      Rect.fromLTWH(0, 0, size.width, size.height),
      Paint()..shader = shader,
    );
  }

  @override
  bool shouldRepaint(covariant OrbShaderPainter oldDelegate) {
    return oldDelegate.shader != shader ||
        oldDelegate.config != config ||
        oldDelegate.time != time ||
        oldDelegate.mousePos != mousePos ||
        oldDelegate.energy != energy;
  }
}
// Copyright 2023 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

import 'dart:async';
import 'dart:math';
import 'dart:ui';

import 'package:flutter/material.dart';
import 'package:flutter_animate/flutter_animate.dart';
import 'package:provider/provider.dart';

import '../assets.dart';
import '../common/reactive_widget.dart';
import 'orb_shader_config.dart';
import 'orb_shader_painter.dart';

class OrbShaderWidget extends StatefulWidget {
  const OrbShaderWidget({
    super.key,
    required this.config,
    this.onUpdate,
    required this.mousePos,
    required this.minEnergy,
  });

  final double minEnergy;
  final OrbShaderConfig config;
  final Offset mousePos;
  final void Function(double energy)? onUpdate;

  @override
  State<OrbShaderWidget> createState() => OrbShaderWidgetState();
}

class OrbShaderWidgetState extends State<OrbShaderWidget>
    with SingleTickerProviderStateMixin {
  final _heartbeatSequence = TweenSequence([
    TweenSequenceItem(tween: ConstantTween(0), weight: 40),
    TweenSequenceItem(
      tween: Tween(
        begin: 0.0,
        end: 1.0,
      ).chain(CurveTween(curve: Curves.easeInOutCubic)),
      weight: 8,
    ),
    TweenSequenceItem(
      tween: Tween(
        begin: 1.0,
        end: 0.2,
      ).chain(CurveTween(curve: Curves.easeInOutCubic)),
      weight: 12,
    ),
    TweenSequenceItem(
      tween: Tween(
        begin: 0.2,
        end: 0.8,
      ).chain(CurveTween(curve: Curves.easeInOutCubic)),
      weight: 6,
    ),
    TweenSequenceItem(
      tween: Tween(
        begin: 0.8,
        end: 0.0,
      ).chain(CurveTween(curve: Curves.easeInOutCubic)),
      weight: 10,
    ),
  ]);

  late final _heartbeatAnim = AnimationController(
    vsync: this,
    duration: 3000.ms,
  )..repeat();

  @override
  Widget build(BuildContext context) => Consumer<FragmentPrograms?>(
    builder: (context, fragmentPrograms, _) {
      if (fragmentPrograms == null) return const SizedBox.expand();
      return ListenableBuilder(
        listenable: _heartbeatAnim,
        builder: (_, _) {
          final heartbeatEnergy = _heartbeatAnim
              .drive(_heartbeatSequence)
              .value;
          return TweenAnimationBuilder(
            tween: Tween<double>(
              begin: widget.minEnergy,
              end: widget.minEnergy,
            ),
            duration: 300.ms,
            curve: Curves.easeOutCubic,
            builder: (context, minEnergy, child) {
              return ReactiveWidget(
                builder: (context, time, s


te/exporter[name=ip]/template[id=1256]/flows-exported"
   local ip6_flows = "/snabbflow-state/exporter[name=ip]/template[id=1512]/flows-exported"
   local http4_flows = "/snabbflow-state/exporter[name=dnshttp]/template[id=257]/flows-exported"
   local dns4_flows = "/snabbflow-state/exporter[name=dnshttp]/template[id=258]/flows-exported"
   local http6_flows = "/snabbflow-state/exporter[name=dnshttp]/template[id=513]/flows-exported"
   local dns6_flows = "/snabbflow-state/exporter[name=dnshttp]/template[id=514]/flows-exported"

   local prev_ip4_flows = 0
   local function complete ()
      local ok, ret = pcall(function ()
         return get_counter(probe_pid, ip4_flows)
      end)
      if not ok then
         return false
      end
      if prev_ip4_flows > 0 and prev_ip4_flows == ret then
         return true
      else
         prev_ip4_flows = ret
         return false
      end
   end

   lib.waitfor2("exported flows", complete, 60, 2*1000000) -- 2s interval

   print("/snabbflow-state/exporter:")
   print_state(probe_pid, "/snabbflow-state/exporter")

   local function expect (counter, expected, tolerance)
      print(counter)
      print("expected:", expected, "+/-", math.floor(expected*tolerance))
      local actual = get_counter(probe_pid, counter)
      print("actual:", actual)
      local diff = math.abs(1-actual/expected)
      assert(diff <= tolerance, "Flows mismatch!")
   end

   expect(ip4_flows, 30000, 0.3)
   expect(ip6_flows, 1400, 0.2)
   expect(http4_flows, 200, 0.3)
   expect(dns4_flows, 1300, 0.3)
   expect(http6_flows, 10, 0.4)
   expect(dns6_flows, 700, 0.3)

   worker.stop('ipfix_probe')
end


_enablePullUp = false;
//      if (mounted) setState(() {});
//    });
//    Future.delayed(Duration(milliseconds: 6000), () {
//      _enablePullDown = true;
//      _enablePullUp = true;
//      if (mounted) setState(() {});
//    });

//    // for test #68 false-> true ->false
//    Future.delayed(Duration(milliseconds: 3000),(){
//      _enablePullDown = false;
//      _enablePullUp = true;
//    if(mounted)
//      setState(() {
//
//      });
//    });
//    Future.delayed(Duration(milliseconds: 6000),(){
//      _enablePullDown = true;
//      _enablePullUp = false;
//    if(mounted)
//      setState(() {
//
//      });
//    });
//    Future.delayed(Duration(milliseconds: 3000),(){
//      _enablePullDown = true;
//      _enablePullUp = false;
//    if(mounted)
//      setState(() {
//
//      });
//    });
//    Future.delayed(Duration(milliseconds: 6000),(){
//      _enablePullDown = true;
//      _enablePullUp = false;
//    if(mounted)
//      setState(() {
//
//      });
//    });
    _getDatas();
    _refreshController = RefreshController(
        initialRefresh: false, initialLoadStatus: LoadStatus.noMore);
    super.initState();
  }

  @override
  void dispose() {
    // TODO: implement dispose
    super.dispose();
  }

  @override
  void didChangeDependencies() {
    // TODO: implement didChangeDependencies
    super.didChangeDependencies();
  }

  @override
  Widget build(BuildContext context) {
    return RefreshConfiguration.copyAncestor(
      context: context,
      footerTriggerDistance: -80,
      maxUnderScrollExtent: 60,
      enableLoadingWhenNoData: true,
      child: SmartRefresher(
        enablePullUp: true,
        enablePullDown: true,
        controller: _refreshController,
        footer: ClassicFooter(
          height: 60,
          loadStyle: LoadStyle.ShowWhenLoading,
        ),
        header: TwoLevelHeader(
          twoLevelWidget: Center(
            child: Container(
              color: Colors.green,
              width: double.infinity,
              child: Text("twoLevel"),
              height: 60,
            ),
          ),
        ),
        onRefresh: () async {
          print("onRefresh");
          await Future.delayed(const Duration(milliseconds: 3000));
          data.add(Container(
            child: Card(),
            height: 100.0,
          ));
          if (mounted) setState(() {});
          _refreshController.refreshCompleted();
//        Future.delayed(const Duration(milliseconds: 2009)).then((val) {
//          data.add(Card());
//
//        });
        },
        child: CustomScrollView(
          slivers: <Widget>[
            SliverFillViewport(
                delegate: SliverChildListDelegate(
                    [data[0], data[1], Text("第一页"), Text("第一页")]))
          ],
          physics: PageScrollPhysics(),
        ),
        onLoading: () async {
          await Future.delayed(const Duration(milliseconds: 1000));
          print("onLoading");
          _refreshController.loadNoData();
        },
      ),
      dragSpeedRatio: 0.9,
    );
  }
}

class CirclePainter extends CustomClipper<Path> {
  final double offset;
  final bool up;

  CirclePainter({required this.offset, required this.up});

  @override
  Path getClip(Size size) {
    // TODO: implement getClip
    final path = Path();
    if (!up) path.moveTo(0.0, size.height);
    path.cubicTo(
        0.0,
        up ? 0.0 : size.height,
        size.width / 2,
        up ? offset * 2.3 : size.height - offset * 2


e name $i")
		}
	}

	@Test
	fun saveSchedules_newSection() {
		val schedules = (1..5).map {
			Schedule().apply {
				this.airDate = "2016-07-12"
				this.episode = it
				this.indexerId = INDEXER_ID
				this.season = 1
			}
		}

		this.realm.saveSchedules(NEW_SECTION, schedules)

		assertThat(this.getSchedules()).hasSize(41)
		assertThat(this.getSchedules(EXISTING_SECTION)).hasSize(8)
		assertThat(this.getSchedules(NEW_SECTION)).hasSize(5)

		for (i in 1..5) {
			this.validateSchedule(INDEXER_ID, i, 1, NEW_SECTION, "2016-07-12", "")
		}
	}

	@Test
	fun saveSchedules_newSection_empty() {
		this.realm.saveSchedules(NEW_SECTION, emptyList())

		assertThat(this.getSchedules()).hasSize(36)
		assertThat(this.getSchedules(EXISTING_SECTION)).hasSize(8)
		assertThat(this.getSchedules(NEW_SECTION)).isEmpty()
	}

	@Test
	fun saveSchedules_newSection_update() {
		// First we save some schedules
		this.saveSchedules_newSection()

		// Then we perform some updates
		val schedules = (1..5).map {
			Schedule().apply {
				this.episode = it
				this.episodeName = "Episode name $it"
				this.indexerId = INDEXER_ID
				this.season = 1
			}
		}

		this.realm.saveSchedules(NEW_SECTION, schedules)

		assertThat(this.getSchedules()).hasSize(41)
		assertThat(this.getSchedules(EXISTING_SECTION)).hasSize(8)
		assertThat(this.getSchedules(NEW_SECTION)).hasSize(5)

		for (i in 1..5) {
			this.validateSchedule(INDEXER_ID, i, 1, NEW_SECTION, "", "Episode name $i")
		}
	}

	private fun getSchedule(id: String) = this.realm.where(Schedule::class.java).equalTo("id", id).findFirst()

	private fun getSchedules() = this.realm.where(Schedule::class.java).findAll()

	private fun getSchedules(section: String) = this.realm.where(Schedule::class.java).equalTo("section", section).findAll()

	private fun validateSchedule(indexerId: Int, episodeNumber: Int, season: Int, section: String, airDate: String, episodeName: String) {
		val id = "${indexerId}_${season}_$episodeNumber"
		val schedule = this.getSchedule(id)

		assertThat(schedule).isNotNull()
		assertThat(schedule!!.airDate).isEqualTo(airDate)
		assertThat(schedule.episode).isEqualTo(episodeNumber)
		assertThat(schedule.episodeName).isEqualTo(episodeName)
		assertThat(schedule.id).isEqualTo(id)
		assertThat(schedule.indexerId).isEqualTo(indexerId)
		assertThat(schedule.season).isEqualTo(season)
		assertThat(schedule.section).isEqualTo(section)
	}

	companion object {
		private const val EXISTING_SECTION = "soon"
		private const val INDEXER_ID = 280494
		private const val NEW_SECTION = "Monday"
	}
}
package com.mgaetan89.showsrage.adapter

import android.os.Bundle
import android.support.v4.app.Fragment
import android.support.v4.app.FragmentManager
import android.support.v4.app.FragmentPagerAdapter
import com.mgaetan89.showsrage.Constants
import com.mgaetan


rt '../storage/profile/handlers.dart';
import '../storage/profile_provider.dart';

enum _InputFillCacheKey {
  habitEditTargetDays,
}

class AppCachesViewModel with ProfileHandlerLoadedMixin {
  AppCacheDelegate? _inputFill;

  void _updateInputFile(ProfileViewModel newProfile) {
    final handler = newProfile.getHandler<InputFillCacheProfileHandler>();
    _inputFill = handler != null ? AppCacheDelegate(handler: handler) : null;
  }

  @override
  void updateProfile(ProfileViewModel newProfile) {
    super.updateProfile(newProfile);
    _updateInputFile(newProfile);
  }

  int? get habitEditTargetDaysInputFill =>
      _inputFill?.getCache<int>(_InputFillCacheKey.habitEditTargetDays.name);

  Future<bool> updateHabitEditTargetDaysInputFill(int? newTargetDays) async {
    bool rst = false;
    await _inputFill?.updateCache<int>(
        _InputFillCacheKey.habitEditTargetDays.name, newTargetDays,
        onUpdated: (result, oldValue) => rst = result);
    return rst;
  }

  Future<List<bool>> clearAllCache() async {
    final List<bool> clearResultList = [];
    final List<Future> futures = [
      if (_inputFill != null) _inputFill!.clear(onClear: clearResultList.add),
    ];
    await Future.wait(futures);
    return clearResultList;
  }
}
// Copyright 2023 Fries_I23
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

import 'dart:collection';
import 'dart:math' as math;

import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';

import '../common/consts.dart';
import '../common/exceptions.dart';
import '../common/utils.dart';
import '../models/habit_date.dart';
import '../models/habit_detail_chart.dart';
import '../utils/habit_date.dart';
import 'utils.dart';

class HabitDetailFreqChartViewModel extends ChangeNotifier {
  late final UniqueKey _parentVersion;
  late final HabitDetailFreqChartCombine _chartCombine;
  late final SplayTreeMap<HabitDate, HabitDetailFreqChartData> _data;
  late final bool _reversedData;
  late bool _isFreqChartExpanded;
  int _offset = 0;
  bool _inited = false;
  AxisDirection? _cachedScrollDirection;
  // sync from settings
  int _firstday = defaultFirstDay;

  HabitDetailFreqChartViewModel();

  UniqueKey get parentVersion => _parentVersion;

  bool get isInited => _inited;

  HabitDetailFreqChartCombine get chartCombine => _chartCombine;

  bool get isChartExpanded => _isFreqChartExpanded;

  set isChartExpanded(bool newStatus) {
    if (newStatus != _isFreqChartExpanded) {
      _isFreqChartExpanded = newStatus;
      notifyListeners();
    }
  }

  int get offset => _offset;

  set offset(int newOffset) {
    if (kDebugMode) assert(newOffset >= 0);
    if (newOffset != _offset) {
      _cachedScrollDirection =
          newOffset > _offset ? AxisDirection.right : AxisDirection.left;
      _offset = math.max(0, newOffset);
      notifyListeners();
    }
  }

  int get firstday => _firstday;

  void updateFirstday(int newFirstDay) {
    final day = standardizeFirstDay(newFirstDay);
    if (kDebugMode && newFirstDay !=


xml");
			doc = xmlDocFromStream(fin, "minimal_race.xml");
			REQUIRE_NOTHROW(readMonstersFromXml(move(doc), scen));
			REQUIRE(scen.scen_monsters.size() >= 2);
			CHECK(scen.scen_monsters[1].abil[eMonstAbil::SUMMON].active);
			CHECK(scen.scen_monsters[1].abil[eMonstAbil::SUMMON].summon.type == eMonstSummon::SPECIES);
			CHECK(scen.scen_monsters[1].abil[eMonstAbil::SUMMON].summon.what == int(eRace::REPTILE));
			CHECK(scen.scen_monsters[1].abil[eMonstAbil::SUMMON].summon.min == 1);
			CHECK(scen.scen_monsters[1].abil[eMonstAbil::SUMMON].summon.max == 5);
			CHECK(scen.scen_monsters[1].abil[eMonstAbil::SUMMON].summon.len == 15);
			CHECK(scen.scen_monsters[1].abil[eMonstAbil::SUMMON].summon.chance == 500);
		}
	}
	SECTION("Special Abilities") {
		SECTION("With a bad ability type") {
			fin.open("files/monsters/abil_spec/bad_type.xml");
			doc = xmlDocFromStream(fin, "bad_type.xml");
			REQUIRE_THROWS_AS(readMonstersFromXml(move(doc), scen), xBadVal);
		}
		SECTION("With an invalid subtag") {
			fin.open("files/monsters/abil_spec/bad_node.xml");
			doc = xmlDocFromStream(fin, "bad_node.xml");
			REQUIRE_THROWS_AS(readMonstersFromXml(move(doc), scen), xBadNode);
		}
		SECTION("With too many parameters") {
			fin.open("files/monsters/abil_spec/too_many_params.xml");
			doc = xmlDocFromStream(fin, "too_many_params.xml");
			REQUIRE_THROWS_AS(readMonstersFromXml(move(doc), scen), xBadNode);
		}
		SECTION("With all parameters") {
			fin.open("files/monsters/abil_spec/minimal.xml");
			doc = xmlDocFromStream(fin, "minimal.xml");
			REQUIRE_NOTHROW(readMonstersFromXml(move(doc), scen));
			REQUIRE(scen.scen_monsters.size() >= 2);
			CHECK(scen.scen_monsters[1].abil[eMonstAbil::RAY_HEAT].active);
			CHECK(scen.scen_monsters[1].abil[eMonstAbil::RAY_HEAT].special.extra1 == 1);
			CHECK(scen.scen_monsters[1].abil[eMonstAbil::RAY_HEAT].special.extra2 == 2);
			CHECK(scen.scen_monsters[1].abil[eMonstAbil::RAY_HEAT].special.extra3 == 3);
		}
	}
}
//
//  view_dialogs.cpp
//  BoE
//
//  Created by Celtic Minstrel on 17-01-21.
//
//

#include "view_dialogs.hpp"

#include "dialogxml/dialogs/dialog.hpp"
#include "dialogxml/widgets/pict.hpp"
#include "dialogxml/widgets/button.hpp"
#include "dialogxml/widgets/led.hpp"

#include "scenario/item.hpp"
#include "universe/creature.hpp"
#include "scenario/scenario.hpp"
#include "utility.hpp"

void put_item_info(cDialog& me, const cItem& s_i, const cScenario& scen) {
	std::string desc_str;


      await bus.StopAsync();
        }

        [Test]
        [Explicit]
        public async Task Should_start_and_stop_sync()
        {
            var queueUri = new Uri("rabbitmq://localhost/test/input_queue2");

            var rabbitMqHostSettings = queueUri.GetHostSettings();
            var receiveSettings = queueUri.GetReceiveSettings();

            var bus = Bus.Factory.CreateUsingRabbitMq(sbc =>
            {
                BusTestFixture.ConfigureBusDiagnostics(sbc);

                sbc.Host(rabbitMqHostSettings);
                sbc.ReceiveEndpoint(receiveSettings.QueueName, ep =>
                {
                });
            });

            bus.Start();
            await bus.Publish(new DummyMessage { ID = 1 }).ConfigureAwait(false);
            bus.Stop();
        }

        class DummyMessage
        {
            public int ID { get; set; }
        }
    }
}


n:first-child{border-top:none}[dir=rtl] .esri-zoom.esri-zoom--horizontal .esri-widget--button:last-child{border-left:1px solid #6e6e6e4d}@keyframes esri-fade-in-down{0%{opacity:0;transform:translateY(-5px)}25%{opacity:0;transform:translateY(-5px)}to{opacity:1;transform:translate(0,0)}}@keyframes esri-fade-in-up{0%{opacity:0;transform:translateY(5px)}25%{opacity:0;transform:translateY(5px)}to{opacity:1;transform:translate(0,0)}}@keyframes esri-fade-in-scale{0%{opacity:0;transform:scale(.95)}to{opacity:1;transform:scale(1)}}@keyframes looping-progresss-bar-ani{0%{width:0;left:0}20%{width:20%;left:0}80%{width:20%;left:80%}to{width:0;left:100%}}@keyframes esri-rotate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes panel-advance{0%{opacity:0;transform:translate(50px)scale(.99)}to{opacity:1;transform:translate(0,0)scale(1)}}@keyframes panel-retreat{0%{opacity:0;transform:translate(-50px)scale(.99)}to{opacity:1;transform:translate(0,0)scale(1)}}@keyframes panel-advance--rtl{0%{opacity:0;transform:translate(-50px)scale(.99)}to{opacity:1;transform:translate(0,0)scale(1)}}@keyframes panel-retreat--rtl{0%{opacity:0;transform:translate(50px)scale(.99)}to{opacity:1;transform:translate(0,0)scale(1)}}@import "./variables";

// Colors
$white: #f3f3f3;
$gray-200: #ebebeb;
$gray-300: #dee2e6;
$gray-500: #adb5bd;
$gray-600: #666;
$gray-700: #333;
$gray-800: #202020;
$gray-900: #111;
$black: #000;

$blue: #375a7f;
$red: #e74c3c;
$yellow: #f39c12;
$green: #00bc8c;
$cyan: #3498db;

$primary: $green;
$secondary: $gray-600;
$success: $green;
$dark: $gray-300;

$body-color: $gray-200;
$body-bg: $black;
$link-color: $success;
$border-color: rgba($body-color, 0.25);
$mark-bg: $gray-900;
$mark-bg-dark: $gray-900;
$text-muted: $gray-600;
$yiq-contrasted-threshold: 175;

$font-family-sans-serif:
  "Lato",
  -apple-system,
  BlinkMacSystemFont,
  "Segoe UI",
  Roboto,
  "Helvetica Neue",
  Arial,
  sans-serif,
  "Apple Color Emoji",
  "Segoe UI Emoji",
  "Segoe UI Symbol";
$font-size-base: 1rem;
$h1-font-size: 3rem;
$h2-font-size: 2.5rem;
$h3-font-size: 2rem;

$card-cap-bg: $gray-900;
$card-bg: $gray-900;
$card-color: $gray-300;

$navbar-padding-y: 1rem;
$navbar-dark-color: rgba($white, 0.6);
$navbar-dark-hover-color: $white;
$navbar-light-color: rgba($white, 0.6);
$navbar-light-hover-color: $white;
$navbar-light-active-color: $white;
$navbar-light-toggler-border-color: rgba($gray-900, 0.1);
$navbar-light-brand-color: $white;
$navbar-light-brand-hover-color: $navbar-light-brand-color;

$nav-link-padding-x: 2rem;
$nav-link-disabled-


@ios@@QBEHXZ=\"C:\\Windows\\SysWOW64\\msvcirt.?rdstate@ios@@QBEHXZ\"")
#pragma comment(linker, "/export:?read@istream@@QAEAAV1@PACH@Z=\"C:\\Windows\\SysWOW64\\msvcirt.?read@istream@@QAEAAV1@PACH@Z\"")
#pragma comment(linker, "/export:?read@istream@@QAEAAV1@PADH@Z=\"C:\\Windows\\SysWOW64\\msvcirt.?read@istream@@QAEAAV1@PADH@Z\"")
#pragma comment(linker, "/export:?read@istream@@QAEAAV1@PAEH@Z=\"C:\\Windows\\SysWOW64\\msvcirt.?read@istream@@QAEAAV1@PAEH@Z\"")
#pragma comment(linker, "/export:?sbumpc@streambuf@@QAEHXZ=\"C:\\Windows\\SysWOW64\\msvcirt.?sbumpc@streambuf@@QAEHXZ\"")
#pragma comment(linker, "/export:?seekg@istream@@QAEAAV1@J@Z=\"C:\\Windows\\SysWOW64\\msvcirt.?seekg@istream@@QAEAAV1@J@Z\"")
#pragma comment(linker, "/export:?seekg@istream@@QAEAAV1@JW4seek_dir@ios@@@Z=\"C:\\Windows\\SysWOW64\\msvcirt.?seekg@istream@@QAEAAV1@JW4seek_dir@ios@@@Z\"")
#pragma comment(linker, "/export:?seekoff@filebuf@@UAEJJW4seek_dir@ios@@H@Z=\"C:\\Windows\\SysWOW64\\msvcirt.?seekoff@filebuf@@UAEJJW4seek_dir@ios@@H@Z\"")
#pragma comment(linker, "/export:?seekoff@stdiobuf@@UAEJJW4seek_dir@ios@@H@Z=\"C:\\Windows\\SysWOW64\\msvcirt.?seekoff@stdiobuf@@UAEJJW4seek_dir@ios@@H@Z\"")
#pragma comment(linker, "/export:?seekoff@streambuf@@UAEJJW4seek_dir@ios@@H@Z=\"C:\\Windows\\SysWOW64\\msvcirt.?seekoff@streambuf@@UAEJJW4seek_dir@ios@@H@Z\"")
#pragma comment(linker, "/export:?seekoff@strstreambuf@@UAEJJW4seek_dir@ios@@H@Z=\"C:\\Windows\\SysWOW64\\msvcirt.?seekoff@strstreambuf@@UAEJJW4seek_dir@ios@@H@Z\"")
#pragma comment(linker, "/export:?seekp@ostream@@QAEAAV1@J@Z=\"C:\\Windows\\SysWOW64\\msvcirt.?seekp@ostream@@QAEAAV1@J@Z\"")
#pragma comment(linker, "/export:?seekp@ostream@@QAEAAV1@JW4seek_dir@ios@@@Z=\"C:\\Windows\\SysWOW64\\msvcirt.?seekp@ostream@@QAEAAV1@JW4seek_dir@ios@@@Z\"")
#pragma comment(linker, "/export:?seekpos@streambuf@@UAEJJH@Z=\"C:\\Windows\\SysWOW64\\msvcirt.?seekpos@streambuf@@UAEJJH@Z\"")
#pragma comment(linker, "/export:?setb@streambuf@@IAEXPAD0H@Z=\"C:\\Windows\\SysWOW64\\msvcirt.?setb@streambuf@@IAEXPAD0H@Z\"")
#pragma comment(linker, "/export:?setbuf@filebuf@@UAEPAVstreambuf@@PADH@Z=\"C:\\Windows\\SysWOW64\\msvcirt.?setbuf@filebuf@@UAEPAVstreambuf@@PADH@Z\"")
#pragma comment(linker, "/export:?setbuf@fstream@@QAEPAVstreambuf@


/*
 * various simple utilities for libavformat
 * Copyright (c) 2000, 2001, 2002 Fabrice Bellard
 *
 * 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 "avformat.h"
#include "internal.h"

#define ISLEAP(y) (((y) % 4 == 0) && (((y) % 100) != 0 || ((y) % 400) == 0))
#define LEAPS_COUNT(y) ((y)/4 - (y)/100 + (y)/400)

/* This is our own gmtime_r. It differs from its POSIX counterpart in a
   couple of places, though. */
struct tm *ff_brktimegm(time_t secs, struct tm *tm)
{
    int days, y, ny, m;
    int md[] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };

    days = secs / 86400;
    secs %= 86400;
    tm->tm_hour = secs / 3600;
    tm->tm_min = (secs % 3600) / 60;
    tm->tm_sec =  secs % 60;

    /* oh well, may be someone some day will invent a formula for this stuff */
    y = 1970; /* start "guessing" */
    while (days > 365) {
        ny = (y + days/366);
        days -= (ny - y) * 365 + LEAPS_COUNT(ny - 1) - LEAPS_COUNT(y - 1);
        y = ny;
    }
    if (days==365 && !ISLEAP(y)) { days=0; y++; }
    md[1] = ISLEAP(y)?29:28;
    for (m=0; days >= md[m]; m++)
         days -= md[m];

    tm->tm_year = y;  /* unlike gmtime_r we store complete year here */
    tm->tm_mon = m+1; /* unlike gmtime_r tm_mon is from 1 to 12 */
    tm->tm_mday = days+1;

    return tm;
}


 "Alice is nice"), (bob, "Bob is great")]
> HashMap.lookup alice users
Just "Alice is nice"
> HashMap.lookup bob users
Just "Bob is great"
```
リストをバイナリサーチする
==========================

ソート済みのリストからバイナリサーチで要素を探すには`binary-search`パッケージの`Numeric.Search.Range.searchFromTo`を使うとよいでしょう。

`searchFromTo`は、第一引数で与えた条件を満たす最小の値を返します。

```haskell
-- binary-search
> import Numeric.Search.Range
> xs = [8, 13, 20, 21, 25, 35, 35, 47, 50, 51]
> searchFromTo (\i -> xs !! i >= 35) 0 (length xs - 1)
Just 5
> xs !! 5
35
> xs !! 4
25
```

リストはランダムアクセスの効率がよくありません。
要素数が多い場合や実行パフォーマンスが重要な場合は、他のコレクションを検討しましょう。

`vector`パッケージの`Data.Vector`は定数時間でランダムアクセスできるデータ構造を提供します。
これを使って上のものと同様のコードを書くとこのようになります。

```haskell
-- vector
> import qualified Data.Vector as Vector
-- binary-search
> import Numeric.Search.Range
> ys = Vector.fromList [8, 13, 20, 21, 25, 35, 35, 47, 50, 51]
> searchFromTo (\i -> ys ! i >= 35) (minIndex ys) (maxIndex ys)
Just 5
> ys ! 5
35
> ys ! 4
25
```
文字コードを変換する
====================

UTF-8以外でエンコードされたテキストデータを扱いたい場合は，``ByteString``で読み込んでからコード変換して使います．

```
      (1)            (2)            (3)        (4)        (5)            (6)            (7)
Input --> ByteString --> ByteString -->  Text  -->  Text  --> ByteString --> ByteString --> Output
                                          ↓         ↑
                                        String --> String
```

- (1) ``ByteString``として入力
- (2) 文字コードをUNICODEに変換
- (3) ``ByteString``を文字列(``Text``)に変換
- (4) テキスト処理
- (5) 文字列(``Text``)を``ByteString``に変換
- (6) 文字コードをUNICODEから変換
- (7) ``ByteString``として出力

文字列処理で文字列を``String``で表現したい場合は``unpack :: Text -> String``および``pack :: String -> Text``を使うといいでしょう．

## インポート

```haskell
import Data.ByteString as BS  -- bytestring パッケージが提供
import Data.Text as T         -- text パッケージが提供
import Data.Text.ICU.Convert  -- text-icu パッケージが提供
import System.IO
```

## テキストデータの入力

```
inputWithEnc :: String -> (Handle -> IO Text)
inputWithEnc enc hdl = toUnicode <$> open enc Nothing <*> BS.hGetContents hdl
```

## テキストデータの出力

```
outputWithEnc :: String -> (Handle -> Text -> IO ())
outputWithEnc enc hdl txt = open enc Nothing >>= BS.hPu


v5, v1, v255, v3
// CHECK: [0x05,0x00,0xec,0xd1,0x01,0xff,0x0f,0x04]

v_mad_i16 v5, v1, s2, v3
// CHECK: [0x05,0x00,0xec,0xd1,0x01,0x05,0x0c,0x04]

v_mad_i16 v5, v1, s101, v3
// CHECK: [0x05,0x00,0xec,0xd1,0x01,0xcb,0x0c,0x04]

v_mad_i16 v5, v1, flat_scratch_lo, v3
// CHECK: [0x05,0x00,0xec,0xd1,0x01,0xcd,0x0c,0x04]

v_mad_i16 v5, v1, flat_scratch_hi, v3
// CHECK: [0x05,0x00,0xec,0xd1,0x01,0xcf,0x0c,0x04]

v_mad_i16 v5, v1, vcc_lo, v3
// CHECK: [0x05,0x00,0xec,0xd1,0x01,0xd5,0x0c,0x04]

v_mad_i16 v5, v1, vcc_hi, v3
// CHECK: [0x05,0x00,0xec,0xd1,0x01,0xd7,0x0c,0x04]

v_mad_i16 v5, v1, tba_lo, v3
// CHECK: [0x05,0x00,0xec,0xd1,0x01,0xd9,0x0c,0x04]

v_mad_i16 v5, v1, tba_hi, v3
// CHECK: [0x05,0x00,0xec,0xd1,0x01,0xdb,0x0c,0x04]

v_mad_i16 v5, v1, tma_lo, v3
// CHECK: [0x05,0x00,0xec,0xd1,0x01,0xdd,0x0c,0x04]

v_mad_i16 v5, v1, tma_hi, v3
// CHECK: [0x05,0x00,0xec,0xd1,0x01,0xdf,0x0c,0x04]

v_mad_i16 v5, v1, ttmp11, v3
// CHECK: [0x05,0x00,0xec,0xd1,0x01,0xf7,0x0c,0x04]

v_mad_i16 v5, v1, m0, v3
// CHECK: [0x05,0x00,0xec,0xd1,0x01,0xf9,0x0c,0x04]

v_mad_i16 v5, v1, exec_lo, v3
// CHECK: [0x05,0x00,0xec,0xd1,0x01,0xfd,0x0c,0x04]

v_mad_i16 v5, v1, exec_hi, v3
// CHECK: [0x05,0x00,0xec,0xd1,0x01,0xff,0x0c,0x04]

v_mad_i16 v5, v1, 0, v3
// CHECK: [0x05,0x00,0xec,0xd1,0x01,0x01,0x0d,0x04]

v_mad_i16 v5, v1, -1, v3
// CHECK: [0x05,0x00,0xec,0xd1,0x01,0x83,0x0d,0x04]

v_mad_i16 v5, v1, src_vccz, v3
// CHE


;
                    }
                }
                @Override
                public void changedUpdate(DocumentEvent e) {
                    if(TCari.getText().length()>2){
                        tampil();
                    }
                }
            });
        }
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        internalFrame1 = new widget.InternalFrame();
        Scroll = new widget.ScrollPane();
        tbSpesialis = new widget.Table();
        jPanel3 = new javax.swing.JPanel();
        panelGlass8 = new widget.panelisi();
        BtnSimpan = new widget.Button();
        BtnBatal = new widget.Button();
        BtnHapus = new widget.Button();
        BtnEdit = new widget.Button();
        BtnKeluar = new widget.Button();
        panelGlass9 = new widget.panelisi();
        jLabel6 = new widget.Label();
        TCari = new widget.TextBox();
        BtnCari = new widget.Button();
        BtnAll = new widget.Button();
        jLabel7 = new widget.Label();
        LCount = new widget.Label();
        panelGlass7 = new widget.panelisi();
        jLabel3 = new widget.Label();
        jLabel4 = new widget.Label();
        KodeSampel = new widget.TextBox();
        NamaSampel = new widget.TextBox();
        BakuMutu = new widget.TextBox();
        jLabel5 = new widget.Label();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        setUndecorated(true);
        setResizable(false);
        addWindowListener(new java.awt.event.WindowAdapter() {
            public void windowOpened(java.awt.event.WindowEvent evt) {
                formWindowOpened(evt);
            }
        });

        internalFrame1.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(240, 245, 235)), "::[ Master Sampel & Baku Mutu Laboratorium Kesehatan Lingkungan ]::", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 0, 11), new java.awt.Color(50, 50, 50))); // NOI18N
        internalFrame1.setName("internalFrame1"); // NOI18N
        internalFrame1.setLayout(new java.awt.BorderLayout(1, 1));

        Scroll.setName("Scroll"); // NOI18N
        Scroll.setOpaque(true);

        tbSpesialis.setAutoCreateRowSorter(true);
        tbSpesialis.setToolTipText("Silahkan klik untuk memilih data yang mau diedit ataupun dihapus");
        tbSpesialis.setName("tbSpesialis"); // NOI18N
        tbSpesialis.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                tbSpesialisMouseClicked(evt);
            }
        });
        tbSpesialis.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyPressed(java.awt.event.KeyEvent evt) {
                tbSpesialisKeyPressed(evt);
            }
        });
        Scroll.setViewportView(tbSpesialis);

        internalFrame1.add(Scroll, java.awt.BorderLayout.CENTER);

        jPanel3.setName("jPanel3"); // NOI18N
        j


 can fail if widget was not added to status bar yet.
// Caller can check it, by analyzing return value
internal fun showMessage(project: Project, header: String, message: String): Boolean {
  val sb = getIdeStatusBar(project) ?: return false
  val widget = sb.getWidget(ProjectorStatusWidget.ID) ?: return false

  if (widget is ProjectorStatusWidget) {
    val gotItMessage = GotItMessage.createMessage(header, message).setDisposable(widget)

    gotItMessage.show(
      object : PositionTracker<Balloon>(widget.component) {
        override fun recalculateLocation(baloon: Balloon) = RelativePoint.getCenterOf(widget.component)
      },
      Balloon.Position.above,
    )

  }

  return true
}

class HelloMessage(private val project: Project) {
  private val alarm = Alarm()
  private val installStateKeeper = ProjectorInstallStateKeeper.getInstance()

  private val isRequired: Boolean
    get() = isFirstRun() && longTimeSinceLastHello()

  private fun isFirstRun() = installStateKeeper.isFirstRun

  private fun longTimeSinceLastHello() = installStateKeeper.sinceLastHello() >
                                         ProjectorInstallStateKeeper.FULL_DAY

  fun sayHelloIfRequired() {
    if (isRequired) {
      alarm.addRequest({ show() }, 1000)
      installStateKeeper.setLastHelloTime()
    }
  }

  private fun show() {
    val shown = showMessage(project, "Hello!",
                            "To start using the Projector plugin,\nclick the widget below")

    if (!shown) {
      alarm.addRequest({ show() }, 1000)
    }
  }
}
/*
 * Copyright (c) 2019-2023, JetBrains s.r.o. 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. JetBrains designates this
 * particular file as subject to the "Classpath" exception as provided
 * by Oracle in the LICENSE file that accompanied this code.
 *
 * This code is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
 * version 2 for more details (a copy is included in the LICENSE file that
 * accompanied this code).
 *
 * You should have received a copy of the GNU General Public License version
 * 2 along with this work; if not, write to the Free Software Foundation,
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
 *
 * Please contact JetBrains, Na Hrebenech II 1718/10, Prague, 14000, Czech Republic
 * if you need additional information or have any questions.
 */

package org.jetbrains.projector.plugin.ui

import com.intellij.icons.AllIcons
import com.intellij.openapi.options.ShowSettingsUtil
import com.intellij.openapi.project.Project
import com.intellij.openapi.project.ProjectManager
import com.intellij.openapi.ui.DialogWrapper
import com.intellij.ui.layout.*
import org.jetbrains.projector.plugin.ProjectorService
import org.jetbrains.projector.plugin.ProjectorSettingsConfigurable
import org.jetbrains.projector.plugin.isConnectionSettingsEditable
import org.jetbrains.projector.server.util.*
import org.jetbrains.projector.server.util.getHostsList
import java.awt.Toolkit
import java.awt.datatransfer.StringSelection
import javax.swing.*

class SessionDialog(project: Project?) : DialogWrapper(project) {
  private val description = JLabel()
  private val myHostsList: HostsList = HostsList("Host:", ProjectorService.host)
  private val urlHostsList = HostsList("URL: ", "")
  pr


anuallyExcludeApps(
            listOf(
                "test1",
                "test2",
                "test3",
            ),
        )

        verify(exclusionListDao).insertIntoManualAppExclusionList(
            listOf(
                NetPManuallyExcludedApp(packageId = "test1", isProtected = false),
                NetPManuallyExcludedApp(packageId = "test2", isProtected = false),
                NetPManuallyExcludedApp(packageId = "test3", isProtected = false),
            ),
        )
    }

    @Test
    fun whenManuallyEnableAppThenDelegateToNetPExclusionListDao() {
        testee.manuallyEnableApp("test")

        verify(exclusionListDao).insertIntoManualAppExclusionList(NetPManuallyExcludedApp(packageId = "test", isProtected = true))
    }

    @Test
    fun whenRestoreDefaultProtectedListThenDelegateToNetPExclusionListDao() {
        testee.restoreDefaultProtectedList()

        verify(exclusionListDao).deleteManualAppExclusionList()
    }

    companion object {
        private val MANUAL_EXCLUSION_LIST = listOf(
            NetPManuallyExcludedApp("com.example.app1", true),
            NetPManuallyExcludedApp("com.example.app2", false),
            NetPManuallyExcludedApp("com.example.app3", false),
        )
    }
}
/*
 * Copyright (c) 2023 DuckDuckGo
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.duckduckgo.networkprotection.store.db

import androidx.room.Dao
import androidx.room.Insert
import androidx.room.OnConflictStrategy
import androidx.room.Query
import kotlinx.coroutines.flow.Flow

@Dao
interface NetPGeoswitchingDao {
    @Query("SELECT * from netp_geoswitching_location")
    fun getLocations(): List<NetPGeoswitchingLocation>

    @Query("SELECT * from netp_geoswitching_location")
    fun getLocationsFlow(): Flow<List<NetPGeoswitchingLocation>>

    @Insert(onConflict = OnConflictStrategy.REPLACE)
    fun insertIntoLocations(locations: List<NetPGeoswitchingLocation>)

    @Query("DELETE from netp_geoswitching_location")
    fun deleteLocations()
}
/*
 * Copyright (c) 2024 DuckDuckGo
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.duckduckgo.survey.api

interface SurveyParameterManager {
    /**
     * Builds the survey url, resolving the values for the ALL the required query parameters
     *
     * @return resolved survey url or `null` if not all query parameters can be provided
     */
    suspend fun buildSurveyUrlStrict(baseUrl: String, requestedQueryParams: List<String>): String?

    /**
     * Builds the


function getAttribute(node, name) {
	for (var i = 0; i < node.attributes.length; i++) {
		var attribute = node.attributes[i];
		if (attribute.nodeName === name) {
			return attribute;
		}
	}
	return null;
}

function CharacterBuffer(characters) {
	this.characters = characters;
	this.current = 0;
	this.end = this.characters.length;
}

CharacterBuffer.prototype.skipAtMostOneLeadingNewline = function() {
	if (this.characters[this.current] === '\n')
		this.current++;
};

CharacterBuffer.prototype.skipLeadingWhitespace = function() {
	while (isWhitespace(this.characters[this.current])) {
		if (++this.current == this.end)
			return;
	}
};

CharacterBuffer.prototype.skipLeadingNonWhitespace = function() {
	while (!isWhitespace(this.characters[this.current])) {
		if (++this.current == this.end)
			return;
	}
};

CharacterBuffer.prototype.takeRemaining = function() {
	return this.characters.substring(this.current);
};

CharacterBuffer.prototype.takeLeadingWhitespace = function() {
	var start = this.current;
	this.skipLeadingWhitespace();
	if (start === this.current)
		return "";
	return this.characters.substring(start, this.current - start);
};

Object.defineProperty(CharacterBuffer.prototype, 'length', {
	get: function(){
		return this.end - this.current;
	}
});
function TreeBuilder() {
	this.tokenizer = null;
	this.errorHandler = null;
	this.scriptingEnabled = false;
	this.document = null;
	this.head = null;
	this.form = null;
	this.openElements = new ElementStack();
	this.activeFormattingElements = [];
	this.insertionMode = null;
	this.insertionModeName = "";
	this.originalInsertionMode = "";
	this.inQuirksMode = false; // TODO quirks mode
	this.compatMode = "no quirks";
	this.framesetOk = true;
	this.redirectAttachToFosterParent = false;
	this.selfClosingFlagAcknowledged = false;
	this.context = "";
	this.pendingTableCharacters = [];
	this.shouldSkipLeadingNewline = false;

	var tree = this;
	var modes = this.insertionModes = {};
	modes.base = {
		end_tag_handlers: {"-default": 'endTagOther'},
		start_tag_handlers: {"-default": 'startTagOther'},
		processEOF: function() {
			tree.generateImpliedEndTags();
			if (tree.openElements.length > 2) {
				tree.parseError('expected-closing-tag-but-got-eof');
			} else if (tree.openElements.length == 2 &&
				tree.openElements.item(1).localName != 'body') {
				tree.parseError('expected-closing-tag-but-got-eof');
			} else if (tree.context && tree.openElements.length > 1) {
			}
		},
		processComment: function(data) {
			tree.insertComment(data, tree.currentStackItem().node);
		},
		processDoctype: function(name, publicId, systemId, forceQuirks) {
			tree.parseError('unexpected-doctype');
		},
		processStartTag: function(name, attributes, selfClosing) {
			if (this[this.start_tag_handlers[name]]) {
				this[this.start_tag_handlers[name]](name, attributes, selfClosing);
			} else if (this[this.start_tag_handlers["-default"]]) {
				this[this.start_tag_handlers["-default"]](name, attri


CK(chain);
retry:
	gencnt = chain->gencnt;
	/* Estimate memory amount */
	LIST_FOREACH(n, &chain->nat, _next) {
		nat_cnt++;
		len += sizeof(struct cfg_nat);
		LIST_FOREACH(r, &n->redir_chain, _next) {
			len += sizeof(struct cfg_redir);
			LIST_FOREACH(s, &r->spool_chain, _next)
				len += sizeof(struct cfg_spool);
		}
	}
	IPFW_RUNLOCK(chain);

	data = malloc(len, M_TEMP, M_WAITOK | M_ZERO);
	bcopy(&nat_cnt, data, sizeof(nat_cnt));

	nat_cnt = 0;
	len = sizeof(nat_cnt);

	IPFW_RLOCK(chain);
	if (gencnt != chain->gencnt) {
		free(data, M_TEMP);
		goto retry;
	}
	/* Serialize all the data. */
	LIST_FOREACH(n, &chain->nat, _next) {
		bcopy(n, &data[len], sizeof(struct cfg_nat));
		len += sizeof(struct cfg_nat);
		LIST_FOREACH(r, &n->redir_chain, _next) {
			bcopy(r, &data[len], sizeof(struct cfg_redir));
			len += sizeof(struct cfg_redir);
			LIST_FOREACH(s, &r->spool_chain, _next) {
				bcopy(s, &data[len], sizeof(struct cfg_spool));
				len += sizeof(struct cfg_spool);
			}
		}
	}
	IPFW_RUNLOCK(chain);

	error = sooptcopyout(sopt, data, len);
	free(data, M_TEMP);

	return (error);
}

static int
ipfw_nat_get_log(struct sockopt *sopt)
{
	uint8_t *data;
	struct cfg_nat *ptr;
	int i, size;
	struct ip_fw_chain *chain;

	chain = &V_layer3_chain;

	IPFW_RLOCK(chain);
	/* one pass to count, one to copy the data */
	i = 0;
	LIST_FOREACH(ptr, &chain->nat, _next) {
		if (ptr->lib->logDesc == NULL)
			continue;
		i++;
	}
	size = i * (LIBALIAS_BUF_SIZE + sizeof(int));
	data = malloc(size, M_IPFW, M_NOWAIT | M_ZERO);
	if (data == NULL) {
		IPFW_RUNLOCK(chain);
		return (ENOSPC);
	}
	i = 0;
	LIST_FOREACH(ptr, &chain->nat, _next) {
		if (ptr->lib->logDesc == NULL)
			continue;
		bcopy(&ptr->id, &data[i], sizeof(int));
		i += sizeof(int);
		bcopy(ptr->lib->logDesc, &data[i], LIBALIAS_BUF_SIZE);
		i += LIBALIAS_BUF_SIZE;
	}
	IPFW_RUNLOCK(chain);
	sooptcopyout(sopt, data, size);
	free(data, M_IPFW);
	return(0);
}

static void
ipfw_nat_init(void)
{

	IPFW_WLOCK(&V_layer3_chain);
	/* init ipfw hooks */
	ipfw_nat_ptr = ipfw_nat;
	lookup_nat_ptr = lookup_nat;
	ipfw_nat_cfg_ptr = ipfw_nat_cfg;
	ipfw_nat_del_ptr = ipfw_nat_del;
	ipfw_nat_get_cfg_ptr = ipfw_nat_get_cfg;
	ipfw_nat_get_log_ptr = ipfw_nat_get_log;
	IPFW_WUNLOCK(&V_layer3_chain);
	V_ifaddr_event_tag = EVENTHANDLER_REGISTER(
	    ifaddr_event, ifaddr_change,
	    NULL, EVENTHANDLER_PRI_ANY);
}

static void
ipfw_nat_destroy(void)
{
	struct cfg_nat *ptr, *ptr_temp;
	struct ip_fw_chain *chain;

	chain = &V_layer3_chain;
	IPFW_WLOCK(chain);
	LIST_FOREACH_SAFE(ptr, &chain->nat, _next, ptr_temp) {
		LIST_REMOVE(ptr, _next);
		del_redir_spool_cfg(ptr, &ptr->redir_chain);
		LibAliasUninit(ptr->lib);
		free(ptr, M_IPFW);
	}
	EVENTHANDLER_DEREGISTER(ifaddr_event, V_ifaddr_event_tag);
	flush_nat_ptrs(chain, -1 /* flush all */);
	/* deregister ipfw_nat */
	ipfw_nat_ptr = NULL;
	lookup_nat_ptr = NULL;
	ipfw_nat_cfg_ptr = NULL;
	ipfw_nat_del_ptr = NULL;
	ipfw_nat_get_cfg_ptr = NULL;
	ipfw_nat_get_log_ptr = NULL;
	IPFW_WUNLOCK(chain);
}

static int
ipfw_nat_modevent(module_t mod, int type, void *unused)
{
	int err = 0;

	switch (type) {
	case MOD_LOAD:
		ipfw_nat_init();
		break;

	case MOD_UNLOAD:
		ipfw_nat_destroy();
		break;

	default:
		return EOPNOTSUPP;
		break;
	}
	return err;
}

static moduledata_t ipfw_nat_mod = {
	"ipfw_nat",
	ipfw_nat_modevent,
	0
};

DECLARE_MODULE(ipfw_nat, ipfw_nat_mod, SI_SUB_PROTO_IFATTACHDOMAIN, SI_ORDER_ANY);
MODULE_DEPEND(ipfw_nat, libalias, 1, 1, 1);
MODULE_DEPEND(ipfw_nat, ipfw, 2, 2, 2);
MODULE_VERSION(ipfw_nat, 1);
/* end of file */


hwSkin );
				break;
			}
			if ( !success )
			{
				bBadBoneWeights = true;
			}
		}
	}

	if ( bBadBoneWeights )
	{
		mstudiomodel_t* pModel = pMesh->pModel();
		ConMsg( "Bad data found in model \"%s\" (bad bone weights)\n", pModel->pszName() );
	}

	for (i = 0; i < pStripGroup->numIndices; ++i)
	{
		meshBuilder.Index( *pStripGroup->pIndex(i) );
		meshBuilder.AdvanceIndex();
	}

	meshBuilder.End();

	// Copy over the strip indices. We need access to the indices for decals
	pMeshGroup->m_pIndices = new unsigned short[ pStripGroup->numIndices ];
	memcpy( pMeshGroup->m_pIndices, pStripGroup->pIndex(0),
		pStripGroup->numIndices * sizeof(unsigned short) );

	// Compute the number of non-degenerate trianges in each strip group
	// for statistics gathering
	pMeshGroup->m_pUniqueTris = new int[ pStripGroup->numStrips ];
	for (i = 0; i < pStripGroup->numStrips; ++i )
	{
		int numUnique = 0;
		if (pStripGroup->pStrip(i)->flags & OptimizedModel::STRIP_IS_TRISTRIP)
		{
			int last[2] = {-1, -1};
			int curr = pStripGroup->pStrip(i)->indexOffset;
			int end = curr + pStripGroup->pStrip(i)->numIndices;
			while (curr != end)
			{
				int idx = *pStripGroup->pIndex(curr);
				if (idx != last[0] && idx != last[1] && last[0] != last[1] && last[0] != -1)
					++numUnique;
				last[0] = last[1];
				last[1] = idx;
				++curr;
			}
		}
		else
		{
			numUnique = pStripGroup->pStrip(i)->numIndices / 3;
		}
		pMeshGroup->m_pUniqueTris[i] = numUnique;
	}
}

//-----------------------------------------------------------------------------
// Builds the group
//-----------------------------------------------------------------------------
void CStudioRenderContext::R_StudioBuildMorph( studiohdr_t *pStudioHdr,
	studiomeshgroup_t* pMeshGroup, mstudiomesh_t* pMesh,
	OptimizedModel::StripGroupHeader_t *pStripGroup )
{
	if ( !g_pMaterialSystemHardwareConfig->HasFastVertexTextures() ||
		( ( pMeshGroup->m_Flags & MESHGROUP_IS_DELTA_FLEXED ) == 0 ) ||
		( ( pStripGroup->flags & OptimizedModel::STRIPGROUP_SUPPRESS_HW_MORPH ) != 0 ) )
	{
		pMeshGroup->m_pMorph = NULL;
		return;
	}

	// Build an inverse mapping from mesh index to strip group index
	unsigned short *pMeshIndexToGroupIndex = (unsigned short*)_alloca( pMesh->pModel()->numvertices * sizeof(unsigned short) );
	memset( pMeshIndexToGroupIndex, 0xFF, pMesh->pModel()->numvertices * sizeof(unsigned short) );
	for ( int i = 0; i < pStripGroup->numVerts; ++i )
	{
		int nMeshVert = pStripGroup->pVertex(i)->origMeshVertID;
		pMeshIndexToGroupIndex[ nMeshVert ] = (unsigned short)i;
	}

	CMatRenderContextPtr pRenderContext( g_pMaterialSystem );
	MorphFormat_t morphType = MORPH_POSITION | MORPH_NORMAL | MORPH_SPEED | MORPH_SIDE;
	for ( int i = 0; i < pMesh->numflexes; ++i )
	{
		if ( pMesh->pFlex( i )->vertanimtype == STUDIO_VERT_ANIM_WRINKLE )
		{
			morphType |= MORPH_WRINKLE;
			break;
		}


 Find more symbols here: http://quantconnect.com/data
            var equity = AddEquity(_spy, Resolution.Minute);
            _holdings = equity.Holdings;
            _rc = RC(_spy, 30, 2, Resolution.Daily);

            var stockPlot = new Chart("Trade Plot");
            stockPlot.AddSeries(new Series("Buy", SeriesType.Scatter, 0));
            stockPlot.AddSeries(new Series("Sell", SeriesType.Scatter, 0));
            stockPlot.AddSeries(new Series("UpperChannel", SeriesType.Line, 0));
            stockPlot.AddSeries(new Series("LowerChannel", SeriesType.Line, 0));
            stockPlot.AddSeries(new Series("Regression", SeriesType.Line, 0));
            AddChart(stockPlot);
        }

        /// <summary>
        /// OnData event is the primary entry point for your algorithm. Each new data point will be pumped in here.
        /// </summary>
        /// <param name="data">Slice object keyed by symbol containing the stock data</param>
        public void OnData(TradeBars data)
        {
            if (!_rc.IsReady || !data.ContainsKey(_spy)) return;
            var value = data[_spy].Value;

            if (_holdings.Quantity <= 0 && value < _rc.LowerChannel)
            {
                SetHoldings(_spy, 1);
                Plot("Trade Plot", "Buy", value);
            }

            if (_holdings.Quantity >= 0 && value > _rc.UpperChannel)
            {
                SetHoldings(_spy, -1);
                Plot("Trade Plot", "Sell", value);
            }
        }

        public override void OnEndOfDay(Symbol symbol)
        {
            if (symbol == _spy)
            {
                Plot("Trade Plot", "UpperChannel", _rc.UpperChannel);
                Plot("Trade Plot", "LowerChannel", _rc.LowerChannel);
                Plot("Trade Plot", "Regression", _rc.LinearRegression);
            }
        }
    }
}


.word	.LC1
	.word	.LC0
	.word	.LC7
	UNWIND(.fnend)
	.size	FSP_ConfigInstance, .-FSP_ConfigInstance
	.align	2
	.global	FSP_ConfigFrameBuf
	.type	FSP_ConfigFrameBuf, %function
FSP_ConfigFrameBuf:
	UNWIND(.fnstart)
	@ args = 0, pretend = 0, frame = 872
	@ frame_needed = 1, uses_anonymous_args = 0
	UNWIND(.movsp ip)
	mov	ip, sp
	stmfd	sp!, {r4, r5, r6, r7, r8, r9, r10, fp, ip, lr, pc}
	UNWIND(.pad #4)
	UNWIND(.save {r4, r5, r6, r7, r8, r9, r10, fp, ip, lr})
	UNWIND(.setfp fp, ip, #-4)
	sub	fp, ip, #4
	UNWIND(.pad #900)
	sub	sp, sp, #900
	mov	r8, r2
	ldr	r2, .L229
	mov	r5, r0
	mov	r6, r1
	sub	r0, fp, #856
	mov	r1, #0
	str	r3, [fp, #-908]
	ldr	ip, [r2, #48]
	mov	r2, #812
	blx	ip
	cmp	r5, #15
	bhi	.L217
	ldr	r3, .L229+4
	ldr	r4, [r3, r5, asl #2]
	cmp	r4, #0
	beq	.L218
	ldr	r7, .L229+8
	ldr	r0, [r7, r5, asl #2]
	add	r3, r0, #229376
	ldr	r9, [r3, #720]
	cmp	r9, #0
	beq	.L219
	ldr	ip, [r4, #44]
	ldr	lr, [r4, #48]
	mul	r1, lr, ip
.L163:
	ldr	r2, [r0, #144]
	ldr	r3, [r0, #148]
	mul	r9, r3, r2
	cmp	r9, r1
	blt	.L220
	ldr	r3, [r0, #1388]
	ldrsb	r9, [r4, #40]
	cmp	r3, #1
	add	r3, r0, #225280
	beq	.L221
.L166:
	ldr	r2, [r3, #3276]
	ldr	r1, .L229+12
	cmp	r9, r2
	ldr	ip, [r1, #48]
	movne	r2, #1
	moveq	r2, #0
	str	r2, [r3, #3296]
	ldrsb	r2, [r4, #40]
	cmp	ip, #0
	str	r2, [r3, #3276]
	beq	.L170
	ldr	r3, [r4, #48]
	sub	lr, fp, #856
	ldr	r2, [r4, #44]
	mov	r0, r6
	str	lr, [sp, #16]
	mov	r6, #40
	str	r5, [sp, #12]
	mov	r1, r8
	ldrsb	lr, [r4, #39]
	str	r6, [sp, #4]
	ldr	r8, .L229+8
	str	lr, [sp, #8]
	ldrsb	lr, [r4, #43]
	str	lr, [sp]
	blx	ip
	ldr	r3, [


)i(1994,68)deu(2062,68)pil(2130,68)seung(2198,68)/(2266,68)jeon(2334,68)gun(2402,68)
[2481,827]编(2481,165)曲(2646,165)：(2811,165)ra(2976,165)do(3141,165)
[3308,827]Synthesizer (3308,206)Performed：(3514,206)ra(3720,206)do(3926,206)
[4135,827]Bass (4135,206)Performed：(4341,206)ra(4547,206)do(4753,206)
[4962,827]Drums (4962,206)Performed：(5168,206)ra(5374,206)do(5580,206)
[5789,827]Background (5789,165)Vocals：(5954,165)gim(6119,165)bo(6284,165)a(6449,165)
[6616,827]Recording (6616,91)Engineer：(6707,91)jeong(6798,91)eun(6889,91)gyeong(6980,91) (7071,91)at (7162,91)Ingrid (7253,91)Studio(7344,91)
[7443,827]Mixing (7443,31)Engineer：(7474,31)go(7505,31)hyeon(7536,31)jeong(7567,31) ((7598,31)Assist. (7629,31)gim(7660,31)gyeong(7691,31)hwan(7722,31), (7753,31)gim(7784,31)jun(7815,31)sang(7846,31), (7877,31)jeon(7908,31)jin(7939,31), (7970,31)jeong(8001,31)gi(8032,31)un(8063,31)) (8094,31)at (8125,31)Koko (8156,31)Sound (8187,31)Studio(8218,31)

[99999999,9999999]***Lyrics are from third-parties***(99999999,2000)
"/>
</LyricInfo>
</QrcInfos>
""";

final advancedLyric = """[ti:If I Didn't Love You]
[ar:Jason Aldean/Carrie Underwood]
[al:If I Didn't Love You]
[by:]
[offset:0]
[457,2039]If (457,177)I (634,182)Didn't (816,210)Love (1026,183)You - (1209,207)Jason (1416,217)Aldean/(1633,208)Carrie (1841,230)Underwood(2071,425)
[11155,1697]I (11155,161)wouldn't (11316,223)mind (11539,345)being (11884,423)alone(12307,545)
[13684,2128]I (13684,159)wouldn't (13843,272)keep (14115,345)checking (14460,330)my (14790,318)phone(15108,704)
[16292,1712]Wouldn't (16292,192)take (16484,287)the (16771,216)long (16987,384)way (17371,153)home(17524,480)
[18004,2560]Just (18004,192)to (18196,193)drive (18389,367)myself (18756,608)crazy(19364,1200)
[21532,1744]I (21532,177)wouldn't (21709,255)be (21964,296)losing (22260,608)sleep(22868,408)
[24243,1856]Remembering (24243,665)everything(24908,1191)
[26575,1856]Everything (26575,681)you (27256,199)said (27455,344)to (27799,169)me(27968,463)


d1,d3
	yresfactor	d2,d4
	add.w		x_factor,d3
	add.w		y_factor,d4
	subq		#1,d3
	subq		#1,d4
	lea		BOXDATA,a6
	move.w	d1,box_x1(a6)
	move.w	d2,box_y1(a6)
	move.w	d3,box_x2(a6)
	move.w	d4,box_y2(a6)
	addq		#1,d1
	addq		#1,d2
	subq		#1,d3
	subq		#1,d4
	move.w	IFACE_COLOURS+2*iface_metal,d0
	or.b		gensol,d0
	bsr		DRAW_PHYS_BLOCK
Dedge_metal
	move.w	box_x1(a6),d1
	move.w	box_x2(a6),d2
	move.w	box_y1(a6),d3
	subq		#1,d2
	move.w	#iface_dmetal,d0
	bsr		horizontal_menuline
	move.w	box_x2(a6),d1
	move.w	box_y1(a6),d2
	move.w	box_x2(a6),d3
	move.w	box_y2(a6),d4
	addq		#1,d2
	move.w	#iface_lmetal,d0
	bsr		DRAW_MENU_LINE
	move.w	box_x2(a6),d1
	move.w	box_x1(a6),d2
	move.w	box_y2(a6),d3
	addq		#1,d2
	move.w	#iface_lmetal,d0
	bsr		horizontal_menuline
	move.w	box_x1(a6),d1
	move.w	box_y2(a6),d2
	move.w	box_x1(a6),d3
	move.w	box_y1(a6),d4
	subq		#1,d2
	move.w	#iface_dmetal,d0
	bsr		DRAW_MENU_LINE
	move.w	box_x1(a6),d1
	move.w	box_y2(a6),d2
	move.w	#iface_metal,d0
	bsr		DRAW_MENU_DOT
	move.w	box_x2(a6),d1
	move.w	box_y1(a6),d2
	move.w	#iface_metal,d0
	bsr		DRAW_MENU_DOT
	popall
	rts

*-----------------------------------------------------------------------*
*	Gold bars										*
*-----------------------------------------------------------------------*

Raised_edge_gold:
;	d1,d2		x1,y1
;	d3,d4		x2,y2
	pushall
	xresfactor	d1,d3
	yresfactor	d2,d4
	add.w		x_factor,d3
	add.w		y_factor,d4
	subq		#1,d3
	subq		#1,d4
	lea		BOXDATA,a6
	move.w	d1,box_x1(a6)
	move.w	d2,box_y1(a6)
	move.w	d3,box_x2(a6)
	move.w	d4,box_y2


 self.should_apply_rule_1(&result) {
            result = self.apply_rule_1(result);
        }

        // 应用规则2：输出生命周期
        if self.should_apply_rule_2(&result) {
            result = self.apply_rule_2(result);
        }

        // 应用规则3：方法生命周期
        if self.should_apply_rule_3(&result) {
            result = self.apply_rule_3(result);
        }

        result
    }

    fn should_apply_rule_1(&self, sig: &FunctionSignature) -> bool {
        // 形式化条件：存在引用参数但没有显式生命周期
        sig.parameters.iter().any(|p| p.is_reference() && p.lifetime.is_none())
    }

    fn should_apply_rule_2(&self, sig: &FunctionSignature) -> bool {
        // 形式化条件：只有一个输入生命周期参数
        sig.input_lifetimes.len() == 1
    }

    fn should_apply_rule_3(&self, sig: &FunctionSignature) -> bool {
        // 形式化条件：是方法且有self参数
        sig.is_method() && sig.has_self_parameter()
    }
}
```

### 2.2 省略规则的类型论表示

```rust
// 生命周期省略的类型论表示
pub struct LifetimeElisionTypeTheory {
    pub context: TypeContext,
    pub rules: Vec<ElisionRule>,
}

// 省略规则的类型论定义
pub struct ElisionRule {
    pub name: String,
    pub premise: TypeJudgment,      // 前提条件
    pub conclusion: TypeJudgment,   // 结论
    pub proof: Proof,              // 证明
}

// 类型判断的形式化
pub struct TypeJudgment {
    pub context: TypeContext,
    pub expression: Expression,
    pub lifetime: Lifetime,
}

// 省略规则的证明
pub struct Proof {
    pub steps: Vec<ProofStep>,
    pub validity: ProofValidity,
}

impl Proof {
    pub fn validate(&self) -> bool {
        // 验证证明的正确性
        self.steps.iter().all(|step| step.is_valid()) &&
        self.validity == ProofValidity::Valid
    }
}
```

---

## 📐 数学证明

### 3.1 省略规则的正确性证明

#### 3.1.1 规则1正确性证明

**定理**: 输入生命周期省略规则保持类型安全

**证明**:

```text
1. 假设：函数f有引用参数r₁, r�


e();
  return 0;
}
void Sys_Error (char *error, ...)
{
    va_list     argptr;
    //char        string[1024];
    printf("Error: ");
    va_start (argptr,error);
    vprintf (error,argptr);
    va_end (argptr);
    while(1);

}
unsigned int I_GetTimeMicrosecs(void)
{
    return TICK_TIMER->CNT * (1000000.0f / TICK_TIMER_FREQUENCY_HZ);
}
float Sys_FloatTime(void)
{
  return TIME_TIMER->CNT * (1.0f / TIME_TIMER_FREQUENCY_HZ);
}

// -----------------------------------------------------------------------------
//                          Static Function Definitions
// -----------------------------------------------------------------------------


面には、指紋にも似た流線が刻まれ
纏う者を光無き闇に閉じ込める

地下深くで生まれた者たちは
これを与えられ、夜の剣士となる

夜の鎧 [5090100]

冷たい深黒の胴鎧
その表面には、指紋にも似た流線が刻まれ
纏う者を光無き闇に閉じ込める

地下深くで生まれた者たちは
これを与えられ、夜の剣士となる

夜の手甲 [5090200]

冷たい深黒の手甲
その表面には、指紋にも似た流線が刻まれ
纏う者を光無き闇に閉じ込める

地下深くで生まれた者たちは
これを与えられ、夜の剣士となる

夜の足甲 [5090300]

冷たい深黒の足甲
その表面には、指紋にも似た流線が刻まれ
纏う者を光無き闇に閉じ込める

地下深くで生まれた者たちは
これを与えられ、夜の剣士となる

エーゴンの兜 [5100000]

寄せ集めの鎧片に
ボロボロのラッパ帽を被ったもの
壊れた竜の戦士、エーゴンの兜

みすぼらしい戦場漁りは
竜餐により誇りを得たのだ

エーゴンの鎧 [5100100]

寄せ集めの鎧片に
汚らしい荷物を背負ったもの
壊れた竜の戦士、エーゴンの胴鎧

みすぼらしい戦場漁りは
竜餐により誇りを得たのだ

エーゴンの手甲 [5100200]

壊れた竜の戦士、エーゴンの手甲
どこか戦場の死体から剥ぎ取った
不揃いの鎧片

エーゴンの腰布 [5100300]

壊れた竜の戦士、エーゴンの腰布
どこか戦場の死体から剥ぎ取った
悪臭のする布きれ

エーゴンの兜（軽装） [5101000]

寄せ集めの鎧片を
ボロ布で補ったもの
壊れた竜の戦士、エーゴンの兜

みすぼらしい戦場漁りは
竜餐により誇りを得たのだ

エーゴンの鎧（軽装） [5101100]

寄せ集めの鎧片を


, ctrl.dualInit, ctrl.standardInitShift );
    if( ctrl.time && commRank == 0 )
        Output("Init time: ",timer.Stop()," secs");

    Real relError = 1;
    DistMatrix<Real> J(grid),     d(grid),
                     rc(grid),    rb(grid),    rh(grid),    rmu(grid),
                     dxAff(grid), dyAff(grid), dzAff(grid), dsAff(grid),
                     dx(grid),    dy(grid),    dz(grid),    ds(grid);
    dsAff.AlignWith( s );
    dzAff.AlignWith( s );
    ds.AlignWith( s );
    dz.AlignWith( s );
    rmu.AlignWith( s );
    DistMatrix<Real> dSub(grid);
    DistPermutation p(grid);
    DistMatrix<Real> dxError(grid), dyError(grid), dzError(grid);
    dzError.AlignWith( s );
    const Int indent = PushIndent();
    for( Int numIts=0; numIts<=ctrl.maxIts; ++numIts )
    {
        // Ensure that s and z are in the cone
        // ===================================
        const Int sNumNonPos = pos_orth::NumOutside( s );
        const Int zNumNonPos = pos_orth::NumOutside( z );
        if( sNumNonPos > 0 || zNumNonPos > 0 )
            LogicError
            (sNumNonPos," entries of s were nonpositive and ",
             zNumNonPos," entries of z were nonpositive");

        // Compute the duality measure
        // ===========================
        const Real mu = Dot(s,z) / k;

        // Check for convergence
        // =====================
        // |primal - dual| / (1 + |primal|) <= tol ?
        // -----------------------------------------
        Zeros( d, n, 1 );
        Hemv( LOWER, Real(1), Q, x, Real(0), d );
        const Real xTQx = Dot(x,d);
        const Real primObj =  xTQx/2 + Dot(c,x);
        const Real dualObj = -xTQx/2 - Dot(b,y) - Dot(h,z);
        const Real objConv = Abs(primObj-dualObj) / (1+Abs(primObj));
        // || r_b ||_2 / (1 + || b ||_2) <= tol ?
        // --------------------------------------
        rb = b; rb *= -1;
        Gemv( NORMAL, Real(1), A, x, Real(1), rb );
        const Real rbNrm2 = Nrm2( rb );
        const Real rbConv = rbNrm2 / (1+bNrm2);
        // || r_c ||_2 / (1 + || c ||_2) <= tol ?
        // --------------------------------------
        rc = c;
        Hemv( LOWER,     Real(1), Q, x, Real(1), rc );
        Gemv( TRANSPOSE, Real(1), A, y, Real(1), rc );
        Gemv( TRANSPOSE, Real(1), G, z, Real(1), rc );
        const Real rcNrm2 = Nrm2( rc );
        const Real rcConv = rcNrm2 / (1+cNrm2);
        // || r_h ||_2 / (1 + || h ||_2) <= tol
        // ------------------------------------
        rh = h; rh *= -1;
        Gemv( NORMAL, Real(1), G, x, Real(1), rh );
        rh += s;
        const Real rhNrm2 = Nrm2( rh );
        const Real rhConv = rhNrm2 / (1+hNrm2);
        // Now check the pieces
        // --------------------
        relError = Max(Max(Max(objConv,rbConv),rcConv),rhConv);
        if( ctrl.print )
        {
            const Real xNrm2 = Nrm2( x );
            const Real yNrm2 = Nrm2( y );
            const Real zNrm2 = Nrm2( z );
            const Real sNrm2 = Nrm2( s );
            if( commRank == 0 )


elper()

			valsRuntime, err := vals.New(vals.Options{CacheSize: 32})
			if err != nil {
				t.Errorf("unexpected error creating vals runtime: %v", err)
			}

			files := map[string]string{
				"/path/to/helmfile.yaml": `
environments:
  development: {}
  shared: {}
---
releases:
- name: logging
  chart: incubator/raw
  namespace: kube-system
- name: kubernetes-external-secrets
  chart: incubator/raw
  namespace: kube-system
  needs:
  - kube-system/logging
- name: external-secrets
  chart: incubator/raw
  namespace: default
  labels:
    app: test
  needs:
  - kube-system/kubernetes-external-secrets
- name: my-release
  chart: incubator/raw
  namespace: default
  labels:
    app: test
  needs:
  - default/external-secrets
# Disabled releases are treated as missing
- name: disabled
  chart: incubator/raw
  namespace: kube-system
  installed: false
- name: test2
  chart: incubator/raw
  needs:
  - kube-system/disabled
- name: test3
  chart: incubator/raw
  needs:
  - test2
- name: test4
  chart: incubator/raw
  needs:
  - test2
  - test3
`,
			}

			app := appWithFs(&App{
				OverrideHelmBinary:  DefaultHelmBinary,
				fs:                  ffs.DefaultFileSystem(),
				OverrideKubeContext: "default",
				Env:                 tc.environment,
				Logger:              logger,
				valsRuntime:         valsRuntime,
			}, files)

			expectNoCallsToHelm(app)

			if tc.ns != "" {
				app.Namespace = tc.ns
			}

			if tc.selectors != nil {
				app.Selectors = tc.selectors
			}

			var dagErr error
			out, err := testutil.CaptureStdout(func() {
				dagErr = app.PrintDAGState(cfg)
			})
			assert.NoError(t, err)

			var gotErr string
			if dagErr != nil {
				gotErr = dagErr.Error()
			}

			if d := cmp.Diff(tc.error, gotErr); d != "" {
				t.Fatalf("unexpected error: want (-), got (+): %s", d)
			}

			assert.Equal(t, tc.expected, out)
		})

		testhelper.RequireLog(t, "dag_test", bs)
	}

	t.Run("DAG lists dependencies in order", func(t *testing.T) {
		check(t, testcase{
			environment: "default",
			expected: `GROUP RELEASE                                         DEPENDENCIES
1     default/kube-system/logging
1     default/kube-system/disabled
2     default/kube-system/kubernetes-external-secrets default/kube-system/logging
2     default//test2                                  default/kube-system/disabled
3     default/default/external-secrets                default/kube-system/kubernetes-external-secrets
3     default//test3                                  default//test2
4     default/default/my-release                      default/default/external-secrets
4     default//test4                                  default//test2, default//test3
`,
		}, cfg)
	})
}

func TestDAG(t *testing.T) {
	t.Run("DAG", func(t *testing.T) {
		testDAG(t, configImpl{})
	})
}
package


OutputScale by upSampleShader.uniform1f("outputScale", radius)

        for (level in (levels - 2) downTo 0) {
            val groupsX = ((width shr level) + 7) / 8
            val groupsY = ((height shr level) + 7) / 8
            val task = addTask(upSampleShader, Vec3i(groupsX, groupsY, 1))
            val input = if (level == levels - 2) downSampleTex else bloomMap
            val inputSampler = SamplerSettings().clamped().copy(baseMipLevel = level + 1, numMipLevels = 1)
            val inputTexelSize = Vec2f(1f / (width shr (level + 1)), 1f / (height shr (level + 1)))
            val key = "$level"

            task.onBeforeDispatch {
                upSampleShader.createdPipeline?.swapPipelineDataCapturing(key) {
                    sampleInput.set(input, inputSampler)
                    upSampled.set(bloomMap, level)
                    if (!inPlace) {
                        downSampled.set(downSampleTex, level)
                    }
                    uInputTexelSize = inputTexelSize
                    uRadius = radius
                    uOutputScale = if (level == 0) strength / levels else 1f
                }
            }
        }
    }

    private fun downSamplingShader() = KslComputeShader("down-sample-shader") {
        computeStage(8, 8) {
            val sampleInput = texture2d("sampleInput")
            val downSampled = storageTexture2d<KslFloat3>("downSampled", TexFormat.RG11B10_F)
            val threshold = uniformFloat4("threshold")
            val inputTexelSize = uniformFloat2("inputTexelSize")

            main {
                val texelCoord = int2Var(inGlobalInvocationId.xy.toInt2())

                val sampleUv = float2Var((texelCoord.toFloat2() + 0.5f.const) * inputTexelSize * 2f.const)
                val u = sampleUv.x
                val v = sampleUv.y
                val rx = inputTexelSize.x
                val ry = inputTexelSize.y
                val rx2 = float1Var(inputTexelSize.x * 2f.const)
                val ry2 = float1Var(inputTexelSize.y * 2f.const)

                val a = float3Var(sampleInput.sample(float2Value(u - rx2, v + ry2), 0f.const).rgb)
                val b = float3Var(sampleInput.sample(float2Value(u, v + ry2), 0f.const).rgb)
                val c = float3Var(sampleInput.sample(float2Value(u + rx2, v + ry2), 0f.const).rgb)

                val d = float3Var(sampleInput.sample(float2Value(u - rx2, v), 0f.const).rgb)
                val e = float3Var(sampleInput.sample(float2Value(u, v), 0f.const).rgb)
                val f = float3Var(sampleInput.sample(float2Value(u + rx2, v), 0f.const).rgb)

                val g = float3Var(sampleInput.sample(float2Value(u - rx2, v - ry2), 0f.const).rgb)
                val h = float3Var(sampleInput.sample(float2Value(u, v - ry2), 0f.const).rgb)
                val i = float3Var(sampleInput.sample(float2Value(u + rx2, v - ry2), 0f.const).rgb)

                val j = float3Var(sampleInput.sample(float2Value(u - rx, v + ry), 0f.const).rgb)
                val k = float3Var(sampleInput.sample(float2Value(u + rx, v + ry), 0f.const).rgb)
                val l = float3Var(sampleInput.sample(float2Value(u - rx, v - ry), 0f.const).rgb)
                val m = float3Var(sampleInput.sample(float2Value(u + rx, v - ry), 0f.const).rgb)

                val weightedAvg = float3Var(e * 0.125f.const)
                weightedAvg += (j + k + l + m) * 0.125.const
                weightedAvg += (b + d + f + h) * 0.0625.const
                weightedAvg


.split(split)
  text = Array.isArray(text) ? text : [text]
  let res = await textpro(effect, ...text)
  if (typeof res == 'number') throw res == -1 ? `Efek *${effect}* tidak ditemukan` : `Gunakan format ${usedPrefix}${command} ${effect} ${new Array(res).fill('text').map((v, i) => v + (i ? i + 1 : '')).join('|')}`
  let result = await axios.get(res, {
    responseType: 'arraybuffer'
  })
  await conn.sendFile(m.chat, result.data, 'textpro.jpg', `*TEXTPRO*\n*Effect:* ${effect}`, m)
}
handler.help = ['textpro'].map(v => v + ' <effect> <text>|<text2?>|<text3?>')
handler.tags = ['tools']
handler.command = /^(textpro)$/i

module.exports = handler

const formData = require('form-data')
const fetch = require('node-fetch')
const cheerio = require('cheerio')
var effects = [
  {
    "title": "3d-deep-sea-metal",
    "url": "https://textpro.me/create-3d-deep-sea-metal-text-effect-online-1053.html"
  },
  {
    "title": "Free-country-flag-3D--generator",
    "url": "https://textpro.me/free-online-country-flag-3d-text-effect-generator-1052.html"
  },
  {
    "title": "American-flag-3D",
    "url": "https://textpro.me/create-american-flag-3d-text-effect-online-1051.html"
  },
  {
    "title": "3D-sci-fi",
    "url": "https://textpro.me/create-3d-sci-fi-text-effect-online-1050.html"
  },
  {
    "title": "3D-rainbow-color-calligraphy",
    "url": "https://textpro.me/3d-rainbow-color-calligraphy-text-effect-1049.html"
  },
  {
    "title": "3D-water-pipe",
    "url": "https://textpro.me/create-3d-water-pipe-text-effects-online-1048.html"
  },
  {
    "title": "Halloween-skeleton",
    "url": "https://textpro.me/create-halloween-skeleton-text-effect-online-1047.html"
  },
  {
    "title": "a-spooky-Halloween",
    "url": "https://textpro.me/create-a-spooky-halloween-text-effect-online-1046.html"
  },
  {
    "title": "a-cinematic-horror",
    "url": "https://textpro.me/create-a-cinematic-horror-text-effect-1045.html"
  },
  {
    "title": "a-sketch",
    "url": "https://textpro.me/create-a-sketch-text-effect-online-1044.html"
  },
  {
    "title": "blue-circuit-style",
    "url": "https://textpro.me/create-blue-circuit-style-text-effect-online-1043.html"
  },
  {
    "title": "space",
    "url": "https://textpro.me/create-space-text-effects-online-free-1042.html"
  },
  {
    "title": "a-metallic",
    "url": "https://textpro.me/create-a-metallic-text-effect-free-online-1041.html"
  },
  {
    "title": "Creat-glossy-metalic",
    "url": "https://textpro.me/creat-glossy-metalic-text-effect-free-online-1040.html"
  },
  {
    "title": "a-Captain-America",


sk4a" / "metadata" / "audio_durations.tsv"
    )
    audio_durations = {audio_id: audio_durations[audio_id] for audio_id in ground_truth}

    # 5-fold cross validation split
    n_folds = 5
    all_keys = scores.keys()
    shuffled_keys = sorted(all_keys)
    np.random.RandomState(0).shuffle(shuffled_keys)
    split_idx = np.linspace(0, len(shuffled_keys), n_folds + 1).astype(int).tolist()
    folds = [set(shuffled_keys[split_idx[i] : split_idx[i + 1]]) for i in range(n_folds)]

    # cross validation
    csebbs_predictors, sed_scores, detections = csebbs.cross_validation(
        scores=scores,
        ground_truth=ground_truth,
        audio_durations=audio_durations,
        folds=folds,
        step_filter_lengths=(0.32, 0.48, 0.64),
        merge_thresholds_abs=(0.15, 0.2, 0.3),
        merge_thresholds_rel=(1.5, 2.0, 3.0),
        selection_fn=csebbs.select_best_psds_and_cbf,
        return_sed_scores=True,
    )

    # evaluate PSDS performance
    psds, single_class_psds, *_ = intersection_based.psds(
        scores=sed_scores["psds"],
        ground_truth=ground_truth,
        audio_durations=audio_durations,
        dtc_threshold=0.7,
        gtc_threshold=0.7,
        alpha_ct=0.0,
        alpha_st=1.0,
        unit_of_time="hour",
        max_efpr=100.0,
    )
    # comment assert as evaluating reduced set (20 files) only
    # assert abs(psds - 0.6340242849210951) < 1e-6, psds  # result from paper

    # evaluate collar-based F1-score performance
    f, *_ = collar_based.fscore(
        scores=detections["cbf"],
        ground_truth=ground_truth,
        threshold=0.5,  # can be any number between 0 and 1 here as the sed_scores obtained from detection are binary
        onset_collar=0.2,
        offset_collar=0.2,
        offset_collar_rate=0.2,
    )
    # comment assert as evaluating reduced set (20 files) only
    # assert abs(f['macro_average'] - 0.6721148195872252) < 1e-6, f['macro_average']  # result from paper


from flask import Flask
from flask_sqlalchemy import SQLAlchemy
from flask_migrate import Migrate
from flask_bcrypt import Bcrypt
from flask_login import LoginManager

db = SQLAlchemy()
migrate = Migrate()
bcrypt = Bcrypt()
login_manager = LoginManager()

def create_app():
    app = Flask(__name__)
    app.config.from_object('config.Config')

    db.init_app(app)
    migrate.init_app(app, db)
    bcrypt.init_app(app)
    login_manager.init_app(app)

    from app.routes import bp as routes_bp
    app.register_blueprint(routes_bp)

    return app


ba;--bs-highlight-bg: #fdebd0;--bs-border-width: 1px;--bs-border-style: solid;--bs-border-color: #dededf;--bs-border-color-translucent: rgba(0, 0, 0, 0.175);--bs-border-radius: 0.375rem;--bs-border-radius-sm: 0.25rem;--bs-border-radius-lg: 0.5rem;--bs-border-radius-xl: 1rem;--bs-border-radius-xxl: 2rem;--bs-border-radius-2xl: var(--bs-border-radius-xxl);--bs-border-radius-pill: 50rem;--bs-box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);--bs-box-shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);--bs-box-shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);--bs-box-shadow-inset: inset 0 1px 2px rgba(0, 0, 0, 0.075);--bs-focus-ring-width: 0.25rem;--bs-focus-ring-opacity: 0.25;--bs-focus-ring-color: rgba(44, 62, 80, 0.25);--bs-form-valid-color: #18bc9c;--bs-form-valid-border-color: #18bc9c;--bs-form-invalid-color: #e74c3c;--bs-form-invalid-border-color: #e74c3c}[data-bs-theme=dark]{color-scheme:dark;--bs-body-color: #dee2e6;--bs-body-color-rgb: 222, 226, 230;--bs-body-bg: #212529;--bs-body-bg-rgb: 33, 37, 41;--bs-emphasis-color: #fff;--bs-emphasis-color-rgb: 255, 255, 255;--bs-secondary-color: rgba(222, 226, 230, 0.75);--bs-secondary-color-rgb: 222, 226, 230;--bs-secondary-bg: #343a40;--bs-secondary-bg-rgb: 52, 58, 64;--bs-tertiary-color: rgba(222, 226, 230, 0.5);--bs-tertiary-color-rgb: 222, 226, 230;--bs-tertiary-bg: #2b3035;--bs-tertiary-bg-rgb: 43, 48, 53;--bs-primary-text-emphasis: #808b96;--bs-secondary-text-emphasis: #bfc9ca;--bs-success-text-emphasis: #74d7c4;--bs-info-text-emphasis: #85c1e9;--bs-warning-text-emphasis: #f8c471;--bs-danger-text-emphasis: #f1948a;--bs-light-text-emphasis: #f8f9fa;--bs-dark-text-emphasis: #dee2e6;--bs-primary-bg-subtle: #090c10;--bs-secondary-bg-subtle: #1e2121;--bs-success-bg-subtle: #05261f;--bs-info-bg-subtle: #0a1e2c;--bs-warning-bg-subtle: #311f04;--bs-danger-bg-subtle: #2e0f0c;--bs-light-bg-subtle: #343a40;--bs-dark-bg-subtle: #1a1d20;--bs-primary-border-subtle: #1a2530;--bs-secondary-border-subtle: #596364;--bs-success-border-subtle: #0e715e;--bs-info-border-subtle: #1f5b83;--bs-warning-border-subtle: #925e0b;--bs-danger-border-subtle: #8b2e24;--bs-light-border-subtle: #7b8a8b;--bs-dark-border-subtle: #343a40;--bs-heading-color: inherit;--bs-link-color: #808b96


from branca.element import MacroElement

from folium.elements import JSCSSMixin
from folium.template import Template

class Terminator(JSCSSMixin, MacroElement):
    """
    Leaflet.Terminator is a simple plug-in to the Leaflet library to
    overlay day and night regions on maps.

    """

    _template = Template(
        """
        {% macro script(this, kwargs) %}
            L.terminator().addTo({{this._parent.get_name()}});
        {% endmacro %}
        """
    )

    default_js = [("terminator", "https://unpkg.com/@joergdietrich/leaflet.terminator")]

    def __init__(self):
        super().__init__()
        self._name = "Terminator"


要检查是否支持 Document Picture-in-Picture API，你可以测试 `window` 上的 `documentPictureInPicture` 属性是否可用：

```js
if ("documentPictureInPicture" in window) {
  document.querySelector(".no-picture-in-picture").remove();

  const togglePipButton = document.createElement("button");
  togglePipButton.textContent = "切换画中画";
  togglePipButton.addEventListener("click", togglePictureInPicture, false);

  document.getElementById("control-bar").appendChild(togglePipButton);
}
```

如果可用，我们将删除“Document Picture-in-Picture API 不可用”消息，并添加 {{htmlelement("button")}} 元素以在文档画中画窗口中打开视频播放器。

## 打开画中画窗口

以下 JavaScript 调用 {{domxref("DocumentPictureInPicture.requestWindow", "window.documentPictureInPicture.requestWindow()")}} 打开一个空白的画中画窗口。返回的 {{jsxref("Promise")}} 兑现画中画 {{domxref("Window")}} 对象。使用 {{domxref("Element.append()")}} 将视频播放器移动到该窗口，然后我们显示消息通知用户它已被移动。

`requestWindow()` 的 `width` 和 `height` 选项将画中画窗口设置为所需大小。如果选项值太大或太小而无法适应用户友好的窗口大小，浏览器可能会限制选项值。

```js
async function togglePictureInPicture() {
  // 如果已经打开画中画窗口，则提前返回
  if (window.documentPictureInPicture.window) {
    return;
  }

  // 打开画中画窗口。
  const pipWindow = await window.documentPictureInPicture.requestWindow({
    width: videoPlayer.clientWidth,
    height: videoPlayer.clientHeight,
  });

  // ...

  // 将播放器移至画中画窗口。
  pipWindow.document.body.append(videoPlayer);

  // 显示一条消息表明它已被移动
  inPipMessage.style.display = "block";
}
```

## 将样式表复制到画中画窗口

要从原始窗口复制所有 CSS 样式表，请循环遍历文档中明确链接或嵌入的所有样式表（通过 {{domxref("Document.styleSheets")}}），然后将其附加到画中画窗口。请注意，这是一次性复制。

```js
// ...

// 从初始文档复制样式表，以便播放器看起来相同。
[...document.styleSheets].forEach((styleSheet) => {
  try {
    const cssRules = [...styleSheet.cssRules]
      .map((rule) => rule.cssText)
      .join("");
    const style = document.createElement("style");

    style.textContent = cssRules;
    pipWindow.document.head.appendChild(style);
  } catch (e) {
    const link = document.createElement("link");

    link.rel = "stylesheet";
    link.type = styleSheet.type;
    link.media = styleSheet.media;
    link.href = styleSheet.href;
    pipWindow.document.head.appendChild(link);
  }
});

// ...
```

## 画中画模式下目标样式

{{cssxref("@media/


/*
 *  PowerPC version
 *    Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org)
 *
 *  Rewritten by Cort Dougan (cort@cs.nmt.edu) for PReP
 *    Copyright (C) 1996 Cort Dougan <cort@cs.nmt.edu>
 *  Adapted for Power Macintosh by Paul Mackerras.
 *  Low-level exception handlers and MMU support
 *  rewritten by Paul Mackerras.
 *    Copyright (C) 1996 Paul Mackerras.
 *
 *  Adapted for 64bit PowerPC by Dave Engebretsen, Peter Bergner, and
 *    Mike Corrigan {engebret|bergner|mikejc}@us.ibm.com
 *
 *  This file contains the entry point for the 64-bit kernel along
 *  with some early initialization code common to all 64-bit powerpc
 *  variants.
 *
 *  This program is free software; you can redistribute it and/or
 *  modify it under the terms of the GNU General Public License
 *  as published by the Free Software Foundation; either version
 *  2 of the License, or (at your option) any later version.
 */

#include <linux/threads.h>
#include <linux/init.h>
#include <asm/reg.h>
#include <asm/page.h>
#include <asm/mmu.h>
#include <asm/ppc_asm.h>
#include <asm/head-64.h>
#include <asm/asm-offsets.h>
#include <asm/bug.h>
#include <asm/cputable.h>
#include <asm/setup.h>
#include <asm/hvcall.h>
#include <asm/thread_info.h>
#include <asm/firmware.h>
#include <asm/page_64.h>
#include <asm/irqflags.h>
#include <asm/kvm_book3s_asm.h>
#include <asm/ptrace.h>
#include <asm/hw_irq.h>
#include <asm/cputhreads.h>
#include <asm/ppc-opcode.h>
#include <asm/export.h>

/* The physical memory is laid out such that the secondary processor
 * spin code sits at 0x0000...0x00ff. On server, the vectors follow
 * using the layout described in exceptions-64s.S
 */

/*
 * Entering into this code we make the following assumptions:
 *
 *  For pSeries or server processors:
 *   1. The MMU is off & open firmware is running in real mode.
 *   2. The kernel is entered at __start
 * -or- For OPAL entry:
 *   1. The MMU is off, processor in HV mode, primary CPU enters at 0
 *      with device-tree in gpr3. We also get OPAL base in r8 and
 *	entry in r9 for debugging purposes
 *   2. Secondary processors enter at 0x60 with PIR in gpr3
 *
 *  For Book3E processors:
 *   1. The MMU is on running in AS0 in a state defined in ePAPR
 *   2. The kernel is entered at __start
 */

OPEN_FIXED_SECTION(first_256B, 0x0, 0x100)
USE_FIXED_SECTION(first_256B)
	/*
	 * Offsets are relative from the start of fixed section, and
	 * first_256B starts at 0. Offsets are a bit easier to use here
	 * than the fixed section entry macros.
	 */
	. = 0x0
_GLOBAL(__start)
	/* NOP this out unconditionally */
BEGIN_FTR_SECTION
	FIXUP_ENDIAN
	b	__start_initialization_multiplatform
END_FTR_SECTION(0, 1)

	/* Catch branch to 0 in real mode */
	trap

	/* Secondary processors spin on this value until it becomes non-zero.
	 * When non-zero, it contains the real address of the function the cpu
	 * s


files,
		previewer = true, --For large codebases, turn off
	})
end

function M.live_grep_args()
	require("telescope").extensions.live_grep_args.live_grep_args()
end

function M.live_grep_python()
	require("telescope.builtin").live_grep({
		glob_pattern = { "*.py", "!*test.py" },
		prompt_title = "Live Grep Python Files",
	})
end

function M.live_grep_js()
	require("telescope.builtin").live_grep({
		glob_pattern = { "*.jsx", "*.js", "!*test.js" },
		prompt_title = "Live Grep JS Files",
	})
end

function M.live_grep_html()
	require("telescope.builtin").live_grep({
		glob_pattern = { "*.html" },
		prompt_title = "Live Grep HTML Files",
	})
end

function M.live_grep_args_in_search_dir()
	local search_dir = get_search_dir()
	require("telescope").extensions.live_grep_args.live_grep_args({
		search_dirs = { search_dir },
		prompt_title = string.format("Live Grep (Args) in '%s'", get_dir_label(search_dir)),
	})
end

return M


 size.y * 0.1, size.x, size.y, 4);

            if ((m_current_colur == *wxWHITE || m_current_colur.Alpha() == 0) && !wxGetApp().dark_mode()) {
                dc.SetPen(wxPen(AMS_CONTROL_DEF_BLOCK_BK_COLOUR, 1, wxPENSTYLE_SOLID));
                dc.DrawRoundedRectangle(-size.x / 2 - FromDIP(3), size.y * 0.1 + FromDIP(3), size.x, size.y, 3);
                dc.DrawRoundedRectangle(-size.x / 2 + FromDIP(3), size.y * 0.1 - FromDIP(3), size.x, size.y, 5);
            }
        }

        if (m_ams_loading && !m_none_ams_mode) {
            if (m_current_colur.Alpha() == 0) {dc.SetPen(wxPen(*wxWHITE, 6, wxPENSTYLE_SOLID));}
            else {dc.SetPen(wxPen(m_current_colur, 6, wxPENSTYLE_SOLID));}
            dc.DrawLine(size.x / 2, -1, size.x / 2, size.y * 0.6 - 1);

            if ((m_current_colur == *wxWHITE || m_current_colur.Alpha() == 0) && !wxGetApp().dark_mode()) {
                dc.SetPen(wxPen(AMS_CONTROL_DEF_BLOCK_BK_COLOUR, 1, wxPENSTYLE_SOLID));
                dc.DrawLine(size.x / 2 - FromDIP(4), -1, size.x / 2 - FromDIP(3), size.y * 0.6 - 1);
                dc.DrawLine(size.x / 2 + FromDIP(3), -1, size.x / 2 + FromDIP(3), size.y * 0.6 - 1);
            }
        }
    }
    else {
        if (m_ams_loading) {
            if (m_current_colur.Alpha() == 0) { dc.SetPen(wxPen(*wxWHITE, 6, wxPENSTYLE_SOLID)); }
            else { dc.SetPen(wxPen(m_current_colur, 6, wxPENSTYLE_SOLID)); }
            dc.DrawLine(size.x / 2, -1, size.x / 2, size.y * 0.6 - 1);

            if ((m_current_colur == *wxWHITE || m_current_colur.Alpha() == 0) && !wxGetApp().dark_mode()) {
                dc.SetPen(wxPen(AMS_CONTROL_DEF_BLOCK_BK_COLOUR, 1, wxPENSTYLE_SOLID));
                dc.DrawLine(size.x / 2 - FromDIP(4), -1, size.x / 2 - FromDIP(3), size.y * 0.6 - 1);
                dc.DrawLine(size.x / 2 + FromDIP(3), -1, size.x / 2 + FromDIP(3), size.y * 0.6 - 1);
            }
        }
    }

}

void AMSextruder::msw_rescale()
{
    m_amsSextruder->msw_rescale();
    Layout();
    Update();
    Refresh();
}

/*************************************************
Description:AMSVirtualRoad
**************************************************/

AMSVirtualRoad::AMSVirtualRoad(wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size) { create(parent, id, pos, size); }

AMSVirtualRoad::~AMSVirtualRoad() {}

void AMSVirtualRoad::OnVamsLoading(bool load, wxColour col)
{
    m_vams_loading = load;
    if (load)m_current_color = col;
    Refresh();
}

void AMSVirtualRoad::


html" target="overviewFrame" class="module">supervisor_cpg

supervisor_cpg_spawn

supervisor_cpg_sup

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Module cpg_data</title>
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="EDoc">

Overview

Module cpg_data

Description

Data Types

Function Index

Function Details

CPG Data Group Lookups.

   All functions in this module are for using cached cpg data without
   sending messages to the cpg scope process.

Copyright © 2011-2020 Michael Truog

Version: 1.8.1 Jun 20 2023 18:22:29
  ------------------------------------------------------------------------

Authors: Michael Truog (<tt>mjtruog at protonmail dot com</tt>).

Description

CPG Data Group Lookups.

   All functions in this module are for using cached cpg data without
   sending messages to the cpg scope process.  Using this module for
   cpg group lookups is equivalent to the lazy destination refresh
   methods in CloudI.

Data Types

get_members_return()

<tt>get_members_return() = {ok, cpg:name(), [pid(), ...]} | {error, {no_such_group, cpg:name()}}</tt>

get_pid_error_reason()

<tt>get_pid_error_reason() = {no_process, cpg:name()} | {no_such_group, cpg:name()}</tt>

state()

<tt>state() = {DictI::module(), GroupsData::any()}</tt>

Function Index

get_closest_pid/2<


 self;
  List<WooProductAttributeTermCollection>? collection;

  WooProductAttributeTermLinks({this.self, this.collection});

  WooProductAttributeTermLinks.fromJson(Map<String, dynamic> json) {
    if (json['self'] != null) {
      self = [];
      json['self'].forEach((v) {
        self!.add(new WooProductAttributeTermSelf.fromJson(v));
      });
    }
    if (json['collection'] != null) {
      collection = [];
      json['collection'].forEach((v) {
        collection!.add(new WooProductAttributeTermCollection.fromJson(v));
      });
    }
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    if (this.self != null) {
      data['self'] = this.self!.map((v) => v.toJson()).toList();
    }
    if (this.collection != null) {
      data['collection'] = this.collection!.map((v) => v.toJson()).toList();
    }
    return data;
  }

  @override
  toString() => this.toJson().toString();
}

class WooProductAttributeTermSelf {
  String? href;

  WooProductAttributeTermSelf({this.href});

  WooProductAttributeTermSelf.fromJson(Map<String, dynamic> json) {
    href = json['href'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['href'] = this.href;
    return data;
  }
}

class WooProductAttributeTermCollection {
  String? href;

  WooProductAttributeTermCollection({this.href});

  WooProductAttributeTermCollection.fromJson(Map<String, dynamic> json) {
    href = json['href'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['href'] = this.href;
    return data;
  }
}
/*
 * BSD 3-Clause License

    Copyright (c) 2020, RAY OKAAH - MailTo: ray@flutterengineer.com, Twitter: Rayscode
    All rights reserved.

    Redistribution and use in source and binary forms, with or without
    modification, are permitted provided that the following conditions are met:

    1. Redistributions of source code must retain the above copyright notice, this
    list of conditions and the following disclaimer.

    2. Redistributions in binary form must reproduce the above copyright notice,
    this list of conditions and the following disclaimer in the documentation
    and/or other materials provided with the distribution.

    3. Neither the name of the copyright holder nor the names of its
    contributors may be used to endorse or promote products derived from
    this software without specific prior written permission.

    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
    AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
    IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
    DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
    FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
    DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
    SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
    CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
    OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
    OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

 */

class WooUser {
  final int? id;
  final String? email;
  final String? username;
  final String? password;
  final String? firstName;
  final String? lastName;
  final String? name;

  WooUser(
      {this.id,
      required String this.email,
      required String this.username,
      this.password,
      this.firstNa


using System.Threading.Tasks;
using FastAdminAPI.Network.Models.QyWechat;
using FastAdminAPI.Network.QyWechat.Config;
using FastAdminAPI.Network.QyWechat.Models;
using Microsoft.AspNetCore.Mvc;
using Refit;

namespace FastAdminAPI.Network.QyWechat.Common
{
    internal interface IQyWechatProvider
    {
        /// <summary>
        /// 获取企业微信访问令牌
        /// </summary>
        /// <param name="corpid"></param>
        /// <param name="corpsecret"></param>
        /// <returns></returns>
        [Get(BaseQyWechatConfiguration.GET_ACCESS_TOKEN)]
        AccessTokenModel GetAccessToken([Query] string corpid, [Query] string corpsecret);
        /// <summary>
        /


#ifndef SPI_H
#define SPI_H

//#include "link_autopilot.h"

#define SPI_SS0_PIN  0
#define SPI_SS0_PORT PORTB
#define SPI_SS0_DDR  DDRB
#define SPI_IT0_PIN  1
#define SPI_IT0_PORT PORTD
#define SPI_IT0_DDR  DDRD

#define SPI_SS1_PIN  7
#define SPI_SS1_PORT PORTE
#define SPI_SS1_DDR  DDRE
#define SPI_IT1_PIN  6
#define SPI_IT1_PORT PORTE
#define SPI_IT1_DDR  DDRE

#define SPI_SCK_PIN  1
#define SPI_MOSI_PIN 2
#define SPI_MISO_PIN 3
#define SPI_PORT PORTB
#define SPI_DDR  DDRB

#define SPI_NONE 0
#define SPI_SLAVE0 1
#define SPI_SLAVE1 2

extern volatile uint8_t spi_cur_slave;
extern uint8_t spi_nb_ovrn;

void spi_init( void );

#define SPI_START(_SPCR_VAL) { \
  uint8_t foo; \
  SPCR = _SPCR_VAL; \
  if (bit_is_set(SPSR, SPIF)) \
    foo = SPDR; \
  SPCR |= _BV(SPIE); \
}

#define SPI_SELECT_SLAVE0() { \
  spi_cur_slave = SPI_SLAVE0; \
  cbi( SPI_SS0_PORT, SPI_SS0_PIN );\
}

#define SPI_UNSELECT_SLAVE0() { \
  spi_cur_slave = SPI_NONE; \
  sbi( SPI_SS0_PORT, SPI_SS0_PIN );\
}

#define SPI_SELECT_SLAVE1() { \
  spi_cur_slave = SPI_SLAVE1; \
  cbi( SPI_SS1_PORT, SPI_SS1_PIN );\
}

#define SPI_UNSELECT_SLAVE1() { \
  spi_cur_slave = SPI_NONE; \
  sbi( SPI_SS1_PORT, SPI_SS1_PIN );\
}

#define SPI_SEND(data) { \
  SPDR = data; \
}

#define SPI_STOP() { \
 cbi(SPCR,SPIE); \
 cbi(SPCR, SPE); \
}

#endif /* SPI_H */


голосов, предложенных пользователем"""
        async with aiosqlite.connect(self.db_name) as db:
            cursor = await db.execute(
                "SELECT voice_name FROM feedback_voices WHERE user_id = ?",
                (user_id,)
            )
            voices = await cursor.fetchall()
            return [voice[0] for voice in voices] if voices else []

    async def save_suggested_voice(self, user_id: int, voice_name: str):
        """Сохраняет предложенный голос в БД"""
        async with aiosqlite.connect(self.db_name) as db:
            await db.execute('''
                CREATE TABLE IF NOT EXISTS suggested_voices (
                    id INTEGER PRIMARY KEY AUTOINCREMENT,
                    user_id INTEGER,
                    voice_name TEXT
                )
            ''')
            await db.execute(
                'INSERT INTO suggested_voices (user_id, voice_name) VALUES (?, ?)',
                (user_id, voice_name)
            )
            await db.commit()


tring schreiben
  addq.w    #1,d2        ;Offset erhhen
  dbf       d3,m_loop    ;bis zur letzten Ziffer
  move.b    #'e',(a1)+
  btst.b    #6,(a0)      ;Exponent negativ?
  beq       positiv2     ;nein
  move.b    #'-',(a1)+   ;ja
positiv2:
  bfextu    2(a0){0,4},d0;1. Stelle d. Exponents
  lsl.b     #4,d0
  bfextu    (a0){4,4},d1 ;2. Stelle d. Exponents
  or.b      d1,d0        ;1. u. 2. Stelle in D0
  unpk      d0,d1,#$3030 ;in ASCII wandeln
  move.w    d1,(a1)+
  move.b    1(a0),d0
  unpk      d0,d1,#$3030 ;3. und 4. Stelle
  move.w    d1,(a1)+
* ----------------------------------------------
zahl:     dc.l      0,0,0
*
          bss
string:   ds.b      20


Nodes[2].attributes.get(ut.Attr.LATEX);this.composeLatex(r,`^${t}_`,0,1)}else this.composeLatex(r,"_",0,1);else if(r.childNodes[2]&&("}"===i?this.composeBraces(r.childNodes[2]):r.childNodes[2].attributes.set(ut.Attr.LATEX,i)),r.childNodes[1]){const t=r.childNodes[1].attributes.get(ut.Attr.LATEX);this.composeLatex(r,`_${t}^`,0,2)}else this.composeLatex(r,"^",0,2)}composeLatex(t,e,r,s){if(!t.childNodes[r]||!t.childNodes[s])return;const i=(t.childNodes[r].attributes.get(ut.Attr.LATEX)||"")+e+t.childNodes[s].attributes.get(ut.Attr.LATEX);t.attributes.set(ut.Attr.LATEX,i)}composeBraces(t){const e=this.composeBracedContent(t);t.attributes.set(ut.Attr.LATEX,`{${e}}`)}composeBracedContent(t){var e,r;const s=(null===(e=t.childNodes[0])||void 0===e?void 0:e.childNodes)||[];let i="";for(const t of s){const e=(null===(r=null==t?void 0:t.attributes)||void 0===r?void 0:r.get(ut.Attr.LATEX))||"";e&&(i+=i&&i.match(/[a-zA-Z]$/)&&e.match(/^[a-zA-Z]/)?" "+e:e)}return i}}const mt=MathJax._.core.Tree.Factory.AbstractFactory;class pt extends ht{}class gt extends mt{constructor(){super(...arguments),this.defaultKind="dummy",this.configuration=null}}gt.DefaultStackItems={[pt.prototype.kind]:pt};const ft=gt;class bt{constructor(){this.mmlFactory=null,this.factory={node:bt.createNode,token:bt.createToken,text:bt.createText,error:bt.createError}}static createNode(t,e,r=[],s={},i){const n=t.mmlFactory.create(e);return n.setChildren(r),i&&n.appendChild(i),V.setProperties(n,s),n}static createToken(t,e,r={},s=""){const i=t.create("text",s);return t.create("node",e,[],r,i)}static createText(t,e){return null==e?null:t.mmlFactory.create("text").setText(e)}static createError(t,e){const r=t.create("text",e),s=t.create("node","mtext",[],{},r);return t.create("node","merror",[s],{"data-mjx-error":e})}setMmlFactory(t){this.mmlFactory=t}set(t,e){this.factory[t]=e}setCreators(t){for(const e in t)this.set(e,t[e])}create(t,...e){const r=(this.factory[t]||this.factory.node)(this,e[0],...e.slice(1));return"node"===t&&this.configuration.addNode(e[0],r),r}get(t){return this.factory[t]}}const yt=MathJax._.util.Entities,At=(yt.options,yt.entities);yt.add,yt.remove,yt.translate,yt.numeric;class kt{static oneof(...t){return new this("string",(e=>t.includes(e)),(t=>t))}constructor(t,e,r){this.name=t,this.verify=e,this.convert=r}}const vt={boolean:new kt("boolean",(t=>"true"===t||"false"===t),(t=>"true"===t)),number:new kt("number",(t=>!!t.match(/^[-+]?(?:\d+(?:\.\d


rm:[0,1,2,3] row_mask:0x0 bank_mask:0x0
// CHECK: [0xfa,0x8a,0xfe,0x7f,0x01,0xe4,0x00,0x00]

v_ceil_f16_dpp v5, v255 quad_perm:[0,1,2,3] row_mask:0x0 bank_mask:0x0
// CHECK: [0xfa,0x8a,0x0a,0x7e,0xff,0xe4,0x00,0x00]

v_ceil_f16_dpp v5, v1 quad_perm:[3,2,1,0] row_mask:0x0 bank_mask:0x0
// CHECK: [0xfa,0x8a,0x0a,0x7e,0x01,0x1b,0x00,0x00]

v_ceil_f16_dpp v5, v1 row_mirror row_mask:0x0 bank_mask:0x0
// CHECK: [0xfa,0x8a,0x0a,0x7e,0x01,0x40,0x01,0x00]

v_ceil_f16_dpp v5, v1 row_half_mirror row_mask:0x0 bank_mask:0x0
// CHECK: [0xfa,0x8a,0x0a,0x7e,0x01,0x41,0x01,0x00]

v_ceil_f16_dpp v5, v1 row_bcast:15 row_mask:0x0 bank_mask:0x0
// CHECK: [0xfa,0x8a,0x0a,0x7e,0x01,0x42,0x01,0x00]

v_ceil_f16_dpp v5, v1 row_bcast:31 row_mask:0x0 bank_mask:0x0
// CHECK: [0xfa,0x8a,0x0a,0x7e,0x01,0x43,0x01,0x00]

v_ceil_f16_dpp v5, v1 wave_shl:1 row_mask:0x0 bank_mask:0x0
// CHECK: [0xfa,0x8a,0x0a,0x7e,0x01,0x30,0x01,0x00]

v_ceil_f16_dpp v5, v1 wave_rol:1 row_mask:0x0 bank_mask:0x0
// CHECK: [0xfa,0x8a,0x0a,0x7e,0x01,0x34,0x01,0x00]

v_ceil_f16_dpp v5, v1 wave_shr:1 row_mask:0x0 bank_mask:0x0
// CHECK: [0xfa,0x8a,0x0a,0x7e,0x01,0x38,0x01,0x00]

v_ceil_f16_dpp v5, v1 wave_ror:1 row_mask:0x0 bank_mask:0x0
// CHECK: [0xfa,0x8a,0x0a,0x7e,0x01,0x3c,0x01,0x00]

v_ceil_f16_dpp v5, v1 row_shl:1 row_mask:0x0 bank_mask:0x0
// CHECK: [0xfa,0x8a,0x0a,0x7e,0x01,0x01,0x01,0x00]

v_ceil_f16_dpp v5, v1 row_shl:15 row_mask:0x0 bank_mask:0x0
// CHECK: [0xfa,0x8a,0x0a,0x7e,0x01,0x0f,0x01,0x00]

v_ceil_f16_dpp v5, v1 row_shr:1 row_mask:0x0 bank_mask:0x0
// CHECK: [0xfa,


ges window.
 *
 * The messages window is shown if it was previously hidden and @a show is set to @c TRUE.
 *
 * @param tabnum An index of a tab in the messages window. Valid values are
 *                all elements of #MessageWindowTabNum.
 * @param show   Whether to show the messages window at all if it was hidden before.
 *
 * @since 0.15
 **/
GEANY_API_SYMBOL
void msgwin_switch_tab(gint tabnum, gboolean show)
{
	GtkWidget *widget = NULL;	/* widget to focus */

	switch (tabnum)
	{
		case MSG_SCRATCH: widget = msgwindow.scribble; break;
		case MSG_COMPILER: widget = msgwindow.tree_compiler; break;
		case MSG_STATUS: widget = msgwindow.tree_status; break;
		case MSG_MESSAGE: widget = msgwindow.tree_msg; break;
#ifdef HAVE_VTE
		case MSG_VTE: widget = (vte_info.have_vte) ? vte_config.vte : NULL; break;
#endif
		default: break;
	}

	/* the msgwin must be visible before we switch to the VTE page so that
	 * the font settings are applied on realization */
	if (show)
		msgwin_show_hide(TRUE);
	gtk_notebook_set_current_page(GTK_NOTEBOOK(msgwindow.notebook), tabnum);
	if (show && widget)
		gtk_widget_grab_focus(widget);
}

/**
 * Removes all messages from a tab specified by @a tabnum in the messages window.
 *
 * @param tabnum An index of a tab in the messages window which should be cleared.
 *                Valid values are @c MSG_STATUS, @c MSG_COMPILER and @c MSG_MESSAGE.
 *
 * @since 0.15
 **/
GEANY_API_SYMBOL
void msgwin_clear_tab(gint tabnum)
{
	GtkListStore *store = NULL;

	switch (tabnum)
	{
		case MSG_MESSAGE:
			store = msgwindow.store_msg;
			break;

		case MSG_COMPILER:
			gtk_list_store_clear(msgwindow.store_compiler);
			build_menu_update(NULL);	/* update next error items */
			return;

		case MSG_STATUS: store = msgwindow.store_status; break;
		default: return;
	}
	if (store == NULL)
		return;
	gtk_list_store_clear(store);
}