        refreshActionScale()
    }

    //按下时的坐标
    private var lastX = -1f
    private var lastY = -1f
    //当前正在操作的界面id
    private var touchId = -1
    @SuppressLint("ClickableViewAccessibility")
    override fun onTouch(v: View, event: MotionEvent): Boolean {
        when (event.action) {
            MotionEvent.ACTION_DOWN -> {
                handleDownEvent(v, event)
            }
            MotionEvent.ACTION_MOVE -> {
                handleMoveEvent(v, event)
            }
            MotionEvent.ACTION_UP -> {
                handleUpEvent(v, event)
            }
        }
        return true
    }

    private fun handleDownEvent(v: View, event: MotionEvent) {
        if (touchId == -1) touchId = v.id

        lastX = event.rawX
        lastY = event.rawY
        when(v.id) {
            R.id.root, backgroundView.id -> {
                backgroundGestureDetector.onTouchEvent(event)
            }
            R.id.middleView -> {
                middleGestureDetector.onTouchEvent(event)
            }
            R.id.sideView -> {
                middleGestureDetector.onTouchEvent(event)
            }
        }
    }

    private fun handleMoveEvent(v: View, event: MotionEvent) {
        when(v.id) {
            R.id.root, backgroundView.id -> {
                backgroundGestureDetector.onTouchEvent(event)
            }
            R.id.middleView -> {
                if (touchId == R.id.middleView) {
                    val dx = event.rawX - lastX
                    val dy = event.rawY - lastY

                    handleToFloatScale(0f, dy)
                    lastX = event.rawX
                    lastY = event.rawY

                    middleGestureDetector.onTouchEvent(event)
                }
            }
            R.id.sideView -> {
                if (touchId == R.id.sideView) {
                    val dx = event.rawX - lastX
                    val dy = event.rawY - lastY

                    handleToFloatScale(dx, 0f)
                    lastX = event.rawX
                    lastY = event.rawY
                }
            }
        }
    }

    private fun handleUpEvent(v: View, event: MotionEvent) {
        when (v.id) {
            R.id.root, backgroundView.id -> {
                backgroundGestureDetector.onTouchEvent(event)
            }
            R.id.middleView -> {
                middleGestureDetector.onTouchEvent(event)
                notifyToFloat()
            }
            R.id.sideView -> {
                notifyToFloat()
                middleGestureDetector.onTouchEvent(event)
            }
        }
        touchId = -1
    }

    private var setDisplayIdMethod: Method? = null

    private fun genFloatViewLocation(): IntArray {
        return intArrayOf(
            (if (hangUpPosition[0]) ((realScreenWidth - hangUpViewWidth - screenPaddingX) / -2)
                else (realScreenWidth - hangUpViewWidth - screenPaddingX) / 2),
            (if (hangUpPosition[1]) (hangUpViewHeight - realScreenHeight + screenPaddingY) / 2
                else (realScreenHeight - hangUpViewHeight - screenPaddingY) / 2),
        )
    }

    private fun getRestoreFreeformScale(): FloatArray {
        refreshFreeformSize()
        return floatArrayOf(
            freeformWidth / rootWidth.toFloat(),
            freeformHeight / rootHeight.toFloat(),
        )
    }

    private fun cardViewMarginAnim(topStartMargin: Int, bottomStartMargin: Int, rightStartMargin: Int, topEndMargin: Int, bottomEndMargin: Int, rightEndMargin: Int): Animator {
        return AnimatorSet().apply {
            playTogether(
                ValueAnimator.ofInt(topStartMargin, topEndMargin)
                    .apply {
                        addUpdateListener {
                            binding.cardRoot.layoutParams = (binding.cardRoot.layoutParams as ConstraintLayout.LayoutParams).apply {
                                topMargin = it.animatedValue as Int
                            }
                        }
                    },
                ValueAnimator.ofInt(bottomStartMargin, bottomEndMargin)


{
                        2048, 0, 0, 2048, 16128, 0,
                    },
                },

            },

        },
        ["id"] = 13,
        ["component"] = {
            {
                ["id"] = 8,
            },

        },
        ["export"] = "land_bg",
        ["type"] = "animation",
    },
    {
        [1] = {
            ["screen"] = {
                600, 1600, 600, 2400, -600, 2400, -600, 1600,
            },
            ["tex"] = 1,
            ["src"] = {
                559, 147, 539, 147, 539, 117, 559, 117,
            },
        },
        ["id"] = 14,
        ["export"] = "pipeup_header",
        ["type"] = "picture",
    },
    {
        [1] = {
            ["screen"] = {
                600, 2400, 600, 6400, -600, 6400, -600, 2400,
            },
            ["tex"] = 1,
            ["src"] = {
                499, 147, 399, 147, 399, 117, 499, 117,
            },
        },
        ["id"] = 15,
        ["export"] = "pipeup_tail",
        ["type"] = "picture",
    },
    {
        [1] = {
            ["screen"] = {
                600, -1600, -600, -1600, -600, -2400, 600, -2400,
            },
            ["tex"] = 1,
            ["src"] = {
                1009, 354, 979, 354, 979, 334, 1009, 334,
            },
        },
        ["id"] = 16,
        ["export"] = "pipedown_header",
        ["type"] = "picture",
    },
    {
        [1] = {
            ["screen"] = {
                600, -2400, -600, -2400, -600, -6400, 600, -6400,
            },
            ["tex"] = 1,
            ["src"] = {
                1009, 294, 979, 294, 979, 194, 1009,


ty(PhantomData), stream)
    }
}

pub(crate) fn concat2<P0, P1>(p0: P0, p1: P1) -> Concat2<P0, P1>
where
    P0: ParserBase,
    P1: ParserBase<Input = P0::Input>,
{
    Concat2(p0, p1)
}

pub struct Concat2<P0, P1>(P0, P1)
where
    P0: ParserBase,
    P1: ParserBase<Input = P0::Input>;

impl<P0, P1> ParserBase for Concat2<P0, P1>
where
    P0: ParserBase,
    P1: ParserBase<Input = P0::Input>,
{
    type Input = P0::Input;
    type Output = (P0::Output, P1::Output);
    fn emptiable() -> bool {
        P0::emptiable() && P1::emptiable()
    }
}

impl<S, P0, P1> ParserOnce<S> for Concat2<P0, P1>
where
    S: Stream<Item = P0::Input> + ?Sized,
    P0: ParserOnce<S>,
    P1: ParserOnce<S, Input = P0::Input>,
{
    fn parse_lookahead_once(self, stream: &mut S) -> ParseResult<Option<(Self::Output, Consume)>> {
        let Concat2(p0, p1) = self;
        let (x, consumed) = if let Some((x, c)) = p0.parse_lookahead_once(stream)? {
            (x, c)
        } else {
            return Ok(None);
        };
        if let Some((y, c)) = p1.parse_lookahead_once(stream)? {
            Ok(Some(((x, y), consumed | c)))
        } else if consumed == Consume::Empty {
            Ok(None)
        } else {
            Err(ParseError::SyntaxError)
        }
    }
    fn emit_expectations(&self, stream: &mut S) {
        let Concat2(ref p0, ref p1) = *self;
        p0.emit_expectations(stream);
        if P0::emptiable() {
            p1.emit_expectations(stream);
        }
    }
}

impl<S, P0, P1> ParserMut<S> for Concat2<P0, P1>
where
    S: Stream<Item = P0::Input> + ?Sized,
    P0: ParserMut<S>,
    P1: ParserMut<S, Input = P0::Input>,
{
    fn parse_lookahead_mut(
        &mut self,
        stream: &mut S,
    ) -> ParseResult<Option<(Self::Output, Consume)>> {
        ParserOnce::parse_lookahead_once(Concat2(&mut self.0, &mut self.1), stream)
    }
}

impl<S, P0, P1> Parser<S> for Concat2<P0, P1>
where
    S: Stream<Item = P0::Input> + ?Sized,
    P0: Parser<S>,
    P1: Parser<S, Input = P0::Input>,
{
    fn parse_lookahead(&self, stream: &mut S) -> ParseResult<Option<(Self::Output, Consume)>> {
        ParserOnce::parse_lookahead_once(Concat2(&self.0, &self.1), stream)
    }
}

pub fn fail<I, O>() -> Fail<I, O> {
    Fail(PhantomData)
}
pub struct Fail<I, O>(PhantomData<fn(I) -> O>);
impl<I, O> ParserBase for Fail<I, O> {
    type Input = I;
    type Output = O;
    fn emptiable() -> bool {
        false
    }
}
impl<S: Stream<Item = I> + ?Sized, I, O> ParserOnce<S> for Fail<I, O> {
    fn parse_lookahead_once(self


",""],
				namesAbbr: ["ådåj","guov","snju","vuor","moar","bieh","snji","bårg","ragá","gålg","basá","javl",""]
			},
			monthsGenitive: {
				names: ["ådåjakmáno","guovvamáno","sjnjuktjamáno","vuoratjismáno","moarmesmáno","biehtsemáno","sjnjilltjamáno","bårggemáno","ragátmáno","gålgådismáno","basádismáno","javllamáno",""],
				namesAbbr: ["ådåj","guov","snju","vuor","moar","bieh","snji","bårg","ragá","gålg","basá","javl",""]
			},
			AM: null,
			PM: null,
			patterns: {
				d: "yyyy-MM-dd",
				D: "MMMM d'. b. 'yyyy",
				t: "HH:mm",
				T: "HH:mm:ss",
				f: "MMMM d'. b. 'yyyy HH:mm",
				F: "MMMM d'. b. 'yyyy HH:mm:ss",
				M: "MMMM d'. b. '",
				Y: "MMMM yyyy"
			}
		}
	}
});

Globalize.addCultureInfo( "uz-Latn", "default", {
	name: "uz-Latn",
	englishName: "Uzbek (Latin)",
	nativeName: "U'zbek",
	language: "uz-Latn",
	numberFormat: {
		",": " ",
		".": ",",
		percent: {
			pattern: ["-n%","n%"],
			",": " ",
			".": ","
		},
		currency: {
			pattern: ["-n $","n $"],
			decimals: 0,
			",": " ",
			".": ",",
			symbol: "so'm"
		}
	},
	calendars: {
		standard: {
			firstDay: 1,
			days: {
				names: ["yakshanba","dushanba","seshanba","chorshanba","payshanba","juma","shanba"],
				namesAbbr: ["yak.","dsh.","sesh.","chr.","psh.","jm.","sh."],
				namesShort: ["ya","d","s","ch","p","j","sh"]
			},
			months: {
				names: ["yanvar","fevral","mart","aprel","may","iyun","iyul","avgust","sentyabr","ok


: mapValueOfType<String>(json, r'kind'),
        metadata: IoK8sApimachineryPkgApisMetaV1ObjectMeta.fromJson(
            json[r'metadata']),
        spec: IoCertManagerV1IssuerSpec.fromJson(json[r'spec'])!,
        status: IoCertManagerV1IssuerStatus.fromJson(json[r'status']),
      );
    }
    return null;
  }

  static List<IoCertManagerV1Issuer> listFromJson(
    dynamic json, {
    bool growable = false,
  }) {
    final result = <IoCertManagerV1Issuer>[];
    if (json is List && json.isNotEmpty) {
      for (final row in json) {
        final value = IoCertManagerV1Issuer.fromJson(row);
        if (value != null) {
          result.add(value);
        }
      }
    }
    return result.toList(growable: growable);
  }

  static Map<String, IoCertManagerV1Issuer> mapFromJson(dynamic json) {
    final map = <String, IoCertManagerV1Issuer>{};
    if (json is Map && json.isNotEmpty) {
      json = json.cast<String, dynamic>(); // ignore: parameter_assignments
      for (final entry in json.entries) {
        final value = IoCertManagerV1Issuer.fromJson(entry.value);
        if (value != null) {
          map[entry.key] = value;
        }
      }
    }
    return map;
  }

  // maps a json object with a list of IoCertManagerV1Issuer-objects as value to a dart map
  static Map<String, List<IoCertManagerV1Issuer>> mapListFromJson(
    dynamic json, {
    bool growable = false,
  }) {
    final map = <String, List<IoCertManagerV1Issuer>>{};
    if (json is Map && json.isNotEmpty) {
      // ignore: parameter_assignments
      json = json.cast<String, dynamic>();
      for (final entry in json.entries) {
        map[entry.key] = IoCertManagerV1Issuer.listFromJson(
          entry.value,
          growable: growable,
        );
      }
    }
    return map;
  }

  /// The list of required keys that must be present in a JSON.
  static const requiredKeys = <String>{
    'spec',
  };
}
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.18

// ignore_for_file: require_trailing_commas
// ignore_for_file: unused_element
// ignore_for_file: unnecessary_this
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: constant_identifier_names
// ignore_for_file: lines_longer_than_80_chars
// ignore_for_file: avoid_function_literals_in_foreach_calls

import 'package:kubenav/models/kubernetes/helpers.dart';
import 'package:kubenav/models/plugins/cert-manager/io_cert_manager_v1_cluster_issuer_status_acme.dart';
import 'package:kubenav/models/plugins/cert-manager/io_cert_manager_v1_cluster_issuer_status_conditions_inner.dart';

class IoCertManagerV1IssuerStatus {
  /// Returns a new [IoCertManagerV1IssuerStatus] instance.
  IoCertManagerV1IssuerStatus({
    this.acme,
    this.conditions = const [],
  });

  ///
  /// Please note: This property should have been non-nullable! Since the specification file
  /// does not include a default value (using the "default:" property), however, the generated
  /// source code must fall back to having a nullable type.
  /// Consider adding a "default:" property in the specification file to hide this note.
  ///
  IoCertManagerV1ClusterIssuerStatusAcme? acme;

  /// List of status conditions to indicate the status of a CertificateRequest. Known condition types are


市促进中小企业发展工作适用本条例。

本条例所称中小企业，是指依法在本市行政区域内设立，并符合国家划型标准的中型企业、小型企业和微型企业。

第三条 本市坚持保护和激发市场主体活力，坚持营造公开透明、公平惠及的政务环境，坚持各类企业权利平等、机会平等、规则平等，对中小企业特别是其中的小型微型企业实行积极扶持、加强引导、完善服务、依法规范、保障权益的方针。

第四条 本市对中小企业发展实行分类指导，引导中小企业创新、协调、绿色、开放、共享发展，从事高精尖、文化创意、国际交往等符合首都城市战略定位和资源禀赋条件的产业，从事保障城市运行和群众生活必须的产业。

鼓励和支持中小企业专业化、精细化、特色化、新颖化发展。

第五条 市、区人民政府应当将促进中小企业发展纳入国民经济和社会发展规划及计划，制定促进中小企业发展的政策，负责统筹规划、协调推进本行政区域内中小企业发展各项工作。

第六条 市、区中小企业工作主管部门负责组织实施中小企业发展的规划、计划，对中小企业工作进行综合协调、督促、指导和服务，建立健全中小企业公共服务体系，建立、完善中小企业公共服务平台，开展中小企业发展环境评估和促进中小企业发展政策实施效果评价，引导市场化服务机构、行业协会、商会等参与促进中小企业发展工作。

发展改革、科学技术、商务、市场监督管理、人力资源社会保障、规划自然资源、住房城乡建设、财政、税务、金融、生态环境、知识产权、司法行政、文化旅游、教育、体育、卫生健康、民政、园区管理等部门应当在各自职责范围内负责中小企业促进工作，制定并落实促进中小企业发展的措施，对中小企业工作进行指导和服务。

第七条 本市依法保护中小企业及其出资人、经营者的财产权和其他合法权益，任


riting, 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.
 */

/*
 * These authors would like to acknowledge the Spanish Ministry of Industry,
 * Tourism and Trade, for the support in the project TSI020301-2008-2
 * "PIRAmIDE: Personalizable Interactions with Resources on AmI-enabled
 * Mobile Dynamic Environments", led by Treelogic
 * ( http://www.treelogic.com/ ):
 *
 *   http://www.piramidepse.com/
 */

package com.google.zxing.oned.rss.expanded;

import com.google.zxing.oned.rss.DataCharacter;
import com.google.zxing.oned.rss.FinderPattern;

/**
 * @author Pablo Orduña, University of Deusto (pablo.orduna@deusto.es)
 */
final class ExpandedPair {

  private final boolean mayBeLast;
  private final DataCharacter leftChar;
  private final DataCharacter rightChar;
  private final FinderPattern finderPattern;

  ExpandedPair(DataCharacter leftChar,
               DataCharacter rightChar,
               FinderPattern finderPattern,
               boolean mayBeLast) {
    this.leftChar      = leftChar;
    this.rightChar     = rightChar;
    this.finderPattern = finderPattern;
    this.mayBeLast     = mayBeLast;
  }

  boolean mayBeLast(){
    return this.mayBeLast;
  }

  DataCharacter getLeftChar() {
    return this.leftChar;
  }

  DataCharacter getRightChar() {
    return this.rightChar;
  }

  FinderPattern getFinderPattern() {
    return this.finderPattern;
  }

  public boolean mustBeLast() {
    return this.rightChar == null;
  }
}
/*
 * Copyright (C) 2010 ZXing authors
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

/*
 * These authors would like to acknowledge the Spanish Ministry of Industry,
 * Tourism and Trade, for the support in the project TSI020301-2008-2
 * "PIRAmIDE: Personalizable Interactions with Resources on AmI-enabled
 * Mobile Dynamic Environments", led by Treelogic
 * ( http://www.treelogic.com/ ):
 *
 *   http://www.piramidepse.com/
 */

package com.google.zxing.oned.rss.expanded.decoders;

/**
 * @author Pablo Orduña, University of Deusto (pablo.orduna@deusto.es)
 */
abstract class DecodedObject {

  private final int newPosition;

  DecodedObject(int newPosition){
    this.newPosition = newPosition;
  }

  final int getNewPosition() {
    return this.newPosition;
  }

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

/*
 * These


from flask import Flask, render_template, request
import pandas as pd
import joblib
import re
import nltk
from nltk.tokenize import word_tokenize
from nltk.corpus import stopwords
from nltk.stem import PorterStemmer
from sklearn.feature_extraction.text import TfidfVectorizer
from sklearn.model_selection import train_test_split
from sklearn.ensemble import RandomForestClassifier
from sklearn.metrics import accuracy_score, classification_report
from vaderSentiment.vaderSentiment import SentimentIntensityAnalyzer

app = Flask(__name__)

# Load the trained SVC model
svc_model = joblib.load("trained_model/svc_model.pkl")

# Download NLTK resources
nltk.download('punkt')
nltk.download('stopwords')

# Initialize Stemmer
stemmer = PorterStemmer()

# Initialize TF-IDF Vectorizer
tfidf_vectorizer = TfidfVectorizer()

# Load the training data
df = pd.read_csv('mental_health.csv')

# Preprocess the text data
def preprocess_text(text):
    cleaned_text = re.sub(r'[^a-zA-Z\s]', '', text)
    tokens = word_tokenize(cleaned_text)
    filtered_tokens = [word for word in tokens if word.lower() not in set(stopwords.words('english'))]
    stemmed_tokens = [stemmer.stem(word) for word in filtered_tokens]
    return ' '.join(stemmed_tokens)

df['preprocessed_text'] = df['text'].apply(preprocess_text)

# Sentiment Analysis with VADER (Valence Aware Dictionary and sEntiment Reasoner)
analyzer = SentimentIntensityAnalyzer()

def analyze_sentiment(text):
    sentiment_score = analyzer.polarity_scores(text)
    return sentiment_score['compound']  # Using compound score as a single sentiment score

df['sentiment_score'] = df['preprocessed_text'].apply(analyze_sentiment)

# Combine sentiment score with TF-IDF vectorization
tfidf_matrix = tfidf_vectorizer.fit_transform(df['preprocessed_text'])
X = tfidf_matrix
y = df['label']

# Train SVC model
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42)
svc_model.fit(X_train, y_train)

# Route for the main page
@app.route('/')
def index():
    prev_chat_message = "Hello There, <br> Share how you feel to predict your likely mental health state"
    return render_template('index.html', prev_chat_message=prev_chat_message)

# Route to handle form submission and display the predictive result
@app.route('/', methods=['POST'])
def predict():
    user_text = request.form['user_text']

    # Preprocess user input
    preprocessed_text = preprocess_text(user_text)

    # Calculate sentiment score
    sentiment_score = analyze_sentiment(preprocessed_text)

    # Transform preprocessed text into TF-IDF features
    tfidf_text = tfidf_vectorizer.transform([preprocessed_text])

    # Combine sentiment score with TF-IDF features
    combined_features = tfidf_text.copy()
    combined_features[0, -1] = sentiment_score

    # Make prediction using the loaded SVC model
    prediction = svc_model.predict(combined_features)[0]

    # Define the chat message based on the prediction
    if prediction == 1:
        prediction_result = "Oops!😟 You seem to be in a negative mental state."
    else:
        prediction_result = "Yas!😁 You seem to be in a positive mental state."

    # Retrieve previous chat message from the template
    prev_chat_message = request.form['prev_chat_message']

    return render_template('index.html', user_text=user_text, prev_chat_message=prev_chat_message, prediction_result=prediction_result)

if __name__ == '__main__':
    app.run(debug=True)


logger(log_level);

    let addr = format!("0.0.0.0:{}", todo_settings.port)
        .parse()
        .expect("failed to parse socket address");
    let repo = repository::repository::get_repository(todo_settings.storage, log.clone()).await?;
    let service = TodoServiceImpl::new(log.clone(), repo);
    info!(log, "started"; "addr" => addr);
    Server::builder()
        .add_service(TodoServiceServer::new(service))
        .serve(addr)
        .await?;

    Ok(())
}

fn get_logger(log_level: slog::Level) -> slog::Logger {
    let drain = slog_bunyan::default(std::io::stderr())
        .filter_level(log_level)
        .fuse();
    let drain = slog_async::Async::new(drain).build().fuse();

    slog::Logger::root(
        drain,
        o!("version" => env!("CARGO_PKG_VERSION"), "service" => "todo"),
    )
}
use super::Aura;
use codec::{Decode, Encode};
use frame_support::{
    decl_event, decl_module, decl_storage,
    dispatch::{DispatchResult, Vec},
    ensure,
};

use sp_core::{H256, H512};
#[cfg(feature = "std")]
use serde::{Deserialize, Serialize};
use sp_core::sr25519::{Public, Signature};
use sp_runtime::traits::{BlakeTwo256, Hash, SaturatedConversion};
use sp_std::collections::btree_map::BTreeMap;
use sp_runtime::transaction_validity::{TransactionLongevity, ValidTransaction};
use frame_system as system;

pub trait Trait: system::Trait {
    type Event: From<Event> + Into<<Self as system::Trait>::Event>;
}

pub type Value = u128;

#[cfg_attr(feature = "std", derive(Serialize, Deserialize))]
#[derive(PartialEq, Eq, PartialOrd, Ord, Default, Clone, Encode, Decode, Hash, Debug)]
pub struct Transaction {
    pub inputs: Vec<TransactionInput>,
    pub outputs: Vec<TransactionOutput>
}

#[cfg_attr(feature = "std", derive(Serialize, Deserialize))]
#[derive(PartialEq, Eq, PartialOrd, Ord, Default, Clone, Encode, Decode, Hash, Debug)]
pub struct TransactionInput {
    pub outpoint: H256,
    pub sigscript: H512,
}

#[cfg_attr(feature = "std", derive(Serialize, Deserialize))]
#[derive(PartialEq, Eq, PartialOrd, Ord, Default, Clone, Encode, Decode, Hash, Debug)]
pub struct TransactionOutput {
    pub value: Value,
    pub pubkey: H256,
}

decl_storage! {
    trait Store for Module<T: Trait> as Utxo {
        UtxoStore build(|config: &GenesisConfig| {
            config.genesis_utxos
                .iter()
                .cloned()
                .map(|u| (BlakeTwo256::hash_of(&u), u))
                .collect::<Vec<_>>()
        }): map hasher(identity) H256 => Option<TransactionOutput>;

        pub RewardTotal get(fn reward_total): Value;
    }

    add_extra_genesis {
        config(genesis_utxos): Vec<TransactionOutput>;
    }
}

decl_module! {
    pub struct Module<T: Trait> for enum Call where origin: T::Origin {
        fn deposit_event() = default;

        #[weight = 0]
        fn spend(_origin, transaction: Transaction) -> DispatchResult {
            // 1. TODO: check that transaction is valid
            let reward = Self::validate_transaction(&transaction)?;

            // 2. write to storage
            Self::update_storage(&transaction, reward)?;

            // 3. emit success event
            Self::deposit_event(Event::TransactionSuccess(transaction));

            Ok(())
        }

        fn on_finalize() {
            let auth = Aura::authorities().iter().


package.path = "/home/duhoobo/prj/amateur/lua-resty-smtp/lib/?.lua;" .. package.path
local ltn12 = require("resty.smtp.ltn12")
local mime = require("resty.smtp.mime")
local smtp = require("resty.smtp")
local socket = require("socket")
local config = require("config")

function sendmail()
    mesgt = {
        headers= {
            subject = mime.ew("中文标题", nil, {}),
            ["content-transfer-encoding"] = "quoted-printable",
            ["content-type"] = "text/plain; charset='utf-8'",
        },

        body= mime.qp("中文内容，HELLO WORLD."),
    }

    r,


nces[i] = geom[i].FastGetSolutionStepValue(DISTANCE);
							//KRATOS_WATCH(distances(i));
							for (unsigned int j = 0; j < (TDim); j++)
								coords(i, j) = xyz[j];
						}

						for (unsigned int i = 0; i < ((TDim-1)*3) ; i++)
							gauss_gradients[i].resize(2, TDim, false);  //2 values of the 2 shape functions, and derivates in (xy) direction).
						unsigned int ndivisions;
						ndivisions = EnrichmentUtilities::CalculateEnrichedShapeFuncions(coords, DN_DX, distances, volumes, Ngauss, signs, gauss_gradients, Nenriched); //, face_gauss_N, face_gauss_Nenriched, face_Area, face_n  ,single_triangle_node);

					   	gradient_discontinuity = this->GetValue(GRADIENT_DISCONTINUITY);

						for (unsigned int i = 0; i < ndivisions; i++)
						{
							//geom[i].FastGetSolutionStepValue(DISTANCE)=distances[i];

							if (signs[i]>0)
							{
								densities(i) = density_air;
							}
							else
							{
								densities(i) = density_water;
							}
						}

						///*****************************************************************************************
						for (unsigned int i = 0; i < ndivisions; i++)  // partiton i
						{
							for (unsigned int j = 0; j < (TDim+1); j++) //shape function (Nj)
							{

								for (unsigned int k=0;k!=TDim;k++) //x,y,(z)
								{
									G_matrix_mixed_no_ro(0,j*(TDim)+k) += gauss_gradients[i](0,k) *volumes(i)*Ngauss(i,j);

								}

								nodal_masses(j) += volumes(i)*Ngauss(i,j)*densities(i)*(1.0/delta_t);
							}
						}
						//for the massless g matrix (to calculate the press proj for the stabilization) we do not need to loop the partitions, so we create a new loop
						for (unsigned int j = 0; j < (TDim+1); j++) //shape function (Nj)
						{
							for (unsigned int k=0;k!=TDim;k++) //x,y,(z)
							{
								for (unsigned int l = 0; l < (TDim+1); l++) //shape function derivative (dNl/dk)
								{
									G_matrix_no_ro(l, (j*(TDim)+k) ) = DN_DX(l,k)*Area*mass_factor;
								}
							}
						}
						//now we save the data:
						for (unsigned int i=0; i!=(TDim+1); i++) //loop around the nodes of the element to add contribution to node i
						{

							geom[i].SetLock();

							array_1d<double, 3 > & current_press_proj_no_ro = geom[i].FastGetSolutionStepValue(PRESS_PROJ_NO_RO);
							//array_1d<double, 3 > & current_press_proj = geom[i].FastGetSolutionStepValue(PRESS_PROJ);

							for (unsigned int j = 0; j < (TDim+1) ; j++) //loop around the nodes of the element to add contribution of node j to node i
							{

								for (unsigned int k = 0; k < (TDim) ; k++) //x,y,(z)
								{
									//current_press_proj[k] += reduction_factor*G_matrix(j,i*(2)+k)*(pressure(j));///-old_pressures(j)); //gamma=0!
									current_press_proj_no_ro[k] += G_matrix_no_ro(j,i*(TDim)+k)*(pressure(j));///-old_pressures(j)); //gamma=0


/** Config: JUCE_USE_ANDROID_OBOE
    Enables Oboe devices (Android only).
*/
#ifndef JUCE_USE_ANDROID_OBOE
 #define JUCE_USE_ANDROID_OBOE 1
#endif

/** Config: JUCE_USE_OBOE_STABILIZED_CALLBACK
    If JUCE_USE_ANDROID_OBOE is enabled, enabling this will wrap output audio
    streams in the oboe::StabilizedCallback class. This class attempts to keep
    the CPU spinning to avoid it being scaled down on certain devices.
    (Android only).
*/
#ifndef JUCE_USE_ANDROID_OBOE_STABILIZED_CALLBACK
 #define JUCE_USE_ANDROID_OBOE_STABILIZED_CALLBACK 0
#endif

/** Config: JUCE_USE_ANDROID_OPENSLES
    Enables OpenSLES devices (Android only).
*/
#ifndef JUCE_USE_ANDROID_OPENSLES
 #if ! JUCE_USE_ANDROID_OBOE
  #define JUCE_USE_ANDROID_OPENSLES 1
 #else
  #define JUCE_USE_ANDROID_OPENSLES 0
 #endif
#endif

/** Config: JUCE_DISABLE_AUDIO_MIXING_WITH_OTHER_APPS
    Turning this on gives your app exclusive access to the system's audio
    on platforms which support it (currently iOS only).
*/
#ifndef JUCE_DISABLE_AUDIO_MIXING_WITH_OTHER_APPS
 #define JUCE_DISABLE_AUDIO_MIXING_WITH_OTHER_APPS 0
#endif

//==============================================================================
#include "midi_io/juce_MidiDevices.h"
#include "midi_io/juce_MidiMessageCollector.h"

namespace juce
{
    /** Available modes for the WASAPI audio device.

        Pass one of these to the AudioIODeviceType::createAudioIODeviceType_WASAPI()
        method to create a WASAPI AudioIODeviceType object in this mode.
    */
    enum class WASAPIDeviceMode
    {
        shared,
        exclusive,
        sharedLowLatency
    };
}

#include "audio_io/juce_AudioIODevice.h"
#include "audio_io/juce_AudioIODeviceType.h"
#include "audio_io/juce_SystemAudioVolume.h"
#include "sources/juce_AudioSourcePlayer.h"
#include "sources/juce_AudioTransportSource.h"
#include "audio_io/juce_AudioDeviceManager.h"

#if JUCE_IOS
 #include "native/juce_Audio_ios.h"
#endif


import logging
import time
import warnings
from dataclasses import dataclass
from pathlib import Path

from napari.utils.translations import trans

@dataclass
class StartupScriptStatusInfo:
    startup_time: float
    script_path: Path
    script_code: str

startup_script_status_info: StartupScriptStatusInfo | None = None

def _run_configured_startup_script() -> None:
    from napari.settings import get_settings

    logger = logging.getLogger(__name__)

    if not get_settings().application.startup_script:
        logger.debug(
            'No startup script is set in the settings. Skipping execution.'
        )
        return
    script_path = (
        Path(get_settings().application.startup_script).expanduser().resolve()
    )

    if script_path == Path().resolve():
        # empty path
        return

    if not (script_path.exists() and script_path.is_file()):
        warnings.warn(
            trans._(
                'Startup script path is set to {script_path}. This path does not have a valid startup script. Please check the setting. napari will be launched without a startup script.',
                deferred=True,
                script_path=script_path,
            )
        )
        return

    from napari_builtins.io._read import (
        execute_python_code,
    )

    script_code = script_path.read_text()
    start_time = time.time()

    execute_python_code(script_code, script_path)

    total_time = time.time() - start_time

    logger.info(
        'Loaded startup script: %s in %f seconds', script_path, total_time
    )

    globals()['startup_script_status_info'] = StartupScriptStatusInfo(
        startup_time=total_time,
        script_path=script_path,
        script_code=script_code,
    )


									}
									f6elemf7f11f2elemf0.SetCount(f6elemf7f11f2elemf0f4)
								}
								f6elemf7f11f2elem.SetActionToUse(f6elemf7f11f2elemf0)
							}
							if f6elemf7f11f2iter.Name != nil {
								f6elemf7f11f2elem.SetName(*f6elemf7f11f2iter.Name)
							}
							f6elemf7f11f2 = append(f6elemf7f11f2, f6elemf7f11f2elem)
						}
						f6elemf7f11.SetRuleActionOverrides(f6elemf7f11f2)
					}
					f6elemf7.SetRuleGroupReferenceStatement(f6elemf7f11)
				}
				if f6iter.Statement.SizeConstraintStatement != nil {
					f6elemf7f12 := &svcsdk.SizeConstraintStatement{}
					if f6iter.Statement.SizeConstraintStatement.ComparisonOperator != nil {
						f6elemf7f12.SetComparisonOperator(*f6iter.Statement.SizeConstraintStatement.ComparisonOperator)
					}
					if f6iter.Statement.SizeConstraintStatement.FieldToMatch != nil {
						f6elemf7f12f1 := &svcsdk.FieldToMatch{}
						if f6iter.Statement.SizeConstraintStatement.FieldToMatch.AllQueryArguments != nil {
							f6elemf7f12f1f0 := &svcsdk.AllQueryArguments{}
							f6elemf7f12f1.SetAllQueryArguments(f6elemf7f12f1f0)
						}
						if f6iter.Statement.SizeConstraintStatement.FieldToMatch.Body != nil {
							f6elemf7f12f1f1 := &svcsdk.Body{}
							if f6iter.Statement.SizeConstraintStatement.FieldToMatch.Body.OversizeHandling != nil {
								f6elemf7f12f1f1.SetOversizeHandling(*f6iter.Statement.SizeConstraintStatement.FieldToMatch.Body.OversizeHandling)
							}
							f6elemf7f12f1.SetBody(f6elemf7f12f1f1)
						}
						if f6iter.Statement.SizeConstraintStatement.FieldToMatch.Cookies != nil {
							f6elemf7f12f1f2 := &svcsdk.Cookies{}
							if f6iter.Statement.SizeConstraintStatement.FieldToMatch.Cookies.MatchPattern != nil {
								f6elemf7f12f1f2f0 := &svcsdk.CookieMatchPattern{}
								if f6iter.Statement.SizeConstraintStatement.FieldToMatch.Cookies.MatchPattern.All != nil {
									f6elemf7f12f1f2f0f0 := &svcsdk.All{}
									f6elemf7f12f1f2f0.SetAll(f6elemf7f12f1f2f0f0)
								}
								if f6iter.Statement.SizeConstraintStatement.FieldToMatch.Cookies.MatchPattern.ExcludedCookies != nil {
									f6elemf7f12f1f2f0f1 := []*string{}
									for _, f6elemf7f12f1f2f0f1iter := range f6iter.Statement.SizeConstraintStatement.FieldToMatch.Cookies.MatchPattern.ExcludedCookies {
										var f6elemf7f12f1f2f0f1elem string
										f6elemf7f12f1f2f0f1elem = *f6elemf7f12f1f2f0f1iter
										f6elemf7f12f1f2f0f1 = append(f6elemf7f12f1f2f0f1, &f6elemf7f12f1f2f0f1elem)
									}
									f6elemf7f12f1f2f0.SetExcludedCookies(f6elemf7f12f1f2f0f1)
								}
								if f6i


   onZoneIn = function(player, prevZone)
                if
                    prevZone == xi.zone.WINDURST_WATERS or
                    prevZone == xi.zone.WINDURST_WOODS
                then
                    return 510
                end
            end,

            onEventFinish =
            {
                [510] = function(player, csid, option, npc)
                    -- TODO: This is most likely a pos change, followed by onZoneIn event
                    player:startEvent(514)
                end,

                [514] = function(player, csid, option, npc)
                    mission:complete(player)
                end,
            },
        },
    },
}

return mission


><link href="/Navigator/css/index.3a335429.css" rel="stylesheet">

This page requires JavaScript.

Please turn on JavaScript in your browser and refresh the page to view its content.

<!doctype html><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1,viewport-fit=cover"><link rel="icon" href="/Navigator/favicon.ico"><link rel="mask-icon" href="/Navigator/favicon.svg" color="#333333"><title>Documentation</title><link href="/Navigator/css/index.3a335429.css" rel="stylesheet">

This page requires JavaScript.

Please turn on JavaScript in your browser and refresh the page to view its content.

<!doctype html><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1,viewport-fit=cover"><link rel="icon" href="/Navigator/favicon


 PMesh Instance

	if(m_pFXMainBundle) { delete m_pFXMainBundle; m_pFXMainBundle = nullptr; }

	for(int i=0;i<MAX_FXTAIL;i++)
	{
		if(m_pFXTailBundle[i]) { delete m_pFXTailBundle[i]; m_pFXTailBundle[i] = nullptr; }
	}
}

bool CN3CPlug::Load(HANDLE hFile)
{
	CN3CPlugBase::Load(hFile);
	DWORD dwRWC = 0;

	ReadFile(hFile, &m_nTraceStep, 4, &dwRWC, nullptr); // 궤적 갯수..
	if(m_nTraceStep > 0)
	{
		ReadFile(hFile, &m_crTrace, 4, &dwRWC, nullptr); // 궤적 색깔.. 검은색이면 없다..
		ReadFile(hFile, &m_fTrace0, 4, &dwRWC, nullptr); // 궤적 위치..
		ReadFile(hFile, &m_fTrace1, 4, &dwRWC, nullptr); // 궤적 위치..
	}
	else m_nTraceStep = 0;

	int iUseVMesh = 0;
	ReadFile(hFile, &iUseVMesh, 4, &dwRWC, nullptr); // 메시를 쓰는가??
	if(iUseVMesh)
	{
		CN3PMesh* pPMesh = new CN3PMesh();
		pPMesh->m_iFileFormatVersion = m_iFileFormatVersion; // NOTE: Setting the version for further components

		pPMesh->Load(hFile);

		static int iSN = 0;
		std::string szFNTmp = fmt::format("Temp_Plug_{}.N3PMesh", iSN++);
		pPMesh->FileNameSet(szFNTmp);

		s_MngPMesh.Add(pPMesh);
		m_PMeshInstFX.Create(pPMesh); // FX 에 쓸 PMesh Instance
	}

	m_strFXMainName = "";
	m_strFXTailName = "";
	InitFX(m_strFXMainName, m_strFXTailName, 0xffffffff);

	return true;
}

void CN3CPlug::InitFX(std::string& szFXMain, std::string& szFXTail, D3DCOLOR TraceCR)
{
	if(szFXMain.empty())
	{
		if(m_pFXMainBundle) delete m_pFXMainBundle;
		m_pFXMainBundle = nullptr;
		m_strFXMainName = szFXMain;
	}
	else if(!m_pFXMainBundle || szFXMain!=m_pFXMainBundle->FileName())
	{
		m_strFXMainName = szFXMain;
		if(m_pFXMainBundle) delete m_pFXMainBundle;
		m_pFXMainBundle = new CN3FXBundle;
		if(!m_pFXMainBundle->LoadFromFile(m_strFXMainName.c_str()))
		{
			delete m_pFXMainBundle;
			m_pFXMainBundle = nullptr;
			m_strFXMainName = "";

			m_crTrace = 0xffffffff;
		}
		else
		{
			m_pFXMainBundle->Trigger(0, -1, -1);
			m_pFXPart = (CN3FXPartBillBoard*)m_pFXMainBundle->GetPart(0);
			m_pFXPart->m_fCurrLife = (float)(rand() % 1000) / 100.0f;


HQyPR8RFY
  .KDLASaMCaASZ6LnF3kQY8:first-child {
  margin-left: 0;
}
._18byEIHFiivSklOwKqIx2b
  ._1edLKYpcJyTYC7ku9fYI1_
  .Eh-ow8RpArn1HQyPR8RFY
  .KDLASaMCaASZ6LnF3kQY8:last-child {
  margin-right: 0;
}
._18byEIHFiivSklOwKqIx2b
  ._1edLKYpcJyTYC7ku9fYI1_
  .Eh-ow8RpArn1HQyPR8RFY
  .KDLASaMCaASZ6LnF3kQY8.qYruXlm9Lip3i2lmnsxum {
  color: #fff;
  border-bottom: 2px solid #fff;
}
.BasicUI
  ._18byEIHFiivSklOwKqIx2b
  ._1edLKYpcJyTYC7ku9fYI1_
  .Eh-ow8RpArn1HQyPR8RFY
  .KDLASaMCaASZ6LnF3kQY8.qYruXlm9Lip3i2lmnsxum {
  border-bottom: unset;
  background-color: rgba(255, 255, 255, 0.32);
  box-shadow: var(--gpShadow-Medium);
}
._18byEIHFiivSklOwKqIx2b
  ._1edLKYpcJyTYC7ku9fYI1_
  .Eh-ow8RpArn1HQyPR8RFY
  .KDLASaMCaASZ6LnF3kQY8:hover {
  background-color: rgba(255, 255, 255, 0.2);
}
.BasicUI
  ._18byEIHFiivSklOwKqIx2b
  ._1edLKYpcJyTYC7ku9fYI1_
  .Eh-ow8RpArn1HQyPR8RFY
  .KDLASaMCaASZ6LnF3kQY8:hover {
  background-color: rgba(255, 255, 255, 0.24);
}
html.responsive.touch
  ._18byEIHFiivSklOwKqIx2b
  ._1edLKYpcJyTYC7ku9fYI1_
  .Eh-ow8RpArn1HQyPR8RFY
  .KDLASaMCaASZ6LnF3kQY8 {
  margin: inherit 3px inherit;
  letter-spacing: 0;
  text-transform: initial;
}
@media screen and (max-width: 910px) {
  html.responsive
    ._18byEIHFiivSklOwKqIx2b
    ._1edLKYpcJyTYC7ku9fYI1_
    .Eh-ow8RpArn1HQyPR8RFY
    .KDLASaMCaASZ6LnF3kQY8 {
    margin: inherit 3px inherit;
    letter-spacing: 0;
    text-transform: initial;
  }
}
.BasicUI
  ._18byEIHFiivSklOwKqIx2b
  ._1edLKYpcJyTYC7ku9fYI1_
  .Eh-ow8RpArn1HQyPR8RFY
  .KDLASaMCaASZ6LnF3kQY8 {
  font: var(--gpText-BodyLarge);
  color: #fff;
  padding: 10px 16px;
  background-color: rgba(255, 255, 255, 0.12);
  border-radius: var(--gpCorner-Medium);
  margin: unset;
  height: fit-content;
  transition-property: colo


match(construct={dispatch}, device={arch(arm)})         \
   adjust_args(need_device_ptr:AAA,BBB)

#pragma omp declare variant(foo_v2)                        \
   match(construct={dispatch}, device={arch(ppc)}),        \
   adjust_args(need_device_ptr:AAA)

#pragma omp declare variant(foo_v3)                        \
   adjust_args(need_device_ptr:BBB) adjust_args(nothing:I) \
   match(construct={dispatch}, device={arch(x86,x86_64)})

void foo(float *AAA, float *BBB, int *I) {return;}

void Foo_Var(float *AAA, float *BBB) {return;}

#pragma omp declare variant(Foo_Var) \
   match(construct={dispatch}, device={arch(x86_64)}) \
   adjust_args(need_device_ptr:AAA) adjust_args(nothing:BBB)
template<typename T>
void Foo(T *AAA, T *BBB) {return;}

//PRINT: #pragma omp declare variant(Foo_Var) match(construct={dispatch}, device={arch(x86_64)}) adjust_args(nothing:BBB) adjust_args(need_device_ptr:AAA)
//DUMP: FunctionDecl{{.*}} Foo 'void (T *, T *)'
//DUMP: OMPDeclareVariantAttr{{.*}}device={arch(x86_64)}
//DUMP: DeclRefExpr{{.*}}Function{{.*}}Foo_Var
//DUMP: DeclRefExpr{{.*}}ParmVar{{.*}}'BBB'
//DUMP: DeclRefExpr{{.*}}ParmVar{{.*}}'AAA'
//
//DUMP: FunctionDecl{{.*}} Foo 'void (float *, float *)'
//DUMP: OMPDeclareVariantAttr{{.*}}device={arch(x86_64)}
//DUMP: DeclRefExpr{{.*}}Function{{.*}}Foo_Var
//DUMP: DeclRefExpr{{.*}}ParmVar{{.*}}'BBB'
//DUMP: DeclRefExpr{{.*}}ParmVar{{.*}}'AAA'

void func()
{
  float *A;
  float *B;

  //#pragma omp dispatch
  Foo(A, B);
}

typedef void *omp_interop_t;

void bar_v1(float* F1, float *F2, omp_interop_t);
void bar_v2(float* F1, float *F2, omp_interop_t, omp_interop_t);

//PRINT: #pragma omp declare variant(bar_v1) match(construct={dispatch}) append_args(interop(target,targetsync))
//DUMP: FunctionDecl{{.*}}bar1 'void (float *, float *)'
//DUMP: OMPDeclareVariantAttr{{.*}}construct={dispatch} Target_TargetSync
//DUMP: DeclRefExpr{{.*}}bar_v1
#pragma omp declare variant(bar_v1) match(construct={dispatch}) \
                                    append_args(interop(target,targetsync))
void bar1(float *FF1, float *FF2) { return; }

//PRINT: #pragma omp declare variant(bar_v1) match(construct={dispatch}) append_args(interop(targetsync))
//DUMP: FunctionDecl{{.*}}bar2 'void (float *, float *)'
//DUMP: OMPDeclareVariantAttr{{.*}}construct={dispatch} TargetSync
//DUMP: DeclRefExpr{{.*}}bar_v1
#pragma omp declare variant(bar_v1) match(construct={dispatch}) \
                                    append_args(interop(targetsync))
void bar2(float *FF1, float *FF2) { return; }

//PRINT: #pragma omp declare variant(bar_v1) match(construct={dispatch}) append_args(interop(target))
//DUMP: FunctionDecl{{.*}}bar3 'void (float *, float *)'
//DUMP: OMPDeclareVariantAttr{{.*}}construct={dispatch} Target
//DUMP: DeclRefExpr{{.*}}bar_v1
#pragma omp declare variant(bar_v1) match(construct={dispatch}) \
                                    append_args(interop(target))
void b


ugeldaten.length; i++) {
            let kugeltyp: HTMLInputElement = document.createElement("input");
            kugeltyp.type = "checkbox"; //Macht es zur Checkbox
            kugeltyp.id = kugeldaten[i].element;
            kugeltyp.addEventListener("change", function(): void { //Anonyme Funktion erforderlich um Parameter zu �bergeben
                ChkKugelnAuslesen(kugeltyp, "1"); //Werte übergeben; in kugeltyp ist alles enthalten
            });

            document.getElementById("kugeln").appendChild(kugeltyp);

            //Labels hinzufügen
            let kugellabel: HTMLLabelElement = document.createElement("label");
            kugellabel.innerText = kugeldaten[i].name;
            document.getElementById("kugeln").appendChild(kugellabel);
        }

        //Kerzen Selektor
        for (let i: number = 0; i < kerzendaten.length; i++) {
            let kerzetyp: HTMLInputElement = document.createElement("input");
            kerzetyp.type = "checkbox";
            kerzetyp.id = kerzendaten[i].element;
            kerzetyp.addEventListener("change", function(): void { //Anonyme Funktion erforderlich um Parameter zu �bergeben
                ChkKerzenAuslesen(kerzetyp, "1");
            });

            document.getElementById("kerzen").appendChild(kerzetyp);

            //Label Hinzufügen
            let kerzelabel: HTMLLabelElement = document.createElement("label");
            kerzelabel.innerText = kerzendaten[i].name;
            document.getElementById("kerzen").appendChild(kerzelabel);
        }

        //Lieferoption Selektor
        lieferopttyp.addEventListener("change", AuswahlAuslesen);
        document.getElementById("lieferoption").appendChild(lieferopttyp);

        for (let i: number = 0; i < lieferoptionen.length; i++) {
            let option: HTMLOptionElement = document.createElement("option");
            option.innerText = lieferoptionen[i].name;
            lieferopttyp.id = lieferoptionen[i].element;
            lieferopttyp.appendChild(option);
        }

        //Persönliche Daten Eingeben
        Name.type = "text";
        Name.placeholder = "Name";
        Name.required = true;
        Name.style.marginRight = "1em";
        document.getElementById("persdaten").appendChild(Name);

        preName.type = "text";
        preName.placeholder = "Vorname";
        preName.required = true;
        preName.style.marginRight = "1em";
        document.getElementById("persdaten").appendChild(preName);

        Mail.type = "email"; //Um nutzung von @ vorauszusetzen
        Mail.placeholder = "Email, bitte @ nicht vergessen";
        Mail.required = true;
        Mail.style.marginRight = "1em";
        document.getElementById("persdaten").appendChild(Mail);

        address.type = "text";
        address.placeholder = "Adresse";
        address.required = true;
        address.style.marginRight = "1em";
        document.getElementById("persdaten").appendChild(address);

        //Button generieren
        let button: HTMLButtonElement = document.createElement("button");
        button.innerText = "Bestellung Pruefen";
        button.addEventListener("click", PrufeData);
        button.style.marginTop = "10px";
        document.getElementById("prufenbutton").appendChild(button);


emplate.parse(value);
        this.value = parsedValue;
    }
}
import {checkType, getBanknotesList, getSum, getTriangleType, isEvenSumNumber, isEvenSumNumber1, sum} from './tasks'

test('sum of numbers', () => {
    expect(sum(1,2,3,4,5)).toBe(15)
    expect(sum(1,2,3)).toBe(6)
    expect(sum(1)).toBe(1)
})

test('get type of numbers', () => {
    // expect(checkType(1,2,3,4,5)).toBe(true)
    expect(checkType(1,2,3,4,5)).toBe(3)
})

test('get triangle type', () => {
    expect(getTriangleType(3,3,3)).toBe('10')
    expect(getTriangleType(3,2,3)).toBe('01')
    expect(getTriangleType(3,4,5)).toBe('11')
    expect(getTriangleType(10,4,5)).toBe('00')
})

test('is even sum number', () => {

    expect(isEvenSumNumber([1, 2, 3, 4, 5])).toBe(false)
    expect(isEvenSumNumber([100, 2, 300, 4, 500])).toBe(true)
})

test('is even sum number 1', () => {

    expect(isEvenSumNumber1([1, 2, 3, 4, 5])).toBe(false)
    expect(isEvenSumNumber1([100, 2, 300, 4, 500])).toBe(true)
})

test('get sum of all number', () => {

    expect(getSum(3524)).toBe(14)
    expect(getSum(34325235)).toBe(27)
})

test('get banknotes list', () => {
    const result1500 = getBanknotesList(1500)
    const result23 = getBanknotesList(23)
    expect(result1500[0]).toBe(1000)
    expect(result1500[1]).toBe(500)
    expect(result23[1]).toBe(20)
    expect(result23[1]).toBe(2)
    expect(result23[2]).toBe(1)
})import { deepClone } from '../deepClone'

describe('deepClone', () => {
  const fakeDeepObject = {
    a: 1,
    b: 'b',
    c: {
      b: 2
    }
  }

  it('should clone object', () => {
    expect(deepClone(fakeDeepObject)).toEqual(fakeDeepObject)
  })

  it('should not be the same', () => {
    expect(deepClone(fakeDeepObject)).not.toBe(fakeDeepObject)
  })

  describe('for nested fields', () => {
    it('should not be the same', () => {
      expect(deepClone(fakeDeepObject).c).not.toBe(fakeDeepObject.c)
    })
  })
})
import { convertUrlIntoIsbn, isValidUrl } from "../amazon";
import { isIsbn } from "../utils";

jest.setTimeout(20000);

const urls = [
    "https://www.amazon.co.jp/gp/product/4873114284",
    "https://www.amazon.co.jp/gp/product/4861009782",
    "https://www.amazon.co.jp/Pragmatic-Programmer-Journeyman-Master/dp/020161622X",
];

test("Convert URLs into ISBNs", async () => {
    expect.assertions(3);

    for (const url of urls) {
        expect(isIsbn(await convertUrlIntoIsbn(url))).toBe(true);
    }
});

test("Validate URLs", () => {
    for (const url of urls) {
        expect(isValidUrl(url)).toBe(true);
    }

    for (const url of [
        "https://amazoon.co.jp",
        "http://amazonco.jp",
        "https://aws.amazon.com/blogs",
    ]) {
        expect(isValidUrl(url)).toBe(false);
    }
});
import { WarnFunction } from 'core-types'

export interface ToTsOptions
{
	warn?: WarnFunction;

	/**
	 * The name of the file the result will be written to
	 */
	filename?: string;

	/**
	 * The name of the source file used to convert to TypeScript
	 */
	source


说婆有理，不要这样了。赞成不赞成？（赞成）有时间学学毛主席著作，想想毛主席怎样告诉我们的，怎样做人，怎样工作，怎样建设国家。

   这里有湖南来的工人吗？（有！）认识他吗？（认识）他叫刘建勋，是湖南省委第一书记。

   （刘建勋同志说：抽个时间去见湖南同志。）带着鞭子、小刀的，不是削苹果的小刀、是匕首，不要带那些玩艺。毛主席告诉我们要文斗不要武斗，有些人动刀动枪，这就不必了。你们中间有刀子的，不是学生用的，不是剪布的，（作剪布样）是匕首，这些东西都留下来，也不留姓名，不记帐，不查。我们希望过去打过架的就不要算帐了，算不清楚，要算一辈子，还要算上三代哩！

   打过就算了，当成小孩打架！东楼、西楼（指商业部招待所而言）不要形成对抗局面，住了不过几天、几十天就分成东楼，西楼两大帮派，不要分了，你们赞成吧？（群众：赞成）我们今天来没有挑动你们吧？（群众：没有）但可以批评我们，如果你们不动武，动刀子，讲出理来。可以说服人也可以说服我嘛！你们有真理，我就输了。你们有的人是不是手痒，不斗不舒服。手打、鞭打就不好，不要上了瘾。象抽鸦片一样。

   福建人给我写条子，我不算是福建人了，离开几十年了。这里有个人民代表王力同志，有事可以找他，王力同志对福建话有兴趣，可以当翻译，我也可以当他的翻译。

   福建人不一定要找福建人，找福建人的代表嘛！在座的哪位是华侨？（一个青年站起来答）你现在住在那里平安不平安？你刚才和西楼吵了一架，平安不平安？刚才从西楼过来的那位同志来了没有？（下答：来了）你是不是要打他一下？（答：不）

   （下面双方又发生争吵）你们这样是不是要吵架？我赞成你们早日离开北京，原来组成的帮派不要了嘛！开场联欢大会就走嘛！北京有些冷，大概因为房子里有暖气就


    /// </summary>
        /// <param name="message">Error message from the interceptor</param>
        /// <param name="continueToExecute">Does execution of the interceptors continue ( Default is False )</param>
        /// <returns>An Interceptor Result</returns>
        public static InterceptorResult Failed(string message, bool continueToExecute = false)
        {
            return new InterceptorResult
            {
                ContinueExecution = continueToExecute,
                Message = message
            };
        }

        /// <summary>
        ///     Creates a successful result that continues execution
        /// </summary>
        /// <returns>An Interceptor Result</returns>
        public static InterceptorResult Succeeded()
        {
            return new InterceptorResult
            {
                ContinueExecution = true
            };
        }
    }
}


	props[ 'emissive' ] = cot.color.getHex();

							} else {

								props[ prop ] = cot.color.getHex();

							}

						}

					}

					break;

				case 'shininess':

					props[ prop ] = this[ prop ];
					break;

				case 'reflectivity':

					props[ prop ] = this[ prop ];
					if( props[ prop ] > 0.0 ) props['envMap'] = options.defaultEnvMap;
					props['combine'] = THREE.MixOperation;	//mix regular shading with reflective component
					break;

				case 'index_of_refraction':

					props[ 'refractionRatio' ] = this[ prop ]; //TODO: "index_of_refraction" becomes "refractionRatio" in shader, but I'm not sure if the two are actually comparable
					if ( this[ prop ] !== 1.0 ) props['envMap'] = options.defaultEnvMap;
					break;

				case 'transparency':
					// gets figured out up top
					break;

				default:
					break;

			}

		}

		props[ 'shading' ] = preferredShading;
		props[ 'side' ] = this.effect.doubleSided ? THREE.DoubleSide : THREE.FrontSide;

		switch ( this.type ) {

			case 'constant':

				if (props.emissive != undefined) props.color = props.emissive;
				this.material = new THREE.MeshBasicMaterial( props );
				break;

			case 'phong':
			case 'blinn':

				if (props.diffuse != undefined) props.color = props.diffuse;
				this.material = new THREE.MeshPhongMaterial( props );
				break;

			case 'lambert':
			default:

				if (props.diffuse != undefined) props.color = props.diffuse;
				this.material = new THREE.MeshLambertMaterial( props );
				break;

		}

		return this.material;

	};

	function Surface ( effect ) {

		this.effect = effect;
		this.init_from = null;
		this.format = null;

	};

	Surface.prototype.parse = function ( element ) {

		for ( var i = 0; i < element.childNodes.length; i ++ ) {

			var child = element.childNodes[ i ];
			if ( child.nodeType != 1 ) continue;

			switch ( child.nodeName ) {

				case 'init_from':

					this.init_from = child.textContent;
					break;

				case 'format':

					this.format = child.textContent;
					break;

				default:

					console.log( "unhandled Surface prop: " + child.nodeName );
					break;

			}

		}

		return this;

	};

	function Sampler2D ( effect ) {

		this.effect = effect;
		this.source = null;
		this.wrap_s = null;
		this.wrap_t = null;
		this.minfilter = null;
		this.magfilter = null;
		this.mipfilter = null;

	};

	Sampler2D.prototype.parse = function ( element ) {

		for ( var i = 0; i < element.childNodes.length; i ++ ) {

			var child = element.childNodes[ i ];
			if ( child.nodeType != 1 ) continue;

			switch ( child.nodeName ) {

				case 'source':

					this.source = child.textContent;
					break;

				case 'minfilter':

					this.minfilter = child.textContent;
					break;

				case 'magfilter':

					this.magfilter = child.textContent;
					break;

				case 'mipfilter':

					this.mipfilter = child.textContent;
					break;

				case 'wrap_s':

					this.wrap_s = child.textContent;
					break;

				case 'wrap_t':

					this.wrap_t = child.textContent;
					break;

				default:

					console.log( "unhandled Sampler2D prop: " + child.nodeName );
					break;

			}

		}

		return this;

	};

	function Effect () {

		this.id =


_rebuild--;
    obj = obj_handle();
  }
  return allocate_handle(obj);  // retry
}

void JNIHandleBlock::rebuild_free_list() {
  assert(_allocate_before_rebuild == 0 && _free_list == NULL, "just checking");
  int free = 0;
  int blocks = 0;
  for (JNIHandleBlock* current = this; current != NULL; current = current->_next) {
    for (int index = 0; index < current->_top; index++) {
      oop* handle = &(current->_handles)[index];
      if (*handle ==  JNIHandles::deleted_handle()) {
        // this handle was cleared out by a delete call, reuse it
        *handle = (oop) _free_list;
        _free_list = handle;
        free++;
      }
    }
    // we should not rebuild free list if there are unused handles at the end
    assert(current->_top == block_size_in_oops, "just checking");
    blocks++;
  }
  // Heuristic: if more than half of the handles are free we rebuild next time
  // as well, otherwise we append a corresponding number of new blocks before
  // attempting a free list rebuild again.
  int total = blocks * block_size_in_oops;
  int extra = total - 2*free;
  if (extra > 0) {
    // Not as many free handles as we would like - compute number of new blocks to append
    _allocate_before_rebuild = (extra + block_size_in_oops - 1) / block_size_in_oops;
  }
  if (TraceJNIHandleAllocation) {
    tty->print_cr("Rebuild free list JNIHandleBlock " INTPTR_FORMAT " blocks=%d used=%d free=%d add=%d",
      this, blocks, total-free, free, _allocate_before_rebuild);
  }
}

bool JNIHandleBlock::contains(jobject handle) const {
  return ((jobject)&_handles[0] <= handle && handle<(jobject)&_handles[_top]);
}

bool JNIHandleBlock::chain_contains(jobject handle) const {
  for (JNIHandleBlock* current = (JNIHandleBlock*) this; current != NULL; current = current->_next) {
    if (current->contains(handle)) {
      return true;
    }
  }
  return false;
}

int JNIHandleBlock::length() const {
  int result = 1;
  for (JNIHandleBlock* current = _next; current != NULL; current = current->_next) {
    result++;
  }
  return result;
}

const size_t JNIHandleBlock::get_number_of_live_handles() {
  CountHandleClosure counter;
  oops_do(&counter);
  return counter.count();
}

// This method is not thread-safe, i.e., must be called whule holding a lock on the
// structure.
long JNIHandleBlock::memory_usage() const {
  return length() * sizeof(JNIHandleBlock);
}

#ifndef PRODUCT

bool JNIHandleBlock::any_contains(jobject handle) {
  for (JNIHandleBlock* current = _block_list; current != NULL; current = current->_block_list_link) {
    if (current->contains(handle)) {
      return true;
    }
  }
  return false;
}

void JNIHandleBlock::print_statistics() {
  int used_blocks = 0;
  int free_blocks = 0;
  int used_handles = 0;
  int free_handles = 0;
  JNIHandleBlock* block = _block_list;
  while (block != NULL) {
    if (block->_top > 0) {
      used_blocks++;
    } else {
      free_blocks++;
    }
    used_handles += block->_top;
    free_handles += (block_size_in_oops - block->_top);
    block = block->_block_list_link;
  }
  tty->print_cr("JNIHandleBlocks statistics");
  tty->print_cr("- blocks allocated: %d", used_blocks + free_blocks);
  tty->print_cr("- blocks in use:    %d", used_blocks);
  tty->print_cr("- blocks free:      %d", free_blocks);
  tty->print_cr("- handles in use:   %d", used_handles);
  tty->print_cr("- handles free:     %d", free_handles);


   /**
         *  判断是否为多级属性（key中是否包含.），如果是先取一级，递归获取
         */
        int dotIndex = key.indexOf('.');
        if (target instanceof Map) {
            Map<String, Object> mapTarget = (Map<String, Object>) target;
            if (mapTarget.containsKey(key)) {
                mapTarget.put(key, value);
            } else {
                if (dotIndex > -1) {
                    String topKey = key.substring(0, dotIndex);
                    String nextKey = key.substring(dotIndex + 1);
                    Object nextTarget = mapTarget.get(topKey);
                    if (createIfMapNull && nextTarget == null) {
                        nextTarget = new LinkedHashMap<String, Object>();
                        mapTarget.put(topKey, nextTarget);
                    }
                    set(nextTarget, nextKey, value, createIfMapNull);
                } else {
                    mapTarget.put(key, value);
                }
            }
        } else {
            if (dotIndex > -1) {
                String topKey = key.substring(0, dotIndex);
                String nextKey = key.substring(dotIndex + 1);
                Object nextTarget = get(target, topKey);
                set(nextTarget, nextKey, value, createIfMapNull);
            } else {
                if (CollectionUtils.isCollection(target)) {
                    if (key.startsWith("[") && key.endsWith("]")) {
                        CollectionUtils.setElement(target, Integer.parseInt(key.substring(1, key.length() - 1)), value);
                    }
                    throw new TypeNotMatchExecption("context property '" + key + "' is invalid ");
                } else {
                    ClassStrucWrap classStrucWrap = ClassStrucWrap.get(target.getClass());
                    SetterInfo setterInfo = classStrucWrap.getSetterInfo(key);
                    if (setterInfo != null) {
                        invokeSet(setterInfo, target, ObjectUtils.toType(value, setterInfo.getParameterType()));
                    }
                }
            }
        }
    }

    public static Object[] get(Object target, List<String> keys) {
        Object[] values = new Object[keys.size()];
        int index = 0;
        for (String key : keys) {
            values[index++] = get(target, key);
        }
        return values;
    }

    public static Map<String, Object> toMap(Object target) {
        if (target == null)
            return null;
        if (target instanceof Map) {
            return (Map<String, Object>) target;
        }

        Map<String, Object> map = new HashMap<String, Object>();
        ClassStrucWrap classStrucWrap = ClassStrucWrap.get(target.getClass());
        List<GetterInfo> getterInfos = classStrucWrap.getGetterInfos();
        for (GetterInfo getterInfo : getterInfos) {
            map.put(getterInfo.getName(), invokeGet(getterInfo, target));
        }

        return map;
    }

    /**
     * 获取对象的非空属性列表
     *
     * @param target
     * @return
     */
    public static List<String> getNonEmptyFields(Object target) {
        return getNonEmptyFields(target, new String[0]);
    }

    /**
     * 获取对象的非空属性列表
     *
     * @param target
     * @param excludeKeys
     * @return
     */
    public static List<String> getNonEmptyFields(Object target, String... excludeKeys) {
        if (target == null)
            return null;
        List<String> fields = new ArrayList<String>();
        if (target instanceof Map) {
            Map<Object, Object> map = (Map<Object, Object>) target;
            for (Map.Entry<Object, Object> entry


 = Math.round(Math.random() * (max - min)) + min;
  testCaseList = obj.testCases;
  faHandler(obj, stringLength);
}

// /**
//  * Add strings alone with true or false to the test cases
//  *
//  * @param str  Testing string
//  *
//  * @param TorF True or false
//  *
//  * @param obj  Object that contain all info
//  */
// function addtoTestCase(str, obj, result) {
//   var current = {};
//   if (tempFlag != 1) {
//     var inobj = obj.testCases;
//     if (result) {
//       current[str] = true;
//       inobj[caseCounter] = current;
//     } else {
//       current[str] = false;
//       inobj[caseCounter] = current;
//     }
//   } else {
//     if (result) {
//       current[str] = true;
//       obj.testCases[caseCounter] = current;
//     } else {
//       current[str] = false;
//       obj.testCases[caseCounter] = current;
//     }
//   }
//   caseCounter++;
// }
var pdaInitID = [];
var pdaFinalID = [];
var pdaCheck = false;
var pdaId;
var pdaStack = '';
var testCaseList3 = []

function findAlledgesFromOneNodePDA(xmlDoc, id) {
  var packagelist = [];
  // var list = $(xmlDoc).find('transition').children()
  var counter = 0;
  while ($(xmlDoc).find('transition').children()[counter] != undefined) {
    var from = $(xmlDoc).find('transition').children()[counter].innerHTML;
    var to = $(xmlDoc).find('transition').children()[counter + 1].innerHTML;
    var read = $(xmlDoc).find('transition').children()[counter + 2].innerHTML;
    var pop = $(xmlDoc).find('transition').children()[counter + 3].innerHTML;
    var push = $(xmlDoc).find('transition').children()[counter + 4].innerHTML;
    if (from == id) {
      packagelist.push(from);
      packagelist.push(to);
      packagelist.push(read);
      packagelist.push(pop);
      packagelist.push(push);
    }
    counter = counter + 5;
  }
  return packagelist;
}

/**
 * add string to testCases
 *
 * @param testCase
 *            tastcases
 * @param result
 *            true/false for the current string
 * @param str
 *            string
 */
function pdaAdd(testCase, result, str) {
  if (testCase.testCases.indexOf(str) == -1) {
    if (result) {
      if (trueCounter < trueStringLimit && !loopkey(testCaseList3,str)) {
        testCaseList3.push(str);
        addtoTestCase(str, testCase, 1);
        trueCounter++;
      }
    } else {
      if (falseCounter < falseStringLimit && !loopkey(testCaseList3,str)) {
        testCaseList3.push(str);
        addtoTestCase(str, testCase, 0);
        falseCounter++;
      }
    }
  }
}

function reverseString(str) {
  return str.split("").reverse().join("");
}

function helpPop(Stack, popStr){
  popStr = reverseString(popStr);
  var pos = Stack.lastIndexOf(popStr);
  if(pos == -1 || Stack.length != (pos + popStr.length)){return false;}
  else{
    pdaStack = Stack.substring(0, pos );
    return true;
  }
}

function travnPda(xmlDoc, id, len) {
  var str = '';
  for (var pos = 0; pos < l


mple server:

```sh
python -m http.server 8000
```

Note: If compiling with threads then you need extra headers when serving the files (See [here for details](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer#security_requirements))
```http
Cross-Origin-Opener-Policy: same-origin
Cross-Origin-Embedder-Policy: require-corp
```

Next, open a browser to the step0 page: http://localhost:8000/step0.html

You should see the Emscripten default chrome:

![step0.c with emscripten](imgs/step0a.png)

Make sure you got the `Hello, world!` in the console.

To remove the ugly Emscripten default chrome, you need to use your own minimal html. I provided one in this repo, just call:

```sh
emcc step0.c -o step0.html --shell-file shell_minimal.html
```

![step0.c with emscripten](imgs/step0b.png)

Now the `Hello, world!` in the JS console.

### Step 1: Using Nim with Emscripten.

Next lets try Nim, look at the very simple [step1.nim](step1.nim):
```nim
echo "Hello World, from Nim."
```

Most of the work will be done but the [step1.nims](step1.nims) file:
```nim
if defined(emscripten):
  # This path will only run if -d:emscripten is passed to nim.

  --nimcache:tmp # Store intermediate files close by in the ./tmp dir.

  --os:linux # Emscripten pretends to be linux.
  --cpu:wasm32 # Emscripten is 32bits.
  --cc:clang # Emscripten is very close to clang, so we ill replace it.
  when defined(windows):
    --clang.exe:emcc.bat  # Replace C
    --clang.linkerexe:emcc.bat # Replace C linker
    --clang.cpp.exe:emcc.bat # Replace C++
    --clang.cpp.linkerexe:emcc.bat # Replace C++ linker.
  else:
    --clang.exe:emcc  # Replace C
    --clang.linkerexe:emcc # Replace C linker
    --clang.cpp.exe:emcc # Replace C++
    --clang.cpp.linkerexe:emcc # Replace C++ linker.
  when compileOption("threads"):
    # We can have a pool size to populate and be available on page run
    # --passL:"-sPTHREAD_POOL_SIZE=2"
    discard
  --listCmd # List what commands we are running so that we can debug them.

  --gc:arc # GC:arc is friendlier with crazy platforms.
  --exceptions:goto # Goto exceptions are friendlier with crazy platforms.
  --define:noSignalHandler # Emscripten doesn't support signal handlers.

  # Pass this to Emscripten linker to generate html file scaffold for us.
  switch("passL", "-o step1.html --shell-file shell_minimal.html")
```

Lets compile it!

```sh
nim c -d:emscripten step1.nim
```

Lets go to step1.html, this is how it should look: http://localhost:8000/step1.html

![step1](imgs/step1.png)

Take note of the console output with `Hello World, from Nim.`.

### Nim with OpenGL.

We can do a ton of stuff with just "console" programs, but what Emscripten is all about is doing graphics. We can use normal OpenGL, and Emscripten will convert it to WebGL. We can also use normal SDL or GLFW windowing and input library and Emscripten will convert it to HTML events for us. Emscripten also gives us a "fake" file system to load files from. Many things that would be missing from just having WASM running in the browser we get from free with Emscripten.

I will be using GLFW for my examples. I will be using https://github.com/treeform/staticglfw because it has been made to work with Emscripten.

See: [step2.nim](step2.nim)

First lets make sure


-- OPENTOMB INVENTORY GLOBAL ITEM NAMES - SPANISH
-- by Lwmte, Sep 2014
-- Spanish Translation by: SuiKaze Raider.
-- Translation Version: v1.0.1.0 (April 26th, 2015)

--------------------------------------------------------------------------------
-- In this file, we list all the global item names used across all games.
-- Non-global item names should be eventually listed in level-specific scripts.
-- Note that names list not always resemble item list, as we also introduce
-- game-specific global item names (e.g. compass was replaced by watch in TR2-3)
--------------------------------------------------------------------------------

ITEM_NAME_COMPASS = "Brújula"
ITEM_NAME_WATCH = "Estadísticas"
ITEM_NAME_PASSPORT = "Juego"
ITEM_NAME_LARAHOME = "Hogar de Lara"
ITEM_NAME_VIDEO = "Configuración de Vídeo"
ITEM_NAME_AUDIO = "Configuración de Audio"
ITEM_NAME_CONTROLS = "Configuración de Control"
ITEM_NAME_LOAD = "Cargar Juego"
ITEM_NAME_SAVE = "Guardar Juego"
ITEM_NAME_MAP = "Mapa"

ITEM_NAME_PISTOLS = "Pistolas"
ITEM_NAME_SHOTGUN = "Escopeta"
ITEM_NAME_MAGNUMS = "Magnums"
ITEM_NAME_AUTOMAGS = "Pistolas Automáticas"
ITEM_NAME_DESERTEAGLE = "Águila del Desierto"
ITEM_NAME_REVOLVER = "Revólver"
ITEM_NAME_UZIS = "Uzis"
ITEM_NAME_M16 = "M16"
ITEM_NAME_MP5 = "MP5"
ITEM_NAME_HK = "Rifle H&K"
ITEM_NAME_GRENADEGUN = "Lanzagranadas"
ITEM_NAME_ROCKETGUN = "Lanzacohetes"
ITEM_NAME_HARPOONGUN = "Fusil Submarino"
ITEM_NAME_CROSSBOW = "Ballesta"
ITEM_NAME_GRAPPLEGUN = "Pistola-Garfio"

ITEM_NAME_LASERSIGHT = "Mirilla Láser"
ITEM_NAME_BINOCULARS = "Prismáticos"
ITEM_NAME_SILENCER   = "Silenciador"

ITEM_NAME_REVOLVER_LASERSIGHT = "Revólver + Mirilla Láser"
ITEM_NAME_


 public global::GitHub.Repos.Item.Item.CodeScanning.DefaultSetup.DefaultSetupRequestBuilder DefaultSetup
        {
            get => new global::GitHub.Repos.Item.Item.CodeScanning.DefaultSetup.DefaultSetupRequestBuilder(PathParameters, RequestAdapter);
        }
        /// <summary>The sarifs property</summary>
        public global::GitHub.Repos.Item.Item.CodeScanning.Sarifs.SarifsRequestBuilder Sarifs
        {
            get => new global::GitHub.Repos.Item.Item.CodeScanning.Sarifs.SarifsRequestBuilder(PathParameters, RequestAdapter);
        }
        /// <summary>
        /// Instantiates a new <see cref="global::GitHub.Repos.Item.Item.CodeScanning.CodeScanningRequestBuilder"/> and sets the default values.
        /// </summary>
        /// <param name="pathParameters">Path parameters for the request</param>
        /// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
        public CodeScanningRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/code-scanning", pathParameters)
        {
        }
        /// <summary>
        /// Instantiates a new <see cref="global::GitHub.Repos.Item.Item.CodeScanning.CodeScanningRequestBuilder"/> and sets the default values.
        /// </summary>
        /// <param name="rawUrl">The raw URL to use for the request builder.</param>
        /// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
        public CodeScanningRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/code-scanning", rawUrl)
        {
        }
    }
}
#pragma warning restore CS0618


from django.shortcuts import render, get_object_or_404, redirect
from django.contrib.auth.decorators import login_required
from .models import Group
from .forms import GroupForm

@login_required
def manage_groups(request, group_id=None):
    if group_id:
        group = get_object_or_404(Group, id=group_id)
    else:
        group = None

    if request.method == 'POST':
        form = GroupForm(request.POST, instance=group)
        if form.is_valid():
            form.save()
            return redirect('manage_groups')  # Redirige a la misma vista después de crear o actualizar el grupo
    else:
        form = GroupForm(instance=group)  # Esta línea debería estar en la sección `else`

    groups = Group.objects.all()

    return render(request, 'manage/admin_manage_groups.html', {'form': form, 'groups': groups, 'group': group})


, int b2) {
            if (inRange(b0 | b1 | b2))
                return new TransformKey(packedBytes(b0, b1, b2));
            else
                return new TransformKey(fullBytes(b0, b1, b2));
        }
        static TransformKey of(byte b0, int b1, int b2, int b3) {
            if (inRange(b0 | b1 | b2 | b3))
                return new TransformKey(packedBytes(b0, b1, b2, b3));
            else
                return new TransformKey(fullBytes(b0, b1, b2, b3));
        }
        private static final byte[] NO_BYTES = {};
        static TransformKey of(byte kind, int... b123) {
            return ofBothArrays(kind, b123, NO_BYTES);
        }

        static TransformKey of(byte kind, int b1, int[] b23456) {
            byte[] fullBytes = new byte[b23456.length + 2];
            fullBytes[0] = kind;
            fullBytes[1] = bval(b1);
            for (int i = 0; i < b23456.length; i++) {
                fullBytes[i + 2] = TransformKey.bval(b23456[i]);
            }
            long packedBytes = packedBytes(fullBytes);
            if (packedBytes != 0)
                return new TransformKey(packedBytes);
            else
                return new TransformKey(fullBytes);
        }

        static TransformKey of(byte kind, int b1, int b2, byte[] b345) {
            return ofBothArrays(kind, new int[]{ b1, b2 }, b345);
        }
        private static TransformKey ofBothArrays(byte kind, int[] b123, byte[] b456) {
            byte[] fullBytes = new byte[1 + b123.length + b456.length];
            int i = 0;
            fullBytes[i++] = bval(kind);
            for (int bv : b123) {
                fullBytes[i++] = bval(bv);
            }
            for (byte bv : b456) {
                fullBytes[i++] = bv;
            }
            long packedBytes = packedBytes(fullBytes);
            if (packedBytes != 0)
                return new TransformKey(packedBytes);
            else
                return new TransformKey(fullBytes);
        }

        private static final boolean STRESS_TEST = false; // turn on to disable most packing
        private static final int
                PACKED_BYTE_SIZE = (STRESS_TEST ? 2 : 4),
                PACKED_BYTE_MASK = (1 << PACKED_BYTE_SIZE) - 1,
                PACKED_BYTE_MAX_LENGTH = (STRESS_TEST ? 3 : 64 / PACKED_BYTE_SIZE);

        private static long packedBytes(byte[] bytes) {
            if (!inRange(bytes[0]) || bytes.length > PACKED_BYTE_MAX_LENGTH)
                return 0;
            long pb = 0;
            int bitset = 0;
            for (int i = 0; i < bytes.length; i++) {
                int b = bytes[i] & 0xFF;
                bitset |= b;
                pb |= (long)b << (i * PACKED_BYTE_SIZE);
            }
            if (!inRange(bitset))
                return 0;
            return pb;
        }
        private static long packedBytes(int b0, int b1) {
            assert(inRange(b0 | b1));
            return (  (b0 << 0*PACKED_BYTE_SIZE)
                    | (b1 << 1*PACKED_BYTE_SIZE));
        }
        private static long packedBytes(int b0, int b1, int b2) {
            assert(inRange(b0 | b1 | b2));
            return (  (b0 << 0*PACKED_BYTE_SIZE)
                    | (b1 << 1*PACKED_BYTE_SIZE)
                    | (b2 << 2*PACKED_BYTE_SIZE));
        }
        private static long packedBytes(int b0, int b1, int b2, int b3) {
            assert(inRange(b0 | b1 | b2 | b3));
            return (  (b0 << 0*PACKED_BYTE_SIZE)
                    | (b1 << 1*PACKED_BYTE_SIZE)
                    | (b2 << 2*PACKED_BYTE_SIZE)
                    | (b3 << 3*PACKED_BYTE_SI


  # get the value of the
            # attribute based on the MapperProperty related to the
            # mapped column.  this will allow usage of MapperProperties
            # that have a different keyname than that of the mapped column.
            try:
                prop = obj_mapper.get_property_by_column(obj_col)
            except UnmappedColumnError:
                # in the case of single table inheritance, there may be
                # columns on the mapped table intended for the subclass only.
                # the "unmapped" status of the subclass column on the
                # base class is a feature of the declarative module.
                continue

            # expired object attributes and also deferred cols might not
            # be in the dict.  force it to load no matter what by
            # using getattr().
            if prop.key not in obj_state.dict:
                getattr(obj, prop.key)

            a, u, d = attributes.get_history(obj, prop.key)

            if d:
                attr[prop.key] = d[0]
                obj_changed = True
            elif u:
                attr[prop.key] = u[0]
            elif a:
                # if the attribute had no value.
                attr[prop.key] = a[0]
                obj_changed = True

    if not obj_changed:
        # not changed, but we have relationships.  OK
        # check those too
        for prop in obj_mapper.iterate_properties:
            if (
                isinstance(prop, RelationshipProperty)
                and attributes.get_history(
                    obj, prop.key, passive=attributes.PASSIVE_NO_INITIALIZE
                ).has_changes()
            ):
                for p in prop.local_columns:
                    if p.foreign_keys:
                        obj_changed = True
                        break
                if obj_changed is True:
                    break

    if not obj_changed and not deleted:
        return

    attr["version"] = obj.version
    hist = history_cls()
    for key, value in attr.items():
        setattr(hist, key, value)
    session.add(hist)
    obj.version += 1

def versioned_session(session):
    @event.listens_for(session, "before_flush")
    def before_flush(session, flush_context, instances):
        for obj in versioned_objects(session.dirty):
            create_version(obj, session)
        for obj in versioned_objects(session.deleted):
            create_version(obj, session, deleted=True)


22（34） | 接连从芯片                 |
| IRQ3       | 0x23（35） | 串行口 2                   |
| IRQ4       | 0x24（36） | 串行口 1                   |
| IRQ5       | 0x25（37） | 并行口 2                   |
| IRQ6       | 0x26（38） | 软盘驱动器                 |
| IRQ7       | 0x27（39） | 并行口 1                   |
| IRQ8       | 0x28（40） | 实时钟中断                 |
| IRQ9       | 0x29（41） | 保留                       |
| IRQ10      | 0x2a（42） | 保留                       |
| IRQ11      | 0x2b（43） | 保留（网络接口）           |
| IRQ12      | 0x2c（44） | PS/2 鼠标口中断            |
| IRQ13      | 0x2d（45） | 数学协处理器中断           |
| IRQ14      | 0x2e（46） | 硬盘中断                   |
| IRQ15      | 0x2f（47） | 保留                       |

在系统刚刚初始化后，内核在 head.s 程序中会对所有 256 个中断向量进行默认设置。默认设置就是给这些中断向量随便设置一个初值，设置这个值的目的是为了防止出现一般保护性错误。

>一般保护性错误：是指在英特尔 x86 架构和 AMDx86-64 架构和其它架构中的一种中断情况，指正在运行的程序（内核或用户态程序）违反处理器架构中保护措施的情况。

最常见的情况就是

![](https://www.cxuan.vip/image-20230803191856882.png)

Linux 中的这些中断不会所有的都用到，有些中断是保留中，另外对于系统中所使用的一些中断，内核会在其初始化过程中重新设置这些中断描述符，让他们指向实际的处理过程。

另外，在设置中断描述符表 IDT 表时 Linux 内核使用了中断门和陷阱门两种门描述符。它们之间的区别在于对标志寄存器 EFLAGS 中的中断允许标志 IF 的影响。由中断门描述符执行的中断会复位 IF 标志，因此可以避免其他中断干扰当前中断的处理。随后中断结束后指令 iret 会恢复 IF 标志的原值；而通过陷阱门执行的中断不会响应 IF 标志。

这里需要说一下两个指令 cli 和 sti，为了避免竞争条件对临界代码的干扰，在 Linux 0.11 内核中很多地方都使用了 cli 和 sti 指令。cli 指令用于复位 CP


x, min},
};

/// Returns the smallest order such that (MIN_ORDER_SHIFT << order) >= size.
/// Size must be non zero.
pub fn fit_order(size: usize) -> usize {
    std::mem::size_of::<usize>() * 8
        - (size - 1).leading_zeros().to_usize().unwrap()
        - constants::MIN_ORDER_SHIFT
}

/// Get index in the VMO for a given |offset|.
pub fn index_for_offset(offset: usize) -> u32 {
    (offset / constants::MIN_ORDER_SIZE).to_u32().unwrap()
}

/// Get offset in the VMO for a given |index|.
pub fn offset_for_index(index: u32) -> usize {
    index.to_usize().unwrap() * constants::MIN_ORDER_SIZE
}

/// Get size in bytes of a given |order|.
pub fn order_to_size(order: usize) -> usize {
    constants::MIN_ORDER_SIZE << order
}

/// Get the necessary |block size| to fit the given |payload_size| in range
/// MIN_ORDER_SIZE <= block size <= MAX_ORDER_SIZE
pub fn block_size_for_payload(payload_size: usize) -> usize {
    min(
        constants::MAX_ORDER_SIZE,
        max(payload_size + constants::HEADER_SIZE_BYTES, constants::MIN_ORDER_SIZE),
    )
}

/// Get the size in bytes for the payload section of a block of the given |order|.
pub fn payload_size_for_order(order: usize) -> usize {
    order_to_size(order) - constants::HEADER_SIZE_BYTES
}

/// Get the array capacity size for the given |order|.
pub fn array_capacity(order: usize) -> usize {
    (order_to_size(order)
        - constants::HEADER_SIZE_BYTES
        - constants::ARRAY_PAYLOAD_METADATA_SIZE_BYTES)
        / std::mem::size_of::<u64>()
}
/*
 * Copyright 2017-2018 <NAME>
 *
 * Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
 * http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
 * <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
 * option. This file may not be copied, modified, or distributed
 * except according to those terms.
 */

extern crate futures;
#[macro_use]
extern crate redis_async;
extern crate tokio;

use std::env;

use futures::{future, Future, Sink, Stream};

use redis_async::client;

fn main() {
    let addr = env::args()
        .nth(1)
        .unwrap_or_else(|| "127.0.0.1:6379".to_string())
        .parse()
        .unwrap();

    let monitor = client::connect(&addr)
        .map_err(|e| e.into())
        .and_then(|connection| {
            connection
                .send(resp_array!["MONITOR"])
                .map_err(|e| e.into())
        })
        .and_then(|connection| {
            connection.skip(1).for_each(|incoming| {
                println!("{:?}", incoming);
                future::ok(())
            })
        });

    tokio::run(monitor.map_err(|e| println!("ERROR: {:?}", e)));
}
/************************************************

   File Name: bhatho:db::db_manager
   Author: <NAME> <<EMAIL>>
   Date: 2019-02-17:15:15
   License: Apache 2.0

**************************************************/
use std::sync::Arc;
use std::sync::atomic::AtomicBool;

use crate::cache::sharded_cache::ShardedCache;
use crate::db::config::DbManagerConfig;
use crate::db::rocks_db::RocksDb;
use crate::keyval::KeyVal;

/// DbManager
/// It is a wrapper around multiple database instances
pub struct DbManager {
    pub name: String,
    db: Option<Arc<RocksDb>>,
    cache: Arc<ShardedCache>,
    config: DbManagerConfig,


= MEMORY_UNITS
    higher_is_better: bool = False

    def __init__(self, gpu_indices: Optional[List[int]] = None) -> None:
        """Initialize the InferenceMemoryMetric."""
        self.metric = GPUMemoryStats(INFERENCE_MEMORY, gpu_indices)

    def compute(self, model: PrunaModel, dataloader: DataLoader) -> MetricResult:
        """
        Compute the inference memory usage of the model.

        Parameters
        ----------
        model : PrunaModel
            The model instance.
        dataloader : DataLoader
            The DataLoader for model evaluation.

        Returns
        -------
        MetricResult
            The inference memory usage of the model.
        """
        return self.metric.compute(model, dataloader)

@MetricRegistry.register(TRAINING_MEMORY)
class TrainingMemoryMetric(BaseMetric):
    """
    Wrapper over GPUMemoryStats with training memory as primary metric.

    Parameters
    ----------
    gpu_indices : Optional[List[int]]
        The GPU indices to monitor.
    """

    metric_name: str = TRAINING_MEMORY
    metric_units: str = MEMORY_UNITS
    higher_is_better: bool = False

    def __init__(self, gpu_indices: Optional[List[int]] = None) -> None:
        """Initialize the TrainingMemoryMetric."""
        self.metric = GPUMemoryStats(TRAINING_MEMORY, gpu_indices)

    def compute(self, model: PrunaModel, dataloader: DataLoader) -> MetricResult:
        """
        Compute the training memory usage of the model.

        Parameters
        ----------
        model : PrunaModel
            The model instance.
        dataloader : DataLoader
            The DataLoader for model evaluation.

        Returns
        -------
        MetricResult
            The training memory usage of the model.
        """
        return self.metric.compute(model, dataloader)


RS = img->get_pps().CtbAddrTStoRS[ img->get_pps().CtbAddrRStoTS[ctbAddrRS] -1 ]; }

        if (prevCtbRS<0 ||
            img->get_SliceHeaderIndex_atIndex(ctbAddrRS) !=
            img->get_SliceHeaderIndex_atIndex(prevCtbRS)) {
          int step=2;
          int fillcolor = 0xFF0000;

          if (img->get_SliceHeaderCtb(ctbx,ctby)->dependent_slice_segment_flag) {
            step=2;
            fillcolor = 0x00FF00;
          }

          for (int x=0;x<1<<blkw;x+=step)
            for (int y=0;y<1<<blkw;y+=step) {
              int x1 = x + (ctbx<<blkw);
              int y1 = y + (ctby<<blkw);

              if (x1<sps.pic_width_in_luma_samples &&
                  y1<sps.pic_height_in_luma_samples)
                {
                  set_pixel(dst,x1,y1,stride,fillcolor,pixelSize);
                }
            }
        }
      }

  // --- draw slice boundaries ---

  const uint32_t color = 0xff0000;

  for (int ctby=0;ctby<sps.PicHeightInCtbsY;ctby++)
    for (int ctbx=0;ctbx<sps.PicWidthInCtbsY;ctbx++) {
      if (ctbx>0 && (img->get_SliceHeaderIndexCtb(ctbx  ,ctby) !=
                     img->get_SliceHeaderIndexCtb(ctbx-1,ctby))) {
        int x  = ctbx << sps.Log2CtbSizeY;
        int y0 = ctby << sps.Log2CtbSizeY;

        for (int y=y0;
             (y<y0+(1<<sps.Log2CtbSizeY) &&
              y<sps.pic_height_in_luma_samples) ;
             y++) {
          set_pixel(dst,x,y,stride,color,pixelSize);
        }
      }
    }

  for (int ctby=0;ctby<sps.PicHeightInCtbsY;ctby++)
    for (int ctbx=0;ctbx<sps.PicWidthInCtbsY;ctbx++) {
      if (ctby>0 && (img->get_SliceHeaderIndexCtb(ctbx,ctby  ) !=
                     img->get_SliceHeaderIndexCtb(ctbx,ctby-1))) {
        int x0 = ctbx << sps.Log2CtbSizeY;
        int y  = ctby << sps.Log2CtbSizeY;

        for (int x=x0 ;
             (x<x0+(1<<sps.Log2CtbSizeY) &&
              x<sps.pic_width_in_luma_samples) ;
             x++) {
          set_pixel(dst,x,y,stride,color,pixelSize);
        }
      }
    }

}

LIBDE265_API void draw_Tiles(const de265_image* img, uint8_t* dst, int stride, int pixelSize)
{
  const uint32_t color = 0xffff00;

  const seq_parameter_set& sps = img->get_sps();
  const pic_parameter_set& pps = img->get_pps();

  for (int tx=1;tx<pps.num_tile_columns;tx++) {
    int x = pps.colBd[tx] << sps.Log2CtbSizeY;

    for (int y=0;y<sps.pic_height_in_luma_samples;y++) {
      set_pixel(dst,x,y,stride,color,pixelSize);
    }
  }

  for (int ty=1;ty<pps.num_tile_rows;ty++) {
    int y = pps.rowBd[ty] << sps.Log2CtbSizeY;

    for (int x=0;x<sps.pic_width_in_luma_samples;x++) {
      set_pixel(dst,x,y,stride,color,pix


/*
 * Copyright (c) 2024 Realtek Semiconductor Corp.
 *
 * SPDX-License-Identifier: Apache-2.0
 */

#include "ameba_soc.h"

PRAM_START_FUNCTION BOOT_SectionInit(void)
{
	return (PRAM_START_FUNCTION)__image2_entry_func__;
}
/**
 * @brief It is forbidden to use any print function in BOOT_WakeFromPG,
 * because print function (including rodata section) is in flash at this time, but flash has
 * not been woken up.
 */
SRAM_ONLY_TEXT_SECTION
void BOOT_WakeFromPG(void)
{
	PRAM_START_FUNCTION Image2EntryFun = (PRAM_START_FUNCTION)__image2_entry_func__;

	RSIP_OTF_Load_Key(); //Wait RSIP AES Ready

	/* we should Cache_Flush when we wake */
	Cache_Enable(ENABLE);

	SCB->VTOR = Image2EntryFun->VectorNS;

	Image2EntryFun->RamWakeupFun();
}

void BOOT_CleanupSection(void)
{
	/* Important: Cleaning up the BSS section must be done before Heap init. */
	/* Clear ROM bss*/
	_memset((void *) __rom_bss_start__, 0, (__rom_bss_end__ - __rom_bss_start__));
	/* Clear application bss */
	_memset((void *) __bss_start__, 0, (__bss_end__ - __bss_start__));
}
//3 Image 1
/***
* @note It is forbidden to use RTK_LOGx or printf in this function,
* if you need to print information, please use DiagPrintf.
***/
void BOOT_Image1(void)
{
	PRAM_START_FUNCTION Image2EntryFun = BOOT_SectionInit();
	u32 CpuClk;

	/* enable cache */
	Cache_Enable(ENABLE);

	BOOT_CleanupSection();

	CpuClk = CPU_ClkGet();
	DelayClkUpdate(CpuClk);

	/* Relocate IRQ table */
	irq_table_init(MSP_RAM_LP);

	/* Initial Global Variable */
	BOOT_ROM_InitDebugFlg();

#ifndef CONFIG_MP_SHRINK
	/* Get flash_init_para address for KM0 */
	_memcpy((void *)&flash_init_para, (const void *)HAL_READ32(SYSTEM_CTRL_BASE, REG_LSYS_FLASH_PARA_ADDR), sizeof(FLASH_InitTypeDef));
#endif

	/* goto IMG2 */
	Image2EntryFun->RamStartFun();

	return;
}

IMAGE1_ENTRY_SECTION
RAM_FUNCTION_START_TABLE RamStartTable = {
	.RamStartFun = NULL,
	.RamWakeupFun = BOOT_WakeFromPG,
	.RamPatchFun0 = NULL,
	.RamPatchFun1 = NULL,
	.RamPatchFun2 = NULL,
	.FlashStartFun = BOOT_Image1,
	.Img1ValidCode = NULL,
};


ra',
        calendarText: 'Calendar',
        closeText: 'Închidere',
        // Daterange component
        fromText: 'Start',
        toText: 'Final',
        // Measurement components
        wholeText: 'Complet',
        fractionText: 'Parţial',
        unitText: 'Unitate',
        // Time / Timespan component
        labels: ['Ani', 'Luni', 'Zile', 'Ore', 'Minute', 'Secunde', ''],
        labelsShort: ['Ani', 'Luni', 'Zile', 'Ore', 'Min.', 'Sec.', ''],
        // Timer component
        startText: 'Start',
        stopText: 'Stop',
        resetText: 'Resetare',
        lapText: 'Tură',
        hideText: 'Ascundere',
        // Listview
        backText: 'Înapoi',
        undoText: 'Anulaţi',
        // Form
        offText: 'Nu',
        onText: 'Da'
    };
})(jQuery);
(function ($) {
    $.mobiscroll.i18n.nl = {
        // Core
        setText: 'Instellen',
        cancelText: 'Annuleren',
        clearText: 'Duidelijk',
        selectedText: '{count} gekozen',
        // Datetime component
        dateFormat: 'dd/mm/yy',
        dateOrder: 'ddmmyy',
        dayNames: ['zondag', 'maandag', 'Dinsdag', 'Woensdag', 'Donderdag', 'Vrijdag', 'Zaterdag'],
        dayNamesShort: ['zo', 'ma', 'di', 'wo', 'do', 'vr', 'za'],
        dayNamesMin: ['z', 'm', 'd', 'w', 'd', 'v', 'z'],
        dayText: 'Dag',
        hourText: 'Uur',
        minuteText: 'Minuten',
        monthNames: ['januari', 'februari', 'maart', 'april', 'mei', 'juni', 'juli', 'augustus', 'september', 'oktober', 'november', 'december'],
        monthNamesShort: ['jan', 'feb', 'mrt', 'apr', 'mei', 'jun', 'jul', 'aug', 'sep', 'okt', 'nov', 'dec'],
        monthText: 'Maand',
        secText: 'Seconden',
        timeFormat: 'HH:ii',
        timeWheels: 'HHii',
        yearText: 'Jaar',
        nowText: 'Nu',
        pmText: 'pm',
        amText: 'am',
        // Calendar component
        firstDay: 1,
        dateText: 'Datum',
        timeText: 'Tijd',
        calendarText: 'Kalender',
        closeText: 'Sluiten',
        // Daterange component
        fromText: 'Start',
        toText: 'Einde',
        // Measurement components
        wholeText: 'geheel',
        fractionText: 'fractie',
        unitText: 'eenheid',
        // Time / Timespan component
        labels: ['Jaren', 'Maanden', 'Dagen', 'Uren', 'Minuten', 'Seconden', ''],
        labelsShort: ['j', 'm', 'd', 'u', 'min', 'sec', ''],
        // Timer component
        startText: 'Start',
        stopText: 'Stop',
        resetText: 'Reset',
        lapText: 'Ronde',
        hideText: 'Verbergen',
        // Listview
        backText: 'Terug',
        undoText: 'Onged. maken',
        // Form
        offText: 'Uit',
        onText: 'Aan'
    };
})(jQuery);
const _ = require("lodash");
const bplist = require("bplist-parser");
const psList = require("ps-list");
const winInfo = require("@bberger/win-info-fork");
const fs = require("fs");

const logger = require("./logger");
const util = require("./util");

async function getFigmaMetaData() {
  let curr


/*
 * .NET bindings for libheif.
 * Copyright (c) 2020, 2021, 2022, 2023 Nicholas Hayes
 *
 * Portions Copyright (c) 2017 struktur AG, Dirk Farin <farin@struktur.de>
 *
 * This file is part of libheif-sharp.
 *
 * libheif-sharp 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 3 of
 * the License, or (at your option) any later version.
 *
 * libheif-sharp 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 libheif-sharp.  If not, see <http://www.gnu.org/licenses/>.
 */

namespace LibHeifSharp.Interop
{
#pragma warning disable VSSpell001
    internal enum heif_suberror_code
    {
        // no further information available
        Unspecified = 0,

        // --- Invalid_input ---

        // End of data reached unexpectedly.
        End_of_data = 100,

        // Size of box (defined in header) is wrong
        Invalid_box_size = 101,

        // Mandatory 'ftyp' box is missing
        No_ftyp_box = 102,

        No_idat_box = 103,

        No_meta_box = 104,

        No_hdlr_box = 105,

        No_hvcC_box = 106,

        No_pitm_box = 107,

        No_ipco_box = 108,

        No_ipma_box = 109,

        No_iloc_box = 110,

        No_iinf_box = 111,

        No_iprp_box = 112,

        No_iref_box = 113,

        No_pict_handler = 114,

        // An item property referenced in the 'ipma' box is not existing in the 'ipco' container.
        Ipma_box_references_nonexisting_property = 115,

        // No properties have been assigned to an item.
        No_properties_assigned_to_item = 116,

        // Image has no (compressed) data
        No_item_data = 117,

        // Invalid specification of image grid (tiled image)
        Invalid_grid_data = 118,

        // Tile-images in a grid image are missing
        Missing_grid_images = 119,

        Invalid_clean_aperture = 120,

        // Invalid specification of overlay image
        Invalid_overlay_data = 121,

        // Overlay image completely outside of visible canvas area
        Overlay_image_outside_of_canvas = 122,

        Auxiliary_image_type_unspecified = 123,

        No_or_invalid_primary_item = 124,

        No_infe_box = 125,

        Unknown_color_profile_type = 126,

        Wrong_tile_image_chroma_format = 127,

        Invalid_fractional_number = 128,

        Invalid_image_size = 129,

        Invalid_pixi_box = 130,

        No_av1C_box = 131,

        Wrong_tile_image_pixel_depth =


viewer.scene, posion);
        wposion.x = Math.round(wposion.x);
        wposion.y = Math.round(wposion.y);
        const offset = Cesium.defaultValue(offsetParam, [0, 0]);

        // 根据相机高度计算偏移值和比例及透明度（opacity ）
        const cameraHeight = Math.ceil(this.viewer.camera.positionCartographic.height);
        let scaleSize = -1;
        let opacity = -1;
        let pixelOffsetScale = -1;

        if (Cesium.defined(options)) {
            if (Cesium.defined(options.scaleByDistance)) {
                scaleSize = calcaluteGrade(cameraHeight, options.scaleByDistance);
            }

            if (Cesium.defined(options.translucencyByDistance)) {
                opacity = calcaluteGrade(cameraHeight, options.translucencyByDistance);
            }
            if (Cesium.defined(options.pixelOffsetScaleByDistance)) {
                pixelOffsetScale = calcaluteGrade(cameraHeight, options.pixelOffsetScaleByDistance);
            }
        }
        pixelOffsetScale = pixelOffsetScale > 0 ? pixelOffsetScale : 1;
        opacity = opacity >= 0 ? opacity : 1;

        rootContentDiv.style.transformOrigin = 'left top';
        let x = 0;
        let y = 0;
        if (scaleSize > 0) {
            x = wposion.x - (rootContentDiv.offsetWidth * scaleSize) / 2 + offset[0] * pixelOffsetScale * scaleSize;
            y = wposion.y - rootContentDiv.offsetHeight * scaleSize + offset[1] * pixelOffsetScale * scaleSize;
            rootContentDiv.style.transform = `translate3d(${x}px, ${y}px, 0)  scale(${scaleSize}, ${scaleSize}) `;
        } else {
            x = wposion.x - rootContentDiv.offsetWidth / 2 + offset[0] * pixelOffsetScale;
            y = wposion.y - rootContentDiv.offsetHeight + offset[1] * pixelOffsetScale;
            rootContentDiv.style.transform = `translate3d(${x}px, ${y}px, 0) `;
        }
        if (opacity >= 0) {
            rootContentDiv.style.opacity = opacity;
        }
        if (Cesium.defined(options)) {
            this.popupContain.push(
                new PopupElement({
                    id: `popup_${randID}`,
                    containID,
                    position: posion,
                    element: rootContentDiv,
                    offset,
                    scaleByDistance: options.scaleByDistance,
                    translucencyByDistance: options.translucencyByDistance,
                    pixelOffsetScaleByDistance: options.pixelOffsetScaleByDistance
                })
            );
        } else {
            this.popupContain.push(
                new PopupElement({
                    id: `popup_${randID}`,
                    containID,
                    position: posion,
                    element: rootContentDiv,
                    wPosition: wposion,
                    offset
                })
            );
        }
        return `popup_${randID}`;
    }

    /**
     * 添加popup更新事件
     * @function module:客户端可视化.PopupController.prototype.refreshPopups
     */
    refreshPopups() {
        this.viewer.camera.percentageChanged = 0.01;
        this.viewer.camera.changed.addEventListener(this.updatePopups, this);
    }

    /**
     * @private
     */
    updatePopups() {
        const popupArray = this.popupContain;
        if (popupArray !== null && popupArray.length > 0) {
            const cameraHeight = Math.ceil(this.viewer.camera.positionCartographic.height);
            for (let i = 0; i < popupArray.length; i += 1) {
                const popEle = popupArray[i];
                let scaleSize = -1;


) {
		register int j;
		register int number=3;
		float yout[3]={0,0,0};
		double aimed_t;
		t=i*h;
		aimed_t=t+h;
  		if (verbose) {
			warn("using %3d accepted and %3d rejected steps",
	 			p->accepted_steps, p->rejected_steps);
			if (verbose) warn("error tolerance = %10.24f",p->error_bias);
		}

		/* convert doubles in y to floats in yout and write out */
		for(j=0; j<number; ++j) yout[j] = (float) y[j];

		/* write out according to the mode */
		{
		 float tmpout[2]={0,0};
		 switch(imode){

		 case SXY: /* write out xy pairs */
			tmpout[0]=yout[0];
			tmpout[1]=yout[1];
			efwrite(tmpout,sizeof(float),2,out_file);
		 break;
		 case SYZ: /* write out yz pairs */
			tmpout[0]=yout[1];
			tmpout[1]=yout[2];
			efwrite(tmpout,sizeof(float),2,out_file);
		 break;
		 case SXZ: /* write out xz pairs */
			tmpout[0]=yout[0];
			tmpout[1]=yout[2];
			efwrite(tmpout,sizeof(float),2,out_file);
		 break;
		 case SXYZ: /* write out xyz triplet */
			efwrite(yout,sizeof(float),3,out_file);
                 break;
		 case SX: /* write out x only */
			tmpout[0] = yout[0];
			efwrite(tmpout,sizeof(float),1,out_file);
                 break;
		 case SY: /* write out y only */
			tmpout[0] = yout[1];
			efwrite(tmpout,sizeof(float),1,out_file);
                 break;
		 case SZ: /* write out z only */
			tmpout[0] = yout[2];
			efwrite(tmpout,sizeof(float),1,out_file);
                 break;
                 default:  /* defensive programming */
                        err("mysterious operation=\"%s\"", mode);
                 } /* end scope of imode */
		}

		/* run the Runge-Kutta-England solver */
  		rke_solve (p, &t, y, aimed_t);
	}

	/* end the session with rke */
	rke_term(p);

	return EXIT_SUCCESS;
}

static int
lorenz_equations(double t, double y[3] , double yprime[3])
/*********************************************************************
lorenz_equations - the system of ODE's describing the Lorenz attractor
**********************************************************************
t	independent variable "time"
y 	dependent variable being solved for y(t)
yprime	derivative of dependent variable  y'(t)
**********************************************************************
Notes: This is an example of an autonomous system of ODE's
**********************************************************************/
{
	double rho, sigma, eta;

	if (!getpardouble("rho", &rho))			rho = 28.;
	if (!getpardouble("sigma", &sigma))		sigma = 10.;
	if (!getpardouble("eta", &eta))			eta = 1.666666667;

	yprime[0] = sigma * ( y[1] - y[0] );
	yprime[1] = y[0] * ( rho - y[2] ) - y[1];
	yprime[2] = y[0] * y[1] - eta * y[2];
    return 1;
}