manager-php .tablenav.bottom {
		overflow: hidden;
	}

	/* List tables that don't toggle rows */
	.comments-box .toggle-row,
	.wp-list-table.plugins .toggle-row {
		display: none;
	}

	/* Plugin/Theme Management */
	#wpbody-content .wp-list-table.plugins td {
		display: block;
		width: auto;
		padding: 10px 9px; /* reset from other list tables that have a label at this width */
	}

	/* Plugin description hidden via Screen Options */
	#wpbody-content .wp-list-table.plugins .desc.hidden {
		display: none;
	}

	#wpbody-content .wp-list-table.plugins .column-description {
		padding-top: 2px;
	}

	#wpbody-content .wp-list-table.plugins .plugin-title,
	#wpbody-content .wp-list-table.plugins .theme-title {
		padding-left: 12px;
		white-space: normal;
	}

	.wp-list-table.plugins .plugin-title,
	.wp-list-table.plugins .theme-title {
		padding-top: 13px;
		padding-bottom: 4px;
	}

	.plugins #the-list tr > td:not(:last-child),
	.plugins #the-list .update th,
	.plugins #the-list .update td,
	.wp-list-table.plugins #the-list .theme-title {
		box-shadow: none;
		border-top: none;
	}

	.plugins #the-list tr td {
		border-top: none;
	}

	.plugins tbody {
		padding: 1px 0 0;
	}

	.plugins tr.active + tr.inactive th.check-column,
	.plugins tr.active + tr.inactive td.column-description,
	.plugins .plugin-update-tr:before {
		box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.1);
	}

	.plugins tr.active + tr.inactive th.check-column,
	.plugins tr.active + tr.inactive td {
		border-top: none;
	}

	/* mimic the checkbox th */
	.plugins .plugin-update-tr:before {
		content: "";
		display: table-cell;
	}

	.plugins #the-list .plugin-update-tr .plugin-update {
		border-right: none;
	}

	.plugin-update-tr .update-message {
		margin-right: 0;
	}

	.plugins .active.update + .plugin-update-tr:before,
	.plugins .active.updated + .plugin-update-tr:before {
		background-color: #f0f6fc;
		border-right: 4px solid #72aee6;
	}

	.plugins .plugin-update-tr .update-message {
		margin-right: 0;
	}

	.wp-list-table.plugins .plugin-title strong,
	.wp-list-table.plugins .theme-title strong {
		font-size: 1.4em;
		line-height: 1.5;
	}

	.plugins tbody th.check-column {
		padding: 8px 5px 0 0;
	}

	.plugins thead td.check-column,
	.plugins tfoot td.check-column,
	.plugins .inactive th.check-column {
		padding-right: 9px;
	}

	/* Add New plugins page */
	table.plugin-install .column-name,
	table.plugin-install .column-version,
	table.plugin-install .column-rating,
	table.plugin-install .column-description {
		display: block;
		width: auto;
	}

	table.plugin-install th.column-name,
	tab


namespace MinecraftClient.Protocol.Handlers
{
    /// <summary>
    /// Outgoing packet types
    /// </summary>
    public enum PacketTypesOut
    {
        AcknowledgeConfiguration,    // Added in 1.20.2
        AdvancementTab,              //
        Animation,                   //
        ChangeContainerSlotState,    // Added in 1.20.3
        ChatCommand,                 // Added in 1.19
        ChatMessage,                 //
        ChatPreview,                 // Added in 1.19
        ChunkBatchReceived,          // Added in 1.20.2
        ClickWindow,                 //
        ClickWindowButton,           //
        ClientSettings,              //
        ClientStatus,                //
        CloseWindow,                 //
        CraftRecipeRequest,          //
        CreativeInventoryAction,     //
        EditBook,                    //
        EnchantItem,                 // For 1.13.2 or below
        EntityAction,                //
        EntityNBTRequest,            //
        GenerateStructure,           // Added in 1.16
        HeldItemChange,              //
        InteractEntity,              //
        KeepAlive,                   //
        LockDifficulty,              //
        MessageAcknowledgment,       // Added in 1.19.1 (1.19.2)
        NameItem,                    //
        PickItem,                    //
        PingRequest,                 // Added in 1.20.2
        PlayerAbiliti


init CSR block once to avoid repeated updates of row pointers on append
		if( cix != null )
			ret.sparseBlock = new SparseBlockCSR(in.rlen, lnnz, cix);

		//recompute nnz of partition
		return ret.setNonZeros(lnnz);
	}

	private static void copyColVector( MatrixBlock in, int ixin, double[] tmp, int[] tmpi, int len)
	{
		//copy value array from input matrix
		if( in.isEmptyBlock(false) ) {
			Arrays.fill(tmp, 0, len, 0);
		}
		else if( in.sparse ){ //SPARSE
			for( int i=0; i<len; i++ )
				tmp[i] = in.get(ixin+i, 0);
		}
		else { //DENSE
			System.arraycopy(in.getDenseBlockValues(), ixin, tmp, 0, len);
		}

		//init index array
		for( int i=0; i<len; i++ )
			tmpi[i] = ixin + i;
	}

	/**
	 * Utility method for in-place transformation of an ascending sorted
	 * order into a descending sorted order. This method assumes dense
	 * column vectors as input.
	 *
	 * @param m1 matrix
	 */
	private static void sortReverseDense( MatrixBlock m1 ) {
		int rlen = m1.rlen;
		double[] a = m1.getDenseBlockValues();
		for( int i=0; i<rlen/2; i++ ) {
			double tmp = a[i];
			a[i] = a[rlen - i -1];
			a[rlen - i - 1] = tmp;
		}
	}

	private static void sortReverseDense( int[] a ) {
		int rlen = a.length;
		for( int i=0; i<rlen/2; i++ ) {
			int tmp = a[i];
			a[i] = a[rlen - i -1];
			a[rlen - i - 1] = tmp;
		}
	}

	private static void sortReverseDense( double[] a ) {
		int rlen = a.length;
		for( int i=0; i<rlen/2; i++ ) {
			double tmp = a[i];
			a[i] = a[rlen - i -1];
			a[rlen - i - 1] = tmp;
		}
	}

	// Method to merge all blocks of a specified length.
	private static void mergeSortedBlocks(int blockLength, int[] valueIndexes, double[] values, int k){
		// Check if the blocklength is bigger than the size of the values
		// if it is smaller then merge the blocks, if not merging is done

		int vlen = values.length;
		int mergeBlockSize = blockLength * 2;
		if (mergeBlockSize <= vlen + blockLength){
			ExecutorService pool = CommonThreadPool.get(k);
			try {
				ArrayList<MergeTask> tasks = new ArrayList<>();
				for( int i=0; i*mergeBlockSize<vlen; i++ ){
					int start = i*mergeBlockSize;
					if (start + blockLength < vlen){
						int stop = Math.min(vlen , (i+1)*mergeBlockSize);
						tasks.add(new MergeTask(start, stop, blockLength, valueIndexes, values));
					}
				}
				CommonThreadPool.invokeAndShutdown(pool, tasks);
				// recursive merge larger blocks.
				mergeSortedBlocks(mergeBlockSize, valueIndexes, values, k);
			}
			catch(Exception ex) {
				throw new DMLRuntimeException(ex);
			}
			finally{
				pool.shutdown();
			}
		}
	}

	private static void sortBySecondary(int rl, int ru, double[] values, int[] vix, MatrixBlock in, int[] by, int off) {
		//find runs of equal values in current offset and index range
		//replace value by next column, sort, and recurse until single value
		for(


times-rectangle-o::before,
.fa-window-close-o::before {
  content: "\f2d4";
}
.fa-bandcamp::before {
  content: "\f2d5";
}
.fa-grav::before {
  content: "\f2d6";
}
.fa-etsy::before {
  content: "\f2d7";
}
.fa-imdb::before {
  content: "\f2d8";
}
.fa-ravelry::before {
  content: "\f2d9";
}
.fa-eercast::before {
  content: "\f2da";
}
.fa-microchip::before {
  content: "\f2db";
}
.fa-snowflake-o::before {
  content: "\f2dc";
}
.fa-superpowers::before {
  content: "\f2dd";
}
.fa-wpexplorer::before {
  content: "\f2de";
}
.fa-meetup::before {
  content: "\f2e0";
}/** layui-v2.2.6 MIT License By https://www.layui.com */
 blockquote,body,button,dd,div,dl,dt,form,h1,h2,h3,h4,h5,h6,input,legend,li,ol,p,td,textarea,th,ul{margin:0;padding:0;-webkit-tap-highlight-color:rgba(0,0,0,0)}html{font:12px 'Helvetica Neue','PingFang SC',STHeitiSC-Light,Helvetica,Arial,sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}a,button,input{-webkit-tap-highlight-color:rgba(255,0,0,0)}a{text-decoration:none;background:0 0}a:active,a:hover{outline:0}table{border-collapse:collapse;border-spacing:0}li{list-style:none}b,strong{font-weight:700}h1,h2,h3,h4,h5,h6{font-weight:500}address,cite,dfn,em,var{font-style:normal}dfn{font-style:italic}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}img{border:0;vertical-align:bottom}.layui-inline,input,label{vertical-align:middle}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0;outline:0}button,select{text-transform:none}select{-webkit-appearance:none;border:none}input{line-height:normal}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}@font-face{font-family:layui-icon;src:url(../font/iconfont.eot?v=1.0.7);src:url(../font/iconfont.eot?v=1.0.7#iefix) format('embedded-opentype'),url(../font/iconfont.woff?v=1.0.7) format('woff'),url(../font/iconfont.ttf?v=1.0.7) format('truetype'),url(../font/iconfont.svg?v=1.0.7#iconfont) format('svg')}.layui-icon{font-family:layui-icon!important;font-size:16px;font-style:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.layui-box,.layui-box *{-webkit-box-sizing:content-box!important;-moz-box-sizing:content-box!important;box-sizing:content-box!important}.layui-border-box,.l


QwMTQ5ZWFhMTE1ZjI2OGY3OWQyZTA2L3NlYzo0MWYzYTQ4NzE0MDE0OWVhYTExNWYyNjhmNzlkMmUwNl8xMDkvZnJhZzphYjZkNWNjM2JhNWQ0ZGRhOTNlNTZjNjcyYTgyZDg0MC90YWJsZTplNGI5OGE4MWFkZmI0ODgxYTNiZGMzODg4NzY5NWE1My90YWJsZXJhbmdlOmU0Yjk4YTgxYWRmYjQ4ODFhM2JkYzM4ODg3Njk1YTUzXzQ5LTQtMS0xLTA_07f60056-a764-4244-82a3-a66aa1818dbb">63</ix:nonFraction> 			<ix:nonFraction unitRef="usd" contextRef="i2906a6d3279f4260a4de4b674f1f3996_D20210101-20211231" decimals="-6" sign="-" name="us-gaap:PaymentsForProceedsFromOtherInvestingActivities" scale="6" id="id3VybDovL2RvY3MudjEvZG9jOjQxZjNhNDg3MTQwMTQ5ZWFhMTE1ZjI2OGY3OWQyZTA2L3NlYzo0MWYzYTQ4NzE0MDE0OWVhYTExNWYyNjhmNzlkMmUwNl8xMDkvZnJhZzphYjZkNWNjM2JhNWQ0ZGRhOTNlNTZjNjcyYTgyZDg0MC90YWJsZTplNGI5OGE4MWFkZmI0ODgxYTNiZGMzODg4NzY5NWE1My90YWJsZXJhbmdlOmU0Yjk4YTgxYWRmYjQ4ODFhM2JkYzM4ODg3Njk1YTUzXzQ5LTYtMS0xLTA_9a8bb49d-78b8-49b8-99a5-5c4d46a2febb">12</ix:nonFraction>

Net cash used in investing activities		(<ix:


1] = L70_1
_ENV["C3EDBBD7780BE52AA"]["S4246644547CCA3BF"] = function(A0_2)

  local L1_2
  if 0 == A0_2 then
    L1_2 = "pepper_nusi_03"
    return L1_2
  elseif 1 == A0_2 then
    L1_2 = "pepper_nusi_02"
    return L1_2
  elseif 2 == A0_2 then
    L1_2 = "pepper_nusi_01"
    return L1_2
  elseif 3 == A0_2 then
    L1_2 = "pepper_nusi_04"
    return L1_2
  elseif 4 == A0_2 then
    L1_2 = "pepper_nusi_05"
    return L1_2
  end
end

L68_1 = _ENV["C3EDBBD7780BE52AA"]
L69_1 = "prototype"
L70_1 = _hx_e
L70_1 = L70_1()
L68_1[L69_1] = L70_1
_ENV["C3EDBBD7780BE52AA"]["prototype"]["F7C68FEDB79AB6396"] = function(A0_2, A1_2)

  local L2_2, L3_2, L4_2, L5_2
  L2_2 = A0_2
  L3_2 = C1DB14DCC9D7634FA
  L3_2 = L3_2.new
  function L4_2()
    local L0_3, L1_3, L2_3, L3_3, L4_3, L5_3, L6_3, L7_3, L8_3, L9_3, L10_3, L11_3
    L0_3 = L2_2
    L0_3 = L0_3[1]
    L1_3 = L0_3
    L0_3 = L0_3.f462C9B70
    L0_3 = L0_3(L1_3)
    L1_3 = L0_3
    L0_3 = L0_3.fD4E64AB7
    L2_3 = "nushi"
    L0_3 = L0_3(L1_3, L2_3)
    L1_3 = nil
    L2_3 = c016374C1
    L2_3 = L2_3.f8C7D4F4D
    L3_3 = L0_3
    L4_3 = L1_3
    L2_3 = L2_3(L3_3, L4_3)
    if L2_3 then
      L3_3 = L0_3
      L2_3 = L0_3.fCDCB600D
      L4_3 = true
      L2_3(L3_3, L4_3)
    end
    L2_3 = L2_2
    L2_3 = L2_3[1]
    L3_3 = L2_3
    L2_3 = L2_3.f462C9B70
    L2_3 = L2_3(L3_3)
    L3_3 = L2_3
    L2_3 = L2_3.fD4E64AB7
    L4_3 = "player"
    L2_3 = L2_3(L3_3, L4_3)
    L3_3 = nil
    L4_3 = c016374C1
    L4_3 = L4_3.f8C7D4F4D
    L5_3 = L2_3
    L6_3 = L3_3
    L4


ID id);
}
```

Instead of integrating a real database, we use a `Map` as an in-memory store.

```java
@Repository
public class InMemoryPostRepository implements PostRepository {

    private final Map<UUID, Post> posts = new ConcurrentHashMap<>();

    @Override
    public Flux<Post> findAll() {
        return Flux.fromIterable(posts.values());
    }

    @Override
    public Mono<Post> findById(UUID id) {
        if (posts.containsKey(id)) {
            return Mono.just(posts.get(id));
        }

        return Mono.error(new PostNotFoundException(id));
    }

    @Override
    public Mono<UUID> save(Post post) {
        UUID id = UUID.randomUUID();
        Post newPost = new Post(id, post.title(), post.content(), Status.DRAFT, LocalDateTime.now());
        posts.put(id, newPost);
        return Mono.just(id);
    }

    @Override
    public Mono<Void> deleteById(UUID id) {
        if (posts.containsKey(id)) {
            posts.remove(id);
            return Mono.empty();
        }
        return Mono.error(new PostNotFoundException(id));
    }

    @Override
    public Mono<Void> update(UUID id, Post post) {
        if (posts.containsKey(id)) {
            Post updatedPost = new Post(id, post.title(), post.content(), post.status(), posts.get(id).createdAt());
            posts.put(id, updatedPost);
            return Mono.empty();
        }

        return Mono.error(new PostNotFoundException(id));
    }
}
```

#### Initializing Sample Data at Startup

A simple initializer listens for the ApplicationReadyEvent and inserts sample data when the application starts.

```java
@Component
public class SampleDataInitializer {
    private static final Logger log = LoggerFactory.getLogger(SampleDataInitializer.class);

    private final PostRepository posts;

    public SampleDataInitializer(PostRepository posts) {
        this.posts = posts;
    }

    @EventListener(ApplicationReadyEvent.class)
    public void init() {
        Flux.just("First", "Second")
                .map(it -> new Post(null, it + " Post", "Content of " + it + " Post", Status.DRAFT, LocalDateTime.now()))
                .flatMap(posts::save)
                .subscribe(
                        data -> log.debug("saved post: {}", data),
                        error -> log.error("error: {}", error),
                        () -> log.info("saved post successfully")
                );
    }
}
```

#### Handling `PostNotFoundException`

To handle errors gracefully, we define a REST exception handler and return responses following [Problem Details for HTTP APIs ](https://datatracker.ietf.org/doc/html/rfc7807).

```java
@RestControllerAdvice
public class RestExceptionHandler {

    @ExceptionHandler(PostNotFoundException.class)
    public ResponseEntity<ProblemDetail> handlePostNotFoundException(PostNotFoundException e) {
        var error = ProblemDetail.forStatusAndDetail(HttpStatus.NOT_FOUND, e.getMessage());
        error.setType(URI.create("http://localhost:8080/errors/404"));
        error.setProperty("id", e.id());
        return new ResponseEntity<>(error, HttpStatus.NOT_FOUND);
    }
}
```

#### Running the Server Application

Start the application using your IDE or run:

```bash
mvn clean spring-boot:run
```

When the application is started successfully, you can use `cURL` to test the endpoints.

To fetch all posts:

```bash
curl -X GET http://localhost:8080/posts -H "Accept: application/json"
[{"id":"b387888f-abb9-47ae-9f52-c5


html#2408">[ subject ]
              [ author ]

On 24 Apr 2011, at 02:22, John McCall wrote:

> Consider the following:
>
>  namespace ns {
>    int foo(int);
>    short foo(short);
>  }
>
>  template <typename T> auto forward_foo(T t) -> decltype(ns::foo(t)) {
>    return ns::foo(t);
>  }
>
>  short test(short x) { return forward_foo(x); }
>
> gcc-4.6 mangles forward_foo<short> as:
>  _Z11forward_fooIsEDTcl3foofp_EET_
>
> This seems obviously wrong:  the qualifier has completely disappeared,
> and this now looks like an unqualified call.  I believe the correct
> mangling falls under the fourth production for <unresolved-name>:
>  <unresolved-name> ::= [gs] sr <unresolved-qualifier-level>+ E <base-unresolved-name>
> In that case, the mangling should be:
>  _Z11forward_fooIsEDTclsr2nsE3foofp_EET_

I'm not sure if that's completely right (because I haven't carefully read the current mangling rules), but I am pretty sure that "2ns" needs to be there.

> Right?  I just want to verify that, because I have some follow-ups. :)
>
> 1. When mangling a namespace qualifier for an unresolved-name,
> should we mangle the full namespace path or just what was written?
>  namespace outer {
>    namespace ns { ... }
>    template <typename T> auto forward_foo(T t) -> decltype(ns::foo(t));
>    // sr2nsE3foo or sr5outer2nsE3foo or gssr5outer2nsE3foo ?
>  }

I think the answer is "just what was written" (i.e., you use the raw sequence of tokens) because of 14.4 [temp.type] p2:

        If an expression e involves a template parameter,
        decltype(e) denotes a unique dependent type. Two such
        /decltype-specifiers/ refer to the same type only if their
        /expression/s [grammar term] are equivalent (14.5.6.1).
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        [Note: however, it may be aliased, e.g., by a
        typedef-name. end note ]

So the type given by:

   decltype(inner::foo(t))

... is not the type given by:

   decltype(outer::inner::foo(t))

... because the /expression/s are different (because the token sequences are different).

> The 'gs' does not seem to be useful in the case of a


도움만 받고 있는 느낌이 든다…",
		unlock = "지휘관, 내 이름은 쇼호라고 한데이! 탑재량도, 화력도 정규 항공모함한테 쫌 밀리도, 내밖에 할 수 없는 것도 억수로 많다. 잘 부탁한데이…",
		battle = "자 모두 가제이~ 누가 주인공인지, 보여주는 기다!",
		login = "목숨을 걸어서라도, 내가 지휘관을 지킬 끼다!",
		vote = "",
		detail = "하아, 내는 크면 미인이 될 끼란 말을, 자주 듣는다 아이가~",
		couple_encourage = {}
	},
	[306051] = {
		touch = "지휘관, 오늘은 핼러윈, 핼러윈아이가!",
		feeling3 = "",
		upgrade = "",
		expedition = "",
		win_mvp = "",
		home = "",
		mission = "",
		touch2 = "지휘관, 만지지 좀 말라고! 이 호박, 만진 사람을 계속 쫓아가니까……아아아 와 또 내를!",
		feeling1 = "",
		skill = "",
		drop_descrip = "아아아아! 사, 사탕 쏟아삤다~! 와, 와 내를 자꾸 따라오노! 지휘관, 이 호박들 어째 좀 막아도~!",
		mail = "",
		lose = "",
		propose = "",
		hp_warning = "",
		id = 306051,
		voice_key = 0,
		feeling5 = "",
		main = "\"트릭 오어 트릿\" 이구마!|후훗~ 역시 내는 미인이 될 소질이 있구마이~|호호호호박이 미쳐 날뛰는 고마~ 아아아 누가 이래놨노!",
		voice_key_2 = -1,
		profile = "",
		mission_complete = "",
		headtouch = "",
		feeling2 = "",
		feeling4 = "",
		unlock = "아아아아! 사, 사탕 쏟아삤다~! 와, 와 내를 자


*z2^2*z3*z4*z5*z6-2.178553132241672*z1*z3*z4*z5*z6
   b[253] = 6.535659396725016*z1*z2*z3^2*z4*z5*z6-2.178553132241672*z1*z2*z4*z5*z6
   b[254] = 6.535659396725016*z1*z2*z3*z4^2*z5*z6-2.1785531322416


it(" ")
    a = a.toString().split("").reverse().map(Number).join("")
    b = b.toString().split("").reverse().map(Number).join("")
    a > b ? console.log(a) : console.log(b)
})import { CFG_LVL_TO_APP_QUALITY_LVL, VIDEO_QUALITY_LEVELS } from './constants';

/**
 * Selects {@code VIDEO_QUALITY_LEVELS} for the given {@link availableHeight} and threshold to quality mapping.
 *
 * @param {number} availableHeight - The height to which a matching video quality level should be found.
 * @param {Map<number, number>} heightToLevel - The threshold to quality level mapping. The keys are sorted in the
 * ascending order.
 * @returns {number} The matching value from {@code VIDEO_QUALITY_LEVELS}.
 */
export function getReceiverVideoQualityLevel(availableHeight: number, heightToLevel: Map<number, number>): number {
    let selectedLevel = VIDEO_QUALITY_LEVELS.LOW;

    for (const [ levelThreshold, level ] of heightToLevel.entries()) {
        if (availableHeight >= levelThreshold) {
            selectedLevel = level;
        }
    }

    return selectedLevel;
}

/**
 * Converts {@code Object} passed in the config which represents height thresholds to vide quality level mapping to
 * a {@code Map}.
 *
 * @param {Object} minHeightForQualityLvl - The 'config.videoQuality.minHeightForQualityLvl' Object from
 * the configuration. See config.js for more details.
 * @returns {Map<number, number>|undefined} - A mapping of minimal thumbnail height required for given quality level or
 * {@code undefined} if the map contains invalid values.
 */
export function validateMinHeightForQualityLvl(minHeightForQualityLvl?: { [key: number]: string; }) {
    if (typeof minHeightForQualityLvl !== 'object'
        || Object.keys(minHeightForQualityLvl).map(lvl => Number(lvl))
            .find(lvl => lvl === null || isNaN(lvl) || lvl < 0)) {
        return undefined;
    }

    const levelsSorted
        = Object.keys(minHeightForQualityLvl)
            .map(k => Number(k))
            .sort((a, b) => a - b);
    const map = new Map();

    Object.values(VIDEO_QUALITY_LEVELS).sort()
        .forEach(value => {
            if (value > VIDEO_QUALITY_LEVELS.NONE) {
                map.set(value, value);
            }
        });

    for (const level of levelsSorted) {
        const configQuality = minHeightForQualityLvl[level];
        const appQuality = CFG_LVL_TO_APP_QUALITY_LVL[configQuality as keyof typeof CFG_LVL_TO_APP_QUALITY_LVL];

        if (!appQuality) {
            return undefined;
        }

        map.delete(appQuality);
        map.set(level, appQuality);
    }

    return map;
}
import {SequentialFetcher} from '@/core/services/network/SequentialFetcher.ts'
import {Address} from 'nem2-sdk'
import {APP_PARAMS} from '@/config'

const {SEQUENTIAL_FETCHER_DEFAULT_DELAY} = APP_PARAMS
const mockNetworkCall = (args) => new Promise(resolve => resolve([args]))
const mockLongNetworkCall = (args) => new Promise(resolve => setTimeout(
  () => {resolve([args])}, 10),
)

const mockErroredNetworkCall = jest.fn()
const mockErroredNetworkCallFunction = (address) => new Promise(
  reject => {
    mockErroredNetworkCall(address)
    reject(new Error('something went wrong'))


  --fa: "\e520"; }

.fa-sort {
  --fa: "\f0dc"; }

.fa-unsorted {
  --fa: "\f0dc"; }

.fa-list-ol {
  --fa: "\f0cb"; }

.fa-list-1-2 {
  --fa: "\f0cb"; }

.fa-list-numeric {
  --fa: "\f0cb"; }

.fa-person-dress-burst {
  --fa: "\e544"; }

.fa-money-check-dollar {
  --fa: "\f53d"; }

.fa-money-check-alt {
  --fa: "\f53d"; }

.fa-vector-square {
  --fa: "\f5cb"; }

.fa-bread-slice {
  --fa: "\f7ec"; }

.fa-language {
  --fa: "\f1ab"; }

.fa-face-kiss-wink-heart {
  --fa: "\f598"; }

.fa-kiss-wink-heart {
  --fa: "\f598"; }

.fa-filter {
  --fa: "\f0b0"; }

.fa-question {
  --fa: "\3f"; }

.fa-file-signature {
  --fa: "\f573"; }

.fa-up-down-left-right {
  --fa: "\f0b2"; }

.fa-arrows-alt {
  --fa: "\f0b2"; }

.fa-house-chimney-user {
  --fa: "\e065"; }

.fa-hand-holding-heart {
  --fa: "\f4be"; }

.fa-puzzle-piece {
  --fa: "\f12e"; }

.fa-money-check {
  --fa: "\f53c"; }

.fa-star-half-stroke {
  --fa: "\f5c0"; }

.fa-star-half-alt {
  --fa: "\f5c0"; }

.fa-code {
  --fa: "\f121"; }

.fa-whiskey-glass {
  --fa: "\f7a0"; }

.fa-glass-whiskey {
  --fa: "\f7a0"; }

.fa-building-circle-exclamation {
  --fa: "\e4d3"; }

.fa-magnifying-glass-chart {
  --fa: "\e522"; }

.fa-arrow-up-right-from-square {
  --fa: "\f08e"; }

.fa-external-link {
  --fa: "\f08e"; }

.fa-cubes-stacked {
  --fa: "\e4e6"; }

.fa-won-sign {
  --fa: "\f159"; }

.fa-krw {
  --fa: "\f159"; }

.fa-won {
  --fa: "\f159"; }

.fa-virus-covid {
  --fa: "\e4a8"; }

.fa-austral-sign {
  --fa: "\e0a9"; }

.fa-f {
  --fa: "\46"; }

.fa-leaf {
  --fa: "\f06c"; }

.fa-road {
  --fa: "\f018"; }

.fa-taxi {
  --fa: "\f1ba"; }

.fa-cab {
  --fa: "\f1ba"; }

.fa-person-circle-plus {
  --fa: "\e541"; }

.fa-chart-pie {
  --fa: "\f200"; }

.fa-pie-chart {
  --fa: "\f200"; }

.fa-bolt-lightning {
  --fa: "\e0b7"; }

.fa-sack-xmark {
  --fa: "\e56a"; }

.fa-file-excel {
  --fa: "\f1c


1, [r4]
	add r0, r4, #0
	lsl r2, r1, #2
	ldr r1, _02254918 ; =ov47_022553B8
	ldr r1, [r1, r2]
	blx r1
	cmp r0, #0
	beq _02254914
	add r0, r4, #0
	bl ov47_022548CC
	add r0, r5, #0
	bl SysTask_Destroy
	ldr r0, [r4, #0x18]
	bl ov20_022529A0
_02254914:
	pop {r3, r4, r5, pc}
	nop
_02254918: .word ov47_022553B8
	thumb_func_end ov47_022548E0

	thumb_func_start ov47_0225491C
ov47_0225491C: ; 0x0225491C
	mov r1, #1
	strb r1, [r0, #2]
	bx lr
	.align 2, 0
	thumb_func_end ov47_0225491C

	thumb_func_start ov47_02254924
ov47_02254924: ; 0x02254924
	ldrb r2, [r0, #2]
	cmp r2, #0
	bne _0225492C
	b _0225492E
_0225492C:
	mov r1, #5
_0225492E:
	strb r1, [r0]
	mov r1, #0
	strb r1, [r0, #1]
	bx lr
	.align 2, 0
	thumb_func_end ov47_02254924

	thumb_func_start ov47_02254938
ov47_02254938: ; 0x02254938
	push {r4, lr}
	add r4, r0, #0
	ldrb r0, [r4, #1]
	cmp r0, #0
	beq _02254948
	cmp r0, #1
	beq _02254958
	b _02254972
_02254948:
	ldr r0, [r4, #0x14]
	mov r1, #0
	bl ov47_02254E24
	ldrb r0, [r4, #1]
	add r0, r0, #1
	strb r0, [r4, #1]
	b _02254972
_02254958:
	ldr r0, [r4, #0x14]
	mov r1, #0
	bl ov47_02254E48
	cmp r0, #0
	beq _02254972
	ldr r0, [r4, #0x18]
	bl ov20_0225298C
	add r0, r4, #0
	mov r1, #1
	bl ov47_02254924
_02254972:
	mov r0, #0
	pop {r4, pc}
	.align 2, 0
	thumb_func_end ov47_02254938

	thumb_func_start ov47_02254978
ov47_02254978: ; 0x02254978
	push {r3, r4, r5, lr}
	add r4, r0, #0
	ldrb r1, [r4, #2]
	cmp r1, #0
	beq _0225498C
	mov r1, #5
	bl ov47_02254924
	mov r0, #0
	pop {r3, r4, r5, pc}
_0225498C:
	ldrb r1, [r4, #1]
	cmp r1, #0
	bne _022549DA
	bl ov47_02254BD4
	cmp r0, #0
	beq _022549DA
	add r0, r4, #0
	bl ov47_02254D04


	byte	0x09,0x89,0x49,0xc9,0x29,0xa9,0x69,0xe9
	byte	0x19,0x99,0x59,0xd9,0x39,0xb9,0x79,0xf9
	byte	0x05,0x85,0x45,0xc5,0x25,0xa5,0x65,0xe5
	byte	0x15,0x95,0x55,0xd5,0x35,0xb5,0x75,0xf5
	byte	0x0d,0x8d,0x4d,0xcd,0x2d,0xad,0x6d,0xed
	byte	0x1d,0x9d,0x5d,0xdd,0x3d,0xbd,0x7d,0xfd
	byte	0x03,0x83,0x43,0xc3,0x23,0xa3,0x63,0xe3
	byte	0x13,0x93,0x53,0xd3,0x33,0xb3,0x73,0xf3
	byte	0x0b,0x8b,0x4b,0xcb,0x2b,0xab,0x6b,0xeb
	byte	0x1b,0x9b,0x5b,0xdb,0x3b,0xbb,0x7b,0xfb
	byte	0x07,0x87,0x47,0xc7,0x27,0xa7,0x67,0xe7
	byte	0x17,0x97,0x57,0xd7,0x37,0xb7,0x77,0xf7
	byte	0x0f,0x8f,0x4f,0xcf,0x2f,0xaf,0x6f,0xef
	byte	0x1f,0x9f,0x5f,0xdf,0x3f,0xbf,0x7f,0xff

	global		fmovm_calc_ea
###############################################
# _fmovm_calc_ea: calculate effective address #
###############################################
fmovm_calc_ea:
	mov.l		%d0,%a0			# move # bytes to a0

# currently, MODE and REG are taken from the EXC_OPWORD. this could be
# easily changed if they were inputs passed in registers.
	mov.w		EXC_OPWORD(%a6),%d0	# fetch opcode word
	mov.w		%d0,%d1			# make a copy

	andi.w		&0x3f,%d0		# extract mode field
	andi.l		&0x7,%d1		# extract reg  field

# jump to the corresponding function for each {MODE,REG} pair.
	mov.w		(tbl_fea_mode.b,%pc,%d0.w*2),%d0 # fetch jmp distance
	jmp		(tbl_fea_mode.b,%pc,%d0.w*1) # jmp to correct ea mode

	swbeg		&64
tbl_fea_mode:
	short		tbl_fea_mode	-	tbl_fea_mode
	short		tbl_fea_mode	-	tbl_fea_mode
	short		tbl_fea_mode	-	tbl_fea_mode


required:"Fältet är obligatoriskt",
        number:"Välj korrekt nummer",
        minValue:"värdet måste vara större än eller lika med",
        maxValue:"värdet måste vara mindre än eller lika med",
        email: "är inte korrekt e-post adress",
        integer: "Var god ange korrekt heltal",
        date: "Var god ange korrekt datum",
        url: "är inte en korrekt URL. Prefix måste anges ('http://' or 'https://')",
        nodefined : " är inte definierad!",
        novalue : " returvärde måste anges!",
        customarray : "Custom funktion måste returnera en vektor!",
        customfcheck : "Custom funktion måste finnas om Custom kontroll sker!"
      }
    },
    view : {
      caption: "Visa Post",
      bClose: "Stäng"
    },
    del : {
      caption: "Radera",
      msg: "Radera markerad(e) post(er)?",
      bSubmit: "Radera",
      bCancel: "Avbryt"
    },
    nav : {
      edittext: "",
      edittitle: "Redigera markerad rad",
      addtext:"",
      addtitle: "Skapa ny post",
      deltext: "",
      deltitle: "Radera markerad rad",
      searchtext: "",
      searchtitle: "Sök poster",
      refreshtext: "",
      refreshtitle: "Uppdatera data",
      alertcap: "Varning",
      alerttext: "Ingen rad är markerad",
      viewtext: "",
      viewtitle: "Visa markerad rad"
    },
    col : {
      caption: "Välj Kolumner",
      bSubmit: "OK",
      bCancel: "Avbryt"
    },
    errors : {
      errcap : "Fel",
      nourl : "URL saknas",
      norecords: "Det finns inga poster att bearbeta",
      model : "Antal colNames <> colModel!"
    },
    formatter : {
      integer : {thousandsSeparator: " ", defaultValue: '0'},
      number : {decimalSeparator:",", thousandsSeparator: " ", decimalPlaces: 2, defaultValue: '0,00'},
      currency : {decimalSeparator:",", thousandsSeparator: " ", decimalPlaces: 2, prefix: "", suffix:"Kr", defaultValue: '0,00'},
      date : {
        dayNames:   [
          "Sön", "Mån", "Tis", "Ons", "Tor", "Fre", "Lör",
          "Söndag", "Måndag", "Tisdag", "Onsdag", "Torsdag", "Fredag", "Lördag"
        ],
        monthNames: [
          "Jan", "Feb", "Mar", "Apr", "Maj", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dec",
          "Januari", "Februari", "Mars", "April", "Maj", "Juni", "Juli", "Augusti", "September", "Oktober", "November", "December"
        ],
        AmPm : ["fm","em","FM","EM"],
        S: function (j) {
          return j < 11 || j > 13 ? ['st', 'nd', 'rd', 'th'][Math.min((j - 1) % 10, 3)] : 'th'
        },
        srcformat: 'Y-m-d',
        newformat: 'Y-m-d',
        masks : {
          ISO8601Long:"Y-m-d H


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

from parl.algorithms.fluid.a3c import *
from parl.algorithms.fluid.ddpg import *
from parl.algorithms.fluid.maddpg import *
from parl.algorithms.fluid.dqn import *
from parl.algorithms.fluid.ddqn import *
from parl.algorithms.fluid.policy_gradient import *
from parl.algorithms.fluid.ppo import *
from parl.algorithms.fluid.td3 import *
from parl.algorithms.fluid.sac import *
from parl.algorithms.fluid.impala.impala import *
from parl.algorithms.fluid.qmix import *


```json
{
  "success": false,
  "message": "Lead no encontrado",
  "data": null
}
```

### 6. Buscar Leads por Teléfono
**GET** `/api/leads/telefono/{telefono}`

**Response:**
```json
{
  "success": true,
  "message": "Se encontraron 2 leads con el teléfono +1234567890",
  "data": [
    {
      "id": "507f1f77bcf86cd799439011",
      "fecha_contacto": "2024-01-15",
      "nombre": "Juan Pérez",
      "telefono": "+1234567890",
      "estado": "nuevo",
      "fuente": "página web",
      "referencia": "cliente anterior",
      "direccion": "Calle 123, Ciudad",
      "pais_contacto": "España",
      "necesidad": "instalación solar residencial",
      "provincia_montaje": "Madrid"
    }
  ]
}
```

### 7. Verificar si Existe un Lead
**GET** `/api/leads/{lead_id}/existe`

**Response:**
```json
{
  "success": true,
  "message": "Lead encontrado",
  "exists": true
}
```

**Response (no existe):**
```json
{
  "success": true,
  "message": "Lead no encontrado",
  "exists": false
}
```

## Códigos de Estado HTTP

- **200 OK**: Operación exitosa
- **404 Not Found**: Lead no encontrado
- **422 Unprocessable Entity**: Error de validación en los datos
- **500 Internal Server Error**: Error interno del servidor

## Notas

- Los leads se ordenan por fecha de contacto más reciente al listarlos
- La búsqueda por nombre y teléfono es insensible a mayúsculas/minúsculas
- Al actualizar, solo se modifican los campos enviados en el request
- El campo `id` se genera automáticamente al crear un lead# Documentación de Endpoints - Gestión de Brigadas y Trabajadores

## Base URL
```
http://localhost:8000/api
```

---

## 1. ENDPOINTS DE BRIGADAS

### 1.1 Listar Brigadas
**GET** `/brigadas/`

**Descripción:** Obtiene todas las brigadas con sus líderes e integrantes. Permite búsqueda opcional por nombre.

**Parámetros de Query:**
- `search` (opcional): String para filtrar brigadas por nombre del líder o integrantes

**Respuesta Exitosa (200):**
```json
{
  "success": true,
  "message": "Todas las brigadas obtenidas exitosamente",
  "data": [
    {
      "lider": {
        "nombre": "Juan Pérez",
        "CI": "12345678"
      },
      "integrantes": [
        {
          "nombre": "María García",
          "CI": "87654321"
        }
      ]
    }
  ]
}
```

**Respuesta con Búsqueda:**
```json
{
  "success": true,
  "message": "Brigadas filtradas obtenidas exitosamente",
  "data": [...]
}
```

---

### 1.2 Obtener Brigada Específica
**GET** `/brigadas/{brigada_id}`

**Descripción:** Obtiene los detalles de una brigada específica por su ID.

**Parámetros de Path:**
- `brigada_id`: String - ID de la


 height: '100%'});
      }, 2000);
      <?php } ?>

      // $('.expend-player').on('click', function(event) {
      //   event.preventDefault();
      //   var resize = 0;
      //   if ($('.player-video').hasClass('col-md-12')) {
      //     resize = 0;
      //   } else {
      //     resize = 1;
      //   }
      //   $.post('{{LINK aj/set-cookies}}', {name: 'resize', value:resize});
      //   PT_Resize();
      //  });

       // $('video').mediaelementplayer({
       //   pluginPath: 'https://cdnjs.com/libraries/mediaelement-plugins/',
       //   shimScriptAccess: 'always',
       //   autoplay: true,
       //   features: ['playpause', 'current', 'progress', 'duration', 'speed', 'skipback', 'jumpforward', 'tracks', 'markers', 'volume', 'chromecast', 'contextmenu', 'flash' <?php echo ($pt->config->ffmpeg_system == 'on' && empty($pt->get_video->youtube)) ? ", 'quality'" : ''?> {{ADS}} {{VAT}}, 'fullscreen'],
       //   vastAdTagUrl: '{{VAST_URL}}',
       //   vastAdsType: '{{VAST_TYPE}}',
       //   jumpForwardInterval: 20,
       //   adsPrerollMediaUrl: [{{AD_MEDIA}}],
       //   adsPrerollAdUrl: [{{AD_LINK}}],
       //   adsPrerollAdEnableSkip: {{AD_SKIP}},
       //   adsPrerollAdSkipSeconds: {{AD_SKIP_NUM}},
       //   success: function (media) {
       //       media.addEventListener('ended', function (e) {

       //         if ($('#autoplay').is(":checked")) {
       //            var url = $('#next-video').find('.video-title').find('a').attr('href');
       //            if (url) {
       //               window.location.href = url;
       //            }
       //         }
       //         else{
       //           /* pass */
       //         }
       //       }, false);

       //       media.addEventListener('playing', function (e) {
       //         if (pt_elexists('.ads-overlay-info')) {
       //           $('.ads-overlay-info').remove();
       //         }

       //         $('.ads-test').remove();

       //         if ($('body').attr('resized') == 'true') {
       //             PT_Resize(true);
       //         }
       //         $('.mejs__container').css('height', ($('.mejs__container').width() / 1.77176216) + 'px');
       //         $('video, iframe').css('height', '100%');
       //       });
       //   },
       // });

       // $('.expend-player').on('click', function(event) {
       //  event.preventDefault();
       //  var resize = 0;
       //  if ($('.player-video').hasClass('col-md-12')) {
       //    resize = 0;
       //  } else {
       //    resize = 1;
       //  }
       //  $.post('{{LINK aj/set-cookies}}', {name: 'resize', value:resize});
       //  PT_Resize();
       // });
      <?php
      if (!empty($_SESSION['resize']) && $pt->config->resize_video == 'on' && (empty($pt->get_video->daily) && empty($pt->get_video->vimeo))) {
       ?>
         // PT_Resize(true);
         // if ($('.player-video').hasClass('col-md-12')) {
         //   $('#background').css('height', '87%');
         // }
       <?php
      }
      ?>
      // $(window).resize(function(event) {
      //   if ($('body').attr('resized') =


  --checkbox-size: calc(var(--font-text-size) * 0.85);
  --checkbox-radius: 4px;
  --checkbox-top: 1px;
  --checkbox-left: 0px;
  --checkbox-margin: 0px 8px 0px -2em;
}

body.minimal-strike-lists {
  --checklist-done-decoration: line-through;
}

body:not(.minimal-strike-lists) {
  --checklist-done-decoration: none;
  --checklist-done-color: var(--text-normal);
}

.markdown-preview-section > .contains-task-list {
  padding-bottom: 0.5em;
}

.mod-cm6 .HyperMD-task-line[data-task] .cm-formatting-list-ol ~ .task-list-label .task-list-item-checkbox {
  margin: 1px;
}

.markdown-preview-view .task-list-item-checkbox {
  position: relative;
  top: var(--checkbox-top);
  left: var(--checkbox-left);
}

.markdown-preview-view ul > li.task-list-item {
  text-indent: 0;
}

.minimal-code-scroll {
  --code-white-space: pre;
}
.minimal-code-scroll .HyperMD-codeblock.HyperMD-codeblock-bg {
  overflow-y: scroll;
  white-space: pre;
}
.minimal-code-scroll .cm-hmd-codeblock {
  white-space: pre !important;
}

@media print {
  .print {
    --code-background: #eee !important;
  }
}
/* Transcluded notes and embeds */
body {
  --embed-max-height: none;
  --embed-decoration-style: solid;
  --embed-decoration-color: var(--background-modifier-border-hover);
}

/* Strict embeds (naked) */
.embed-strict {
  --embed-background: transparent;
  --embed-border-start: 0;
  --embed-border-left: 0;
  --embed-padding: 0;
}
.embed-strict .markdown-embed-content {
  --folding-offset: 0px;
}
.embed-strict .internal-embed .markdown-embed,
.embed-strict .markdown-preview-view .markdown-embed, .embed-strict.markdown-preview-view .markdown-embed {
  padding: 0;
}
.embed-strict .markdown-embed-title,
.embed-strict .internal-embed .markdown-embed .markdown-embed-title {
  display: none;
}
.embed-strict .internal-embed:not([src*="#^"]) .markdown-embed-link {
  width: 24px;
  opacity: 0;
}

.embed-underline .internal-embed:not(.pdf-embed, .bases-embed) {
  text-decoration-line: underline;
  text-decoration-style: var(--embed-decoration-style);
  text-decoration-color: var(--embed-decoration-color);
}

.embed-hide-title .markdown-embed-title {
  display: none;
}

.embed-strict.contextual-typography .internal-embed .markdown-preview-view .markdown-preview-sizer > div,
.contextual-typography .embed-strict .internal-embed .markdown-preview-view .markdown-preview-sizer > div {
  margin: 0;
  width: 100%;
}

.markdown-embed .markdown-preview-view .markdown-preview-sizer {
  padding-bottom: 0 !important;
}

.markdown-p


import LoadingSpinner from '../components/LoadingSpinner'
import { useRouter } from 'next/router'
jest.mock('@apollo/client')

describe('withQueryLoader HOC container', () => {
  const { push } = useRouter()
  test('Should return LoadingSpinner when loading', () => {
    useQuery.mockReturnValue({ loading: true, data: null })
    expect(withQueryLoader({ query: null },
Component
)()).toEqual(
      <LoadingSpinner />
    )
  })

  test('Should return Component when not loading and data is present', () => {
    useQuery.mockReturnValue({ loading: false, data: { a: 1 } })
    const Component = () => {
      return
Component

    }

    expect(
      withQueryLoader({ query: null }, Component)({ title: 'test' })
    ).toEqual(<Component queryData={{ a: 1 }} title="test" />)
  })

  test('Should return No data when done loading and no data is present', async () => {
    useQuery.mockReturnValue({ loading: false, data: null })
    const Component = () => {
      return
Component

    }
    render(withQueryLoader({ query: null }, Component)())
    await waitFor(() => expect(push).toBeCalledWith('/500'))
  })
})
/**
 * @jest-environment node
 */
import prismaMock from '../../__tests__/utils/prismaMock'
import {
  exerciseSubmissions,
  addExerciseSubmission
} from './exerciseSubmissionCrud'

describe('exerciseSubmissions resolver', () => {
  test('Should return an empty array if the user is not logged in', () => {
    const mockContext = { req: { user: null } }

    expect(exerciseSubmissions(undefined, undefined, mockContext)).toEqual([])
  })

  test("Should return user's exercise submissions of the logged in user", async () => {
    const mockExerciseSubmissions = [{ id: 1 }, { id: 2 }]
    const mockContext = { req: { user: { id: 1 } } }
    prismaMock.exerciseSubmission.findMany.mockResolvedValue(
      mockExerciseSubmissions
    )

    await expect(
      exerciseSubmissions(undefined, undefined, mockContext)
    ).resolves.toEqual(mockExerciseSubmissions)
    expect(prismaMock.exerciseSubmission.findMany).toBeCalledWith({
      where: { userId: 1 }
    })
  })
})

describe('addExerciseSubmission resolver', () => {
  test("Should throw an error if the user isn't logged in", async () => {
    const mockContext = { req: { user: null } }
    const mockArgs = { exerciseId: 2, userAnswer: '123' }

    await expect(
      addExerciseSubmission(undefined, mockArgs, mockContext)
    ).rejects.toEqual(new Error('User should be logged in.'))
  })

  test('Should update an exercise submission if it already exists', async () => {
    const mockContext = { req: { user: { id: 1 } } }
    const mockArgs = { exerciseId: 2, userAnswer: '123' }
    const mockExerciseSubmission = {
      id: 1,
      exerciseId: 2,
      userId: 1,
      userAnswer: '123'
    }
    prismaMock.exerciseSubmission.findFirst.mockResolvedValue(
      mockExerciseSubmission
    )
    prismaMock.exerciseSubmission.update.mockResolvedValue(
      mockExerciseSubmission
    )

    await expect(
      addExerciseSubmission(undefined, mockArgs, mockContext)
    ).resolves.toEqual(mockExerciseSubmission)
    expect(prismaMock.exerciseSubmission.findFirst).toBeCalledWith({
      where: { exerciseId: 2, userId: 1 }
    })
    expect(prismaMock.exerciseSubmission.u


 Some((from_glib(ver), status_code, from_glib_full(reason_phrase))) } else { None }
    }
}

#[doc(alias = "soup_http_error_quark")]
pub fn http_error_quark() -> glib::Quark {
    assert_initialized_main_thread!();
    unsafe {
        from_glib(ffi::soup_http_error_quark())
    }
}

//#[doc(alias = "soup_str_case_equal")]
//pub fn str_case_equal(v1: /*Unimplemented*/Option<Fundamental: Pointer>, v2: /*Unimplemented*/Option<Fundamental: Pointer>) -> bool {
//    unsafe { TODO: call ffi:soup_str_case_equal() }
//}

//#[doc(alias = "soup_str_case_hash")]
//pub fn str_case_hash(key: /*Unimplemented*/Option<Fundamental: Pointer>) -> u32 {
//    unsafe { TODO: call ffi:soup_str_case_hash() }
//}

#[cfg(any(feature = "v2_40", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_40")))]
#[doc(alias = "soup_tld_domain_is_public_suffix")]
pub fn tld_domain_is_public_suffix(domain: &str) -> bool {
    assert_initialized_main_thread!();
    unsafe {
        from_glib(ffi::soup_tld_domain_is_public_suffix(domain.to_glib_none().0))
    }
}

#[cfg(any(feature = "v2_40", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_40")))]
#[doc(alias = "soup_tld_get_base_domain")]
pub fn tld_get_base_domain(hostname: &str) -> Result<glib::GString, glib::Error> {
    assert_initialized_main_thread!();
    unsafe {
        let mut error = ptr::null_mut();
        let ret = ffi::soup_tld_get_base_domain(hostname.to_glib_none().0, &mut error);
        if error.is_null() { Ok(from_glib_none(ret)) } else { Err(from_glib_full(error)) }
    }
}

//#[doc(alias = "soup_value_array_append")]
//pub fn value_array_append(array: /*Ignored*/&mut glib::ValueArray, type_: glib::types::Type, : /*Unknown conversion*//*Unimplemented*/Fundamental: VarArgs) {
//    unsafe { TODO: call ffi:soup_value_array_append() }
//}

//#[doc(alias = "soup_value_array_append_vals")]
//pub fn value_array_append_vals(array: /*Ignored*/&mut glib::ValueArray, first_type: glib::types::Type, : /*Unknown conversion*//*Unimplemented*/Fundamental: VarArgs) {
//    unsafe { TODO: call ffi:soup_value_array_append_vals() }
//}

//#[doc(alias = "soup_value_array_from_args")]
//pub fn value_array_from_args(args: /*Unknown conversion*//*Unimplemented*/Unsupported) -> /*Ignored*/Option<glib::ValueArray> {
//    unsafe { TODO: call ffi:soup_value_array_from_args() }
//}

//#[doc(alias = "soup_value_array_get_nth")]
//pub fn value_array_get_nth(array: /*Ignored*/&mut glib::ValueArray, index_: u32, type_: glib::types::Type, : /*Unknown conversion*//*Unimplemented*/Fundamental: VarArgs) -> bool {
//    unsafe { TODO: call ffi:soup_value_array_get_nth() }
//}

//#[doc(alias = "soup_value_array_


──────┘
```

**Architectural Philosophy:**
- **Rust owns sovereignty** - Protocol, cryptography, storage
- **Go owns beauty** - TUI presentation (separate process)
- **Git owns persistence** - Distributed storage substrate
- **Users own everything** - Keys, data, decisions

---

## Cryptographic Foundation

### Ed25519 Digital Signatures (`ed25519-dalek = "2.2.0"`)

**Purpose:** Sovereign identity and message authentication
**Why This Crate:** Industry standard, high-performance, formally verified
**Sovereignty Role:** Every message MUST be signed. No unsigned content exists in mmogit.

```rust
// Identity generation from seed phrase
let signing_key = SigningKey::from_bytes(&seed_bytes);
let verifying_key = signing_key.verifying_key();

// Message signing (REQUIRED for all content)
let signature = signing_key.sign(message.as_bytes());
```

**Security Guarantees:**
- **Deterministic signatures** - Same message + key = same signature
- **Public key recovery** - Verify without revealing private key
- **Quantum-resistant until 2030** - Conservative estimate
- **No randomness required** - Perfect for deterministic systems

**Audit Status:** ✅ **Excellent**
- Used by Signal, Tor, SSH, and most sovereignty projects
- Formal verification by multiple teams
- No known vulnerabilities in current version

**Agent Implementation Note:**
```rust
// INVARIANT: Every message MUST be signed
// This is not optional - it's the foundation of sovereignty
let signature = signing_key.sign(content.as_bytes());
assert!(verifying_key.verify(content.as_bytes(), &signature).is_ok());
```

### XChaCha20-Poly1305 Encryption (`chacha20poly1305 = "0.10.1"`)

**Purpose:** "Overground Railroad" - encryption for public Git platforms
**Why This Crate:** Extended nonce space, AEAD, blazing fast
**Sovereignty Role:** Transform Git hosting into blind storage

```rust
// Encrypt for the Overground Railroad
let cipher = XChaCha20Poly1305::new(&key);
let nonce = XChaCha20Poly1305::generate_nonce(&mut OsRng);
let ciphertext = cipher.encrypt(&nonce, plaintext.as_ref())?;
```

**Why XChaCha20-Poly1305 vs Alternatives:**
- **vs AES-GCM:** No timing attacks, software-friendly
- **vs ChaCha20-Poly1305:** Extended 192-bit nonce (vs 96-bit)
- **vs Salsa20:** ChaCha20 is Salsa20's successor, faster on modern CPUs
- **vs NaCl/libsodium:** Direct Rust implementation, no C dependencies

**Extended Nonce Benefits:**
```
Standard ChaCha20: 96-bit nonce  = 2^48 messages before reuse risk
Extended XChaCha20: 192-bit nonce = 2^96 messages before reuse risk
```

**Sovereignty Architecture:**
```
GitHub/GitLab sees: Random encrypted bytes
Platform cannot:   Read, censor, or analyze content
Users maintain:     Full cryptographic sovereignty
```

**Agent Security Note:**
The 192-bit nonce is critical for AI agents who may generate millions of messages. Standard 96-bit nonces would create reuse risks in high-volume scenarios.

### BIP39 Seed Phrases (`bip39 = "2.2.0"`)

**Purpose:** Human-readable sovereign identity
**Why This Standard:** Bitcoin-proven, hardware wallet compatible
**Sovereignty Role:** Your seed phrase IS your identity - no recovery, no reset

```rust
// Generate maximum entropy (24 words = 256 bits)
let mnemonic = Mnemonic::generate_in(Language::English, 24)?;

// Deterministic key derivation
let seed = mnemonic.to_seed("");  // Empty passphrase
let signing_key = SigningKey::from_bytes(&seed[..


000?pd_rd_w=t8uYk&content-id=amzn1.sym.44b0dc04-f99a-4419-a406-9567d0fa03fe&pf_rd_p=44b0dc04-f99a-4419-a406-9567d0fa03fe&pf_rd_r=73JH5M3GK0738GK42Q4C&pd_rd_wg=qvlOQ&pd_rd_r=4d18c787-a3dd-4c96-94c0-eed7eeffde34&pd_rd_i=1484278445">
Peter Himschoot

4.6 out of 5 stars 16

Paperback

23 offers from $40.55

<a class="a-link-normal" tabindex="-1" href="/Pro-ASP-NET-Core-Cloud-Ready-Applications/dp/1484279565/ref=pd_sbs_sccl_2_6/000-0000000-0000000?pd_rd_w=t8uYk&content-id=amzn1.sym.44b0dc04-f99a-4419-a406-9567d0fa03fe&pf_rd_p=44b0dc04-f99a-4419-a406-9567d0fa03fe&pf_rd_r=73JH5M3GK0738GK42Q


:checked:before,input[type=checkbox][aria-disabled=true],input[type=radio].disabled,input[type=radio].disabled:checked:before,input[type=radio]:disabled,input[type=radio]:disabled:checked:before,input[type=radio][aria-disabled=true]{opacity:.7;cursor:default}.wp-core-ui select{font-size:14px;line-height:2;color:#2c3338;border-color:#8c8f94;box-shadow:none;border-radius:3px;padding:0 8px 0 24px;min-height:30px;max-width:25rem;-webkit-appearance:none;background:#fff url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M5%206l5%205%205-5%202%201-7%207-7-7%202-1z%22%20fill%3D%22%23555%22%2F%3E%3C%2Fsvg%3E') no-repeat left 5px top 55%;background-size:16px 16px;cursor:pointer;vertical-align:middle}.wp-core-ui select:hover{color:#2271b1}.wp-core-ui select:focus{border-color:#2271b1;color:#0a4b78;box-shadow:0 0 0 1px #2271b1}.wp-core-ui select:active{border-color:#8c8f94;box-shadow:none}.wp-core-ui select.disabled,.wp-core-ui select:disabled{color:#a7aaad;border-color:#dcdcde;background-color:#f6f7f7;background-image:url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M5%206l5%205%205-5%202%201-7%207-7-7%202-1z%22%20fill%3D%22%23a0a5aa%22%2F%3E%3C%2Fsvg%3E');box-shadow:none;text-shadow:0 1px 0 #fff;cursor:default;transform:none}.wp-core-ui select[aria-disabled=true]{cursor:default}.wp-core-ui select:-moz-focusring{color:transparent;text-shadow:0 0 0 #0a4b78}.wp-core-ui select::-ms-value{background:0 0;color:#50575e}.wp-core-ui select:hover::-ms-value{color:#2271b1}.wp-core-ui select:focus::-ms-value{color:#0a4b78}.wp-core-ui select.disabled::-ms-value,.wp-core-ui select:disabled::-ms-value{color:#a7aaad}.wp-core-ui select::-ms-expand{display:none}.wp-admin .button-cancel{display:inline-block;min-height:28px;padding:0 5px;line-height:2}.meta-box-sortables select{max-width:100%}.meta-box-sortables input{vertical-align:middle}.misc-pub-post-status select{margin-top:0}.wp-core-ui select[multiple]{height:auto;padding-left:8px;background:#fff}.submit{padding:1.5em 0;margin:5px 0;border-bottom-right-radius:3px;border-bottom-left-radius:3px;border:none}form p.submit a.cancel:hover{text-decoration:none}p.submit{text-align:right;max-width:100%;margin-top:20px;padding-top:10px}.textright p.submit{border:none;text-align:left}table.form-table+input+input+p.submit,table.form-table+input+p.submit,table.form-table+p.submit{border-top


0)
#define STACK_REG_SAVE      (STACK_W + STACK_W_SIZE)
#define STACK_SIZE          (STACK_REG_SAVE + STACK_REG_SAVE_SIZE)

/* Instruction helpers. */

#define roll2(v, reg)		\
	roll $(v), reg;

#define roll3mov(v, src, dst)	\
	movl src, dst;		\
	roll $(v), dst;

#define roll3(v, src, dst)	\
	rorxl $(32-(v)), src, dst;

#define addl2(a, out)		\
	leal (a, out), out;

/* Round function macros. */

#define GG1(x, y, z, o, t)	\
	movl x, o;		\
	xorl y, o;		\
	xorl z, o;

#define FF1(x, y, z, o, t) GG1(x, y, z, o, t)

#define GG2(x, y, z, o, t)	\
	andnl z, x, o;		\
	movl y, t;		\
	andl x, t;		\
	addl2(t, o);

#define FF2(x, y, z, o, t)	\
	movl y, o;		\
	xorl x, o;		\
	movl y, t;		\
	andl x, t;		\
	andl z, o;		\
	xorl t, o;

#define R(i, a, b, c, d, e, f, g, h, round, widx, wtype)		\
	/* rol(a, 12) => t0 */						\
	roll3mov(12, a, t0); /* rorxl here would reduce perf by 6% on zen3 */ \
	/* rol (t0 + e + t), 7) => t1 */				\
	leal K##round(t0, e, 1), t1;					\
	roll2(7, t1);							\
	/* h + w1 => h */						\
	addl wtype##_W1_ADDR(round, widx), h;				\
	/* h + t1 => h */						\
	addl2(t1, h);							\
	/* t1 ^ t0 => t0 */						\
	xorl t1, t0;							\
	/* w1w2 + d => d */						\
	addl wtype##_W1W2_ADDR(round, widx), d;				\
	/* FF##i(a,b,c) => t1 */					\
	FF##i(a, b, c, t1, t2);						\
	/* d + t1 => d */						\
	addl2(t1, d);							\
	/* GG#i(e,f,g) => t2 */						\
	GG##i(e, f, g, t2, t1);						\
	/* h + t2 => h */						\
	addl2(t2, h);							\
	/* rol (f, 19) => f */						\
	roll2(19, f);							\
	/* d + t0 => d */						\
	addl2(t0, d);							\
	/* rol (b, 9) => b */						\
	roll2(9, b);							\
	/* P0(h) => h */						\
	roll3(9, h, t2);						\
	roll3(17, h, t1);						\
	xorl t2, h;							\
	xorl t1, h;

#define R1(a, b, c, d, e, f, g, h, round, widx, wtype) \
	R(1, a, b, c


2 3,2 2,3 3,2 3),(1 2,0 2,1 1,1 2)),((1 4,1 5,2 5,1 4)),((4 0,4 1,5 1,5 0,4 0)))",
    "MULTIPOLYGON(((2 0,0 0,0 5,1 5,2 4,2 5,4 5,4.5 4.5,5 5,5 4,4 4,4 3,5 3,5 0,2 0),(0 2,0.5 1.5,1 2,0 2),(1 4,2 3,2 4,1 4)))"
};

static std::string case_recursive_boxes_74[2] =
{
    // Needs another method to find isolated regions (previous attempted used parents, that is dropped now)
    "MULTIPOLYGON(((3 5,5 5,5 0,0 0,0 5,3 5),(2 3,1.5 2.5,2 2,3 3,2 3),(3 3,4 2,4 3,3 3),(2 0,3 1,2 1,2 0)))",
    "MULTIPOLYGON(((2 0,0 0,0 5,1 5,2 4,2 5,5 5,5 0,2 0),(2 1,2.5 0.5,3 1,2 1),(2 3,3 3,3 4,2 4,2 3),(3 1,4 1,5 2,3 2,3 1)))"
};

static std::string case_recursive_boxes_75[2] =
{
    // Needs intersection pattern 6 (skip all isolated ranks in between)
    "MULTIPOLYGON(((3 1,2 1,1 0,0 0,0 5,5 5,5 3,4 2,5 2,5 0,3 0,3 1),(2 3,1 3,2 2,2 3),(3 4,3.5 3.5,4 4,3 4),(3 3,3 2,4 2,4 3,3 3)))",
    "MULTIPOLYGON(((3 5,4 5,4.5 4.5,5 5,5 0,4 0,4 1,2 1,2 2,1 2,1 3,0 2,0 5,1 5,0.5 4.5,1 4,2 5,3 5),(3 4,3 3,4 4,3 4),(3 3,4 2,4 3,3 3)),((2 1,2 0,1 0,1 1,2 1)),((0 2,1 2,0.5 1.5,1 1,0 1,0 2)),((1 0,0 0,0 1,1 0)))"
};

static std::string case_recursive_boxes_76[2] =
{
    // Needs considering ix/ix turns (opposite in both directions) as the same region
    "MULTIPOLYGON(((3 5,3 4,4 5,4 4,5 4,5 0,0 0,0 4,1 4,1 5,3 5),(3 1,2 1,2.5 0.5,3 1),(1 2,0 2,0.5 1.5,1 2)))",
    "MULTIPOLYGON(((2 0,0 0,0 3,1 4,0 4,0 5,2 5,2 4,3 4,4 5,5 5,5 0,2 0),(3 1,4 0,4 1,3 1),(3 2,2 1,3 1,3 2),(3 3,3 4,2 3,3 3),(2 1,1 1,1.5 0.5,2 1),(4 3,4 4,3 4,4 3)))"
};

static std::string case_recursive_boxes_77[2] =
{
    // Needs discarding self i/u turn traveling to itself (for intersection only)
    "MULTIPOLYGON(((1 2,2 3,2 2,1 1,1 2)),((1 4,1 5,2 5,2 4,1 4)),((1 4,0 3,0 4,1 4)),((4 2,4 1,3 1,3 3,4 2)),((3 1,3 0,1 0,2 1,2.5 0.5,3 1)),((3 3,3 5,4 5,4 3,3 3)))",
    "MULTIPOLYGON(((3 4,3 5,4 5,4 4,3 4)),((3 1,3 0,2 0,3 1)),((3 1,2 1,2 2,3 2,3 1)),((2 3,2 4,3 3,2 3)),((2 1,1 0,0 0,1 1,2 1)),((1 4,2 3


 == _size);

    assert(textIndex >= 0);
    assert(textIndex <= _size);

    return _textToCluster[textIndex];
  }

  ClusterRange toClusterRange(int start, int end) {
    if (start < 0 || end > _size || start > end) {
      throw ArgumentError('TextRange [$start:$end) is out of paragraph text range: [0:$_size');
    }
    assert(_debugAddCount == _size);

    assert(start >= 0);
    assert(start <= end);
    assert(end <= _size);

    if (start == _size) {
      // The entire range is at the end of text.
      return ClusterRange.collapsed(_clusters.length);
    }

    if (start == end) {
      // For an empty text range, we create a collapsed (empty) cluster range at the same position.
      final int clusterIndex = toClusterIndex(start);
      return ClusterRange.collapsed(clusterIndex);
    }
    return ClusterRange(start: toClusterIndex(start), end: toClusterIndex(end - 1) + 1);
  }

  ui.TextRange toTextRange(ClusterRange clusterRange) {
    assert(clusterRange.start >= 0);
    assert(clusterRange.start <= clusterRange.end);
    assert(clusterRange.end <= _clusters.length);

    if (clusterRange.start == _clusters.length) {
      // The entire cluster range is at the end of text.
      return ui.TextRange.collapsed(_size);
    }

    final startCluster = _clusters[clusterRange.start];
    if (clusterRange.isEmpty) {
      return ui.TextRange.collapsed(startCluster.start);
    }
    final endCluster = _clusters[clusterRange.end - 1];

    return ui.TextRange(
      start: math.min(startCluster.start, endCluster.end),
      end: math.max(startCluster.start, endCluster.end),
    );
  }
}

abstract class WebCluster {
  int get start => span.start + startInSpan;

  int get end => span.start + endInSpan;

  int get startInSpan;

  int get endInSpan;

  // TODO(mdebbar): Cluster's `bounds` and `advance` are relative to the span, which isn't very useful
  //                most of the time. Should we hide those and only show `width`/`height` since those
  //                are still useful?
  //                Callsites that need `bounds` and `advance` are usually performing some kind of
  //                coordinate conversion to make them relative to the line, for example. We should
  //                encapsulate that logic here and make it convenient to use.
  ui.Rect get bounds;

  ui.Rect get advance;

  ParagraphSpan get span;

  WebTextStyle get style;

  void fillOnContext(DomCanvasRenderingContext2D context, {required double x, required double y});

  @override
  String toString() {
    return 'WebCluster [$start:$end)';
  }
}

class TextCluster extends WebCluster {
  TextCluster(this.span, this._cluster) : startInSpan = _cluster.start, endInSpan = _cluster.end;

  @override
  final TextSpan span;

  @override
  WebTextStyle get style => span.style;

  @override
  final int startInSpan;
  @override
  final int endInSpan;

  @override
  late final ui.Rect bounds = span.getClusterBounds(this);
  @override
  late final ui.Rect advance = span.getClusterSelection(this);

  final DomTextCluster _cluster;

  @override
  void fillOnContext(DomCanvasRenderingContext2D context, {required double x, required double y}) {
    context.fillTextCluster(
      _cluster,
      /*left:*/ 0,
      /*top:*/ span.fontBoundingBoxAscent,
      // TODO(mdebbar): Use proper TextClusterOptions.
      <String, double>{'x': x, 'y': y},
    );


v průběhu času a zdá se, že tento závazek spočívá ve dvou klíčových aspektech etiky komunity:
\n
\n

Projekt Monero je v konečném důsledku software - kód - napsaný lidmi. To může vést k potřebě opravovat chyby, přidávat vylepšení, která jsou v průběhu času objevena nebo vynalezena, implementovat modernizace protokolu nebo jednoduše udržovat projekt. To je v mnoha ohledech podobné jako u jiných částí softwaru, které používáte (například prohlížeče, ve kterém čtete tento článek!), které je třeba neustále aktualizovat, aby bylo možné přidávat nové funkce a opravovat chyby.

\n

Projekt Monero je nástrojem pro ochranu soukromí a ochrana soukromí je neustále se rozvíjejícím závodem ve zbrojení. Lidé a skupiny, kteří by si nepřáli nic jiného než zbavit svět soukromí (finančního i osobního), neustále vylepšují, vyvíjejí a vymýšlejí nové způsoby, jak napadnout moderní přístupy k ochraně soukromí, jako jsou ty, které se používají v Moneru. Jakmile nepřátelé soukromí tyto nové přístupy najdou, musí se síť Monero umět přizpůsobit a zdokonalit, aby se mohla bránit a bránit naše právo na finanční soukromí.

\n
';

  @override
  String get knowledge250Sbupgrades250Sb1250Sbtitle => 'Proč Monero potřebuje síť neustále upgradovat?';

  @override
  String get knowledge250Sbupgrades250Sb2250Sbtext => '
Složitost aktualizace Monera se projeví, jakmile pochopíte, jak moc se liší aktualizace kryptoměny od pouhého spuštění aktualizace softwaru v něčem, jako je prohlížeč.
\n
V kryptoměnách se na pravidlech sítě (například na tom, jak mají vypadat transakce, jak funguje těžba a jak se ověřuje každý blok) musí shodnout celá síť, což se nazývá \"konsensus\". Když je třeba některá z těchto pravidel změnit nebo aktualizovat, musí se síť dohodnout na nových pravidlech, což způsobí \"hard-fork\" - situaci, kdy se síť skutečně rozdělí na dva řetězce bloků - jeden podle starých a druhý podle nových pravidel.
\n
Když se na změnách pravidel shodnou všichni členové komunity, nazývá se to \"nesmlouvavý hard-fork\" a řetězec, který má stále stará pravidla, zanikne a po hard-forku se v něm netěží. Tak tomu bylo téměř u každého hard-forku Monero a jediným pokračováním starých pravidel byly projekty, které se snažily na hard-


    pub fn clksel(&self) -> CLKSEL_R {
        CLKSEL_R::new(((self.bits >> 8) & 0x07) as u8)
    }
    #[doc = "Bit 0 - TPIU Enable field. When set, the ARM M4 TPIU is enabled and data can be streamed out of the MCU's SWO port using the ARM ITM and TPIU modules."]
    #[inline(always)]
    pub fn enable(&self) -> ENABLE_R {
        ENABLE_R::new((self.bits & 0x01) != 0)
    }
}
impl W {
    #[doc = "Bits 8:10 - This field selects the frequency of the ARM M4 TPIU port."]
    #[inline(always)]
    pub fn clksel(&mut self) -> CLKSEL_W {
        CLKSEL_W { w: self }
    }
    #[doc = "Bit 0 - TPIU Enable field. When set, the ARM M4 TPIU is enabled and data can be streamed out of the MCU's SWO port using the ARM ITM and TPIU modules."]
    #[inline(always)]
    pub fn enable(&mut self) -> ENABLE_W {
        ENABLE_W { w: self }
    }
}
use std::{fs::{self, create_dir_all}, path::Path, io, io::Write};
use colored::{Colorize};
use fs_extra::dir::{copy, CopyOptions, get_size};

// TODO: What happens if two save games of the same thing are found

fn main() {
    // This text file holds all save game locations
    let save_locations_file: String = fs::read_to_string("save_locations.txt").unwrap();

    // Forces use of color, mainly for windows terminals. Usually commented because doesn't play nicely on Linux.
    //control::set_virtual_terminal(true).unwrap();

    // Get the C:\ drive path from user input
    print!("Where is your C:\\ mount? (If you're on windows just press enter): ");
    std::io::stdout().flush().unwrap();
    let mut global_path = String::new();
    io::stdin().read_line(&mut global_path).unwrap();

    // If user didn't type anything, default to C:\
    let mut global_path = global_path.trim().to_owned();
    if global_path.is_empty(){
        global_path.push_str("C:/");
    }

    // Gets a tuple that stores every found save game as (game_name, save_location)
    let save_vector: Vec<(String, String)> = find_save_games(save_locations_file, global_path);

    // Exit if couldn't find any saves
    if save_vector.len() == 0{
        println!("{}", "Couldn't find any save games ):".red());
        print!("Press enter to exit...");
        std::io::stdout().flush().unwrap();
        io::stdin().read_line(&mut String::new()).unwrap();
        return;
    }

    println!("\nType the number or name of the game save you'd like to copy, or type ALL to copy all the save files!");
    println!("Type 0 to quit!");

    // Main loop
    loop{
        print!("\nInput: ");
        std::io::stdout().flush().unwrap();
        let mut user_input = String::new();
        io::stdin().read_line(&mut user_input).unwrap();

        // Exit if user input is "0"
        if user_input.trim() == "0"{
            break;
        }
        // Loop over and copy all games if user input is "all"
        else if user_input.trim().to_lowercase() == "all"{
            for (game_name, full_save_path) in &save_vector{
                let target_path = format!("Saves/{}", game_name);
                copy_save_game(game_name.to_string(), full_save_path.to_string(), target_path);
            }
        }
        // If neither, look for either number of save or save name
        else{
            let (game_name, full_save_path) = match user_input.trim().parse::<usize>(){
                // If user input is an integer, find number in list. If number doesn't exist, return a tuple with empty strings
                Ok(n) => {
                    if save_vector.get


e.classOrConstructorParameterIsDecorated(n)&&(r|=1);for(var i=0,a=t.members;i<a.length;i++){var o=a[i];e.isStatic(o)&&(o.name&&e.isPrivateIdentifier(o.name)&&p&&(r|=2),(e.isPropertyDeclaration(o)||e.isClassStaticBlockDeclaration(o))&&(g&&8192&o.transformFlags&&(1&(r|=8)||(r|=2)),f&&33554432&o.transformFlags&&(1&r||(r|=6))))}return r}function U(t,i){if(p){for(var o=0,c=t.members;o<c.length;o++){var u=c[o];e.isPrivateIdentifierClassElementDeclaration(u)&&Y(u)}e.some(J(t))&&(l=X().weakSetName,e.Debug.assert(l,"weakSetName should be set in private identifier environment"),Q().push(n.createAssignment(l,n.createNewExpression(n.createIdentifier("WeakSet"),void 0,[]))))}var l,_=[],f=function(t,i){var o=e.visitNode(e.getFirstConstructorWithBody(t),A,e.isConstructorDeclaration),c=t.members.filter(V);if(!e.some(c))return o;var u=e.visitParameterList(o?o.parameters:void 0,A,r),l=function(t,i,o){var c=e.getProperties(t,!1,!1);d||(c=e.filter(c,(function(t){return!!t.initializer||e.isPrivateIdentifier(t.name)})));var u=J(t),l=e.some(c)||e.some(u);if(!i&&!l)return e.visitFunctionBody(void 0,A,r);s();var _=0,f=[];if(!i&&o&&f.push(n.createExpressionStatement(n.createCallExpression(n.createSuper(),void 0,[n.createSpreadElement(n.createIdentifier("arguments"))]))),i&&(_=e.addPrologueDirectivesAndInitialSuperCall(n,i,f,A)),null==i?void 0:i.body){var g=e.findIndex(i.body.statements,(function(t){return!e.isParameterPropertyDeclaration(e.getOriginalNode(t),i)}),_);-1===g&&(g=i.body.statements.length),g>_&&(d||e.addRange(f,e.visitNodes(i.body.statements,A,e.isStatement,_,g-_)),_=g)}var m=n.createThis();return function(t,r,i){if(p&&e.some(r)){var a=X().weakSetName;e.Debug.assert(a,"weakSetName should be set in private identifier environment"),t.push(n.createExpressionStatement(function(t,r){return e.factory.createCallExpression(e.factory.createPropertyAccessExpression(r,"add"),void 0,[t])}(i,a)))}}(f,u,m),K(f,c,m),i&&e.addRange(f,e.visitNodes(i.body.statements,A,e.isStatement,_)),f=n.mergeLexicalEnvironment(f,a()),e.setTextRange(n.createBlock(e.setTextRange(n.createNodeArray(f),i?i.body.statements:t.members),!0),i?i.body:void 0)}(t,o,i);return l?e.startOnNewLine(e.setOriginalNode(e.setTextRange(n.createConstructorDeclaration(void 0,void 0,null!=u?u:[],l),o||t),o)):void 0}(t,i);return f&&_.push(f),e.addRange(_,e.visitNodes(t.members,w,e.isClassElement)),e.setTextRange(n.createNodeArray(_),t.members)}function V(t){return!e.isStatic(t)&&!e.hasSyntacticModifier(e.getOriginalNode(t),128)&&(d?_<99:e.isInitializedProperty(t)||p&&e.isPrivateIdentifierClassElementDeclaration(t))}function K(t,r,i){for(var a=0,


ba(255, 255, 255, 1) 100%
  );
  background: -webkit-gradient(
    linear,
    left top,
    right top,
    color-stop(0%, rgba(255, 255, 255, 0)),
    color-stop(100%, rgba(255, 255, 255, 1))
  );
  background: -webkit-linear-gradient(
    left,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 1) 100%
  );
  background: -o-linear-gradient(
    left,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 1) 100%
  );
  background: -ms-linear-gradient(
    left,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 1) 100%
  );
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 1) 100%
  );
  position: fixed;
  top: 0;
  right: 0;
  margin: 0;
  padding: 0;
}

.editor-toolbar button,
.editor-toolbar .easymde-dropdown {
  background: transparent;
  display: inline-block;
  text-align: center;
  text-decoration: none !important;
  height: 30px;
  margin: 0;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 3px;
  cursor: pointer;
}

.editor-toolbar button {
  width: 30px;
}

.editor-toolbar button.active,
.editor-toolbar button:hover {
  background: #fcfcfc;
  border-color: #95a5a6;
}

.editor-toolbar i.separator {
  display: inline-block;
  width: 0;
  border-left: 1px solid #d9d9d9;
  border-right: 1px solid #fff;
  color: transparent;
  text-indent: -10px;
  margin: 0 6px;
}

.editor-toolbar button:after {
  font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
  font-size: 65%;
  vertical-align: text-bottom;
  position: relative;
  top: 2px;
}

.editor-toolbar button.heading-1:after {
  content: "1";
}

.editor-toolbar button.heading-2:after {
  content: "2";
}

.editor-toolbar button.heading-3:after {
  content: "3";
}

.editor-toolbar button.heading-bigger:after {
  content: "▲";
}

.editor-toolbar button.heading-smaller:after {
  content: "▼";
}

.editor-toolbar.disabled-for-preview button:not(.no-disable) {
  opacity: 0.6;
  pointer-events: none;
}

@media only screen and (max-width: 700px) {
  .editor-toolbar i.no-mobile {
    display: none;
  }
}

.editor-statusbar {
  padding: 8px 10px;
  font-size: 12px;
  color: #959694;
  text-align: right;
}

.editor-statusbar span {
  display: inline-block;
  min-width: 4em;
  margin-left: 1em;
}

.editor-statusbar .lines:before {
  content: "lines: ";
}

.editor-statusbar .words:before {
  content: "words: ";
}

.editor-statusbar .characters:before {
  content: "characters: ";
}

.editor-prev


);
						expr_234.CreateCell(4).SetCellValue(current4.WorkTaskName);
						expr_234.CreateCell(5).SetCellValue(current4.Content.Replace("<br/>", "\r\n"));
						expr_234.CreateCell(6).SetCellValue(current4.StatusName);
						ICell cell = expr_234.CreateCell(7);
						if (current4.Date.HasValue)
						{
							cell.SetCellValue(current4.Date.Value.ToString("yyyy-MM-dd"));
						}
						using (List<ICell>.Enumerator enumerator4 = expr_234.Cells.GetEnumerator())
						{
							while (enumerator4.MoveNext())
							{
								enumerator4.Current.CellStyle = cellStyle;
							}
						}
						num++;
					}
					CellRangeAddress region = new CellRangeAddress(firstRow, num - 1, 0, 0);
					sheet.AddMergedRegion(region);
					region = new CellRangeAddress(firstRow, num - 1, 1, 1);
					sheet.AddMergedRegion(region);
					region = new CellRangeAddress(firstRow, num - 1, 2, 2);
					sheet.AddMergedRegion(region);
				}
				text3 = Path.Combine(rootPath, "ExcelExport", text2 + "(" + DateTime.Now.ToString("ddHHmmss") + ").xls");
				fileStream = new FileStream(text3, FileMode.OpenOrCreate, FileAccess.Write);
				workbook.Write(fileStream);
			}
			catch (Exception arg_440_0)
			{
				throw arg_440_0;
			}
			finally
			{
				fileStream2.Close();
				fileStream2.Dispose();
				if (fileStream != null)
				{
					fileStream.Flush();
					fileStream.Close();
					fileStream.Dispose();
				}
			}
			return text3;
		}

		public static string ExportWorkType(string rootPath, ExportByWorkTypeArgs args)
		{
			List<WeeklyReport> arg_2E_0 = ExcelHelper._weeklyReportManager.GetWeeklyReportListByWorkType(args.Domain, args.WorkType, args.WorkTask, args.Year, args.WeekOfYear);
			List<WeeklyReport> list = new List<WeeklyReport>();
			foreach (WeeklyReport current in arg_2E_0)
			{
				if (args.UserList.Contains(current.User))
				{
					list.Add(current);
				}
			}
			if (list.Count == 0)
			{
				return null;
			}
			string text = "全部项目";
			if (args.WorkType.HasValue)
			{
				WorkType workType = ExcelHelper._settingsManager.GetWorkType(args.WorkType.Value);
				if (workType == null)
				{
					text = "未知";
				}
				else
				{
					text = workType.Name;
				}
			}
			string text2 = "全部子项目";
			if (args.WorkTask.HasValue)
			{
				WorkTask workTask = ExcelHelper._settingsManager.GetWorkTask(args.WorkTask.Value);
				if (workTask == null)
				{
					text2 = "未知";
				}
				else
				{
					text2 = workTask.Name;
				}
			}
			IWorkbook workbook = null;
			FileStream fileStream = null;
			string text3 = Path.Combine(rootPath, ExcelHelper._templateFile);
			FileStream fileStream2 = new FileStream(text3, FileMode.Open, FileAccess.Read, FileShare.Read);
			if (text3.IndexOf(".xlsx") > 0)
			{
				workbook = new XSSFWorkbook(fileStream2);
			}
			else if (text3.IndexOf(".xls") > 0)
			{
				workbook = new HSSFWorkbook(fileStream2);
			}
			ISheet sheet = null;
			string text5;
			try
			{
				sheet = workbook.GetSheetAt(0);
				string text4 = list[0].Monday.ToString("yyyyMMdd") + "-";
				text


面有两种解决方案

  1. 我们使用命令或者工具连接上`sqlite`数据库，输入：**`VACUUM;`**

  ```bash title="sqlite"
  VACUUM;
  ```

  1. 在使用命令清理后我们更换为`MySQL`数据库后再来构建索引
     - Sqlite如何更换为MySQL数据库教程：**[BV1iV4y1T7kh](https://www.bilibili.com/video/BV1iV4y1T7kh)**

使用命令清理前和使用命令清理后对比：上图为清理前，下图为清理后，如果没效果可以多执行几次命令。

![](/img/advanced/sqlite-mysql.png)

-----

`data.db，data.db-shm，data.db-wal`三个文件在备份时，`data.db-shm，data.db-wal`这两个文件是否需要备份

- 建议在备份时，先将程序停止，再进行备份，到时候可以只单独备份`data.db`数据库文件，另外两个可以不进行备份
- 有可能在你停止程序后`data.db-shm，data.db-wal`这两个文件会自动消失，也不用担心
---
# This is the icon of the page
icon: iconfont icon-view
# This control sidebar order
order: 13
# A page can have multiple categories
category:
  - Guide
# A page can have multiple tags
tag:
  - Advanced
  - Guide
# this page is sticky in article list
sticky: true
# this page will appear in starred articles
star: true
---

# 备份&恢复

## **方法1-内置**

使用`AList`后台的内置 `备份/恢复`选项

>1. 备份：进行AList数据进行备份（==**不包含索引**==）
>
>2. 恢复：恢复之前备份文件
>
>3. 覆盖：恢复时选择覆盖会将用户信息进行覆盖
>
>4. 加密：填写`加密密码`导出时会将信息进行加密，导入时也需要先输入`加密密码`再点击恢复^3.40.0_新增^

![](/img/advanced/backup.png)

## **方法2-sqlite3**

直接将`AList`目录下的 data/`data.db`数据库进行备份，等到了新环境直接进行替换即可(==**包含索引数据**==)

- 现在高版本如果有`data.db-shm`和`data.db-wal`这两个文件也要一起进行备份，恢复时也是一起替换


    return { currentWidth: currentWidth - currentSpacesWidth, currentImageIndex };
  }

  private sliceImages(allImages: any[], sliceIndex: number) {
    if (sliceIndex === 0) {
      this.rowImages = [...this.allImages];
      this.remainingImages = [];
    } else {
      this.rowImages = allImages.slice(0, sliceIndex);
      this.remainingImages = allImages.slice(sliceIndex, allImages.length);
    }
  }

  private getAspectRatioOfImage(image: any) {
    return this.config.widthGetterFn(image) / this.config.heightGetterFn(image);
  }

  private get isLastRow() {
    return !this.remainingImages || this.remainingImages.length === 0;
  }
}

import {
  delay,
  ProcessErrorArgs,
  ServiceBusClient,
  ServiceBusReceivedMessage,
} from "@azure/service-bus";

const connectionString = "<YOUR CONNECTION STRING>";
const queueName = "<YOUR QUEUE NAME>";
const messages = [
  { body: "Albert Einstein" },
  { body: "Werner Heisenberg" },
  { body: "Marie Curie" },
  { body: "Steven Hawking" },
  { body: "Isaac Newton" },
  { body: "Niels Bohr" },
  { body: "Michael Faraday" },
  { body: "Galileo Galilei" },
  { body: "Johannes Kepler" },
  { body: "Nikolaus Kopernikus" },
];

async function main(): Promise<void> {
  await send();

  await receive();
}

async function send(): Promise<void> {
  console.log("Sending...");

  const sbClient = new ServiceBusClient(connectionString);

  const sender = sbClient.createSender(queueName);

  try {
    // Tries to send all messages in a single batch.
    // Will fail if the messages cannot fit in a batch.
    // await sender.sendMessages(messages);

    // create a batch object
    let batch = await sender.createMessageBatch();
    for (let i = 0; i < messages.length; i++) {
      // for each message in the array

      // try to add the message to the batch
      if (!batch.tryAddMessage(messages[i])) {
        // if it fails to add the message to the current batch
        // send the current batch as it is full
        await sender.sendMessages(batch);

        // then, create a new batch
        batch = await sender.createMessageBatch();

        // now, add the message failed to be added to the previous batch to this batch
        if (!batch.tryAddMessage(messages[i])) {
          // if it still can't be added to the batch, the message is probably too big to fit in a batch
          throw new Error("Message too big to fit in a batch");
        }
      }
    }

    // Send the last created batch of messages to the queue
    await sender.sendMessages(batch);

    console.log(`Sent a batch of messages to the queue: ${queueName}`);

    // Close the sender
    await sender.close();
  } finally {
    await sbClient.close();
  }
}

async function receive(): Promise<void> {
  console.log("Receiving...");

  const sbClient = new ServiceBusClient(connectionString);

  const receiver = sbClient.createReceiver(queueName);

  const myMessageHandler = async (
    messageReceived: ServiceBusReceivedMessage
  ) => {
    console.log(`Received message: ${messageReceived.body}`);
  };

  const myErrorHandler = async (error: ProcessErrorArgs) => {
    console.log(error);
  };

  receiver.subscribe({
    processMessage: myMessageHandler,
    processError: myErrorHandler,
  });

  await delay(20000);

  await receiver.close();
  await sbClient.close();
}

main().catch((err) => {
  console.log("Error occurred: ", err);
  process.exit(1);
});


   InitializeComponent();
        }

        /// <summary>
        /// Gets or sets the child WPF user control.
        /// </summary>
        /// <value>The child.</value>
        public UIElement Child
        {
            get
            {
                return elementHost1.Child;
            }
            set
            {
                elementHost1.Child = new ScrollViewer
                {
                    Content = value,
                    HorizontalScrollBarVisibility = ScrollBarVisibility.Disabled,
                    VerticalScrollBarVisibility = ScrollBarVisibility.Auto
                };
                elementHost1.Width++;
                elementHost1.Dock = DockStyle.Fill;
            }
        }
    }
}


# This file prepares the page with initial processing settings and executes the main loop
import datetime
import os
from pygame.locals import *
from .Camera import *
from .Settings2 import *
from .Utils import *

class Screen:
    """
    Sceeen initialization
    """
    def __init__(self, screen_posX, screen_posY, screen_width, screen_height):
        print("Loading Screen...")
        # program window position init
        os.environ['SDL_VIDEO_WINDOW_POS'] = "%d,%d" % (screen_posX, screen_posY)
        self.screen_width = screen_width
        self.screen_height = screen_height

        self.start_time = datetime.datetime.now()
        self.stop_time = None

        pygame.init()
        pygame.display.gl_set_attribute(pygame.GL_MULTISAMPLEBUFFERS, 1)
        pygame.display.gl_set_attribute(pygame.GL_MULTISAMPLESAMPLES, 4)
        pygame.display.gl_set_attribute(pygame.GL_CONTEXT_PROFILE_MASK, pygame.GL_CONTEXT_PROFILE_CORE)
        pygame.display.gl_set_attribute(pygame.GL_DEPTH_SIZE, 24) # GPU DEPTH BUFFER SIZE

        self.screen = pygame.display.set_mode((screen_width, screen_height), DOUBLEBUF | OPENGL)
        pygame.display.set_caption(SCREEN_CAPTION_LOADING)
        self.clock = pygame.time.Clock()
        self.camera = None
        self.program_id = None
        self.fps_list = []

    def engine_fps(self) -> None:
        """
        Live fps counter
        """

        fps = str(int(self.clock.get_fps()))
        self.fps_list.append(int(fps))

        pygame.display.set_caption(f"FPS: {fps} {SCREEN_CAPTION}")

    def engine_shutdown(self):
        """
        Shots the engine down
        """

        self.stop_time = datetime.datetime.now()
        save_report(self.fps_list, self.start_time, self.stop_time, time_based=False)
        self.run = False

    def initialise(self):
        pass

    def display(self):
        pass

    def camera_init(self):
        pass

    def mainloop(self):
        run = True
        self.initialise()
        pygame.event.set_grab(True)
        pygame.mouse.set_visible(False)
        while run:
            for event in pygame.event.get():
                if event.type == pygame.QUIT:
                    self.engine_shutdown()
                    run = False
                if event.type == KEYDOWN:
                    if event.key == K_ESCAPE:
                        pygame.mouse.set_visible(True)
                        pygame.event.set_grab(False)
                    if event.key == K_SPACE:
                        pygame.mouse.set_visible(False)
                        pygame.event.set_grab(True)

            self.camera_init()
            self.display()
            self.engine_fps()
            pygame.display.flip()
            self.clock.tick(SCREEN_MAX_FPS)
        pygame.quit()


	Tagger.ROON
	),
	WINAMP_PUBLISHER(
		"com.nullsoft.winamp",
		"publisher",
		Mp4FieldType.TEXT,
		Tagger.WINAMP
	),
	WORK("©wrk", Mp4TagFieldSubType.TEXT, Mp4FieldType.TEXT),
	WORK_TYPE(
		"com.apple.iTunes",
		"WORK_TYPE",
		Mp4FieldType.TEXT,
		Tagger.JAIKOZ
	);

	private var tagger: Tagger? = null

	/**
	 * This is the value of the fieldname that is actually used to write mp4
	 *
	 * @return
	 */
	var fieldName: String
		private set

	/**
	 * @return subclassType
	 */
	var subClassFieldType: Mp4TagFieldSubType
		private set

	/**
	 * @return issuer (Reverse Dns Fields Only)
	 */
	var issuer: String? = null
		private set

	/**
	 * @return identifier (Reverse Dns Fields Only)
	 */
	var identifier: String? = null
		private set

	/**
	 * @return fieldtype
	 */
	var fieldType: Mp4FieldType
		private set

	/**
	 * @return field length (currently only used by byte fields)
	 */
	var fieldLength = 0
		private set

	/**
	 * For usual metadata fields that use a data field
	 *
	 * @param fieldName
	 * @param fieldType of data atom
	 */
	constructor(fieldName: String, subclassType: Mp4TagFieldSubType, fieldType: Mp4FieldType) {
		this.fieldName = fieldName
		subClassFieldType = subclassType
		this.fieldType = fieldType
	}

	/**
	 * For usual metadata fields that use a data field, but not recognised as standard field
	 *
	 * @param fieldName
	 * @param fieldType of data atom
	 * @param tagger
	 */
	constructor(
		fieldName: String,
		subclassType: Mp4TagFieldSubType,
		fieldType: Mp4FieldType,
		tagger: Tagger
	) {
		this.fieldName = fieldName
		subClassFieldType = subclassType
		this.fieldType = fieldType
		this.tagger = tagger
	}

	/**
	 * For usual metadata fields that use a data field where the field length is fixed
	 * such as Byte fields
	 *
	 * @param fieldName
	 * @param fieldType
	 * @param fieldLength
	 */
	constructor(
		fieldName: String,
		subclassType: Mp4TagFieldSubType,
		fieldType: Mp4FieldType,
		fieldLength: Int
	) {
		this.fieldName = fieldName
		subClassFieldType = subclassType
		this.fieldType = fieldType
		this.fieldLength = fieldLength
	}

	/**
	 * For reverse dns fields that use an internal fieldname of '----' and have  additional issuer
	 * and identifier fields, we use all three seperated by a ':' ) to give us a unique key
	 *
	 * @param issuer
	 * @param identifier
	 * @param fieldType  of data atom
	 */
	constructor(issuer: String, identifier: String, fieldType: Mp4FieldType) {
		this


using System;
using EVEMon.Common.Enumerations.UISettings;

namespace EVEMon.Common.SettingsObjects
{
    /// <summary>
    /// Provides conversions to durations.
    /// </summary>
    public static class UpdatePeriodExtensions
    {
        public static TimeSpan ToDuration(this UpdatePeriod period)
        {
            switch (period)
            {
                case UpdatePeriod.Never:
                    return TimeSpan.MaxValue;
                case UpdatePeriod.Minutes5:
                    return TimeSpan.FromMinutes(5);
                case UpdatePeriod.Minutes15:
                    return TimeSpan.FromMinutes(15);
                case UpdatePeriod.Minutes30:
                    return TimeSpan.FromMinutes(30);


(latch: AbstractLatch? = null) {
        if (this.latch.count == 0) throw IllegalStateException("Phase is already loaded!")
        if (ModOptions.disabled || this.name in ModOptions.ignorePhases) {
            this.latch.dec()
            return
        }
        Log.log(LogMessageType.MOD_LOADING, LogLevels.VERBOSE) { "Starting mod load: ${this.name}" }

        val inner = latch.child(1)
        this.state = PhaseStates.LISTING
        if (!path.exists()) {
            path.mkdirs()
            Log.log(LogMessageType.MOD_LOADING, LogLevels.VERBOSE) { "Created mod folders: $path" }
        }

        val files = path.listFiles() ?: emptyArray()
        val additionalSources: Set<ModSource> = ModOptions.additional[this.name] ?: emptySet()
        if (files.isEmpty() && additionalSources.isEmpty()) {
            // no mods to load
            state = PhaseStates.COMPLETE
            inner.dec(); this.latch.dec()
            return
        }
        val list = ModList()

        state = PhaseStates.INJECTING
        var worker = UnconditionalWorker()
        for (file in files) {
            worker += add@{ inject(list, ModSource.detect(file) ?: return@add, inner) }
        }
        for (source in additionalSources) {
            worker += add@{ inject(list, source, inner) }
        }
        worker.work(inner)

        state = PhaseStates.VALIDATING
        worker = UnconditionalWorker(autoWork = false)
        for (mod in list) {
            worker += {
                try {
                    mod.validate()
                    mod.latch.dec()
                } catch (error: Throwable) {
                    mod.latch.count = 0
                    error.printStackTrace()
                    list -= mod
                }
            }
        }
        worker.work(inner)

        val sorted = list.sorted().toSynchronizedList()
        state = PhaseStates.CONSTRUCTING
        worker = UnconditionalWorker(autoWork = false)
        for (mod in sorted) {
            worker += {
                try {
                    mod.construct()
                    mod.latch.dec()
                } catch (error: Throwable) {
                    mod.latch.count = 0
                    error.printStackTrace()
                    list -= mod
                    sorted -= mod
                }
            }
        }
        worker.work(inner)

        state = PhaseStates.POST_INIT
        worker = UnconditionalWorker(autoWork = false)
        for (mod in sorted) {
            worker += {
                try {
                    mod.postInit()
                    mod.latch.dec()
                } catch (error: Throwable) {
                    mod.latch.count = 0
                    error.printStackTrace()
                    list -= mod
                    sorted -= mod
                }
            }
        }
        worker.work(inner)

        ModLoader.mods += list
        state = PhaseStates.COMPLETE
        inner.dec()
        this.latch.dec()
    }

    fun await() {
        if (ModOptions.disabled) return
        latch.await()
    }
}
/*
 * Minosoft
 * Copyright (C) 2020-2025 Moritz Zwerger
 *
 * This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License along with this program. If not, see <


  comp_exp_type = make_lltype_from_dtype(DT_INT8);
    goto process_cc;
    break;
  case IL_ICJMPZ:
    zero_ili = ad_icon(0);

    operand->ot_type = OT_CC;
    operand->val.cc = convert_to_llvm_intcc(ILI_ccOPND(ilix, 2));
    operand->ll_type = make_type_from_opc(opc);
    first_ili = ILI_OPND(ilix, 1);
    second_ili = zero_ili;
    comp_exp_type = make_lltype_from_dtype(DT_INT);
    goto process_cc;
    break;
  case IL_ACJMPZ:
    zero_ili = ad_icon(0);

    operand->ot_type = OT_CC;
    operand->val.cc = convert_to_llvm_uintcc(ILI_ccOPND(ilix, 2));
    comp_exp_type = operand->ll_type = make_type_from_opc(opc);
    first_ili = ILI_OPND(ilix, 1);
    second_ili = zero_ili;
    goto process_cc;
    break;
  /* jumps with cc and expression */
  case IL_FCJMP:
  case IL_DCJMP:
#ifdef TARGET_SUPPORTS_QUADFP
  case IL_QCJMP:
#endif
    operand->ot_type = OT_CC;
    first_ili = ILI_OPND(ilix, 1);
    second_ili = ILI_OPND(ilix, 2);
    ili_cc = ILI_ccOPND(ilix, 3);
    if (IEEE_CMP)
      float_jmp = true;
    operand->val.cc = convert_to_llvm_fltcc(ili_cc);
    float_jmp = false;
    comp_exp_type = operand->ll_type = make_type_from_opc(opc);
    goto process_cc;
    break;
  case IL_UKCJMP:
  case IL_UICJMP:
    operand->ot_type = OT_CC;
    operand->val.cc = convert_to_llvm_uintcc(ILI_ccOPND(ilix, 3));
    comp_exp_type = operand->ll_type = make_type_from_opc(opc);
    first_ili = ILI_OPND(ilix, 1);
    second_ili = ILI_OPND(ilix, 2);
    goto process_cc;
    break;
  case IL_KCJMP:
  case IL_ICJMP:
    operand->ot_type = OT_CC;
    operand->val.cc = convert_to_llvm_intcc(ILI_ccOPND(ilix, 3));
    comp_exp_type = operand->ll_type = make_type_from_opc(opc);
    first_ili = ILI_OPND(ilix, 1);
    second_ili = ILI_OPND(ilix, 2);
    goto process_cc;
    break;
  case IL_ACJMP:
    operand->ot_type = OT_CC;
    operand->val.cc = convert_to_llvm_uintcc(ILI_ccOPND(ilix, 3));
    comp_exp_type = operand->ll_type = make_type_from_opc(opc);
    first_ili = ILI_OPND(ilix, 1);
    second_ili = ILI_OPND(ilix, 2);
  process_cc:
    operand->next = cc_op1 = gen_llvm_expr(first_ili, operand->ll_type);
    operand->next->next = cc_op2 = gen_llvm_expr(second_ili, comp_exp_type);
    break;
  case IL_FCMP:
  case IL_DCMP:
#ifdef TARGET_SUPPOR


double nmsThresh = yoloxNmsThreshDefault,
    double confThresh = yoloxConfThreshDefault,
    int targetSize = yoloxTargetSizeDefault,
  }) async {
    assert(nmsThresh > 0);
    assert(confThresh > 0);
    assert(targetSize > 0);

    if (autoDispose) {
      dispose();
    }
    _nmsThresh = nmsThresh;
    _confThresh = confThresh;
    _targetSize = targetSize;

    final tempModelPath = (await _copy(modelPath)).toNativeUtf8();
    final tempParamPath = (await _copy(paramPath)).toNativeUtf8();

    _initYoloxFunction(
      tempModelPath,
      tempParamPath,
    );
    calloc
      ..free(tempModelPath)
      ..free(tempParamPath);
  }

  /// Dispose of the recently loaded YOLOX model.
  void dispose() {
    _disposeYoloxFunction();
  }

  Future<String> _copy(String assetsPath) async {
    final documentDir = await getApplicationDocumentsDirectory();

    final data = await rootBundle.load(assetsPath);

    final file = File('${documentDir.path}/$assetsPath')
      ..createSync(recursive: true)
      ..writeAsBytesSync(
        data.buffer.asUint8List(),
        flush: true,
      );
    return file.path;
  }

  /// Detect with YOLOX
  /// Run it after initYolox
  ///
  /// When detecting from an image file, specify [imagePath].
  /// The [imagePath] should be the path to the image, such as "assets/image.jpg".
  /// **The Orientation in the Exif of the image file is ignored**.
  /// You may need to rotate the image if the object is not detected successfully.
  ///
  /// When detecting from an image byte array, specify [pixels], [pixelFormat], [height] and [width].
  /// [pixels] is pixel data of the image. [pixelFormat] is the pixel format.
  /// [width] and [height] are the width and height of the image.
  ///
  /// Return a list of [YoloxResults].
  @Deprecated('Use detectImageFile or detectPixels instead')
  List<YoloxResults> detect({
    String? imagePath,
    Uint8List? pixels,
    PixelFormat pixelFormat = PixelFormat.rgb,
    int? width,
    int? height,
  }) {
    if (imagePath != null) {
      return detectImageFile(
        imagePath,
      );
    }

    if (width != null && height != null && pixels != null) {
      return detectPixels(
        pixels: pixels,
        pixelFormat: pixelFormat,
        width: width,
        height: height,
      );
    }

    return [];
  }

  /// Detect with YOLOX
  /// Run it after initYolox
  ///
  /// When detecting from an image byte array, specify [y], [u] and [v].
  /// [y] and [u] and [v] are the YUV420 data of the image.
  /// [height] is the height of the image.
  /// The width of the image is calculated from [y] length.
  ///
  /// [deviceOrientationType] is the device orientation.
  /// It can be obtained from CameraController of the camera package.
  /// https://github.com/flutter/plugins/blob/main/packages/camera/camera/lib/src/camera_controller.dart#L134
  ///
  /// [sensorOrientation] is the orientation of the camera sensor.
  /// It can be obtained from CameraController of the camera package.
  /// https://github.com/flutter/plugins/blob/main/packages/camera/camera_platform_interface/lib/src/types/camera_description.dart#L42
  ///
  /// [onDecodeImage] and [onYuv420sp2rgbImage] are callback functions for decoding images.
  /// The process of converting to a [ui.Image] object is heavy and affects performance.
  /// If [ui.Image] is not needed, it is recommended to set null.
  /


.");
    return _queryParts_.join("&");
  }

  @override
  FooObjectWithEveryNullableType copyWith({
    dynamic Function()? any,
    bool? Function()? boolean,
    String? Function()? string,
    DateTime? Function()? timestamp,
    double? Function()? float32,
    double? Function()? float64,
    int? Function()? int8,
    int? Function()? uint8,
    int? Function()? int16,
    int? Function()? uint16,
    int? Function()? int32,
    int? Function()? uint32,
    BigInt? Function()? int64,
    BigInt? Function()? uint64,
    FooObjectWithEveryNullableTypeEnumerator? Function()? enumerator,
    List<bool?>? Function()? array,
    FooObjectWithEveryNullableTypeObject? Function()? object,
    Map<String, BigInt?>? Function()? record,
    FooObjectWithEveryNullableTypeDiscriminator? Function()? discriminator,
    FooObjectWithEveryNullableTypeNestedObject? Function()? nestedObject,
    List<List<FooObjectWithEveryNullableTypeNestedArrayElementElement?>?>?
            Function()?
        nestedArray,
  }) {
    return FooObjectWithEveryNullableType(
      any: any != null ? any() : this.any,
      boolean: boolean != null ? boolean() : this.boolean,
      string: string != null ? string() : this.string,
      timestamp: timestamp != null ? timestamp() : this.timestamp,
      float32: float32 != null ? float32() : this.float32,
      float64: float64 != null ? float64() : this.float64,
      int8: int8 != null ? int8() : this.int8,
      uint8: uint8 != null ? uint8() : this.uint8,
      int16: int16 != null ? int16() : this.int16,
      uint16: uint16 != null ? uint16() : this.uint16,
      int32: int32 != null ? int32() : this.int32,
      uint32: uint32 != null ? uint32() : this.uint32,
      int64: int64 != null ? int64() : this.int64,
      uint64: uint64 != null ? uint64() : this.uint64,
      enumerator: enumerator != null ? enumerator() : this.enumerator,
      array: array != null ? array() : this.array,
      object: object != null ? object() : this.object,
      record: record != null ? record() : this.record,
      discriminator:
          discriminator != null ? discriminator() : this.discriminator,
      nestedObject: nestedObject != null ? nestedObject() : this.nestedObject,
      nestedArray: nestedArray != null ? nestedArray() : this.nestedArray,
    );
  }

  @override
  List<Object?> get props => [
        any,
        boolean,
        string,
        timestamp,
        float32,
        float64,
        int8,
        uint8,
        int16,
        uint16,
        int32,
        uint32,
        int64,
        uint64,
        enumerator,
        array,
        object,
        record,
        discriminator,
        nestedObject,
        nestedArray,
      ];

  @override
  bool operator ==(Object other) {
    return other is FooObjectWithEveryNullableType &&
        listsAreEqual(props, other.props);
  }

  @override
  int get hashCode => listToHashCode(props);

  @override
  String toString() {
    return "FooObjectWithEveryNullableType ${toJsonString()}";
  }
}

enum FooObjectWithEveryNullableTypeEnumerator
    implements Comparable<FooObjectWithEveryNullableTypeEnumerator> {
  a("A"),
  b("B"),
  c("C");

  const FooObjectWithEveryNullableTypeEnumerator(this.serialValue);
  final String serialValue;

  factory FooObjectWithEveryNullableTypeEnumerator.fromString(String input) {
    for (final val in


_icon_size;
        margin-bottom: $base_margin;
      }

      .weather-forecast-temp {
        @extend %numeric;
        font-weight: bold;
      }
    }
  }
}
/* OSD */

$osd_levelbar_height:6px;

.osd-window {
  @extend %osd_panel;
  @extend %heading;
  text-align: center;
  font-weight: bold;
  spacing: $base_padding * 2;
  padding: $base_padding * 2 $base_padding * 3;
  & > * { spacing: $base_margin * 2; }
  margin-bottom: 4em;

  StIcon { icon-size: $large_icon_size;}

  StLabel {
    &:ltr { margin-right: $base_padding; }
    &:rtl { margin-left: $base_padding; }
  }

  .level {
    margin-bottom: $base_margin;
    &:first-child { margin-bottom: 0; }

    min-width: 160px;
    -barlevel-height: $osd_levelbar_height;
    -barlevel-background-color: transparentize($osd_fg_color, if($variant=='light', 0.7, 0.9));
    -barlevel-active-background-color: $osd_fg_color;
    -barlevel-overdrive-color: $destructive_color;
    -barlevel-overdrive-separator-width: $base_padding * 0.5;
    &:ltr { margin-right: $base_padding; }
    &:rtl { margin-left: $base_padding; }
  }
}

// Monitor number label
.osd-monitor-label {
  background-color: -st-accent-color;
  color: -st-accent-fg-color;
  border-radius: $modal_radius;
  font-size: 3em;
  font-weight: bold;
  font-feature-settings: "tnum";
  margin: $base_margin * 3;
  padding: $base_padding * 2;
  text-align: center;
  min-width: 1.5em;
}

/* Pad OSD */
.pad-osd-window {
  padding: 32px;
  background-color: transparentize(#000, 0.2);

  .pad-osd-title-box { spacing: 12px; }
  .pad-osd-title-menu-box { spacing: 6px; }
}

.combo-box-label {
  width: 15em;
}

.resize-popup {
  @extend %osd_panel;
}
@charset "UTF-8";

/*** Custom fonts ***/
@import url('./ceylon/fonts.css');

/* VARIABLES */
:root {
  --theme-0: #282C34;
  --theme-primary: #4592e4;

  --theme-muted: #22252B;
  --theme-border: #334155;
  --theme-muted-blue: #4f565f;

  --theme-link: #4592e4;
  --theme-font-general: #ABB2BF;
  --select-text-bg-color: #4f565f;

  /* Slate grayscale */
  --theme-50: #0f172a;
  --theme-100: #1e293b;
  --theme-200: #334155;
  --theme-300: #475569;
  --theme-400: #64748b;
  --theme-500: #94a3b8;
  --theme-600: #cbd5e1;
  --theme-700: #e2e8f0;
  --theme-800: #f1f5f9;
  --theme-900: #f8fafc;

  /* Tailwind variables */
  --tw-primary: #4592e4;

  --tw-p