iuRectangle area)
{
	//@@
}

void PiuCursors_get_arrow(xsMachine* the)
{
	xsResult = xsInteger(0);
}

void PiuCursors_get_cross(xsMachine* the)
{
	xsResult = xsInteger(1);
}

void PiuCursors_get_iBeam(xsMachine* the)
{
	xsResult = xsInteger(2);
}

void PiuCursors_get_link(xsMachine* the)
{
	xsResult = xsInteger(3);
}

void PiuCursors_get_notAllowed(xsMachine* the)
{
	xsResult = xsInteger(4);
}

void PiuCursors_get_resizeColumn(xsMachine* the)
{
	xsResult = xsInteger(5);
}

void PiuCursors_get_resizeRow(xsMachine* the)
{
	xsResult = xsInteger(6);
}

void PiuSystem_getClipboardString(xsMachine* the)
{
	GtkClipboard* clipboard = gtk_clipboard_get(GDK_SELECTION_CLIPBOARD);
	if (gtk_clipboard_wait_is_text_available(clipboard)) {
		char *string = gtk_clipboard_wait_for_text(clipboard);
		if (string) {
			xsResult = xsString(string);
			g_free(string);
			return;
		}
	}
	xsResult = xsString("");
}

void PiuSystem_setClipboardString(xsMachine* the)
{
	GtkClipboard* clipboard = gtk_clipboard_get(GDK_SELECTION_CLIPBOARD);
	if (xsToInteger(xsArgc) > 0) {
		char* string = xsToString(xsArg(0));
		gtk_clipboard_set_text(clipboard, string, strlen(string));
	}
	else
		gtk_clipboard_set_text(clipboard, "", 0);
}

void PiuSystem_launchPath(xsMachine* the)
{
	char command[PATH_MAX];
	strcpy(command, "xdg-open ");
	strcat(command, xsToString(xsArg(0)));
	xsResult = xsInteger(system(command));
}

void PiuSystem_launchURL(xsMachine* the)
{
	PiuSystem_launchPath(the);
}

void PiuNavigationBar_create(xsMachine* the)
{
	xsDebugger();
}

void PiuStatusBar_create(xsMachine* the)
{
	xsDebugger();
}


block = self.filter.get_from_block().unwrap();
                let to_block = from_block + self.page_size;
                self.from_block = Some(to_block);

                let filter = self.filter.clone().from_block(from_block).to_block(to_block);
                let provider = self.provider;
                // load first page of logs
                let fut = Box::pin(async move { provider.get_logs(&filter).await });
                rewake_with_new_state!(ctx, self, LogQueryState::LoadLogs(fut));
            }
            LogQueryState::LoadLogs(fut) => {
                let logs = futures_util::ready!(fut.as_mut().poll(ctx))
                    .expect("error occurred loading logs");
                self.current_logs = VecDeque::from(logs);
                rewake_with_new_state!(ctx, self, LogQueryState::Consume);
            }
            LogQueryState::Consume => {
                let log = self.current_logs.pop_front();
                if log.is_none() {
                    // consumed all the logs
                    if !self.filter.is_paginatable() {
                        Poll::Ready(None)
                    } else {
                        // load new logs if there are still more pages to go through
                        let from_block = self.from_block.unwrap();
                        let to_block = from_block + self.page_size;

                        // no more pages to load, and everything is consumed
                        if from_block > self.last_block.unwrap() {
                            return Poll::Ready(None)
                        }
                        // load next page
                        self.from_block = Some(to_block);

                        let filter = self.filter.clone().from_block(from_block).to_block(to_block);
                        let provider = self.provider;
                        let fut = Box::pin(async move { provider.get_logs(&filter).await });
                        rewake_with_new_state!(ctx, self, LogQueryState::LoadLogs(fut));
                    }
                } else {
                    Poll::Ready(log)
                }
            }
        }
    }
}
<filename>native/src/input/mouse/button.rs<gh_stars>1000+
/// The button of a mouse.
#[derive(Debug, Hash, PartialEq, Eq, Clone, Copy)]
pub enum Button {
    /// The left mouse button.
    Left,

    /// The right mouse button.
    Right,

    /// The middle (wheel) button.
    Middle,

    /// Some other button.
    Other(u8),
}
use crate::logging::APP_LOGGING;
use chrono::{Duration, Utc};
use dotenv::dotenv;
use std::env;

pub async fn watch_db_conn() {
    dotenv().ok();
    let timeout_sec: i64 = env::var("DATABASE_TIMEOUT")
        .expect("DATABASE_TIMEOUT must be set")
        .parse()
        .unwrap();

    info!(APP_LOGGING, "Watchdog testing db connection");
    let end_time = Utc::now() + Duration::seconds(timeout_sec);
    loop {
        if let Ok(_) = crate::models::establish_db_connection() {
            info!(APP_LOGGING, "Watchdog connected to db");
            return;
        } else if Utc::now() > end_time {
            error!(APP_LOGGING, "Watchdog failed!");
            panic!("Dind't connect to database in time");
        }
        // timeout
        info!(APP_LOGGING, "Watchdog timeout");
        tokio::time::delay_for(std::time::Duration::from_


__yF8JH.Grid_template-columns-0fr-4fr-1fr-2fr__O5EK3{grid-template-columns:0fr 4fr 1fr 2fr}.Grid_grid__yF8JH.Grid_template-columns-auto-0fr-4fr-1fr-2fr___bWzK{grid-template-columns:auto 0fr 4fr 1fr 2fr}.Grid_grid__yF8JH.Grid_template-columns-0fr-4fr-1fr-2fr-auto__H_92f{grid-template-columns:0fr 4fr 1fr 2fr auto}.Grid_grid__yF8JH.Grid_template-rows-0fr-4fr-1fr-3fr__CLeIW{grid-template-rows:0fr 4fr 1fr 3fr}.Grid_grid__yF8JH.Grid_template-rows-auto-0fr-4fr-1fr-3fr__d0N2l{grid-template-rows:auto 0fr 4fr 1fr 3fr}.Grid_grid__yF8JH.Grid_template-rows-0fr-4fr-1fr-3fr-auto__KvCve{grid-template-rows:0fr 4fr 1fr 3fr auto}.Grid_grid__yF8JH.Grid_template-columns-0fr-4fr-1fr-3fr__IjygM{grid-template-columns:0fr 4fr 1fr 3fr}.Grid_grid__yF8JH.Grid_template-columns-auto-0fr-4fr-1fr-3fr__5UtCt{grid-template-columns:auto 0fr 4fr 1fr 3fr}.Grid_grid__yF8JH.Grid_template-columns-0fr-4fr-1fr-3fr-auto__jnxMj{grid-template-columns:0fr 4fr 1fr 3fr auto}.Grid_grid__yF8JH.Grid_template-rows-0fr-4fr-1fr-4fr__C95AE{grid-template-rows:0fr 4fr 1fr 4fr}.Grid_grid__yF8JH.Grid_template-rows-auto-0fr-4fr-1fr-4fr__Sz6s5{grid-template-rows:auto 0fr 4fr 1fr 4fr}.Grid_grid__yF8JH.Grid_template-rows-0fr-4fr-1fr-4fr-auto__OW5O7{grid-template-rows:0fr 4fr 1fr 4fr auto}.Grid_grid__yF8JH.Grid_template-columns-0fr-4fr-1fr-4fr__CRpb9{grid-template-columns:0fr 4fr 1fr 4fr}.Grid_grid__yF8JH.Grid_template-columns-auto-0fr-4fr-1fr-4fr__TaJ8j{grid-template-columns:auto 0fr 4fr 1fr 4fr}.Grid_grid__yF8JH.Grid_template-columns-0fr-4fr-1fr-4fr-auto__AmGPa{grid-template-columns:0fr 4fr 1fr 4fr auto}.Grid_grid__yF8JH.Grid_template-rows-0fr-4fr-2fr__CW79_{grid-template-rows:0fr 4fr 2fr}.Grid_grid__yF8JH.Grid_template-rows-auto-0fr-4fr-2fr__xr8Qg{grid-template-rows:auto 0fr 4fr 2fr}.Grid_grid__yF8JH.Grid_template-rows-0fr-4fr-2fr-auto__Uac9i{grid-template-rows:0fr 4fr 2fr auto}.Grid_grid__yF8JH.Grid_template-rows-auto-0fr-4fr-2fr-auto__1YFNX{grid-template-rows:auto 0fr 4fr 2fr auto}.Grid_grid__yF8JH.Grid_template-columns-0fr-4fr-2fr__A5jjp{grid-template-columns:0fr 4fr 2fr}.Grid_grid__yF8JH.Grid_template-columns-auto-0fr-4fr-2fr__az353{grid-t


Id());

			// 1.) unregister entity from hash table (= not findable by future requests)
			this.unregisterEntity(entity);

			// 2.) detach entity from file registry. Actual physical remains don't hurt, even on restart, as they will be unreachable again.
			entity.detachFromFile();

			// 3.) remove entity from its type registry, effectively removing it from iteration, count and export logic.
			type.remove(entity, previousInType);

			// 4.) unload cached data and update entity cache track accordingly
			this.ensureNoCachedData(entity);

			// 5.) mark entity as deleted
			entity.setDeleted();

			// decrement size, otherwise the cache can't shrink
			this.oidSize--;
		}

		void checkForCacheClear(final StorageEntity.Default entry, final long evalTime)
		{
			if(this.entityCacheEvaluator.clearEntityCache(this.usedCacheSize, evalTime, entry))
			{
				// use ensure method for that for purpose of uniformity / simplicity
				this.ensureNoCachedData(entry);
			}
			else
			{
				// if the loaded entity data can stay in memory, touch the entity to mark now as its last use.
				entry.touch();
			}
		}

		private void advanceMarking(final int oidsCount)
		{
			// it is crucial to enqueue cached references effectively before updating the pending marks count.
			this.referenceMarker.tryFlush();

			// must advance via central gc monitor to update the total pending mark count (0-case ignored).
			this.markMonitor.advanceMarking(this.oidMarkQueue, oidsCount);
		}

		/**
		 * Returns {@code true} if there are no more oids to mark and {@code false} if time ran out.
		 * (Meaning the returned boolean effectively means "Was there enough time?")
		 */
		private boolean incrementalMark(final long nanoTimeBudgetBound)
		{
			final long                     evalTime        = System.currentTimeMillis();
			final StorageReferenceMarker   referenceMarker = this.referenceMarker      ;
			final StorageObjectIdMarkQueue oidMarkQueue    = this.oidMarkQueue         ;
			final long[]                   oidsBuffer      = this.markingOidBuffer     ;

			// total amount of oids to mark in the current batch. Range: [0; oids.length]
			int oidsMarkAmount = 0;

			// index of next oid to be marked (and current amount of already marked oids). Range: [0; oidsMarkAmount]
			int oidsMarkIndex  = 0;

			// mark at least one entity, even if there is no time, to avoid starvation
			do
			{
				// fetch next batch of oids to mark and advance gray queue if necessary
				if(oidsMarkIndex >= oidsMarkAmount)
				{
					// an incremented index always equals an element count
					this.advanceMarking(oidsMarkIndex);

					// reset oids index and fetch next batch
					oidsMarkIndex = 0;
					if((oidsMarkAmount = oidMarkQueue.getNext(oidsBuffer)) == 0)
					{
						// ran out of work before time ran out. So return true.
						return true;
					}
				}

				// get the entry for the current oid to be marked
				final StorageEntity.Default entry = this.getEntry(oidsBuffer[oidsMarkIndex++]);

				// externalized/modularized zombie oid handling
				if(entry == null)
				{
					if(!this.zombieOidHandler.handleZombieOid(oidsBuffer[oidsMarkIndex - 1]))
					{
						// if the handler didn't throw an exception but didn't say it's handled, either, then log it.
						logger.warn("Storage GC marking encountered zombie ObjectId {}", oidsBuffer[oidsMarkIndex - 1]);
						this.eventLogger.logGarbageCollectorEncounteredZombieObjectId(oidsBuffer[oidsMarkIndex - 1]);
					}
					continue;
				}

				// if the entry is already marked black (was redundantly enqueued), skip it and continue to the next
				if(entry.isGcBlack())
				{
					continue;
				}

				// enqueue all reference ids in the mark queue via th


0px}.cta .input-group-round .btn{border-top-left-radius:30px;border-bottom-left-radius:30px}.cta-title{font-size:2.4rem;letter-spacing:-.01em;font-weight:600}.cta-heading{margin-bottom:2.5rem}.cta-heading .cta-title{margin-bottom:.3rem}.cta-desc{font-size:1.6rem}.cta-horizontal{padding:4.5rem 3rem 4.5rem}.cta-horizontal .cta-title{font-size:2.2rem;margin-bottom:.8rem;letter-spacing:-.01em;font-weight:600}.cta-horizontal .cta-desc{color:#666;font-size:1.4rem;font-weight:400}.cta .btn:not(.btn-block){min-width:160px;text-transform:uppercase;font-weight:400;font-size:1.4rem}.font-weight-medium{font-weight:500}.blog-posts .read-more{font-size:1.4rem}.entry-content{margin-bottom:1rem;padding-bottom:1rem}.footer .footer-middle{padding-top:5.5rem}.footer .footer-bottom .container{padding-bottom:2rem}@media screen and (min-width: 576px){.products [class*=col-]{border-right:.1rem solid #eee}.products [class*=col-]:nth-child(2n){border-right-width:0}.cta .input-group{background-color:#f4f4f4}.cta-horizontal .btn:not(.btn-block){min-width:270px}}@media screen and (min-width: 768px){.intro-subtitle{margin-bottom:1rem}.intro-price{font-size:2.4rem;margin-bottom:1.8rem}.products [class*=col-]:nth-child(2n){border-right-width:.1rem}.products [class*=col-]:nth-child(3n){border-right-width:0}.cta-horizontal{padding-left:5rem;padding-right:5rem}.banner-group .banner-large .banner-content{left:7rem}.banner-group .banner-middle .banner-content{left:5rem}}@media screen and (min-width: 992px){.intro-slider.owl-simple.owl-nav-inside .owl-dots{bottom:30px}.intro-content .btn{min-width:150px}.intro-subtitle{margin-bottom:1.4rem}.intro-title{font-size:5.2rem}.intro-price{font-size:2.8rem;margin-bottom:2.3rem}.products [class*=col-]:nth-child(3n){border-right-width:.1rem}.products [class*=col-]:nth-child(4n){border-right-width:0}.cta-horizontal{padding-left:7rem;padding-right:7rem}}@media screen and (min-width: 1200px){.intro-content .btn{min-width:170px}.intro-price{font-size:3rem}.products [class*=col-]:nth-child(4n){border-right-width:.1rem}.products [class*=col-]:nth-child(5n){border-right-width:0}}@media screen and (min-width: 1200px){.header-8 .main-nav{margin-right:35.5rem}}
/*# sourceMappingURL=demo-10.css.map */
@import url("https://fonts.googleapis.com/css?family=Poppins:200,200i,300,300i,400,400i,500,500i,600,600i,700,700i,800");.header.header-9 .mobile-menu-toggler{font-size:2.5rem}.header.header-9 .logo{margin-top:1.5rem;margin-bottom:1.5rem;display:flex;align-items:center}.header.header-9 .menu>li>a{padding-left:2.6rem;padding-top:1.85rem;padding-bottom:1.85rem}.header.header-9 .menu>li>a::before{content:'';display:block;position:absolute;left:2rem;right:-1rem;bottom:1.3rem;height:.1rem;background-color:#fff;transform


"https://github.com/SamKook">SamKook,
opbod,
jslegers73,
lars18th
for helping fixing lots of bugs!

[Back to top](#table-of-contents)

[//]: "}}}"
[//]: ## "{{{ Built with & tested on"
## Built with & tested on

1. MinGW w/ GCC v11.3.0 & cmake v3.23.2 on Cygwin v3.4.2-1 & Windows 8.1 x64, resp.
2. MinGW w/ GCC v10-win32 20220324 & cmake v3.24.2 on Ubuntu v22.10 & wine-7.0 (Ubuntu 7.0~repack-8)

[Back to top](#table-of-contents)

[//]: "}}}"
[//]: ## "{{{ How to build"
## How to build

```shell
$ git clone --recurse https://github.com/lalbornoz/PuTTie

#
# Release build, create release archive, no build parallelisation/max. 4 jobs, resp.:
$ ./PuTTie/build.sh distclean_all and install
$ ./PuTTie/build.sh -j 4 distclean_all and install

#
# Debug build, create release archive, no build parallelisation/max. 4 jobs, resp.:
$ ./PuTTie/build.sh -d distclean_all and install
$ ./PuTTie/build.sh -d -j 4 distclean_all and install

#
# Release build, default to file as storage backend, create release archive, no build parallelisation/max. 4 jobs, resp.:
$ ./PuTTie/build.sh -B file distclean_all and install
$ ./PuTTie/build.sh -B file -j 4 distclean_all and install

#
# Help screen:
$ ./PuTTie/build.sh -h
usage: build.sh [-B <backend>] [-d] [-D] [-h] [-i] [-j <jobs>] [-t <target>]
      [<command> [<args>[...]] [and] [...]

      -B <backend>....: set default storage backend to either of ephemeral, file, or registry (default)
      -d..............: select Debug (vs. Release) build
      -D..............: select Debug w/o debugging console (vs. Release) build (for usage w/ dbg_server)
      -h..............: show this screen
      -i..............: ignore command dependencies
      -j <jobs>.......: set cmake(1) max. job count; defaults to processor count in /proc/cpuinfo on Linux
      -t <target>.....: build <target> instead of default target

Available commands:
clang_compile_cmds      Create compile_commands.json file
clean                   Clean PuTTie build directory
clean_all               Clean pcre2 and PuTTie build directory
clean_pcre2             Clean pcre2 build directory
configure               Configure PuTTie
configure_pcre2         Configure pcre2
dbg_client [...]        Attach to gdbserver on localhost:1234 with optional arguments to gdb
dbg_server [...]        Start gdbserver on localhost:1234 with optional arguments to putty.exe
distclean               Reset PuTTie build directory
distclean_all           Reset pcre2 and PuTTie build directory
distclean_pcre2         Reset pcre2 build directory
make                    Build PuTTie
make_pcre2              Build pcre2
install                 Create PuTTie release archive
publish                 Publish PuTTie release archive on GitHub

N.B.: When switching build types, run clean.
```

[Back to top](#table-of-contents)

[//]: "}}}"
[//]: ## "{{{ TODO/wish list"
## TODO/wish list

1. **New feature**: Direct{2D,Write} backend, similarly to[[21](#r21)]
2. **New feature**: MS Visual C++ build environment support bits via Winelib & provide installer package(s) & images
3. **New feature**: ssh:// protocol handler registration, similarly to[[19](#r19)]
4. **New feature**: ReGIS[[22](#r22)] and/or Sixel[[23](#r23)] terminal graphics support

[Back to top](#table-of-contents)

[//]: "}}}"
[//]:


            for (int j = 0; j < 100; j++) {
                sb.append(' ');
                sb.append(termUpto++);
                sb.append(" some random text that keeps repeating over and over again hambone");
            }
            client().prepareIndex("test").setId("" + termUpto).setSource("field" + (i % 10), sb.toString()).get();
        }
        refresh();
        stats = client().admin().indices().prepareStats().execute().actionGet();
        // nodesStats = client().admin().cluster().prepareNodesStats().setIndices(true).get();

        stats = client().admin().indices().prepareStats().execute().actionGet();
        assertThat(stats.getPrimaries().getIndexing().getTotal().getThrottleTime().millis(), equalTo(0L));
    }

    public void testThrottleStats() throws Exception {
        assertAcked(
            prepareCreate("test").setSettings(
                settingsBuilder().put(IndexMetadata.SETTING_NUMBER_OF_SHARDS, "1")
                    .put(IndexMetadata.SETTING_NUMBER_OF_REPLICAS, "0")
                    .put(TieredMergePolicyProvider.INDEX_MERGE_POLICY_MAX_MERGE_AT_ONCE_SETTING.getKey(), "2")
                    .put(TieredMergePolicyProvider.INDEX_MERGE_POLICY_SEGMENTS_PER_TIER_SETTING.getKey(), "2")
                    .put(MergeSchedulerConfig.MAX_THREAD_COUNT_SETTING.getKey(), "1")
                    .put(MergeSchedulerConfig.MAX_MERGE_COUNT_SETTING.getKey(), "1")
                    .put(IndexSettings.INDEX_TRANSLOG_DURABILITY_SETTING.getKey(), Translog.Durability.ASYNC.name())
            )
        );
        ensureGreen();
        long termUpto = 0;
        IndicesStatsResponse stats;
        // make sure we see throttling kicking in:
        boolean done = false;
        long start = System.currentTimeMillis();
        while (!done) {
            for (int i = 0; i < 100; i++) {
                // Provoke slowish merging by making many unique terms:
                StringBuilder sb = new StringBuilder();
                for (int j = 0; j < 100; j++) {
                    sb.append(' ');
                    sb.append(termUpto++);
                }
                client().prepareIndex("test").setId("" + termUpto).setSource("field" + (i % 10), sb.toString()).get();
                if (i % 2 == 0) {
                    refresh();
                }
            }
            refresh();
            stats = client().admin().indices().prepareStats().execute().actionGet();
            // nodesStats = client().admin().cluster().prepareNodesStats().setIndices(true).get();
            done = stats.getPrimaries().getIndexing().getTotal().getThrottleTime().millis() > 0;
            if (System.currentTimeMillis() - start > 300 * 1000) { // Wait 5 minutes for throttling to kick in
                fail("index throttling didn't kick in after 5 minutes of intense merging");
            }
        }

        // Optimize & flush and wait; else we sometimes get a "Delete Index failed - not acked"
        // when OpenSearchIntegTestCase.after tries to remove indices created by the test:
        logger.info("test: now optimize");
        client().admin().indices().prepareForceMerge("test").get();
        flush();
        logger.info("test: test done");
    }

    public void testSimpleStats() throws Exception {
        createIndex("test1", "test2");
        ensureGreen();

        client().prepareIndex("test1").setId(Integer.toString(1)).setSource("field", "value").execute().actionGet();
        client().prepareIndex("test1").setId(Integer.toString(2)).setSource("field", "value").execute().actionGet();
        client().prepareIndex("test2").setId(Integer.toString(1)).setSource("field", "value").execute().a


 _, f := range files {
		n := f.Name()

		if strings.HasPrefix(n, ".") {
			continue
		}

		if f.IsDir() {
			descendants := mustListContents(path.Join(parentPath, n))
			for _, d := range descendants {
				res = append(res, path.Join(n, d))
			}
		} else {
			res = append(res, n)
		}
	}

	return res
}
package compiler

import (
	"encoding/hex"
	"encoding/json"
	"strings"
	"testing"

	"chain/exp/ivy/compiler/ivytest"
)

func TestCompile(t *testing.T) {
	cases := []struct {
		name     string
		contract string
		wantJSON string
	}{
		{
			"TrivialLock",
			ivytest.TrivialLock,
			`[{"name":"TrivialLock","clauses":[{"name":"trivialUnlock","values":[{"name":"locked"}]}],"value":"locked","body_bytecode":"51","body_opcodes":"TRUE","recursive":false}]`,
		},
		{
			"LockWithPublicKey",
			ivytest.LockWithPublicKey,
			`[{"name":"LockWithPublicKey","params":[{"name":"publicKey","declared_type":"PublicKey"}],"clauses":[{"name":"unlockWithSig","params":[{"name":"sig","declared_type":"Signature"}],"values":[{"name":"locked"}]}],"value":"locked","body_bytecode":"ae7cac","body_opcodes":"TXSIGHASH SWAP CHECKSIG","recursive":false}]`,
		},
		{
			"LockWithPublicKeyHash",
			ivytest.LockWithPKHash,
			`[{"name":"LockWithPublicKeyHash","params":[{"name":"pubKeyHash","declared_type":"Hash","inferred_type":"Sha3(PublicKey)"}],"clauses":[{"name":"spend","params":[{"name":"pubKey","declared_type":"PublicKey"},{"name":"sig","declared_type":"Signature"}],"hash_calls":[{"hash_type":"sha3","arg":"pubKey","arg_type":"PublicKey"}],"values":[{"name":"value"}]}],"value":"value","body_bytecode":"5279aa887cae7cac","body_opcodes":"2 PICK SHA3 EQUALVERIFY SWAP TXSIGHASH SWAP CHECKSIG","recursive":false}]`,
		},
		{
			"LockWith2of3Keys",
			ivytest.LockWith2of3Keys,
			`[{"name":"LockWith3Keys","params":[{"name":"pubkey1","declared_type":"PublicKey"},{"name":"pubkey2","declared_type":"PublicKey"},{"name":"pubkey3","declared_type":"PublicKey"}],"clauses":[{"name":"unlockWith2Sigs","params":[{"name":"sig1","declared_type":"Signature"},{"name":"sig2","declared_type":"Signature"}],"values":[{"name":"locked"}]}],"value":"locked","body_bytecode":"537a547a526bae71557a536c7cad","body_opcodes":"3 ROLL 4 ROLL 2 TOALTSTACK TXSIGHASH 2ROT 5 ROLL 3 FROMALTSTACK SWAP CHECKMULTISIG","recursive":false}]`,
		},
		{
			"LockToOutput",
			ivytest.LockToOutput,
			`[{"name":"LockToOutput","params":[{"name":"address","declared_type":"Program"}],"clauses":[{"name":"relock","values":[{"name":"locked","program":"address"}]}],"value":"locked","body_bytecode":"0000c3c251557ac1","body_opcodes":"0 0 AMOUNT ASSET 1 5 ROLL CHECKOUTPUT","recursive":false}]`,
		},
		{
			"TradeOffer",
			ivytest.TradeOffer,
			`[{"name":"TradeOffer","params":[{"name":"requestedAsset","declared_type":"Asset"},{"name":"requestedAmount","declared_type":"Amount"},{"name":"sellerProgram","declared_type":"Program"},{"name":"sellerKey","declared_type":"PublicKey"}],"clauses":[{"name":"t


from typing import List

class Solution:
    def solve(self, n: int, m: int, grid: List[List[int]]):

        def out_of_bounds(j):
            return j < 0 or j >= m

        def recursion(i1, i2, j1, j2) -> int:
            if out_of_bounds(j1) or out_of_bounds(j2):
                return 0
            if i1 == n - 1 or i2 == n - 1:
                if j1 == j2:
                    return grid[i1][j1]
                else:
                    return grid[i1][j1] + grid[i2][j2]
            maxi = 0
            for k1 in range(-1, 2):
                for k2 in range(-1, 2):
                    if j1 == j2:
                        maxi = max(maxi, grid[i1][j1] + recursion(i1 + 1, i2 + 1, j1 + k1, j2 + k2))
                    else:
                        maxi = max(maxi, grid[i1][j1] + grid[i2][j2] + recursion(i1 + 1, i2 + 1, j1 + k1, j2 + k2))
            return maxi

        # return recursion(0, 0, 0, m - 1)

        dp = [[[-1 for _ in range(m)] for _ in range(m)] for _ in range(n)]

        # since i1 and i2  would always be same bcz both the robots would always be at the same level! -> 3d DP
        def memoization(i, j1, j2) -> int:
            if out_of_bounds(j1) or out_of_bounds(j2):
                return 0
            if dp[i][j1][j2] != -1:
                return dp[i][j1][j2]
            if i == n - 1:
                if j1 == j2:
                    return grid[i][j1]
                else:
                    return grid[i][j1] + grid[i][j2]
            maxi = 0
            for k1 in range(-1, 2):
                for k2 in range(-1, 2):
                    if j1 == j2:
                        maxi = max(maxi, grid[i][j1] + memoization(i + 1, j1 + k1, j2 + k2))
                    else:
                        maxi = max(maxi, grid[i][j1] + grid[i][j2] + memoization(i + 1, j1 + k1, j2 + k2))
            dp[i][j1][j2] = maxi
            return maxi

        return memoization(0, 0, m - 1)


  }

    // GetByID получение задачи по id
    public getTaskById(id: number): Promise<any> {
        return super.get(`${process.env.URL}/task/${id}`);
    }

    // Create создание задачи
    public createNewTask(task: Task): Promise<any> {
        return super.post(`${process.env.URL}/task/create`, task);
    }

    // Update изменение задачи
    public updateTask(task: Task): Promise<any> {
        return super.patch(`${process.env.URL}/task/update`, task);
    }

    // Delete удаление задачи
    public deleteTaskById(id: number): Promise<any> {
        return super.delete(`${process.env.URL}/task/${id}`);
    }

}

export default TaskModel.getInstance();import { useCallback, useRef } from "react";

import { getFocusableElements } from "./getFocusableElements";

interface Options<E extends HTMLElement> {
  /**
   * Boolean if the focus wrap behavior should be disabled.
   */
  disabled?: boolean;

  /**
   * Boolean if the list of focusable elements should not be cached after the
   * first tab key press. This should only be set to `true` if you have a lot of
   * dynamic content whin your element and the first and last elements change.
   */
  disableFocusCache?: boolean;

  /**
   * An optional keydown event handler to merge with the focus wrap behavior.
   */
  onKeyDown?: React.KeyboardEventHandler<E>;
}

/**
 * Creates an `onKeyDown` event handler to trap keyboard focus within a
 * container element.
 *
 * @typeParam E - The HTMLElement type that has the keydown event listener
 * attached.
 * @param options - All the options for handling tab focus wrapping.
 * @returns The keydown event handler to enforce focus wrapping or the onKeyDown
 * prop if this functionality is disabled.
 */
export function useTabFocusWrap<E extends HTMLElement>({
  disabled = false,
  disableFocusCache = false,
  onKeyDown,
}: Options<E>): React.KeyboardEventHandler<E> | undefined {
  const focusables = useRef<readonly HTMLElement[]>([]);

  const handleKeyDown = useCallback<React.KeyboardEventHandler<E>>(
    (event): void => {
      if (onKeyDown) {
        onKeyDown(event);
      }

      if (event.key !== "Tab") {
        return;
      }

      if (disableFocusCache || !focusables.current.length) {
        focusables.current = getFocusableElements(event.currentTarget);
      }

      const elements = focusables.current;
      const l = elements.length;
      if (l === 0) {
        return;
      }

      if (l === 1) {
        event.preventDefault();
        elements[0].focus();
      } else if (elements[0] === event.target && event.shiftKey) {
        event.preventDefault();
        elements[l - 1].focus();
      } else if (elements[l - 1] === event.target && !event.shiftKey) {
        event.preventDefault();
        elements[0].focus();
      }
    },
    [onKeyDown, disableFocusCache]
  );

  return disabled ? onKeyDown : handleKeyDown;
}
import assert from "assert";
import defaultEqual, { equal } from "./equality";

function toStr(value: any) {
  try {
    return JSON.stringify(value);
  } catch {
    return String(value);
  }
}

function assertEqual(a: any, b: any) {
  assert.strictEqual(equal(a, b), true, `unexpectedly not equal(${toStr(a)}}, ${toStr(b)})`);
  assert.strictEqual(equal(b, a), true, `unexpectedly not equal(${toStr(b)}, ${toStr(a)})`);
}

function assertNotEqual(a: any, b: any) {
  assert.strictEqual(equal(a, b), false, `unexpected


.set noreorder

#include "pspimport.s"

#ifdef F_sceCtrl_0000
	IMPORT_START	"sceCtrl",0x40010000
#endif
#ifdef F_sceCtrl_0001
	IMPORT_FUNC	"sceCtrl",0x6A2774F3,sceCtrlSetSamplingCycle
#endif
#ifdef F_sceCtrl_0002
	IMPORT_FUNC	"sceCtrl",0x02BAAD91,sceCtrlGetSamplingCycle
#endif
#ifdef F_sceCtrl_0003
	IMPORT_FUNC	"sceCtrl",0x1F4011E6,sceCtrlSetSamplingMode
#endif
#ifdef F_sceCtrl_0004
	IMPORT_FUNC	"sceCtrl",0xDA6B76A1,sceCtrlGetSamplingMode
#endif
#ifdef F_sceCtrl_0005
	IMPORT_FUNC	"sceCtrl",0x3A622550,sceCtrlPeekBufferPositive
#endif
#ifdef F_sceCtrl_0006
	IMPORT_FUNC	"sceCtrl",0xC152080A,sceCtrlPeekBufferNegative
#endif
#ifdef F_sceCtrl_0007
	IMPORT_FUNC	"sceCtrl",0x1F803938,sceCtrlReadBufferPositive
#endif
#ifdef F_sceCtrl_0008


{ 0.8, 0.4, 0 }, { 0.27, 0.54, -0.84 }, { 0.27, 0.54, 0.84 }, { 0, 0, 0 }, { 2, 0.99, 0 }, { -1.37, -0.85, 0 }, { 0, 0, 0 }, { 0, 0, 0 }, { 0, 0, 0 }, { 0, 0, 0 }, { 0, 0, 0 } },
	flight_time_maximum = 189,
	flight_time_typical = 110,
	fuselage_Cxa0 = 0.8,
	fuselage_Cxa90 = 5.9,
	fuselage_area = 3.7,
	h_max_gear_hook = 3.3,
	height = 5.6,
	helicopter_hook_pos = { 0, -0.5, 0 },
	input_profile_entry = "Ka-50 III",
	laserEquipment = {
		laserDesignator = true,
		laserRangefinder = true
	},
	lead_stock_main = 0.25,
	lead_stock_support = 0.223,
	length = 15.84,
	lights_data = {
		lights = {
			[2] = {
				lights = { {
						lights = { {
								argument = 46,
								connector = "MAIN_SPOT_PTR",
								movable = true,
								proto = <7>{
									angle_change_rate = 0.10471975511966,
									angle_max = 0.22689280275926,
									angle_min = 0.19198621771938,
									color = { 255, 201, 125, 0.28690682760248 },
									cool_down_t = 1.12,
									power_up_t = 1.12,
									range = 3600
								},
								typename = "argumentlight"
							} },
						typename = "collection"
					} },
				typename = "collection"
			},
			[3] = {
				lights = { {
						lights = { {
								argument = 190,
								proto = {
									angle_max = 2.6179938779915,
									angle_min = 1.5707963267949,
									color = { 1, 0.35, 0.15, 0.15 },
									range = 40
								},
								typename = "argumentlight"
							}, {
								argument = 191,
								proto = {
									angle_max = 2.6179938779915,
									angle_min = 1.5707963267949,
									color = { 0, 0.894, 0.6, 0.15 },
									range = 40
								},
								typename = "argumentlight"
							}, {
								argument = 192,
								proto = {
									angle_max = 3.1415926535898,
									color = { 1, 1, 1, 0.12 },
									range = 18
								},
								typename = "argumentlight"
							} },
						typename = "collection"
					} },
				typename = "collection"
			},
			[4] = {
				lights = { {
						argument = 200,
						typename = "argumentlight"
					} },
				typename = "collection"
			},
			[5] = {
				lights = { {
						argument = 47,
						typename = "argumentlight"
					} },
				typename = "collection"
			},
			[6] = {
				lights = { {
						lights = { {
								argument = 46,
								connector = "MAIN_SPOT_PTR",
								movable = true,
								proto = <table 7>,
								typename = "argumentlight"
							} },
						typename = "collection"
					} },
				typename = "collection"
			},
			[7] = {
				lights = { {
						lights = { {
								angular_velocity = 4.1887902047864,
								argument = -1,
								connector = "RED_BEACON",
								flood_light_argument = 193,


        /// Items (origins) in an origin group.
        /// </summary>
        public readonly ImmutableArray<Outputs.DistributionOriginGroupMember> Items;
        /// <summary>
        /// The number of origins in an origin group.
        /// </summary>
        public readonly int Quantity;

        [OutputConstructor]
        private DistributionOriginGroupMembers(
            ImmutableArray<Outputs.DistributionOriginGroupMember> items,

            int quantity)
        {
            Items = items;
            Quantity = quantity;
        }
    }
}


x-progressBar-fillColor {
    transition: transform 1s linear;
}

.progress-bar__slider {
    transition: left 1s linear;
}

/* progress bar moves instant if clicked */
*:has(.x-progressBar-fillColor, .progress-bar__slider):active :is(.x-progressBar-fillColor, .progress-bar__slider) {
    transition-duration: 0.001s;
}

/* right sidebar text */
.Root__right-sidebar {
    --text-base: var(--spice-sidebar-text);
    --background-tinted-base: var(--spice-tab-active);
}

.Root__right-sidebar a,
.Root__right-sidebar .main-trackInfo-artists a,
.artist-artistOnTour-timeAndVenue.artist-artistOnTour-condensed,
.Root__right-sidebar .main-nowPlayingView-creditsSource,
.Root__right-sidebar .main-nowPlayingView-playNextButton,
.Root__right-sidebar .main-nowPlayingView-playNext {
    color: var(--spice-sidebar-text);
}

.main-nowPlayingView-content {
    --text-subdued: var(--spice-sidebar-text);
}

/* add main backshadow */
#dribbblish-back-shadow {
    z-index: 5;
    grid-area: main-view / main-view / now-playing-bar / main-view;
    box-shadow: 0 0 10px 3px #0000003b;
    border-radius: var(--corner-radius);
    pointer-events: none;
}

/* add fade effect to playlist scrolllist */
.os-viewport.os-viewport-native-scrollbars-invisible[fade="full"] {
    -webkit-mask-image: linear-gradient(transparent 0%, black 10%, black 90%, transparent 100%);
    mask-image: linear-gradient(transparent 0%, black 10%, black 90%, transparent 100%);
}

.os-viewport.os-viewport-native-scrollbars-invisible[fade="top"] {
    -webkit-mask-image: linear-gradient(transparent 0%, black 10%);
    mask-image: linear-gradient(transparent 0%, black 10%);
}

.os-viewport.os-viewport-native-scrollbars-invisible[fade="bottom"] {
    -webkit-mask-image: linear-gradient(black 90%, transparent 100%);
    mask-image: linear-gradient(black 90%, transparent 100%);
}

/* style input els */
input {
    background-color: unset !important;
    border-bottom: solid 1px var(--spice-text) !important;
    border-radius: 0 !important;
    padding: 6px 10px 6px 48px;
    color: var(--spice-text) !important;
}

.Root__nav-bar input {
    border-bottom: solid 1px var(--spice-sidebar-text) !important;
    color: var(--spice-sidebar-text) !important;
}

.Root__nav-bar input::placeholder {
    color: rgba(var(--spice-rgb-sidebar-text), 0.5) !important;
}

/* fix connect bar styles */
.main-connectBar-connectBar {
    color: var(--spice-main) !important;
    border-radius: 0 0 var(--corner-radius) var(--corner-radius);
}

/* topbar play button */
.main-topBar-topbarContent .main-playButton-PlayButton>button>span {
    inline-size: 32px;
    block-size: 32px;
    min-block-size: auto;
}

.main-topBar-topbarContent .main-playButton-PlayButton svg {
    width: 18px;
    height: 18px;
}

.main-topBar-topbarContent .main-playButton-PlayButton>button>span>span {
    position:


bsm: T) => bsm.rssi)
        .takeRight(3)
        .reverse()
        .value()

    return maxBsms
}

export const setColorByMaxRssi: (bsms: BSM[], maxBsms: BSM[]) => void = (bsms: BSM[], maxBsms: BSM[]) => {
    bsms.forEach((bsm: BSM) => setStrokeWidth(bsm.object, 0))
    maxBsms.forEach((bsm: BSM) => {
        setStrokeWidth(bsm.object, 3)
    })
}

/** Координаты вектора на плоскости */
type Vector = [number, number]

/** Коэффициенты уравнения прямой */
type LineOdds = [number, number, number]

/** Вычисление вектора по двум точкам */
const directionVector: (point_1: IPoint, point_2: IPoint) => Vector = (point_1: IPoint, point_2: IPoint) => {
    return [point_2.x - point_1.x, point_2.y - point_1.y]
}

/** Вычисляет точку пресечения медиан треугольника */
const triangleCenter: (point_1: IPoint, point_2: IPoint, point_3: IPoint) => IPoint = (point_1: IPoint, point_2: IPoint, point_3: IPoint) => {
   return {
        x: (point_1.x + point_2.x + point_3.x) / 3,
        y: (point_1.y + point_2.y + point_3.y) / 3
    }
}

/** Вычисление коэффициентов прямой по направляющему вектору и точке этой прямой */
const lineEquationByPointAndVector: (point: IPoint, vector: Vector) => LineOdds = (point: IPoint, vector: Vector) => {
    const x0 = point.x
    const y0 = point.y

    const [ax, ay] = vector

    const a = ay
    const b = -ax
    const c = (ax * y0 - ay * x0)

    return [a, b, c]
}

/** Ближайшая точка к данной на прямой */
const nearestPointOnTheLine: (point: IPoint, line: LineOdds) => IPoint = (point: IPoint, line: LineOdds) => {
    const [a, b, c] = line

    const x0 = point.x
    const y0 = point.y

    const module = a ** 2 + b ** 2

    const x = (b * (b * x0 - a * y0) - a * c) / module
    const y = (a * (-b * x0 + a * y0) - b * c) / module

    return { x, y }
}

/** Возвращает точку делящую точку в отношении fraction */
const pointByFraction: (point_1: IPoint, point_2: IPoint, fraction: number) => IPoint = (point_1: IPoint, point_2: IPoint, fraction: number) => {
    const x = (point_1.x + fraction * point_2.x) / (1 + fraction)
    const y = (point_1.y + fraction * point_2.y) / (1 + fraction)
    return { x, y }
}

/** Вычисление площади треугольника по трем точкам */
const triangleArea: (point_1: IPoint, point_2: IPoint, point_3: IPoint) => number = (point_1: IPoint, point_2: IPoint, point_3:IPoint) => {
    const [x1, y1] = [point_1.x, point_1.y]
    const [x2, y2] = [point_2.x, point_2.y]
    const [x3, y3] = [point_3.x, point_3.y]


ert hast
* Erstelle und bearbeite Gruppen von Kanälen (um das Durchsuchen und Organisieren zu vereinfachen)
* Durchsuche Video Feeds, die aus deinen Kanalgruppen entstehen
* Schaue dir deinen Verlauf an und durchsuche ihn
* Suche und schaue dir Playlists an (Es handelt sich um „Remote Playlists“, die also vom Dienst abgerufen werden, den du gerade durchsuchst)
* Erstelle und bearbeite lokale Playlists (diese werden lediglich in der App gespeichert, also nicht im jeweiligen Dienst!)
* Nutze Videos/Audio/Untertitel offline
* Mit Kodi Medien öffnen
* Schaue oder blockiere altergeschützten Inhalt

## Installation und Updates
NewPipe kann über einer der folgenden Methoden installiert werden:
 1. Füge unser Custom Repo in F-Droid hinzu und installiere es von dort. Die Anleitung dafür findest du hier: https://newpipe.net/FAQ/tutorials/install-add-fdroid-repo/
 2. Lade die APK direkt von den [GitHub Releases](https://github.com/TeamNewPipe/NewPipe/releases) herunter und installiere es manuell.
 3. Updates via F-Droid.
 Das ist dia langsamste Methode, Updates zu fahren. Da F-Droid selbst Veränderungen erkennen, die APK erstellen, signieren, und dann das Update den Benutzern bereitstellen muss.
 4. Erstelle selbst die APK.
 Das ist die beste Methode, um neue Features schnellstmöglich zu bekommen, aber auch sehr kompliziert und umständlich.
 Wir raten dir daher zu einer der anderen Methoden.
 5. Falls du an einem konkreten Feature oder Bugfix interessiert bist, welches/r in einem Pull Request in dieser Repo adressiert wird, kannst du auch die APK aus dem PR direkt beziehen.
 Lies dir die PR Beschreibung für entsprechende Anweisungen durch. Das Gute an PR-spezifischen APKs ist, dass sie parallel zu der offiziellen App installiert werden.
 Du musst also nicht fürchten, dass deine Daten verloren gehen oder irgendetwas kaputt geht.

Für die meisten Benutzer empfehlen wir die erste Methode.
APKs, die mit Methode 1 oder 2 installiert wurden, sind untereinander kompatibel (d.h. wenn NewPipe mit Methode 1 installiert wurde, kann es trotzdem mit Methode 2 aktualisiert werden und vice versa) - aber nicht mit Methode 3.
Das liegt daran, dass Methode 1 und 2 den gleichen Signierschlüssel benutzen (unseren), während Methode 3 einen anderen benutzt (den von F-Droid).
Eine mit Methode 4 gebaute Debug APK benutzt überhaupt gar keinen Schlüssel.
Das Signieren mit Schlüssel hilft, zu verhindern, dass Benutzer dazu verleitet werden, bösartige Updates zu installieren.
Bei Methode 5 wird für jede APK ein zufälliger Signierschlüssel von GitHub Actions generiert, d.h. Updates sind unmöglich.
Bei jeder neuen APK Installation muss ein Backup gemacht werden und die Daten wiederhergestellt werden.

Falls du aus welchem Grund auch immer die Quelle (Methode) ändern willst (z.B. weil irgendetwas in NewPipe nicht mehr funktioniert und F-Droid nicht das neuste Update mit dem Fix hat), empfehlen wir folgende Herangehensweise:
1. Mache ein Back-up über


动](#字节跳动) | [滴滴](#滴滴) | [网易](#网易) | [京东](#京东) | [小红书](#小红书) | [SHEIN](#SHEIN) | [携程](#携程) | [美团](#美团) | [小米](#小米)

本页内容发布于2025年06月11日，共有153个岗位信息。

## 腾讯

#### [芯片验证工程师](http://careers.tencent.com/jobdesc.html?postId=1836235368261771264)

📍 深圳 | ⌛ 三年以上工作经验

职位描述

1.负责芯片的验证工作，包括：芯片验证的全流程，负责模块级、系统级芯片验证；

2.负责制定验证方案和验证计划，分解测试点，搭建验证环境；

3.负责根据测试点编写验证用例，开展功能测试、性能测试、功耗测试；

4.负责门仿和后仿验证；

5.配合设计、硬件加速、软件团队进行系统测试和问题定位，复现原型或硬件加速问题；

6.负责验证交付质量，开展各项质量活动，进行代码覆盖率和功能覆盖率分析，保障验证交付质量；

7.参与芯片研发全周期的验证工作，包括Bringup和样片测试。

---

#### [解决方案架构师](http://careers.tencent.com/jobdesc.html?postId=1899108457194270720)

📍 深圳 | ⌛ 三年以上工作经验

职位描述

1.负责制定和优化解决方案架构，确保技术方案的可行性和创新性；

2.与产品、研发、销售等部门紧密合作，理解客户需求并提供专业的解决方案建议；

3.引领技术团队进行技术选型和设计，确保项目按时按质完成；

4.参与重大项目的前期规划和后期实施，提供技术支持和风险评估；

5.持续跟踪行业发展趋势，提升解决方案的竞争力和市场适应性。

---

#### [云存储系统测试工程师](http://careers.tencent.com/jobdesc.html?postId=1638005574807330816)

📍 武汉 | ⌛ 两年以上工作经


y,
            defaultDeserializer : (data:any) => any
        ):boolean
        {
            if (this.transports[name] !== undefined) return false;

            this.transports[name] = {
                createClient: createClient,
                createServer: createServer,
                script:clientScript,
                serialize:defaultSerializer,
                deserialize:defaultDeserializer
            }
        }
        static get (name)
        {
            if (name != 'webrtc')
            {
                //console.log('* using primus:' + name);
                //settings.transport =  'primus';
                return this.transports['primus'];
            }
            else
            {
                //console.log('* using ' + name);
                return this.transports[name];
            }

        }
    }
}

import { expect } from 'chai';
import base64k from '../src/index';

let eq = (a: string, b: string) => {
    return () => {
        expect(a).equal(b);
    }
}

describe("encode_without_key", () => {
    it("herudi => aGVydWRp", eq(base64k.encode("herudi"),"aGVydWRp"));
    it("adf => YWRm", eq(base64k.encode("adf"),"YWRm"));
    it("678&sshttp => Njc4JnNzaHR0cA==", eq(base64k.encode("678&sshttp"),"Njc4JnNzaHR0cA=="));
    it("https://github.com/ => aHR0cHM6Ly9naXRodWIuY29tLw==", eq(base64k.encode("https://github.com/"),"aHR0cHM6Ly9naXRodWIuY29tLw=="));
    it("###$jah => IyMjJGphaA==", eq(base64k.encode("###$jah"),"IyMjJGphaA=="));
});

describe("decode_without_key", () => {
    it("aGVydWRp => herudi", eq(base64k.decode("aGVydWRp"),"herudi"));
    it("YWRm => adf", eq(base64k.decode("YWRm"),"adf"));
    it("Njc4JnNzaHR0cA== => 678&sshttp", eq(base64k.decode("Njc4JnNzaHR0cA=="),"678&sshttp"));
    it("aHR0cHM6Ly9naXRodWIuY29tLw== => https://github.com/", eq(base64k.decode("aHR0cHM6Ly9naXRodWIuY29tLw=="),"https://github.com/"));
    it("IyMjJGphaA== => ###$jah", eq(base64k.decode("IyMjJGphaA=="),"###$jah"));
});

describe("encode_with_key (12Jkl3qwe)", () => {
    let samplekey = "12Jkl3qwe";
    it("herudi => WVc4Hgha", eq(base64k.encode("herudi", samplekey),"WVc4Hgha"));
    it("adf => UFYs", eq(base64k.encode("adf", samplekey),"UFYs"));
    it("678&sshttp => BwVyTR9AGQMRQQ==", eq(base64k.encode("678&sshttp", samplekey),"BwVyTR9AGQMRQQ=="));
    it("https://github.com/ => WUY+Gx8JXlgCWEYiHg4dEhgIHg==", eq(base64k.encode("https://github.com/", samplekey),"WUY+Gx8JXlgCWEYiHg4dEhgIHg=="));
    it("###$jah => EhFpTwZSGQ==", eq(base64k.encode("###$jah", samplekey),"EhFpTwZSGQ=="));
});

describe("decode_with_key (12Jkl3qwe)", () => {
    let samplekey = "12Jkl3qwe";
    it("WVc4Hgha => herudi", eq(base64k.decode("WVc4Hgha", samplekey),"herudi"));
    it("UFYs => adf", eq(base64k.decode("UFYs", samplekey),"adf"));
    it("BwVyTR9AGQMRQQ== => 678&sshttp", eq(base64k.decode("BwVyTR9AGQMRQQ==", samplekey),"678&sshttp"));
    it("WUY+Gx8JXlgCWEYiHg4dEhgIHg== => https://github.com/", eq(base64k.decode("WUY+Gx8JXlgCWE


/',
        Uri.resolve('http://www.fark.com/search/', '//www.google.com/')
            .toString());
  },

  testQueryResolution() {
    assertEquals(
        'http://www.google.com/search?q=new%20search',
        Uri.parse('http://www.google.com/search?q=old+search')
            .resolve(Uri.parse('?q=new%20search'))
            .toString());

    assertEquals(
        'http://www.google.com/search?q=new%20search',
        Uri.parse('http://www.google.com/search?q=old+search#hi')
            .resolve(Uri.parse('?q=new%20search'))
            .toString());
  },

  testFragmentResolution() {
    assertEquals(
        'http://www.google.com/foo/bar?q=hi#there',
        Uri.resolve('http://www.google.com/foo/bar?q=hi', '#there').toString());

    assertEquals(
        'http://www.google.com/foo/bar?q=hi#there',
        Uri.resolve('http://www.google.com/foo/bar?q=hi#you', '#there')
            .toString());
  },

  testBogusResolution() {
    const uri = Uri.parse('some:base/url')
                    .resolve(Uri.parse('a://completely.different/url'));
    assertEquals('a://completely.different/url', uri.toString());
  },

  testDotSegmentsRemovalRemoveLeadingDots() {
    // Test removing leading "../" and "./"
    assertEquals('bar', Uri.removeDotSegments('../bar'));
    assertEquals('bar', Uri.removeDotSegments('./bar'));
    assertEquals('bar', Uri.removeDotSegments('.././bar'));
    assertEquals('bar', Uri.removeDotSegments('.././bar'));
  },

  testDotSegmentRemovalRemoveSingleDot() {
    // Tests replacing "/./" with "/"
    assertEquals('/foo/bar', Uri.removeDotSegments('/foo/./bar'));
    assertEquals('/bar/', Uri.removeDotSegments('/bar/./'));

    // Test replacing trailing "/." with "/"
    assertEquals('/', Uri.removeDotSegments('/.'));
    assertEquals('/bar/', Uri.removeDotSegments('/bar/.'));
  },

  testDotSegmentRemovalRemoveDoubleDot() {
    // Test resolving "/../"
    assertEquals('/bar', Uri.removeDotSegments('/foo/../bar'));
    assertEquals('/', Uri.removeDotSegments('/bar/../'));

    // Test resolving trailing "/.."
    assertEquals('/', Uri.removeDotSegments('/..'));
    assertEquals('/', Uri.removeDotSegments('/bar/..'));
    assertEquals('/foo/', Uri.removeDotSegments('/foo/bar/..'));
  },

  testDotSegmentRemovalRemovePlainDots() {
    // RFC 3986, section 5.2.4, point 2.D.
    // Test resolving plain ".." or "."
    assertEquals('', Uri.removeDotSegments('.'));
    assertEquals('', Uri.removeDotSegments('..'));
  },

  testPathConcatenation() {
    // Check accordenance with RFC 3986, section 5.2.4
    assertResolvedEquals('bar', '', 'bar');
    assertResolvedEquals('/bar', '/', 'bar');
    assertResolvedEquals('/bar', '/foo', '/bar');
    assertResolvedEquals('/foo/foo', '/foo/bar', 'foo');
  },

  testPathConcatenationDontRemoveForEmptyUri() {
    // Resolving URIs with empty path should not result in dot segments removal.
    // See: algorithm in section 5.2.2: code inside 'if (R.path == "")' clause.
    assertResolvedEquals('/search/../foo', '/search/../foo', '');
    assertResolvedEquals('/search/./


row: &actix::Addr<RowActor>) {
///     row.do_send(woab::Remove);
/// }
/// ```
pub use woab_macros::Removable;

/// Helper macro for extracting signal parameters from [`woab::Signal`](crate::Signal).
///
/// ```rust
/// # let _ = |msg: woab::Signal| {
/// let woab::params!(
///     _,
///     param1: String,
///     param2,
/// ) = msg.params()?; // `msg` is the `woab::Signal`
/// # woab::SignalResult::Ok(None)
/// # };
/// ```
///
/// All the signal parameters must be matched against, but `_` can be used for unneeded parameters.
/// Parameters with types will be converted to that type, and untyped parameters will be
/// `&glib::Value`.
pub use woab_macros::params;

/// Generate methods for setting/getting the widgets' data.
///
/// Useful for syncing the view with a model - use struct literals and struct destructuring on the
/// generated getter and setter structs to make rust-analyzer complete the fields and warn about
/// neglected fields. Usually used together with [`WidgetsFromBuilder`].
///
/// This derive will generate two helper structs:
/// * `StructNamePropSetter` which can be used in
///   [`set_props`](crate::prop_sync::SetProps::set_props) to set the widgets' data.
/// * `StructNamePropGetter` which can be used in
///   [`get_props`](crate::prop_sync::GetProps::get_props) to get the widgets' data.
///
/// The annotated struct will implement [`SetProps`](crate::prop_sync::SetProps) and
/// [`GetProps`](crate::prop_sync::GetProps), but also implement these two methods inherently so
/// the traits will not need to be imported in order to use them.
///
/// Annotate fields with `#[prop_sync(set)]` to include them in the setter and with
/// `#[prop_sync(get)]` to include them in the getter.
///
/// Use `#[prop_sync("property-name": PropertyType)]` to set the property that will be used for the
/// syncing and its type. If `PropertyType` is a reference (`&PropertyType`), the reference will be
/// used for the setter (the macro will add a lifetime) and its
/// [`ToOwned::Owned`](std::borrow::ToOwned::Owned) will be used for the getter.
///
/// There is no need to set a property for some common widgets (like `gtk::Entry`) - they already
/// implement [`SetProps`](crate::prop_sync::SetProps) and
/// [`GetProps`](crate::prop_sync::GetProps), so the macro will use the traits to set/get the data.
/// Similarly, structs that use this derive implement these two traits so they can be used with
/// [`WidgetsFromBuilder`]'s `#[widget(nested)]`.
///
/// ```no_run
/// #[derive(woab::WidgetsFromBuilder, woab::PropSync)]
/// struct AppWidgets {
///     // Not included in the prop-sync because we are not syncing it.
///     main_window: gtk::ApplicationWindow,
///
///     #[prop_sync(set, get)]
///     some_text: gtk::Entry,
///
///     // Combo boxes use the active-id property to select a row in their model.
///     #[prop_sync("active-id": &str, set, get)]
///     some_combo_box: gtk::ComboBox,
///
///     // We only want to get the value of this checkbox, not set it, so we don't generate a setter.
///     #[prop_sync("active": bool, get)]
///     some_check_box:


, Encodable};

pub use self::serialize::{SpecializationError, SpecializedEncoder, SpecializedDecoder};
pub use self::serialize::{UseSpecializedEncodable, UseSpecializedDecodable};

mod serialize;
mod collection_impls;

pub mod hex;
pub mod json;

pub mod opaque;
pub mod leb128;

mod rustc_serialize {
    pub use serialize::*;
}
<filename>stratepig_server/error.rs<gh_stars>1-10
#[derive(Debug)]
pub enum StratepigError {
    Core(stratepig_core::Error),

    AssumeWrongId,
    MissingContext,
    Unspecified,
    Default(String),
}

impl StratepigError {
    pub fn with(msg: &str) -> Self {
        Self::Default(msg.to_owned())
    }
}

impl From<stratepig_core::Error> for StratepigError {
    fn from(err: stratepig_core::Error) -> StratepigError {
        StratepigError::Core(err)
    }
}
<reponame>dooley/vrp<filename>vrp-core/tests/unit/construction/constraints/pipeline_test.rs
use crate::construction::constraints::*;
use crate::construction::heuristics::{ActivityContext, RouteContext, SolutionContext};
use crate::helpers::models::solution::{test_activity_without_job, test_actor};
use crate::models::common::Cost;
use crate::models::problem::Job;
use std::slice::Iter;
use std::sync::Arc;

struct TestConstraintModule {
    state_keys: Vec<i32>,
    constraints: Vec<ConstraintVariant>,
}

impl ConstraintModule for TestConstraintModule {
    fn accept_insertion(&self, _solution_ctx: &mut SolutionContext, _route_index: usize, _job: &Job) {
        unimplemented!()
    }

    fn accept_route_state(&self, _ctx: &mut RouteContext) {
        unimplemented!()
    }

    fn accept_solution_state(&self, _ctx: &mut SolutionContext) {
        unimplemented!()
    }

    fn state_keys(&self) -> Iter<i32> {
        self.state_keys.iter()
    }

    fn get_constraints(&self) -> Iter<ConstraintVariant> {
        self.constraints.iter()
    }
}

struct TestHardActivityConstraint {
    violation: Option<ActivityConstraintViolation>,
}

struct TestSoftActivityConstraint {
    cost: Cost,
}

impl HardActivityConstraint for TestHardActivityConstraint {
    fn evaluate_activity(
        &self,
        _route_ctx: &RouteContext,
        _activity_ctx: &ActivityContext,
    ) -> Option<ActivityConstraintViolation> {
        self.violation.clone()
    }
}

impl SoftActivityConstraint for TestSoftActivityConstraint {
    fn estimate_activity(&self, _route_ctx: &RouteContext, _activity_ctx: &ActivityContext) -> Cost {
        self.cost
    }
}

#[test]
fn can_evaluate_hard_activity_constraints() {
    let mut pipeline = ConstraintPipeline::default();
    pipeline.add_module(Box::new(TestConstraintModule {
        state_keys: vec![1, 2],
        constraints: vec![ConstraintVariant::HardActivity(Arc::new(TestHardActivityConstraint { violation: None }))],
    }));
    pipeline.add_module(Box::new(TestConstraintModule {
        state_keys: vec![3, 4],
        constraints: vec![ConstraintVariant::HardActivity(Arc::new(TestHardActivityConstraint {
            violation: Some(ActivityConstraintViolation { code: 5, stopped:


                      var(--annex-search-dm-chip-anchor-color,                        rgba(255, 255, 255, 0.75));
}
/*! jQuery Mobile 1.4.5 | Git HEADhash: 68e55e7 <> 2014-10-31T17:33:30Z | (c) 2010, 2014 jQuery Foundation, Inc. | jquery.org/license */

.ui-mobile,.ui-mobile body{height:99.9%}.ui-mobile fieldset,.ui-page{padding:0;margin:0}.ui-mobile a img,.ui-mobile fieldset{border-width:0}.ui-mobile fieldset{min-width:0}@-moz-document url-prefix(){.ui-mobile fieldset{display:table-column;vertical-align:middle}}.ui-mobile-viewport{margin:0;overflow-x:visible;-webkit-text-size-adjust:100%;-ms-text-size-adjust:none;-webkit-tap-highlight-color:rgba(0,0,0,0)}body.ui-mobile-viewport,div.ui-mobile-viewport{overflow-x:hidden}.ui-mobile [data-role=page],.ui-mobile [data-role=dialog],.ui-page{top:0;left:0;width:100%;min-height:100%;position:absolute;display:none;border:0}.ui-page{outline:0}.ui-mobile .ui-page-active{display:block;overflow:visible;overflow-x:hidden}@media screen and (orientation:portrait){.ui-mobile .ui-page{min-height:420px}}@media screen and (orientation:landscape){.ui-mobile .ui-page{min-height:300px}}.ui-mobile-rendering>*{visibility:hidden}.ui-nojs{position:absolute!important;height:1px;width:1px;overflow:hidden;clip:rect(1px,1px,1px,1px)}.ui-loading .ui-loader{display:block}.ui-loader{display:none;z-index:9999999;position:fixed;top:50%;left:50%;border:0}.ui-loader-default{background:0;filter:Alpha(Opacity=18);opacity:.18;width:2.875em;height:2.875em;margin-left:-1.4375em;margin-top:-1.4375em}.ui-loader-verbose{width:12.5em;filter:Alpha(Opacity=88);opacity:.88;box-shadow:0 1px 1px -1px #fff;height:auto;margin-left:-6.875em;margin-top:-2.6875em;padding:.625em}.ui-loader-default h1{font-size:0;width:0;height:0;overflow:hidden}.ui-loader-verbose h1{font-size:1em;margin:0;text-align:center}.ui-loader .ui-icon-loading{background-color:#000;display:block;margin:0;width:2.75em;height:2.75em;padding:.0625em;-webkit-border-radius:2.25em;border-radius:2.25em}.ui-loader-verbose .ui-icon-loading{margin:0 auto .625em;filter:Alpha(Opacity=75);opacity:.75}.ui-loader-textonly{padding:.9375em;margin-left:-7.1875em}.ui-loader-textonly .ui-icon-loading{display:none}.ui-loader-fakefix{position:absolute}.ui-bar,.ui-body{position:relative;padding:.4em 1em;overflow:hidden;display:block;clear:both}.ui-bar h1,.ui-bar h2,.ui-bar h3,.ui-bar h4,.ui-bar h5,.ui-bar h6{margin:0;padding:0;font-size:1em;display:inline-block}.ui-header,.ui-footer{border-width:1px 0;border-style:solid;position:relative}.ui-header:empty,.ui-footer:empty{min-height:2.6875em}.ui-header .ui-title,.ui-footer .ui-title{font-size:1em;min-height:1.1em;text-align:center;display:block;margin:0 30%;padding:.7em 0;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;outline:0!important}.ui-footer .ui-title{margin:0 1em}.ui-content{border-width:0;overflow:visible;overflow-x:hidden;padding:1em}.ui-corner-all>.ui


�入淡出"
L["Alpha Key"] = "單位元 Alpha 通道混合"
L["Alpha"] = "透明度"
L["ALT_KEY_TEXT"] = "Alt"
L["Always Display"] = "總是顯示"
L["Always Show Player"] = "總是顯示玩家"
L["Always Show Realm"] = "總是顯示伺服器"
L["Always Split Professions"] = true
L["Anchor Point"] = "定位方向"
L["Anchor"] = "定位"
L["Anima Diversion"] = true
L["Announce Interrupts"] = "斷法通告"
L["Announce when you interrupt a spell to the specified chat channel."] = "在指定對話頻道通知斷法信息."
L["Another Players Pet"] = true
L["Any"] = "任意"
L["Applies the font and font size settings throughout the entire user interface. Note: Some font size settings will be skipped due to them having a smaller font size by default."] = "把該字體設置應用到所有ElvUI設置中去,但是某些設置並不會被改變."
L["Apply Font To All"] = "應用字體到所有"
L["Apply this filter if a buff has remaining time greater than this. Set to zero to disable."] = "當增益剩餘時間大於此值時使用此過濾器,設為0來停用"
L["Apply this filter if a buff has remaining time less than this. Set to zero to disable."] = "當增益剩餘時間小於此值時使用此過濾器,設為0來停用"
L["Apply this filter if a debuff has remaining time greater than this. Set to zero to disable."] = "當減益剩餘時間大於此值時使用此過濾器,設為0來停用"
L["Apply this filter if a debuff has remaining time less than this. Set to zero to disable."] = "當減益剩餘時間小於此值時使用此過濾器,設為0來停用"
L["Apply To All"] = "應用到所有"
L["Archaeology Frame"] = "考古學框架"
L["Are you sure you want to reset ActionBars settings?"] = "你確定你要重置快捷列的設定?"
L["Are you sure you want to reset Auras settings?"] = "你確定你要重置光環的設定?"
L["Are you sure you want to reset Bags settings?"] = "你確定你要重置背包的設定?"
L["Are you sure you want to reset Chat settings?"] = "你確定你要重置對話框的設定?"
L["Are you sure you want to reset Cooldown settings?"] = "你確定你要重置冷卻的設定?"
L["Are you sure you want to reset DataBars settings?"] = "你確定你要重置數據條的設定?"
L["Are you sure you want to reset DataTexts settings?"] = "你確定你要重置資訊文字的設定?"
L["Are you sure you want to reset General settings?"] = "你確定你要重置常規選項的設定?"
L["Are you sure you want to reset NamePlates settings?"] = "你確定你要重置姓名板的設定?"
L["Are you sure you want to r


us = 86611,
        SporeShooter = 86612,
        WorldTrigger = 59481,
        /// Fight
        SporeShooterFight = 79183,
        MindFungusFight = 79082,
        FungalFleshEater = 79092,
        LivingMushroom = 78884,
        RejuvenatingMush = 78868,
        InvisibleMan = 64693
    };

    enum eTalk
    {
        WarnInfestingSpores
    };

    boss_brackenspore(Creature* creature) : BossAI(creature, BossBrackenspore)
    {
        m_Instance = creature->GetInstanceScript();
        m_IntroDone = false;
    }

    EventMap m_Events;
    InstanceScript* m_Instance;
    EventMap m_CosmeticEvent;
    std::list<ObjectGuid> m_Creatures;
    bool m_IntroDone;
    std::vector<ObjectGuid> m_Flamethrowers;

    void Reset() override
    {
        m_Events.Reset();

        _Reset();

        me->RemoveAura(Berserker);
        me->RemoveAura(CreepingMossPeriodic);

        me->SetPower(POWER_RAGE, 0);
        me->SetMaxPower(POWER_RAGE, 500);

        me->RemoveFlag(UNIT_FIELD_FLAGS_2, UNIT_FLAG2_REGENERATE_POWER);

        me->RemoveAura(EnergyRegen);

        m_Instance->DoRemoveAurasDueToSpellOnPlayers(RotDot);
        m_Instance->DoRemoveAurasDueToSpellOnPlayers(FlamethrowerAura);
        m_Instance->DoRemoveAurasDueToSpellOnPlayers(BurningInfusion);
        m_Instance->SendEncounterUnit(ENCOUNTER_FRAME_DISENGAGE, me);

        ResetPlayersPower(me);

        if (!m_IntroDone)
        {
            me->SetUInt32Value(UNIT_FIELD_EMOTE_STATE, 438);

            AddDelayedEvent(1 * IN_MILLISECONDS, [this]() -> void
            {
                for (uint8 i = 0; i < MaxCreepingMoss; ++i)
                    me->CastSpell(creepingMossPo[i], CreepingMossAreaTrigger, true);
            });
        }
        else
        {
            me->SetUInt32Value(UNIT_FIELD_EMOTE_STATE, 0);

            if (m_Flamethrowers.empty())
            {
                std::list<Creature*> bfcs;
                me->GetCreatureListWithEntryInGrid(bfcs, BFC9000, 100.0f);

                for (Creature* creature : bfcs)
                {
                    creature->Respawn(true);
                    creature->CastSpell(creature, BFC9000, true);

                    if (creature->AI())
                        creature->AI()->Reset();

                    m_Flamethrowers.push_back(creature->GetGUID());
                }
            }
            else
            {
                for (auto guid : m_Flamethrowers)
                {
                    if (Creature* creature = Creature::GetCreature(*me, guid))
                    {
                        creature->Respawn(true);
                        creature->CastSpell(creature, BFC9000, true);

                        if (creature->AI())
                            creature->AI()->Reset();
                    }
                }
            }
        }
    }

    bool CanRespawn() override
    {
        return false;
    }

    void DoAction(int32 const action) override
    {
        switch (action)
        {
            case DoIntro:
            {
                m_IntroDone = true;

                std::list<Creature*> warmasters;
                me->GetCreatureListWithEntryInGrid(warmasters, IronWarmaster, 50.0f);

                if (!warmasters.empty())
                    warmasters.sort(Trinity::ObjectDistanceOrderPred(me, false));

                if (Creature* ironWar = (*warmasters.begin()))
                {
                    if (ironWar->GetAI())
                        ironWar->AI()->DoAction(DoIntro);


×yð}Ë±äâ2¨X(ZW)b'ý r0j&_néÍ[+ÀOÓBôñ¤b ú»	U<zU£f"ÀdVìeÑÕ1øn´Æ|$©Ü; rT®E¨èµÍIo==([S* øC'7Þ8²Ýõp¼Å¤¹éÌGXÆ0ÑÙn»5V)÷³´-íâ´ÍÉy÷v«ÜU¹'Ä½rªryå"´ÑÍÉ%¨^y6q?|¹«s/
øH/JùÆBµ>:À°ÇÒ©ÌkEÊ¢}ëæä#×&P
uÕZúQ¾ZÂ/#¯\µõr¶ÃÀ0ÑÙÎJ¦~Ä]Ä¿uÖTb£µ`DmãôÍÉgXF$5
T³5,6?P(ÑÌ0z>Ë'zl0=äãfë¢díáKïg¶±±²º'Î¥Ùd»··z°¦º_õÈê_û§·«PÝÝC`ÍSl¦CB-< x }k=Ð%Ö¶"nqfÓÙÂiìSØ£%µaµÝÚ¶µæ)zfÓõÂÉ²yïU©ÂÀ#'i=Á@S1É7	²1ò0WÑ7®>6Î&;Ï¸Rþî¢¤ÌEº	¢2ÅwzXõàÉ{´³>/tyâFÐbkôr³	Qù$áç
ÄÌÚeÈ4KÒé8öÈ¾UKMëÅ¦M;þÉÊû6-×KÍôÒVT>Ä@EÃ0=i¶¤Õ©ôJ³%«Þ[4õâ`d>þJîù¨£åò·!=Ôñ.økÌ~M«Ùi7½w³å\.o@#¤£]À¶nO#Ö¹,"mA¾¦O æþ)4ÉÜkÖ¹¿ÊèDÒÃPð,å_* ÂÉåºÏ²Ë0 ß¾(µùz¡Ùr&Ëû±EùÝ7§üµ½íy<²>¾jÊÅ55æpÜ)'n@ØÀ®w¡ì:"¹Ç+	3¶ç·]ú¬B«ÆQ¡* ¼jdU8ÞaµÎÌ±ù+¯§Aòzòi'øÜ_ïßr÷KWnãçûÔbÎ|¾læLHrÖz'5óV¦~Pê	¥^(¸¥¾RqW0èMÒÓæ;,²iNqºfëÏü«Y®'ûlFr»dÞ{uàVQ»Ý]/6ÛRm2Ù´Z¯k¶%]ð½EYP¸oÙKÝ!ç8WeH³ÍÂ}â|mi	Û+h* vWlØÍ


.include "macros.inc"

.section .text, "ax"  # 0x80006980 - 0x803E1E60

.global func_8021D424
func_8021D424:
/* 8021D424 00219084  94 21 FF E0 */	stwu r1, -0x20(r1)
/* 8021D428 00219088  7C 08 02 A6 */	mflr r0
/* 8021D42C 0021908C  90 01 00 24 */	stw r0, 0x24(r1)
/* 8021D430 00219090  39 61 00 20 */	addi r11, r1, 0x20
/* 8021D434 00219094  4B FA 9C F5 */	bl _savegpr_27
/* 8021D438 00219098  7C 7C 1B 78 */	mr r28, r3
/* 8021D43C 0021909C  7C 9D 23 78 */	mr r29, r4
/* 8021D440 002190A0  4B FF FC A1 */	bl func_8021D0E0
/* 8021D444 002190A4  C0 02 9B 84 */	lfs f0, lbl_80642184-_SDA2_BASE_(r2)
/* 8021D448 002190A8  3C 60 80 42 */	lis r3, lbl_80423B70@ha
/* 8021D44C 002190AC  38 A0 00 00 */	li r5, 0
/* 8021D450 002190B0  C0 22 9B 80 */	lfs f1, lbl_80642180-_SDA2_BASE_(r2)
/* 8021D454 002190B4  38 80 00 01 */	li r4, 1
/* 8021D458 002190B8  38 63 3B 70 */	addi r3, r3, lbl_80423B70@l
/* 8021D45C 002190BC  38 00 00 FF */	li r0, 0xff
/* 8021D460 002190C0  90 7C 00 0C */	stw r3, 0xc(r28)
/* 8021D464 002190C4  3B C0 00 00 */	li r30, 0
/* 8021D468 002190C8  38 60 00 00 */	li r3, 0
/* 8021D46C 002190CC  93 BC 00 10 */	stw r29, 0x10(r28)
/* 8021D470 002190D0  90 BC 00 14 */	stw r5, 0x14(r28)
/* 8021D474 002190D4  90 BC 00 18 */	stw r5, 0x18(r28)
/* 8021D478 002190D8  B0 BC 00 1C */	sth r5, 0x1c(r28)
/* 8021D47C 002190DC  98 BC 00 1E */	stb r5, 0x1e(r28)
/* 8021D480 002190E0  98 9C 00 1F */	stb r4, 0x1f(r28)
/* 8021D484 002190E4  98 9C 00 20 */	stb r4, 0x20(r28)
/* 8021D488 002190E8  98 9C 00 21 */	stb r4, 0x21(r28)
/* 8021D48C 002190EC  D0 3C 00 24 */	stfs f1, 0x24(r28)
/* 8021D490 002190F0  98 BC 00 28 */	stb r5, 0x28(r28)
/* 8021D494 002190F4  98 BC 00 29 */	stb r5, 0x29(r28)
/* 8021D498 002190F8  98 BC 00 2A */	stb r5, 0x2a(r28)
/* 8021D49C 002190FC  98 1C 00 2B */	stb


	// Copyright.
			.copyright {
				color: _palette(fg-light);
				font-size: 1rem;
				left: 50vw;
				position: relative;
				width: 50vw;

				a {
					color: inherit;
				}
			}

		// Pad.
			@include wrapper-pad($pad);

		@include breakpoint('<=large') {
			$pad: 4rem;

			// Pad.
				@include wrapper-pad($pad);

		}

		@include breakpoint('<=medium') {
			$pad: 4rem;

			padding: 0;

			// Background.
				&:before {
					display: none;
				}

			// Sections (all).
				section {
					grid-template-areas: "header" "content" "footer";
					grid-template-columns: 1fr;
					grid-template-rows: 3fr;

					> header {
						justify-self: start;
						padding: 0;
						text-align: left;
						width: 100%;

						ul.actions {
							justify-content: flex-start;
						}
					}

					> .content {
						padding: 0;
						width: 100%;
						overflow-x: hidden;
					}

					> footer {
						padding: 0;
						text-align: left;

						ul.actions {
							justify-content: flex-start;
						}
					}
				}

			// Sections (top level).
				> section {
					margin: 0;

					> header {
						background-attachment: fixed;
						background-color: _palette(accent);
						background-image: svg-url('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 920 1750" x="0px" y="0px"> <path style="fill: #{transparentize(_palette(accent-border), 0.5)}" d="M889.72,1137.55l-2.91-0.75l-364.39,282.94l-0.7-0.9l-0.51,0.11l-94.77-451.5l-32.51-15.75l-16.73-8.11l0,0.68 l-1.46,0l0-1.39l-1.89-0.92l-112.41-54.47l-0.29,1.03l-1.41-0.37l0.37-1.31l-34.14-16.54l-98.56-47.76l-0.59,0.81l-1.16-0.88 l0.42-0.57L11.43,766.33l-0.25,0.2l-0.9-1.15l102.87-79.98l0.08-0.1l0.02,0.02l116.68-90.72l-0.18-0.34l1.3-0.66l0.05,0.09 l100.5-78.14l-0.07-0.32l0.65-0.14l42.3-32.89l-0.15-54.54l-0.59,0.29l-0.64-1.31l1.23-0.6l-0.01-4.54l-0.


t.Assert.assertTrue;

import com.github.promeg.pinyinhelper.Pinyin;
import com.github.promeg.pinyinhelper.PinyinMapDict;

import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;

import java.util.HashMap;
import java.util.Map;

public class PinYinSearchUtilsTest {
    /**
     * Suite: testToPinyin
     *      Test whether the pinyin library that we depends on is reliable.
     * Case: when the input Chinese is simple.
     */
    @Test
    public void testToPinyinSimple(){
        assertEquals("ZHONG WEN CE SHI", PinYinSearchUtils.toPinyin("中文测试", " "));
        assertEquals("FAN TI CE SHI", PinYinSearchUtils.toPinyin("繁體測試", " "));
        assertEquals("DIAN ZI YOU JIAN", PinYinSearchUtils.toPinyin("电子邮件", " "));
        assertEquals("DIAN ZI YOU JIAN", PinYinSearchUtils.toPinyin("電子郵件", " "));
        assertEquals("XIANG CE", PinYinSearchUtils.toPinyin("相册", " "));
        assertEquals("RI LI", PinYinSearchUtils.toPinyin("日历", " "));
        assertEquals("SHE ZHI", PinYinSearchUtils.toPinyin("设置", " "));
        assertEquals("WEN JIAN GUAN LI", PinYinSearchUtils.toPinyin("文件管理", " "));
    }
    /**
     * Suite: testToPinyin
     *      Test whether the pinyin library that we depends on is reliable.
     * Case: when the input Chinese contains "Duoyinzi" (a single character
     * with multiple possible pinyin-s whose final pinyin is decided
     * by the specific context.)  .
     */
    @Test
    public void testToPinyinWhenDuoyinzi(){
        assertEquals("DIAN HUA BU", PinYinSearchUtils.toPinyin("电话薄", " "));
        assertEquals("DIAN HUA BU", PinYinSearchUtils.toPinyin("電話簿", " "));
        assertEquals("YIN YUE", PinYinSearchUtils.toPinyin("音乐", " "));
        assertEquals("WANG YI YUN YIN YUE", PinYinSearchUtils.toPinyin("网易云音乐", " "));
        assertEquals("WANG YI YUN YIN YUE", PinYinSearchUtils.toPinyin("網易雲音樂", " "));
        assertEquals("DE DAO", PinYinSearchUtils.toPinyin("得到", " "));
        assertEquals("ZHAN SHUANG PA MI SHI", PinYinSearchUtils.toPinyin("战双帕弥什", " "));
        assertEquals("SHEN ME ZHI DE MAI", PinYinSearchUtils.toPinyin("什么值得买", " "));
        assertEquals("GUO KE", PinYinSearchUtils.toPinyin("果壳", " "));
        assertEquals("CHONG QING YI DONG", PinYinSearchUtils.toPinyin("重庆移动", " "));
        assertEquals("CHONG QING YI DONG", PinYinSearchUtils.toPinyin("重慶移動", " "));
        assertEquals("CHONG QING LIAN TONG", PinYinSearchUtils.toPinyin("重庆联通", " "));
        assertEquals("DONG E CHUAN MEI", PinYinSearchUtils.toPinyin("东阿传媒", " "));
        assertEquals("PAN YU MIN SHENG KA", PinYinSearchUtils.toPinyin("番禺民生卡", " "));
        assertEquals("FAN QIE ZHONG", PinYinSearchUtils.toPinyin("番茄钟", " "));
        assertEquals("LE SHAN SHANG YE YIN HANG", PinYinSearchUtils.toPinyin("乐山商业银行", " "));
        assertEquals("ZHONG ZHUANG SHANG ZHEN", PinYinSearchUtils.toPinyin("重装上阵", " "));
        assertEquals("CHONG FAN DI GUO", PinYinSearchUtils.toPinyin("重返帝国", " "));


{
    '_id': '35474',
    'city': 'CYPRESS',
    'loc': [-87.615134, 32.978853],
    'pop': 2659,
    'state': 'AL'
  },
  {
    '_id': '35476',
    'city': 'NORTHPORT',
    'loc': [-87.591441, 33.283425],
    'pop': 20114,
    'state': 'AL'
  },
  {
    '_id': '35480',
    'city': 'RALPH',
    'loc': [-87.744984, 33.062868],
    'pop': 927,
    'state': 'AL'
  },
  {
    '_id': '35481',
    'city': 'REFORM',
    'loc': [-88.02027699999999, 33.395945],
    'pop': 4062,
    'state': 'AL'
  },
  {
    '_id': '35490',
    'city': 'VANCE',
    'loc': [-87.257362, 33.17498],
    'pop': 1234,
    'state': 'AL'
  },
  {
    '_id': '35501',
    'city': 'JASPER',
    'loc': [-87.249144, 33.871672],
    'pop': 30600,
    'state': 'AL'
  },
  {
    '_id': '35540',
    'city': 'ADDISON',
    'loc': [-87.194766, 34.205571],
    'pop': 3263,
    'state': 'AL'
  },
  {
    '_id': '35541',
    'city': 'ARLEY',
    'loc': [-87.182761, 34.063234],
    'pop': 2645,
    'state': 'AL'
  },
  {
    '_id': '35542',
    'city': 'BANKSTON',
    'loc': [-87.68965, 33.70083],
    'pop': 651,
    'state': 'AL'
  },
  {
    '_id': '35543',
    'city': 'BEAR CREEK',
    'loc': [-87.686083, 34.213469],
    'pop': 3748,
    'state': 'AL'
  },
  {
    '_id': '35544',
    'city': 'BEAVERTON',
    'loc': [-88.01567, 33.942877],
    'pop': 1014,
    'state': 'AL'
  },
  {
    '_id': '35546',
    'city': 'BERRY',
    'loc': [-87.622563, 33.694485],
    'pop': 4887,
    'state': 'AL'
  },
  {
    '_id': '35548',
    'city': 'BRILLIANT',
    'loc': [-87.756315, 34.037702],
    'pop': 2515,
    'state': 'AL'
  },
  {
    '_id': '35549',
    'city': 'CARBON HILL',
    'loc': [-87.540328, 33.909252],
    'pop': 3597,
    'state': 'AL'
  },
  {
    '_id': '35550',
    'city': 'CORDOVA',
    'loc': [-87.18406, 33.768033],
    'pop': 5273,
    'state': 'AL'
  },
  {
    '_id': '35552',
    'city': 'DETROIT',
    'loc': [-88.16063, 34.010874],
    'pop': 938,
    'state': 'AL'
  },
  {
    '_id': '35553',
    'city': 'DOUBLE SPRINGS',
    'loc': [-87.397431, 34.138682],
    'pop': 4797,
    '


()
    }
}
/*
 * SPDX-FileCopyrightText: 2021 The Calyx Institute
 * SPDX-License-Identifier: Apache-2.0
 */

package org.calyxos.backup.storage.backup

import org.calyxos.backup.storage.content.ContentFile
import org.calyxos.backup.storage.db.CachedChunk
import org.calyxos.seedvault.core.toHexString
import java.io.ByteArrayOutputStream
import java.io.IOException
import java.io.InputStream
import java.io.OutputStream
import java.security.GeneralSecurityException
import java.util.zip.ZipEntry
import java.util.zip.ZipOutputStream
import javax.crypto.Mac

private const val ZIP_CHUNK_SIZE_MAX = 7 * 1024 * 1024

internal data class ZipChunk(
    val id: String,
    val files: List<ContentFile>,
    val size: Long,
    var wasUploaded: Boolean = false,
) {
    fun toCachedChunk(size: Long) = CachedChunk(id, 0, size)
}

@Suppress("BlockingMethodInNonBlockingContext")
internal class ZipChunker(
    private val mac: Mac,
    private val chunkWriter: ChunkWriter,
    private val chunkSizeMax: Int = ZIP_CHUNK_SIZE_MAX,
) {

    private val files = ArrayList<ContentFile>()

    private val outputStream = ByteArrayOutputStream(chunkSizeMax)
    private var zipOutputStream = NameZipOutputStream(outputStream)

    // we start with 1, because 0 is the default value in protobuf 3
    private var counter = 1

    fun fitsFile(file: ContentFile): Boolean {
        return outputStream.size() + file.size <= chunkSizeMax
    }

    @Throws(IOException::class)
    fun addFile(file: ContentFile, inputStream: InputStream) {
        chunkWriter.writeNewZipEntry(zipOutputStream, counter, inputStream)
        files.add(file)
        counter++
    }

    /**
     * Finalizes the operation and returns a [ZipChunk] including the previous files.
     * This zip chunk will be uploaded to the backup storage.
     *
     * This object gets reset for the next operation.
     */
    @Throws(IOException::class, GeneralSecurityException::class)
    suspend fun finalizeAndReset(missingChunkIds: List<String>): ZipChunk = try {
        zipOutputStream.finish()
        zipOutputStream.close()

        val chunkId = mac.doFinal(outputStream.toByteArray()).toHexString()
        val zipChunk = ZipChunk(chunkId, files.toList(), outputStream.size().toLong())
        val wasUploaded = chunkWriter.writeZipChunk(zipChunk, outputStream, missingChunkIds)
        zipChunk.wasUploaded = wasUploaded

        zipChunk
    } finally {
        // reset the state of the zip chunker for the next operation even if an exception was thrown
        reset()
    }

    private fun reset() {
        files.clear()
        outputStream.reset()
        zipOutputStream = NameZipOutputStream(outputStream)
        counter = 1
    }
}

/**
 * A wrapper for [ZipOutputStream] that remembers the name of the last [ZipEntry] that was added.
 */
internal class NameZipOutputStream(outputStream: OutputStream) : ZipOutputStream(outputStream) {
    internal var lastName: String? = null
        private set

    override fun putNextEntry(e: ZipEntry) {
        super.putNextEntry(e)
        lastName = e.name
    }
}
/*
 * SPDX-FileCopyrightText: 2021 The Calyx Institute
 * SPDX-License-Identifier: Apache-2.0
 */

package org.calyxos.backup.storage.scanner

import android.net.Uri
import android.provider.DocumentsContract
import android.provider.MediaStore
import android.util.Log
import org.calyxos.backup.storage.api.EXTERNAL_STORAGE_PROVIDER_AUTHORITY
import org.calyxos.backup.storage.backup.Backup.Companion.SMALL_FILE_SIZE_MAX
import org.calyxos.backup.storage.content.ContentFile
import org.calyxos.backup.storage.content.DocFile
i


    final int refresh_histogram_rate_ms = 200;
        final long refresh_time = (want_zebra_stripes || want_focus_peaking) ? 40 : refresh_histogram_rate_ms;
        long time_now = System.currentTimeMillis();
        if( want_preview_bitmap && preview_bitmap != null && Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP &&
                !is_paused && !applicationInterface.isPreviewInBackground() &&
                !refreshPreviewBitmapTaskIsRunning() && time_now > last_preview_bitmap_time_ms + refresh_time ) {
            if( MyDebug.LOG )
                Log.d(TAG, "refreshPreviewBitmap");
            // even if we're running the background task at a faster rate (due to zebra stripes etc), we still update the histogram
            // at the standard rate
            boolean update_histogram = want_histogram && time_now > last_histogram_time_ms + refresh_histogram_rate_ms;
            if( MyDebug.LOG ) {
                Log.d(TAG, "update_histogram: " + update_histogram);
                Log.d(TAG, "want_histogram: " + want_histogram);
                Log.d(TAG, "time_now: " + time_now);
                Log.d(TAG, "last_preview_bitmap_time_ms: " + last_preview_bitmap_time_ms);
                Log.d(TAG, "last_histogram_time_ms: " + last_histogram_time_ms);
            }

            this.last_preview_bitmap_time_ms = time_now;
            if( update_histogram ) {
                this.last_histogram_time_ms = time_now;
            }
            refreshPreviewBitmapTask = new RefreshPreviewBitmapTask(this, update_histogram);
            refreshPreviewBitmapTask.execute();
        }
    }

    private void cancelRefreshPreviewBitmap() {
        if( MyDebug.LOG )
            Log.d(TAG, "cancelRefreshPreviewBitmap");
        if( refreshPreviewBitmapTaskIsRunning() ) {
            refreshPreviewBitmapTask.cancel(true);
            // we don't set refreshPreviewBitmapTask to null - this will be done by the task itself when it completes;
            // and we want to know when the task is no longer running (e.g., for freePreviewBitmap()).
        }
    }

    public boolean isVideo() {
        return is_video;
    }

    public boolean isVideoRecording() {
        return video_recorder != null && video_start_time_set;
    }

    public boolean isVideoRecordingPaused() {
        return isVideoRecording() && video_recorder_is_paused;
    }

    public long getVideoTime() {
        if( this.isVideoRecordingPaused() ) {
            return video_accumulated_time;
        }
        long time_now = System.currentTimeMillis();
        return time_now - video_start_time + video_accumulated_time;
    }

    public long getVideoAccumulatedTime() {
        return video_accumulated_time;
    }

    public int getMaxAmplitude() {
        return video_recorder != null ? video_recorder.getMaxAmplitude() : 0;
    }

    /** Returns the frame rate that the preview's surface or canvas view should be updated.
     */
    public long getFrameRate() {
    	/* See https://stackoverflow.com/questions/44594711/slow-rendering-when-updating-textview ,
    	   https://stackoverflow.com/questions/44233870/how-to-fix-slow-rendering-android-vitals -
    	   there is evidence that using an infrequent update actually results in poorer performance,
    	   due to devices running in a lower power state, but Google Play analytics do not take this
    	   into consideration. Thus we are forced to request updates at 60fps whether we need them
    	   or not. I can reproducing this giving improved performance on OnePlus 3T for old and
    	   Camera2 API. Testing suggests this does not seem to adversely affect battery life.
    	   This is limited to Android 7+, to avoid causing problems on older devices (which don't
    	   contribute to Google Analytics anyway).
    	 */


 /// <param name="right">The second <see cref="BoxShadows"/> collection to compare.</param>
        /// <returns>
        /// <c>true</c> if the two <see cref="BoxShadows"/> collections are not equal; otherwise, <c>false</c>.
        /// </returns>
        public static bool operator !=(BoxShadows left, BoxShadows right) =>
            !(left == right);
    }
}


] != ac->GetSeparator() && list[i])
					++i;
			}
			if (list[i] == ac->GetSeparator()) {
				++i;
				// preserve trailing separator as blank entry
				if (!list[i]) {
					indices.push_back(i);
					indices.push_back(i);
				}
			}
		}
		indices.push_back(i); // index of last position
	}

	bool operator()(int a, int b) {
		const int lenA = indices[a * 2 + 1] - indices[a * 2];
		const int lenB = indices[b * 2 + 1] - indices[b * 2];
		const int len  = std::min(lenA, lenB);
		int cmp;
		if (ac->ignoreCase)
			cmp = CompareNCaseInsensitive(list + indices[a * 2], list + indices[b * 2], len);
		else
			cmp = strncmp(list + indices[a * 2], list + indices[b * 2], len);
		if (cmp == 0)
			cmp = lenA - lenB;
		return cmp < 0;
	}
};

void AutoComplete::SetList(const char *list) {
	if (autoSort == SC_ORDER_PRESORTED) {
		lb->SetList(list, separator, typesep);
		sortMatrix.clear();
		for (int i = 0; i < lb->Length(); ++i)
			sortMatrix.push_back(i);
		return;
	}

	Sorter IndexSort(this, list);
	sortMatrix.clear();
	for (int i = 0; i < static_cast<int>(IndexSort.indices.size()) / 2; ++i)
		sortMatrix.push_back(i);
	std::sort(sortMatrix.begin(), sortMatrix.end(), IndexSort);
	if (autoSort == SC_ORDER_CUSTOM || sortMatrix.size() < 2) {
		lb->SetList(list, separator, typesep);
		PLATFORM_ASSERT(lb->Length() == static_cast<int>(sortMatrix.size()));
		return;
	}

	std::string sortedList;
	char item[maxItemLen];
	for (size_t i = 0; i < sortMatrix.size(); ++i) {
		int wordLen = IndexSort.indices[sortMatrix[i] * 2 + 2] - IndexSort.indices[sortMatrix[i] * 2];
		if (wordLen > maxItemLen-2)
			wordLen = maxItemLen - 2;
		memcpy(item, list + IndexSort.indices[sortMatrix[i] * 2], wordLen);
		if ((i+1) == sortMatrix.size()) {
			// Last item so remove separator if present
			if ((wordLen > 0) && (item[wordLen-1] == separator))
				wordLen--;
		} else {
			// Item before last needs a separator
			if ((wordLen == 0) || (item[wordLen-1] != separator)) {
				item[wordLen] = separator;
				wordLen++;
			}
		}
		item[wordLen] = '\0';
		sortedList += item;
	}
	for (int i = 0; i < static_cast<int>(sortMatrix.size()); ++i)
		sortMatrix[i] = i;
	lb->SetList(sortedList.c_str(), separator, typesep);
}

int AutoComplete::GetSelection() const {
	return lb->GetSelection();
}

std::string AutoComplete::GetValue(int item) const {
	char value[maxItemLen];
	lb->GetValue(item, value, sizeof(value));
	return std::string(value);
}

void AutoComplete::Show(bool show) {
	lb->Show(show);
	if (show)
		lb->Select(0);
}

void AutoComplete::Cancel() {
	if (lb->Created()) {
		lb->Clear();
		lb->Destroy();
		active = false;
	}
}

void AutoComplete::Move(int delta) {
	const int count = lb->Length();
	int current = lb->GetSelection();
	current += delta;
	if (current >= count)
		current = count - 1;
	if (curre


{
        progressRange = 0.667f;
      }
    }

    @Override
    public void map(LongWritable key, Text value,
                    OutputCollector<Text, Text> output, Reporter reporter)
    throws IOException {
      this.reporter = reporter;

      // calculate the actual map progress
      float mapProgress = ((float)++numRecords)/INPUT_LINES;
      // calculate the attempt progress based on the progress range
      float attemptProgress = progressRange * mapProgress;
      assertEquals("Invalid progress in map",
                   attemptProgress, reporter.getProgress(), 0f);
      output.collect(new Text(value.toString() + numRecords), value);
    }

    @Override
    public void close() throws IOException {
      super.close();
      assertEquals("Invalid progress in map cleanup",
                   progressRange, reporter.getProgress(), 0f);
    }
  }

  static class StatusLimitMapper extends
      org.apache.hadoop.mapreduce.Mapper<LongWritable, Text, Text, Text> {

    @Override
    public void map(LongWritable key, Text value, Context context)
        throws IOException {
      StringBuilder sb = new StringBuilder(512);
      for (int i = 0; i < 1000; i++) {
        sb.append("a");
      }
      context.setStatus(sb.toString());
      int progressStatusLength = context.getConfiguration().getInt(
          MRConfig.PROGRESS_STATUS_LEN_LIMIT_KEY,
          MRConfig.PROGRESS_STATUS_LEN_LIMIT_DEFAULT);

      if (context.getStatus().length() > progressStatusLength) {
        throw new IOException("Status is not truncated");
      }
    }
  }

  /**
   * Test {@link Reporter}'s progress for a map-only job.
   * This will make sure that only the map phase decides the attempt's progress.
   */
  @SuppressWarnings("deprecation")
  @Test
  public void testReporterProgressForMapOnlyJob() throws IOException {
    Path test = new Path(testRootTempDir, "testReporterProgressForMapOnlyJob");

    JobConf conf = new JobConf();
    conf.setMapperClass(ProgressTesterMapper.class);
    conf.setMapOutputKeyClass(Text.class);
    // fail early
    conf.setMaxMapAttempts(1);
    conf.setMaxReduceAttempts(0);

    RunningJob job =
      UtilsForTests.runJob(conf, new Path(test, "in"), new Path(test, "out"),
                           1, 0, INPUT);
    job.waitForCompletion();

    assertTrue("Job failed", job.isSuccessful());
  }

  /**
   * A {@link Reducer} implementation that checks the progress on every call
   * to {@link Reducer#reduce(Object, Iterator, OutputCollector, Reporter)}.
   */
  @SuppressWarnings("deprecation")
  static class ProgressTestingReducer extends MapReduceBase
  implements Reducer<Text, Text, Text, Text> {
    private int recordCount = 0;
    private Reporter reporter = null;
    // reduce task has a fixed split of progress amongst copy, shuffle and
    // reduce phases.
    private final float REDUCE_PROGRESS_RANGE = 1.0f/3;
    private final float SHUFFLE_PROGRESS_RANGE = 1 - REDUCE_PROGRESS_RANGE;

    @Override
    public void configure(JobConf job) {
      super.configure(job);
    }

    @Override
    public void reduce(Text key, Iterator<Text> values,
        OutputCollector<Text, Text> output, Reporter reporter)
    throws IOException {
      float reducePhaseProgress = ((float)++recordCount)/INPUT_LINES;
      float weightedReducePhaseProgress =
              reducePhaseProgress * REDUCE_PROGRESS_RANGE;
      assertEquals("Invalid progress in reduce",
                   SHUFFLE_PROGRESS_RANGE + weightedReducePhaseProgress,
                   reporter.getProgress(), 0.02f);
      this.reporter = reporter;


.0 - beta) * alpha;
    f2 = (1.0 + beta) * alpha;
    tau = 0.5 / alpha;
    norm = tau / sqrt(FFT_SIZE);
    if (f0 != 0)
        norm *= 0.5;

    for(i=0;i<=FFT_SIZE/2;i++) {
	f = i / (float)FFT_SIZE;

        /* center on f0 */
        f = fabs(f - f0);

        if (f <= f1)
            val = 1;
        else if (f <= f2) {
            val = 0.5 * (1.0 + cos((M_PI * tau / beta) * (f - f1)));
        } else {
            val = 0;
        }
        val = sqrt(val);

        tab[i].re = val * norm;
        tab[i].im = 0;
    }

    for(i=1;i<FFT_SIZE;i++) tab[FFT_SIZE - i] = tab[i];

    fft_calc(tab, FFT_SIZE, 0);

    j = FFT_SIZE - ((n-1)/2);
    for(i=0;i<n;i++) {
        filter[i] = tab[j].re;
        if (++j == FFT_SIZE)
            j = 0;
    }
}

void write_filter(char *name, float *filter, int n)
{
    int i;

    printf("s16 %s[%d]=\n{\n",
           name, n);
    for(i=0;i<n;i++) {
        printf("%6d, ", (int)(filter[i] * 0x4000));
        if ((i % 8) == 7)
            printf("\n");
    }
    printf("\n};\n");
}

int main(int argc, char **argv)
{
    int i, j, n;
    float filter[FFT_SIZE];
    char buf[512];

    printf("/* THIS SOURCE CODE IS AUTOMATICALLY GENERATED - DO NOT MODIFY */\n");
    printf("/*\n"
           " * V34 tables\n"
           " * \n"
           " * Copyright (c) 1999,2000 Fabrice Bellard.\n"
           " *\n"
           " * This code is released under the GNU General Public License version\n"
           " * 2. Please read the file COPYING to know the exact terms of the\n"
           " * license.\n"
           " */\n");

    printf("#include \"lm.h\"\n"
           "#include \"v34priv.h\"\n"
           "\n");

    /* tables for trellis coded modulation */
    gen_table(4);
    gen_table(8);
    gen_table(16);

    /* rx filters which convert the 8000 Hz flow to (symbol_rate * 3)
       with a nyquist filter */

    for(j=0;j<6;j++) {
        float symbol_rate, carrier, alpha, beta, freq;

        symbol_rate = 2400.0 *
            (float)S_tab[j][0] / (float)S_tab[j][1];

        for(i=0;i<2;i++) {
            if (i == 1 &&
                S_tab[j][2] == S_tab[j][4] &&
                S_tab[j][3] == S_tab[j][5])
                break;

            carrier = symbol_rate *
                (float)S_tab[j][2 + 2*i] / (float)S_tab[j][3 + 2*i];

            alpha = symbol_rate / (2.0 * symbol_rate * 3.0 * baud_tab[j][1]);
            beta = 0.1;
            freq = carrier / (symbol_rate * 3.0 * baud_tab[j][1]);
            n = RC_FILTER_SIZE * baud_tab[j][1] + 1;

            printf("/* S=%d carrier=%d alpha=%f beta=%f f0=%f */\n",
                   (int)rint(symbol_rate),
                   (int)rint(carrier),
                   alpha, beta, freq);

            build_sqr_nyquist_filter(filter, freq, alpha, beta, n);

            sprintf(buf, "v34_rx_filter_%d_%d",
                    (int)rint(symbol_rate),
                    (int)rint(carrier));

            write_filter(buf, filter, n);
        }
    }

    /* tx filters */

    for(j=0;j<6;j++) {
        float alpha, beta;

        alpha = 1.0 / (2.0 * baud_tab[j][1]);
        beta = 0.1;
        n = RC_FILTER_SIZE * baud_tab[j][1] + 1;

        build_sqr_nyquist_filter(filter, 0.0, alpha, beta, n);

        sprintf(buf, "v34_rc_%d_filter", baud_tab[j][1]);
        write_filter(buf, filter, n);
    }

    /* V22 filters */

    /* 600 sym/s for 8000 Hz, beta=0.75 */
    build_sqr_nyquist_filter(filter, 0.0, 1.0 / (2.0 * 40.0), 0.75,
                             V22_TX_FILTER_SIZE);

    write_filter("v22_tx_filter", filter, V22_TX_FILTER_SIZE);

    return 0;
}


from django.shortcuts import render
from .forms import ContactForm

# Create your views here.

def sendMessage(request):
    contact_form=ContactForm
    if request.method=='POST':
        contact_form=ContactForm(request.POST)
        if contact_form.is_valid():
            contact_form.save()
    context={
        'contact_form':contact_form
    }
    return render(request,'contactapp/contact.html',context)


helper.GetPersistentVolumeClaimClass(claim)
	if v1helper.GetPersistentVolumeClass(volume) != requestedClass {
		return fmt.Errorf("storageClassName does not match")
	}

	isMismatch, err := pvutil.CheckVolumeModeMismatches(&claim.Spec, &volume.Spec)
	if err != nil {
		return fmt.Errorf("error checking volumeMode: %v", err)
	}
	if isMismatch {
		return fmt.Errorf("incompatible volumeMode")
	}

	if !pvutil.CheckAccessModes(claim, volume) {
		return fmt.Errorf("incompatible accessMode")
	}

	return nil
}

// syncUnboundClaim is the main controller method to decide what to do with an
// unbound claim.
func (ctrl *PersistentVolumeController) syncUnboundClaim(claim *v1.PersistentVolumeClaim) error {
	// This is a new PVC that has not completed binding
	// OBSERVATION: pvc is "Pending"
	if claim.Spec.VolumeName == "" {
		// User did not care which PV they get.
		delayBinding, err := pvutil.IsDelayBindingMode(claim, ctrl.classLister)
		if err != nil {
			return err
		}

		// [Unit test set 1]
		volume, err := ctrl.volumes.findBestMatchForClaim(claim, delayBinding)
		if err != nil {
			klog.V(2).Infof("synchronizing unbound PersistentVolumeClaim[%s]: Error finding PV for claim: %v", claimToClaimKey(claim), err)
			return fmt.Errorf("Error finding PV for claim %q: %v", claimToClaimKey(claim), err)
		}
		if volume == nil {
			klog.V(4).Infof("synchronizing unbound PersistentVolumeClaim[%s]: no volume found", claimToClaimKey(claim))
			// No PV could be found
			// OBSERVATION: pvc is "Pending", will retry
			switch {
			case delayBinding && !pvutil.IsDelayBindingProvisioning(claim):
				ctrl.eventRecorder.Event(claim, v1.EventTypeNormal, events.WaitForFirstConsumer, "waiting for first consumer to be created before binding")
			case v1helper.GetPersistentVolumeClaimClass(claim) != "":
				if err = ctrl.provisionClaim(claim); err != nil {
					return err
				}
				return nil
			default:
				ctrl.eventRecorder.Event(claim, v1.EventTypeNormal, events.FailedBinding, "no persistent volumes available for this claim and no storage class is set")
			}

			// Mark the claim as Pending and try to find a match in the next
			// periodic syncClaim
			if _, err = ctrl.updateClaimStatus(claim, v1.ClaimPending, nil); err != nil {
				return err
			}
			return nil
		} else /* pv != nil */ {
			// Found a PV for this claim
			// OBSERVATION: pvc is "Pending", pv is "Available"
			claimKey := claimToClaimKey(claim)
			klog.V(4).Infof("synchronizing unbound PersistentVolumeClaim[%s]: volume %q found: %s", claimKey, volume.Name, getVolumeStatusForLogging(volume))
			if err = ctrl.bind(volume, claim); err != nil {
				// On any error saving the volume or the claim, subsequent
				// syncClaim will finish the binding.
				// record count error for provision if exists
				// timestamp entry will remain in cache until a success binding has happened
				metrics.RecordMetric(claimKey, &ctrl.operationTimestamps, err)
				return err
			}
			// OBSERVATION: claim is "Bound", pv is "Bound"
			// if exists a timestamp entry in cache, record end to end provision latency and clean up cache
			// End of the provision + binding operation lifecycle, cache will be cleaned by "RecordMetric"
			// [Unit test 12-1, 12-2, 12-4]
			me


e="GitHub repository join-dev-design by the Microsoft organization">microsoft/join-dev-design or
        email us.

          <button class="theme__button js-theme-button" value="dark" title="Enable dark theme">Dark</button>

          <button class="theme__button js-theme-button" value="light" title="Enable light theme">Light</button>

        Designed in
        Figma.

        Built in
        Code.

        Created by
        10 contributors on
        GitHub.


_range.is_err(), true);

        let from = "abc";
        let to = "22";
        let port_range = to_port_ranges(format!("{}-{}", from, to).as_ref());
        assert_eq!(port_range.is_err(), true);
    }
}
use asserhttp::*;
use surf::get;

use crate::utils::*;

mod url {
    use super::*;

    #[async_std::test]
    #[stubr::mock("req/url-precedence/url-and-url-path.json")]
    async fn should_prefer_url_over_url_path() {
        get(stubr.path_query("/api/url", "age", "42")).await.expect_status_ok();
        get(stubr.path("/api/exact-url")).await.expect_status_not_found();
    }

    #[async_std::test]
    #[stubr::mock("req/url-precedence/url-and-url-pattern.json")]
    async fn should_prefer_url_over_url_pattern() {
        get(stubr.path_query("/api/url", "age", "42")).await.expect_status_ok();
        get(stubr.path_query("/api/pattern", "one", "abcd")).await.expect_status_not_found();
    }

    #[async_std::test]
    #[stubr::mock("req/url-precedence/url-and-url-path-pattern.json")]
    async fn should_prefer_url_over_url_path_pattern() {
        get(stubr.path_query("/api/url", "age", "42")).await.expect_status_ok();
        get(stubr.path("/api/regex-uri/abcd")).await.expect_status_not_found();
    }
}

mod url_path {
    use super::*;

    #[async_std::test]
    #[stubr::mock("req/url-precedence/url-path-and-url-pattern.json")]
    async fn should_prefer_url_path_over_url_pattern() {
        get(stubr.path("/api/exact-url")).await.expect_status_ok();
        get(stubr.path_query("/api/pattern", "one", "abcd")).await.expect_status_not_found();
    }

    #[async_std::test]
    #[stubr::mock("req/url-precedence/url-path-and-url-path-pattern.json")]
    async fn should_prefer_url_path_over_url_path_pattern() {
        get(stubr.path("/api/exact-url")).await.expect_status_ok();
        get(stubr.path("/api/regex-uri/abcd")).await.expect_status_not_found();
    }
}

mod url_pattern {
    use super::*;

    #[async_std::test]
    #[stubr::mock("req/url-precedence/url-pattern-and-url-path-pattern.json")]
    async fn should_prefer_url_pattern_over_url_path_pattern() {
        get(stubr.path_query("/api/pattern", "one", "abcd")).await.expect_status_ok();
        get(stubr.path("/api/regex-uri/abcd")).await.expect_status_not_found();
    }
}
<filename>programs/bucket-program/src/math/mod.rs
pub mod casting;

#![allow(dead_code)]
#![allow(unused_must_use)]

extern crate xcb;

use std::sync::Arc;
use crate::{
	Stat, Data, WindowCommand, Event, DisplayEvent, KeyEvent, MouseEvent, event,
	event::{FocusEvent, input::MouseData}
};

#[derive(Clone)]
pub struct Screen {
	width: u16,
	height: u16,
	depth: u8,
	visual: Option<xcb::Visualtype>
}

impl Screen {
	fn from(screen: &xcb::Screen) -> Self {
		let root_depth = screen.root_depth();
		let depth = screen.allowed_depths().find(|d| d.depth() == root_depth);

		let id = screen.root_visual();
		let visual = depth.map(|d| d.visuals())
			.map(|mut v| v.


. **Prompt 4:** "I'm in search of a beautiful glasswork art piece depicting a dragon. Can you generate an image for me?"

## Features and commands

1. **Generate Glasswork Art Image:** Use this command to generate unique glasswork art images based on given prompts or requests.

2. **Visualize Glasswork Art Ideas:** Share your ideas or concepts for glasswork art pieces and the ChatGPT app will help you visualize them by generating corresponding images.

3. **Browse Glasswork Art Images:** You can use the browser tool provided by the app to browse through a collection of existing glasswork art images. This can give you inspiration or help you refine your ideas.

4. **Access to Knowledge:** The app has access to a vast amount of glasswork art-related information. Feel free to ask questions or seek advice related to glasswork art techniques, inspirations, trends, and more.

[![Grey's Simulator](https://files.oaiusercontent.com/file-6KqvOLitftaAUpHYDTWKxEXX?se=2123-10-17T18%3A16%3A58Z&sp=r&sv=2021-08-06&sr=b&rscc=max-age%3D31536000%2C%20immutable&rscd=attachment%3B%20filename%3D176944e1-f31d-4aff-b52e-6b5481411e8d.png&sig=IdHajwEN8PQrqUmGB1asmRDeMGQ%2BFTvExC3HAo9y00w%3D)](https://chat.openai.com/g/g-JN2HTe7hO-grey-s-simulator)

# Grey's Simulator [ChatGPT Plus](https://chat.openai.com/g/g-JN2HTe7hO-grey-s-simulator) / [Search ChatGPT Free](https://gptcall.net/index.html#/?search=Grey's%20Simulator)

In Grey's Simulator, you'll step into the shoes of a medical detective! Put your problem-solving skills to the test as you solve medical mysteries. Each shift starts with a prompt to send in the first patient, and it's up to you to analyze their symptoms and make a diagnosis. With access to a wide range of tools including Python, Dalle, and a browser, you'll have everything you need to gather information and uncover the truth. Get ready for an exhilarating experience filled with suspense and critical thinking. Can you become the ultimate medical sleuth?

## Example prompts

1. **Prompt 1:** "Send in the first patient."

## Features and commands

1. **Send in the first patient:** Use this command to start a new medical mystery scenario in Grey's Simulator.

[![OHGIRI Maker](https://files.oaiusercontent.com/file-Loa4kemyf0ayKvapL2NXOk1A?se=2123-10-16T03%3A04%3A43Z&sp=r&sv=2021-08-06&sr=b&rscc=max-age%3D31536000%2C%20immutable&rscd=attachment%3B%20filename%3D62777f61-2918-4332-9acc-fe22e24cfb6f.png&sig=BOvN5wkScLslCOHTNWcMoEsS7WfAA60Z8Qm/AywqD6I%3D)](https://chat.openai.com/g/g-1qebTA8a9-ohgiri-maker)

# OHGIRI Maker [ChatGPT Plus](https://chat.openai.com/g/g-1qebTA8a9-ohgiri-maker) / [Search ChatGPT Free](https://gptcall.net/index.html#/?search=OHGIRI%20Maker)

OHGIRI Maker is a fun App that creates funny captions for images. Simply send the App a picture and it will generate a hilarious caption to make you laugh! The App combines the power of Python scripts, browser tools, and advanced image generation technology to provide you with hilarious results. So whenever you need a good laugh, just reach out to OHGIRI Ma