erKey =
        'cargo_target_${target.rust.replaceAll('-', '_')}_linker'.toUpperCase();

    final ranlibKey = 'RANLIB_${target.rust}';
    final ranlibValue = path.join(toolchainPath, 'llvm-ranlib$exe');

    final ndkVersionParsed = Version.parse(ndkVersion);
    final rustFlagsKey = 'CARGO_ENCODED_RUSTFLAGS';
    final rustFlagsValue = _libGccWorkaround(targetTempDir, ndkVersionParsed);

    final runRustTool =
        Platform.isWindows ? 'run_build_tool.cmd' : 'run_build_tool.sh';

    final packagePath = (await Isolate.resolvePackageUri(
            Uri.parse('package:build_tool/buildtool.dart')))!
        .toFilePath();
    final selfPath = path.canonicalize(path.join(
      packagePath,
      '..',
      '..',
      '..',
      runRustTool,
    ));

    // Make sure that run_build_tool is working properly even initially launched directly
    // through dart run.
    final toolTempDir =
        Platform.environment['CARGOKIT_TOOL_TEMP_DIR'] ?? targetTempDir;

    return {
      arKey: arValue,
      ccKey: ccValue,
      cfFlagsKey: cFlagsValue,
      cxxKey: cxxValue,
      cxxFlagsKey: cxxFlagsValue,
      ranlibKey: ranlibValue,
      rustFlagsKey: rustFlagsValue,
      linkerKey: selfPath,
      // Recognized by main() so we know when we're acting as a wrapper
      '_CARGOKIT_NDK_LINK_TARGET': targetArg,
      '_CARGOKIT_NDK_LINK_CLANG': ccValue,
      'CARGOKIT_TOOL_TEMP_DIR': toolTempDir,
    };
  }

  // Workaround for libgcc missing in NDK23, inspired by cargo-ndk
  String _libGccWorkaround(String buildDir, Version ndkVersion) {
    final workaroundDir = path.join(
      buildDir,
      'cargokit',
      'libgcc_workaround',
      '${ndkVersion.major}',
    );
    Directory(workaroundDir).createSync(recursive: true);
    if (ndkVersion.major >= 23) {
      File(path.join(workaroundDir, 'libgcc.a'))
          .writeAsStringSync('INPUT(-lunwind)');
    } else {
      // Other way around, untested, forward libgcc.a from libunwind once Rust
      // gets updated for NDK23+.
      File(path.join(workaroundDir, 'libunwind.a'))
          .writeAsStringSync('INPUT(-lgcc)');
    }

    var rustFlags = Platform.environment['CARGO_ENCODED_RUSTFLAGS'] ?? '';
    if (rustFlags.isNotEmpty) {
      rustFlags = '$rustFlags\x1f';
    }
    rustFlags = '$rustFlags-L\x1f$workaroundDir';
    return rustFlags;
  }
}
import 'dart:io';
import 'package:flutter_secure_storage/flutter_secure_storage.dart';
import 'package:http/http.dart' as http;

class ApiService {
// API sudah di Hosting
  static const String baseUrl = "https://pkbmharbang.com/api/profile";
  static final storage = FlutterSecureStorage();

  static Future<String?> uploadImage(File imageFile, String name, String email,
      String? password, String? passwordConfirm) async {
    final token = await ApiService.storage.read(key: 'Harbang.Januari@12');

    try {
      final uri = Uri.parse(baseUrl);
      var request = http.MultipartRequest('POST', uri)
        ..headers['Authorization'] = "Bearer $token"
        ..files.add(await http.MultipartFile.fromPath('image', imageFile.path))


 try:
            import new_updater
            new_updater.update_windows_updater()
        except:
            pass

    loop = asyncio.new_event_loop()
    asyncio.set_event_loop(loop)
    server = server.PromptServer(loop)
    q = execution.PromptQueue(server)

    nodes.init_extra_nodes(init_custom_nodes=not args.disable_all_custom_nodes)

    cuda_malloc_warning()

    server.add_routes()
    hijack_progress(server)

    threading.Thread(target=prompt_worker, daemon=True, args=(q, server,)).start()

    if args.quick_test_for_ci:
        exit(0)

    os.makedirs(folder_paths.get_temp_directory(), exist_ok=True)
    call_on_start = None
    if args.auto_launch:
        def startup_server(scheme, address, port):
            import webbrowser
            if os.name == 'nt' and address == '0.0.0.0':
                address = '127.0.0.1'
            if ':' in address:
                address = "[{}]".format(address)
            webbrowser.open(f"{scheme}://{address}:{port}")
        call_on_start = startup_server

    try:
        loop.run_until_complete(server.setup())
        loop.run_until_complete(run(server, address=args.listen, port=args.port, verbose=not args.dont_print_server, call_on_start=call_on_start))
    except KeyboardInterrupt:
        logging.info("\nStopped server")

    cleanup_temp()


width-0, height/2);
		createdLabel.setBounds(labelWidth,height/2 +4,width/2-labelWidth, height/2-2);
		modLabel.setBounds(labelWidth + width/2,height/2 +4,width/2-labelWidth, height/2-2);
		super.setBounds(x, y, width, height);
	}
	public void setSize(int width, int height){
		w = width;
		h = height;
		authorLabel.setBounds(4,0,width-labelWidth, height/2);
		createdLabel.setBounds(4,height/2 +4,width/2-labelWidth, height/2-2);
		modLabel.setBounds(labelWidth + width/2,height/2 +4,width/2-labelWidth, height/2-2);
		super.setSize(width, height);
	}
	public void setNote(AttachedNote i){
		note = i;
		updateInfo();
	}
	public void updateInfo(){
		if (note != null){
			note.incrementStampSuppress();
			authorLabel.setText(note.getAuthorName());
			createdLabel.setText("Created " + note.getDateCreated());
			modLabel.setText("Modified " + note.getDateModified());
			note.decrementStampSuppress();
		}
	}
	/*.................................................................................................................*/
	public void paint(Graphics g) {
		if (MesquiteWindow.checkDoomed(this))
			return;
		g.drawLine(0,0,w, 0);

		MesquiteWindow.uncheckDoomed(this);
	}
}

/* Mesquite source code.  Copyright 1997 and onward, W. Maddison and D. Maddison.

Disclaimer:  The Mesquite source code is lengthy and we are few.  There are no doubt inefficiencies and goofs in this code.
The commenting leaves much to be desired. Please approach this source code with the spirit of helping out.
Perhaps with your help we can be more than a few, and make Mesquite better.

Mesquite is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY.
Mesquite's web site is http://mesquiteproject.org

This source code and its compiled class files are free and modifiable under the terms of
GNU Lesser General Public License.  (http://www.gnu.org/copyleft/lesser.html)
*/
package mesquite.lib.taxa;

import java.awt.Graphics;
import java.awt.Polygon;

import mesquite.lib.DoubleArray;
import mesquite.lib.IntegerArray;
import mesquite.lib.MesquiteDouble;
import mesquite.lib.MesquiteInteger;
import mesquite.lib.ui.ColorDistribution;

/* ��������������������������� taxa ������������������������������� */
/* ======================================================================== */
/**This is the base class for the drawing of taxa.  It contains the information about
the number of nodes, and the x and y positions of the nodes.  It should be subclassed by taxa drawing modules,
so that they can add their own needed field.  TaxaDrawings are typically used within TaxaDisplays.*/

public abstract class TaxaDrawing  {
	public double[] x; //x positions of taxa
	public double[] y; //y positions of taxa
	public double[] z; //z positions of taxa (closeness to viewer, smaller numbers closer)
	public double[] lineBaseX; //base of line on which to draw labels etc.
	public double[] lineBaseY;
	public double[] lineTipX; //tip of line on which to draw labels etc.
	public double[] lineTipY;
	/**labelOrientation indicates where label is to be drawn, in degrees. 0 = normal horizontal
	writing to right of node, as would be done for a tree with orientation RIGHT.
	This does not represent simple rotation, i.e. 180 is


                  bandit, ["Stop following me", " "], z: 80,
                  randwait: 0,
                  width: 300,
                  scale: 0.4);
            }
          }
          runaway();
          var t=Timer.periodic(Duration(seconds: 15), (timer) async {
            print("bandit timer");
            var dist=OPENWORLD.Space.getDistanceBetweenObjs(camera,bandit);
            if (dist<2)
              runaway();
          });
          OPENWORLD.BaseObject.addTimer(bandit,t);

        } else {
          // If journalist coming then attack player
          OPENWORLD.Mob.setSpeech(
              bandit, ["Stand and deliver", "Yadi Yadi", "Hoff"], z: 80,
              width: 300,
              delay: 5,
              scale: 0.4);
          actorAttack(bandit);
        }

      } else {
        print("trigger out bandit");
        OPENWORLD.BaseObject.clearTimers(bandit);

      }
    });

    // You can only kill the bandit when journalist is there otherwise tries to get away from you
    OPENWORLD.BaseObject.setCustomTrigger(bandit);//, dist: 1.5);
    bandit.extra['customtrigger'].addEventListener('strucktrigger', (THREE.Event event) {
      var dist=OPENWORLD.Space.getDistanceBetweenObjs(bandit,journalist2);
      if (dist<7) {
        var damage = getYouDamage();
        setActorHealth(bandit, getActorHealth(bandit) - damage);
        print("bandit hit"+getActorHealth(bandit).toString());
        //  OPENWORLD.Space.faceObjectLerp(npc,camera,1);
        if (getActorHealth(bandit) <= 0) {
          actorDie(bandit); //,diesoundpath:"sounds/die.mp3");
          OPENWORLD.BaseObject.disableDistanceTrigger(bandit);
          OPENWORLD.Mob.clearText(bandit);
          OPENWORLD.BaseObject.clearTimers(bandit);

          Future.delayed(const Duration(milliseconds: 5000), () {
            //
            actorAttack(journalist2);
          });
        }
      } else {
        print("bandit - journalist too far away"+dist.toString());
      }

    });

    // This is the sword that is on the ground and is near the bandit
    var  sword2= sword.clone();//await OPENWORLD.Model.createModel('assets/models/sword.glb');
    copyQuaternion(sword2, sword);

    setWeaponWield(sword2, false,"sword");
    OPENWORLD.Space.worldToLocalSurfaceObjHide(
        sword2,322.93, 390.61,0,10);//318.56, 391.90,0,10);//431.96,273.68,0.0,4);//409.66, 328.47,0,4);//408.75,327.88,0.1, 4);
    OPENWORLD.Space.objTurn(sword2,90);
    OPENWORLD.Space.objPitch(sword2.children[0],90);
    OPENWORLD.Space.objTurn(sword2.children[0],90);
    scene.add(sword2);
    setGetObject(sword2,  scaleselected: 1.1, scalenotselected: 1.1);

    // Put a parrot near sword so is more visible from a distance
    var deadparrot3 = await OPENWORLD.Sprite.cloneSprite(deadparrot);
    deadparrot3.scale.set(2.0,2.0,2.0);
    OPENWORLD.Space.worldToLocalSurfaceObjHide(
        deadparrot3,322.93+0.3, 390.61,0,10);//377.04, 280.52,0.05,4);//376.68, 281.48, 0.25, 4);
    scene.add(deadparrot3);

    var objectid="sword";
    var sword2button=dropWieldButton("sword",sword2, icon:"icons/sword.png");


AY](#CP_DELAY) parameter.
This should be [tuned](#delay_tuning) to the specific vehicle.

## Companion Setup {#companion}

:::warning
The companion implementation/setup is currently untested (the original companion project was unmaintained and has been archived).
:::

If using a companion computer or external sensor, it needs to supply a stream of [OBSTACLE_DISTANCE](https://mavlink.io/en/messages/common.html#OBSTACLE_DISTANCE) messages, which should reflect when and where obstacle were detected.

The minimum rate at which messages _must_ be sent depends on vehicle speed - at higher rates the vehicle will have a longer time to respond to detected obstacles.
Initial testing of the system used a vehicle moving at 4 m/s with `OBSTACLE_DISTANCE` messages being emitted at 10Hz (the maximum rate supported by the vision system).
The system may work well at significantly higher speeds and lower frequency distance updates.

## Gazebo Simulation

_Collision Prevention_ can be tested using [Gazebo](../sim_gazebo_gz/index.md) with the [x500_lidar_2d](../sim_gazebo_gz/vehicles.md#x500-quadrotor-with-2d-lidar) model.
To do this, start a simulation with the x500 lidar model by running the following command:

```sh
make px4_sitl gz_x500_lidar_2d
```

Next, adjust the relevant parameters to the appropriate values and add arbitrary obstacles to your simulation world to test the collision prevention functionality.

The diagram below shows a simulation of collision prevention as viewed in Gazebo.

![RViz image of collision detection using the x500\_lidar\_2d model in Gazebo](../../assets/simulation/gazebo/vehicles/x500_lidar_2d_viz.png)

## Development Information/Tools

### Plotting Obstacle Distance and Minimum Distance in Real-Time with PlotJuggler

[PlotJuggler](../log/plotjuggler_log_analysis.md) can be used to monitor and visualize obstacle distances in a real-time plot, including the minimum distance to the closest obstacle.

<lite-youtube videoid="amLheoHgwc4" title="Plotting Obstacle Distance and Minimum Distance in Real-Time with PlotJuggler"/>

To use this feature you need to add a reactive Lua script to PlotJuggler, and also configure PX4 to export [`obstacle_distance_fused`](../msg_docs/ObstacleDistance.md) UORB topic data.
The Lua script works by extracting the `obstacle_distance_fused` data at each time step, converting the distance values into Cartesian coordinates, and pushing them to PlotJuggler.

步骤如下：

1. Follow the instructions in [Plotting uORB Topic Data in Real Time using PlotJuggler](../debug/plotting_realtime_uorb_data.md)

2. Configure PX4 to publish obstacle distance data (so that it is available to PlotJuggler):

   Add the [`obstacle_distance_fused`](../msg_docs/ObstacleDistance.md) UORB topic to your [`dds_topics.yaml`](https://github.com/PX4/PX4-Autopilot/blob/main/src/modules/uxrce_dds_client/dds_topics.yaml) so that it is published by PX4:

   ```sh
   - topic: /fmu/out/obstacle_distance_fused
     type: px4_msgs::msg::ObstacleDistance
   ```

   For more information see [DDS Topics YAML](../middleware/uxrce_dds.md#dds-topics-yaml) in _uXRCE-DDS (PX4-ROS 2/DDS Bridge)_.

3. Open PlotJuggler and navigate to the **Tools > Reactive Script Editor** section.
   In the **Script Editor** tab, add following scripts in the appropriate sections:

   - **Global code, executed once:**

     ```lua
     obs_dist_fused_xy = ScatterXY.new("obst


;
import me.zombie_striker.qg.api.QualityArmory;
import me.zombie_striker.qg.guns.Gun;
import me.zombie_striker.qg.guns.projectiles.ProjectileManager;
import me.zombie_striker.qg.guns.utils.WeaponSounds;
import me.zombie_striker.qg.guns.utils.WeaponType;
import me.zombie_striker.qg.guns.chargers.ChargingHandler;
import me.zombie_striker.qg.guns.chargers.ChargingManager;
import me.zombie_striker.qg.guns.reloaders.ReloadingHandler;
import me.zombie_striker.qg.guns.reloaders.ReloadingManager;

public class CrackshotLoader {

	public static boolean isCrackshotGun(FileConfiguration crackshotFile) {
		for (String s : crackshotFile.getKeys(false))
			if (crackshotFile.contains(s + ".Item_Information"))
				return true;
		return false;
	}

	public static void createYMLForGuns(List<Gun> guns, File data) {
		for (Gun g : guns) {
			@SuppressWarnings("deprecation")
			WeaponSounds s = WeaponSounds.getByName(g.getWeaponSound());
			if (s == null)
				s = WeaponSounds.GUN_MEDIUM;
			GunYML yml = GunYMLCreator.createNewCustomGun(data, "crackshot_" + g.getName(), g.getName(),
					g.getDisplayName(), g.getItemData().getData(), null, g.getWeaponType(), s, g.hasIronSights(),
					g.getAmmoType().getName(), (int) g.getDamage(), g.getMaxBullets(), (int) g.getPrice());
			yml.setLore(g.getCustomLore());
			yml.setSway(g.getSway());
			yml.setAutomatic(g.isAutomatic());
			yml.setBulletsPerShot(g.getBulletsPerShot());
			yml.setDelayReload(g.getReloadTime());
			yml.setVariant(g.getItemData().getVariant());
			yml.setMaterial(g.getItemData().getMat());
			yml.setZoomLevel(g.getZoomWhenIronSights());
			yml.setNightVisionOnScope(g.hasnightVision());
			yml.setParticle(g.getParticleR(), g.getParticleB(), g.getParticleG(), g.getParticleMaterial());
			if (g.getChargingHandler() != null)
				yml.setChargingHandler(g.getChargingHandler());
			yml.verifyAllTagsExist();
			yml.save();
			QAMain.DEBUG("-Creating CrackShot guns: " + g.getName());
		}
	}

	@SuppressWarnings("deprecation")
	public static List<Gun> loadCrackshotGuns(FileConfiguration crackshotFile) {
		List<Gun> guns4 = new ArrayList<>();
		for (String name : crackshotFile.getKeys(false)) {
			String internalname = name.toLowerCase();
			// Make sure all weapon names are lowercase
			if (me.zombie_striker.qg.api.QualityArmory.getGunByName(internalname) != null) {
				QAMain.DEBUG("CrackShot gun " + name + " already has a QA Counterpart.");
				continue;
			}

			// Check for RoitShield
			if (crackshotFile.contains(name + ".Riot_Shield"))
				continue;

			Material materialtype = Material.DIAMOND_AXE;
			int data = 0;
			int variant = 0;

			String type = crackshotFile.getString(name + ".Item_Information.Item_Type");
			if (type.contains(":")) {
				String[] temp = type.split(":");
				type = temp[0];
				data = Integer.parseInt(temp[1]);
			}
			try {
				int i = Integer.parseInt(type);
				for (Material m : Material.values()) {
					if (m.getId() == i)
						m


ex_t> B_region(B_vol.cells.attributes(), "region");

	double t0 = SystemStopwatch::now();

	// --------------------------------------------------------------
	// Phase II: create Axis-Aligned Bounding Box trees (AABBs)
	// --------------------------------------------------------------

	Logger::out("Booleans") << "Create AABB for A" << std::endl;
	MeshCellsAABB A_AABB(A_vol);

	Logger::out("Booleans") << "Create AABB for B" << std::endl;
	MeshCellsAABB B_AABB(B_vol);

	double AABB_time = SystemStopwatch::now() - t0;
	t0 += AABB_time;
	Logger::out("Booleans")
	    << "AABB       time: " << AABB_time << "s" << std::endl;

	// ------------------------------------------------------------------
	// Phase III: Compute candidate pairs of potentially intersected tets
	// ------------------------------------------------------------------

	Logger::out("Booleans") << "Get intersection candidates" << std::endl;
	// Determine intersection candidates and store them in a vector
	// so that we can process them in parallel later.
	vector<index_t> intersection_candidates;
	A_AABB.compute_other_cell_bbox_intersections(
	    &B_AABB,
	    [&](index_t t1, index_t t2) {
		if(A_region[t1] == 0 && B_region[t2] == 0) {
		    return;
		}
		intersection_candidates.push_back(t1);
		intersection_candidates.push_back(t2);
	    }
	);

	double candidates_time = SystemStopwatch::now() - t0;
	t0 += candidates_time;
	Logger::out("Booleans")
	    << "candidates time: " << candidates_time << "s" << std::endl;

	vector<index_t> result_region;
	result->clear();

	// --------------------------------------------------------------
	// Phase IV: compute actual tet-tet intersections
	// --------------------------------------------------------------

	Logger::out("Booleans") << "Compute intersections" << std::endl;

	Process::spinlock lock = GEOGRAM_SPINLOCK_INIT;

	// Associates a facet corner index and its symbolic information.
	// Used at the next step to glue the facets (by merging the vertices
	// that have the same symbolic representation).
	vector< std::pair<index_t, trindex> > corner_trindices;

	parallel_for_slice(
	    0, intersection_candidates.size()/2,
	    [&](index_t from, index_t to) {
		vector<index_t> facet_triangles;
		ConvexCell C(VBW::WithVGlobal);
		C.use_exact_predicates(true);
		for(index_t i=from; i<to; ++i) {
		    index_t t1 = intersection_candidates[2*i];
		    index_t t2 = intersection_candidates[2*i+1];

		    // Initialize a ConvexCell with the geometry and
		    // combinatorial information of t1
		    C.clear();
		    C.init_with_tet(
			tet_facet_plane(&A_vol, t1, 0),
			tet_facet_plane(&A_vol, t1, 1),
			tet_facet_plane(&A_vol, t1, 2),
			tet_facet_plane(&A_vol, t1, 3),
			t1*4, t1*4+1, t1*4+2, t1*4+3
		    );

		    // Clip the ConvexCell with the four facets of t2
		    for(index_t lf=0; lf<4; ++lf) {
			C.clip_by_plane(
			    tet_facet_plane(&B_vol, t2, lf),
			    4*A_vol.cells.nb() +


 // path & query
        assertAccepted(parse(mode, "/foo%2F"), "/foo%2F"); // path only
        assertAccepted(parse(mode, "/?%2f=%2F"), "/", "%2F=%2F"); // query only
    }

    @Test
    void serverShouldCleanUpConsecutiveSlashes() {
        assertAccepted(
                forServer("/path//with///consecutive////slashes" +
                          "?/query//with///consecutive////slashes"),
                "/path/with/consecutive/slashes",
                "/query//with///consecutive////slashes");

        // Encoded slashes should be retained.
        assertAccepted(
                forServer("/path%2F/with/%2F/consecutive//%2F%2Fslashes" +
                          "?/query%2F/with/%2F/consecutive//%2F%2Fslashes"),
                "/path%2F/with/%2F/consecutive/%2F%2Fslashes",
                "/query%2F/with/%2F/consecutive//%2F%2Fslashes");
    }

    @Test
    void clientShouldNotCleanUpConsecutiveSlashes() {
        assertAccepted(
                forClient("/path//with///consecutive////slashes" +
                          "?/query//with///consecutive////slashes" +
                          "#/fragment//with///consecutive////slashes"),
                "/path//with///consecutive////slashes",
                "/query//with///consecutive////slashes",
                "/fragment//with///consecutive////slashes");

        // Encoded slashes should be retained.
        assertAccepted(
                forClient("/path%2F/with/%2F/consecutive//%2F%2Fslashes" +
                          "?/query%2F/with/%2F/consecutive//%2F%2Fslashes" +
                          "#/fragment%2F/with/%2F/consecutive//%2F%2Fslashes"),
                "/path%2F/with/%2F/consecutive//%2F%2Fslashes",
                "/query%2F/with/%2F/consecutive//%2F%2Fslashes",
                "/fragment%2F/with/%2F/consecutive//%2F%2Fslashes");
    }

    @Test
    void clientShouldRetainConsecutiveSlashesInFragment() {
        assertAccepted(forClient("/#/////"), "/", null, "/////");
    }

    @ParameterizedTest
    @EnumSource(Mode.class)
    void shouldAcceptColon(Mode mode) {
        assertThat(parse(mode, "/:")).isNotNull();
        assertThat(parse(mode, "/:/")).isNotNull();
        assertThat(parse(mode, "/a/:")).isNotNull();
        assertThat(parse(mode, "/a/:/")).isNotNull();
    }

    @ParameterizedTest
    @EnumSource(Mode.class)
    @SuppressWarnings("checkstyle:AvoidEscapedUnicodeCharacters")
    void shouldNormalizeUnicode(Mode mode) {
        // 2- and 3-byte UTF-8
        assertAccepted(parse(mode, "/\u00A2?\u20AC"), "/%C2%A2", "%E2%82%AC");

        // 4-byte UTF-8
        assertAccepted(parse(mode, "/\uD800\uDF48"), "/%F0%90%8D%88");

        // 5- and 6-byte forms are only theoretically possible, so we won't test them here.
    }

    @ParameterizedTest
    @EnumSource(Mode.class)
    void shouldNormalizeEncodedUnicode(Mode mode) {
        final String encodedPath = "/%ec%95%88


= function(cursor, line, bracket) {
    return context.autoInsertedBrackets > 0 &&
        cursor.row === context.autoInsertedRow &&
        bracket === context.autoInsertedLineEnd[0] &&
        line.substr(cursor.column) === context.autoInsertedLineEnd;
};

CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
    return context.maybeInsertedBrackets > 0 &&
        cursor.row === context.maybeInsertedRow &&
        line.substr(cursor.column) === context.maybeInsertedLineEnd &&
        line.substr(0, cursor.column) == context.maybeInsertedLineStart;
};

CstyleBehaviour.popAutoInsertedClosing = function() {
    context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1);
    context.autoInsertedBrackets--;
};

CstyleBehaviour.clearMaybeInsertedClosing = function() {
    if (context) {
        context.maybeInsertedBrackets = 0;
        context.maybeInsertedRow = -1;
    }
};

oop.inherits(CstyleBehaviour, Behaviour);

exports.CstyleBehaviour = CstyleBehaviour;
});

define("ace/unicode",["require","exports","module"], function(require, exports, module) {
"use strict";
var wordChars = [48,9,8,25,5,0,2,25,48,0,11,0,5,0,6,22,2,30,2,457,5,11,15,4,8,0,2,0,18,116,2,1,3,3,9,0,2,2,2,0,2,19,2,82,2,138,2,4,3,155,12,37,3,0,8,38,10,44,2,0,2,1,2,1,2,0,9,26,6,2,30,10,7,61,2,9,5,101,2,7,3,9,2,18,3,0,17,58,3,100,15,53,5,0,6,45,211,57,3,18,2,5,3,11,3,9,2,1,7,6,2,2,2,7,3,1,3,21,2,6,2,0,4,3,3,8,3,1,3,3,9,0,5,1,2,4,3,11,16,2,2,5,5,1,3,21,2,6,2,1,2,1,2,1,3,0,2,4,5,1,3,2,4,0,8,3,2,0,8,15,12,2,2,8,2,2,2,21,2,6,2,1,2,4,3,9,2,2,2,2,3,0,16,3,3,9,18,2,2,7,3,1,3,21,2,6,2,1,2,4,3,8,3,1,3,2,9,1,5,1,2,4,3,9,2,0,17,1,2,5,4,2,2,3,4,1,2,0,2,1,4,1,4,2,4,11,5,4,4,2,2,3,3,0,7,0,15,9,18,2,2,7,2,2,2,22,2,9,2,4,4,7,2,2,2,3,8,1,2,1,7,3,3,9,19,1,2,7,2,2,2,22,2,9,2,4,3,8,2,2,2,3,8,1,8,0,2,3,3,9,19,1,2,7,2,2,2,22,2,15,4,7,2,2,2,3,10,0,9,3,3,9,11,5,3,1,2,17,4,23,2,8,2,0,3,6,4,0,5,5,2,0,2,7,19,1,14,57,6,14,2,9,40,1,2,0,3,1,2,0,3,0,7,3,2,6,2,2,2,0,2,0,3,1,2,12,2,2,3,4,2,0,2,5,3,9,3,1,35,0,24,1,7,9,12,0,2,0,2,0,5,9,2,35,5,19,2,5,5,7,2,35,10,0,58,73,7,77,3,37,11,42,2,0,4,328,2,3,3,6,2,0,2,3,3,40,2,3,3,32,2,3,3,6,2,0,2,3,3,14,2,56,2,3,3,66,5,0,33,15,17,84,13,619,3,16,2,25,6,74,22,12,2,6,12,20,12,19,13,12,2,2,2,1,13,51,3,29,4,0,5,1,3,9,34,2,3,


-hyphens:auto;-ms-hyphens:auto;hyphens:auto;white-space:pre-wrap;border-radius:4px;background:#41444e;overflow-wrap:break-word;font-family:Source Code Pro,monospace;font-weight:600;color:#fff}.swagger-ui .opblock-body pre span{color:#fff!important}.swagger-ui .opblock-body pre .headerline{display:block}.swagger-ui .scheme-container{margin:0 0 20px;padding:30px 0;background:#fff;box-shadow:0 1px 2px 0 rgba(0,0,0,.15)}.swagger-ui .scheme-container .schemes{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.swagger-ui .scheme-container .schemes>label{font-size:12px;font-weight:700;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;margin:-20px 15px 0 0;font-family:Titillium Web,sans-serif;color:#3b4151}.swagger-ui .scheme-container .schemes>label select{min-width:130px;text-transform:uppercase}.swagger-ui .loading-container{padding:40px 0 60px}.swagger-ui .loading-container .loading{position:relative}.swagger-ui .loading-container .loading:after{font-size:10px;font-weight:700;position:absolute;top:50%;left:50%;content:"loading";-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);text-transform:uppercase;font-family:Titillium Web,sans-serif;color:#3b4151}.swagger-ui .loading-container .loading:before{position:absolute;top:50%;left:50%;display:block;width:60px;height:60px;margin:-30px;content:"";-webkit-animation:rotation 1s infinite linear,opacity .5s;animation:rotation 1s infinite linear,opacity .5s;opacity:1;border:2px solid rgba(85,85,85,.1);border-top-color:rgba(0,0,0,.6);border-radius:100%;-webkit-backface-visibility:hidden;backface-visibility:hidden}@-webkit-keyframes rotation{to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes rotation{to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@-webkit-keyframes blinker{50%{opacity:0}}@keyframes blinker{50%{opacity:0}}.swagger-ui .btn{font-size:14px;font-weight:700;padding:5px 23px;transition:all .3s;border:2px solid #888;border-radius:4px;background:transparent;box-shadow:0 1px 2px rgba(0,0,0,.1);font-family:Titillium Web,sans-serif;color:#3b4151}.swagger-ui .btn[disabled]{cursor:not-allowed;opacity:.3}.swagger-ui .btn:hover{box-shadow:0 0 5px rgba(0,0,0,.3)}.swagger-ui .btn.cancel{border-color:#ff6060;font-family:Titillium Web,sans-serif;color:#ff6060}.swagger-ui .btn.authorize{line-height:1;display:inline;color:#49cc90;border-color:#49cc90}.swagger-ui .btn


	}

	private void addResponseLid(FlowType flow, Question question, boolean isMultipleAnswer) {
		ResponseLidType responseLid = flow.addNewResponseLid();
		responseLid.setIdent("MCSC");
		if (isMultipleAnswer)
			responseLid.setRcardinality(ResponseLidType.Rcardinality.MULTIPLE);
		else
			responseLid.setRcardinality(ResponseLidType.Rcardinality.SINGLE);
		responseLid.setRtiming(ResponseLidType.Rtiming.NO);
		RenderChoiceType renderChoice = responseLid.addNewRenderChoice();
		renderChoice.setShuffle(RenderChoiceType.Shuffle.NO);

		char c = 'A';
		for (Iterator it = question.getAnswers().iterator();it.hasNext();) {
			Answer answer = (Answer)it.next();
			ResponseLabelType responseLabel = renderChoice.addNewResponseLabel();
			responseLabel.setIdent(String.valueOf(c));
			responseLabel.setRarea(ResponseLabelType.Rarea.ELLIPSE);
			responseLabel.setRrange(ResponseLabelType.Rrange.EXACT);
			responseLabel.setRshuffle(ResponseLabelType.Rshuffle.YES);
			MaterialType mat = responseLabel.addNewMaterial();
			MattextType text = mat.addNewMattext();
			text.setCharset(DEFAULT_CHARSET);
			text.setTexttype("text/plain");
			text.setStringValue(cdata(answer.getText()));
			MaterialType m2 = responseLabel.addNewMaterial();
			MatimageType mi = m2.addNewMatimage();
			mi.setEmbedded("base64");
			mi.setImagtype("text/html");
			mi.setUri("");

			c++;
		}
	}

	private void addRespProcessing(ItemType item, Question question, String respident) {
		ResprocessingType resProcessing = item.addNewResprocessing();
		DecvarType decvar = resProcessing.addNewOutcomes().addNewDecvar();
		decvar.setDefaultval("0");
		decvar.setMaxvalue(question.getQuestionPoints());
		if (Question.MULTIPLE_CHOICE_MULTIPLE_ANSWER_QUESTION != question.getQuestionType())
			decvar.setMinvalue(question.getQuestionDiscount());
		else
			decvar.setMinvalue("0");
		decvar.setVarname("SCORE");
		decvar.setVartype(DecvarType.Vartype.INTEGER);

		char alpha = 'A';

		if (null != question.getAnswers()) {
			for (Iterator it = question.getAnswers().iterator();it.hasNext();) {
				Answer answer = (Answer)it.next();
				String response = answer.isCorrect() ? "Correct" : "InCorrect";

				RespconditionType respCondition = resProcessing.addNewRespcondition();
				respCondition.setContinue(RespconditionType.Continue.NO);
				ConditionvarType conditionVar = respCondition.addNewConditionvar();
				VarequalType varEqual = conditionVar.addNewVarequal();
				varEqual.setCase(VarequalType.Case.YES);
				varEqual.setRespident(respident);
				varEqual.setStringValue(String.valueOf(alpha));
				SetvarType setVar = respCondition.addNewSetvar();
				setVar.setAction(SetvarType.Action.ADD);
				setVar.setVarname("SCORE");
				setVar.setStringValue("0.0");
				DisplayfeedbackType feedback1 = respCondition.addNewDisplayfeedback();
				feedback1.setFeedbacktype(DisplayfeedbackType.Feedbacktype.RESPONSE);
				feedback1.setLinkrefid(response);
				DisplayfeedbackType feedback2 = respCondition.addNewDisplayfeedback();
				feedback2.setFeedbacktype(DisplayfeedbackType.Feedbacktype.RESPONSE);
				feedback2.setLinkrefid("AnswerFeedback");
				feedback2.setStringValue(cdata(""));

				alpha++;
			}
		}
	}

	private void pr


84
	vtbl.8	d21, {d10, d11}, d31	@,,,
	.loc 3 219 0
	vldr	d10, [sp, #40]	@, %sfp
	vldr	d11, [sp, #48]	@, %sfp
	.loc 3 197 0
	vldr	d30, .L306+32	@,
	vldr	d31, .L306+40	@,
	vtbl.8	d6, {d30, d31}, d28	@ tmp2322,,, tmp2288
	vtbl.8	d7, {d30, d31}, d29	@,,,
	.loc 3 187 0
	vldr	d28, .L306+16	@,
	vldr	d29, .L306+24	@,
	.loc 3 219 0
	vldr	d30, .L306	@,
	vldr	d31, .L306+8	@,
	.loc 3 187 0
	vtbl.8	d26, {d28, d29}, d22	@ tmp2327,,, tmp2293
	vtbl.8	d27, {d28, d29}, d23	@,,,
	.loc 3 197 0
	veor	q3, q10, q3	@ tmp2326, tmp2318, tmp2322
	.loc 3 219 0
	vand	q14, q5, q7	@,, tmp3157
	.loc 3 210 0
	veor	q10, q3, q13	@ tmp2331, tmp2326, tmp2327
	.loc 3 219 0
	vstr	d28, [sp, #40]	@, %sfp
	vstr	d29, [sp, #48]	@, %sfp
	.loc 3 210 0
	vldr	d26, .L306+48	@,
	vldr	d27, .L306+56	@,
	vtbl.8	d22, {d26, d27}, d24	@ tmp2332,,, tmp2298
	vtbl.8	d23, {d26, d27}, d25	@,,,
.LBE1944:
.LBE1967:
.LBE1990:
.LBB1991:
	.loc 3 125 0
	vorr	q12, q2, q9	@ __c, D.17881, D.17877
.LBE1991:
.LBB1992:
.LBB1968:
.LBB1945:
	.loc 3 220 0
	veor	q3, q10, q11	@ D.17877, tmp2331, tmp2332
.LVL418:
.LBE1945:
.LBE1968:
.LBE1992:
.LBB1993:
	.loc 3 125 0
	vand	q11, q9, q4	@ __a, D.17877, D.17881
.LVL419:
	veor	q13, q12, q3	@ __c, __c, D.17877
	veor	q11, q11, q2	@ __a, __a, D.17881
.LVL420:
.LBE1993:
.LBB1994:
.LBB1969:
.LBB1946:
	.loc 3 219 0
	vtbl.8	d24, {d30, d31}, d28	@ tmp2336,,,
	vtbl.8	d25, {d30, d31}, d29	@,,,
	.loc 3 196 0
	vldr	d28, [sp, #200]	@, %sfp
	vldr	d29, [sp, #208]	@, %sfp
	vldr	d30, .L306+32	@,
	vldr	d31, .L306+40	@,
	vand	q5, q14, q7	@,, tmp3157
	vtbl.8	d20, {d30, d31}, d10	@ tmp2340,,,
	vt


ge-c"]),
pre:has(code[class*="language-cpp"]),
pre:has(code[class*="language-c++"]),
pre:has(code[class*="language-go"]) {
    border-left: 3px solid var(--moss-code-accent-primary);
}

/* Web Technologies - Warm gray */
pre:has(code[class*="language-css"]),
pre:has(code[class*="language-scss"]),
pre:has(code[class*="language-sass"]),
pre:has(code[class*="language-html"]),
pre:has(code[class*="language-xml"]),
pre:has(code[class*="language-javascript"]),
pre:has(code[class*="language-js"]),
pre:has(code[class*="language-typescript"]),
pre:has(code[class*="language-ts"]) {
    border-left: 3px solid var(--moss-code-accent-secondary);
}

/* Scripting Languages - Muted brown */
pre:has(code[class*="language-python"]),
pre:has(code[class*="language-py"]),
pre:has(code[class*="language-ruby"]),
pre:has(code[class*="language-rb"]),
pre:has(code[class*="language-php"]),
pre:has(code[class*="language-bash"]),
pre:has(code[class*="language-sh"]),
pre:has(code[class*="language-shell"]) {
    border-left: 3px solid var(--moss-code-accent-tertiary);
}

/* Configuration/Data Languages - Deeper brown */
pre:has(code[class*="language-json"]),
pre:has(code[class*="language-yaml"]),
pre:has(code[class*="language-yml"]),
pre:has(code[class*="language-toml"]),
pre:has(code[class*="language-ini"]) {
    border-left: 3px solid var(--moss-code-accent-quaternary);
}

/* Blockquotes */
blockquote {
    border-left: 4px solid var(--moss-accent);
    margin: var(--moss-space-lg) 0;
    padding-left: var(--moss-space-lg);
    color: var(--moss-text-secondary);
    font-style: italic;
    font-size: var(--moss-font-lg);
}

blockquote p {
    margin: var(--moss-space-sm) 0;
}

/* Images */
img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: var(--moss-space-lg) 0;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin: var(--moss-space-lg) 0;
    border: 1px solid var(--moss-border-medium);
    border-radius: 6px;
    overflow: hidden;
}

th, td {
    padding: var(--moss-space-sm) var(--moss-space-md);
    text-align: left;
    border-bottom: 1px solid var(--moss-border-light);
}

th {
    background: var(--moss-background-alt);
    font-weight: 600;
    color: var(--moss-text-primary);
}

tr:last-child td {
    border-bottom: none;
}

/* Horizontal Rule */
hr {
    border: none;
    height: 1px;
    background: var(--moss-border-light);
    margin: var(--moss-space-2xl) 0;
}

/* Responsive Design */
@media (max-width: 48rem) {
    :root {
        --moss-font-base: 1rem;         /* 16px on mobile */
        --moss-font-2xl: 1.5rem;        /* 24px - H2 on mobile */


감시초소에 있는 아키다의 토템과 교감해야 합니다."}},
[9539] = {"쿠우의 토템", nil, {"주어진 단서로 쿠우의 토템을 찾아야 합니다."}},
[9540] = {"티크티의 토템", nil, {"주어진 단서를 통해 티크티의 토템을 찾아야 합니다."}},
[9541] = {"요르의 토템", nil, {"주어진 단서를 통해 요르의 토템을 찾아야 합니다."}},
[9542] = {"바르크의 토템", nil, {"주어진 단서를 통해 바르크의 토템을 찾아야 합니다."}},
[9543] = {"속죄", nil, {"지옥불 반도의 텔하마트 사원에 있는 현자 아만과 대화해야 합니다."}},
[9544] = {"아키다의 예언", nil, {"뾰족가지 마을에 있는 우리에서 너울소나무일족 포로 8명을 구출한 후, 하늘 감시초소에 있는 너울소나무일족 아루구에게 돌아가야 합니다."}},
[9545] = {"현자의 유물", nil, {"지옥불 반도의 텔하마트 사원에 있는 현자 아만이 텔하마트 사원의 북동쪽에 있는 세다이의 시체로 돌아간 후, 그곳에서 현자의 유물을 사용하라고 부탁했습니다. 일을 마친 후 현자 아만에게 돌아가야 합니다."}},
[9547] = {"바람의 부름", nil, {"하늘안개 섬의 엑소다르 내에 수정의 전당에 있는 선견자 노분도와 대화해야 합니다."}},
[9548] = {"도둑맞은 장비", nil, {"해변으로 밀려 올라온 거북이 껍질 속에 숨어 있는 클로퍼 위즈뱅에게 클로퍼의 장비를 가져가야 합니다."}},
[9549] = {"검은진흙멀록의 물건 수집", nil, {"해변으로 밀려 올라온 거북이 껍질 속에 숨어 있는 클로퍼 위즈뱅에게 조잡


1.4
     */
    public static final int UTC_TIME = 2;

    // Proclaim compatibility with 1.1
    static final long serialVersionUID = -403250971215465050L;

    // the internal serial version which says which version was written
    // - 0 (default) for version up to JDK 1.1.3
    // - 1 for version from JDK 1.1.4, which includes 3 new fields
    // - 2 for JDK 1.3, which includes 2 new fields
    static final int currentSerialVersion = 2;

    /**
     * The version of the serialized data on the stream.  Possible values:
     *

     *
0 or not present on stream

     *

     * JDK 1.1.3 or earlier.
     *

     *
1

     *

     * JDK 1.1.4 or later.  Includes three new fields: startMode,
     * endMode, and dstSavings.
     *

     *
2

     *

     * JDK 1.3 or later.  Includes two new fields: startTimeMode
     * and endTimeMode.
     *

     *

     * When streaming out this class, the most recent format
     * and the highest allowable serialVersionOnStream
     * is written.
     * @serial
     * @since 1.1.4
     */
    private int serialVersionOnStream = currentSerialVersion;

    synchronized private void invalidateCache() {
        cacheYear = startYear - 1;
        cacheStart = cacheEnd = 0;
    }

    //----------------------------------------------------------------------
    // Rule representation
    //
    // We represent the following flavors of rules:
    //       5        the fifth of the month
    //       lastSun  the last Sunday in the month
    //       lastMon  the last Monday in the month
    //       Sun>=8   first Sunday on or after the eighth
    //       Sun<=25  last Sunday on or before the 25th
    // This is further complicated by the fact that we need to remain
    // backward compatible with the 1.1 FCS.  Finally, we need to minimize
    // API changes.  In order to satisfy these requirements, we support
    // three representation systems, and we translate between them.
    //
    // INTERNAL REPRESENTATION
    // This is the format SimpleTimeZone objects take after construction or
    // streaming in is complete.  Rules are represented directly, using an
    // unencoded format.  We will discuss the start rule only below; the end
    // rule is analogous.
    //   startMode      Takes on enumerated values DAY_OF_MONTH,
    //                  DOW_IN_MONTH, DOW_AFTER_DOM, or DOW_BEFORE_DOM.
    //   startDay       The day of the month, or for DOW_IN_MONTH mode, a
    //                  value indicating which DOW, such as +1 for first,
    //                  +2 for second, -1 for last, etc.
    //   startDayOfWeek The day of the week.  Ignored for DAY_OF_MONTH.
    //
    // ENCODED REPRESENTATION
    // This is the format accepted by the constructor and by setStartRule()
    // and setEndRule().  It uses various combinations of positive, negative,
    // and zero values to encode the different rules.  This representation
    // allows us to specify all the different rule flavors without altering
    // the API.
    //   MODE              startMonth    startDay    startDayOfWeek
    //   DOW_IN_MONTH_MODE >=0           !=0         >0
    //   DOM_MODE          >=0           >0          ==0
    //   DOW_GE_DOM_MODE   >=0           >0          <0
    //   DOW_LE_DOM_MODE   >=0           <0          <0
    //   (no DST)          don't care    ==0         don't care
    //
    // STREAMED REPRESENTATION
    // We must retain binary compatibility with the 1.1 FCS.  The 1.1 code only
    // handles DOW_IN_MONTH_MODE and non-DST mode, the latter indicated b


2:24:47 2014) 提到:

杨鸿文老师绝对是业界良心！！！

☆─────────────────────────────────────☆
   tingpink ([若晨团]~Cai小包子~||TP-LINK) 于 (Mon Sep 15 12:27:50 2014) 提到:

你是哪的

通过『我邮2.0』发布

☆─────────────────────────────────────☆
   newfresh (子芷) 于 (Mon Sep 15 12:37:49 2014) 提到:

顶宋晴老师～到实验室有找到一群家人的感觉哦～

发自「贵邮」

☆─────────────────────────────────────☆
   allendiyar (喜欢是一种纠结的过程。。) 于 (Mon Sep 15 12:38:24 2014) 提到:

信息网络中心的同学路过一顶

☆─────────────────────────────────────☆
   czc506756679 (小城三三) 于 (Mon Sep 15 12:39:24 2014) 提到:

【 在 threbody 的大作中提到: 】
要信，甚至都不要听"(http://bbs.byr.cn/#!article/AimGraduate/909596?p=66)。

电子院呢。。。

☆─────────────────────────────────────☆
   ymlau (ymlau) 于 (Mon Sep 15 12:39:24 2014) 提到:

考的好不如报的好，报的好不如学的好，学的好不如有个爹，有个爹不如自己做干爹。。。

通过『我邮2.0』发布

☆─────────────────────────────────────☆
   ayzmkk (ayzmkk) 于 (Mon Sep 15 12:40:46 2014) 提到:

抱住名额，珍惜+_+

发自「贵邮」

☆─────────────────────────────────────☆
   ayzmkk (ayzmkk) 于 (Mon Sep 15 12:41:16 2014) 提到:

5555好歹也是实习一个月换来的名额，真心不容易啊

发自「贵邮」

☆─────────────────────────────────────☆
   kira (キラ様) 于 (Mon Sep 15 12:45:28 2014) 提到:

很多年以前已经离开北邮了

通过『我邮2.0』发布

☆─────────────────────────────────────☆
   Ernest (【labi团】首席脑残粉) 于 (Mon Sep 15 12:46:37 2014) 提到:

新科研楼433
【 在 shirleycai 的大作中提到: 】

来自「北邮人论坛手机版」

☆─────────────────────────────────────☆
   mingming9 (明明是我) 于 (Mon Sep 15 12:46:40 2014) 提到:

我寿组师兄？
【 在 manbuzhe 的大作中提到: 】
寿国础老师业界良心，导师组三人都很和蔼～名义上不（to...

☆─────────────────────────────────────☆
   liuqianhong1 (孤竹无名) 于 (Mon Sep 15 12:51:20 2014) 提到:

良心


 per supplementary symbol encoding

        // make 4 clobs - one for "one piece" writing, another for piece-wise writing
        // and the last 2 for appending and piece-wise appending.
        let stmt = session.prepare("INSERT INTO test_large_object_data (text) VALUES (Empty_Clob()) RETURNING id INTO :ID")?;
        let mut ids = [0usize; 4];
        stmt.execute(&mut ids[0])?;
        stmt.execute(&mut ids[1])?;
        stmt.execute(&mut ids[2])?;
        stmt.execute(&mut ids[3])?;

        let stmt = session.prepare("SELECT text FROM test_large_object_data WHERE id = :ID FOR UPDATE")?;
        let row = stmt.query_single(&ids[0])?.expect("one row");
        let lob : CLOB = row.get_not_null(0)?;

        lob.open()?;
        let written = lob.write(0, &text)?;
        lob.close()?;
        assert_eq!(written, expected_lob_char_len);

        let row = stmt.query_single(&ids[1])?.expect("one row");
        let lob : CLOB = row.get_not_null(0)?;

        lob.open()?;
        let mut lines = text.split_inclusive('\n');
        let mut total_written = 0usize;
        if let Some(line) = lines.next() {
            let written = lob.write_first(0, line)?;
            total_written += written;
            while let Some(line) = lines.next() {
                let written = lob.write_next(line)?;
                total_written += written;
            }
            lob.write_last("")?;
        }
        lob.close()?;
        assert_eq!(total_written, expected_lob_char_len);

        let row = stmt.query_single(&ids[2])?.expect("one row");
        let lob : CLOB = row.get_not_null(0)?;

        lob.open()?;
        let written = lob.append(&text)?;
        lob.close()?;
        assert_eq!(written, expected_lob_char_len);

        let row = stmt.query_single(&ids[3])?.expect("one row");
        let lob : CLOB = row.get_not_null(0)?;

        lob.open()?;
        let mut lines = text.split_inclusive('\n');
        let mut total_written = 0usize;
        if let Some(line) = lines.next() {
            let written = lob.append_first(line)?;
            total_written += written;
            while let Some(line) = lines.next() {
                let written = lob.append_next(line)?;
                total_written += written;
            }
            lob.append_last("")?;
        }
        lob.close()?;
        assert_eq!(total_written, expected_lob_char_len);

        session.commit()?;

        // read them back and check that they all match the source
        let stmt = session.prepare("SELECT text FROM test_large_object_data WHERE id = :ID")?;
        for id in ids {
            let row = stmt.query_single(&id)?.expect("one row");
            let lob : CLOB = row.get_not_null(0)?;

            let mut lob_content = String::new();
            let num_chars = lob.read(0, expected_lob_char_len, &mut lob_content)?;
            assert_eq!(num_chars, expected_lob_char_len);
            assert_eq!(lob_content, text);
        }
        Ok(())
    }
}

#[cfg(feature="nonblocking")]
mod nonblocking {

    use sibyl::*;

    use crate::read_text_file;

    async fn connect<'a>(oracle: &'a Environment) -> Result<Session<'a>> {
        let dbname = std::env::var("


}else for(S.appendASCIICharCode(62);G<ae;G++){j.setColumnInfo(G+1,ue-ie,R,J),ie=0;const $=M.charCodeAt(G);let Q=1,Z=1;switch($){case 9:Q=x-K%x,Z=Q;for(let te=1;te<=Q;te++)S.appendCharCode(160);break;case 32:S.appendCharCode(160);break;case 60:S.appendString("<");break;case 62:S.appendString(">");break;case 38:S.appendString("&");break;case 0:U?S.appendCharCode(9216):S.appendString("�");break;case 65279:case 8232:case 8233:case 133:S.appendCharCode(65533);break;default:k.isFullWidthCharacter($)&&Z++,U&&$<32?S.appendCharCode(9216+$):U&&$===127?S.appendCharCode(9249):U&&a($)?(S.appendString("[U+"),S.appendString(h($)),S.appendString("]"),Q=8,Z=Q):S.appendCharCode($)}R+=Q,J+=Z,G>=F&&(K+=Z)}B?ie++:ie=0,G>=A&&!Y&&pe.isPseudoAfter()&&(Y=!0,j.setColumnInfo(G+1,ue,R,J)),S.appendString("")}return Y||j.setColumnInfo(A+1,O.length-1,R,J),P&&(S.appendString(''),S.appendString(d.localize(708,"Show more ({0})",v(N))),S.appendString("")),S.appendString(""),new n(j,V,T)}function h(w){return w.toString(16).toUpperCase().padStart(4,"0")}function v(w){return w<1024?d.localize(709,"{0} chars",w):w<1024*1024?`${(w/1024).toFixed(1)} KB`:`${(w/1024/1024).toFixed(1)} MB`}}),define(ne[667],se([1,0,103,74,37,116,150,136,95]),function(oe,e,d,k,I,E,y,m,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RenderOptions=e.LineSource=void 0,e.renderLines=p;const b=(0,d.createTrustedTypesPolicy)("diffEditorWidget",{createHTML:i=>i});function p(i,s,g,c){(0,k.applyFontInfo)(c,s.fontInfo);const l=g.length>0,a=new E.StringBuilder(1e4);let r=0,u=0;const C=[];for(let w=0;w<i.lineTokens.length;w++){const S=w+1,L=i.lineTokens[w],D=i.lineBreakData[w],T=y.LineDecoration.filter(g,S,1,Number.MAX_SAFE_INTEGER);if(D){let M=0;for(const A of D.breakOffsets){const P=L.sliceAndInflate(M,A,0);r=Math.max(r,t(u,P,y.LineDecoration.extractWrapped(T,M,A),l,i.mightContainNonBasicASCII,i.mightContainRTL,s,a)),u++,M=A}C.push(D.breakOffsets.length)}else C.push(1),r=Math.max(r,t(u,L,T,l,i.mightContainNonBasicASCII,i.mightContainRTL,s,a)),u++}r+=s.scrollBeyondLastColumn;const f=a


32(key)].encode(func(b []byte, v []byte) []byte {
						return append(b, v...)
					})...)
				}
			}
		}
	}
	return data
}

func (p ParamContent[T]) encode(appendFunc func(b []byte, v T) []byte) []byte {
	if p.Len == 0 {
		return nil
	}
	tmp := make([]byte, 5, 9)
	binary.BigEndian.PutUint32(tmp[0:4], p.ID)
	tmp[4] = p.Len
	return appendFunc(tmp, p.Value)
}

func (t *TerminalParamDetails) parseParamDWORD(id uint32, dwordContent ParamContent[uint32]) {
	switch id {
	case 0x001:
		t.T0x001HeartbeatInterval = dwordContent
	case 0x002:
		t.T0x002TCPRespondOverTime = dwordContent
	case 0x003:
		t.T0x003TCPRetransmissionCount = dwordContent
	case 0x004:
		t.T0x004UDPRespondOverTime = dwordContent
	case 0x005:
		t.T0x005UDPRetransmissionCount = dwordContent
	case 0x006:
		t.T0x006SMSRetransmissionCount = dwordContent
	case 0x007:
		t.T0x007SMSRetransmissionCount = dwordContent
	case 0x01b:
		t.T0x01BICCardTCPPort = dwordContent
	case 0x01c:
		t.T0x01CICCardUDPPort = dwordContent
	case 0x020:
		t.T0x020PositionReportingStrategy = dwordContent
	case 0x022:
		t.T0x022DriverReportingInterval = dwordContent
	case 0x027:
		t.T0x027ReportingTimeInterval = dwordContent
	case 0x028:
		t.T0x028EmergencyReportingTimeInterval = dwordContent
	case 0x029:
		t.T0x029DefaultReportingTimeInterval = dwordContent
	case 0x02c:
		t.T0x02CDefaultDistanceReportingTimeInterval = dwordContent
	case 0x02d:
		t.T0x02DDrivingReportingDistanceInterval = dwordContent
	case 0x02e:
		t.T0x02ESleepReportingDistanceInterval = dwordContent
	case 0x02f:
		t.T0x02FAlarmReportingDistanceInterval = dwordContent
	case 0x030:
		t.T0x030InflectionPointSupplementaryPassAngle = dwordContent
	case 0x045:
		t.T0x045TerminalTelephoneStrategy = dwordContent
	case 0x046:
		t.T0x046MaximumCallTime = dwordContent
	case 0x047:
		t.T0x047MonthMaximumCallTime = dwordContent
	case 0x050:
		t.T0x050AlarmBlockingWords = dwordContent
	case 0x051:
		t.T0x051AlarmSendTextSMSSwitch = dwordContent
	case 0x052:
		t.T0x052AlarmShootingSwitch = dwordContent
	case 0x053:
		t.T0x053AlarmShootingStorageSign = dwordContent
	case 0x054:
		t.T0x054KeySign = dwordContent
	case 0x055:
		t.T0x055MaxSpeed = dwordContent
	case 0x056:
		t.T0x056DurationOverSpeed = dwordContent
	case 0x057:
		t.T0x057ContinuousDrivingTimeLimit = dwordContent
	case 0x058:
		t.T0x058CumulativeDayDrivingTime = dwordContent
	case 0x059:
		t.T0x059MinimumRestTime = dwordContent
	case 0x05a:
		t.T0x05AMaximumParkingTime = dwordContent
	case 0x064:
		t.T0x064Time


移添加新功能或修复漏洞。通过可升级合约机制，项目方能够灵活应对这些需求，而不需要从头部署新合约。

2. **安全漏洞修复**
    - 如果智能合约存在安全漏洞，团队可以通过可升级合约来进行修复，而不是放弃原有合约或要求用户迁移到新合约。

3. **迭代开发**
    - 在项目的初期阶段，可能会频繁进行迭代开发，可升级合约可以避免频繁的重新部署和数据迁移工作。

### 优缺点

#### 优点：
- **灵活性**：允许合约在链上进行升级，不影响已有的数据和用户。
- **数据保持性**：代理合约存储数据，在升级时不会影响数据存储。
- **安全修复**：如果发现合约漏洞，可以通过升级及时修复。

#### 缺点：
- **复杂性增加**：可升级合约的设计和部署相较于普通智能合约更复杂，特别是存储布局的兼容性问题需要谨慎处理。
- **安全风险**：如果管理权限出现问题，可能被恶意者利用从而更改合约逻辑，导致资金或数据的安全性问题。
- **Gas 费增加**：由于代理模式引入了额外的转发调用，执行合约时的Gas消耗可能会增加。

### 总结

**可升级合约**为区块链应用提供了很大的灵活性，能够在无需重新部署的情况下升级业务逻辑、修复漏洞或添加新功能。虽然引入了更多的复杂性和安全风险，但通过合理的架构和权限管理，可以让智能合约的生命周期更长、更稳定。
## 透明代理
**透明代理模式**（Transparent Proxy Pattern）是一种用于**可升级智能合约**的代理模式，旨在分离合约逻辑和存储，并提供一种方式在区块链上安全地升级合约逻辑，同时保持用户的体验不变。

### 透明代理的核心概念

透明代理模式的关键思想是，**普通用户的调用应该透明地通过代理合约直接转发到逻辑合约**，而不需要意识到代理的存在。而**代理合约的管理者**（管理员）则有能力升级逻辑合约，但不能干扰普通用户的调用。该模式通过确保管理者的权限和用户的调用路径分离，来实现合约升级的安全性和透明性。

### 透明代理的主要组成部分

1. **代理合约**（Proxy Contract）：
    - 这是用户实际与之交互的合约，负责存储数据并将所有对�


phasize-style:none;",
			"fems:ac": "font-emphasize-style:accent;",
			"fems:dt": "font-emphasize-style:dot;",
			"fems:c": "font-emphasize-style:circle;",
			"fems:ds": "font-emphasize-style:disc;",
			"fsm": "font-smooth:|;",
			"fsm:a": "font-smooth:auto;",
			"fsm:n": "font-smooth:never;",
			"fsm:aw": "font-smooth:always;",
			"fst": "font-stretch:|;",
			"fst:n": "font-stretch:normal;",
			"fst:uc": "font-stretch:ultra-condensed;",
			"fst:ec": "font-stretch:extra-condensed;",
			"fst:c": "font-stretch:condensed;",
			"fst:sc": "font-stretch:semi-condensed;",
			"fst:se": "font-stretch:semi-expanded;",
			"fst:e": "font-stretch:expanded;",
			"fst:ee": "font-stretch:extra-expanded;",
			"fst:ue": "font-stretch:ultra-expanded;",
			"op": "opacity:|;",
			"op+": "opacity: $1;\nfilter: alpha(opacity=$2);",
			"op:ie": "filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=100);",
			"op:ms": "-ms-filter:'progid:DXImageTransform.Microsoft.Alpha(Opacity=100)';",
			"rsz": "resize:|;",
			"rsz:n": "resize:none;",
			"rsz:b": "resize:both;",
			"rsz:h": "resize:horizontal;",
			"rsz:v": "resize:vertical;",
			"cur": "cursor:${pointer};",
			"cur:a": "cursor:auto;",
			"cur:d": "cursor:default;",
			"cur:c": "cursor:crosshair;",
			"cur:ha": "cursor:hand;",
			"cur:he": "cursor:help;",
			"cur:m": "cursor:move;",
			"cur:p": "cursor:pointer;",
			"cur:t": "cursor:text;",
			"pgbb": "page-break-before:|;",
			"pgbb:au": "page-break-before:auto;",
			"pgbb:al": "page-break-before:always;",
			"pgbb:l": "page-break-before:left;",
			"pgbb:r": "page-break-before:right;",
			"pgbi": "page-break-inside:|;",
			"pgbi:au": "page-break-inside:auto;",
			"pgbi:av": "page-break-inside:avoid;",
			"pgba": "page-break-after:|;",
			"pgba:au": "page-break-after:auto;",
			"pgba:al": "page-break-after:always;",
			"pgba:l": "page-break-after:left;",
			"pgba:r": "page-break-after:right;",
			"orp": "orphans:|;",
			"us": "user-select:${none};",
			"wid": "widows:|;",
			"wfsm": "-webkit-font-smoothing:${antialiased};",
			"wfsm:a": "-webkit-font-smoothing:antialiased;",
			"wfsm:s": "-webkit-font-smoothing:subpixel-antialiased;",
			"wfsm:sa": "-webkit-font-smoothing:subpixel-antialiased


 []
all? p (x ∷ xs) = Dec.map′ (uncurry _∷_) uncons (p x ×-dec all? p xs)

universal : Universal P → Universal (All P)
universal u <a id="6431" href="Agda.Builtin.List.html#185" class="InductiveConstructor


            },
            "--antd-arrow-background-color": tooltipBg,
            // Wrapper for the tooltip content
            [`${componentCls}-inner`]: {
              minWidth: controlHeight,
              minHeight: controlHeight,
              padding: `${unit(token2.calc(paddingSM).div(2).equal())} ${unit(
                paddingXS,
              )}`,
              color: tooltipColor,
              textAlign: "start",
              textDecoration: "none",
              wordWrap: "break-word",
              backgroundColor: tooltipBg,
              borderRadius: tooltipBorderRadius,
              boxShadow: boxShadowSecondary,
              boxSizing: "border-box",
            },
            // Limit left and right placement radius
            [[
              `&-placement-left`,
              `&-placement-leftTop`,
              `&-placement-leftBottom`,
              `&-placement-right`,
              `&-placement-rightTop`,
              `&-placement-rightBottom`,
            ].join(",")]: {
              [`${componentCls}-inner`]: {
                borderRadius: token2.min(
                  tooltipBorderRadius,
                  MAX_VERTICAL_CONTENT_RADIUS,
                ),
              },
            },
            [`${componentCls}-content`]: {
              position: "relative",
            },
          }),
          genPresetColor(token2, (colorKey, _ref) => {
            let { darkColor } = _ref;
            return {
              [`&${componentCls}-${colorKey}`]: {
                [`${componentCls}-inner`]: {
                  backgroundColor: darkColor,
                },
                [`${componentCls}-arrow`]: {
                  "--antd-arrow-background-color": darkColor,
                },
              },
            };
          }),
        ),
        {
          // RTL
          "&-rtl": {
            direction: "rtl",
          },
        },
      ),
    },
    // Arrow Style
    getArrowStyle(token2, "var(--antd-arrow-background-color)"),
    // Pure Render
    {
      [`${componentCls}-pure`]: {
        position: "relative",
        maxWidth: "none",
        margin: token2.sizePopupArrow,
      },
    },
  ];
};
var prepareComponentToken2 = (token2) =>
  Object.assign(
    Object.assign(
      {
        zIndexPopup: token2.zIndexPopupBase + 70,
      },
      getArrowOffsetToken({
        contentRadius: token2.borderRadius,
        limitVerticalRadius: true,
      }),
    ),
    getArrowToken(
      merge2(token2, {
        borderRadiusOuter: Math.min(token2.borderRadiusOuter, 4),
      }),
    ),
  );
var style_default3 = function (prefixCls) {
  let injectStyle =
    arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : true;
  const useStyle = genStyleHooks(
    "Tooltip",
    (token2) => {
      const { borderRadius, colorTextLightSolid, colorBgSpotlight } = token2;
      const TooltipToken = merge2(token2, {
        // default variables
        tooltipMaxWidth: 250,
        tooltipColor: colorTextLightSolid,
        tooltipBorderRadius: borderRadius,
        tooltipBg: colorBgSpotlight,
      });
      return [
        genTooltipStyle(TooltipToken),
        initZoomMotion(token2, "zoom-big-fast"),
      ];
    },
    prepareComponentToken2,
    {
      resetStyle: false,
      // Popover use Tool


reenNode> expandEquationRow() {
    if (this is EquationRowNode) {
      return (this as EquationRowNode).children;
    }
    return [this];
  }

  /// Return the only child of [EquationRowNode]
  ///
  /// If the [EquationRowNode] has more than one child, an error will be thrown.
  GreenNode unwrapEquationRow() {
    if (this is EquationRowNode) {
      if (this.children.length == 1) {
        return (this as EquationRowNode).children[0];
      }
      throw ArgumentError(
          'Unwrap equation row failed due to multiple children inside');
    }
    return this;
  }
}

extension GreenNodeListWrappingExt on List<GreenNode> {
  /// Wrap list of [GreenNode] in an [EquationRowNode]
  ///
  /// If the list only contain one [EquationRowNode], then this note will be
  /// returned.
  EquationRowNode wrapWithEquationRow() {
    if (this.length == 1 && this[0] is EquationRowNode) {
      return this[0] as EquationRowNode;
    }
    return EquationRowNode(children: this);
  }
}

/// [GreenNode] that doesn't have any children
abstract class LeafNode extends GreenNode {
  /// [Mode] that this node acquires during parse.
  Mode get mode;

  @override
  List<GreenNode> get children => const [];

  @override
  LeafNode updateChildren(List<GreenNode> newChildren) {
    assert(newChildren.isEmpty);
    return this;
  }

  @override
  List<MathOptions> computeChildOptions(MathOptions options) => const [];

  @override
  List<int> get childPositions => const [];

  @override
  int get editingWidth => 1;
}

/// Type of atoms. See TeXBook Chap.17
///
/// These following types will be determined by their repective [GreenNode] type
/// - over
/// - under
/// - acc
/// - rad
/// - vcent
enum AtomType {
  ord,
  op,
  bin,
  rel,
  open,
  close,
  punct,
  inner,

  spacing, // symbols

}

/// Only for improvisional use during parsing. Do not use.
class TemporaryNode extends LeafNode {
  @override
  Mode get mode => Mode.math;

  @override
  BuildResult buildWidget(
          MathOptions options, List<BuildResult?> childBuildResults) =>
      throw UnsupportedError('Temporary node $runtimeType encountered.');

  @override
  AtomType get leftType =>
      throw UnsupportedError('Temporary node $runtimeType encountered.');

  @override
  AtomType get rightType =>
      throw UnsupportedError('Temporary node $runtimeType encountered.');

  @override
  bool shouldRebuildWidget(MathOptions oldOptions, MathOptions newOptions) =>
      throw UnsupportedError('Temporary node $runtimeType encountered.');

  @override
  int get editingWidth =>
      throw UnsupportedError('Temporary node $runtimeType encountered.');
}

class BuildResult {
  final Widget widget;
  final MathOptions options;
  final double italic;
  final double skew;
  final List<BuildResult>? results;
  const BuildResult({
    required this.widget,
    required this.options,
    this.italic = 0.0,
    this.skew = 0.0,
    this.results,
  });
}

void _traverseNonSpaceNodes(
  List<_NodeSpacingConf> childTypeList,
  void Function(_NodeSpacingConf? prev, _NodeSpacingConf? curr) callback,
) {
  _NodeSpacingConf? prev;
  // Tuple2<AtomType, AtomType> curr;
  for (final child in childTypeList) {
    if (child.leftType == AtomType.spacing ||
        child.rightType == AtomType.spacing) {
      continue;
    }
    callback(prev, child);
    prev = child;
  }
  if (prev != null) {
    callback(prev, null);
  }
}


ref var values = ref CollectionsMarshal.GetValueRefOrAddDefault(_queryParameterValuesByName, decodedName, out _);
            values.Add(decodedValue);
        }
    }

    public object? GetQueryParameterValue(Type targetType, string queryParameterName)
    {
        var isArray = targetType.IsArray;
        var elementType = isArray ? targetType.GetElementType()! : targetType;

        if (!UrlValueConstraint.TryGetByTargetType(elementType, out var parser))
        {
            throw new InvalidOperationException($"Querystring values cannot be parsed as type '{elementType}'.");
        }

        var values = _queryParameterValuesByName.GetValueOrDefault(queryParameterName.AsMemory());

        if (isArray)
        {
            return parser.ParseMultiple(values, queryParameterName);
        }

        if (values.Count > 0)
        {
            return parser.Parse(values[0].Span, queryParameterName);
        }

        return default;
    }
}


-u*u')/h)

        for (int j = m; j < n; j++) {
          double f = 0.0;
          for (int i = high; i >= m; i--) {
            f += ort[i] * H[i][j];
          }
          f /= h;
          for (int i = m; i <= high; i++) {
            H[i][j] -= f * ort[i];
          }
        }

        for (int i = 0; i <= high; i++) {
          double f = 0.0;
          for (int j = high; j >= m; j--) {
            f += ort[j] * H[i][j];
          }
          f /= h;
          for (int j = m; j <= high; j++) {
            H[i][j] -= f * ort[j];
          }
        }
        ort[m] = scale * ort[m];
        H[m][m - 1] = scale * g;
      }
    }

    // Accumulate transformations (Algol's ortran).

    for (int i = 0; i < n; i++) {
      for (int j = 0; j < n; j++) {
        V[i][j] = i == j ? 1.0 : 0.0;
      }
    }

    for (int m = high - 1; m >= low + 1; m--) {
      if (H[m][m - 1] != 0.0) {
        for (int i = m + 1; i <= high; i++) {
          ort[i] = H[i][m - 1];
        }
        for (int j = m; j <= high; j++) {
          double g = 0.0;
          for (int i = m; i <= high; i++) {
            g += ort[i] * V[i][j];
          }
          // Double division avoids possible underflow
          g = g / ort[m] / H[m][m - 1];
          for (int i = m; i <= high; i++) {
            V[i][j] += g * ort[i];
          }
        }
      }
    }
  }

  @Override
  public String toString() {
    StringBuilder buf = new StringBuilder();

    buf.append("---------------------------------------------------------------------\n");
    buf.append("EigenvalueDecomposition(A) --> D, V, realEigenvalues, imagEigenvalues\n");
    buf.append("---------------------------------------------------------------------\n");

    buf.append("realEigenvalues = ");
    String unknown = "Illegal operation or error: ";
    try {
      buf.append(String.valueOf(this.getRealEigenvalues()));
    } catch (IllegalArgumentException exc) {
      buf.append(unknown).append(exc.getMessage());
    }

    buf.append("\nimagEigenvalues = ");
    try {
      buf.append(String.valueOf(this.getImagEigenvalues()));
    } catch (IllegalArgumentException exc) {
      buf.append(unknown).append(exc.getMessage());
    }

    buf.append("\n\nD = ");
    try {
      buf.append(String.valueOf(this.getD()));
    } catch (IllegalArgumentException exc) {
      buf.append(unknown).append(exc.getMessage());
    }

    buf.append("\n\nV = ");
    try {
      buf.append(String.valueOf(this.getV()));
    } catch (IllegalArgumentException exc) {
      buf.append(unknown).append(exc.getMessage());
    }

    return buf.toString();
  }

  private void tql2() {

    //  This is derived from the Algol procedures tql2, by
    //  Bowdler, Martin, Reinsch, and Wilkinson, Handbook for
    //  A


row new ArgumentException($"Pattern '{surface.Files}' does not matches material file '{material.ColorTexture}'");
#else
                Surface = null;
                Data = null;
#endif
            }
        }

        public TerrainMaterial Material { get; }

        public TerrainMaterialUsage[] Usages { get; }

        [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
        public SurfaceConfig? Surface { get; }

        [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
        public TerrainMaterialData? Data { get; }

        [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
        public string? Title { get; }
    }
}


03,100,2],[10011,30,2],[10003,10000,2]]',	'2',	'',	'',	''},
{'4002',	'4002',	'黄色预警防御成功奖励',	'总队长，本次黄色预警基地受袭防御成功，请查收附件奖励。',	'卡蒂雅',	'[[60101,400,2],[60102,200,2],[60103,200,2],[10011,45,2],[10003,20000,2]]',	'2',	'',	'',	''},
{'4003',	'4003',	'红色预警防御成功奖励',	'总队长，本次红色预警基地受袭防御成功，请查收附件奖励。',	'卡蒂雅',	'[[60101,800,2],[60102,400,2],[60103,400,2],[10011,60,2],[10003,40000,2]]',	'2',	'',	'',	''},
{'5001',	'5001',	'赛季段位奖励（少尉）',	'恭喜总队长，本赛季达到少尉段位，请查收附件奖励。',	'卡蒂雅',	'[[10010,200,2]]',	'2',	'',	'',	''},
{'5002',	'5002',	'赛季段位奖励（中尉）',	'恭喜总队长，本赛季达到中尉段位，请查收附件奖励。',	'卡蒂雅',	'[[10010,500,2]]',	'2',	'',	'',	''},
{'5003',	'5003',	'赛季段位奖励（上尉）',	'恭喜总队长，本赛季达到上尉段位，请查收附件奖励。',	'卡蒂雅',	'[[10010,1000,2]]',	'2',	'',	'',	''},
{'5004',	'5004',	'赛季段位奖励（少校）',	'恭喜总队长，本赛季达到少校段位，请查收附件奖励。',	'卡蒂雅',	'[[10010,1500,2]]',	'2',	'',	'',	''},
{'5005',	'5005',	'赛季段位奖励（中校）',	'恭喜总队长，本赛季达到中校段位，请查收附件奖励。',	'卡蒂雅',	'[[10010,2000,2]]',	'2',	'',	'',	''},
{'5006',	'5006',	'赛季段位奖励（上校）',	'恭喜总队长，本赛季达到上校段位，请查收附件奖励。',	'卡蒂雅',	'[[10010,2500,2]]',	'2',	'',	'',	''},
{'5007',	'5007',	'赛季段位奖励（少将）',	'恭喜总队长，本赛季达到少将段位，请查收附件奖励。',	'卡蒂雅',	'[[10010,3000,2]]',	'


#
# activate_cards_on_rollover.py <Peter.Bienstman@gmail.com>
#

# Assumes you have a set of cards belonging to inactive tags, which you
# want to gradually activate, and an activate tag called "Enabled".
# The following script will add this tag "Enabled" to a few of these cards.

enabled_tag_name = "Enabled"
inactive_tag_names_contain = "my_tag"
number_of_cards_to_activate = 6

from mnemosyne.libmnemosyne.hook import Hook
from mnemosyne.libmnemosyne.plugin import Plugin

class ActivateHook(Hook):

    used_for = "at_rollover"

    def run(self):
        db = self.database()
        enabled_tag = db.get_or_create_tag_with_name(enabled_tag_name)
        for cursor in db.con.execute(""" select _id from cards where active=0
          and tags like '%{}%' order by _id limit ?""".\
          format(inactive_tag_names_contain),
          (number_of_cards_to_activate, )).fetchall():
            card = db.card(cursor[0], is_id_internal=True)
            card.tags.add(enabled_tag)
            db.update_card(card)
        db.save()

class ActivateHookPlugin(Plugin):

    name = "Activate cards on rollover"
    description = "Trickles in a number of cards on rollover. Parameters are set in the Python script."
    components = [ActivateHook]
    supported_API_level = 3

# Register plugin.

from mnemosyne.libmnemosyne.plugin import register_user_plugin
plugin = register_user_plugin(ActivateHookPlugin)

# Since this is typically run on a server with GUI, we automatically
# activate it here.

# TODO: after the first activation, this will actually result in this
# plugin to be activated twice, but this has no effect in this case.

plugin.activate()


    * @param {string} key
     * @param {*} value
     * @memberof IMemoryCache
     */
    set(key: string, value: any): void;
    /**
     *
     *
     * @template T
     * @param {string} key
     * @returns {T}
     * @memberof IMemoryCache
     */
    get<T>(key: string): T;
    /**
     *
     *
     * @param {string} key
     * @param {number} ttl
     * @memberof IMemoryCache
     */
    ttl(key: string, ttl: number): void;
}import { expect } from 'chai';

import { Day1Step2 } from '.';

describe('day-01-s2', () => {
    let day = new Day1Step2();

    it('1212 produces 6: the list contains 4 items, and all four digits match the digit 2 items ahead.', () => {
        expect(day.execute('1212')).to.be.equal(6);
    });
    it('1221 produces 0, because every comparison is between a 1 and a 2.', () => {
        expect(day.execute('1221')).to.be.equal(0);
    });
    it('123425 produces 4, because both 2s match each other, but no other digit has a match.', () => {
        expect(day.execute('123425')).to.be.equal(4);
    });
    it('123123 produces 12.', () => {
        expect(day.execute('123123')).to.be.equal(12);
    });
    it('12131415 produces 4.', () => {
        expect(day.execute('12131415')).to.be.equal(4);
    });
    it('step 2 input produce 1284.', (done) => {
        day.run('assets/day-01/input.txt').subscribe((result) => {
            expect(result).to.be.equal(1284);
            done();
        });
    });
});
import { IPropertyMetadata } from './PropertyMetadata';
import { PropertyMetadataMap } from './index';
import { isPrimitive } from './util';

/**
 * Serialize: Creates a JSON serializable object from the provided object instance.
 * Only @JsonProperty decorated properties in the model instance are processed.
 *
 */
export function serialize<T extends object = any, U extends object = any>(instance: T | T[]): T extends any[] ? U[] : U;
export function serialize<T extends object = any, U extends object = any>(instance: T | T[]): U | U[] {
  if (Array.isArray(instance)) {
    return instance.map((value: T) => serialize(value));
  }

  if (isPrimitive(instance) || instance instanceof Date) {
    return serializeProperty({} as any, instance);
  }

  const obj: any = Object.create(null);

  for (const key of Object.keys(instance)) {
    const metadata = PropertyMetadataMap.find(instance.constructor, key);

    if (!metadata) continue;

    let target = key;

    if (metadata.exclude) {
      continue;
    } else if (metadata.targetKey) {
      target = metadata.targetKey;
    } else if (metadata.name) {
      target = metadata.name;
    }

    obj[target] = serializeProperty(metadata, (instance as any)[key]);
  }

  return obj;
}

/**
 * Prepare a single property to be serialized to JSON.
 *
 * @param metadata
 * @param prop
 * @returns {any}
 */
function serializeProperty(metadata: IPropertyMetadata<any>, prop: any): any {
  if (typeof prop === 'undefined') return undefined;

  if (prop === null) return null;

  if (metadata.converter) {
    return metadata.converter.toJson(prop);
  }

  if (prop instanceof Date) {
    return new Date(prop.getTime() - prop.getTimezoneOffset() * 60000).toISOString();
  }

  if ((metadata.type && isPrimitive(metadata.type)) || isPrimitive(prop)) {
    return prop;
  }

  if (Array.isArray(prop) && metadata.type === Array) {
    return prop.map((item


                                self.frame_buffer [pos] = (0xff << 24) | (c << 16) | (c << 8) | c;
                            }
                        }
                    }
                }
            }
        }
    }
}
<reponame>fermyon/cargo-target-dep
use std::{
    env,
    io::BufRead,
    path::{Path, PathBuf},
    process::Command,
};

pub fn build_target_dep(
    package_root: impl AsRef<Path>,
    output_path: impl Into<PathBuf>,
) -> TargetDep {
    TargetDep {
        manifest_path: package_root.as_ref().join("Cargo.toml"),
        output_path: output_path.into(),
        ..Default::default()
    }
}

#[derive(Default)]
#[must_use = "must call build()"]
pub struct TargetDep {
    manifest_path: PathBuf,
    output_path: PathBuf,
    profile: Option<String>,
    target: Option<String>,
}

impl TargetDep {
    pub fn release(mut self) -> Self {
        self.profile = Some("release".to_string());
        self
    }

    pub fn target(mut self, target: impl Into<String>) -> Self {
        self.target = Some(target.into());
        self
    }

    pub fn build(self) {
        // Run `cargo build`

        let cargo_bin = build_env_var("CARGO");
        let mut cmd = Command::new(cargo_bin);

        cmd.arg("build");

        cmd.arg("--manifest-path");
        cmd.arg(&self.manifest_path);

        let profile = self.profile.as_deref().unwrap_or("debug");
        cmd.arg("--profile");
        cmd.arg(profile);

        // e.g. target/target-deps/output__path/
        let target_dir = Path::new(&build_env_var("OUT_DIR"))
            .join("target-deps")
            .join(
                self.output_path
                    .to_string_lossy()
                    .replace(std::path::MAIN_SEPARATOR, "__"),
            );
        cmd.arg("--target-dir");
        cmd.arg(&target_dir);

        if let Some(ref target) = self.target {
            cmd.arg("--target");
            cmd.arg(target);
        }

        let status = cmd.status().expect("failed to execute process");
        if !status.success() {
            panic!(
                "error building target dep {:?}: {:?}",
                self.manifest_path, status
            );
        }

        // Read dependency file

        let mut out_dir = target_dir;
        if let Some(ref target) = self.target {
            out_dir = out_dir.join(target);
        }
        out_dir = out_dir.join(profile);

        // TODO(lann): Better error handling/reporting
        for dep_file in glob::glob(out_dir.join("*.d").to_str().unwrap()).unwrap() {
            let contents = std::fs::read(dep_file.unwrap()).unwrap();
            // TODO(lann): Handle multiple output  lines/files (?)
            let line = contents.lines().next().unwrap().unwrap();

            // Split on spaces, skipping escaped spaces
            // https://github.com/rust-lang/rust/blob/65f6d33b775eddfc0128c04083bbf3beea360114/compiler/rustc_interface/src/passes.rs#L596
            let mut paths: Vec<&str> = Vec::new();
            let mut last_match = 0;
            for (idx, _) in line.match_indices(' ') {
                if idx > 0 && &line[idx


f0,$f4,$a8,$15,$f0,$02,$07,$70,$6e,$3c
	.byt $f0,$8f,$d6,$00,$f0,$00,$f0,$00,$f0,$00,$f0,$03,$40,$40


                       ),
                            borderRadius: BorderRadius.circular(50.0),
                            color: currentEditGrade == SelectedGrade.four
                                ? Theme.of(context).colorScheme.secondary
                                : null,
                          ),
                          child: Center(
                            child: Text(
                              '4',
                              style: TextStyle(
                                fontSize: 14.0,
                                fontWeight: FontWeight.w600,
                                color: currentEditGrade == SelectedGrade.four
                                    ? Colors.white
                                    : null,
                              ),
                            ),
                          ),
                        ),
                      ),
                      const SizedBox(width: 10.0),
                      GestureDetector(
                        onTap: () => setState(() {
                          currentEditGrade = SelectedGrade.five;
                        }),
                        child: Container(
                          width: 45.0,
                          height: 45.0,
                          decoration: BoxDecoration(
                            border: Border.all(
                              color: currentEditGrade == SelectedGrade.five
                                  ? Theme.of(context).colorScheme.secondary
                                  : Theme.of(context)
                                      .colorScheme
                                      .secondary
                                      .withValues(alpha: .2),
                              width: 1.0,
                            ),
                            borderRadius: BorderRadius.circular(50.0),
                            color: currentEditGrade == SelectedGrade.five
                                ? Theme.of(context).colorScheme.secondary
                                : null,
                          ),
                          child: Center(
                            child: Text(
                              '5',
                              style: TextStyle(
                                fontSize: 14.0,
                                fontWeight: FontWeight.w600,
                                color: currentEditGrade == SelectedGrade.five
                                    ? Colors.white
                                    : null,
                              ),
                            ),
                          ),
                        ),
                      ),
                    ],
                  ),
                ),
              ],
            ),
          ],
        ),
      ),
    );
  }
}
import 'package:i18n_extension/i18n_extension.dart';

extension Localization on String {
  static final _t = Translations.byLocale("hu_hu") +
      {
        "en_en": {
          "goodmorning": "Good morning, %s!",
          "goodafternoon": "Good afternoon, %s!",
          "goodevening": "Good evening, %s!",
          "goodrest": "⛱ Have a nice holiday, %s!",
          "happybirthday": "🎂 Happy birthday, %s!",
          "merryxmas": "🎄 Merry Christmas, %s!",
          "happynewyear": "🎉 Happy New Year, %s!",
          "refilcopen": "🎈 reFilc is 1 year old, %s!",
          "empty": "Nothing to see here.",
          "All": "All",
          "Grades": "Grades",
          "Exams": "Exams",
          "Messages": "Messages",
          "Absences": "Absences",
          "update_available": "Update Available",
          "missed_exams": "You missed %s exam(s) this week.",
          "missed_exam_contact": "Contact %s to resolve it!",
        },
        "hu_hu": {
          "goodmorning": "Jó reggelt, %s!",
          "goodafternoon": "Szép napot, %s!",
          "goodevening": "Szép estét, %s!",
          "goodrest": "⛱ Jó szünetet, %s!",
          "happybirthday": "🎂 Boldog születésnapot, %s!",
          "merryxmas": "🎄 Boldog Karácsonyt, %s!",
          "happynewyear": "🎉 Boldog új évet, %s!",
          "refilcopen": "🎈 1 éves a reFilc, %s!",
          "empty": "Nincs itt semmi látnivaló.",
          "All": "Összes",
          "Grades": "Jegyek",
          "Exams": "Számonkérések",
          "Messages": "Üzenetek",
          "Absences": "Hiányzások",
          "update_available": "Frissítés elérhető",
          "missed_exams": "Ezen a héten hiányoztál %s számonkérésről.",
          "missed_exam_contact": "Keresd %s tanár urat/hölgyet, hogy pótold!",
        },
        "de_de": {
          "goodmorning": "Guten morgen, %s!",
          "goodafter


r3,ROR #20
bic r2,r7,r3,ROR #20

# qhasm: Ami0 ^= (Eke0 >>> 23)
# asm 1: eor >Ami0=int32#2,<Ami0=int32#3,<Eke0=int32#2,ROR #23
# asm 2: eor >Ami0=r1,<Ami0=r2,<Eke0=r1,ROR #23
eor r1,r2,r1,ROR #23

# qhasm: Amo0 = Ebu1 & ~(Eso0 >>> 18)
# asm 1: bic >Amo0=int32#3,<Ebu1=int32#6,<Eso0=int32#8,ROR #18
# asm 2: bic >Amo0=r2,<Ebu1=r5,<Eso0=r7,ROR #18
bic r2,r5,r7,ROR #18

# qhasm: Amo0 ^= (Emi1 >>> 6)
# asm 1: eor >Amo0=int32#3,<Amo0=int32#3,<Emi1=int32#4,ROR #6
# asm 2: eor >Amo0=r2,<Amo0=r2,<Emi1=r3,ROR #6
eor r2,r2,r3,ROR #6

# qhasm: Amu0 = Ega0 & ~(Ebu1 >>> 4)
# asm 1: bic >Amu0=int32#4,<Ega0=int32#7,<Ebu1=int32#6,ROR #4
# asm 2: bic >Amu0=r3,<Ega0=r6,<Ebu1=r5,ROR #4
bic r3,r6,r5,ROR #4

# qhasm: Amu0 ^= (Eso0 >>> 22)
# asm 1: eor >Amu0=int32#4,<Amu0=int32#4,<Eso0=int32#8,ROR #22
# asm 2: eor >Amu0=r3,<Amu0=r3,<Eso0=r7,ROR #22
eor r3,r3,r7,ROR #22

# qhasm: mem32[statep + 60] = Ama0
# asm 1: str <Ama0=int32#11,[<statep=int32#9,#60]
# asm 2: str <Ama0=r10,[<statep=r8,#60]
str r10,[r8,#60]

# qhasm: assign r0 r1 to Ame0 Ami0;mem64[statep + 64] = Ame0 Ami0
# asm 1: strd <Ame0=int32#1,[<statep=int32#9,#64]
# asm 2: strd <Ame0=r0,[<statep=r8,#64]
strd r0,[r8,#64]

# qhasm: assign r2 r3 to Amo0 Amu0;mem64[statep + 72] = Amo0 Amu0
# asm 1: strd <Amo0=int32#3,[<statep=int32#9,#72]
# asm 2: strd <Amo0=r2,[<statep=r8,#72]
strd r2,[r8,#72]

# qhasm: Ebi1 = mem32[swapp + 108]
# asm 1: ldr >Ebi1=int32#1,[<swapp=int32#10,#108]
# asm 2: ldr >Ebi1=r0,[<swapp=r9,#108]
ldr r0,[r9,#108]

# qhasm: Ego0 = mem32[swapp + 32]
# asm 1: ldr >


_form_target = service.location.to_string();
                    } // _ => {
                      //     log::debug!("not it!");
                      // }
                }
            }
            saml_rs::sp::SamlBindingType::SingleLogoutService => {
                log::debug!("sso");
            }
        }
    }

    response_body.push_str("
Known issuers

");
    for issuer in req.state().service_providers.keys() {
        response_body.push_str(&format!("
{}
", issuer));
    }
    response_body.push_str("
");

    response_body.push_str(&format!(
        "
relay_state: {:?}
",
        parsed_saml_request.relay_state
    ));
    response_body.push_str(&format!(
        "
issue_instant: {:?}
",
        parsed_saml_request.issue_instant
    ));
    response_body.push_str(&format!(
        "consumer_service_url: {:?}
",
        parsed_saml_request.consumer_service_url
    ));
    let unset_value = String::from("unset");
    response_body.push_str(&format!("issuer: {:?}
", parsed_saml_request.issuer));

    if let Some(value) = query.Signature {
        response_body.push_str(&format!("
Original Signature field:
{}
", value))
    };
    if let Some(value) = query.SigAlg {
        response_body.push_str(&format!("
Original SigAlg field:
{}
", value))
    };

    // response_body.push_str(&format!("Referer: {:?}
", referer));
    response_body.push_str(&format!(
        "
Original SAMLRequest field:
{}
",
        samlrequest
    ));
    // #[allow(clippy::or_fun_call)]
    let relay_state = match query.RelayState {
        Some(value) => value,
        None => unset_value,
    };
    response_body.push_str(&format!("RelayState: {}
", relay_state));

    // start building the actual response

    let authn_instant =
        DateTime::<Utc>::from_utc(NaiveDate::from_ymd(2014, 7, 17).and_hms(1, 1, 48), Utc);
    // 2024-07-17T09:01:48Z
    // adding three years including skip years
    let session_expiry =
        match DateTime::<Utc>::from_utc(NaiveDate::from_ymd(2014, 7, 17).and_hms(9, 1, 48), Utc)
            .checked_add_signed(Duration::days(3653))
        {
            Some(value) => value,
            _ => Utc::now(),
        };

    // TODO: work out where the AuthNStatement goes
    let authnstatement = AuthNStatement {
        instant: authn_instant,
        session_index: String::from("_be9967abd904ddcae3c0eb4189adbe3f71e327cf93"),
        classref: String::from("urn:oasis:names:tc:SAML:2.0:ac:classes:Password"),
        expiry: Some(session_expiry),
    };

    let responseattributes = [
        AssertionAttribute::basic("uid", ["yaleman"].to_vec()),
        AssertionAttribute::basic("mail", ["<EMAIL>"].to_vec()),
        AssertionAttribute::basic(
            "eduPersonAffiliation",
            ["users", "examplerole1", "admin"].to_vec(),
        ),
    ]
    .to_vec();

    let signing_key = Some(req.state().saml_signing_key.to_owned());
    let response = ResponseElements {
        issuer: req.state().hostname.to_string(),
        response_id: ResponseElements::default(


                                                +#+#+#+#+#+   +#+           */
/*   Created: 2021/05/31 11:11:30 by honlee            #+#    #+#             */
/*   Updated: 2021/05/31 11:15:17 by honlee           ###   ########.fr       */
/*                                                                            */
/* ************************************************************************** */

// readFile 을 프로미스로 만든 readFilePromise.ts 를 async 함수에 적용해보겠습니다.

import { readFilePromise } from "./readFilePromise";

const readFilesAll = async(filename:string[]) => {
	return await Promise.all(filename.map(filename => readFilePromise(filename)))
}

readFilesAll(['./package.json', './tsconfig.json'])
	.then(([packageJson, tsconfigJson] : string[]) => {
		console.log('<package.json>: ', packageJson)
		console.log('<tsconfig.json>: ', tsconfigJson)
	})
	.catch(error => console.log('error: ', error.message))/// <reference path = "IShape.ts" />

namespace Drawing {
    export class Rectangle implements IShape {
        draw(): string {
            return "Draw rectangle";
        }
    }
}import { Config } from '../src/config';
import { Cache } from '../src/cache'
import { Post } from '../src/post';
import { Tag } from '../src/tag';

describe('Cache', () => {

    let config: Config = new Config();
    let cache: Cache;

    beforeAll(async () => {

        config.loadConfig("./blog_example/config.json");
        cache = new Cache(config);

    });

    it('caching a post', async () => {

        let post = new Post();
        post.title = 'foo';
        post.matter.date = new Date();

        let result = await cache.setPost('foo', post);

        expect(result).toBe(true);
    });

    it('caching a post and retrieving it', async () => {

        let post = new Post();
        post.title = 'foo';
        post.matter.date = new Date();

        await cache.setPost('foo', post);

        let result = await cache.getPost('foo');

        if(result) {
            expect(result.title).toBe('foo');
        } else {
            fail();
        }
    });

    it('no cached hit', async () => {

        let post = new Post();
        post.title = 'foo';
        post.matter.date = new Date();

        await cache.setPost('foo', post);

        let result = await cache.getPost('bar');

        expect(result).toBeUndefined();
    });

    it('caching a post and retrieving it with functions', async () => {

        let post = new Post();
        post.title = 'foo';
        post.matter.date = new Date();

        await cache.setPost('foo', post);

        let result = await cache.getPost('foo');

        if(result) {
            expect(result.title).toBe("foo");
        } else {
            fail();
        }

    });

    it('caching a post and retrieving it with correct values', async () => {

        let post = new Post();
        post.title = 'foo';
        post.matter.date = new Date();

        post.keywords = new Array<string>();
        post.keywords.push('cat');
        post.keywords.push('dog');

        await cache.setPost('foo', post);

        let result = await cache.getPost('foo');

        if(result) {
            expect(result.keywords.length).toBe(2);
        } else {
            fail();
        }

    });

    it('caching posts and retrieving it with correct values', async () => {

        let key = "multipost"
        let posts = Array<Post>();

        let fooPost = new Post();
        fooPost.title = 'foo';
        fooPost.matter.date = new Date();

        fo


/*
 * distortion.c
 *
 *  Created on: 14.04.2012
 * ------------------------------------------------------------------------------------------------------------------------
 *  Copyright 2013 Julian Schmidt
 *  Julian@sonic-potions.com
 * ------------------------------------------------------------------------------------------------------------------------
 *  This file is part of the Sonic Potions LXR drumsynth firmware.
 * ------------------------------------------------------------------------------------------------------------------------
 *  Redistribution and use of the LXR code or any derivative works are permitted
 *  provided that the following conditions are met:
 *
 *       - The code may not be sold, nor may it be used in a commercial product or activity.
 *
 *       - Redistributions that are modified from the original source must include the complete
 *         source code, including the source code for all components used by a binary built
 *         from the modified sources. However, as a special exception, the source code distributed
 *         need not include anything that is normally distributed (in either source or binary form)
 *         with the major components (compiler, kernel, and so on) of the operating system on which
 *         the executable runs, unless that component itself accompanies the executable.
 *
 *       - Redistributions must reproduce the above copyright notice, this list of conditions and the
 *         following disclaimer in the documentation and/or other materials provided with the distribution.
 * ------------------------------------------------------------------------------------------------------------------------
 *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
 *   INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
 *   DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
 *   SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
 *   WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
 *   USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 * ------------------------------------------------------------------------------------------------------------------------
 */

#include "distortion.h"
#include "math.h"
//--------------------------------------------------
__inline void setDistortionShape(Distortion *dist, uint8_t shape)
{
	dist->shape = 2*(shape/128.f)/(1-(shape/128.f));
}
//--------------------------------------------------
void calcDistBlock(const Distortion *dist, int16_t* buf, const uint8_t size)
{
	uint8_t i;
	for(i=0;i<size;i++)
	{
			float x = buf[i]/32767.f;
			x = (1+dist->shape)*x/(1+dist->shape*fabsf(x));
			buf[i] = (x*32767);
	}
}
//--------------------------------------------------

float distortion_calcSampleFloat(const Distortion *dist, float x)
{
	return (1+dist->shape)*x/(1+dist->shape*fabsf(x));
}


dy" *ngIf="tableData.length === 0" class="no-data">
                    {{annots.noRowsMsg}}

                    {{port.id}}
                    {{port.pkt_rx}}
                    {{port.pkt_tx}}
                    {{port.bytes_rx}}
                    {{port.bytes_tx}}
                    {{port.pkt_rx_drp}}
                    {{port.pkt_tx_drp}}
                    {{port.duration}}

        <onos-portdetails class="floatpanels" id="{{ selId }}" devId="{{devId}}" (closeEvent)="deselectRow($event)"></onos-portdetails>

Pipeconf for Device {{devId || "(No device selected)"}}

                <onos-icon classes="{{ autoRefresh?'active refresh':'refresh' }}" iconId="refresh" iconSize="42" toolTip="{{ autoRefreshTip }}"></onos-icon>

                <onos-icon classes="active-rect" iconId="deviceTable" iconSize="42"></onos-icon>

                <onos-icon classes="active-rect" iconId="flowTable" iconSize="42" toolTip="{{ flowTip }}"></onos-icon>

                <onos-icon classes="active-rect" iconId="portTable" iconSize="42" toolTip="{{ portTip }}"></onos-icon>

                <onos-icon classes="active-rect" iconId="groupTable" iconSize="42" toolTip="{{ groupTip }}"></onos-icon>

                <onos-icon classes="active-rect" iconId="meterTable" iconSize="42" toolTip="{{ meterTip }}"></onos-icon>

                <onos-icon classes="current-view" iconId="pipeconfTable" iconSize="42" toolTip="{{ pipeconfTip


Genres(): Response<MovieGenreResponse> = movies.getTVSeriesGenres()

    override fun readMovieDownload(search: String): Flow<List<MovieDownloadEntity>> = database.movieDownloadDao.getAllDownloads(search)

    override suspend fun insertMovieDownload(download: MovieDownloadEntity) =  database.movieDownloadDao.insertDownload(download)

    override suspend fun deleteMovieDownload(download: MovieDownloadEntity) = database.movieDownloadDao.deleteDownload(download)

    override suspend fun getMovieNowPlayingList(page: Int): Response<MovieNowPlayingDto> = movies.getNowPlayingMovieList(page = page)

    override suspend fun getTvSeriesNowPlayingList(): Response<TvSeriesNowPlayingDto> = movies.getNowPlayingSeriesList()

    override suspend fun getTvSeriesEpisodes(seriesId: Int, seasonNumber: Int): Response<TvSeriesEpisodesDto> = movies.getTvSeriesEpisodes(seriesId = seriesId, seasonNumber = seasonNumber)
    override fun getMovieReviewPagingFlow(movieId: Int): Flow<PagingData<UserReviewDto.Result>> = Pager(
        config = PagingConfig(pageSize = 20),
        pagingSourceFactory = {
            MovieReviewPagingSource(movies, movieId)
        }
    ).flow

    override fun getTvSeriesReviewPagingFlow(seriesId: Int): Flow<PagingData<UserReviewDto.Result>> = Pager(
        config = PagingConfig(pageSize = 20),
        pagingSourceFactory = {
            TvSeriesReviewPagingSource(movies, seriesId)
        }
    ).flow
}
package org.webrtc.audio

import android.media.AudioTrack

/**
 *
 * @author  ShenBen
 * @date    2021/08/21 18:48
 * @email   714081644@qq.com
 */

/**
 * 回调音频输入数据
 * 反射，替换[WebRtcAudioTrack.audioTrack]，使用[AudioTrackInterceptor]
 * 其中要把[WebRtcAudioTrack.audioTrack]赋值给[AudioTrackInterceptor.originalTrack]，
 * [AudioTrackInterceptor]只是一个壳，具体实现是[AudioTrackInterceptor.originalTrack]
 *
 * @param samplesReadyCallback 回调接口 ，原始pcm数据
 */
fun JavaAudioDeviceModule.setAudioTrackSamplesReadyCallback(samplesReadyCallback: JavaAudioDeviceModule.SamplesReadyCallback) {
    val deviceModuleClass = this::class.java
    val audioOutputField = deviceModuleClass.getDeclaredField("audioOutput")
    audioOutputField.isAccessible = true
    val webRtcAudioTrack = audioOutputField.get(this) as WebRtcAudioTrack
    val audioTrackClass = webRtcAudioTrack::class.java
    val audioTrackFiled = audioTrackClass.getDeclaredField("audioTrack")
    audioTrackFiled.isAccessible = true
    val audioTrack = audioTrackFiled.get(webRtcAudioTrack)?.let {
        it as AudioTrack
    } ?: return

    val interceptor = AudioTrackInterceptor(audioTrack, samplesReadyCallback)
    audioTrackFiled.set(webRtcAudioTrack, interceptor)
}package com.shencoder.webrtcextension.ext

import org.webrtc.SdpObserver
import org.webrtc.SessionDescription
import kotlin.coroutines.resume
import kotlin.coroutines.suspendCoroutine

/**
 *
 * @author Shenben
 * @date 2023/11/3 10:32
 * @description
 * @since
 */

suspend inline fun createSessionDescription(crossinline call: (SdpObserver) -> Unit): Result<SessionDescription> =
    suspendCoroutine {
        val observer = object : SdpObserver {
            override fun onCreateSuccess(sdp: SessionDescription?) {
                if (sdp != null) {
                    it.resume(Result.success(sdp))
                } else {
                    it.resume(Result.failure(RuntimeException("SessionDescription is null!")))
                }
            }

            override fun onCreateFailure(error: Stri


 U+3010-3011, U+306e, U+30f3, U+314a, U+314c, U+5927, U+65b0, U+7e41, U+97d3, U+9ad4, U+ad49, U+ae0b, U+ae0d, U+ae43, U+ae5d, U+aecf, U+af3c, U+af64, U+afd4, U+b080, U+b084, U+b0c5, U+b10c, U+b1e8, U+b2ac, U+b36e, U+b451, U+b515, U+b540, U+b561, U+b6ab, U+b6b1, U+b72c, U+b730, U+b744, U+b800, U+b8ec, U+b8f0, U+b904, U+b968, U+b96d, U+b987, U+b9d9, U+bb36, U+bb49, U+bc2d, U+bc43, U+bcf6, U+bd89, U+be57, U+be61, U+bed4, U+c090, U+c130, U+c148, U+c19c, U+c2f9, U+c36c, U+c37c, U+c384, U+c3df, U+c575, U+c584, U+c660, U+c719, U+c816, U+ca4d, U+ca54, U+cabc, U+cb49, U+cc14, U+cff5, U+d004, U+d038, U+d0b4, U+d0d3, U+d0e0, U+d0ed, U+d131, U+d1b0, U+d31f, U+d33d, U+d3a0, U+d3ab, U+d514, U+d584, U+d6a1, U+d6cc, U+d749, U+d760, U+d799;
}

/* [109] (Noto Sans KR) */
@font-face {
  font-family: 'Noto Sans KR';
  font-style: normal;
  font-weight: 300;
  src: url(/fonts/noto-sans-kr-109-v36.woff2) format('woff2');
  unicode-range: U+24, U+60, U+3b9, U+3bb, U+3bd, U+2191, U+2606, U+300c-300d, U+3131, U+3134, U+3139, U+3141-3142, U+3148, U+3161, U+3163, U+321c, U+4eba, U+5317, U+ac31, U+ac77, U+ac9f, U+acb9, U+acf0-acf1, U+acfd, U+ad73, U+af3d, U+b00c, U+b04a, U+b057, U+b0c4, U+b188, U+b1cc, U+b214, U+b2db, U+b2ee, U+b304, U+b4ed, U+b518, U+b5bc, U+b625, U+b69c-b69d, U+b7ac, U+b801, U+b86c, U+b959, U+b95c, U+b985, U+ba48, U+bb58, U+bc0c, U+bc38, U+bc85, U+bc9a, U+bf40, U+c068, U+c0bd, U+c0cc, U+c12f, U+c149, U+c1e0, U+c22b, U+c22d, U+c250, U+c2fc, U+c300, U+c313, U+c370, U+c3d8, U+c557, U+c580, U+c5e3, U+c62e, U+c634,


------------------------------------

function modifier_furion_wrath_of_nature_thinker_lua:GetNextTarget()
	local enemies = FindUnitsInRadius( self:GetCaster():GetTeamNumber(), self:GetParent():GetOrigin(), nil, FIND_UNITS_EVERYWHERE, DOTA_UNIT_TARGET_TEAM_ENEMY, DOTA_UNIT_TARGET_HERO + DOTA_UNIT_TARGET_CREEP, DOTA_UNIT_TARGET_FLAG_MAGIC_IMMUNE_ENEMIES, 0, false )

	local hClosestTarget = nil
	local flClosestDist = 0.0
	if #enemies > 0 then
		for _,enemy in pairs(enemies) do
			if enemy ~= nil and self:GetCaster():CanEntityBeSeenByMyTeam( enemy ) then
				local bHitByWrath = false

				if self.hTargetsHit ~= nil then
					for _,hHitEnemy in ipairs(self.hTargetsHit) do
						if enemy == hHitEnemy then
							bHitByWrath = true
						end
					end
				end

				if bHitByWrath == false then
					local vToTarget = enemy:GetOrigin() - self:GetParent():GetOrigin()
					local flDistToTarget = vToTarget:Length()

					if hClosestTarget == nil or flDistToTarget < flClosestDist then
						hClosestTarget = enemy
						flClosestDist = flDistToTarget
					end
				end
			end
		end
	end

	return hClosestTarget
end

--------------------------------------------------------------------------------

function modifier_furion_wrath_of_nature_thinker_lua:HitTarget( hTarget )
	if hTarget == nil then
		return
	end

	local bHasScepter = self:GetCaster():HasScepter()
	local nTargetsHit = 0
	if self.hTargetsHit ~= nil then
		nTargetsHit = #self.hTargetsHit
	end
	local flDamagePct = math.pow( 1.0 + ( self.damage_percent_add / 100.0 ), nTargetsHit )
	local flDamage = self.damage
	if bHasScepter then
		flDamage = self.damage_scepter
	end

	flDamage = flDamage * flDamagePct

	local damage = {
		victim = hTarget,
		attacker = self:GetCaster(),
		damage = flDamage,
		damage_type = DAMAGE_TYPE_MAGICAL,
		ability = self:GetAbility()
	}

	ApplyDamage( damage )

	if hTarget:IsHero() then
		EmitSoundOn( "Hero_Furion.WrathOfNature_Damage", hTarget )
	else
		EmitSoundOn( "Hero_Furion.WrathOfNature_Damage.Creep", hTarget )
	end

	if bHasScepter then
		local hForceOfNature = self:GetCaster():FindAbilityByName( "furion_force_of_nature_lua" )
		if ( not hTarget:IsAlive() ) and hForceOfNature ~= nil and hForceOfNature:IsTrained() then
			local treantName = "npc_dota_furion_treant"
			if hTarget:IsHero() then
				treantName = "npc_dota_furion_treant_large"
			end

			local hTreant = CreateUnitByName( treantName, hTarget:GetOrigin(), true, self:GetCaster(), self:GetCaster():GetOwner(), self:GetCaster():GetTeamNumber() )
			if hTreant ~= nil then
				hTreant:SetControllableByPlayer( self:GetCaster():GetPlayerID(), false )
				hTreant:SetOwner( self:GetCaster() )

				local kv = {
					duration = hForceOfNature:GetSpecialValueFor( "duration" )
				}

				hTreant:AddNewModifier( self:GetCaster(), self, "modifier_furion_force_of_nature_lua", kv )
				EmitSoundOnLocationWithCaster( hTarget:GetOrigin(), "Hero_Furion.ForceOfNature", self:GetCaster() )
			end
		end
	end

	table.insert(