   // Watcher doesn't work well if you mistype casing in a path so we use
    // a plugin that prints an error when you attempt to do this.
    // See https://github.com/facebookincubator/create-react-app/issues/240
    new CaseSensitivePathsPlugin(),
    // If you require a missing module and then `npm install` it, you still have
    // to restart the development server for Webpack to discover it. This plugin
    // makes the discovery automatic so you don't have to restart.
    // See https://github.com/facebookincubator/create-react-app/issues/186
    new WatchMissingNodeModulesPlugin(paths.appNodeModules)
  ],
  // Some libraries import Node modules but don't use them in the browser.
  // Tell Webpack to provide empty mocks for them so importing them works.
  node: {
    fs: 'empty',
    net: 'empty',
    tls: 'empty'
  }
};
var path = require('path');
var autoprefixer = require('autoprefixer');
var webpack = require('webpack');
var HtmlWebpackPlugin = require('html-webpack-plugin');
var CaseSensitivePathsPlugin = require('case-sensitive-paths-webpack-plugin');
var InterpolateHtmlPlugin = require('react-dev-utils/InterpolateHtmlPlugin');
var WatchMissingNodeModulesPlugin = require('react-dev-utils/WatchMissingNodeModulesPlugin');
var getClientEnvironment = require('./env');
var paths = require('./paths');

// Webpack uses `publicPath` to determine where the app is being served from.
// In development, we always serve from the root. This makes config easier.
var publicPath = '/';
// `publicUrl` is just like `publicPath`, but we will provide it to our app
// as %PUBLIC_URL% in `index.html` and `process.env.PUBLIC_URL` in JavaScript.
// Omit trailing slash as %PUBLIC_PATH%/xyz looks better than %PUBLIC_PATH%xyz.
var publicUrl = '';
// Get environment variables to inject into our app.
var env = getClientEnvironment(publicUrl);

// This is the development configuration.
// It is focused on developer experience and fast rebuilds.
// The production configuration is different and lives in a separate file.
module.exports = {
  // You may want 'eval' instead if you prefer to see the compiled output in DevTools.
  // See the discussion in https://github.com/facebookincubator/create-react-app/issues/343.
  devtool: 'cheap-module-source-map',
  // These are the "entry points" to our application.
  // This means they will be the "root" imports that are included in JS bundle.
  // The first two entry points enable "hot" CSS and auto-refreshes for JS.
  entry: [
    // Include an alternative client for WebpackDevServer. A client's job is to
    // connect to WebpackDevServer by a socket and get notified about changes.
    // When you save a file, the client will either apply hot updates (in case
    // of CSS changes), or refresh the page (in case of JS changes). When you
    // make a syntax error, this client will display a syntax error overlay.
    // Note: instead of the default WebpackDevServer client, we use a custom one
    // to bring better experience for Create React App users. You can replace
    // the line below with these two lines if you prefer the stock client:
    // require.resolve('webpack-dev-server/client') + '?/',
    // require.resolve('webpack/hot/dev-server'),
    require.resolve('react-dev-utils/webpackHotDevClient'),
    // We ship a few polyfills by default:
    require.resolve('./polyfills'),
    // Finally, this is your app's code:
    paths.appIndexJs
    // We include the app code last so that if there is a runtime error during
    // initialization, it doesn't blow up the WebpackDevServer client, and
    // changing JS code would still trigger a


ermUtils.isSomeValues(term))
						propertyAtoms++;
					else
						if (ATermUtils.isNot(term))
							head = term;

			if (head == null || propertyAtoms == 0 && primitiveClassAtoms < 2)
				return false;

			terms.remove(head);

			final AtomIObject var = new AtomIVariable("var");
			int varCount = 0;
			final List<RuleAtom> bodyAtoms = new ArrayList<>();
			for (final ATermAppl term : terms)
				varCount = processClass(var, term, bodyAtoms, varCount);

			final List<RuleAtom> headAtoms = new ArrayList<>();
			processClass(var, ATermUtils.negate(head), headAtoms, 1);

			final Rule rule = new Rule(headAtoms, bodyAtoms);
			_kb.addRule(rule);

			_logger.fine(() -> "Add rule: " + rule);

			return true;
		}

		private int processClass(final AtomIObject var, final ATermAppl c, final List<RuleAtom> atoms, final int varCountInit)
		{
			int varCount = varCountInit;

			final AFun afun = c.getAFun();
			if (afun.equals(ATermUtils.ANDFUN))
				for (final ATerm term : (ATermList) c.getArgument(0))
				{
					final ATermAppl conjunct = (ATermAppl) term;
					varCount = processClass(var, conjunct, atoms, varCount);
				}
			else
				if (afun.equals(ATermUtils.SOMEFUN))
				{
					final ATermAppl p = (ATermAppl) c.getArgument(0);
					final ATermAppl filler = (ATermAppl) c.getArgument(1);

					if (filler.getAFun().equals(ATermUtils.VALUEFUN))
					{
						final ATermAppl nominal = (ATermAppl) filler.getArgument(0);
						if (_kb.isDatatypeProperty(p))
						{
							final AtomDConstant arg = new AtomDConstant(nominal);
							final RuleAtom atom = new DatavaluedPropertyAtom(p, var, arg);
							atoms.add(atom);
						}
						else
						{
							final AtomIConstant arg = new AtomIConstant(nominal);
							final RuleAtom atom = new IndividualPropertyAtom(p, var, arg);
							atoms.add(atom);
						}
					}
					else
					{
						varCount++;
						if (_kb.isDatatypeProperty(p))
						{
							final AtomDObject newVar = new AtomDVariable("var" + varCount);
							final RuleAtom atom = new DatavaluedPropertyAtom(p, var, newVar);
							atoms.add(atom);
							processDatatype(newVar, filler, atoms);
						}
						else
						{
							final AtomIObject newVar = new AtomIVariable("var" + varCount);
							final RuleAtom atom = new IndividualPropertyAtom(p, var, newVar);
							atoms.add(atom);
							varCount = processClass(newVar, filler, atoms, varCount);
						}
					}
				}
				else
					if (!c.equals(ATermUtils.TOP))
						atoms.add(new ClassAtom(c, var));

			return varCount;
		}

		private void processDatatype(final AtomDObject var, final ATermAppl c, final List<RuleAtom> atoms)
		{
			final AFun afun = c.getAFun();
			if (afun.equals(ATermUtils.ANDFUN))
				for (ATermList list = (ATermList) c.getArgument(0); !list.isEmpty(); list = list.getNext())
				{
					final ATermAppl conjunct = (ATermAppl) list.getFirst();
					processDatatype(var, conjunct, atoms);
				}
			else
				if (afun.equals(ATermUtils.RESTRDATATYPEFUN))
				{
					fi


dU.get(z)===true){dU.__f();};}});})();(function(){var u="[object Opera]",t="mshtml",s="8.0",r="AppleWebKit/",q="9.0",p="[^\\.0-9]",o="Gecko",n="webkit",m="4.0",l="1.9.0.0",e="opera",k="Version/",h="5.0",c="engine.version",b="qx.bom.client.Engine",g="engine.name",f="function",i="",a="gecko",j="Maple",d=".";qx.Bootstrap.define(b,{statics:{getVersion:function(){var y=window.navigator.userAgent;var w=i;if(qx.bom.client.Engine.__bx()){if(/Opera[\s\/]([0-9]+)\.([0-9])([0-9]*)/.test(y)){if(y.indexOf(k)!=-1){var x=y.match(/Version\/(\d+)\.(\d+)/);w=x[1]+d+x[2].charAt(0)+d+x[2].substring(1,x[2].length);}else {w=RegExp.$1+d+RegExp.$2;if(RegExp.$3!=i){w+=d+RegExp.$3;};};};}else if(qx.bom.client.Engine.__by()){if(/AppleWebKit\/([^ ]+)/.test(y)){w=RegExp.$1;var z=RegExp(p).exec(w);if(z){w=w.slice(0,z.index);};};}else if(qx.bom.client.Engine.__bA()||qx.bom.client.Engine.__bz()){if(/rv\:([^\);]+)(\)|;)/.test(y)){w=RegExp.$1;};}else if(qx.bom.client.Engine.__bB()){if(/MSIE\s+([^\);]+)(\)|;)/.test(y)){w=RegExp.$1;if(w<8&&/Trident\/([^\);]+)(\)|;)/.test(y)){if(RegExp.$1==m){w=s;}else if(RegExp.$1==h){w=q;};};};}else {var v=window.qxFail;if(v&&typeof v===f){w=v().FULLVERSION;}else {w=l;qx.Bootstrap.warn("Unsupported client: "+y+"! Assumed gecko version 1.9.0.0 (Firefox 3.0).");};};return w;},getName:function(){var name;if(qx.bom.client.Engine.__bx()){name=e;}else if(qx.bom.client.Engine.__by()){name=n;}else if(qx.bom.client.Engine.__bA()||qx.bom.client.Engine.__bz()){name=a;}else if(qx.bom.client.Engine.__bB()){name=t;}else {var A=window.qxFail;if(A&&typeof A===f){name=A().NAME;}else {name=a;qx.Bootstrap.warn("Unsupported client: "+window.navigator.userAgent+"! Assumed gecko version 1.9.0.0 (Firefox 3.0).");};};return name;},__bx:function(){return window.opera&&Object.prototype.toString.call(window.opera)==u;},__by:function(){return window.navigator.userAgent.indexOf(r)!=-1;},__bz:function(){return window.navigator.userAgent.indexOf(j)!=-1;},__bA:function(){return window.controllers&&window.navigator.product===o&&window.navigator.userAgent.indexOf(j)==-1;},__bB:function(){return window.navigator.cpuClass&&/MSIE\s+([^\);]+)(\)|;)/.test(window.navigator.userAgent);}},defer:function(B){qx.core.Environment.add(c,B.getVersion);qx.core.Environment.add(g,B.getName);}});})();(function(){var u="ecmascript.array.lastindexof",t="ecmascript.array.map",s="ecmascript.date.now",r="ecmascript.array.reduce",q="qx.bom.client.EcmaScript",p="ecmascript.object.keys",o="ecmascript.error.stacktrace",n="ecmascript.string.trim",m="ecmascript.array.indexof",l="ecmascript.error.t


nt();
      var request = http.Request('GET', Uri.parse(release.url));
      return client.send(request);
    } on Exception catch (error, stacktrace) {
      log("ERROR: FilcAPI.downloadRelease: $error $stacktrace");
      return Future.value(null);
    }
  }

  static Future<void> sendReport(ErrorReport report) async {
    try {
      Map body = {
        "os": report.os,
        "version": report.version,
        "error": report.error,
        "stack_trace": report.stack,
      };

      var client = http.Client();

      http.Response res = await client.post(
        Uri.parse(reportApi),
        body: body,
        headers: {
          'Content-Type': 'application/x-www-form-urlencoded',
        },
      );

      if (res.statusCode != 200) {
        throw "HTTP ${res.statusCode}: ${res.body}";
      }
    } on Exception catch (error, stacktrace) {
      log("ERROR: FilcAPI.sendReport: $error $stacktrace");
    }
  }

  // sharing
  static Future<int> addSharedTheme(SharedTheme theme) async {
    try {
      theme.json.remove('json');
      theme.json['is_public'] = theme.isPublic.toString();
      theme.json['background_color'] = theme.backgroundColor.value.toString();
      theme.json['panels_color'] = theme.panelsColor.value.toString();
      theme.json['accent_color'] = theme.accentColor.value.toString();
      theme.json['icon_color'] = theme.iconColor.value.toString();
      theme.json['shadow_effect'] = theme.shadowEffect.toString();

      // set theme mode or remove if unneccessary
      switch (theme.themeMode) {
        case ThemeMode.dark:
          theme.json['theme_mode'] = 'dark';
          break;
        case ThemeMode.light:
          theme.json['theme_mode'] = 'light';
          break;
        default:
          theme.json.remove('theme_mode');
          break;
      }

      // set linked grade colors
      theme.json['grade_colors_id'] = theme.gradeColors.id;

      http.Response res = await http.post(
        Uri.parse(themeShare),
        body: theme.json,
        // why tf would you urlencode a json, u want to parse it 2 times or what?
        headers: {'Content-Type': 'application/json'},
      );

      // if (res.statusCode != 201) {
      //   throw "HTTP ${res.statusCode}: ${res.body}";
      // }

      if (res.statusCode == 201) {
        log('Shared theme successfully with ID: ${theme.id}');
      }

      return res.statusCode;
    } on Exception catch (error, stacktrace) {
      log("ERROR: FilcAPI.addSharedTheme: $error $stacktrace");

      return 696;
    }
  }

  static Future<Map?> getSharedTheme(String id) async {
    try {
      http.Response res = await http.get(Uri.parse(themeByID + id));

      if (res.statusCode == 200) {
        return (jsonDecode(res.body) as Map);
      } else {
        throw "HTTP ${res.statusCode}: ${res.body}";
      }
    } on Exception catch (error, stacktrace) {
      log("ERROR: FilcAPI.getSharedTheme: $error $stacktrace");
    }
    return null;
  }

  static Future<List?> getAllSharedThemes(int count) async {
    try {
      http.Response res = await http.get(Uri.parse(allThemes));

      if (res.statusCode == 200) {
        return (jsonDecode(utf8.decode(res.bodyBytes)) as List);
      } else {
        throw "HTTP ${res.statusCode}: ${res.body}";
      }
    } on


48, signedEnum, -1) end
function Monster.AddTestrequirednestedflatbuffer(builder, testrequirednestedflatbuffer) builder:PrependUOffsetTRelativeSlot(49, testrequirednestedflatbuffer, 0) end
function Monster.StartTestrequirednestedflatbufferVector(builder, numElems) return builder:StartVector(1, numElems, 1) end
function Monster.AddScalarKeySortedTables(builder, scalarKeySortedTables) builder:PrependUOffsetTRelativeSlot(50, scalarKeySortedTables, 0) end
function Monster.StartScalarKeySortedTablesVector(builder, numElems) return builder:StartVector(4, numElems, 4) end
function Monster.End(builder) return builder:EndObject() end

return Monster -- return the module


, 0x72, 0x6f, 0x74, 0x6f,
	0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x6d, 0x61, 0x70, 0x73,
	0x2f, 0x70, 0x6c, 0x61, 0x79, 0x61, 0x62, 0x6c, 0x65, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f,
	0x6e, 0x73, 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x3b, 0x73, 0x61, 0x6d,
	0x70, 0x6c, 0x65, 0xa2, 0x02, 0x04, 0x47, 0x4d, 0x50, 0x4c, 0xaa, 0x02, 0x27, 0x47, 0x6f, 0x6f,
	0x67, 0x6c, 0x65, 0x2e, 0x4d, 0x61, 0x70, 0x73, 0x2e, 0x50, 0x6c, 0x61, 0x79, 0x61, 0x62, 0x6c,
	0x65, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x56, 0x33, 0x2e, 0x53, 0x61,
	0x6d, 0x70, 0x6c, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}

var (
	file_google_maps_playablelocations_v3_sample_resources_proto_rawDescOnce sync.Once
	file_google_maps_playablelocations_v3_sample_resources_proto_rawDescData = file_google_maps_playablelocations_v3_sample_resources_proto_rawDesc
)

func file_google_maps_playablelocations_v3_sample_resources_proto_rawDescGZIP() []byte {
	file_google_maps_playablelocations_v3_sample_resources_proto_rawDescOnce.Do(func() {
		file_google_maps_playablelocations_v3_sample_resources_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_maps_playablelocations_v3_sample_resources_proto_rawDescData)
	})
	return file_google_maps_playablelocations_v3_sample_resources_proto_rawDescData
}

var file_google_maps_playablelocations_v3_sample_resources_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_google_maps_playablelocations_v3_sample_resources_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
var file_google_maps_playablelocations_v3_sample_resources_proto_goTypes = []interface{}{
	(SpacingOptions_PointType)(0), // 0: google.maps.playablelocations.v3.sample.SpacingOptions.PointType
	(*PlayableLocation)(nil),      // 1: google.maps.playablelocations.v3.sample.PlayableLocation
	(*SpacingOptions)(nil),        // 2: google.maps.playablelocations.v3.sample.SpacingOptions
	(*Filter)(nil),                // 3: google.maps.playablelocations.v3.sample.Filter
	(*Criterion)(nil),             // 4: google.maps.playablelocations.v3.sample.Criterion
	(*AreaFilter)(nil),            // 5: google.maps.playablelocations.v3.sample.AreaFilter
	(*PlayableLocationList)(nil),  // 6: google.maps.playablelocations.v3.sample.PlayableLocationList
	(*latlng.LatLng)(nil),         // 7: google.type.LatLng
	(*field_mask.FieldMask)(nil),  // 8: google.protobuf.FieldMask
}
var file_google_maps_playablelocations_v3_sample_resources_proto_depIdxs = []int32{
	7, // 0: google.maps.play


/9/29.
 */
public class ChatRecyclerAdapter extends
        RecyclerView.Adapter<RecyclerView.ViewHolder> {
    private Context context;
    private List<ChatMessageBean> userList = new ArrayList<ChatMessageBean>();
    private ArrayList<String> imageList = new ArrayList<String>();
    private HashMap<Integer, Integer> imagePosition = new HashMap<Integer, Integer>();
    public static final int FROM_USER_MSG = 0;//接收消息类型
    public static final int TO_USER_MSG = 1;//发送消息类型
    public static final int FROM_USER_IMG = 2;//接收消息类型
    public static final int TO_USER_IMG = 3;//发送消息类型
    public static final int FROM_USER_VOICE = 4;//接收消息类型
    public static final int TO_USER_VOICE = 5;//发送消息类型
    private int mMinItemWith;// 设置对话框的最大宽度和最小宽度
    private int mMaxItemWith;
    public Handler handler;
    private Animation an;
    private SendErrorListener sendErrorListener;
    private VoiceIsRead voiceIsRead;
    public List<String> unReadPosition = new ArrayList<String>();
    private int voicePlayPosition = -1;
    private LayoutInflater mLayoutInflater;
    private boolean isGif = true;
    public boolean isPicRefresh = true;

    public interface SendErrorListener {
        public void onClick(int position);
    }

    public void setSendErrorListener(SendErrorListener sendErrorListener) {
        this.sendErrorListener = sendErrorListener;
    }

    public interface VoiceIsRead {
        public void voiceOnClick(int position);
    }

    public void setVoiceIsReadListener(VoiceIsRead voiceIsRead) {
        this.voiceIsRead = voiceIsRead;
    }

    public ChatRecyclerAdapter(Context context, List<ChatMessageBean> userList) {
        this.context = context;
        this.userList = userList;
        mLayoutInflater = LayoutInflater.from(context);
        // 获取系统宽度
        WindowManager wManager = (WindowManager) context
                .getSystemService(Context.WINDOW_SERVICE);
        DisplayMetrics outMetrics = new DisplayMetrics();
        wManager.getDefaultDisplay().getMetrics(outMetrics);
        mMaxItemWith = (int) (outMetrics.widthPixels * 0.5f);
        mMinItemWith = (int) (outMetrics.widthPixels * 0.15f);
        handler = new Handler();
    }

    public void setIsGif(boolean isGif) {
        this.isGif = isGif;
    }

    public void setImageList(ArrayList<String> imageList) {
        this.imageList = imageList;
    }

    public void setImagePosition(HashMap<Integer, Integer> imagePosition) {
        this.imagePosition = imagePosition;
    }

    /**
     * @param parent
     * @param viewType
     * @return
     */
    @Override
    public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
        View view = null;
        RecyclerView.ViewHolder holder = null;
        switch (viewType) {
            case FROM_USER_MSG:
                view = LayoutInflater.from(parent.getContext()).inflate(R.layout.layout_msgfrom_list_item, parent, false);
                holder = new FromUserMsgViewHolder(view);
                break;
            case FROM_USER_IMG:
                view = LayoutInflater.from(parent.getContext()).inflate(R.layout.layout_imagefrom_list_item, parent, false);
                holder = new FromUserImageViewHolder(view);
                break;
            case FROM_USER_VOICE:
                view = LayoutInflater.from(parent.getContext()).inflate(R.layout.layout_voicefrom_list_item, parent, false);
                holder = new FromUserVoiceViewHolder(view);
                break;
            case TO_USER_MSG:
                view = LayoutInflater.from(parent.getContext()).inflate(R.layout.layout_msgto_list_item, parent, false);
                holder = new ToUserMsgViewHolder(view);
                break;


 final BodyBorder? border;

  const MLGesture._({
    this.border,
    this.category,
    this.score,
  });

  factory MLGesture.fromMap(Map<dynamic, dynamic> map) {
    return MLGesture._(
      category: map['category'],
      score: map['score'],
      border: map['rect'] != null ? BodyBorder.fromMap(map['rect']) : null,
    );
  }
}
/*
    Copyright 2021-2024. Huawei Technologies Co., Ltd. All rights reserved.

    Licensed under the Apache License, Version 2.0 (the "License")
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

        https://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
*/

part of '../../huawei_ml_body.dart';

class MLFaceAnalyzer implements MLBodyAnalyzer<MLFace, MLFaceAnalyzerSetting> {
  late MethodChannel _channel;

  MLFaceAnalyzer() {
    _channel = const MethodChannel('$baseChannel.face');
  }

  @override
  Future<List<MLFace>> asyncAnalyseFrame(
    MLFaceAnalyzerSetting setting,
  ) async {
    final List<dynamic> res = await _channel.invokeMethod(
      'face#asyncAnalyseFrame',
      setting.toMap(),
    );
    return res.map((dynamic e) => MLFace.fromMap(e)).toList();
  }

  @override
  Future<List<MLFace>> analyseFrame(
    MLFaceAnalyzerSetting setting,
  ) async {
    final List<dynamic> res = await _channel.invokeMethod(
      'face#analyseFrame',
      setting.toMap(),
    );
    return res.map((dynamic e) => MLFace.fromMap(e)).toList();
  }

  @override
  Future<bool> destroy() async {
    return await _channel.invokeMethod(
      'face#destroy',
    );
  }

  @override
  Future<bool> isAvailable() async {
    return await _channel.invokeMethod(
      'face#isAvailable',
    );
  }

  Future<bool> stop() async {
    return await _channel.invokeMethod(
      'face#stop',
    );
  }
}
/*
    Copyright 2021-2024. Huawei Technologies Co., Ltd. All rights reserved.

    Licensed under the Apache License, Version 2.0 (the "License")
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

        https://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
*/

part of '../../huawei_ml_body.dart';

class ML3DFaceAnalyzer
    implements MLBodyAnalyzer<ML3DFace, ML3DFaceAnalyzerSetting> {
  late MethodChannel _channel;

  ML3DFaceAnalyzer() {
    _channel = const MethodChannel('$baseChannel.face3d');
  }

  @override
  Future<List<ML3DFace>> asyncAnalyseFrame(
    ML3DFaceAnalyzerSetting setting,
  ) async {
    final List<dynamic> res = await _channel.invokeMethod(
      'face3d#asyncAnalyseFrame',
      setting.toMap(),
    );
    return res.map((dynamic e) => ML3DFace.fromMap(e)).toList();
  }

  @override
  Future<List<ML3DFace>> analyseFrame(
    ML3DFaceAnalyzerSetting setting,
  ) async {
    final List<dynamic> res = await _channel.invokeMethod(
      'face3d#analyseFrame',
      setting.toMap(),
    );
    return res.map((dynamic e) =>


/*");

		// Add any authorization header, if specified
		if (this.mAutorization)
			request.header("Authorization", this.mAutorization);

		// Send the request, returning a promise resolved once done. Result ignored.
		const result = request.post(jsonData);

		// Log any request failure to aid in error diagnostics
		result.catch(error => console.error("POST to endpoint", path, "failed due to", error));

		// Return the request promise, fwiw
		return result;
	}
}
module.exports = (__debounce) => {

  describe('sugar.js.function.debounce', () => {

    let calledCount = 0;

    const myCoolFn = __debounce(100, (param1) => {
      calledCount++;
    });

    myCoolFn();
    myCoolFn();
    myCoolFn();
    myCoolFn();
    myCoolFn();

    setTimeout(() => {
      myCoolFn();
    }, 120);

    it('Sould have called the function only 1 time', done => {

      setTimeout(() => {
        expect(calledCount).toBe(1);
        done();
      }, 130);
    })

  });

}import * as vscode from 'vscode';

export default class FilesHelper {
  public static getFilePath(name: string, exclude: string = "**/node_modules/**", total: number = 1): Thenable<string> {
    return vscode.workspace.findFiles(name, exclude, total).then((fileUris: vscode.Uri[]) => {
      if (fileUris && fileUris.length > 0) {
        return fileUris[0].path;
      }
      return null;
    });
  }

  public static readFile(path: string): Thenable<string> {
    if (path) {
      return vscode.workspace.openTextDocument(path).then((contents: vscode.TextDocument) => contents.getText());
    } else {
      return null;
    }
  }
}import request from 'supertest';

import { app } from '../app';

import createConnection from '../database';

import { getConnection } from 'typeorm';

describe('Surveys', () => {
  beforeAll(async () => {
    const connection = await createConnection();
    await connection.runMigrations();
  });

  //excluir a tabela depois de terminar | altera o posttest do package.json
  afterAll(async () => {
    const connection = getConnection();
    await connection.dropDatabase();
    await connection.close();
  });

  it('Should be able to create a new survey', async () => {
    const response = await request(app).post('/surveys').send({
      title: 'Title Example',
      description: 'Description Example',
    });

    expect(response.status).toBe(201);
    expect(response.body).toHaveProperty('id');
  });

  it('Should be able to get all surveys', async () => {
    await request(app).post('/surveys').send({
      title: 'Title Example 2',
      description: 'Description Example 2',
    });

    const response = await request(app).get('/surveys');

    //cadastrou 2 pesquisas, então espera que o tamanho do response seja 2
    expect(response.body.length).toBe(2);
  });
});

// describe("First", () => {
//   it("deve ser possível somar 2 números", () => {
//     expect(2+2).toBe(4)
//   });
// });

// describe("First", () => {
//   it("deve ser possível somar 2 números", () => {
//     expect(2+4).not.toBe(4)
//   });


 to create keys for decrypting a media stream.
 * Available only in secure contexts.
 *
 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Navigator/requestMediaKeySystemAccess)
 */
suspend inline fun Navigator.requestMediaKeySystemAccess(
    keySystem: String,
    supportedConfigurations: ReadonlyArray<MediaKeySystemConfiguration>,
): MediaKeySystemAccess {
    return requestMediaKeySystemAccessAsync(
        keySystem = keySystem,
        supportedConfigurations = supportedConfigurations,
    ).await()
}

/**
 * The **`share()`** method of the Navigator interface invokes the native sharing mechanism of the device to share data such as text, URLs, or files.
 * Available only in secure contexts.
 *
 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Navigator/share)
 */
suspend inline fun Navigator.share(data: ShareData) {
    shareAsync(
        data = data,
    ).await()
}

/**
 * The **`share()`** method of the Navigator interface invokes the native sharing mechanism of the device to share data such as text, URLs, or files.
 * Available only in secure contexts.
 *
 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Navigator/share)
 */
suspend inline fun Navigator.share() {
    shareAsync().await()
}
// Automatically generated - do not modify!

package web.gl

import js.array.ReadonlyArray

sealed external interface WEBGL_draw_buffers {
    /**
     * The **`WEBGL_draw_buffers.drawBuffersWEBGL()`** method is part of the WebGL API and allows you to define the draw buffers to which all fragment colors are written.
     *
     * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WEBGL_draw_buffers/drawBuffersWEBGL)
     */
    fun drawBuffersWEBGL(buffers: ReadonlyArray<GLenum>)
    val COLOR_ATTACHMENT0_WEBGL: GLenum
    val COLOR_ATTACHMENT1_WEBGL: GLenum
    val COLOR_ATTACHMENT2_WEBGL: GLenum
    val COLOR_ATTACHMENT3_WEBGL: GLenum
    val COLOR_ATTACHMENT4_WEBGL: GLenum
    val COLOR_ATTACHMENT5_WEBGL: GLenum
    val COLOR_ATTACHMENT6_WEBGL: GLenum
    val COLOR_ATTACHMENT7_WEBGL: GLenum
    val COLOR_ATTACHMENT8_WEBGL: GLenum
    val COLOR_ATTACHMENT9_WEBGL: GLenum
    val COLOR_ATTACHMENT10_WEBGL: GLenum
    val COLOR_ATTACHMENT11_WEBGL: GLenum
    val COLOR_ATTACHMENT12_WEBGL: GLenum
    val COLOR_ATTACHMENT13_WEBGL: GLenum
    val COLOR_ATTACHMENT14_WEBGL: GLenum
    val COLOR_ATTACHMENT15_WEBGL: GLenum
    val DRAW_BUFFER0_WEBGL: GLenum
    val DRAW_BUFFER1_WEBGL: GLenum
    val DRAW_BUFFER2_WEBGL: GLenum
    val DRAW_BUFFER3_WEBGL: GLenum
    val DRAW_BUFFER4_WEBGL: GLenum
    val DRAW_BUFFER5_WEBGL: GLenum
    val DRAW_BUFFER6_WEBGL: GLenum
    val DRAW_BUFFER7_WEBGL: GLenum
    val DRAW_BUFFER8_WEBGL: GLenum
    val DRAW_BUFFER9_WEBGL: GLenum
    val DRAW_BUFFER10_WEBGL: GLenum
    val DRAW_BUFFER11_WEBGL: GLenum
    val DRAW_BUFFER12_WEBGL: GLenum
    val DRAW_BUFFER13_WEBGL: GLenum
    val DRAW_BUFFER14_WEBGL: GLenum
    val DRAW_BUFFER15_WEBGL: GLenum
    val MAX_COLOR_ATTACHMENTS_WEBGL: GLenum
    val MAX_DRAW_BUFFERS_WEBGL: GLenum
}
// Automatically generated - do not modify!

package we


160c31.78 0 61.37 11.94 84.58 32.61l19.28-19.29C368.8 164.4 384 170.7 384 183.3V259.7z"],campground:[576,512,[9978],"f6bb","M328.1 112L563.7 405.4C571.7 415.4 576 427.7 576 440.4V464C576 490.5 554.5 512 528 512H48C21.49 512 0 490.5 0 464V440.4C0 427.7 4.328 415.4 12.27 405.4L247 112L199 51.99C187.1 38.19 190.2 18.05 204 7.013C217.8-4.027 237.9-1.789 248.1 12.01L288 60.78L327 12.01C338.1-1.789 358.2-4.027 371.1 7.013C385.8 18.05 388 38.19 376.1 51.99L328.1 112zM407.5 448L288 291.7L168.5 448H407.5z"],"candy-cane":[512,512,[],"f786","M497.5 91.1C469.6 33.13 411.8 0 352.4 0c-27.88 0-56.14 7.25-81.77 22.62L243.1 38.1C227.9 48.12 223 67.75 232.1 82.87l32.76 54.87c8.522 14.2 27.59 20.6 43.88 11.06l27.51-16.37c5.125-3.125 10.95-4.439 16.58-4.439c10.88 0 21.35 5.625 27.35 15.62c9 15.12 3.917 34.59-11.08 43.71L15.6 397.6c-15.25 9.125-20.13 28.62-11 43.87l32.76 54.87c8.522 14.2 27.59 20.66 43.88 11.12l347.4-206.5C500.2 258.1 533.2 167.5 497.5 91.1zM319.7 104.1L317.2 106.5l-20.5-61.5c9.75-4.75 19.88-8.125 30.38-10.25l20.63 61.87C337.8 97.37 328.2 99.87 319.7 104.1zM145.8 431.7l-60.5-38.5l30.88-18.25l60.5 38.5L145.8 431.7zM253.3 367.9l-60.5-38.5l30.88-18.25l60.5 38.5L253.3 367.9zM364.2 301.1L303.7 263.5l30.88-18.25l60.5 38.5L364.2 301.1zM384.7 104.7l46-45.1c8.375 6.5 16 13.1 22.5 22.5l-45.63 45.81C401.9 117.8 393.9 110.1 384.7 104.7zM466.7 212.5l-59.5-19.75c3.25-5.375 5.875-10.1 7.5-17.12c1-4.5 1.625-9.125 1.75-13.62l60.38 20.12C474.7 192.5 471.4 202.7 466.7 212.5z"],cannabis:[576,512,[],"f55f","M544 374.4c0 6-3.25 11.38-8.5 14.12c-2.5 1.375-60.75 31.75-133.5 31.75c-6.124 0-12-.125-17.5-.25c11.38 22.25 16.5 38.25 16.75 39.13c1.875 5.75 .375 12-3.875 16.12c-4.125 4.25-10.38 5.75-16.12 4c-1.631-.4648-32.94-10.66-69.25-34.06v42.81C312 501.3 301.3 512 288 512s-24-


-select: none;
}
a.pp-restore-icon {
  --size: 24px;
  height: var(--size) !important;
  width: var(--size) !important;
  display: inline-block;
  vertical-align: middle !important;
  border: none !important;
  padding: 0 !important;
  margin: 0 !important;
  z-index: 9999999999 !important;
  cursor: pointer !important;
  background-color: transparent !important;
  position: relative;
}
a.pp-restore-icon::after,
a.pp-restore-icon::before {
  display: none;
}
a.pp-restore-icon div {
  margin: 0 !important;
}
a.pp-restore-icon::before,
a.pp-restore-icon::after {
  display: none !important;
}
a.pp-restore-icon:hover .pp-tip {
  display: block;
}
a.pp-restore-icon:hover .pp-icon {
  background-image: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjgiIGhlaWdodD0iMjgiIHZpZXdCb3g9IjAgMCAyOCAyOCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4NCjxwYXRoIGQ9Ik0wIDRDMCAxLjc5MDg2IDEuNzkwODYgMCA0IDBIMjhWMjhINEMxLjc5MDg2IDI4IDAgMjYuMjA5MSAwIDI0VjRaIiBmaWxsPSIjMzA2RUZGIi8+DQo8cGF0aCBvcGFjaXR5PSIwLjk4NTYwMSIgZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNS43MjQyIDguNjIwMzhDMTUuNDg0OCA4LjU5MDA4IDE1LjI4MTIgOC40MzA3OSAxNS4xOTQzIDguMjA1NjJMMTQuNDc0MiA2LjM0MTE1QzE0LjQxNDYgNi4xODY4MyAxNC41NDEyIDYuMDI0NzQgMTQuNzA1NCA2LjA0NTE3TDIyLjI4MzQgNi45ODgzOEMyMi42NzI4IDcuMDM2ODUgMjMuMDA2NCA3LjI5MDE2IDIzLjE1NzcgNy42NTIyM0wyNCA5LjY2NzY4TDE1LjcyNDIgOC42MjAzOFoiIGZpbGw9IndoaXRlIi8+DQo8cGF0aCBvcGFjaXR5PSIwLjk4NTYwMSIgZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xMi4yOTE0IDguNjIwMzhDMTIuNTMwOSA4LjU5MDA4IDEyLjczNDQgOC40MzA3OSAxMi44MjE0IDguMjA1NjJMMTMuNTQxNCA2LjM0MTE1QzEzLjYwMSA2LjE4NjgzIDEzLjQ3NDQgNi4wMjQ3NCAxMy4zMTAzIDYuMDQ1MTdMNS43MzIyNiA2Ljk4ODM4QzUuMzQyODUgNy4wMzY4NSA1LjAwOTIyIDcuMjkwMTYgNC44NTc5MSA3LjY1MjIzTDQuMDE1NjIgOS42Njc2OEw3LjQ0MzQzIDkuMjMzODlMMTIuMjkxNCA4LjYyMDM4WiIgZmlsbD0id2hpdGUiLz4NCjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNNCA5LjY2NzcySDI0VjIwLjY1MjFDMjQgMjEuODg3NSAyMi45OTg1IDIyLjg4ODkgMjEuNzYzMiAyMi44ODg5SDYuMjM2ODNDNS4wMDE0NiAyMi44ODg5IDQgMjEuODg3NSA0IDIwLjY1MjFWOS42Njc3MloiIGZpbGw9IndoaXRlIi8+DQo8cGF0aCBkPSJNMTEuNzc3MyAxOS41NTU1QzExLjc3NzMgMTkuNTU1NSAxMi44NzcxIDIwIDEzLjk4OTIgMjBDMTUu


strip()
        self.previous_command = llm_cmd
        return {self.output_key: llm_cmd}

    def execute(self, url: str, browser_content: str) -> str:
        """Figure out next browser command to run.

        Args:
            url: URL of the site currently on.
            browser_content: Content of the page as currently displayed by the browser.

        Returns:
            Next browser command to run.

        Example:
            .. code-block:: python

                browser_content = "...."
                llm_command = natbot.run("www.google.com", browser_content)
        """
        _inputs = {
            self.input_url_key: url,
            self.input_browser_content_key: browser_content,
        }
        return self(_inputs)[self.output_key]

    @property
    def _chain_type(self) -> str:
        return "nat_bot_chain"


.
    /// </summary>
    /// <param name="deleteBehavior">
    ///     The action to perform.
    ///     <see langword="null" /> to reset to default.
    /// </param>
    /// <param name="fromDataAnnotation">Indicates whether the configuration was specified using a data annotation.</param>
    /// <returns>
    ///     The same builder instance if the delete operation was configured,
    ///     <see langword="null" /> otherwise.
    /// </returns>
    IConventionForeignKeyBuilder? OnDelete(DeleteBehavior? deleteBehavior, bool fromDataAnnotation = false);

    /// <summary>
    ///     Returns a value i


n't out of bounds */
        if (ppe->offset > size - sizeof(void *)) {
            dmprintf4(mem, "  basic_enum_ptrs: Attempt to enum ptr with offset=%d beyond size=%d: structure at "PRI_INTPTR", type: %s\n",
                      ppe->offset, size, (intptr_t)vptr, pstype->sname);
            return 0;
        }
#endif
        switch ((gc_ptr_type_index_t)ppe->type) {
            case GC_ELT_OBJ:
                return ENUM_OBJ(*(const void *EV_CONST *)pptr);
            case GC_ELT_STRING:
                return ENUM_STRING((const gs_string *)pptr);
            case GC_ELT_CONST_STRING:
                return ENUM_CONST_STRING((const gs_const_string *)pptr);
        }
    }
    if (!psd->super_type)
        return 0;
    return ENUM_USING(*(psd->super_type),
                      (EV_CONST void *)
                        ((EV_CONST char *)vptr + psd->super_offset),
                      pstype->ssize, index - psd->num_ptrs);
}
ENUM_PTRS_END_PROC

/* Relocate pointers */
RELOC_PTRS_BEGIN(basic_reloc_ptrs)
{
    const gc_struct_data_t *psd = pstype->proc_data;
    uint i;

    for (i = 0; i < psd->num_ptrs; ++i) {
        const gc_ptr_element_t *ppe = &psd->ptrs[i];
        char *pptr = (char *)vptr + ppe->offset;

        switch ((gc_ptr_type_index_t) ppe->type) {
            case GC_ELT_OBJ:
                RELOC_OBJ_VAR(*(void **)pptr);
                break;
            case GC_ELT_STRING:
                RELOC_STRING_VAR(*(gs_string *)pptr);
                break;
            case GC_ELT_CONST_STRING:
                RELOC_CONST_STRING_VAR(*(gs_const_string *)pptr);
                break;
        }
    }
    if (psd->super_type)
        RELOC_USING(*(psd->super_type),
                      (void *)((char *)vptr + psd->super_offset),
                      pstype->ssize);
} RELOC_PTRS_END


 REVERSED TRIPLE PRIME → APOSTROPHE, APOSTROPHE, APOSTROPHE# →‵‵‵→
    {8249, "<"},     // MA#* ( ‹ → < ) SINGLE LEFT-POINTING ANGLE QUOTATION MARK → LESS-THAN SIGN#
    {8250, ">"},     // MA#* ( › → > ) SINGLE RIGHT-POINTING ANGLE QUOTATION MARK → GREATER-THAN SIGN#
    {8252, "!!"},    // MA#* ( ‼ → !! ) DOUBLE EXCLAMATION MARK → EXCLAMATION MARK, EXCLAMATION MARK#
    {8257, "/"},     // MA#* ( ⁁ → / ) CARET INSERTION POINT → SOLIDUS#
    {8259, "-"},     // MA#* ( ⁃ → - ) HYPHEN BULLET → HYPHEN-MINUS# →‐→
    {8260, "/"},     // MA#* ( ⁄ → / ) FRACTION SLASH → SOLIDUS#
    {8263, "??"},    // MA#* ( ⁇ → ?? ) DOUBLE QUESTION MARK → QUESTION MARK, QUESTION MARK#
    {8264, "?!"},    // MA#* ( ⁈ → ?! ) QUESTION EXCLAMATION MARK → QUESTION MARK, EXCLAMATION MARK#
    {8265, "!?"},    // MA#* ( ⁉ → !? ) EXCLAMATION QUESTION MARK → EXCLAMATION MARK, QUESTION MARK#
    {8270, "*"},     // MA#* ( ⁎ → * ) LOW ASTERISK → ASTERISK#
    {8275, "~"},     // MA#* ( ⁓ → ~ ) SWUNG DASH → TILDE#
    {8279, "''''"},  // MA#* ( ⁗ → '''' ) QUADRUPLE PRIME → APOSTROPHE, APOSTROPHE, APOSTROPHE, APOSTROPHE# →′′′′→
    {8282, ":"},     // MA#* ( ⁚ → : ) TWO DOT PUNCTUATION → COLON#
    {8287, " "},     // MA#* (   →   ) MEDIUM MATHEMATICAL SPACE → SPACE#
    {8360, "Rs"},    // MA#* ( ₨ → Rs ) RUPEE SIGN → LATIN CAPITAL LETTER R, LATIN SMALL LETTER S#
    {8374, "lt"},    // MA#* ( ₶ → lt ) LIVRE TOURNOIS SIGN → LATIN SMALL LETTER L, LATIN SMALL LETTER T#
    {8448, "a/c"},   // MA#* ( ℀ → a/c ) ACCOUNT OF → LATIN SMALL LETTER A, SOLIDUS, LATIN SMALL LETTER C#
    {8449, "a/s"},   // MA#* ( ℁ → a/s ) ADDRESSED TO THE SUBJECT → LATIN SMALL LETTER A, SOLIDUS, LATIN SMALL LETTER S#
    {8450, "C"},     // MA# ( ℂ → C ) DOUBLE-STRUCK CAPITAL C → LATIN CAPITAL LETTER C#
    {8453, "c/o"},   // MA#* ( ℅ → c/o ) CARE OF → LATIN SMALL LETTER C, SOLIDUS, LATIN SMALL LETTER O#
    {8454, "c/u"},   // MA#* ( ℆ → c/u ) CADA UNA → LATIN SMALL LETTER C, SOLIDUS, LATIN SMALL LETTER U#
    {8458, "g"},     // MA# ( ℊ → g ) SCRIPT SMALL G → LATIN SMALL LETTER G#
    {8459, "H"},     // MA# ( ℋ → H ) SCRIPT CAPITAL H → LATIN CAPITAL LETTER H#
    {8460, "H"},     // MA# ( ℌ → H ) BLACK-LETTER CAPITAL H → LATIN CAPITAL LETTER H#
    {8461, "H"},     // MA# ( ℍ → H ) DOUBLE-STRUCK CAPITAL H → LATIN CAPITAL LETTER H#
    {8462, "h"},     // MA# ( ℎ → h ) PLANCK CONSTANT → LATIN SMA


ummary>
        [UPSCode("59")]
        _2ndDayAirAm,

        /// <summary>
        /// Worldwide Saver
        /// </summary>
        [UPSCode("65")]
        WorldwideSaver,

        //Currently not available. Actually this is a pickup point service, so you need implement IPickupPointProvider to use this feature.
        ///// <summary>
        ///// Access Point Economy
        ///// </summary>
        //[UPSCode("70")]
        //AccessPointEconomy,

        /// <summary>
        /// Worldwide Express Freight Midday
        /// </summary>
        [UPSCode("71")]
        WorldwideExpressFreightMidday,

        /// <summary>
        /// Express 12:00
        /// </summary>
        [UPSCode("74")]
        Express1200,

        /// <summary>
        /// Heavy Goods
        /// </summary>
        [UPSCode("75")]
        HeavyGoods,

        /// <summary>
        /// Today Standard
        /// </summary>
        [UPSCode("82")]
        TodayStandard,

        /// <summary>
        /// Today Dedicated Courrier
        /// </summary>
        [UPSCode("83")]
        TodayDedicatedCourrier,

        /// <summary>
        /// Today Express
        /// </summary>
        [UPSCode("85")]
        TodayExpress,

        /// <summary>
        /// Today Express Saver
        /// </summary>
        [UPSCode("86")]
        TodayExpressSaver,

        /// <summary>
        /// Worldwide Express Freight
        /// </summary>
        [UPSCode("96")]
        WorldwideExpressFreight
    }
}


arnings("unused")
class GroovyUtilTest {

  /**
   *

   * {@code
   * {
   *   property = 'value'
   *   nested = {
   *     nestedProperty = 'nestedValue'
   *   }
   * }
   * }
   *

   */
  @Test
  void closureTo_withNestedClosure_shouldReturnStructuredClass() {
    // Given
    final Closure<?> closure = closure(this,
        "property", new GStringImpl(new Object[] { "lue" }, new String[] { "va" }),
        "nested", closure(this, "nestedProperty", "nestedValue"));
    // When
    final StructuredClass result = closureTo(closure, StructuredClass.class);
    // Then
    assertThat(result).isNotNull()
        .hasFieldOrPropertyWithValue("property", "value")
        .hasFieldOrPropertyWithValue("nested.nestedProperty", "nestedValue")
        .extracting(sc -> sc.nested)
        .hasFieldOrPropertyWithValue("nestedProperty", "nestedValue");
  }

  /**
   *

   * {array=['one','two',{nested='closure'}]}
   *

   */
  @SuppressWarnings("unchecked")
  @Test
  void closureTo_withNestedClosureCollection_shouldReturnMap() {
    // Given
    final Closure<?> closure = closure(this,
        "array", Arrays.asList("one", "two", closure(this, "nested", "closure")));
    // When
    final Map<String, Object> result = closureTo(closure, Map.class);
    // Then
    assertThat(result).hasSize(1)
        .extracting("array").asList().containsExactly("one", "two", Collections.singletonMap("nested", "closure"));
  }

  /**
   *

   * {@code
   * {
   *   element1 = {
   *     property = 'value'
   *     nestedProperty = 'nestedValue'
   *   }
   *   element2 = {
   *     property = 'value2'
   *     nestedProperty = 'nestedValue2'
   *   }
   * }
   * }
   *

   */
  @Test
  void invokeOrParseClosureList_namedClosureListTo_withNamedListNestedClosure_shouldReturnOrderedList() {
    // Given
    final Closure<?> element1 = closure(this, "property", "value",
        "nested", closure(this, "nestedProperty", "nestedValue"));
    final Closure<?> element2 = closure(this, "property", "value2",
        "nested", closure(this, "nestedProperty", "nestedValue2"));
    final Closure<?> closure = closure(this, "element1", element1, "element2", element2);
    // When
    final Optional<List<StructuredClass>> result = invokeOrParseClosureList(closure, StructuredClass.class);
    // Then
    assertThat(result).isPresent().get().asList()
        .hasSize(2)
        .extracting("property", "nested.nestedProperty")
        .containsExactly(
            tuple("value", "nestedValue"),
            tuple("value2", "nestedValue2")
        );
  }

  private static Closure<Object> closure(Object owner, Object... propPairs) {
    if (propPairs.length % 2 != 0) {
      throw new AssertionError("Invalid number of propPairs, should be even (key, value)");
    }
    return new Closure<Object>(owner) {

      public Object doCall(Object... args) {
        for (int it = 0; it < propPairs.length; it++) {
          setProperty(Objects.toString(propPairs[it]), propPairs[++it]);
        }
        return null;
      }

    };
  }

  static final class StructuredClass {
    public String property;
    public NestedStructuredClass nested;
  }

  static final class NestedStructuredClass {
    public String nestedProperty;
  }
}/*
 * Copyright (C) 2008, 2009, Google Inc.
 * Copyright (C) 2008, 2020 Shawn O. Pearce <spearce@spearce.org> and others
 *
 * This program and the accompanying materials are made available under the
 * terms of the Eclipse Distribution License


�坏人，声势比较大；

   2、要狠抓大批判，向阶级敌人猛烈进攻，反对右倾分裂主义，右倾投降主义，彻底粉碎右倾翻案风。特别是反对领导干部的右倾保守思想，……要查单干、查敌人复辟等与批斗本单位、本地区的叛徒、走资派结合起来，大批大斗四类分子，对这些阶级敌人刮12级台风和批判农村自发势力结合起来。做到稳、准、狠地打击阶级敌人，严格区分两类矛盾，把罪大恶极的拿去游街示众等方面均可。把运动搞得有声有色。但不准乱杀人。

   3、革委会内部，有的资产阶级派性十足，这样下去就会发展到右倾分裂主义；

   4、另外，根据当前阶级斗争，全县要组织纠察队，设关卡，还要发些枪给群众，防止敌人搞破坏活动和流串。

   还有，“5·16”事件是个反革命事件，冒充解放军去杀人，区革筹要各县表态。

   6月10日　各公社武装民兵陆续进驻县城，形势开始紧张。

   晚　林溪公社“联指”将合华、冠洞大队“联指”观点的武装民兵30多人组织到公社所在地鸣枪示威。“大军”则组织数百名群众将武装民兵包围，逼他们交出武器，开列清单将武器转到大军观点的民兵手中。

   6月11日　林溪公社武装部副部长姚荣杰原将一挺机枪藏在群众家，怕被“大军”知道夺走，就打电话到县叫“联指”派人去取。“联指”总部立即派吴明崇（林溪人、粮食局职工）去取，拿走机枪时被“大军”发现。电告县革委，要求派人员去解决，缴枪。

   6月12日　县革委派副主任石锦堂、人武部干部覃海兰、县革委委员李运德（大军）、梁新


private val tacToLExprLogger = Logger(LoggerTypes.TAC_TO_LEXPR_CONVERTER)

@KSerializable
@Treapable
sealed class TACExpr : AmbiSerializable, ToLExpression, ToTACExpr {
    companion object {
        val zeroExpr = 0.asTACExpr
    }

    override fun toTACExpr(): TACExpr = this

    abstract val tag: Tag?

    val tagAssumeChecked
        get() = tag ?: throw CertoraInternalException(
            CertoraInternalErrorType.INTERNAL_TAC_TYPE_CHECKER,
            "assumed TAC Expression $this was type checked when it was not."
        )

    abstract fun eval(cs : List<BigInteger>) : BigInteger?

    @Suppress("SwallowedException")
    fun safeEval(cs: List<BigInteger>) = try {
        eval(cs)
    } catch (_: ArithmeticException) {
        null
    }

    /**
     * [cb] is a custom handler for [TACSymbol.Var]s, which by default just takes the SMT-rep
     */
    abstract fun toPrintRep(cb: (TACSymbol.Var) -> String): String

    /**
     * Checks if the TAC Expr `uses` the variable `v`.
     */
    /**
     * Checks if the TAC Expr `uses` the variable `v`.
     */
    fun usesVar(v: TACSymbol.Var) =
        subs.filterIsInstance<Sym.Var>().any { it.s == v }

    // REVIEW: looks redundant with `TACExpr.subs` in `TACExprUtils.kt` --> unify?
    fun nestedSubexprs(): Collection<TACExpr> {
        val ret = mutableSetOf<TACExpr>()
        fun TACExpr.helper() {
            ret.add(this)
            when (this) {
                is Vec -> this.ls.forEach { it.helper() }
                is BinBoolOp.LOr -> this.ls.forEach { it.helper() }
                is BinBoolOp.LAnd -> this.ls.forEach { it.helper() }
                is BinExp -> {
                    this.o1.helper()
                    this.o2.helper()
                }
                is Apply -> this.ops.forEach { it.helper() }
                is LongStore -> {
                    this.dstMap.helper()
                    this.dstOffset.helper()
                    this.length.helper()
                    this.srcMap.helper()
                    this.srcOffset.helper()
                }
                is MapDefinition -> {
                    this.defParams.forEach { it.helper() }
                    this.definition.helper()
                }
                is MultiDimStore -> {
                    this.base.helper()
                    this.value.helper()
                    this.locs.forEach { it.helper() }
                }
                is QuantifiedFormula -> {
                    this.quantifiedVars.forEach{ it.asSym().helper() }
                    this.body.helper()
                }
                is Select -> {
                    this.base.helper()
                    this.loc.helper()
                }
                is Store -> {
                    this.base.helper()
                    this.loc.helper()
                    this.value.helper()
                }
                is StructAccess -> {
                    this.struct.helper()
                }
                is StructConstant -> Unit
                is Sym.Const -> Unit
                is Sym.Var -> Unit
                is TernaryExp.Ite -> {
                    this.i.helper()
                    this.t.helper()
                    this.e.helper()
                }
                is UnaryExp -> this.o.helper()
                is Unconstrained -> Unit
                is TernaryExp.AddMod -> {
                    a.helper()
                    b.helper()
                    n.helper()
                }
                is TernaryExp.MulMod -> {
                    a.helper()
                    b.helper()
                    n.helper()
                }


v', Normal_1
	0xB3, 0x09,// 1203 = "vscatterpf0qps"

	// EVEX_Vscatterpf0qpd_vm64z_k1
	0x81,// 'v', Normal_1
	0xB2, 0x09,// 1202 = "vscatterpf0qpd"

	// EVEX_Vscatterpf1qps_vm64z_k1
	0x81,// 'v', Normal_1
	0xB7, 0x09,// 1207 = "vscatterpf1qps"

	// EVEX_Vscatterpf1qpd_vm64z_k1
	0x81,// 'v', Normal_1
	0xB6, 0x09,// 1206 = "vscatterpf1qpd"

	// Sha1nexte_xmm_xmmm128
	0x01,// Normal_1
	0xCB, 0x09,// 1227 = "sha1nexte"

	// EVEX_Vexp2ps_zmm_k1z_zmmm512b32_sae
	0xA4,// 'v', sae
	0x89, 0x07,// 905 = "vexp2ps"
	0x00,// 0x0

	// EVEX_Vexp2pd_zmm_k1z_zmmm512b64_sae
	0xA4,// 'v', sae
	0x88, 0x07,// 904 = "vexp2pd"
	0x00,// 0x0

	// Sha1msg1_xmm_xmmm128
	0x01,// Normal_1
	0xC9, 0x09,// 1225 = "sha1msg1"

	// Sha1msg2_xmm_xmmm128
	0x01,// Normal_1
	0xCA, 0x09,// 1226 = "sha1msg2"

	// EVEX_Vrcp28ps_zmm_k1z_zmmm512b32_sae
	0xA4,// 'v', sae
	0x8E, 0x09,// 1166 = "vrcp28ps"
	0x00,// 0x0

	// EVEX_Vrcp28pd_zmm_k1z_zmmm512b64_sae
	0xA4,// 'v', sae
	0x8D, 0x09,// 1165 = "vrcp28pd"
	0x00,// 0x0

	// Sha256rnds2_xmm_xmmm128
	0x20,// pblendvb
	0xCF, 0x09,// 1231 = "sha256rnds2"

	// EVEX_Vrcp28ss_xmm_k1z_xmm_xmmm32_sae
	0xA4,// 'v', sae
	0x90, 0x09,// 1168 = "vrcp28ss"
	0x00,// 0x0

	// EVEX_Vrcp28sd_xmm_k1z_xmm_xmmm64_sae
	0xA4,// 'v', sae
	0x8F, 0x09,// 1167 = "vrcp28sd"
	0x00,// 0x0

	// Sha256msg1_xmm_xmmm128
	0x01,// Normal_1
	0xCD, 0x09,// 1229 = "sha256msg1"

	// EVEX_Vrsqrt28ps_zmm_k1z_zmmm512b32_sae
	0xA4,// 'v', sae
	0xA7, 0x09,// 1191 = "vrsqrt28ps"
	0x00,// 0x0

	// EVEX_Vrsqrt28pd_zmm_k1z_zmmm512b64_sae
	0xA4,// 'v', sae
	0xA6, 0x09,// 1190 = "vrsqrt28pd"
	0x00,// 0x0

	// Sha256msg2_xmm_xmmm128
	0x01,// Normal_1
	0xCE, 0x09,// 1230 = "sha256msg2"

	// EVEX_Vrsqrt28ss_xmm_k1z_xmm_xmmm3


, а именно образов исполняемого файла, подгружаемых библиотек, кучи и стека.

Нужна для того, чтобы нельзя было при помощи переполнения буфера получать или изменять конкретные данные.

# В чем разница между вторым и третьим параметром fread()?

Второй  параметр `size_t size` говорит о размере объекта (количестве символов), а третий `size_t count` - о количестве объектов

# Напишите пример функции, которая принимает количество аргуметов и сколько угодно чисел типа int, а затем возвращет их среднее

```c
float average(unsigned int n, ...){
    va_list v;
    va_start(v, n);
    int sum = 0;
    for (unsigned int i = 0; i < n; ++i){
        sum += va_arg(v, int);
    }
    va_end(v);
    return (float)sum/n;
}
```

# Чему равно b? int* a = 0x10; int* b = a + 10;

int* a = 0x10; - указывает на ячейку памяти 0x10,

int* b = a + 10; - указывает уже на 0x38 ячейку памяти,

а вот что там - уже никто не знает, вероятно, при обращении к значению b будет seq fault
fault
# Зачем нужны volatile-переменные?

volatile - это квалификатор переменной, указывающий компилятору, что часть кода, которая производит над этой переменной какие-то действия, не должна быть оптимизирована (т.к. значение переменной может быть изменено в любой момент).

# Приведите пример объявления нескольких единиц данных с помощью одной директивы

array1 dw 1,2,3,4,5

times count db num

???

# Что такое красная зона?

Зарезервированный участок памяти фиксированного размера (128 байт), который находится вне стека.

"Красная зона" может быть использована для хранения временных данных (до вызова следующей функции), без изменения стека.

[Вопросы отсюда](https://picloud.pw/media/resources/posts/2018/02/20/Рубежка_1_Билеты_2017.txt)

# Задания на PHP

Написать скрипт, выводящий приветствие пользователю. Имя пользователя передается как get параметр:
```php
<?php
echo 'Hello ' . htmlspecialchars($_GET["name"]) . '!';
?>
```

Написать класс на PHP:
```php
class Fruit {
  protected $color = '';
}

class Orange extends Fruit {
  public function __construct(){
    $this->color = 'orange';
  }

  public function say


-- if c2 then case_str = case_str .. ", c2" end
	-- if c3 then case_str = case_str .. ", c3" end
	-- if c4 then case_str = case_str .. ", c4" end
	-- if c5 then case_str = case_str .. ", c5" end
	-- if c6 then case_str = case_str .. ", c6" end
	-- if c7 then case_str = case_str .. ", c7" end
	-- if c8 then case_str = case_str .. ", c8" end
	-- if c9 then case_str = case_str .. ", c9" end
	-- if not c1 and not c2 and not c3 and not c4 and not c5 and not c6 and not c7 and not c8 and not c9 then
	-- 	case_str = case_str .. ", ERROR"
	-- end

	-- if c3 or c4 or c5 or c6 or c7 or c8 then
	-- 	log_str = log_str .. "\t" .. case_str .. ", " .. "wb.f1: " .. world:get_waterbody_by_tile(ti).tmp_float_1
	-- else
	-- 	log_str = log_str .. "\t" .. case_str .. ", " .. "f1: " .. world.tmp_float_1[ti] .. ", moisture: " .. world.soil_moisture[ti]
	-- end

	-- if flow_type == cwf.TYPES.current then
	-- 	logger:log(log_str)
	-- end
end

---@param flow_type flow_type
---@param month number
---@param year number
local function process_waterflow(world, flow_type, month, year)
	world:for_each_tile_by_elevation(function(ti)
		process_tile_waterflow(ti, world, flow_type, month, year)
	end)
end

---@param flow_type flow_type
local function apply_waterflow(world, flow_type)
	world:for_each_tile(function(ti)
		if world.tmp_bool_1[ti] then return end

		if flow_type == cwf.TYPES.january then
			world.jan_water_movement[ti] = world.tmp_float_1[ti]

		elseif flow_type == cwf.TYPES.july then
			world.jul_water_movement[ti] = world.tmp_float_1[ti]

		else
			world.water_movement[ti] = world.tmp_float_1[ti]
		end
	end)
end

local function initialize_soil_moisture(world)
	world:for_each_waterbody(function(wb)
		local is_lake = false
		local pow = 1

		if wb.type == wb_types.freshwater_lake then
			is_lake = true
			pow = 0.6
		elseif wb.type == wb_types.saltwater_lake then
			is_lake = true
			pow = 0.55
		end

		if not is_lake then return end

		for _, ti in ipairs(wb.tiles) do
			world.soil_moisture[ti] = wb.tmp_float_1 ^ pow
			-- logger:log(ti .. ": " .. wb.tmp_float_1 .. ": " .. world.soil_moisture[ti])
			world.tmp_float_3[ti] = 3000
		end
	end)
end

--* We want 3 kinds of water flow. Surficial, soil, and subsoil (in the bedrock).
--* ---Surficial is the most complicated probably and the fastest.
--* ---Soil is going to be somewhat slow. In this case, we're passing through a porous medium, thus flow is slowed down. While this flow is still
--* sensitive to gravity, it's less gravity contingent than surficial waterflow. Soil water flow is also highly influenced by soil composition and
--* relative saturation of the soil. We may want water flowing in the soil to rejoin rivers in some cases?  We'll see.
--* ---Bedrock/aquifer water flow is even sl


ESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */

#include <machine/asm.h>
#include "assym.h"

#if defined(LIBC_SCCS) && !defined(lint)
        RCSID("$NetBSD: swapcontext.S,v 1.1 2014/08/10 05:47:36 matt Exp $")
#endif /* LIBC_SCCS && !lint */

/* LINTSTUB: int swapcontext(ucontext_t * restrict, ucontext_t * restrict); */

ENTRY(swapcontext)
	sub	sp, sp, #32		/* allocate stack frame */
	stp	x29, x30, [sp, #16]	/* save FP & RA */
	add	x29, sp, #16		/* new FP */
	stp	x0, x1, [sp, #0]	/* save oucp & ucp */

	bl	_C_LABEL(_getcontext)	/* getcontext(oucp) */
	mov	x3, x0			/* save return value */

	ldp	x2, x0, [sp, #0]	/* restore oucp & ucp */
	ldp	x29, x30, [sp, #16]	/* restore FP & RA */
	add	sp, sp, #32		/* free stack frame */

	/*
	 * Assume _getcontext succeeded.
	 */
	mov	x4, sp			/* Get SP */
	str	x4, [x2, #_UC_REGS_SP]	/* Adjust saved SP. */
	str	x30, [x2, #_UC_REGS_PC]	/* Adjust saved LR. */

	cbz	x3, _C_LABEL(setcontext)/* setcontext if getcontext succeeded */
	mov	x0, x3			/* restore getcontext return value */
	ret				/* return on error from getcontext */
END(swapcontext)


t(){
        return updateCt;
    }

    /**
     * swaps the next and current field
     */
    void SwapFields() {
        double[] temp = field;
        field = deltas;
        deltas = temp;
    }

    /**
     * Bounds all values in the delta field between min and max
     */
    public void BoundAllSwap(double min, double max) {
        for (int i = 0; i < length; i++) {
            deltas[i] = Util.Bound(deltas[i], min, max);
        }
    }

    /**
     * /** runs diffusion on the current field, adding the deltas to the delta field. This form of the function assumes
     * either a reflective or wrapping boundary (depending on how the PDEGrid was specified). the diffCoef variable is
     * the nondimensionalized diffusion conefficient. If the dimensionalized diffusion coefficient is x then diffCoef
     * can be found by computing (x*SpaceStep)/TimeStep^2 Note that if the diffCoef exceeds 0.25, this diffusion method
     * will become numerically unstable.
     */
    public void Diffusion(double diffCoef) {
        if (diffCoef > 1.0 / 6) {
            throw new IllegalArgumentException("3D Diffusion is unstable if rate is above 0.1666666! rate: " + diffCoef);
        }
        Diffusion3(field, deltas,diffCoef, xDim, yDim, zDim, wrapX, wrapY, wrapZ,null);
    }

    /**
     * has the same effect as the above diffusion function without the boundary value argument, except rather than
     * assuming zero flux, the boundary condition is set to either the boundaryValue, or wrap around
     */
    public void Diffusion(double diffCoef, double boundaryValue) {
        if (diffCoef > 1.0 / 6) {
            throw new IllegalArgumentException("3D Diffusion is unstable if rate is above 0.1666666! rate: " + diffCoef);
        }
        Diffusion3(field, deltas,diffCoef, xDim, yDim, zDim, wrapX, wrapY, wrapZ,(x,y,z)->boundaryValue);
    }

    /**
     * has the same effect as the above diffusion function with a boundary condition function, which will be evaluated
     * with the out of bounds coordinates as arguments whenever a boundary value is needed, and should return the
     * boundary value
     */
    public void Diffusion(double diffCoef, Coords3DDouble BoundaryConditionFn) {
        if (diffCoef > 1.0 / 6) {
            throw new IllegalArgumentException("3D Diffusion is unstable if rate is above 0.1666666! rate: " + diffCoef);
        }
        Diffusion3(field, deltas,diffCoef, xDim, yDim, zDim, wrapX, wrapY, wrapZ,BoundaryConditionFn);
    }

    /**
     * runs diffusion with discontinuous diffusion rates
     */
    public void Diffusion(double[] diffRatesX,double[]diffRatesY,double[]diffRatesZ){
        Diffusion3(field,deltas,diffRatesX,diffRatesY,diffRatesZ,xDim,yDim,zDim,wrapX,wrapY,wrapZ,null,null,null,null);
    }

    /**
     * runs diffusion with discontinuous diffusion rates
     */
    public void Diffusion(Grid3Ddouble diffRatesX,Grid3Ddouble diffRatesY,Grid3Ddouble diffRatesZ){
        Diffusion3(field,deltas,diffRatesX.field,diffRatesY.field,diffRatesZ.field,xDim,yDim,zDim,wrapX,wrapY,wrapZ,null,null,null,null);
    }

    /**
     * runs diffusion with discontinuous diffusion rates
     */
    public void Diffusion


    if(!obj || !form)
      return;

    form.reset();
    for(let cntrl in form.controls)
    {
      if(obj.hasOwnProperty(cntrl))
      {
        let value = obj[cntrl]
        form.controls[cntrl].setValue(value);
      }
    }
  }

 public static setEnable(form: FormGroup, isEnableForm: boolean){
    if(!form)
      return;

    for(let cntrl in form.controls)
    {
       if(isEnableForm)
         form.controls[cntrl].enable();
       else
         form.controls[cntrl].disable();
    }
  }

 public static setTouched(form: FormGroup, touched: boolean){
    if(!form)
      return;

    for(let cntrl in form.controls)
    {
     if (touched)
       form.controls[cntrl].markAsTouched();
     else
       form.controls[cntrl].markAsUntouched();
    }
  }

}import * as temperature from "../src/temperature";

test("昨日、今日、明日の最高気温を取得する", () => {
  const expected = {
    yesterday: 13.8,
    today: 20.9,
    tomorrow: 19.5,
  };

  expect(
    temperature.daysMax({
      yesterday: zutoolJson.yesterday,
      today: zutoolJson.today,
      tomorrow: zutoolJson.tommorow,
      dayAfterTomorrow: zutoolJson.dayaftertomorrow,
    })
  ).toEqual(expected);
});

test("昨日、今日の気温差が5度以下の場合は0が返ること", () => {
  const yesterday = 15.1;
  const today = 20.0;

  expect(temperature.inspectDifference(yesterday, today)).toEqual(0);
});

test("マイナスの場合でも昨日、今日の気温差が5度以下の場合は0が返ること", () => {
  const yesterday = 0;
  const today = -4.9;

  expect(temperature.inspectDifference(yesterday, today)).toEqual(0);
});

test("昨日、今日の気温差が5度以上8度未満の場合は1が返ること", () => {
  const yesterday = 15.0;
  const today = 20.0;

  expect(temperature.inspectDifference(yesterday, today)).toEqual(1);

  const yesterday2 = 12.1;
  const today2 = 20.0;

  expect(temperature.inspectDifference(yesterday2, today2)).toEqual(1);
});

test("マイナスの場合でも昨日、今日の気温差が5度以上8度未満の場合は1が返ること", () => {
  const yesterday = 0;
  const today = -5;

  expect(temperature.inspectDifference(yesterday, today)).toEqual(1);

  const yesterday2 = 5.0;
  const today2 = -2.9;

  expect(temperature.inspectDifference(yesterday2, today2)).toEqual(1);
});

test("昨日、今日の気温差が8度以上10度未満の場合は2が返ること", () => {
  const yesterday = 12.0;
  const today = 20.0;

  expect(temperature.inspectDifference(yesterday, today)).toEqual(2);

  const yesterday2 = 10.1;
  const today2 = 20.0;

  expect(temperature.inspectDifference(yesterday2, today2)).toEqual(2);
});

test("マイナスの場合でも昨日、今日の気温差が8度以上10度未満の場合は2が返ること", () => {
  const yesterday = 3;
  const today = -5;


/* This file is part of VoltDB.
 * Copyright (C) 2008-2010 VoltDB Inc.
 *
 * VoltDB is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * VoltDB is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with VoltDB.  If not, see <http://www.gnu.org/licenses/>.
 */

#ifndef SERIALIZABLEEEEXCEPTION_H_
#define SERIALIZABLEEEEXCEPTION_H_

#include <string>

namespace voltdb {

class ReferenceSerializeOutput;

enum VoltEEExceptionType {
    VOLT_EE_EXCEPTION_TYPE_NONE = 0,
    VOLT_EE_EXCEPTION_TYPE_EEEXCEPTION = 1,
    VOLT_EE_EXCEPTION_TYPE_SQL = 2,
    VOLT_EE_EXCEPTION_TYPE_CONSTRAINT_VIOLATION = 3,
    VOLT_EE_EXCEPTION_TYPE_EVICTED_TUPLE = 4,
    VOLT_EE_EXCEPTION_TYPE_UNKNOWN_BLOCK = 5,
    VOLT_EE_EXCEPTION_TYPE_FULL_BACKING_STORE = 6
};

/*
 * An "Exception" that can be generated by the EE, serialized into the
 * exception buffer of the Engine, and deserialized on the Java side
 * and then thrown as a Java exception. This can end up being a
 * SQLException or an EEException depending on the exception type.
 *
 * The VoltEEExceptionType enum is synonymous with the
 * SerializableException.SerializableExceptions enum in Java and is
 * used to determine what exception class will be used to deserialize
 * this exception.
 */
class SerializableEEException {
public:
    /*
     * Constructor that performs the serialization to the engines
     * exception buffer.
     */
    SerializableEEException(VoltEEExceptionType exceptionType, std::string message);
    virtual ~SerializableEEException();

    void serialize(ReferenceSerializeOutput *output);
    std::string message() { return m_message; }
protected:
    virtual void p_serialize(ReferenceSerializeOutput *output) {};

private:
    const VoltEEExceptionType m_exceptionType;
    const std::string m_message;

};

}

#endif /* SERIALIZABLEEEEXCEPTION_H_ */


, 196),    RGB(223, 123, 34),
    RGB(18, 27, 195),    RGB(219, 118, 39),
    RGB(27, 30, 193),    RGB(211, 113, 50),
    RGB(36, 33, 192),    RGB(202, 107, 63),
    RGB(46, 37, 191),    RGB(191, 102, 78),
    RGB(57, 41, 190),    RGB(180, 96, 94),
    RGB(68, 45, 188),    RGB(168, 89, 110),
    RGB(80, 49, 187),    RGB(156, 83, 128),
    RGB(92, 53, 185),    RGB(143, 76, 145),
    RGB(104, 58, 183),   RGB(130, 69, 162),
    RGB(116, 63, 176),   RGB(117, 63, 176),
    RGB(128, 68, 164),   RGB(103, 57, 182),
    RGB(140, 74, 149),   RGB(90, 52, 185),
    RGB(152, 80, 133),   RGB(76, 48, 187),
    RGB(163, 86, 117),   RGB(63, 43, 189),
    RGB(174, 92, 102),   RGB(51, 39, 191),
    RGB(184, 98, 88),    RGB(39, 35, 192),
    RGB(194, 103, 75),   RGB(28, 31, 193),
    RGB(203, 108, 62),   RGB(17, 27, 195),
    RGB(211, 112, 51),   RGB(9, 26, 196),
    RGB(218, 116, 41),   RGB(3, 29, 198),
    RGB(222, 120, 35),   RGB(1, 37, 201),
    RGB(224, 124, 32),   RGB(1, 48, 204),
    RGB(224, 128, 34),   RGB(0, 57, 206),
    RGB(223, 131, 36),   RGB(0, 63, 207),
    RGB(222, 133, 37),   RGB(0, 67, 208),
    RGB(222, 134, 38),   RGB(0, 68, 209),
    RGB(222, 133, 37),   RGB(0, 66, 208),
    RGB(223, 132, 36),   RGB(0, 61, 207),
    RGB(224, 129, 34),   RGB(1, 54, 205),
    RGB(224, 125, 32),   RGB(1, 45, 203),
    RGB(223, 121, 34),   RGB(1, 35, 200),
    RGB(219, 117, 40),   RGB(4, 27, 198),
    RGB(212, 113, 49),   RGB(11, 26, 196),
    RGB(204, 109, 60),   RGB(20, 28, 194),
    RGB(195, 104, 73),   RGB(30, 31, 193),
    RGB(185, 99, 86),    RGB(41, 35, 192),
    RGB(175, 93, 101),   RGB(52, 39, 190),
    RGB(164, 87, 116),   RGB(64, 43, 189),
    RGB(0, 0, 0),        RGB(0, 0, 0),
    RGB(0, 0, 0),        RGB(0, 0, 0),
    RGB(0, 0, 0),        RGB(0, 0, 0),
  };

  // check result
  for (std::uint32_t i = 0; i < output->width ; ++i)
  {
#ifndef __i386__
    EXPECT_EQ ((*output) (i, 0).r, output_results[i * 2 + 0].r);
    EXPECT_EQ ((*output) (i, 0).g, output_results[i * 2 + 0].g);
    EXPECT_EQ ((*output) (i, 0).b, output_results[i * 2 + 0].b);
    EXPECT_EQ ((*output) (i, 47).r, output_results[i * 2 + 1].r);
    EXPECT_EQ ((*output) (i, 47).g, output_results[i * 2 + 1].g);
    EXPECT_EQ ((*output) (i, 47).b, output_results[i * 2 + 1].b);
#endif
  }
}

int
main (int argc, char** argv)
{
  testing::InitGoogleTest (&argc, argv);
  return (RUN_ALL_TESTS ());
}
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements.  See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership.  The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License.  You may obtain a copy of the License at
//
//   http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required


using System.Linq;
using Content.Shared.Buckle.Components;
using Content.Shared.Construction;
using Content.Shared.Destructible;
using Content.Shared.Foldable;
using Content.Shared.Storage;
using Robust.Shared.Containers;

namespace Content.Shared.Buckle;

public abstract partial class SharedBuckleSystem
{
    private void InitializeStrap()
    {
        SubscribeLocalEvent<StrapComponent, ComponentStartup>(OnStrapStartup);
        SubscribeLocalEvent<StrapComponent, ComponentShutdown>(OnStrapShutdown);
        SubscribeLocalEvent<StrapComponent, EntityTerminatingEvent>(OnStrapTerminating);
        SubscribeLocalEvent<StrapComponent, ComponentRemove>((e, c, _) => StrapRemoveAll(e, c));

        SubscribeLocalEvent<StrapComponent, ContainerGettingInsertedAttemptEvent>(OnStrapContainerGettingInsertedAttempt);
        SubscribeLocalEvent<StrapComponent, DestructionEventArgs>((e, c, _) => StrapRemoveAll(e, c));
        SubscribeLocalEvent<StrapComponent, BreakageEventArgs>((e, c, _) => StrapRemoveAll(e, c));

        SubscribeLocalEvent<StrapComponent, FoldAttemptEvent>(OnAttemptFold);
        SubscribeLocalEvent<StrapComponent, MachineDeconstructedEvent>((e, c, _) => StrapRemoveAll(e, c));
    }

    private void OnStrapStartup(EntityUid uid, StrapComponent component, ComponentStartup args)
    {
        Appearance.SetData(uid, StrapVisuals.State, component.BuckledEntities.Count != 0);
    }

    private void OnStrapShutdown(EntityUid uid, StrapComponent component, ComponentShutdown args)
    {
        if (!TerminatingOrDeleted(uid))
            StrapRemoveAll(uid, component);
    }

    private void OnStrapTerminating(Entity<StrapComponent> entity, ref EntityTerminatingEvent args)
    {
        StrapRemoveAll(entity, entity.Comp);
    }

    private void OnStrapContainerGe


<*>, Any>

/**
 * Type for group of parallel tasks. Each task must be unique in group.
 */
typealias Tasks = Set<Parallel.Task<*>>

/**
 * The [Map.values] are representing missing dependencies required by the tasks to provide [Map.keys].
 */
typealias TypeDependencies = Map<Parallel.Type<*>, Set<Parallel.Type<*>>>

/**
 * The [Map.values] are representing missing dependencies required by the tasks to provide [Map.keys].
 */
typealias DuplicateDependencies = Map<Parallel.Type<*>, Int>
package flank.apk

import org.junit.Assert.assertEquals
import org.junit.Test

private const val TEST_APK_PATH = "../../test_artifacts/master/apk/app-multiple-success-debug-androidTest.apk"

class ParseApkTest {

    private val apk = Apk.Api()

    /**
     * Parse test cases with following filters conditions:
     *
     * 1. Classes annotated by @RunWith(JUnitParamsRunner::class) wouldn't be split into test methods but delivered as class.
     * 2. Filter out test case named test0 and test cases annotated with org.junit.Ignore
     */
    @Test
    fun parseTestCases() {
        val config = Apk.ParseTestCases.Config(
            filterClass = setOf(Apk.Runner.JUnitParamsRunner),
            filterTest = { (name, annotations) ->
                println("$name $annotations")
                name != "com.example.test_app.InstrumentedTest#test0" && !annotations.contains("org.junit.Ignore")
            }
        )

        assertEquals(
            listOf(
                "com.example.test_app.InstrumentedTest#ignoredTestWitSuppress",
                // "com.example.test_app.InstrumentedTest#ignoredTestWithIgnore",
                // "com.example.test_app.InstrumentedTest#test0",
                "com.example.test_app.InstrumentedTest#test1",
                "com.example.test_app.InstrumentedTest#test2",
                "com.example.test_app.ParameterizedTest#shouldHopefullyPass",
                // "com.example.test_app.bar.BarInstrumentedTest#ignoredTestBar",
                "com.example.test_app.bar.BarInstrumentedTest#testBar",
                // "com.example.test_app.foo.FooInstrumentedTest#ignoredTestFoo",
                "com.example.test_app.foo.FooInstrumentedTest#testFoo",
                "com.example.test_app.parametrized.EspressoParametrizedClassParameterizedNamed#clickRightButton",
                "com.example.test_app.parametrized.EspressoParametrizedClassTestParameterized#clickRightButton",
                "com.example.test_app.parametrized.EspressoParametrizedMethodTestJUnitParamsRunner",
            ),
            apk.parseTestCases(config)(TEST_APK_PATH)
        )
    }

    @Test
    fun parsePackageName() {
        assertEquals(
            "com.example.test_app.test",
            apk.parsePackageName(TEST_APK_PATH)
        )
    }

    @Test
    fun parseInfo() {
        assertEquals(
            Apk.Info(
                packageName = "com.example.test_app.test",
                testRunner = "androidx.test.runner.AndroidJUnitRunner"
            ),
            apk.parseInfo(TEST_APK_PATH)
        )
    }
}
plugins {
    id("com.android.application")
    id("org.jetbrains.kotlin.android")
}

android {
    namespace = "flank.shard.annotationbug"
    compileSdk = 34

    defaultConfig {
        applicationId = "flank.shard.annotationbug"
        minSdk = 24
        targetSdk = 34
        versionCode = 1
        versionName = "1.0"

        testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
    }

    buildTypes {
        release {
            isMinifyEnabled = false
            proguardFiles(
                getDefaultProguardFile("proguard-android-optimize.txt"),
                "proguard-rules.pro"
            )
        }
    }
    compileOptions {
        source


/* SPDX-License-Identifier: GPL-2.0 */
/*
 * Return hooking with list-based shadow stack.
 */
#ifndef _LINUX_RETHOOK_H
#define _LINUX_RETHOOK_H

#include <linux/compiler.h>
#include <linux/objpool.h>
#include <linux/kallsyms.h>
#include <linux/llist.h>
#include <linux/rcupdate.h>

struct rethook_node;

typedef void (*rethook_handler_t) (struct rethook_node *, void *, unsigned long, struct pt_regs *);

/**
 * struct rethook - The rethook management data structure.
 * @data: The user-defined data storage.
 * @handler: The user-defined return hook handler.
 * @pool: The pool of struct rethook_node.
 * @ref: The reference counter.
 * @rcu: The rcu_head for deferred freeing.
 *
 * Don't embed to another data structure, because this is a self-destructive
 * data structure when all rethook_node are freed.
 */
struct rethook {
	void			*data;
	/*
	 * To avoid sparse warnings, this uses a raw function pointer with
	 * __rcu, instead of rethook_handler_t. But this must be same as
	 * rethook_handler_t.
	 */
	void (__rcu *handler) (struct rethook_node *, void *, unsigned long, struct pt_regs *);
	struct objpool_head	pool;
	struct rcu_head		rcu;
};

/**
 * struct rethook_node - The rethook shadow-stack entry node.
 * @rcu: The rcu_head for deferred freeing.
 * @llist: The llist, linked to a struct task_struct::rethooks.
 * @rethook: The pointer to the struct rethook.
 * @ret_addr: The storage for the real return address.
 * @frame: The storage for the frame pointer.
 *
 * You can embed this to your extended data structure to store any data
 * on each entry of the shadow stack.
 */
struct rethook_node {
	struct rcu_head		rcu;
	struct llist_node	llist;
	struct rethook		*rethook;
	unsigned long		ret_addr;
	unsigned long		frame;
};

struct rethook *rethook_alloc(void *data, rethook_handler_t handler, int size, int num);
void rethook_stop(struct rethook *rh);
void rethook_free(struct rethook *rh);
struct rethook_node *rethook_try_get(struct rethook *rh);
void rethook_recycle(struct rethook_node *node);
void rethook_hook(struct rethook_node *node, struct pt_regs *regs, bool mcount);
unsigned long rethook_find_ret_addr(struct task_struct *tsk, unsigned long frame,
				    struct llist_node **cur);

/* Arch dependent code must implement arch_* and trampoline code */
void arch_rethook_prepare(struct rethook_node *node, struct pt_regs *regs, bool mcount);
void arch_rethook_trampoline(void);

/**
 * is_rethook_trampoline() - Check whether the address is rethook trampoline
 * @addr: The address to be checked
 *
 * Return true if the @addr is the rethook trampoline address.
 */
static inline bool is_rethook_trampoline(unsigned long addr)
{
	return addr == (unsigned long)dereference_symbol_descriptor(arch_rethook_trampoline);
}

/* If the architecture needs to fixup the return address, implement it. */
void arch_rethook_fixup_return(struct pt_regs *regs,
			       unsigned long correct_ret_addr);

/* Generic trampoline handler, arch code must prepare asm stub */
unsigned long rethook_trampoline_handler(struct pt_regs *regs,
					 unsigned long frame);

#ifdef CONFIG_RETHOOK
void rethook_flush_task(struct task_struct *tk);
#else
#define rethook_flush_task(tsk)	do { } while (0)
#endif

#endif


_u8 { ptr, len: len as _ }
  }
}

impl WuffsSliceNative<u8> for wuffs_base__slice_u8 {
  fn data(&self) -> &[u8] {
    unsafe { std::slice::from_raw_parts(self.ptr, self.len as _) }
  }
}
use super::*;

/// wrap our streams with cryptography.
pub(crate) fn priv_crypt(
    send: PrivFramedSend,
    enc: sss::SecretStreamEncrypt,
    recv: PrivFramedRecv,
    dec: sss::SecretStreamDecrypt,
) -> (PrivCryptSend, PrivCryptRecv) {
    let send = PrivCryptSend::new(send, enc);
    let recv = PrivCryptRecv::new(recv, dec);
    (send, recv)
}

/// Encryption sender.
pub(crate) struct PrivCryptSend {
    send: PrivFramedSend,
    enc: sss::SecretStreamEncrypt,
}

impl PrivCryptSend {
    /// Initialize the encryption sender.
    pub(crate) fn new(
        send: PrivFramedSend,
        enc: sss::SecretStreamEncrypt,
    ) -> Self {
        Self { send, enc }
    }

    /// Send encrypted data to the remote.
    pub(crate) fn send(
        &mut self,
        data: Box<[u8]>,
    ) -> impl Future<Output = LairResult<()>> + '_ + Send {
        async move {
            // calculate the cipher length
            let len = data.len() + sss::ABYTES;

            // initialize the cipher buffer
            let cipher = sodoken::BufExtend::new_no_lock(len);

            // encrypt the message
            self.enc
                .push_message(
                    data,
                    <Option<sodoken::BufRead>>::None,
                    cipher.clone(),
                )
                .await?;

            // extract the raw cipher data
            let cipher = cipher.try_unwrap().unwrap();

            // send the cipher to the remote
            self.send.send(cipher).await?;

            Ok(())
        }
    }

    /// Forwards shutdown to the underlying framed sender.
    pub(crate) fn shutdown(
        &mut self,
    ) -> impl Future<Output = LairResult<()>> + '_ + Send {
        async move { self.send.shutdown().await }
    }
}

/// Decryption receiver.
pub(crate) struct PrivCryptRecv(BoxStream<'static, LairResult<Box<[u8]>>>);

impl PrivCryptRecv {
    /// Initialize the new decryption receiver.
    pub fn new(recv: PrivFramedRecv, dec: sss::SecretStreamDecrypt) -> Self {
        let recv = futures::stream::try_unfold(
            (recv, dec),
            |(mut recv, mut dec)| async move {
                let cipher = match recv.next().await {
                    None => return Ok(None),
                    Some(cipher) => cipher?,
                };
                let cipher = sodoken::BufRead::from(cipher);
                let msg =
                    sodoken::BufWrite::new_no_lock(cipher.len() - sss::ABYTES);
                dec.pull(cipher, <Option<sodoken::BufRead>>::None, msg.clone())
                    .await?;
                let msg = msg.try_unwrap().unwrap();
                Ok(Some((msg, (recv, dec))))
            },
        );
        Self(recv.boxed())
    }
}

impl Stream for PrivCryptRecv {
    type Item = LairResult<Box<[u8]>>;

    fn poll_next(
        mut self: std::pin::Pin<&mut Self>,
        cx: &mut std::task::Context<'_>,
    ) -> std::task::Poll<Option<Self::Item>> {
        Stream::poll_next(std::pin::Pin::new(&mut self.0)


put and temporary images
    IplImage* frame;
    IplImage* laplace;
    IplImage* colorlaplace;
    IplImage* planes[3];

} t_pdp_opencv_laplace;

static void pdp_opencv_laplace_process_rgb(t_pdp_opencv_laplace *x)
{
    t_pdp     *header = pdp_packet_header(x->x_packet0);
    short int *data   = (short int *)pdp_packet_data(x->x_packet0);
    t_pdp     *newheader = pdp_packet_header(x->x_packet1);
    short int *newdata = (short int *)pdp_packet_data(x->x_packet1);
    int i;

    if ((x->x_width != (t_int)header->info.image.width) ||
        (x->x_height != (t_int)header->info.image.height))
    {

    	post("pdp_opencv_laplace :: resizing plugins");

    	//cv_freeplugins(x);

    	x->x_width = header->info.image.width;
    	x->x_height = header->info.image.height;
    	x->x_size = x->x_width*x->x_height;

    	//Destroy cv_images
    	for( i = 0; i < 3; i++ )
    		cvReleaseImage( &x->planes[i] );
    	cvReleaseImage( &x->frame );
    	cvReleaseImage( &x->laplace );
    	cvReleaseImage( &x->colorlaplace );

	//Create cv_images
    	for( i = 0; i < 3; i++ )
     	 	x->planes[i] = cvCreateImage( cvSize(x->x_width, x->x_height), 8, 1 );
    	x->laplace = cvCreateImage( cvSize(x->x_width, x->x_height), IPL_DEPTH_16S, 1 );
    	x->colorlaplace = cvCreateImage( cvSize(x->x_width,x->x_height), 8, 3 );
    	x->frame = cvCreateImage( cvSize(x->x_width,x->x_height), 8, 3 );
    }

    newheader->info.image.encoding = header->info.image.encoding;
    newheader->info.image.width = x->x_width;
    newheader->info.image.height = x->x_height;

    memcpy( newdata, data, x->x_size*3 );

    // FEM UNA COPIA DEL PACKET A x->grey->imageData ... http://www.cs.iit.edu/~agam/cs512/lect-notes/opencv-intro/opencv-intro.html aqui veiem la estructura de IplImage
    memcpy( x->frame->imageData, data, x->x_size*3 );

    cvCvtPixToPlane( x->frame, x->planes[0], x->planes[1], x->planes[2], 0 );
    for( i = 0; i < 3; i++ )
    {
      cvLaplace( x->planes[i], x->laplace, x->aperture_size );
      cvConvertScaleAbs( x->laplace, x->planes[i], 1, 0 );
    }
    cvCvtPlaneToPix( x->planes[0], x->planes[1], x->planes[2], 0, x->colorlaplace );
    x->colorlaplace->origin = x->frame->origin;

    memcpy( newdata, x->colorlaplace->imageData, x->x_size*3 );

    return;
}

static void pdp_opencv_laplace_thresh(t_pdp_opencv_laplace *x, t_floatarg f)
{
    if ((f==1)||(f==3)||(f==5)||(f==7)) x->aperture_size = (int)f;
}

static void pdp_opencv_laplace_sendpacket(t_pdp_


 at chunk ", chunk);
            Log.write("  ", mmapStart);
            Log.writeln(" with len = ", MMAP_CHUNK_BYTES);
          }
        }
        mapped[chunk] = PROTECTED;
      } else {
        if (VM.VERIFY_ASSERTIONS) VM.assertions._assert(mapped[chunk] == PROTECTED);
      }
    }
    lock.release();
  }

  /****************************************************************************
   * Utility functions
   */

  /**
   * Return {@code true} if the given address has been mmapped
   *
   * @param addr The address in question.
   * @return {@code true} if the given address has been mmapped
   */
  @Override
  @Uninterruptible
  public boolean addressIsMapped(Address addr) {
    int chunk = addressToMmapChunksDown(addr);
    return mapped[chunk] == MAPPED;
  }

  /**
   * Return {@code true} if the given object has been mmapped
   *
   * @param object The object in question.
   * @return {@code true} if the given object has been mmapped
   */
  @Override
  @Uninterruptible
  public boolean objectIsMapped(ObjectReference object) {
    return addressIsMapped(VM.objectModel.refToAddress(object));
  }

  private static int bytesToMmapChunksUp(Extent bytes) {
    return bytes.plus(MMAP_CHUNK_BYTES - 1).toWord().rshl(VMLayoutConstants.LOG_MMAP_CHUNK_BYTES).toInt();
  }

  private static int pagesToMmapChunksUp(int pages) {
    return bytesToMmapChunksUp(Conversions.pagesToBytes(pages));
  }

  private static int addressToMmapChunksDown(Address addr) {
    Word chunk = addr.toWord().rshl(VMLayoutConstants.LOG_MMAP_CHUNK_BYTES);
    return chunk.toInt();
  }

  private static Address mmapChunksToAddress(int chunk) {
    return Word.fromIntZeroExtend(chunk).lsh(VMLayoutConstants.LOG_MMAP_CHUNK_BYTES).toAddress();
  }

  private static int addressToMmapChunksUp(Address addr) {
    Word chunk = addr.plus(MMAP_CHUNK_BYTES - 1).toWord().rshl(VMLayoutConstants.LOG_MMAP_CHUNK_BYTES);
    return chunk.toInt();
  }

}

/*
 *  This file is part of the Jikes RVM project (http://jikesrvm.org).
 *
 *  This file is licensed to You under the Eclipse Public License (EPL);
 *  You may not use this file except in compliance with the License. You
 *  may obtain a copy of the License at
 *
 *      http://www.opensource.org/licenses/eclipse-1.0.php
 *
 *  See the COPYRIGHT.txt file distributed with this work for information
 *  regarding copyright ownership.
 */
package org.vmmagic.unboxed.harness;

import static org.vmmagic.unboxed.harness.MemoryConstants.LOG_BYTES_IN_PAGE;

import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;

import org.mmtk.harness.lang.Trace;
import org.mmtk.harness.lang.Trace.Item;
import org.vmmagic.unboxed.Address;

final class PageTable {
  private final ConcurrentMap<Long, MemoryPage> pages = new ConcurrentHashMap<Long, MemoryPage>();

  private long pageTableEntry(Address p) {
    return p.toLong() >>> LOG_BYTES_IN_PAGE;
  }

  /**
   * Internal: get a page by page number, performing appropriate
   * checking and synchronization
   * @param p
   * @return
   */
  MemoryPage getPage(Address p) {
    MemoryPage page = pages.get(pageTableEntry(p));
    if (page == null) {
      throw new Error("Page not mapped: " + p);
    } else if (!page


 ------------ | -------------------- | -------------------------- |
| 项目基本信息 | -        |              | [project]            |                            |
| 单元测试     | nose2    |              |                      |                            |
| 覆盖率       | coverage |              | [tool.coverage]      |                            |
| 静态检查     | flake8   |              | [tool.flake8]        | 通过 Flake8-pyproject 实现 |
| 静态检查     | pylint   | .pylintrc    |                      | 配置项过多，不进行迁移     |
| 项目构建     | build    |              | [tool.setuptool]     |                            |

### 项目构建

项目使用 `build` 作为包构建工具，使用下列命令生成 wheel 文件。

```shell
python -m build -w
```

## 文档

### 文档编写

除了常规的模块文档外，项目包括以下两种日志文档：

- 更新日志：每个版本的changelog。
- 发布日志：某些重要版本的 release note，每个版本单独一篇文章。

### 文档生成

Borax项目使用 [Material for MkDocs ](https://squidfunk.github.io/mkdocs-material/)  作为文档生成工具，不再支持 docsify 文档生成工具。
# birthday 模块

> 模块：`borax.calendars.birthday`

> Add in v4.1.3：新增 `BirthdayCalculator` 类。

`birthday` 模块提供了常用的两种年龄计算方法。

| 年龄              | 说明                                                     |
| ----------------- | -------------------------------------------------------- |
| 虚岁(Nominal Age) | 在中国传统习俗，出生时即为 1 岁，每逢农历新年增加 1 岁。 |
| 周岁(Actual Age)  | 按公历计算，每过一个公历生日就长一岁。                   |

## 年龄API(对象式)

> New in v4.1.3

### 基本用法

从 v4.1.3 开始，本模块新增对象式的API，所涉及到类如下：

| 类                 | 描述                                  |
| ------------------ | ------------------------------------- |
| BirthdayCalculator | 计算器                                |
| BirthdayResult     | 计算得到的结果，为 `dateclass` 数据类 |

`BirthdayCalculator` 接受一个公历日期或农历日期，使用 `calculate` 方法计算相关结果。

```python
my_birthday = date(2000, 3, 4)
my_bc = BirthdayCalculator(my_birthday)
print(my_bc.birthday)
result = my_bc.calculate()
print(asdict(result))
```

结果

```text
2000-03-04(正月廿九)
{
    'nominal_age': 26,
    'actual_age': 25,
    'animal': '龙',
    'birthday_str': '2000-03-04(二〇〇〇年正月廿九)',
    'next_solar_birthday': <WrappedDate:2026-03-04(正月十六)>,


using System;
using System.Collections.Generic;

namespace EVEMon.Common.Serialization.BattleClinic
{
    /// <summary>
    /// Serializable class for a Battleclinic's API method and its path.
    /// Each BCAPIConfiguration maintains a list of Battleclinic's APIMethods.
    /// </summary>
    public class BCAPIMethod
    {
        private BCAPIMethods m_method;
        private string m_path;

        /// <summary>
        /// Constructor.
        /// </summary>
        /// <param name="method"></param>
        /// <param name="path"></param>
        public BCAPIMethod(BCAPIMethods method, string path)
        {
            m_method = method;
            m_path = path;
        }

        /// <summary>
        /// Returns the BCAPIMethods enumeration member for this Battleclinic's APIMethod.
        /// </summary>
        public BCAPIMethods Method
        {
            get { return m_me


body-bg-rgb: 255, 255, 255;--mdb-emphasis-color: #000;--mdb-emphasis-color-rgb: 0, 0, 0;--mdb-secondary-color: rgba(79, 79, 79, 0.75);--mdb-secondary-color-rgb: 79, 79, 79;--mdb-secondary-bg: #eeeeee;--mdb-secondary-bg-rgb: 238, 238, 238;--mdb-tertiary-color: rgba(79, 79, 79, 0.5);--mdb-tertiary-color-rgb: 79, 79, 79;--mdb-tertiary-bg: #fbfbfb;--mdb-tertiary-bg-rgb: 251, 251, 251;--mdb-heading-color: inherit;--mdb-link-color: #3b71ca;--mdb-link-color-rgb: 59, 113, 202;--mdb-link-decoration: none;--mdb-link-hover-color: #386bc0;--mdb-link-hover-color-rgb: 56, 107, 192;--mdb-link-hover-decoration: none;--mdb-code-color: #e91e63;--mdb-highlight-color: #4f4f4f;--mdb-highlight-bg: #fff9c4;--mdb-border-width: 1px;--mdb-border-style: solid;--mdb-border-color: #e0e0e0;--mdb-border-color-translucent: rgba(0, 0, 0, 0.175);--mdb-border-radius: 0.25rem;--mdb-border-radius-sm: 0.25rem;--mdb-border-radius-lg: 0.5rem;--mdb-border-radius-xl: 1rem;--mdb-border-radius-xxl: 2rem;--mdb-border-radius-2xl: var( --mdb-border-radius-xxl );--mdb-border-radius-pill: 50rem;--mdb-box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);--mdb-box-shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);--mdb-box-shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);--mdb-box-shadow-inset: inset 0 1px 2px rgba(0, 0, 0, 0.075);--mdb-focus-ring-width: 0.25rem;--mdb-focus-ring-opacity: 0.25;--mdb-focus-ring-color: rgba(59, 113, 202, 0.25);--mdb-form-valid-color: #14a44d;--mdb-form-valid-border-color: #14a44d;--mdb-form-invalid-color: #dc4c64;--mdb-form-invalid-border-color: #dc4c64}[data-mdb-theme=dark]{color-scheme:dark;--mdb-body-color: #fff;--mdb-body-color-rgb: 255, 255, 255;--mdb-body-bg: #303030;--mdb-body-bg-rgb: 48, 48, 48;--mdb-emphasis-color: #fff;--mdb-emphasis-color-rgb: 255, 255, 255;--mdb-secondary-color: rgba(255, 255, 255, 0.75);--mdb-secondary-color-rgb: 255, 255, 255;--mdb-secondary-bg: #4f4f4f;--mdb-secondary-bg-rgb: 79, 79, 79;--mdb-tertiary-color: rgba(255, 255, 255, 0.5);--mdb-tertiary-color-rgb: 255, 255, 255;--mdb-tertiary-bg: #3b3b3b;--mdb-tertiary-bg-rgb: 59, 59, 59;--mdb-primary-text-emphasis: #628dd5;--mdb-secondary-text-emphasis: #d9dbe0;--mdb-success-text-emphasis


ردك..اوه انت مشرف اسف على وقاحتي بامكانك ارسال الروابط ولن يتم طردك😏*')
if (chat.antiLink && isGroupLink && !isAdmin) {
if (isBotAdmin) {
const linkThisGroup = `https://chat.whatsapp.com/${await this.groupInviteCode(m.chat)}`
if (m.text.includes(linkThisGroup)) return !0
}
await conn.sendButton(m.chat, `*「 حظر الروابط」*\n*خاصية حظر الروابط مفعله وانت قمت بارسال رابط لذلك سأضطر لطردك من المجموعه👋, ${await this.getName(m.sender)} لقد انتهكت قواعد المجموعة ، سيتم طردك من المجموعه...!!*${isBotAdmin ? '' : '\n\n*[❗ملاحظه❗]البوت ليس مشرفا لا يمكنه طرد من يرسل الروابط*'}`, author, ['الغاء تفعيل حظر الروابط', '/disable antilink'], m)
if (isBotAdmin && bot.restrict) {
await conn.sendMessage(m.chat, { delete: { remoteJid: m.chat, fromMe: false, id: bang, participant: delet }})
let responseb = await conn.groupParticipantsUpdate(m.chat, [m.sender], 'remove if (/^بوت$/i.test(m.text) ) { //sem prefix')
if (responseb[0].status === "404") return   u
} else if (!bot.restrict) return m.reply('*[❗] لم يقم مالك البوت بتمكين حظر الروابط تواصل بالمطور لتفعيله*')
}
return !0
}
import fetch from "node-fetch";
let timeout = 60000,
  poin = 100000;
const handler = async (m, {
  conn,
  command,
  usedPrefix
}) => {
  conn.tebaklogo = conn.tebaklogo ? conn.tebaklogo : {};
  let id = m.chat;
  if (id in conn.tebaklogo) return await conn.reply(m.chat, "اجب ع هذا السؤال اولا", conn.tebaklogo[id][0]), !1;
  let res = await fetch("https://raw.githubusercontent.com/zyad5yasser/bot-test/master/src/game/لوجو.json"),
    src = await res.json(),
    json = {
      hasil: src[Math.floor(Math.random() * src.length)]
    },
    caption = `*${command.toUpperCase()}*\nما هو اسم هذا الشعار\n\nالوقت *${(timeout / 100).toFixed(2)} ثانيه*\n\nالجائزه: ${poin} XP\n    `.trim();
  conn.tebaklogo[id] = [await conn.sendFile(m.chat, json.hasil.data.image, "", caption, m), json, poin, setTimeout(async () => {
    conn.tebaklogo[id] && await conn.reply(m.chat, `انتهي الوقت\nالاجابه هيا: *${json.hasil.data.jawaban}*`, conn.tebaklogo[id][0]),
      delete conn.tebaklogo[id];
  }, timeout)];


tion: absolute;
  display: block;
  box-sizing: border-box;
  top: 3px;
  left: 3px;
  width: 4px;
  height: 5px;
  border-left: 1px solid #a3adc1;
  border-right: 1px solid #a3adc1;
}
.irs--modern .irs-handle.state_hover,
.irs--modern .irs-handle:hover {
  border-color: #7685a2;
  background: #c3c7cd;
  background: linear-gradient(to bottom, #ffffff 0%, #919ba5 30%, #ffffff 100%);
}
.irs--modern .irs-handle.state_hover > i:nth-child(1),
.irs--modern .irs-handle:hover > i:nth-child(1) {
  border-color: #7685a2;
}
.irs--modern .irs-handle.state_hover > i:nth-child(3),
.irs--modern .irs-handle:hover > i:nth-child(3) {
  border-color: #48536a;
}
.irs--modern .irs-min,
.irs--modern .irs-max {
  top: 0;
  font-size: 10px;
  line-height: 1.333;
  text-shadow: none;
  padding: 1px 5px;
  color: white;
  background-color: #d1d6e0;
  border-radius: 5px;
}
.irs--modern .irs-from,
.irs--modern .irs-to,
.irs--modern .irs-single {
  font-size: 10px;
  line-height: 1.333;
  text-shadow: none;
  padding: 1px 5px;
  background-color: #20b426;
  color: white;
  border-radius: 5px;
}
.irs--modern .irs-from:before,
.irs--modern .irs-to:before,
.irs--modern .irs-single:before {
  position: absolute;
  display: block;
  content: "";
  bottom: -6px;
  left: 50%;
  width: 0;
  height: 0;
  margin-left: -3px;
  overflow: hidden;
  border: 3px solid transparent;
  border-top-color: #20b426;
}
.irs--modern .irs-grid {
  height: 25px;
}
.irs--modern .irs-grid-pol {
  background-color: #dedede;
}
.irs--modern .irs-grid-text {
  color: silver;
  font-size: 13px;
}
.irs--sharp {
  height: 50px;
  font-size: 12px;
  line-height: 1;
}
.irs--sharp.irs-with-grid {
  height: 57px;
}
.irs--sharp .irs-line {
  top: 30px;
  height: 2px;
  background-color: black;
  border-radius: 2px;
}
.irs--sharp .irs-bar {
  top: 30px;
  height: 2px;
  background-color: #ee22fa;
}
.irs--sharp .irs-bar--single {
  border-radius: 2px 0 0 2px;
}
.irs--sharp .irs-shadow {
  height: 1px;
  bottom: 21px;
  background-color: rgba(0, 0, 0, 0.5);
}
.irs--sharp .irs-handle {
  top: 25px;
  width: 10px;
  height: 10px;
  background-color: #a804b2;
}
.irs--sharp .irs-handle > i:first-child {
  position: absolute;
  display: block;
  top: 100%;
  left: 0;
  width: 0;
  height: 0;
  border: 5px solid transparent;
  border-top-color: #a804b2;
}
.irs--sharp .irs-handle.state_hover,


manualSeed(2)
    if cuda then
      cutorch.manualSeed(2)
    end
    self.cuda = cuda
    self.naScorer = cuda and torch.load(naNetFi) or torch.load(naNetFi):float()
    self.pwNet = cuda and torch.load(pwNetFi) or torch.load(pwNetFi):float()
    self.lstm = cuda and torch.load(lstmFi) or torch.load(lstmFi):float()
    local Hs = self.lstm:get(1).i2g.weight:size(2)
    self.Hs = Hs
    self.clustModClones = {}

    self.range = cuda and torch.range(1,maxNumMents):cuda() or torch.range(1,maxNumMents):float()
    self.docPosns = cuda and torch.zeros(maxNumMents):cuda() or torch.zeros(maxNumMents):float()
    self.clustStates = cuda and torch.zeros(maxNumClusts,Hs):cuda() or torch.zeros(maxNumClusts,Hs):float()
    self.antClustStates = cuda and torch.zeros(maxNumMents,Hs):cuda() or torch.zeros(maxNumMents,Hs):float()
    self.clustGOs = cuda and torch.zeros(maxNumMents*Hs):cuda() or torch.zeros(maxNumMents*Hs):float()
    collectgarbage()
  end

  function SavedClustDotModel:writeGreedyBPs(pwDevData,anaDevData,cuda,bpfi)
    local bpfi = bpfi or "bps/dev.bps"
    local ofi = assert(io.open(bpfi,"w"))
    assert(self.naScorer.train == false)
    assert(self.pwNet.train == false)
    assert(self.lstm.train == false)

    -- just cloning the embedder b/c we'll be reusing pwNet below...
    local embedder = self.pwNet:get(1):get(2):get(1):get(1):clone('weight','gradWeight','bias','gradBias')
    local lstm = self.lstm:get(1).recurrentModule
    local tout,tcell
    local Hs = self.lstm:get(1).i2g.weight:size(2)
    if not self.tzero then
      self.tzero = torch.Tensor.new():typeAs(self.lstm:get(1).i2g.weight):resize(Hs)
    end
    local tzero = self.tzero
    tzero:zero()
    local startLstm = lstm:clone('weight','gradWeight','bias','gradBias')

    for d = 1, pwDevData.numDocs do
      if d % 100 == 0 then
        print("dev doc " .. tostring(d))
        collectgarbage()
      end
      local numMents = anaDevData:numMents(d)
      ofi:write("0") -- predict first thing links to itself always

      local pwDocBatch = pwDevData:getDocBatch(d)
      local anaDocBatch = anaDevData:docBatch(d) -- i know, i know...
      if cuda then
        pwDocBatch = pwDocBatch:cuda()
        anaDocBatch = anaDocBatch:cuda()
      end

      local docPosns = self:getDocPosns(numMents)
      local Inp = embedder:forward({anaDocBatch,docPosns})
      -- this will do extra work but seems to be slightly faster
      local StartOuts, StartCells = unpack(startLstm:forward({Inp,tzero:view(1,Hs):expand(numMents,Hs),tzero:view(1,Hs):expand(numMents,Hs)}))

      tout, tcell = StartOuts[1], StartCells[1]
      self.clustStates[1] = tout
      self.antClustStates[1] = self.clustStates[1]


			device_->out() << "Minimale ";
		else
			device_->out() << "Adjustable ";
		device_->out() 	<< " scene complexity" << std::endl;

		char buf[1000];
		sprintf(buf, " target frame rate [%.1f, %.1f]; frame rate %.1f\n", requestedMinFrameRate_, highEnoughFrameRate_, pImpl_->frameRate());
		device_->out() << buf;
		complexity().usePriority( 0 );
		device_->out() << " low  priority machines (level, range multiplier): (" << complexity().level( ) << ", " << complexity().rangeMultiplier( ) << ")" << std::endl;
		complexity().usePriority( 1 );
		device_->out() << " high priority machines (level, range multiplier): (" << complexity().level( ) << ", " << complexity().rangeMultiplier( ) << ")" << std::endl;
	}

	MexTransform3d unshakenLocalXform = currentCamera_->localTransform();
	if( shakeCamera() && pCameraShake_->shakeIsOver() )
		cancelCameraShake();

	if ( shakeCamera() )
		shakeCurrentCamera();

	if (environment_)
		environment_->update();

	updateLights();
	currentCamera_->updateRenCamera();

	// update the camera far clipping plane to the fog distance
	currentCamera_->adaptToEnvironment( environment() );
//	device_->out() << "Distance far clipping plane: " << currentCamera()->yonClipDistance() << " m" << std::endl;

	device_->start3D(clearBg_);

	// Attempt a domain render. If the camera is not in a domain, it will use the inOrderRender method.
    currentCamera_->domainRender(36);

	totalEntities_   += currentCamera_->entitiesRendered();
	totalDomains_    += currentCamera_->domainsRendered();

	// Render any background items last.
	if (bgRoot_)
	{
        //Ensure that the camera doesn't clip entities at the original far cliping plane
        currentCamera_->isYonClippingEnabled( false );
		device_->startBackground(110000);
    	currentCamera_->renderTree(bgRoot_, W4dCamera::IN_ORDER_RENDER);
        currentCamera_->isYonClippingEnabled( true );
	}

	device_->end3D();

	if( shakeCamera() )
		currentCamera_->localTransform( unshakenLocalXform );

	if (device_->statistics() && device_->statistics()->shown())
		countLights(lights_, nGlobalLights_, nLocalLights_, nDynamicLights_, device_->out());

}

// Do the per-frame work necessary for each light.
void W4dSceneManager::updateLights()
{
	CB_SCENEMANAGER_DEPIMPL;
    CB_DEPIMPL(uint, nGlobalLights_);
    CB_DEPIMPL(uint, nLocalLights_);
    CB_DEPIMPL(uint, nDynamicLights_);

	// Reset the counts of active lights per frame.
	nGlobalLights_ = nLocalLights_ = nDynamicLights_ = 0;

    for (Lights::iterator i = lights_.begin(); i != lights_.end(); ++i)
    {
		W4dLight* light = *i;

		if (light->isGlobal())
		{
	        light->lazyUpdate();
			++nGlobalLights_;
		}

		// If a light is local, disable it.  It will be enabled again during
		// the render traversal.  Don't call lazyUpdate for the local lights.
		// They will be updated when enabled.
        if (light->isLocal())
        {
        	++nLocalLights_;
        	light->disable();
        }

		// If a client has defined a domain assignor, use it to give every
		// light domains.
		if (light->isDynamic())
		{
		    // Unfortunately, we must update