 data in web applications without native code.

## Installation

### NPM

```bash
npm install kinectron-client
```

### CDN

```html
<!-- UMD build (global variable: Kinectron) -->
<script src="https://cdn.jsdelivr.net/npm/kinectron-client@latest/dist/kinectron.umd.js"></script>
```

## Getting Started

### Connecting to a Kinectron Server

Kinectron Client must be used with the Kinectron Server. Download and setup instructions can be found here https://github.com/kinectron/kinectron

#### Basic Connection (Simplified)

```javascript
// Create a new Kinectron instance with just the server IP
const kinectron = new Kinectron('127.0.0.1'); // Enter IP address from Kinectron application

// Set up connection event handler
kinectron.on('ready', () => {
  console.log('Connected to Kinectron server');
});

// Connect to the server
kinectron.peer.connect();
```

#### Advanced Connection Configuration

```javascript
// Create a new Kinectron instance with detailed configuration
const kinectron = new Kinectron({
  host: '127.0.0.1', // Enter IP address from Kinectron application
  port: 9001, // Custom port if needed
  path: '/', // Custom path if needed
  secure: false, // Use true for HTTPS connections
});

// Set up connection event handler
kinectron.on('ready', () => {
  console.log('Connected to Kinectron server');
});

// Connect to the server
kinectron.peer.connect();
```

#### Remote Connection (using Ngrok)

```javascript
// Create a new Kinectron instance with just the Ngrok URL
const kinectron = new Kinectron('your-ngrok-url.ngrok-free.app');

// Set up connection event handler
kinectron.on('ready', () => {
  console.log('Connected to Kinectron server via Ngrok');

  // Set Kinect type (azure)
  kinectron.setKinectType('azure');
});

// Connect to the server
kinectron.peer.connect();
```

## Available Streams

Kinectron provides access to the following data streams:

### Color Stream

```javascript
// Start the color stream
kinectron.startColor((colorFrame) => {
  // Process the color frame
  // colorFrame contains an image data URL
  document.getElementById('colorImage').src = colorFrame.src;
});
```

### Depth Stream

```javascript
// Start the depth stream
kinectron.startDepth((depthFrame) => {
  // Process the depth frame
  // depthFrame contains an image data URL
  document.getElementById('depthImage').src = depthFrame.src;
});
```

### Raw Depth Stream

```javascript
// Start the raw depth stream
kinectron.startRawDepth((rawDepthFrame) => {
  // Process the raw depth frame
  // rawDepthFrame contains already unpacked depth data in the depthValues property
  const depthData = rawDepthFrame.depthValues;

  // Use the depth data for visualization or analysis
  visualizePointCloud(depthData);
});
```

### Body Tracking

```javascript
// Start the body tracking stream
kinectron.startBodies((bodyFrame) => {
  // Process the body frame
  // bodyFrame.bodies contains an array of skeleton data
  if (bodyFrame.bodies.length > 0) {
    drawSkeleton(bodyFrame.bodies[0]);
  }
});
```

### Key (Green Screen)

```javascript
// Start the key stream
kinectron.startKey((keyFrame) => {
  // Process the key frame
  // keyFrame contains an image data URL with transparent background
  document.getElementById


}
			Runtime_Semacquire(&sem)
		}
		_ = foo
		Runtime_Semrelease(&sem, false, 0)
	})
}

func BenchmarkSemaSyntNonblock(b *testing.B) {
	benchmarkSema(b, false, false)
}

func BenchmarkSemaSyntBlock(b *testing.B) {
	benchmarkSema(b, true, false)
}

func BenchmarkSemaWorkNonblock(b *testing.B) {
	benchmarkSema(b, false, true)
}

func BenchmarkSemaWorkBlock(b *testing.B) {
	benchmarkSema(b, true, true)
}
// Copyright 2012 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

package sync_test

import (
	"fmt"
	"os"
	"sync"
)

type httpPkg struct{}

func (httpPkg) Get(url string) {}

var http httpPkg

// This example fetches several URLs concurrently,
// using a WaitGroup to block until all the fetches are complete.
func ExampleWaitGroup() {
	var wg sync.WaitGroup
	var urls = []string{
		"http://www.golang.org/",
		"http://www.google.com/",
		"http://www.example.com/",
	}
	for _, url := range urls {
		// Increment the WaitGroup counter.
		wg.Add(1)
		// Launch a goroutine to fetch the URL.
		go func(url string) {
			// Decrement the counter when the goroutine completes.
			defer wg.Done()
			// Fetch the URL.
			http.Get(url)
		}(url)
	}
	// Wait for all HTTP fetches to complete.
	wg.Wait()
}

func ExampleOnce() {
	var once sync.Once
	onceBody := func() {
		fmt.Println("Only once")
	}
	done := make(chan bool)
	for i := 0; i < 10; i++ {
		go func() {
			once.Do(onceBody)
			done <- true
		}()
	}
	for i := 0; i < 10; i++ {
		<-done
	}
	// Output:
	// Only once
}

// This example uses OnceValue to perform an "expensive" computation just once,
// even when used concurrently.
func ExampleOnceValue() {
	once := sync.OnceValue(func() int {
		sum := 0
		for i := 0; i < 1000; i++ {
			sum += i
		}
		fmt.Println("Computed once:", sum)
		return sum
	})
	done := make(chan bool)
	for i := 0; i < 10; i++ {
		go func() {
			const want = 499500
			got := once()
			if got != want {
				fmt.Println("want", want, "got", got)
			}
			done <- true
		}()
	}
	for i := 0; i < 10; i++ {
		<-done
	}
	// Output:
	// Computed once: 499500
}

// This example uses OnceValues to read a file just once.
func ExampleOnceValues() {
	once := sync.OnceValues(func() ([]byte, error) {
		fmt.Println("Reading file once")
		return os.ReadFile("example_test.go")
	})
	done := make(chan bool)
	for i := 0; i < 10; i++ {
		go func() {
			data, err := once()
			if err != nil {
				fmt.Println("error:", err)
			}
			_ = data // Ignore the data for this example
			done <- true
		}()
	}
	for i := 0; i < 10; i++ {
		<-done
	}
	/


Result.OK)
                Path = dialog.SelectedPath;
        }

        public CopyFilePluginViewModel()
        {

        }

        public string Path
        {
            get { return _config.ConfigData["Path"]; }
            set
            {
                _config.ConfigData["Path"] = value;
                RaisePropertyChanged(() => Path);
            }
        }

        public string FileName
        {
            get { return _config.ConfigData["FileName"]; }
            set
            {
                _config.ConfigData["FileName"] = value;
                RaisePropertyChanged(() => Path);
            }
        }
    }
}


- [09:08] -  NUM_PADS0
 (rw) (06)  OPCODE0  - [15:10] -  OPCODE
 (rw) (08)  OPERAND1  - [23:16] -  OPERAND1
 (rw) (02)  NUM_PADS1  - [25:24] -  NUM_PADS1
 (rw) (06)  OPCODE1  - [31:26] -  OPCODE1
</lang>
#### p.flexspi.lut[15]
<link=p.FLEXSPI.LUT[15]>
#### FLEXSPI.LUT[15]
<link=p.FLEXSPI.LUT[15]>
#### p.flexspi.lut[18]
<link=p.FLEXSPI.LUT[18]>
#### p.FLEXSPI.LUT[20]
<lang=dft>
 (rw)  0x402a8250 (0x402a8000 + 0x0250)
LUT 0
 (rw) (08)  OPERAND0  - [07:00] -  OPERAND0
 (rw) (02)  NUM_PADS0  - [09:08] -  NUM_PADS0
 (rw) (06)  OPCODE0  - [15:10] -  OPCODE
 (rw) (08)  OPERAND1  - [23:16] -  OPERAND1
 (rw) (02)  NUM_PADS1  - [25:24] -  NUM_PADS1
 (rw) (06)  OPCODE1  - [31:26] -  OPCODE1
</lang>
#### FLEXSPI.LUT[20]
<link=p.FLEXSPI.LUT[20]>
#### p.flexspi.lut[24]
<link=p.FLEXSPI.LUT[24]>
#### flexspi.lut[31]
<link=p.FLEXSPI.LUT[31]>
#### FLEXSPI.LUT[42]
<link=p.FLEXSPI.LUT[42]>
#### flexspi.lut[43]
<link=p.FLEXSPI.LUT[43]>
#### flexspi.lut[53]
<link=p.FLEXSPI.LUT[53]>
#### p.flexspi2.mcr0
<link=p.FLEXSPI2.MCR0>
#### p.FLEXSPI2.INTR
<lang=dft>
 (rw)  0x402a4014 (0x402a4000 + 0x0014)
Interrupt Register
 (rw) (01)  IPCMDDONE  - [00:00] -  IP triggered Command Sequences Execution finished interrupt. This interrupt is
 also generated when there is IPCMDGE or IPCMDERR interrupt generated.
 (rw) (01)  IPCMDGE  - [01:01] -  IP triggered Command Sequences Grant Timeout interrupt.
 (rw) (01)  AHBCMDGE  - [02:02] -  AHB triggered Command Sequences Grant Timeout interrupt.
 (rw) (01)  IPCMDERR  - [03:03] -  IP triggered Command Sequences Error Detected interrupt. When an error detected
  for IP command, this command will be ignored and not executed at all.
 (rw) (01)  AHBCMDERR  - [04:04] -  AH


Completer.future;

  @override
  void u(double t) {
    final monaLisa = _monaLisa;
    if (monaLisa == null) return;

    const d = 750.0;
    s2q(d);

    // We assume that the height is bigger than the width since we know it is ;)
    const scale = d / _h;
    const scaleFactor = 142.0;

    const relativeX = 0.4015, relativeY = 0.2293;
    const relativeWidthGap = (_h - _w) / _h / 2;

    const targetZoom = scaleFactor, zeroZoom = scaleFactor;
    const targetTime = 2.25;
    final targetExponent = log(targetZoom) / log(2);

    // We offset the time to create a beautiful start frame (=thumbnail) :)
    final offsetT = t + 1 / 4.5;
    final exponent = targetExponent / targetTime * (offsetT % targetTime);

    // We need to zoom in at an exponential rate in order to make it *look
    // like* we are zooming in at a linear rate. This is because changing the
    // scale from 1 to 2 makes everything twice as big but scaling from 2 to 3
    // only 50% bigger.
    final zoom = zeroZoom * pow(2, exponent);

    // The zoom precision determines how many iterations we perform in the
    // integral in order to get a more and more precise zoom location.
    // We could use the loop below that computes the transforms below since it
    // does exactly the same for the translation (which is the zoom location),
    // however, we want more precision, i.e. more iterations here :)
    // Since we never zoom in farther than 4 times, this precision is
    // technically unnecessary, i.e. you do not see it at that zoom level (:
    // So the real reason is that we optimize in the loop below to never draw
    // what you cannot see and that is why the zoom location would jump if we
    // computed it there.
    const zoomPrecision = 11;
    var zoomDx = relativeWidthGap * d, zoomDy = .0;
    for (var i = 0; i < zoomPrecision; i++) {
      final integralScale = scale / pow(scaleFactor, i);

      zoomDx += _w * integralScale * relativeX;
      zoomDy += _h * integralScale * relativeY;
    }

    final monaLisas = <RSTransform>[];

    var monaLisaScale = scale;
    var translateX = .0, translateY = .0;
    do {
      monaLisas.add(RSTransform.fromComponents(
        rotation: 0,
        scale: monaLisaScale,
        anchorX: 0,
        anchorY: 0,
        translateX: translateX,
        translateY: translateY,
      ));

      translateX += _w * monaLisaScale * relativeX;
      translateY += _h * monaLisaScale * relativeY;
      monaLisaScale /= scaleFactor;

      if (monaLisaScale / scaleFactor * zoom * _w > d) {
        // Remove this entry because the one after the next one already covers
        // the whole screen.
        monaLisas.removeLast();
      }
    } // Only draw a Mona Lisa if it takes up at least 1 pixel on the screen.
    while (monaLisaScale * zoom * _h >


 <h3>${day}/${month}/${year}</h3>
  </article>
  `;
};

export const generateSite = (): void => {
  const comics: Comics = readJSON();
  const descendingComics = Object.values(comics).sort((a, b) => b.no - a.no);

  let comicsHTML = "";
  descendingComics.forEach(
    ({ day, month, year, no, title, imgWidth, imgHeight }) => {
      comicsHTML += generateComicHTML(
        day,
        month,
        year,
        no,
        title,
        imgWidth,
        imgHeight
      );
    }
  );

  const html = generateHTML(comicsHTML, descendingComics[0].no);
  fs.writeFileSync(__dirname + "/static/index.html", html);
};
// ./expressjs-admin-server/controllers/category.server.controller.ts
import Category from '../models/category.server.model';

export default class categoryController{
  createCategory = (req,res) => {
    console.log('createCategory: '+ JSON.stringify(req.body));
    if(req.body){
      var newCategory = new Category(req.body);
      newCategory.save((err,catgr) => {
        if(err){
          return res.json({success:false,message:'Something going wrong',err});
        }
        else{
          return res.json({success:true,message:'Category Added Successfully',catgr});
        }
      })
    }
  }

  fetchCategory = (req,res) => {
    console.log('fetchCategory: '+ JSON.stringify(req.params));
    if(req.params.page && req.params.limit){
      let page = parseInt(req.params.page);
      let limit = parseInt(req.params.limit) < 30 ? parseInt(req.params.limit) : 30;
      let skip_value = (page * limit) - limit;
      Category.find()
              .skip(skip_value)
              .limit(limit)
              .exec((err,catgr) => {
                if(err){
                  return res.json({success:false,message:'Something going wrong',err});
                }
                else{
                  return res.json({success:true,message:'Categories Fetched Successfully',catgr});
                }
              })
    }
  }

  deleteCategory = (req,res) => {
    console.log('deleteCategory: '+ JSON.stringify(req.params));
     if(req.params.id){
       let id = req.params.id;
       Category.findByIdAndRemove(id, (err,catgr) => {
         if(err){
           return res.json({success:false,message:'Something going wrong',err});
         }
         else if(!catgr){
           return res.json({success:false,message:'Category Not Found!'});
         }
         else{
           return res.json({success:true,message:'Category Deleted Successfully',catgr});
         }
       })
     }
  }

  editCategory = (req,res) => {
    console.log('editCategory: '+ JSON.stringify(req.body));
    if(req.body){
      let id = req.body._id;
      Category.findByIdAndUpdate(id, { $set: req.body }, { 'new':true })
              .exec((err,catgr) => {
                if(err){
                  return res.json({success:false,message:'Something going wrong',err});
                }
                else if(!catgr){
                  return res.json({success:false,message:'Category Not Found!'});
                }
                else{
                  return res.json({success:true,message:'Category Updated Successfully',catgr});
                }
              })
    }
  }

  getCategory = (req,res) => {
    console.log('getCategory: '+ JSON.stringify(req.params));
    if(req.params.id){
      let id = req.


: listOf()
        val asListComparable: List<AsComparable<NbtElement>>
            get() = asListUnwrapped.map { it.asComparable { a, b -> a.compareTo(b) } }

        fun sameType(other: WrappedTag): Boolean {
            return isList && other.isList ||
                   isString && other.isString ||
                   isCompound && other.isCompound ||
                   isNumber && other.isNumber
        }

        fun copy(): WrappedTag {
            return WrappedTag(value.copy())
        }

    }

    // ============
    // private
    // ============
    private fun innerMatchNbt(a: NbtCompound?,
                              b: NbtCompound?): Boolean { // b superset of a (a <= b)
        // NbtHelper.matches()
        return NbtHelper.matches(a,
                                 b,
                                 true) // criteria, testTarget, allowExtra (for list)
    }

    private fun getNbtPath(path: String): NbtPathArgumentTypeNbtPath? {
        // NbtPathArgumentType().parse(StringReader(path))
        return tryOrPrint(Log::warn) { NbtPathArgumentType().parse(StringReader(path)) }
    }

    private fun getTagsForPath(nbtPath: NbtPathArgumentTypeNbtPath,
                               target: NbtElement): List<NbtElement> {
        return trySwallow(listOf()) { nbtPath.get(target) }
    }

    fun NbtElement?.nullIfEmpty(): NbtElement? {
        return if (this == null) {
            null
        }
        else if (this is NbtCompound && this.isEmpty || this is NbtList && this.isEmpty()) {
            null
        } else {
            this
        }
    }
}
/*
 * Inventory Profiles Next
 *
 *   Copyright (c) 2022 Plamen K. Kosseff <p.kosseff@gmail.com>
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 *     along with this program.  If not, see <https://www.gnu.org/licenses/>.
 */

package org.anti_ad.mc.ipnext

import org.anti_ad.mc.common.TellPlayer
import org.anti_ad.mc.common.gui.widgets.ConfigButtonInfo
import org.anti_ad.mc.common.gui.widgets.CustomButtonWidget
import org.anti_ad.mc.common.moreinfo.InfoManagerBase
import org.anti_ad.mc.common.moreinfo.SemVer
import org.anti_ad.mc.common.vanilla.Vanilla
import org.anti_ad.mc.common.vanilla.alias.glue.I18n
import org.anti_ad.mc.ipnext.config.ModSettings
import org.anti_ad.mc.ipnext.event.ClientEventHandler.createChatMessage
import java.net.URI
import java.net.URL
import kotlin.concurrent.timer
import kotlin.uuid.ExperimentalUuidApi
import kotlin.uuid.Uuid

object IPNInfoManager: InfoManagerBase() {
    override var mcVersion = "game-version-missing"
    override var version: String
        get() = ModInfo.MOD_VERSION
        set(_) {}
    override var modId = ModInfo.MOD_ID
    override var modName = ModInfo.MOD_NAME
    override var loader: String = "loader-missing"

    override val defaultRequest: Map<String, String> = mapOf("domain" to "ipn-stats.anti-ad.org",
                                                             "name" to "pageview")

    override val target: URL = URI("https://p.anti-ad.org/api/event").toURL()

    override var isEnabled: () -> Boolean


f1e4 <mbs.0>:
	...

0005f264 <mbs.1>:
	...

0005f2e4 <mbs.2>:
	...

0005f364 <mbs.3>:
	...

0005f3e4 <mbs.4>:
	...

0005f464 <mbs.5>:
	...

0005f4e4 <buf.0>:
	...

00060000 <noprint.1>:
	...

00061000 <malloc_readonly>:
	...

00062000 <malloc_func>:
   62000:	00          	halt
   62001:	00          	halt
	...

00062004 <malloc_active>:
   62004:	00          	halt
   62005:	00          	halt
	...

00062008 <rs>:
   62008:	00          	halt
   62009:	00          	halt
	...

0006200c <rsx>:
   6200c:	00          	halt
   6200d:	00          	halt
	...

0006


    assert_eq!(mosh_ohai.protocol, "mosh");
    assert_eq!(mosh_ohai.from, from);
}

#[test]
fn test_host_eligibility() {
    let from = Path::new("/dev/null");
    let conds = Conditions::default();
    assert_eq!(
        Host::named("foo*.oink.example.com", from).ineligible(&conds),
        true
    );
    assert_eq!(Host::named("*", from).ineligible(&conds), true);

    assert_eq!(
        Host::named("foobar.oink.example.com", from).ineligible(&conds),
        false
    );
}

#[test]
fn test_conditions_match() {
    let from = Path::new("/dev/null");
    let host = Host::named("foo.bar.com", from);

    // empty conditions means the host goes in:
    {
        let conds = Conditions::default();
        assert!(conds.eligible(&host));
    }
    // An include for the host means the host goes in:
    {
        let mut conds = Conditions::default();
        conds.add(
            from.to_path_buf(),
            Condition::Include(Regex::new(r"^foo\.").unwrap()),
        );
        assert!(conds.eligible(&host));
    }
    // An exclude for the host means the host is not included:
    {
        let mut conds = Conditions::default();
        conds.add(
            from.to_path_buf(),
            Condition::Exclude(Regex::new(r"^foo\.").unwrap()),
        );
        assert!(!conds.eligible(&host));
    }
    // An exclude for another host means the host is in:
    {
        let mut conds = Conditions::default();
        conds.add(
            from.to_path_buf(),
            Condition::Exclude(Regex::new(r"^baz\.").unwrap()),
        );
        assert!(conds.eligible(&host));
    }
    // An exclude and an include that both don't match mean that the host is not included:
    {
        let mut conds = Conditions::default();
        conds.add(
            from.to_path_buf(),
            Condition::Exclude(Regex::new(r"^baz\.").unwrap()),
        );
        conds.add(
            from.to_path_buf(),
            Condition::Include(Regex::new(r"^qux\.").unwrap()),
        );
        assert!(!conds.eligible(&host));
    }
}
<gh_stars>1-10
// This file is part of linux-support. It is subject to the license terms in the COPYRIGHT file found in the top-level directory of this distribution and at https://raw.githubusercontent.com/lemonrock/linux-support/master/COPYRIGHT. No part of linux-support, including this file, may be copied, modified, propagated, or distributed except according to the terms contained in the COPYRIGHT file.
// Copyright © 2020 The developers of linux-support. See the COPYRIGHT file in the top-level directory of this distribution and at https://raw.githubusercontent.com/lemonrock/linux-support/master/COPYRIGHT.

/// Use it like this:-
/// ```rust
/// use context_coroutine::CoroutineManagerIndex;
/// use linux_support::file_descriptors::socket::c::sockaddr_in;
/// use linux_support::file_descriptors::socket::c::sockaddr_in6;
///
/// struct SomeCoroutineManagerFields
/// {
/// 	accept_ipv4: CoroutineManager<HeapSize, StackSize, GTACSA, AcceptCoroutine<sockaddr_in>, ()>,
/// 	accept_ipv6: CoroutineManager<HeapSize, StackSize, GTACSA, AcceptCoroutine<sockaddr_in6>, ()>,
/// }
///
/// fn choose(coroutine_manager_index: CoroutineManagerIndex, some_coroutine_manager_fields: &mut SomeCoroutineManagerFields,


layCache().DisqualifyNode(ctx, node.ID(), time.Now(), overlay.DisqualificationReasonUnknown)
				require.NoError(t, err)
				continue
			}
			if nodesToKill[node.ID()] {
				require.NoError(t, planet.StopNodeAndUpdate(ctx, node))
			}
		}

		_, err = satellite.RangedLoop.RangedLoop.Service.RunOnce(ctx)
		require.NoError(t, err)
		satellite.Repair.Repairer.Loop.TriggerWait()
		require.NoError(t, satellite.Repair.Repairer.WaitForPendingRepairs(ctx))

		// repaired segment should not contain any piece in the killed and DQ nodes
		segmentAfter := getRemoteSegment(ctx, t, satellite)

		nodesToKillForMinThreshold := len(remotePieces) - minThreshold
		remotePieces = segmentAfter.Pieces
		for _, piece := range remotePieces {
			require.NotContains(t, nodesToKill, piece.StorageNode, "there shouldn't be pieces in killed nodes")
			require.NotContains(t, nodesToDisqualify, piece.StorageNode, "there shouldn't be pieces in DQ nodes")

			// Kill the original nodes which were kept alive to ensure that we can
			// download from the new nodes that the repaired pieces have been uploaded
			if _, ok := nodesToKeepAlive[piece.StorageNode]; ok && nodesToKillForMinThreshold > 0 {
				require.NoError(t, planet.StopNodeAndUpdate(ctx, planet.FindNode(piece.StorageNode)))
				nodesToKillForMinThreshold--
			}
		}

		// complete the pending multipart upload
		_, err = project.CommitUpload(ctx, "testbucket", "test/path", info.UploadID, nil)
		require.NoError(t, err)

		// we should be able to download data without any of the original nodes
		newData, err := uplinkPeer.Download(ctx, satellite, "testbucket", "test/path")
		require.NoError(t, err)
		require.Equal(t, newData, testData)
	})
}

// TestMinRequiredDataRepair does the following:
//   - Uploads test data
//   - Kills all but the minimum number of nodes carrying the uploaded segment
//   - Triggers data repair, which attempts to repair the data from the remaining nodes to
//     the numbers of nodes determined by the upload repair max threshold
//   - Expects that the repair succeed.
//     Reputation info to be updated for all remaining nodes.
func TestMinRequiredDataRepair(t *testing.T) {
	const RepairMaxExcessRateOptimalThreshold = 0.05

	testplanet.Run(t, testplanet.Config{
		SatelliteCount:   1,
		StorageNodeCount: 15,
		UplinkCount:      1,
		Reconfigure: testplanet.Reconfigure{
			Satellite: testplanet.Combine(
				func(log *zap.Logger, index int, config *satellite.Config) {
					config.Repairer.MaxExcessRateOptimalThreshold = RepairMaxExcessRateOptimalThreshold
					config.Repairer.InMemoryRepair = true
					config.Repairer.ReputationUpdateEnabled = true
					config.Reputation.InitialAlpha = 1
					config.Reputation.InitialBeta = 0.01
					config.Reputation.AuditLambda = 0.95
				},
				testplanet.ReconfigureRS(4, 4, 9, 9),
			),
		},
		ExerciseJobq: true,
	}, func(t *testing.T, ctx *testcontext.Context, planet *testplanet.Planet) {
		uplinkPeer := planet.Uplinks[0]
		satellite := planet.Satellites[0]
		// stop audit to prevent possible interactions i.e. repair timeout problems
		satellite.Audit.Worker.Loop.Pause()

		satellite.RangedLoop.RangedLoop.Service.Loop.Stop()
		satellite.Repair.Repairer.Loop.Pause()

		var testData = testrand.Bytes(8 * memory.KiB)
		// first, upload some remote data


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace g3
{
    public static class MeshIterators
    {

        public static IEnumerable<int> FilteredVertices(DMesh3 mesh, Func<DMesh3, int, bool> FilterF )
        {
            int N = mesh.MaxVertexID;
            for ( int i = 0; i < N; ++i ) {
                if ( mesh.IsVertex(i) ) {
                    if (FilterF(mesh, i))
                        yield return i;
                }
            }
        }

        public static IEnumerable<int> FilteredEdges(DMesh3 mesh, Func<DMesh3, int, bool> FilterF )
        {
            int N = mesh.MaxEdgeID;
            for ( int i = 0; i < N; ++i ) {
                if ( mesh.IsEdge(i) ) {
                    if (FilterF(mesh, i))
                        yield return i;
                }
            }
        }

        public static IEnumerable<int> FilteredTriangles(DMesh3 mesh, Func<DMesh3, int, bool> FilterF )
        {
            int N = mesh.MaxTriangleID;
            for ( int i = 0; i < N; ++i ) {
                if ( mesh.IsTriangle(i) ) {
                    if (FilterF(mesh, i))
                        yield return i;
                }
            }
        }

        /// <summary>
        /// Boundary vertices of mesh
        /// </summary>
        public static IEnumerable<int> BoundaryVertices(DMesh3 mesh)
        {
            int N = mesh.MaxVertexID;
            for ( int i = 0; i < N; ++i ) {
                if ( mesh.IsVertex(i) ) {
                    if (mesh.IsBoundaryVertex(i))
                        yield return i;
                }
            }
        }

        /// <summary>
        /// boundary vertices of mesh, but based on edges, so returns each vertex twice!
        /// </summary>
        public static IEnumerable<int> BoundaryEdgeVertices(DMesh3 mesh)
        {
            int N = mesh.MaxEdgeID;
            for (int i = 0; i < N; ++i) {
                if (mesh.IsEdge(i) && mesh.IsBoundaryEdge(i)) {
                    Index2i ev = mesh.GetEdgeV(i);
                    yield return ev.a;
                    yield return ev.b;
                }
            }
        }

        public static IEnumerable<int> Interior


, w1, #0xff
  45a4dc:	7100243f 	cmp	w1, #0x9
  45a4e0:	54000369 	b.ls	45a54c <____strtold_l_internal+0x2f4>  // b.plast
  45a4e4:	b862d8c1 	ldr	w1, [x6, w2, sxtw #2]
  45a4e8:	51018421 	sub	w1, w1, #0x61
  45a4ec:	12001c21 	and	w1, w1, #0xff
  45a4f0:	7100143f 	cmp	w1, #0x5
  45a4f4:	540002c9 	b.ls	45a54c <____strtold_l_internal+0x2f4>  // b.plast
  45a4f8:	aa1503e2 	mov	x2, x21
  45a4fc:	aa0703e1 	mov	x1, x7
  45a500:	aa1703e0 	mov	x0, x23
  45a504:	f9005ba7 	str	x7, [x29, #176]
  45a508:	97feb0b4 	bl	4067d8 <__correctly_grouped_prefixmb>
  45a50c:	b40000bb 	cbz	x27, 45a520 <____strtold_l_internal+0x2c8>
  45a510:	eb17001f 	cmp	x0, x23
  45a514:	f9405ba7 	ldr	x7, [x29, #176]
  45a518:	54005380 	b.eq	45af88 <____strtold_l_internal+0xd30>  // b.none
  45a51c:	f9000360 	str	x0, [x27]
  45a520:	b940bba0 	ldr	w0, [x29, #184]
  45a524:	34002a20 	cbz	w0, 45aa68 <____strtold_l_internal+0x810>
  45a528:	d0000100 	adrp	x0, 47c000 <__PRETTY_FUNCTION__.12139+0x110>
  45a52c:	d2800003 	mov	x3, #0x0                   	// #0
  45a530:	f94017b6 	ldr	x22, [x29, #40]
  45a534:	f943ac02 	ldr	x2, [x0, #1880]
  45a538:	f9402fbc 	ldr	x28, [x29, #88]
  45a53c:	17ffff91 	b	45a380 <____strtold_l_internal+0x128>
  45a540:	7101c15f 	cmp	w10, #0x70
  45a544:	fa5700e4 	ccmp	x7, x23, #0x4, eq  // eq = none
  45a548:	54fffd80 	b.eq	45a4f8 <____strtold_l_internal+0x2a0>  // b.none
  45a54c:	aa0703f4 	mov	x20, x7
  45a550:	d2800004 	mov	x4, #0x0                   	// #0
  45a554:	12001c00 	and	w0, w0, #0xff
  45a558:	7100241f 	cmp	w0, #0x9
  45a55c:	54000b89 	b.ls	45a6cc <____strtold_l_internal+0x474>  // b.plast
  45a560:	7100439f 	cmp	w28,


 == 1 && clobber(x)) {
			break
		}
		v.reset(OpS390XMOVHBRstoreidx)
		v.AuxInt = i - 1
		v.Aux = s
		v.AddArg(p)
		v.AddArg(idx)
		v.AddArg(w0)
		v.AddArg(mem)
		return true
	}
	// match: (MOVBstoreidx [i] {s} idx p (SRWconst [j] w) x:(MOVBstoreidx [i-1] {s} idx p w0:(SRWconst [j-8] w) mem))
	// cond: x.Uses == 1 && clobber(x)
	// result: (MOVHBRstoreidx [i-1] {s} p idx w0 mem)
	for {
		i := v.AuxInt
		s := v.Aux
		_ = v.Args[3]
		idx := v.Args[0]
		p := v.Args[1]
		v_2 := v.Args[2]
		if v_2.Op != OpS390XSRWconst {
			break
		}
		j := v_2.AuxInt
		w := v_2.Args[0]
		x := v.Args[3]
		if x.Op != OpS390XMOVBstoreidx {
			break
		}
		if x.AuxInt != i-1 {
			break
		}
		if x.Aux != s {
			break
		}
		_ = x.Args[3]
		if idx != x.Args[0] {
			break
		}
		if p != x.Args[1] {
			break
		}
		w0 := x.Args[2]
		if w0.Op != OpS390XSRWconst {
			break
		}
		if w0.AuxInt != j-8 {
			break
		}
		if w != w0.Args[0] {
			break
		}
		mem := x.Args[3]
		if !(x.Uses == 1 && clobber(x)) {
			break
		}
		v.reset(OpS390XMOVHBRstoreidx)
		v.AuxInt = i - 1
		v.Aux = s
		v.AddArg(p)
		v.AddArg(idx)
		v.AddArg(w0)
		v.AddArg(mem)
		return true
	}
	return false
}
func rewriteValueS390X_OpS390XMOVDEQ_0(v *Value) bool {
	// match: (MOVDEQ x y (InvertFlags cmp))
	// cond:
	// result: (MOVDEQ x y cmp)
	for {
		_ = v.Args[2]
		x := v.Args[0]
		y := v.Args[1]
		v_2 := v.Args[2]
		if v_2.Op != OpS390XInvertFlags {
			break
		}
		cmp := v_2.Args[0]
		v.reset(OpS390XMOVDEQ)
		v.AddArg(x)
		v.AddArg(y)
		v.AddArg(cmp)
		return true
	}
	// match: (MOVDEQ _ x (FlagEQ))
	// cond:
	// result: x
	for {
		_ = v.Args[2]
		x := v.Args[1]
		v_2 := v.Args[2]
		if v_2.Op != OpS390XFlagEQ {
			break
		}
		v.reset(OpCopy)
		v.Type = x.Type
		v.AddArg(x)
		return true
	}
	// match: (MOVDEQ y _ (FlagLT))
	// cond:
	// result: y
	for {
		_ = v.Args[2]
		y := v.Args[0]
		v_2 := v.Args[2]
		if v_2.Op != OpS390XFlagLT {
			break
		}
		v.reset(OpCop


mplete1();
    }
    EffectUtils.flyObj = flyObj;
    /**
    * 显示对象摇头特效
    * obj           对象
    * time          浮动时间 毫秒
    * space         摇头幅度
    * todo          多个对象摇头
    * 注意：需要将对象的注册点位置：0.5,1
    */
    function rockObj(obj, time, space) {
        if (space === void 0) { space = 20; }
        var onComplete1 = function () {
            if (obj != null) {
                var onComplete2 = function () {
                    egret.Tween.get(obj).to({ rotation: -space }, time).call(onComplete1, this);
                };
                egret.Tween.get(obj).to({ rotation: space }, time).call(onComplete2, this);
            }
        };
        onComplete1();
    }
    EffectUtils.rockObj = rockObj;
    /**
    * 文字打字机效果
    * obj           文本对象
    * content       文字
    * interval      打字间隔 毫秒
    */
    function typerEffect(obj, content, interval) {
        if (content === void 0) { content = ""; }
        if (interval === void 0) { interval = 200; }
        var strArr = content.split("");
        var len = strArr.length;
        for (var i = 0; i < len; i++) {
            egret.setTimeout(function () {
                obj.appendText(strArr[Number(this)]);
            }, i, interval * i);
        }
    }
    EffectUtils.typerEffect = typerEffect;
})(EffectUtils || (EffectUtils = {}));
//# sourceMappingURL=EffectUtils.js.map/**
  * 切换按钮
  * by dily
  * (c) copyright 2014 - 2035
  * All Rights Reserved.
  * 可以有图片，文字，动画
  */
var ETabBar = (function (_super) {
    __extends(ETabBar, _super);
    /**
    * imgNormalName       图片
    * imgSelectName       图片
    * backFun       点击方法 如果需要在backFun中使用this的，小心使用这个
    * descStrArr    按钮描述数组
    * fontSize      字体大小
    * cartoonType   动画类型 1:【可爱】按下变小，放开弹大 2:按下变小，放开轻微弹大 3：按下变小，放开变大
    * 注意：如果有动画的话，只有动画结束才会触发click事件
    */
    function ETabBar(context, imgNormalName, imgSelectName, backFun, descStrArr, fontSize, cartoonType, assetsName) {
        if (backFun === void 0) { backFun = null; }
        if (descStrArr === void 0) { descStrArr = []; }
        if (fontSize === void 0) { fontSize = 30; }
        if (cartoonType === void 0) { cartoonType = 1; }
        if (assetsName === void 0) { assetsName = "assets"; }
        _super.call(this);
        // private textField:egret.TextField;
        this.assets = RES.getRes("assets"); //名称不一样的话需要修改
        this.btnArr = [];
        this.descStrArr = [];
        this.isPlayCartoon = false;
        this.cartoonType = 1;
        this.isSelectIndex = 0;
        this.imgNormalName = "";
        this.imgSelectName = "";
        this.param = { context: null, data: null }; //回调参数
        this.param.context = context;
        this.imgNormalName = imgNormalName;
        this.imgSelectName = imgSelectName;
        this.descStrArr = descStrArr;
        this.init(context, backFun, desc


/*-------------------------------------------------------------------------------------
 *
 * Copyright (c) Microsoft Corporation
 * Licensed under the MIT license
 *
 *-------------------------------------------------------------------------------------*/

/* this ALWAYS GENERATED file contains the definitions for the interfaces */

/* File created by MIDL compiler version 8.01.0627 */

/* verify that the <rpcndr.h> version is high enough to compile this file*/
#ifndef __REQUIRED_RPCNDR_H_VERSION__
#define __REQUIRED_RPCNDR_H_VERSION__ 500
#endif

/* verify that the <rpcsal.h> version is high enough to compile this file*/
#ifndef __REQUIRED_RPCSAL_H_VERSION__
#define __REQUIRED_RPCSAL_H_VERSION__ 100
#endif

#include "rpc.h"
#include "rpcndr.h"

#ifndef __RPCNDR_H_VERSION__
#error this stub requires an updated version of <rpcndr.h>
#endif /* __RPCNDR_H_VERSION__ */

#ifndef COM_NO_WINDOWS_H
#include "windows.h"
#include "ole2.h"
#endif /*COM_NO_WINDOWS_H*/

#ifndef __unknwnbase_h__
#define __unknwnbase_h__

#if defined(_MSC_VER) && (_MSC_VER >= 1020)
#pragma once
#endif

/* Forward Declarations */

#ifndef __IUnknown_FWD_DEFINED__
#define __IUnknown_FWD_DEFINED__
typedef interface IUnknown IUnknown;

#endif 	/* __IUnknown_FWD_DEFINED__ */

#ifndef __IUnknown_INTERFACE_DEFINED__
#define __IUnknown_INTERFACE_DEFINED__

/* interface IUnknown */
/* [unique][uuid][object][local] */

typedef /* [unique] */ IUnknown *LPUNKNOWN;

EXTERN_C const IID IID_IUnknown;

#if defined(__cplusplus) && !defined(CINTERFACE)
extern "C++"
{
    MIDL_INTERFACE("00000000-0000-0000-c000-000000000046")
    IUnknown
    {
        BEGIN_INTERFACE

        virtual HRESULT STDMETHODCALLTYPE QueryInterface(
            REFIID riid,
            void **ppvObject) = 0;

        virtual ULONG STDMETHODCALLTYPE AddRef() = 0;

        virtual ULONG STDMETHODCALLTYPE Release() = 0;

        template <class Q>
        HRESULT
            STDMETHODCALLTYPE
            QueryInterface(_COM_Outptr_ Q * *pp)
        {
            return QueryInterface(__uuidof(Q), (void **)pp);
        }
        END_INTERFACE
    };
}
#ifdef __CRT_UUID_DECL
__CRT_UUID_DECL(IUnknown, 0x00000000, 0x0000, 0x0000, 0xc0,0x00, 0x00,0x00,0x00,0x00,0x00,0x46)
#endif
#else
typedef struct IUnknownVtbl {
    BEGIN_INTERFACE

    /*** IUnknown methods ***/
    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
        IUnknown *This,
        REFIID riid,
        void **ppvObject);

    ULONG (STDMETHODCALLTYPE *AddRef)(
        IUnknown *This);

    ULONG (STDMETHODCALLTYPE *Release)(
        IUnknown *This);

    END_INTERFACE
} IUnknownVtbl;

interface IUnknown {
    CONST_VTBL IUnknownVtbl* lpVtbl;
};

#ifdef COBJMACROS
/*** IUnknown methods ***/
#define IUnknown_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define IUnknown_AddRef(This) (This)->lpVtbl->AddRef(This)
#define IUnknown_Release(This) (This)->lpVtbl->Release(This)
#endif

#endif

#endif /* __IUnknown_INTERFACE_DEFINED__ */

DEFINE_GUID(IID_IUnknown, 0x00000000, 0x0000, 0x0000, 0xc0,0x00, 0x00,0x00,0x00,0x00,0x00,0x46);

#endif /* __unknwnbase_h__ */


ror as e:
            self._log(f"無法讀取任務目錄: {e}")

        return None, None

# gRPC 服務實現
class WorkerNodeServicer(nodepool_pb2_grpc.WorkerNodeServiceServicer):
    def __init__(self, worker_node):
        self.worker_node = worker_node

    def ExecuteTask(self, request, context):
        """執行任務 RPC"""
        task_id = request.task_id
        task_zip = request.task_zip

        # 獲取任務所需資源
        required_resources = {
            "cpu": request.cpu,
            "memory_gb": request.memory_gb,
            "gpu": request.gpu,
            "gpu_memory_gb": request.gpu_memory_gb
        }

        file_size_mb = len(task_zip) / (1024 * 1024)
        info(f"===== 收到執行任務請求 =====")
        info(f"任務ID: {task_id}")
        info(f"檔案大小: {file_size_mb:.1f}MB")
        info(f"請求資源: CPU={required_resources['cpu']}, RAM={required_resources['memory_gb']}GB, GPU={required_resources['gpu']}, GPU_MEM={required_resources['gpu_memory_gb']}GB")
        info(f"當前節點狀態: {self.worker_node.status}")

        # 檢查是否有足夠資源
        if not self.worker_node._check_resources_available(required_resources):
            error_msg = f"資源不足，拒絕任務 {task_id}"
            warning(error_msg)
            return nodepool_pb2.ExecuteTaskResponse(
                success=False,
                message=error_msg
            )

        # 檢查Docker要求
        if not self.worker_node.docker_available and self.worker_node.trust_score <= 50:
            error_msg = f"無Docker環境且信任分數低，拒絕任務 {task_id}"
            warning(error_msg)
            return nodepool_pb2.ExecuteTaskResponse(
                success=False,
                message="Docker unavailable and trust score too low"
            )

        # 檢查任務數據完整性和大小
        if not task_zip:
            error_msg = f"任務 {task_id} 數據為空"
            error(error_msg)
            return nodepool_pb2.ExecuteTaskResponse(
                success=False,
                message="Task data is empty"
            )

        # 檢查檔案大小限制（100MB）
        if file_size_mb > 100:
            error_msg = f"任務 {task_id} 檔案太大: {file_size_mb:.1f}MB，超過100MB限制"
            error(error_msg)
            return nodepool_pb2.ExecuteTaskResponse(
                success=False,
                message=f"Task file too large: {file_size_mb:.1f}MB (limit: 100MB)"
            )

        try:
            # 驗證ZIP檔案
            try:
                with ZipFile(BytesIO(task_zip), 'r') as zip_ref:
                    zip_ref.testzip()
                info(f"任務 {task_id} ZIP 檔案驗證成功")
            except Exception as zip_error:
                error_msg = f"任務 {task_id} ZIP 檔案損壞: {zip_error}"
                error(error_msg)
                return nodepool_pb2.ExecuteTaskResponse(
                    success=False,
                    message=f"Invalid ZIP file: {str(zip_error)}"
                )

            # 分配資源
            if not self.worker_node._allocate_resources(task_id, required_resources):
                error_msg = f"資源分配失敗，拒絕任務 {task_id}"
                warning(error_msg)
                return nodepool_pb2.ExecuteTaskResponse(
                    success=False,
                    message="Failed to allocate resources"
                )

            # 啟動執行線程
            execution_thread = Thread(
                target=self.worker_node._execute_task,
                args=(task_id, task_zip, required_resources),
                daemon=True,
                name=f"TaskExecution-{task_id}"
            )
            execution_thread.start()

            success_msg = f"任務 {task_id} 已接受並開始準備執行 (檔案大小: {file_size_mb:.1f}MB)"
            info(success_msg)

            return nodepool_pb2.ExecuteTaskResponse(
                success=True,
                message=success_msg
            )

        except Exception as e:
            # 如果出錯，釋放資源
            self.worker_node._release_resources(task_id)
            error_msg = f"接受任務 {task_id} 時發生錯誤: {e}"
            error(error_msg)
            return nodepool_pb2.ExecuteTaskResponse(
                success=False,
                message=f"Failed to accept task: {str(e)}"
            )

    def ReportOutput(self, request, context):
        """報告任務輸出"""
        node_id = request.node_id
        task_id = request.task_id
        output = request.output

        if node_id != self.worker_node.node_id:
            return nodepool_pb2.StatusResponse(
                succ


     64, 0xA16231A7, "fasthash64",  "fast-hash 64bit" },
#if defined(__GNUC__) && UINT_MAX != ULONG_MAX
 #define MUM_SEED             0x3EEAE2D4
#else
 #define MUM_SEED             0xA973C6C0
#endif
  { mum_hash_test,        64, MUM_SEED,   "MUM",         "github.com/vnmakarov/mum-hash" },
  { CityHash32_test,      32, 0x5C28AD62, "City32",      "Google CityHash32WithSeed (old)" },
  { CityHash64_test,      64, 0x25A20825, "City64",      "Google CityHash64WithSeed (old)" },
#if defined(__SSE4_2__) && defined(__x86_64__)
  { CityHash128_test,    128, 0x6531F54E, "City128",     "Google CityHash128WithSeed (old)" },
  { CityHashCrc128_test, 128, 0xD4389C97, "CityCrc128",  "Google CityHashCrc128WithSeed SSE4.2 (old)" },
#endif
# ifdef _MSC_VER /* truncated long to 32 */
#  define FARM64_SEED         0xEBC4A679
#  define FARM128_SEED        0x305C0D9A
# else
#  define FARM64_SEED         0x35F84A93
#  define FARM128_SEED        0x9E636AAE
# endif
  { FarmHash64_test,      64, FARM64_SEED, "FarmHash64",  "Google FarmHash64WithSeed" },
  { FarmHash128_test,    128, FARM128_SEED,"FarmHash128", "Google FarmHash128WithSeed" },
#if defined(__SSE4_2__) && defined(__x86_64__)
  { farmhash64_c_test,    64, FARM64_SEED, "farmhash64_c",  "farmhash64_with_seed (C99)" },
  { farmhash128_c_test,  128, FARM128_SEED,"farmhash128_c", "farmhash128_with_seed (C99)" },
#endif
  { xxHash32_test,        32, 0xBA88B743, "xxHash32",    "xxHash, 32-bit for x64" },
  { xxHash64_test,        64, 0x024B7CF4, "xxHash64",    "xxHash, 64-bit" },
#if 0
  { xxhash256_test,       64, 0x024B7CF4, "xxhash256",   "xxhash256, 64-bit unportable" },
#endif
  { SpookyHash32_test,    32, 0x3F798BBB, "Spooky32",    "Bob Jenkins' SpookyHash, 32-bit result" },
  { SpookyHash64_test,    64, 0xA7F955F1, "Spooky64",    "Bob Jenkins' SpookyHash, 64-bit result" },
  { SpookyHash128_test,  128, 0x8D263080, "Spooky128",   "Bob Jenkins' SpookyHash, 128-bit result" },
  { metrohash64_1_test,       64, 0xEE88F7D2, "metrohash64_1",     "MetroHash64_1 for 64-bit" },
  { metrohash64_2_test,       64, 0xE1FC7C6E, "metrohash64_2",     "MetroHash64_2 for 64-bit" },
  { metrohash128_1_test,     128, 0x20E8A1D7, "metrohash128_1",    "MetroHash128_1 for 64-bit" },
  { metrohash128_2_test,     128, 0x5437C684, "metrohash128_2",    "MetroHash128_


/*
	mini - a Free Software replacement for the Nintendo/BroadOn IOS.

	ELF loader: random utilities

Copyright (C) 2008, 2009	Hector Martin "marcan" <marcan@marcansoft.com>

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, version 2.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

*/
#include "types.h"
#include "utils.h"
#include "hollywood.h"
#include "start.h"

void udelay(u32 d)
{
	// should be good to max .2% error
	u32 ticks = d * 19 / 10;

	write32(HW_TIMER, 0);
	while(read32(HW_TIMER) < ticks);
}

void panic(u8 v)
{
	while(1) {
		debug_output(v);
		udelay(500000);
		debug_output(0);
		udelay(500000);
	}
}


vate final boolean directory;

    public FileJarEntry(
        final String entryName, final Path file, final long fileSize, final boolean directory) {
      super(new CustomZipEntry(directory ? entryName + '/' : entryName), null);
      this.file = file;
      this.fileSize = fileSize;
      this.directory = directory;
    }

    public long getFileSize() {
      return fileSize;
    }

    public boolean isDirectory() {
      return directory;
    }

    String getName() {
      return getEntry().getName();
    }

    @Override
    public ThrowingSupplier<InputStream, IOException> getInputStreamSupplier() {
      if (file == null || directory) {
        return () -> null;
      }
      return () -> Files.newInputStream(file);
    }

    @Override
    public boolean equals(Object o) {
      if (this == o) {
        return true;
      }
      if (o == null || getClass() != o.getClass()) {
        return false;
      }
      final FileJarEntry that = (FileJarEntry) o;
      return Objects.equals(getName(), that.getName());
    }

    @Override
    public int hashCode() {
      return Objects.hash(getName());
    }

    @Override
    public String toString() {
      return getName();
    }
  }
}
/*
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is dual-licensed under either the MIT license found in the
 * LICENSE-MIT file in the root directory of this source tree or the Apache
 * License, Version 2.0 found in the LICENSE-APACHE file in the root directory
 * of this source tree. You may select, at your option, one of the
 * above-listed licenses.
 */

package com.facebook.buck.util.zip;

import java.util.Calendar;
import java.util.zip.ZipEntry;

public class ZipConstants {

  static final long END_MAXLEN = 0xFFFF + ZipEntry.ENDHDR; // header max size ~64k

  static final long ZIP64_ENDSIG = 0x06064b50L;
  static final long ZIP64_LOCSIG = 0x07064b50L;
  static final int ZIP64_LOCOFF = 8; // zip64 end offset
  static final int ZIP64_LOCHDR = 20;
  static final int ZIP64_ENDTOT = 32; // total number of entries
  static final int ZIP64_ENDSIZ = 40; // central directory size in bytes
  static final int ZIP64_ENDOFF = 48; // offset of first CEN header
  static final int ZIP64_ENDHDR = 56;
  static final int ZIP64_EXTID = 0x0001;

  static final int ZIP64_MAGICCOUNT = 0xFFFF;
  static final long ZIP64_MAGICVAL = 0xFFFFFFFFL;

  // The fake time we use: 12:00:00 AM February 1, 1985
  public static final int DOS_FAKE_TIME = 172032000;

  private ZipConstants() {}

  /**
   * {@link java.util.zip.ZipEntry#setTime(long)} is timezone-sensitive. Use this value instead of a
   * hardcoded constant to produce timzeone-agnostic .zip files.
   *
   * @return time in milliseconds that represents a fixed date in the current timezone.
   */
  public static long getFakeTime() {
    // Using any timestamp before 1980 (which is supposedly the earliest time supported by the .zip
    // format) causes files created by JRE 1.7 to be different than JRE 1.8. This is because 1.8
    // actually supports setting timestamps to earlier than 1980, whereas 1.7 rounds up to 1980.
    // We also need to resort to the deprecated date constructor as the ZipEntry uses deprecated
    // Date methods that depend on the current timezone.
    // Finally 1980.01.01 doesn't work across all timezones across Java 1.7 and 1.8. Fun times.
    Calendar c = Calendar.getInstance();
    c.set(1985, Calendar.FEBRUARY, 1, 0, 0, 0);
    return c.getTimeInMillis();
  }
}
/*
 * Copyright (c) Meta Platforms,


### 3.3.2.2 特征实现

特征实现是为特定类型提供特征所需方法和关联项的具体定义。

**形式化定义**：

类型 $T$ 对特征 $\text{Tr}$ 的实现 $\text{Impl}(T, \text{Tr})$ 是一个映射，将 $\text{Tr}$ 中的每个方法签名和关联项映射到具体实现。

**Rust示例**：

```rust
impl Display for String {
    fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error> {
        write!(f, "{}", self)
    }

    const MAX_LEN: usize = 2048;  // 覆盖默认值

    type Output = String;  // 定义关联类型
}
```

### 3.3.2.3 特征约束

特征约束限制了泛型参数必须实现特定的特征。

**形式化定义**：

泛型函数 $f<T: \text{Tr}_1 + \text{Tr}_2 + \ldots + \text{Tr}_n>$ 表示类型参数 $T$ 必须实现所有列出的特征。

**Rust示例**：

```rust
fn print<T: Display>(value: T) {
    println!("{}", value);
}

fn process<T>(value: T)
where
    T: Clone + Debug,
{
    let copy = value.clone();
    println!("{:?}", copy);
}
```

## 3.3.3 特征系统的形式化表示

### 3.3.3.1 特征作为类型类

从类型论的角度看，Rust的特征类似于Haskell的类型类（type classes），是一种受限的参数多态性形式。

**形式化表示**：

特征 $\text{Tr}$ 可以看作是满足某些属性的类型集合：
$$\text{Tr} = \{T \mid T \text{ 实现了特征 Tr 的所有要求}\}$$

### 3.3.3.2 特征约束的类型规则

**特征约束的函数类型规则**：

$$\frac{\Gamma \vdash e : T \quad T : \text{Tr}}{\Gamma \vdash e.\text{method}() : U}$$

这个规则表示，如果表达式 $e$ 的类型 $T$ 实现了特征 $\text{Tr}$，且 $\text{method}$ 是 $\text{Tr}$ 中定义的方法，返回类型为 $U$，则 $e.\text{method}()$ 的类型为 $U$。

**泛型函数的类型规则**：

$$\frac{\Gamma \vdash e : T \quad T : \text{Tr} \quad \Gamma, X : \text{Tr} \vdash \text{body} : U}{\Gamma \vdash \text{fn f<X: Tr>(x: X) \{ body \}}(e) : U}$$

这个规则表示，如果表达式 $e$ 的类型 $T$ 实现了特征 $\text{Tr}$，且在假设类型参数 $X$ 实现了 $\text{Tr}$ 的环境中函数体 $\text{body}$ 的类型为 $U$，则将 $e$ 传递给泛型函数 $f$ 的结果类型为 $U$。

### 3.3.3.3 关联类型的形式化

关联类型可以看作是特征中的类型级函数。

**形式化表示**：

如果特征 $\


, int bp2, int bLen) {
		if(b-m <= bLen) {
			this.inPlaceMergeBW(array, a, m, b, false);
			return;
		}

		int a1 = a+lenA, b1 = b-lenB;

		int i = a1+bLen-1, j = m+bLen-1, ti = tIdx, tj = tIdx+tl, tp = t;

		while(ti < tIdx+tl && tj < tIdx+tLen) {
			if(Reads.compareValues(array[i], array[j]) <= 0) {
				Writes.swap(array, ti++, tp++, 1, true, false);
				i += bLen;
			}
			else {
				Writes.swap(array, tj++, tp++, 1, true, false);
				Writes.swap(array, bp1, bp2, 1, true, false);
				j += bLen;
			}
			bp1++; bp2++;
		}
		while(ti < tIdx+tl) {
			Writes.swap(array, ti++, tp++, 1, true, false);
			bp1++; bp2++;
		}
		while(tj < tIdx+tLen) {
			Writes.swap(array, tj++, tp++, 1, true, false);
			Writes.swap(array, bp1++, bp2++, 1, true, false);
		}
		t ^= tIdx; tIdx ^= t; t ^= tIdx;

		MaxHeapSort sortHeap = new MaxHeapSort(this.arrayVisualizer);
		sortHeap.customHeapSort(array, tIdx, tIdx+tLen, 1);

		this.blockCycleEasy(array, a1, t, tIdx, tLen, bLen);
		this.multiSwap(array, t, tIdx, tLen);

		bp1 -= tLen; bp2 -= tLen;

		int f = a1, a2 = f, bp3 = bp2+tLen;

		boolean rev = Reads.compareIndices(array, bp1, bp2, 1, true) > 0;

		while(true) {
			do {
				if(rev) Writes.swap(array, bp1, bp2, 1, true, false);

				bp1++; bp2++;
				a2 += bLen;
			}
			while(bp2 < bp3 && Reads.compareIndices(array, bp1, bp2, 1, true) == (rev ? 1 : -1));

			if(bp2 == bp3) {
				if(!rev) this.inPlaceMergeBW(array, a1, b1, b, false);
				this.inPlaceMerge(array, a, a1, b);

				return;
			}
			f = this.inPlaceMergeBW(array, f, a2, a2+bLen, rev);
			rev = !rev;
		}
	}

    @Override
    public void runSort(int[] array, int currentLength, int bucketCount) {
		int a = 0, b = currentLength, n = b-a;

		if(n < 128) {
			if(n < 32) this.binaryInsertion(array, a, b);

			else {
				FifthMergeSort smallSort = new FifthMergeSort(this.arrayVisualizer);
				smallSort.fifthMergeSort(array, n);
			}

			return;
		}

		int cbrt = 2*ceilCbrt(n/4), bLen = 2*cbrt;
		int kLen = this.calcKeys(bLen, n);

		int[] tmp = Writes.createExternalArray(bLen);

		int keys = this.findKeys(array, tmp, a, b, 2*kLen, cbrt);

		if(keys < 8) { //need at least 8 keys to perform a block me


from time import sleep as wait
from os import system as cmd
from kerdesek import *
import webbrowser
url = "https://www.google.com"
fix_penz = 0
penz = 0

telfon = True
Kozonseg = False

def k0(kerdes):
    global penz, fix_penz
    q0(kerdes[0])
    startq = input("             ")
    if startq == kerdes[1]:
        penz = kerdes[2]
    elif startq == "s":
        print(f"Kiszálltál! A nyereményed: {penz}Ft")
        re = input(f"Szeretnéd újrakezdeni? igen(a) || nem(b):  ")
        if re == "a":
            return "main"
        else:
            return "exit"
    else:
        print(f"Nem jó válasz! Elbukott Nyeremény: {penz}Ft")
        return "exit"

def main():
    while True:
        cmd("clear")
        try:
            start()
            startq = input("             ")
            if startq == "a":
                for kerdes in fkerdesek():
                    ret=k0(kerdes)
                    if ret == "main":
                        break
                    elif ret == "exit":
                        exit()
            else:
                exit()
            # Ha ide elért mindre válaszolt
            print(f"{bcolors.OKGREEN}Gratulálok!{bcolors.ENDC}\nSikeresen végigvitted. Nyereményed: 40.000.000Ft.")
            uj = input("Szeretnéd újrakezdeni? igen(a) || nem(b):  ")
            if uj == "a":
                return "main"
            else:
                exit()
        except ValueError:
            pass

if __name__ == "__main__":
    main()


系人
     * @param user
     */
    synchronized public void saveContact(EaseUser user){
        SQLiteDatabase db = dbHelper.getWritableDatabase();
        ContentValues values = new ContentValues();
        values.put(UserDao.COLUMN_NAME_ID, user.getUsername());
        if(user.getNick() != null)
            values.put(UserDao.COLUMN_NAME_NICK, user.getNick());
        if(user.getAvatar() != null)
            values.put(UserDao.COLUMN_NAME_AVATAR, user.getAvatar());
        if(db.isOpen()){
            db.replace(UserDao.TABLE_NAME, null, values);
        }
    }

    public void setDisabledGroups(List<String> groups){
        setList(UserDao.COLUMN_NAME_DISABLED_GROUPS, groups);
    }

    public List<String>  getDisabledGroups(){
        return getList(UserDao.COLUMN_NAME_DISABLED_GROUPS);
    }

    public void setDisabledIds(List<String> ids){
        setList(UserDao.COLUMN_NAME_DISABLED_IDS, ids);
    }

    public List<String> getDisabledIds(){
        return getList(UserDao.COLUMN_NAME_DISABLED_IDS);
    }

    synchronized private void setList(String column, List<String> strList){
        StringBuilder strBuilder = new StringBuilder();

        for(String hxid:strList){
            strBuilder.append(hxid).append("$");
        }

        SQLiteDatabase db = dbHelper.getWritableDatabase();
        if (db.isOpen()) {
            ContentValues values = new ContentValues();
            values.put(column, strBuilder.toString());

            db.update(UserDao.PREF_TABLE_NAME, values, null,null);
        }
    }

    synchronized private List<String> getList(String column){
        SQLiteDatabase db = dbHelper.getReadableDatabase();
        Cursor cursor = db.rawQuery("select " + column + " from " + UserDao.PREF_TABLE_NAME,null);
        if (!cursor.moveToFirst()) {
            cursor.close();
            return null;
        }

        String strVal = cursor.getString(0);
        if (strVal == null || strVal.equals("")) {
            return null;
        }

        cursor.close();

        String[] array = strVal.split("$");

        if(array != null && array.length > 0){
            List<String> list = new ArrayList<String>();
            for(String str:array){
                list.add(str);
            }

            return list;
        }

        return null;
    }

    /**
     * 保存message
     * @param message
     * @return  返回这条messaged在db中的id
     */
    public synchronized Integer saveMessage(InviteMessage message){
        SQLiteDatabase db = dbHelper.getWritableDatabase();
        int id = -1;
        if(db.isOpen()){
            ContentValues values = new ContentValues();
            values.put(InviteMessgeDao.COLUMN_NAME_FROM, message.getFrom());
            values.put(InviteMessgeDao.COLUMN_NAME_GROUP_ID, message.getGroupId());
            values.put(InviteMessgeDao.COLUMN_NAME_GROUP_Name, message.getGroupName());
            values.put(InviteMessgeDao.COLUMN_NAME_REASON, message.getReason());
            values.put(InviteMessgeDao.COLUMN_NAME_TIME, message.getTime());
            values.put(InviteMessgeDao.COLUMN_NAME_STATUS, message.getStatus().ordinal());
            values.put(InviteMessgeDao.COLUMN_NAME_GROUPINVITER, message.getGroupInviter());
            db.insert(InviteMessgeDao.TABLE_NAME, null, va


 - b) >> 31`为0，否则为-1。

### 12. 判断符号是否相同

```c++
/* 若 x，y 都为 0，输出真；若只有一个为 0，不会报错但运行结果是错的，因为 0 没有正负之分 */
bool is_same_sign(int x, int y)
{
    return (x ^ y) >= 0;
}
```

### 13. 判断一个数是不是2的幂

```c++
bool is_power_of_two(int n)
{
	return (n > 0) ? (n & (n - 1)) == 0 : false;
}
```

如果是2的幂，`n - 1`就是把n的二进制的最低的那个1取反为0，并把后面的0全部取反为1。

### 14. 取余2的幂次方

```c++
/* 其中 m 为 2 的幂次方，并对 m 取余 */
int mod(int n, int m)
{
    return n & (m - 1);
}
```

## 参考文献

- [Matrix67](http://www.matrix67.com/blog/archives/264).
- [Bit Twiddling Hacks](http://graphics.stanford.edu/~seander/bithacks.html).>系列文章目录
>
>[B-树（1）：定义及其代码实现](https://61mon.com/index.php/archives/224/)
>B-树（2）：应用及其拓展

## 一：应用领域

B-树与其它二叉树最大的不同，就是其可以拥有多余2个的子结点。这也正是B-树被应用于文件系统和数据库底层实现的重要原因。

我们再回顾下B-树的性质：

<!--more-->

1. 所有的叶子结点在同一层；
2. 每棵 B - 树有一个 Minimum Degree，称其为 t；
3. 除了根结点，其余每个结点至少包含 t-1 个 keys，根结点可以只包含 1 个 key；
4. 每个结点（包括根结点）最多包含 2t-1 个 keys；
5. 一个结点的孩子指针数等于这个结点的 keys 数 + 1；
6. 每个结点的 keys 都按升序排列；
7. 对于每个 key，其左边孩子结点的所有 keys 都小于它，右边孩子结点的所有 keys 都大于它。

对于一棵结点数为$n$的B-树，每一个结点的孩子指针数范围为$[t-1, 2t-1]$，所以树的高度在$[log_{t-1}n, log_{2t-1}n]$。那么当$n=10,000,000,000，t=512$时，只需要小于$4$次即可定位到该结点，然后再采用二分查找即可找到要找的值。

![](https://61mon.com/images/illustrations/b_tree/12.png)

我们计算机的主存基本都是随机访问存储器(Random-Access Memory，简称RAM)，它分为两类：静态随机访问存储器（SRAM）和动态随机访问存储器（DRAM）。SRAM比DRAM快，但是也


MakeErr(c, "source argument is not directory in /test. scenario name must match directory name")
				}
				mutableContext.str["testScenarioName"] = scenarioName

				// get list of roles
				roleList, err := holo.GetTestScenarioRoles(h, scenarioName)
				if err != nil {
					return cmd.MakeErrFromErr(c, err)
				}
				mutableContext.obj["testScenarioRoleList"] = &roleList

				// run a bunch of hcdev test processes. Separate temp folder by username in case
				// multiple users on the same machine are running tests
				rootExecDir, err := cmd.MakeTmpDir(scenarioTmpDir)
				if err != nil {
					return cmd.MakeErrFromErr(c, err)
				}
				secondsFromNowPlusDelay := cmd.GetUnixTimestamp_secondsFromNow(scenarioStartDelay)

				scenarioPath := filepath.Join(h.TestPath(), scenarioName)

				scenarioConfig, err = holo.LoadTestConfig(scenarioPath)
				if err != nil {
					return cmd.MakeErrFromErr(c, err)
				}

				if outputDir != "" {
					err = os.MkdirAll(outputDir, os.ModePerm)
					if err != nil {
						return cmd.MakeErrFromErr(c, err)
					}
				}

				for roleIndex, roleName := range roleList {
					holo.Debugf("scenario: forRole(%v): start\n\n", roleName)

					// HOLOCHAINCONFIG_DHTPORT       = FindSomeAvailablePort
					// HOLOCHAINCONFIG_ENABLEMDNS = "true" or HOLOCHAINCONFIG_BOOTSTRAP = "ip[localhost]:port[3142]
					// HCLOG_PREFIX  = role

					clones := 1

					for _, clone := range scenarioConfig.Clone {
						if clone.Role == roleName {
							clones = clone.Number
							break
						}
					}

					// if the bootstrapServer flag isn't set we assume this is a local scenario
					// test so we set the flag "_" the use no bootstrap
					if bootstrapServer == "" {
						bootstrapServer = "_"
					}

					// check to see if there's a bridge config for the role
					scenarioBridgeSpecs := filepath.Join(scenarioPath, "_"+roleName+"_"+defaultSpecsFile)
					holo.Debugf("scenario: looking for bridgeSpecs:%v", scenarioBridgeSpecs)
					if !holo.FileExists(scenarioBridgeSpecs) {
						scenarioBridgeSpecs = bridgeSpecsFile
					}

					originalRoleName := roleName
					for count := 0; count < clones; count++ {
						freePort, err := cmd.GetFreePort()
						if err != nil {
							return cmd.MakeErrFromErr(c, err)
						}

						if clones > 1 {
							roleName = fmt.Sprintf("%s.%d", originalRoleName, count)

						}
						agentID = roleName
						if serverID != "" {
							roleName = serverID + "." + roleName
						}
						holo.Debugf("scenario: forRole(%v): port: %v\n\n", roleName, freePort)

						colorByNumbers := []string{"green", "blue", "yellow", "cyan", "magenta", "red"}

						logPrefix := "%{color:" + colorByNumbers[roleIndex%6] + "}" + roleName + ": "
						/* time doesn't work in prefix yet
						if outputDir != "" {
							logPrefix = "%{time}" + logPrefix
						}*/

						var upnpnat string
						if bootstrapServer == "_" {
							upnpnat = "false"
						} else {
							upnpnat = "true"
						}
						testCommand := exec.Command(
							"hcdev",
							"-path="+devPath,
							"-execpath="+fi


v-129.969231h126.030769v-74.830769h-126.030769z" fill="#707070" ></path></symbol><symbol id="wtf-create-calendar" viewBox="0 0 1024 1024"><path d="M827.076923 145.723077h-118.153846v-78.769231h-78.769231v78.769231h-275.692308v-78.769231h-78.76923v78.769231h-78.769231c-86.646154 0-157.538462 70.892308-157.538462 157.538461v472.615385c0 86.646154 70.892308 157.538462 157.538462 157.538462h326.892308v-78.769231H196.923077c-43.323077 0-78.769231-35.446154-78.769231-78.769231v-315.076923h787.692308v94.523077h78.769231v-252.061539c0-86.646154-70.892308-157.538462-157.538462-157.538461z m78.769231 236.307692h-787.692308v-78.769231c0-43.323077 35.446154-78.769231 78.769231-78.76923h78.769231v39.384615h78.76923v-39.384615h275.692308v39.384615h78.769231v-39.384615h118.153846c43.323077 0 78.769231 35.446154 78.769231 78.76923v78.769231z" fill="" ></path><path d="M838.892308 586.830769h-78.769231v141.784616h-137.846154v78.76923h137.846154V945.230769h78.769231v-137.846154h137.846154v-78.76923h-137.846154z" fill="" ></path></symbol><symbol id="wtf-upload-file" viewBox="0 0 1027 1024"><path d="M831.015385 153.6h-334.769231c-59.076923-66.953846-114.215385-118.153846-216.615385-118.153846h-86.646154c-98.461538 7.876923-192.984615 102.4-192.984615 169.353846V787.692308c0 110.276923 86.646154 196.923077 196.923077 196.923077H831.015385c110.276923 0 196.923077-86.646154 196.923077-196.923077V350.523077c0-110.276923-82.707692-196.923077-196.923077-196.923077z m118.153846 638.030769c0 66.953846-51.2 118.153846-118.153846 118.153846h-630.153847c-66.953846 0-118.153846-51.2-118.153846-118.153846V208.738462c0-19.692308 55.138462-86.646154 118.153846-94.523077h82.707693c66.953846 0 106.338462 31.507692 165.415384 102.4l11.815385 15.753846h374.153846c66.953846 0 118.153846 51.2 118.153846 118.153846v441.107692z" fill="" ></path><path d="M578.953846 437.169231l-59.076923-55.138462-196.923077 200.861539 59.076923 55.138461 98.461539-


lay:none;
}
#mangalist.amralive .mgLst td.checker {
  width:20px;
}
#mangalist.amralive .mgLst td.checker input {
  display:block;
}
.mgLst td.mirroricon {
  width:20px;
}
.mgLst tr.modif .textModif {
  font-style:italic;
  padding-left:10px;
}
.mgLst td.progression {
  width:225px;
}
.mgLst .mangaentry .progress, .mgLst tfoot .progress, .progressglob {
  display:inline-block;
  width:100px;
  height:8px;
  vertical-align:middle;
  margin-right:3px;
  background: #EEEEFF;
  border-color: #9999FF;
}
.progresscompat {
  height:16px;
  vertical-align:middle;
}
.mgLst .mangaentry .progress div {
  background: #AAAAFF;
  border-color: #9999FF;
}
.mgLst .mangaentry.new .progress {
  background: #FFEEEE;
  border-color: #FF9999;
}
.mgLst .mangaentry.new .progress div {
  background: #FFAAAA;
  border-color: #FF9999;
}
.mgLst .mangaentry.read .progress  {
  background: #EEEEEE;
  border-color: #999999;
}
.mgLst .mangaentry.read .progress div {
  background: #AAAAAA;
  border-color: #999999;
}
.mgLst tfoot .progress, .progressglob, .progresscompat  {
  background: #9999CC;
  border-color: #DDDDFF;
}
.mgLst tfoot .progress div, .progressglob div, .progresscompat div  {
  background: #DDDDFF;
  border-color: #DDDDFF;
}
.mgLst .progressnum, .progressglobnum {
  display:inline-block;
}
.progresscompatnum {
  position:relative;
  top:-18px;
  margin-bottom:-18px;
  font-size:10pt;
  font-weight:bold;
  text-align:center;

}
.mgLst .title {
  font-weight:bold;
}

.mgLst .mangaentry.head td, .mgLst .mangaentry.single td {
  border-top: 1px solid transparent;
}
.mgLst .mangaentry.last td {
  border-bottom: 1px solid #DDDDFF;
}

.mgLst .mangaentry {
  background: #DDDDFF;
}
.mgLst .mangaentry.head, .mgLst .mangaentry.single {
  background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#EEEEFF), to(#DDDDFF), color-stop(.4,#DDDDFF));
}
.mgLst .mangaentry.new {
  background: #FFDDDD;
}
.mgLst .mangaentry.new.head, .mgLst .mangaentry.new.single {
  background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#FFEEEE), to(#FFDDDD), color-stop(.4,#FFDDDD));
}

.mgLst .mangaentry.read {
  background: #DDDDDD;
}
.mgLst .mangaentry.read.head, .mgLst .mangaentry.read.single {
  background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#EEEEEE), to(#DDDDDD), color-stop(.4,#DDDDDD));
}

.mgLst .mangaentry:hover {
  background: #CCCCFF;
}
.mgLst .mangaentry.head:hover, .mgLst .m


6872
dGFibGVz 66873
L3BhZ2U= 66874
IOCkqOClh+CkquCkvuCksuClgA== 66875
IFNBTQ== 66876
0YvQvNC10L0= 66877
cmhz 66878
bG92ZXI= 66879
X0hBTkQ= 66880
44O844Kr 66881
INGA0LDQt9GA0LXRiA== 66882
dWVnb3M= 66883
V0FZUw== 66884
IFRyYWNraW5n 66885
LkNoYW5nZQ== 66886
2YjYqtix 66887
IGrDpMOk 66888
IOCwqOCwnw== 66889
IHJlZmxlY3Rpbmc= 66890
IFDDumJsaWNh 66891
LlBo 66892
IFJhcGlk 66893
IHRhdw== 66894
IHJhc2E= 66895
2LPYp9iz 66896
Q1RJT05T 66897
IGRpZmZlcmVudGlhbA== 66898
IGfDqW7DqXJhbGU= 66899
5aeT 66900
aGFhbGQ= 66901
IHN1cmZpbmc= 66902
4LiE4Lil 66903
INGA0LDQt9C90YvRhQ== 66904
IOCql+CrjeCqsA== 66905
IFdvaG51bmc= 66906
dW5zYWZl 66907
IGxpbmVh 66908
5aq9 66909
IGdqw7hy 66910
IOmYheivuw== 66911
IHRyYW5zY3JpcHRpb24= 66912
IGRlcHJlY2F0ZWQ= 66913
2LbZhA== 66914
INGW0YE= 66915
IOC0leC0vuC0ow== 66916
4Lit4Lii4LmI4Liy4LiH 66917
5o+Q6auY 66918
INC/0YDQsNC60YLQuNGH0LXRgdC60Lg= 66919
Y3Vz 66920
IOGDmOGDm+GDmOGDoQ== 66921
V1JJVEU= 66922
LmNob2ljZQ== 66923
IG9rdA== 66924
INGB0YLQtdC/ 66925
TWlz 66926
0YjRgw== 66927
IOGDkOGDpuGDmw== 66928
INm+24HZhNuS 66929
aW5za2k= 66930
QnJvbg== 66931
LnN3aXRjaA== 66932
IOuPjA== 66933
INmI2KfZhNi1 66934
INGA0LDRgdGB0LrQsA== 66935
IOC4q+C4p+C4og== 66936
bmRlbg== 66937
IGNvcnJlc3BvbmRz 66938
X25hdg== 66939
aW5rZQ== 66940
X2NhdGVnb3JpZXM= 66941
LnJlbA== 66942
5b+D5rC06K665Z2b 66943
INC30LjQvA== 66944
ZW5uYWk= 66945
X0JZVEU= 66946
IGtodQ== 66947
Z2VzYW10 66948
IGdlc3Bl 66949
IGVzc2VudGlhbHM= 66950
4YOT4YOY4YOc 66951
LW11dGVk 66952
TmF0 66953
IERhc2g= 66954
IOC0sOC0o+C1jeC0nw== 66955
IGF1dGhlbnRpY2F0ZQ== 66956
IHRyYXZlcnNl 66957
IOC0qOC0v+C0sOC1jQ== 66958
INe


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

#include "katvan_typstdriverwrapper.h"

#include <QList>
#include <QSettings>
#include <QWidget>

QT_BEGIN_NAMESPACE
class QAction;
class QComboBox;
class QLabel;
QT_END_NAMESPACE

namespace katvan {

class PreviewerView;

class Previewer : public QWidget
{
    Q_OBJECT

public:
    Previewer(TypstDriverWrapper* driver, QWidget* parent = nullptr);
    ~Previewer();

    int currentPage() const;
    bool shouldFollowEditorCursor() const;

    void restoreSettings(const QSettings& settings);
    void saveSettings(QSettings& settings);

signals:
    void followCursorEnabled();

public slots:
    void reset();
    void jumpToPreview(int page, QPointF pos);

private slots:
    void updatePreview(QList<katvan::typstdriver::PreviewPageData> pages);
    void zoomIn();
    void zoomOut();
    void zoomOptionSelected(int index);
    void manualZoomEntered();
    void zoomedByScrolling(int units);
    void currentPageChanged(int page);
    void followEditorCursorChanged(bool checked);

private:
    void setZoom(QVariant value);
    void setCustomZoom(qreal factor);

private:
    PreviewerView* d_view;

    QComboBox* d_zoomComboBox;
    QLabel* d_currentPageLabel;
    QAction* d_invertColorsAction;
    QAction* d_followEditorCursorAction;
};

}


:"adv. 空间上的立体的",
"sterically hindered":"[化] 位阻的; 空间位阻的",
"sterically hindered phenol":"[化] 位阻酚; 空间位阻酚",
"stericooling":"空间冷却",
"sterid":"[医] 甾, 甾族",
"sterid nuclei":"[医] 甾核",
"steride":"甾族化合物",
"sterides":"[化] 甾类化合物",
"sterigma":"[医] 担子柄; 叶座(种子植物)",
"sterigmatocystin":"柄曲霉素",
"Sterigmatocystis":"[医] 小梗囊胞菌属",
"Sterigmatocystis cinnamomina":"[医] 桂褐色小梗囊胞菌",
"sterigmaupsin":"小柄菌素",
"Sterigmocystis":"[医] 小梗囊胞菌属",
"sterilamp":"(紫外线)杀菌灯",
"sterilant":"止繁殖剂, 杀菌剂, 消毒剂",
"sterile":"a. 不毛的, 不孕的, 无菌的, 贫瘠的, 无效的, 枯燥的\\n[医] 无菌的, 消毒的; 不育的",
"sterile abscess":"[医] 无菌脓肿",
"sterile absorbent gauze":"[医] 无菌脱脂纱布",
"sterile adhesive plaster":"[医] 无菌绊创膏, 无菌橡皮膏",
"sterile cyst":"[医] 不育囊(棘球蚴)",
"sterile meningitis":"[医] 无菌性脑膜炎",
"sterile operation":"[化] 无菌操作",
"sterile room":"[化] 无菌室",
"sterile solution":"[医] 无菌溶液",
"sterile woman":"[法] 不生育的妇女",
"sterilely":"adv. sterile的变形",
"sterileness":"[网络] 消毒",
"sterilisatio":"[医] 消毒, 灭菌; 绝育",
"sterilisation":" [医]绝育, 消毒, 灭菌",
"sterilisations":"(sterilisation 的复数)  [医]绝育, 消毒, 灭菌",
"sterilise":"vt. 使无用; 使无菌; 使绝育; 使贫瘠化",
"sterilised":"杀菌",
"steriliser":" [医]消毒器, 灭菌器",
"sterilisers":"(steriliser 的复数)  [医]消毒器, 灭菌器",
"sterilises":"(sterilise 的第三人称 -s形式) vt. 使无用; 使无菌; 使绝育; 使贫瘠化",
"sterilising":"(sterilise 的现在分词) vt. 使无用; 使无菌; 使绝育; 使贫瘠化",
"sterilitas":"不育(性), 不实(性)",
"sterilitas feminis":"[医] 女性不育",
"sterilitas virilis":"[医] 男性不育


141593 / 180 ) * ($SpliceDistance+$i) + $YPos;
         $BorderX2 = cos(($Angle-$i*.5+$Value*$SpliceRatio) * 3.141593 / 180 ) * (($Radius+$BMax)+$SpliceDistance) + $XPos;
         $BorderY2 = sin(($Angle-$i*.5+$Value*$SpliceRatio) * 3.141593 / 180 ) * (($Radius+$BMax)+$SpliceDistance) + $YPos;
         $this->drawLine($BorderX1,$BorderY1,$BorderX2,$BorderY2,$this->Palette[$Key]["R"],$this->Palette[$Key]["G"],$this->Palette[$Key]["B"]);
        }

       /* Process pie slices */
       for($iAngle=$Angle;$iAngle<=$Angle+$Value*$SpliceRatio;$iAngle=$iAngle+.03125)
        {
         $TopX = cos($iAngle * 3.141593 / 180 ) * ($Radius+$SpliceDistance) + $XPos;
         $TopY = sin($iAngle * 3.141593 / 180 ) * ($Radius+$SpliceDistance) + $YPos;

         $TopPlots[$Key][] = $TopX;
         $TopPlots[$Key][] = $TopY;

         if ( $iAngle != $Angle )
          {
           for($i=-1;$i<=0;$i++)
            {
             $BorderX1 = cos(($iAngle-.03125) * 3.141593 / 180 ) * (($Radius+$i)+$SpliceDistance) + $XPos;
             $BorderY1 = sin(($iAngle-.03125) * 3.141593 / 180 ) * (($Radius+$i)+$SpliceDistance) + $YPos;
             $BorderX2 = cos($iAngle * 3.141593 / 180 ) * (($Radius+$i)+$SpliceDistance) + $XPos;
             $BorderY2 = sin($iAngle * 3.141593 / 180 ) * (($Radius+$i)+$SpliceDistance) + $YPos;

             $this->drawLine($BorderX1,$BorderY1,$BorderX2,$BorderY2,$this->Palette[$Key]["R"],$this->Palette[$Key]["G"],$this->Palette[$Key]["B"]);
            }
          }
        }

       $TopPlots[$Key][] = $XCenterPos;
       $TopPlots[$Key][] = $YCenterPos;

       $Angle = $iAngle + $SpliceDistanceRatio;
      }
     $PolyPlots = $TopPlots;

     /* Set array values type to float --- PHP Bug with imagefilledpolygon casting to integer */
     foreach ($TopPlots as $Key => $Value)
      { foreach ($TopPlots[$Key] as $Key2 => $Value2) { settype($TopPlots[$Key][$Key2],"float"); } }

     /* Draw Top polygons */
     foreach ($TopPlots as $Key => $Value)
      {
       $C_GraphLo = imagecolorallocate($this->Picture,$this->Palette[$Key]["R"],$this->Palette[$Key]["G"],$this->Palette[$Key]["B"]);
       imagefilledpolygon($this->Picture,$PolyPlots[$Key],(count($PolyPlots[$Key])+1)/2,$C_GraphLo);
      }
    }

   /* This function draw a pseudo-3D pie chart */
   function drawPieGraph(&$Data,&$DataDescription,$XPos,$YPos,$Radius=100,$DrawLabels=PIE_NOLABEL,$EnhanceColors=TRUE,$Skew=60,$SpliceHeight=20,$SpliceDistance=0,$Decimals=0,$Angle=0)
    {
     /* Validate the Data and DataDescription array */
     $this->validateDataDescription("drawPieGraph",$DataDescription,FALSE);
     $this->validateData("drawPieGraph",$Data);

     /* Determine pie sum */
     $Series = 0; $PieSum = 0; $rPieSum = 0;
     foreach ( $DataDescription["Values"] as $Key


] Expected Response JSON { "id": 0, "name": "", "reward_balance": "0.000 STEEM", "recent_claims": "0", "last_update": "1970-01-01T00:00:00", "content_constant": "0", "percent_curation_rewards": 0, "percent_content_rewards": 0, "author_reward_curve": "quadratic", "curation_reward_curve": "34723648" } Example curl curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_reward_fund", "params":["post"], "id":1}' https://api.steemit.com Since: HF14 Working on mainnet Working on testnet condenser_api.get_savings_withdraw_from Returns savings withdraw from an account. Parameters: account:string account (string)   "steemit" Queries the savings withdraw for account named “steemit”. Query Parameters JSON [""] Expected Response JSON [] Example curl curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_savings_withdraw_from", "params":["steemit"], "id":1}' https://api.steemit.com Since: HF14 Working on mainnet Working on testnet condenser_api.get_savings_withdraw_to Returns the savings withdraw to an account. Parameters: account:string account (string)   "steemit" Queries the savings withdraw for account named “steemit”. Query Parameters JSON [""] Expected Response JSON [] Example curl curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_savings_withdraw_to", "params":["steemit"], "id":1}' https://api.steemit.com Deprecated Working on mainnet Working on testnet condenser_api.get_state Returns the state of a path. Deprecated. Parameters: path:string Query Parameters JSON [""] Expected Response JSON { "current_route": "", "props": { "head_block_number": 0, "head_block_id": "0000000000000000000000000000000000000000", "time": "1970-01-01T00:00:00", "current_witness": "", "total_pow": "18446744073709551615", "num_pow_witnesses": 0, "virtual_supply": "0.000 STEEM", "current_supply": "0.000 STEEM", "confidential_supply": "0.000 STEEM", "current_sbd_supply": "0.000 STEEM", "confidential_sbd_supply": "0.000 STEEM", "total_vesting_fund_steem": "0.000 STEEM", "total_vesting_s


//Original:testcases/core/c_ldstiifp_ld_dreg/c_ldstiifp_ld_dreg.dsp
// Spec Reference: c_ldstiifp load dreg
# mach: bfin

.include "testutils.inc"
	start

// set all regs
init_i_regs 0;
init_b_regs 0;
init_l_regs 0;
init_m_regs 0;
INIT_R_REGS 0;
I0 = P3;
I2 = SP;

// initial values
	P1 = 0x0000;
	P2 = 0x0004;
	P3 = 0x0004;
	P4 = 0x0000;
	P5 = 0x0000;
	SP = 0x0000;
	I1 = P3; P3 = I0; I3 = SP; SP = I2;
	loadsym fp, DATA_ADDR_1, 0xc8;
	P3 = I1; SP = I3;

	r0 = [ fp + 0 ];
	R1 = [ FP + 4 ];
	R2 = [ FP + 8 ];
	R3 = [ FP + 12 ];
	R4 = [ FP + 16 ];
	R5 = [ FP + 20 ];
	R6 = [ FP + 24 ];
	R7 = [ FP + 28 ];
	CHECKREG r0, 0x86878889;
	CHECKREG r1, 0x80818283;
	CHECKREG r2, 0x84858687;
	CHECKREG r3, 0x01020304;
	CHECKREG r4, 0x05060708;
	CHECKREG r5, 0x09101112;
	CHECKREG r6, 0x14151617;

	R0 = [ FP + 32 ];
	R1 = [ FP + 36 ];
	R2 = [ FP + 40 ];
	R3 = [ FP + 44 ];
	R4 = [ FP + 48 ];
	R5 = [ FP + 52 ];
	R7 = [ FP + 56 ];
	CHECKREG r0, 0x22232425;
	CHECKREG r1, 0x26272829;
	CHECKREG r2, 0x30313233;
	CHECKREG r3, 0x34353637;
	CHECKREG r4, 0x38394041;
	CHECKREG r5, 0x42434445;
	CHECKREG r6, 0x14151617;

	R0 = [ FP + 56 ];
	R1 = [ FP + 60 ];
	R2 = [ FP + 64 ];
	R3 = [ FP + 68 ];
	R4 = [ FP + 72 ];
	R5 = [ FP + 76 ];
	R6 = [ FP + 80 ];
	CHECKREG r0, 0x46474849;
	CHECKREG r1, 0x50515253;
	CHECKREG r2, 0x54555657;
	CHECKREG r3, 0x58596061;
	CHECKREG r4, 0x62636465;
	CHECKREG r5, 0x66676869;
	CHECKREG r6, 0x74555657;

	R0 = [ FP + 84 ];
	R1 = [ FP + 88 ];
	R2 = [ FP + 92 ];
	R3 = [ FP + 96 ];
	R4 = [ FP + 100 ];
	R5 = [ FP + 104 ];
	R6 = [ FP + 108 ];
	CHECKREG r0, 0x78596067;
	CHECKREG r1, 0x72636467;
	CHECKREG r2, 0x76676867;
	CHECKREG r3, 0x20212223;
	CHECKREG r4, 0x24252627;
	CHECKREG r5, 0x28292A2B;
	CHECKREG r6, 0x2C2D2E2F;

	R0 = [ FP + 112 ];
	R1 = [ FP + 116 ];
	R2 = [ FP + 120 ];
	R3 = [ FP + 124 ];
	R4 = [ FP + 128 ];


 confirmation
    confirm_action("Pushes will be made to origin. Do you want to continue?", abort=True)
    # Create a new branch from main
    create_branch(version_branch)
    # Build ci image
    if confirm_action("Build latest breeze image?"):
        if DRY_RUN:
            console_print("Skipping below command on CI")
        run_command(["breeze", "ci-image", "build", "--python", "3.9"], dry_run_override=DRY_RUN, check=True)
    # Update default branches
    update_default_branch(version_branch)
    # Commit changes
    commit_changes(version_branch)
    # Create stable branch
    create_stable_branch(version_branch)
    # Push test and stable branches
    push_test_and_stable_branch(version_branch)
    # Checkout main
    checkout_main()
    # Update version branches in main
    instruction_update_version_branch(version_branch)
    # Create constraints branch
    create_constraints(version_branch)
    console_print("Done!")


urn e.editformbutton?(d="id='jEditButton_"+f+"' onclick=jQuery.fn.fmatter.rowactions.call(this,'formedit'); "+k,g+="

"):e.editbutton&&(d="id='jEditButton_"+f+"' onclick=jQuery.fn.fmatter.rowactions.call(this,'edit'); "+k,g+="

"),e.delbutton&&(d="id='jDeleteButton_"+f+"' onclick=jQuery.fn.fmatter.rowactions.call(this,'del'); "+k,g+="

"),d="id='jSaveButton_"+f+"' onclick=jQuery.fn.fmatter.rowactions.call(this,'save'); "+k,g+="

",d="id='jCancelButton_"+f+"' onclick=jQuery.fn.fmatter.rowactions.call(this,'cancel'); "+k,g+="

","
"+g+"
"},a.unformat=function(b,c,d,e){var
f,g,h=c.colModel.formatter,i=c.colModel.formatoptions||{},j=/([\.\*\_\'\(\)\{\}\+\?\\])/g,k=c.colModel.unformat||a.fn.fmatter[h]&&a.fn.fmatter[h].unformat;if(void
0!==k&&a.isFunction(k))f=k.call(this,a(b).text(),c,b);else
if(void
0!==h&&a.fmatter.isString(h)){var
l,m=a.jgrid.getRegional(this,"formatter")||{};switch(h){case"integer":i=a.extend({},m.integer,i),g=i.thousandsSeparator.replace(j,"\\$1"),l=new
RegExp(g,"g"),f=a(b).text().replace(l,"");break;case"number":i=a.extend({},m.number,i),g=i.thousandsSeparator.replace(j,"\\$1"),l=new
RegExp(g,"g"),f=a(b).text().replace(l,"").replace(i.decimalSeparator,".");break;case"currency":i=a.extend({},m.currency,i),g=i.thousandsSeparator.replace(j,"\\$1"),l=new
RegExp(g,"g"),f=a(b).text(),i.prefix&&i.prefix.length&&(f=f.substr(i.prefix.length)),i.suffix&&i.suffix.length&&(f=f.substr(0,f.length-i.suffix.length)),f=f.replace(l,"").replace(i.decimalSeparator,".");break;case"checkbox":var
n=c.colModel.editoptions?c.colModel.editoptions.value.split(":"):["Yes","No"];f=a("input


受信トラフィックを管理する手助けをします。

JSの課題 - 一部の検出とお客様に対しては、不可視のJavaScriptの課題を挿入して、ボット検出用の信号をより多く得ます。

検出ログ- 当社のデータパイプラインは、ClickHouseで管理します。適用された各検出、使用された機能とフラグに関する詳細を記録、一部はデータ分析や顧客ログに用い、また一部はデバッグや当社のモデル改善に役立てています。

ボット管理モジュールが必須フィールドを作成すると、ファイアウォールが実際のボット緩和を引き継ぎます。

ファイアウォールの統合

Cloudflareファイアウォールの直感的なダッシュボードを使えば、ユーザーは強力なルールを数回のクリックで容易に設定でき、Terraformの統合も可能です。ファイアウォールへのリクエストはすべてルールエンジンと照会して検査されます。疑わしいリクエストは、ユーザーのニーズに合わせてブロックされたり、認証または記録することができ、ボット管理モジュールによって作成されたスコアと設定されたしきい値に基づいて、正当なリクエストは、配信先へとルーティングされます。

ファイアウォールルールでは、次のボット緩和行動が提供されます。

ログ- 顧客に提供されたCloudflareログのリクエストと一致した記録。

バイパス- お客様は特定のリクエストに対してCloudflareのセキュリティ機能を動的に無効にすることができます。

許可- 一致したリクエストは、ほかのファイアウォールルールコンテンツによってトリガーされるチャレンジおよびブロックアクションの対象から除外されます。

チャレンジ（Captcha）- サイトにアクセスしている訪問者が自動化されたソースではなく人間であることを確認するのに有用です。

JSチャレンジ- ボットやスパムがリクエストしたリソースにアクセスできないようにします。ただし、ブラウザは自由にチャレンジを自動的に解決できます。

ブロック- 一致したリクエストはサイトへのアクセスが拒否されます。

当社のファイアウォール AnalyticsツールはClickHouseとGraphQL APIを基盤とし、お客様は直感的インターフェースを利用してセキュリティ


 # 获取当前 ax_top x 轴刻度标签
            xtick_labels = [str(tick) for tick in ax_top.get_xticks()]
            # # 将特定位置的刻度标签设置为你想要的值
            xtick_labels[0] = str(x2beg_new)
            # # 设置 ax_top x 轴刻度标签
            ax_top.set_xticklabels(xtick_labels)

        elif i % d2num_new_plot ==0:
            # ax.spines['top'].set_position((str(i*d2num_new), 0))
            ax.set_xticks([0])  # 只保留0位置的刻度
            # 获取当前 x 轴刻度标签
            xtick_labels = [str(tick) for tick in ax.get_xticks()]
            # 将特定位置的刻度标签设置为你想要的值
            xtick_labels[0] = str(x2beg_new + i*d2num_new)

            # 设置 x 轴刻度标签
            ax.set_xticklabels(xtick_labels)

        else:
            ax.tick_params(axis='x', labeltop=False, labelbottom=False, top=False, bottom=False)

######添加d2label
        middle  = plot_number // 2

        bool1 = bool(middle == i)
        bool2 = bool(i % d2num_new_plot == 0)

        if bool1:
            if bool2:
                ax.set_xlabel(d2label, fontsize=FontSize[1], color="k")
                ax.xaxis.set_label_position('top')
            else:
                ax.tick_params(axis='x', labeltop=True, labelbottom=False, top=False, bottom=False)
                ax.set_xticks([0])

                ax.set_xlabel(d2label, fontsize=FontSize[1], color="k")
                ax.xaxis.set_label_position('top')

                ax.set_xticklabels(["  "])###是的，您可以使用 ax.set_xticklabels([""]) 来在顶部标签的位置保留一个空间，使得顶部标签不会移动到另一个位置。

    # 调整子图之间的间距
    plt.subplots_adjust(wspace=0.0)

    plt.savefig(output_name + ".eps", dpi=eps_dpi)
    plt.savefig(output_name + ".jpg", dpi=eps_dpi)
    # plt.savefig(output_name + ".png", dpi=eps_dpi)

    if not pltshow:
        plt.close();

def plot_graph2(input_array, plot_number=1, dz=1, x1beg=0, x1end=0, d1num=0, x2beg=0, x2end=0, d2num=0, label1="x", label2="y", figsize=(10, 5), axis_width=1, axis_length=1, linewidth=1, linestyle=("-", "-", "-"), grid_linewidth=0, line_color=("k", "r", "b", ), FontSize=(9,9), fontsize=(9,9), legend_size=(9,9), legend_position="best", legend_name=("1","2","3", ), eps_dpi=300, output_name="tmp.eps", title="", plot_end=0, reverse_1=False, reverse_2=False, pltshow=False, grid=False):
    """
    input_array: input_arry, list of numpy array, list[0]=np.array
    plot_number: how many number of array is plotted in a figure. We can plot different length (but the same original position and the different end position)
    dz:
    x1beg:
    d1num:
    x2beg:
    d2num:

    legend_position: supported values are 'best', 'upper right', 'upper left', 'lower left', 'lower right', 'right', 'center left', 'center right', 'lower center', 'upper center', 'center'

    pltshow: two options: True: plotshow and save figure, False: only save
    example1: P.plot_graph(in_arr, plot_number=plot_number, dz=dz, x1beg=f1, x1end=0, d1num=0, x2beg=0, x2end=0, d2num=0, label1=label1, label2=label2, figsize=figsize1, axis_width=1, axis_length=1, linewidth=1, linestyle=linestyle, grid_linewidth=0, line_color=line_color, fontsize=10, FontSize=10, legend_size=12, legend_position=legend_position, legend_name=legend_name, eps_dpi=300, output_name=ou_file);

    P.plot_graph(in_arr, plot_number=plot_number, dz=dz, x1beg=f1, x1end=0, d1num=0, x2beg=0, x2end=0, d2num=0, label1=label1, label2=label2, figsize=figsize1, axis_width=1, axis_length=1, linewidth=1, linestyle=linestyle, grid_linewidth=0, line_color=line_color, fontsize=10, FontSize=10, legend_size=12, legend_position=legend_position, legend_name=legend_name, eps_dpi=300, output_name=ou_file, plot_end=plot_end);
    """

    x_list=[]
    for i in range(0, plot_number):
        shape = input_array[i].shape
        nz    = shape[0]

        if     x1beg != 0 and x1end==0:
            x_array=np.linspace(x1beg, x1beg+nz*dz, nz)
        elif   x1beg != 0 and x1end!=0:
            x_array=np.linspace(x1beg, x1end, nz)
        elif   x1beg == 0 and x1end!=0:
            x_array=np.linspace(x1beg, x1end, nz)
        else:
            x_array=np.linspace(0, nz*dz, nz)

        x_list.append(x_array);

	# print_numpy_array_info(x_array, "x_array of plot_graph")
    print("max of x_array is", np.max(x_array) ); print("min of x_array is", np.min(x_array) );

    if figsize:
        fig, ax = plt.subplots(figsize=figsize)
    else:
        fig, ax = plt.subplots(figsize=(10,5))

    # Remove the margins of the subplot
    ax.margins(0)


r, _sel_attributedStringByInflectingString);
    return NSAttributedString.castFromPointer(_ret, retain: true, release: true);
  }

}

/// WARNING: NSTextAttachment is a stub. To generate bindings for this class, include
/// NSTextAttachment in your config's objc-interfaces list.
///
/// NSTextAttachment
class NSTextAttachment extends objc.NSObject implements NSTextAttachmentLayout, objc.NSSecureCoding {
  NSTextAttachment._(ffi.Pointer<objc.ObjCObject> pointer, {bool retain = false, bool release = false}) :
      super.castFromPointer(pointer, retain: retain, release: release) { objc.checkOsVersionInternal('NSTextAttachment', iOS: (false, (7, 0, 0)), macOS: (false, (10, 0, 0))); }

  /// Constructs a [NSTextAttachment] that points to the same underlying object as [other].
  NSTextAttachment.castFrom(objc.ObjCObjectBase other) :
      this._(other.ref.pointer, retain: true, release: true);

  /// Constructs a [NSTextAttachment] that wraps the given raw object pointer.
  NSTextAttachment.castFromPointer(ffi.Pointer<objc.ObjCObject> other,
      {bool retain = false, bool release = false}) :
      this._(other, retain: retain, release: release);

}

late final _sel_attributedStringWithAttachment_ = objc.registerName("attributedStringWithAttachment:");

/// NSAttributedStringAttachmentConveniences
extension NSAttributedStringAttachmentConveniences on NSAttributedString {

  /// attributedStringWithAttachment:
  static NSAttributedString attributedStringWithAttachment(NSTextAttachment attachment) {
  objc.checkOsVersionInternal('NSAttributedString.attributedStringWithAttachment:', iOS: (false, (7, 0, 0)), macOS: (false, (10, 0, 0)));
    final _ret = _objc_msgSend_1sotr3r(_class_NSAttributedString, _sel_attributedStringWithAttachment_, attachment.ref.pointer);
    return NSAttributedString.castFromPointer(_ret, retain: true, release: true);
  }

}

late final _sel_dataFromRange_documentAttributes_error_ = objc.registerName("dataFromRange:documentAttributes:error:");
final _objc_msgSend_193219c = objc.msgSendPointer.cast<ffi.NativeFunction<ffi.Pointer<objc.ObjCObject> Function(ffi.Pointer<objc.ObjCObject> , ffi.Pointer<objc.ObjCSelector> , objc.NSRange , ffi.Pointer<objc.ObjCObject> , ffi.Pointer<ffi.Pointer<objc.ObjCObject>> )>>().asFunction<ffi.Pointer<objc.ObjCObject> Function(ffi.Pointer<objc.ObjCObject> , ffi.Pointer<objc.ObjCSelector> , objc.NSRange , ffi.Pointer<objc.ObjCObject> , ffi.Pointer<ffi.Pointer<objc.ObjCObject>> )>();

/// WARNING: NSFileWrapper is a stub. To generate bindings for this class, include
/// NSFileWrapper in your config's objc-interfaces list.
///
/// NSFileWrapper
class NSFileWrapper extends objc.NSObject implements objc.NSSecureCoding {
  NSFileWrapper._(ffi.Pointer<objc.ObjCObject> pointer, {bool retain = false, bool release = false}) :
      super.castFromPointer(pointer, retain: retain, release: release) { objc.checkOsVersionInternal('NSFileWrapper', iOS: (false, (4, 0, 0)), macOS: (false, (10, 0, 0))); }

  /// Constructs a [NSFileWrapper] that points to the same underlying object as [other].
  NSFileWrapper.castFrom(objc.ObjCObjectBase other) :
      this._(


_tris[o_opposite(i)] = nv;
            w_split_new_tris[i] = nv++;
          }
        }
      }
    }
    edge_split();

    // function from slides
    // creates bulge using midpoint
    var bulge = function(){
      for(var i = 0; i < nc; i++){
        if(i < o_opposite(i) && !border(i)){
          if (!border(p_prev_corner(i)) && !border(n_next_corner(i)) && !border(p_prev_corner(o_opposite(i))) && !border(n_next_corner(o_opposite(i)))){
            var vertex_a_1 = midPoint(g_coordinate_vertex(i), g_coordinate_vertex(o_opposite(i)));
            var vertex_a_2 = midPoint(midPoint(g_coordinate_vertex(l_left_neighbor(i)), g_coordinate_vertex(r_right_neighbor(i))),midPoint(g_coordinate_vertex(l_left_neighbor(o_opposite(i))),g_coordinate_vertex(r_right_neighbor(o_opposite(i)))));
            var vertex_a = vec3.create();
            vertex_a = vec3.subtract(vertex_a, vertex_a_1, vertex_a_2);
            var vertex_a_scaled = vec3.create();
            vec3.scale(vertex_a_scaled, vertex_a, 0.25);
            vec3.add(vertices[w_split_new_tris[i]], vertices[w_split_new_tris[i]], vertex_a_scaled);
          }
        }
      }
    }
    bulge();

    // function from slides
    // takes in each triangle and makes it into four triangles
    var tri_split = function(){
        for(var i = 0; i < 3*nt; i=i+3){
          indices[nt*3+i] = v_vertex_id(i);
          indices[n_next_corner(nt*3+i)] = w_split_new_tris[p_prev_corner(i)];
          indices[p_prev_corner(nt*3+i)] = w_split_new_tris[n_next_corner(i)];
          indices[nt*6+i] = v_vertex_id(n_next_corner(i));
          indices[n_next_corner(nt*6+i)] = w_split_new_tris[i];
          indices[p_prev_corner(nt*6+i)] = w_split_new_tris[p_prev_corner(i)];
          indices[nt*9+i] = v_vertex_id(p_prev_corner(i));
          indices[n_next_corner(nt*9+i)] = w_split_new_tris[n_next_corner(i)];
          indices[p_prev_corner(nt*9+i)] = w_split_new_tris[i];
          indices[i] = w_index_split(i);
          indices[n_next_corner(i)] = w_index_split(n_next_corner(i));
          indices[p_prev_corner(i)] = w_index_split(p_prev_corner(i));
        }
        nt = nt*4;
        nc = nt*3;
    }
    tri_split();

//////////////////////////////////////////////////////////////
    // CODE FROM ONLOAD FUNCTION
    var position = new Array();
    var color = new Array();
    var normal = new Array();

  // position is coordinates of vertices in 1D array
    var populatePosition = function() {
      for(var i = 0; i < nv; i++){
        position.push(vertices[i][0], vertices[i][1], vertices[i][2]);
      }
    }
    populatePosition();

    var populateColor = function() {
      for (var i = 0; i < nv; i++){
        var tempColor = chroma.hsv(rand(360), 0.5, 1);
        color.push(tempColor.rgb()[0], tempColor.rgb()[1], tempColor.rgb()[2], 255);
      }
    }
    populateColor


ons_flag = AtomicBool::new(true);

    let t2 = HashSet::from_iter(top_level_names.iter().map(|p| p.as_ref().to_path_buf()));

    let t = create_reader_thread(rx, t2, apparent_size);
    let walk_dir_builder = prepare_walk_dir_builder(top_level_names, limit_filesystem, max_depth);

    walk_dir_builder.build_parallel().run(|| {
        let txc = tx.clone();
        let pf = &permissions_flag;
        Box::new(move |path| {
            match path {
                Ok(p) => {
                    if let Some(dirs) = ignore_directories {
                        let path = p.path();
                        let parts = path.components().collect::<Vec<std::path::Component>>();
                        for d in dirs {
                            let seq = d.components().collect::<Vec<std::path::Component>>();
                            if parts
                                .windows(seq.len())
                                .any(|window| window.iter().collect::<PathBuf>() == *d)
                            {
                                return WalkState::Continue;
                            }
                        }
                    }

                    let maybe_size_and_inode = get_metadata(&p, apparent_size);

                    match maybe_size_and_inode {
                        Some(data) => {
                            let (size, inode_device) = data;
                            txc.send((p.into_path(), size, inode_device)).unwrap();
                        }
                        None => {
                            pf.store(false, atomic::Ordering::Relaxed);
                        }
                    }
                }
                Err(_) => {
                    pf.store(false, atomic::Ordering::Relaxed);
                }
            };
            WalkState::Continue
        })
    });

    drop(tx);
    let data = t.join().unwrap();
    (permissions_flag.load(atomic::Ordering::SeqCst), data)
}

fn create_reader_thread(
    rx: Receiver<PathData>,
    top_level_names: HashSet<PathBuf>,
    apparent_size: bool,
) -> JoinHandle<HashMap<PathBuf, u64>> {
    // Receiver thread
    thread::spawn(move || {
        let mut hash: HashMap<PathBuf, u64> = HashMap::new();
        let mut inodes: HashSet<(u64, u64)> = HashSet::new();

        for dent in rx {
            let (path, size, maybe_inode_device) = dent;

            if should_ignore_file(apparent_size, &mut inodes, maybe_inode_device) {
                continue;
            } else {
                for p in path.ancestors() {
                    let s = hash.entry(p.to_path_buf()).or_insert(0);
                    *s += size;

                    if top_level_names.contains(p) {
                        break;
                    }
                }
            }
        }
        hash
    })
}

pub fn normalize_path<P: AsRef<Path>>(path: P) -> PathBuf {
    // normalize path ...
    // 1. removing repeated separators
    // 2. removing interior '.' ("current directory") path segments
    // 3. removing trailing extra separators and '.' ("current directory") path segments
    // * `Path.components()` does all the above work; ref: <https://doc.rust-lang.org/std/path/struct.Path.html#method.components>
    // 4. changing to os preferred separator (autom


5, #2]
/*0x39b0*/      lsls r3, r3, #0x1e
/*0x39b2*/      lsrs r3, r3, #0x1e
/*0x39b4*/      lsls r3, r2
/*0x39b6*/      orrs r1, r3
            jump_39b8:
/*0x39b8*/      .short 0x1e40 /* subs r0, r0, #1 */
/*0x39ba*/      bhs jump_399e
/*0x39bc*/      str r1, [r4, #0x14]
/*0x39be*/      ldr r0, [r4]
/*0x39c0*/      orrs r0, r6
/*0x39c2*/      str r0, [r4]
            jump_39c4:
/*0x39c4*/      ldrb r0, [r5, #2]
/*0x39c6*/      mov r1, r6
/*0x39c8*/      lsls r0, r0, #0x1a
/*0x39ca*/      lsrs r2, r0, #0x1c
/*0x39cc*/      ldr r0, [sp, #4]
/*0x39ce*/      bl call_37ec
/*0x39d2*/      b jump_3946

            data_39d4:
/*0x39d4*/  .word 0x400b0000

            .thumb_func
            call_39d8:
/*0x39d8*/      push {r4, lr}
/*0x39da*/      mov r1, r0
/*0x39dc*/      movs r0, #0x1c
/*0x39de*/      bl call_8a78
/*0x39e2*/      pop {r4, pc}

            .thumb_func
            call_39e4:
/*0x39e4*/      lsrs r1, r0, #3
/*0x39e6*/      lsrs r2, r1, #2
/*0x39e8*/      ldr r1, [pc, #0x14] /* data_3a00 */
/*0x39ea*/      lsls r2, r2, #2
/*0x39ec*/      adds r1, r2, r1
/*0x39ee*/      ldr r2, [r1, #4]
/*0x39f0*/      lsls r3, r0, #0x1b
/*0x39f2*/      lsrs r3, r3, #0x1b
/*0x39f4*/      movs r0, #1
/*0x39f6*/      lsls r0, r3
/*0x39f8*/      orrs r2, r0
/*0x39fa*/      str r2, [r1, #4]
/*0x39fc*/      bx lr

/*0x39fe*/  .byte 0x00
/*0x39ff*/  .byte 0x00

            data_3a00:
/*0x3a00*/  .word 0x40088100

            .thumb_func
            call_3a04:
/*0x3a04*/      push {r4, r5, r6, lr}
/*0x3a06*/      mov r5, r1
/*0x3a08*/      ldr r1, [pc, #0x30] /* data_3a3c */
/*0x3a0a*/      lsls r0, r0, #2
/*0x3a0c*/      adds r4, r0, r1
/*0x3a0e*/      ldr r0, [r5, #4]
/*0x3a10*/      cmp r0, #0
/*0x3a12*/      beq jump_3a20
/*0x3a14*/      ldrh r0, [r4]
/*0x3a16*/      movs r1, #2


ons;
  const isActive = ref(false);
  const intervalLimit = fpsLimit ? 1e3 / fpsLimit : null;
  let previousFrameTimestamp = 0;
  let rafId = null;
  function loop(timestamp2) {
    if (!isActive.value || !window2)
      return;
    if (!previousFrameTimestamp)
      previousFrameTimestamp = timestamp2;
    const delta = timestamp2 - previousFrameTimestamp;
    if (intervalLimit && delta < intervalLimit) {
      rafId = window2.requestAnimationFrame(loop);
      return;
    }
    previousFrameTimestamp = timestamp2;
    fn({ delta, timestamp: timestamp2 });
    rafId = window2.requestAnimationFrame(loop);
  }
  function resume() {
    if (!isActive.value && window2) {
      isActive.value = true;
      previousFrameTimestamp = 0;
      rafId = window2.requestAnimationFrame(loop);
    }
  }
  function pause() {
    isActive.value = false;
    if (rafId != null && window2) {
      window2.cancelAnimationFrame(rafId);
      rafId = null;
    }
  }
  if (immediate)
    resume();
  tryOnScopeDispose(pause);
  return {
    isActive: readonly(isActive),
    pause,
    resume
  };
}
function useAnimate(target, keyframes, options) {
  let config;
  let animateOptions;
  if (isObject(options)) {
    config = options;
    animateOptions = objectOmit(options, ["window", "immediate", "commitStyles", "persist", "onReady", "onError"]);
  } else {
    config = { duration: options };
    animateOptions = options;
  }
  const {
    window: window2 = defaultWindow,
    immediate = true,
    commitStyles,
    persist,
    playbackRate: _playbackRate = 1,
    onReady,
    onError = (e) => {
      console.error(e);
    }
  } = config;
  const isSupported = useSupported(() => window2 && HTMLElement && "animate" in HTMLElement.prototype);
  const animate = shallowRef(void 0);
  const store = shallowReactive({
    startTime: null,
    currentTime: null,
    timeline: null,
    playbackRate: _playbackRate,
    pending: false,
    playState: immediate ? "idle" : "paused",
    replaceState: "active"
  });
  const pending = computed(() => store.pending);
  const playState = computed(() => store.playState);
  const replaceState = computed(() => store.replaceState);
  const startTime = computed({
    get() {
      return store.startTime;
    },
    set(value) {
      store.startTime = value;
      if (animate.value)
        animate.value.startTime = value;
    }
  });
  const currentTime = computed({
    get() {
      return store.currentTime;
    },
    set(value) {
      store.currentTime = value;
      if (animate.value) {
        animate.value.currentTime = value;
        syncResume();
      }
    }
  });
  const timeline = computed({
    get() {
      return store.timeline;
    },
    set(value) {
      store.timeline = value;
      if (animate.value)
        animate.value.timeline = value;
    }
  });
  const playbackRate = computed({
    get() {
      return store.playbackRate;
    },
    set(value) {
      store.playbackRate = value;
      if (animate.value)
        animate.value.playbackRate = value;
    }
  });
  const play = () => {
    if (animate.value) {
      try {
        animate.value.play();
        syncResume();
      } catch (e) {
        syncPause();
        onError(e);
      }