}

// ModTime returns the modification date of the file
// It should return a best guess if one isn't available
func (o *Object) ModTime(ctx context.Context) time.Time {
	err := o.readMetaData()
	if err != nil {
		fs.Logf(o, "Failed to read metadata, %v", err)
		return time.Now()
	}
	modTime := o.lastModified
	return modTime
}

// SetModTime sets the modification time of the local fs object
func (o *Object) SetModTime(ctx context.Context, modTime time.Time) error {
	err := o.readMetaData()
	if err != nil {
		return err
	}
	o.lastModified = modTime
	mimeType := fs.MimeType(ctx, o)

	if o.size >= maxSizeForCopy {
		fs.Debugf(o, "SetModTime is unsupported for objects bigger than %v bytes", fs.SizeSuffix(maxSizeForCopy))
		return nil
	}
	// Copy the object to itself to update the metadata
	bucket, bucketPath := o.split()
	sourceKey := path.Join("/", bucket, bucketPath)

	bucketInit, err := o.fs.svc.Bucket(bucket, o.fs.zone)
	if err != nil {
		return err
	}

	req := qs.PutObjectInput{
		XQSCopySource: &sourceKey,
		ContentType:   &mimeType,
	}
	_, err = bucketInit.PutObject(bucketPath, &req)

	return err
}

// Open opens the file for read.  Call Close() on the returned io.ReadCloser
func (o *Object) Open(ctx context.Context, options ...fs.OpenOption) (io.ReadCloser, error) {
	bucket, bucketPath := o.split()
	bucketInit, err := o.fs.svc.Bucket(bucket, o.fs.zone)
	if err != nil {
		return nil, err
	}

	req := qs.GetObjectInput{}
	fs.FixRangeOption(options, o.size)
	for _, option := range options {
		switch option.(type) {
		case *fs.RangeOption, *fs.SeekOption:
			_, value := option.Header()
			req.Range = &value
		default:
			if option.Mandatory() {
				fs.Logf(o, "Unsupported mandatory option: %v", option)
			}
		}
	}
	resp, err := bucketInit.GetObject(bucketPath, &req)
	if err != nil {
		return nil, err
	}
	return resp.Body, nil
}

// Update in to the object
func (o *Object) Update(ctx context.Context, in io.Reader, src fs.ObjectInfo, options ...fs.OpenOption) error {
	// The maximum size of upload object is multipartUploadSize * MaxMultipleParts
	bucket, bucketPath := o.split()
	err := o.fs.makeBucket(ctx, bucket)
	if err != nil {
		return err
	}

	// Guess the content type
	mimeType := fs.MimeType(ctx, src)

	req := uploadInput{
		body:        in,
		qsSvc:       o.fs.svc,
		bucket:      bucket,
		zone:        o.fs.zone,
		key:         bucketPath,
		mimeType:    mimeType,
		partSize:    int64(o.fs.opt.ChunkSize),
		concurrency: o.fs.opt.UploadConcurrency,
	}
	uploader := newUploader(&req)

	size := src.Size()
	multipart := size < 0 || size >= int64(o.fs.opt.UploadCutoff)
	if multipart {
		err = uploader.upload()
	} else {
		err = uploader.singlePartUpload(in, size)
	}
	if err != nil {
		return err
	}
	// Read Metadata of object
	err = o.readMetaData()
	return err
}

// Remove this object
func (o *Object) Remove(ctx context.Context) error {
	bucket, bucketPath := o.split()
	bucketI


hat AVX and SSE can vary in error detection speed. On Intel-based systems, SSE appears better for testing IMC voltages, while AVX appears better for DRAM voltage.
  * The Large AVX2 CPU test is a great stability test for your CPU and RAM at the same time. The more you tune your ram, the harder it'll be to be stable in this test. Be sure to run Normal Mode as Extreme will not use as much RAM.
  * The VRAM test at maximum utilization in conjunction with Prime95 Large FFTs will stress FCLK and is recommended when testing FCLK stability.
### Alternatives
* [GSAT](https://github.com/stressapptest/stressapptest).
  1. [Install WSL](https://docs.microsoft.com/en-us/windows/wsl/install-win10) and [Ubuntu](https://www.microsoft.com/en-us/p/ubuntu/9nblggh4msv6?activetab=pivot:overviewtab).
  2. Open an Ubuntu bash shell and type `sudo apt update`.
  3. Type `sudo apt-get install stressapptest`.
  4. To start testing, type `stressapptest -M 13000 -s 3600 -W --pause_delay 3600`.
     * `-M` is the amount of memory to test (MB).
     * `-s` is how long to test for (seconds).
     * `--pause_delay` is the delay between power spikes. It should be the same as the `-s` argument to skip the power spikes test.
* [Karhu RAM Test](https://www.karhusoftware.com/ramtest/) (paid).
* [y-cruncher](http://www.numberworld.org/y-cruncher/) with [this config](https://pastebin.com/dJQgFtDH).
  * Paste this in a new file called `memtest.cfg` in the same folder as `y-cruncher.exe`.
  * Adjust the following fields if necessary:
    * `LogicalCores`: CPU threads, e.g. `[0 1 2 3 4 5]` on 6C**6**T or `[0 1 2 3 4 5 6 7]` on 4C**8**T
    * `TotalMemory`: Memory (bytes) used by y-cruncher
  * Create a shortcut to `y-cruncher.exe` and add `pause:1 config memtest.cfg` to the target field.
    Your target field should look something like this: `"path\to\y-cruncher\y-cruncher.exe" pause:1 config memtest.cfg`
  * Credits: [u/Nerdsinc](https://www.reddit.com/r/overclocking/comments/iyp1n7/ycruncher_is_a_really_effective_tool_for_testing/)
* [Prime95](https://www.mersenne.org/download/) large FFTs is also decent at finding memory errors.
  * I've been using a custom FFT range of 800K - 800K, though I think any FFT value inside the large FFTs range should work.
    * Make sure 'Run FFTs in place' is not checked.
    * In `prime.txt`, add `TortureAlternateInPlace=0` under `TortureWeak` to prevent P95 from testing in place. Testing in place will only use a bit of RAM, which we don't want.
  * You can create a shortcut to `prime95.exe` and add `-t` to the 'Properties > Target' field to immediately start testing using the settings in `prime.txt`.
    Your target field should look like: `"path\to\prime95\prime95.exe" -t`.
  * You can also change the working directory of Prime95's config files to have one config to stress test your CPU and another config to stress test your RAM.
    1. In the folder with `prime95.exe`, create another folder. This example will be called 'RAM' (without the quotes).
    2. Copy `prime.txt` and `local.txt` to the folder you just created.
    3. Adjust the settings in `prime.txt` as required.


�보를 가지고 있다.
    * 디스크까지 내려가는 데 너무 시간이 오래 걸리므로 TLB 등의 버퍼를 활용한다. TLB는 페이지 테이블에 대한 캐시이다.
    * https://ko.wikipedia.org/wiki/%ED%8E%98%EC%9D%B4%EC%A7%95
  * 압축 (조각 모음)
    * 오래 걸린다.
  * 통합
    * 근처에 있는 메모리를 하나로 연결한다.
* 내부 단편화 해결책
  * 세그멘테이션
    * 변동 크기로 잘라 관리한다.
    * "필요한" 만큼만 할당한다.
    * 외부 단편화가 생길 수 있으므로 그냥 이럴 바에는 페이징을 한다.
* 두 단편화를 모두 해결하는 방법
  * 메모리 풀 사용
    * 매 번 새로운 메모리를 할당하는 것이 아니라, 풀(pool)에서 메모리를 빌려주고 다시 반환받으면 재사용할 수 있도록 하는 방법이다.
    * 필요한 만큼만 할당하므로 내부 단편화가 일어나지 않는다.
    * 메모리를 할당 해제한 후에 재사용할 수 있으므로 외부 단편화가 일어나지 않는다.

### 가상 메모리

* 메모리 가상화를 하는 이유
  * 사용자에게는 메모리가 무한한 것처럼 보여준다.
  * 실제로는 보조 기억 장치(디스크 등)를 활용하여 부족한 메모리 공간을 관리한다.
* MMU(Memory Management Unit)을 통해 관리
* Page fault
  * 원하는 페이지가 메모리에 없고 디스크에 있을 때 발생
* 페이지 교체 정책
  * 메모리에 남길 페이지와 디스크로 보낼 페이지를 결정한다.
  * LRU (Least Recently Used)
* TLB (Translation Lookaside Buffer)
  * 자주 쓰이는 페이지의 물리 주소를 기억한다.

### Mute


o 30,
            "camunda.generic-properties.properties.default-number-of-retries" to 1,
            "camunda.generic-properties.properties.dmn-enabled" to false, //primitive data type: boolean
        )
        ApplicationContext.run(EmbeddedServer::class.java, properties).use { embeddedServer ->
            val processEngineConfiguration = embeddedServer.applicationContext.getBean(MnProcessEngineConfiguration::class.java)
            assertEquals(30, processEngineConfiguration.batchJobPriority)
            assertEquals(1, processEngineConfiguration.defaultNumberOfRetries)
            assertEquals(false, processEngineConfiguration.isDmnEnabled)
        }
    }

    @Test
    fun validGenericPropertyOfTypeStringAsBoolean() {
        val properties: Map<String, Any> = mapOf(
            "camunda.generic-properties.properties.database-schema-update" to true,
        )
        ApplicationContext.run(EmbeddedServer::class.java, properties).use { embeddedServer ->
            val processEngineConfiguration = embeddedServer.applicationContext.getBean(MnProcessEngineConfiguration::class.java)
            assertEquals("true", processEngineConfiguration.databaseSchemaUpdate)
        }
    }

    /**
     * All other tests use the properties in kebab case, i.e. lowercase and hyphen separated, let's also verify one in camel case.
     */
    @Test
    fun camelCase() {
        val properties: Map<String, Any> = mapOf(
            "camunda.generic-properties.properties.historyCleanupStrategy" to "endTimeBased"
        )
        ApplicationContext.run(EmbeddedServer::class.java, properties).use { embeddedServer ->
            val processEngineConfiguration = embeddedServer.applicationContext.getBean(MnProcessEngineConfiguration::class.java)
            assertEquals("endTimeBased", processEngineConfiguration.historyCleanupStrategy)
        }
    }

    @Test
    fun invalidGenericProperty() {
        val properties = Collections.singletonMap<String, Any>("camunda.generic-properties.properties.xyz", "1")
        assertThrows(RuntimeException::class.java) { ApplicationContext.run(EmbeddedServer::class.java, properties) }
    }
}/*
 * Copyright 2021 original authors
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package info.novatec.micronaut.camunda.bpm.feature.test

import org.camunda.bpm.engine.RepositoryService
import org.camunda.bpm.model.bpmn.Bpmn
import org.camunda.bpm.model.bpmn.builder.EndEventBuilder

/**
 * @author Tobias Schäfer
 */
class ProcessUtil {

    companion object {

        /**
         * Deploys a process model created with the fluent api.
         *
         * @param repositoryService the [RepositoryService]
         * @param endEventBuilder the [EndEventBuilder] marking the end of the process model
         */
        fun deploy(repositoryService: RepositoryService, endEventBuilder: EndEventBuilder) {
            val xml = Bpmn.convertToString(endEventBuilder.done())
            repositoryService.createDeployment()
                .name("ProcessUtilDeployment")
                .addString("model.bpmn", xml)
                .deploy()
        }
    }
}/*-
 * #%L
 * Camunda Process Test Coverage Core
 * %%
 * Copyright (C) 2019 - 2024 Camunda
 * %%
 * 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


ReLU）用于神经元的输出中。

接下来，我们将看到过滤器如何在图像上滑动以生成卷积输出。 对于过滤器的每张幻灯片，都会将新的神经元连接到过滤器输出。 因此，滑动所涉及的参数也趋向于控制卷积层的输出尺寸。 过滤器的滑动涉及三个重要参数-跨步，零填充和深度：

*   跨步决定了过滤器从一个位置滑动到另一位置时跳跃的像素数。 通常，跨步值保持为 1。过滤器在每张幻灯片中跳一个像素。 跨度也可以大于 1，但通常不使用。
*   通常，如果过滤器从图像的左上角开始滑动，则所有幻灯片的最终生成输出趋向于具有较小的尺寸。 但是，通常，我们希望卷积层的输出具有与输入图像相同的宽度和高度。 零填充在图像的边界上添加了 0 的额外填充，从而为过滤器提供了额外的滑动空间，使得最终输出的尺寸与输入的尺寸相同。 当我们加 0 时，这不会影响卷积运算的值。
*   通常，CNN 在层中不使用单个过滤器。 我们使用一组过滤器（例如 12 个过滤器）。 这样做是因为具有不同权重集的每个过滤器趋向于捕获图像的不同特征。 来自每个过滤器的响应被一个接一个地堆叠，并且每个响应被称为**激活映射**。 例如，如果我们使用`32 x 32 x 1`的图像和四个大小为`3 x 3 x 1`的过滤器，且跨步为 2，填充为 1，则卷积层的输出尺寸为（`16 x 16 x 4`）。 在这里，最后一个维度将等于激活图的数量，该数量将等于过滤器的数量。 可以使用以下公式计算输出的宽度和高度：

![](img/4a40c8d8-8ea1-4317-890e-70a3b19d3297.png)

在这里，`W`是输入大小（`W = 32`），`F`是过滤器大小（`F = 3`），`P`为填充（`P = 1`），而`S`为跨步（`S = 1`）。

您可能已经观察到，我们正在整个图像上制作相同的过滤器幻灯片。 这意味着在幻灯片中使用相同的权重，而不是为每个幻灯片创建不同的权重集。 由于图像中不同位置的像素值高度相关，因此使卷积幻灯片共享权重会产生良好的效果。 如果证明过滤器在图


ull ? AssistanceItemStatus.fromJson(fireman) : null,
      ray: ray != null ? AssistanceItemStatus.fromJson(ray) : null,
      brush: brush != null ? AssistanceItemStatus.fromJson(brush) : null,
      block: block != null ? AssistanceItemStatus.fromJson(block) : null,
    );
  }

  factory AssistanceStatus.fromEntity(AssistanceEntity entity) {
    return AssistanceStatus(
      fireman: entity.fireman != null
          ? AssistanceItemStatus.fromEntity(entity.fireman)
          : null,
      ray: entity.ray != null
          ? AssistanceItemStatus.fromEntity(entity.ray)
          : null,
      brush: entity.brush != null
          ? AssistanceItemStatus.fromEntity(entity.brush)
          : null,
      block: entity.block != null
          ? AssistanceItemStatus.fromEntity(entity.block)
          : null,
    );
  }
}

class AssistanceItemStatus extends Equatable {
  final int afterMoves;

  final int uses;

  AssistanceItemStatus({
    @required this.afterMoves,
    this.uses,
  }) : super([afterMoves, uses]);

  AssistanceItemStatus copyWith({afterMoves, uses}) {
    return AssistanceItemStatus(
      afterMoves: afterMoves ?? this.afterMoves,
      uses: uses ?? this.uses,
    );
  }

  @override
  String toString() {
    return 'AssistanceItemStatus{afterMoves: $afterMoves, uses: $uses}';
  }

  Map<String, Object> toJson() {
    return {"afterMoves": afterMoves, "uses": uses};
  }

  factory AssistanceItemStatus.fromJson(Map<String, dynamic> parsedJson) {
    return AssistanceItemStatus(
      afterMoves: parsedJson['afterMoves'],
      uses: parsedJson['uses'],
    );
  }

  factory AssistanceItemStatus.fromEntity(AssistanceItemEntity entity) {
    return AssistanceItemStatus(
      afterMoves: entity.afterMoves,
    );
  }
}
import 'package:flutter/material.dart';
import 'package:flutter_svg/svg.dart';
import 'package:impossiblocks/controller/sound_controller.dart';
import 'package:impossiblocks/localizations/impossiblocks_localizations.dart';
import 'package:impossiblocks/models/models.dart';
import 'package:impossiblocks/res/res_dimensions.dart';
import 'package:impossiblocks/res/res_colors.dart';
import 'package:impossiblocks/res/res_styles.dart';
import 'package:impossiblocks/ui/game/viewmodels/game_container_view_model.dart';
import 'package:impossiblocks/ui/widgets/dialogs/action_button_dialog.dart';
import 'package:impossiblocks/ui/widgets/fireworks.dart';
import 'package:share/share.dart';

class GameSuccessDialog extends StatelessWidget {
  final GameContainerViewModel viewModel;

  final bool newRecord;

  GameSuccessDialog({
    @required this.viewModel,
    @required this.newRecord,
  });

  static show(BuildContext context, GameContainerViewModel viewModel) {
    viewModel.onUpdateRecordGame().then((newRecord) {
      SoundController.instance.play(
          newRecord
              ? SoundEffect.LONG_CELEBRATION
              : SoundEffect.SHORT_CELEBRATION,
          viewModel.soundVolume,
          1.0);
      showGeneralDialog(
              context: context,
              pageBuilder: (context, anim1, anim2) {
                return;
              },
              barrierDismissible: true,
              barrierColor: Colors.black.withOpacity(0.4),
              bar


]
pub struct ToDo {
    pub id: i32,
    pub content: String,
    pub finished: bool,
}

impl ToDo {
    pub fn new(content: String) -> Self {
        ToDo{id: 0, content, finished: false}
    }

    pub fn insert_db(content: &String, finished: bool) -> Result<()> {
        let conn = connect_to_db()?;
        conn.execute(
            "INSERT INTO todolist(content, finished) VALUES (?1, ?2)",
            params![content, finished as i32]
        )?;
        Ok(())
    }

    pub fn update_db(todo: &ToDo) -> Result<()> {
        let conn = connect_to_db()?;
        conn.execute(
            "UPDATE todolist set content = ?1, finished = ?2 WHERE id = ?3",
            params![todo.content, todo.finished as i32, todo.id]
        )?;
        Ok(())
    }

    pub fn list_db() -> Result<Vec<ToDo>> {
        let conn = connect_to_db()?;
        let mut stmt = conn.prepare("SELECT * FROM todolist")?;
        let res_iter = stmt.query_map([], |row| {
            Ok(ToDo {
                id: row.get(0)?,
                content: row.get(1)?,
                finished: row.get(2)?,
            })
        })?;

        let mut todos = Vec::new();
        for todo in res_iter {
            match todo {
                Ok(todo) => todos.push(todo),
                Err(e) => panic!("{:?}", e),
            }
        }
        Ok(todos)
    }

    pub fn delete_db(id: &i32) -> Result<()> {
        let conn = connect_to_db()?;
        conn.execute(
            "DELETE FROM todolist WHERE id = ?1",
            params![id]
        )?;
        Ok(())
    }
}

fn connect_to_db() -> Result<Connection> {
    Connection::open("./tododb.sqlite3")
}
<filename>2019/src/bin/2019_04.rs<gh_stars>0
// Copyright 2020 Google LLC
//
// 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.

pub fn main() {
    println!("04a: {}", solve_a());
    println!("04b: {}", solve_b());
}

/// Return digit d (counting from the left) of i.
pub fn digit(i: usize, d: usize) -> usize {
    (match d {
        0 => i / 100_000,
        1 => i / 10_000,
        2 => i / 1_000,
        3 => i / 100,
        4 => i / 10,
        5 => i,
        _ => panic!("invalid d"),
    }) % 10
}

fn solve_a() -> usize {
    iter_a().count()
}

fn iter_a() -> impl Iterator<Item = usize> {
    let (amin, amax) = load_input();
    // It is a six-digit number.
    // The value is within the range given in your puzzle input.
    // Two adjacent digits are the same (like 22 in 122345).
    // Going from left to right, the digits never decrease;
    // they


 MAE (precio por un lado, % por el otro)
            dolar2=dolar.split("$")[1]
            porcentajedolar=dolar2[-6:]+'%'
            preciodolar= dolar2[1:7]
            subedolar=porcentajedolar[:1]
            if subedolar=="0":
                porcentajedolar="+"+porcentajedolar[1:]

    except:
        preciodolar = 'ERROR'
        porcentajedolar = 'ERROR'

    return preciodolar, porcentajedolar

import eikon as ek
ek.set_app_key('0893175a10224620a7ad8f348be81b2e7a26d498')
def reuters_mae():
    #Para ir por scraper
    '''
    mae, a = dolarMAE.print_dolarMAE()
    mae_compra, mae_venta = round(float(mae.replace(',','.')),2), round(float(mae.replace(',','.')),2)
    mae_spread = mae_venta - mae_compra
    '''
    #Para ir por reuters
    try:
        df, err = ek.get_data('USTARTSD1=ME',
                          ['CF_LAST',
                          'PRIMACT_1',
                           'SEC_ACT_1'])
        return df['PRIMACT_1'].item(), df['SEC_ACT_1'].item(), df['CF_LAST'].item()
    except:
        return 0,0,0


SymGetModuleInfo64" );
		if( m_pSymGetModuleInfo64 == NULL )
			m_pSymGetModuleInfo64 = SymGetModuleInfo64_DummyFn;

#if defined( USE_STACKWALK64 )
		m_pStackWalk64 = (PFN_StackWalk64) ::GetProcAddress( m_hDbgHelpDll, "StackWalk64" );
		if( m_pStackWalk64 == NULL )
			m_pStackWalk64 = StackWalk64_DummyFn;
#endif

#if defined( USE_CAPTURESTACKBACKTRACE )
		m_hNTDllDll = ::LoadLibrary( "ntdll.dll" );

		m_pCaptureStackBackTrace = (PFN_CaptureStackBackTrace) ::GetProcAddress( m_hNTDllDll, "RtlCaptureStackBackTrace" );
		if( m_pCaptureStackBackTrace == NULL )
			m_pCaptureStackBackTrace = CaptureStackBackTrace_DummyFn;
#endif

		m_pSymSetOptions( m_pSymGetOptions() |
			SYMOPT_DEFERRED_LOADS | //load on demand
			SYMOPT_EXACT_SYMBOLS | //don't load the wrong file
			SYMOPT_FAIL_CRITICAL_ERRORS | SYMOPT_NO_PROMPTS | //don't prompt ever
			SYMOPT_LOAD_LINES ); //load line info

		m_pSymInitialize( m_hProcess, m_szPDBSearchPath, FALSE );
		TryLoadingNewSymbols();
	}

	bool m_bIsInitialized;
	bool m_bShouldReloadSymbols;
	HANDLE m_hProcess;
	HMODULE m_hDbgHelpDll;
	char *m_szPDBSearchPath;
	CThreadFastMutex m_Mutex; //DbgHelp functions are all single threaded.

	PFN_SymInitialize m_pSymInitialize;
	PFN_SymCleanup m_pSymCleanup;
	PFN_SymGetOptions m_pSymGetOptions;
	PFN_SymSetOptions m_pSymSetOptions;
	PFN_SymSetSearchPath m_pSymSetSearchPath;
	PFN_SymEnumerateModules64 m_pSymEnumerateModules64;
	PFN_EnumerateLoadedModules64 m_pEnumerateLoadedModules64;
	PFN_SymLoadModule64 m_pSymLoadModule64;
	PFN_SymUnloadModule64 m_pSymUnloadModule64;

	PFN_SymFromAddr m_pSymFromAddr;
	PFN_SymGetLineFromAddr64 m_pSymGetLineFromAddr64;
	PFN_SymGetModuleInfo64 m_pSymGetModuleInfo64;

#if defined( USE_STACKWALK64 )
	PFN_StackWalk64 m_pStackWalk64;
#endif

#if defined( USE_CAPTURESTACKBACKTRACE )
	HMODULE m_hNTDllDll;
	PFN_CaptureStackBackTrace m_pCaptureStackBackTrace;
#endif
};
static CHelperFunctionsLoader s_HelperFunctions;

#if defined( USE_STACKWALK64 ) //most reliable method thanks to boatloads of windows helper functions. Also the slowest.
int CrawlStack_StackWalk64( CONTEXT *pExceptionContext, void **pReturnAddressesOut, int iArrayCount, int iSkipCount )
{
	s_HelperFunctions.EnsureReady();

	AUTO_LOCK_FM( s_HelperFunctions.m_Mutex );

	CONTEXT currentContext;
	memcpy( &currentContext, pExceptionContext, sizeof( CONTEXT ) );

	STACKFRAME64 sfFrame = { 0 }; //memset(&sfFrame, 0x0, sizeof(sfFrame));
	sfFrame.AddrPC.Mode = sfFrame.AddrFrame.Mode = AddrModeFlat;
	sfFrame.AddrPC.Offset = currentContext.Eip;
	sfFrame.AddrFrame.Offset = currentContext.Ebp;

	HANDLE hThread = GetCurrentThread();

	int i;
	for( i = 0; i


lt_format = ColorFormat::Auto.to_string();

	let format_arg_key = "format";
	let color_arg_help = format!("CSS-like color value, e.g. #00FF11 or 'rgb(255 128 0)'. Parsing can be customized via `{}` arg.", format_arg_key);

	let matches = App::new("color-utils")
		.arg(
			Arg::with_name("v")
				.short("v")
				.multiple(true)
				.takes_value(false)
				.help("Increases message verbosity."),
		)
		.arg(
			Arg::with_name(format_arg_key)
				.long(format_arg_key)
				.takes_value(true)
				.value_name("format-name")
				.possible_values(&[
					ColorFormat::Auto.to_string().as_str(),
					ColorFormat::RgbHex.to_string().as_str(),
					ColorFormat::RgbFunction.to_string().as_str(),
				])
				.case_insensitive(true)
				.required(false)
				.default_value(default_format.as_str())
				.help("Which color format to use for parsing and output"),
		)
		.subcommand(
			SubCommand::with_name("details")
				.about("Prints details for a color.")
				.arg(
					Arg::with_name("color")
						.required(true)
						.takes_value(true)
						.help(&color_arg_help),
				),
		)
		.subcommand(
			SubCommand::with_name("contrast")
				.about("Calculates WCAG contrast of two colors.")
				.arg(
					Arg::with_name("color")
						.required(true)
						.takes_value(true)
						.help(&color_arg_help),
				)
				.arg(
					Arg::with_name("other-color")
						.required(true)
						.takes_value(true)
						.help(&color_arg_help),
				),
		)
		.get_matches();

	let verbosity = matches
		.occurrences_of("v")
		.try_into()
		.expect("Unexpected count of verbosity flags");
	env_logger::builder()
		.filter_level(match &verbosity {
			0 => LevelFilter::Error,
			1 => LevelFilter::Warn,
			2 => LevelFilter::Info,
			3 => LevelFilter::Debug,
			_ => LevelFilter::Trace,
		})
		.init();

	// Unwrapping should be safe as 'possible_values' only allows parseable values
	// and we either have a value or use a default.
	let format = value_t!(matches, format_arg_key, ColorFormat).unwrap();

	let options = Options { verbosity, format };

	match matches.subcommand() {
		("details", Some(matches)) => {
			let color_str = matches.value_of("color").unwrap();

			match color_parsing::parse_color(color_str) {
				Err(e_1) => eprintln!("Could not parse color: {}.", e_1),
				Ok(color) => {
					command::print_details(&color, &options).expect("Could not print details.")
				}
			}
		}
		("contrast", Some(matches)) => {
			let color_str = matches.value_of("color").unwrap();
			let other_color_str = matches.value_of("other-color").unwrap();

			match color_parsing::parse_color(color_str) {
				Err(e_1) => eprintln!("Could not parse color: {}.", e_1),
				Ok(color) => match color_parsing::parse_color(other_color_str) {
					Err(e_2) => eprintln!("Could not parse other color: {}.", e_2),
					Ok(other_color) => command::print_contrast(&color, &other_color, &options)
						.expect("Could not print contrast."),
				},
			}
		}
		_ => eprintln!("No


//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
//
// Purpose:
//
// $NoKeywords: $
//=============================================================================

#pragma once

#include<VGUI.h>
#include<VGUI_Panel.h>
#include<VGUI_Dar.h>

namespace vgui
{

enum MouseCode;
class IntChangeSignal;

class VGUIAPI Slider : public Panel
{
private:
	bool                  _vertical;
	bool                  _dragging;
	int                   _nobPos[2];
	int                   _nobDragStartPos[2];
	int                   _dragStartPos[2];
	Dar<IntChangeSignal*> _intChangeSignalDar;
	int                   _range[2];
	int                   _value;
	int                   _rangeWindow;
	bool                  _rangeWindowEnabled;
	int                   _buttonOffset;
public:
	Slider(int x,int y,int wide,int tall,bool vertical);
public:
	virtual void setValue(int value);
	virtual int  getValue();
	virtual bool isVertical();
	virtual void addIntChangeSignal(IntChangeSignal* s);
    virtual void setRange(int min,int max);
	virtual void getRange(int& min,int& max);
	virtual void setRangeWindow(int rangeWindow);
	virtual void setRangeWindowEnabled(bool state);
	virtual void setSize(int wide,int tall);
	virtual void getNobPos(int& min, int& max);
	virtual bool hasFullRange();
	virtual void setButtonOffset(int buttonOffset);
private:
	virtual void recomputeNobPosFromValue();
	virtual void recomputeValueFromNobPos();
public: //bullshit public
	virtual void privateCursorMoved(int x,int y,Panel* panel);
	virtual void privateMousePressed(MouseCode code,Panel* panel);
	virtual void privateMouseReleased(MouseCode code,Panel* panel);
protected:
    virtual void fireIntChangeSignal();
	virtual void paintBackground();
};

}


SSZException If there are no more SSZ values to read.
   */
  fun readAddressList(): List<Bytes>

  /**
   * Read a list of hashes from the SSZ source.
   *
   * @param hashLength The length of the hash (in bytes).
   * @return A list of 32-byte hashes.
   * @throws InvalidSSZTypeException If the next SSZ value is not a list, there are insufficient encoded bytes for any
   * hash in the list.
   * @throws EndOfSSZException If there are no more SSZ values to read.
   */
  fun readHashList(hashLength: Int): List<Bytes>

  /**
   * Read a list of booleans from the SSZ source.
   *
   * @return A list of booleans.
   * @throws InvalidSSZTypeException If the next SSZ value is not a list, there are insufficient encoded bytes for all
   * the booleans in the list.
   * @throws EndOfSSZException If there are no more SSZ values to read.
   */
  fun readBooleanList(): List<Boolean>

  /**
   * Check if all values have been read.
   *
   * @return `true` if all values have been read.
   */
  val isComplete: Boolean
}
/*
 * Copyright Consensys Software Inc.
 *
 * This file is dual-licensed under either the MIT license or Apache License 2.0.
 * See the LICENSE-MIT and LICENSE-APACHE files in the repository root for details.
 *
 * SPDX-License-Identifier: MIT OR Apache-2.0
 */
package maru.p2p

import io.libp2p.core.ConnectionHandler
import io.libp2p.core.Host
import io.libp2p.core.PeerId
import io.libp2p.core.crypto.PrivKey
import io.libp2p.core.dsl.host
import io.libp2p.core.multiformats.Multiaddr
import io.libp2p.core.mux.StreamMuxerProtocol
import io.libp2p.pubsub.PubsubApiImpl
import io.libp2p.pubsub.gossip.Gossip
import io.libp2p.pubsub.gossip.GossipPeerScoreParams
import io.libp2p.pubsub.gossip.GossipScoreParams
import io.libp2p.pubsub.gossip.GossipTopicsScoreParams
import io.libp2p.pubsub.gossip.builders.GossipParamsBuilder
import io.libp2p.pubsub.gossip.builders.GossipRouterBuilder
import io.libp2p.security.secio.SecIoSecureChannel
import io.libp2p.transport.tcp.TcpTransport
import java.util.Optional
import kotlin.random.Random
import kotlin.time.toJavaDuration
import maru.config.P2PConfig
import maru.core.SealedBeaconBlock
import maru.p2p.topics.TopicHandlerWithInOrderDelivering
import org.apache.tuweni.bytes.Bytes
import pubsub.pb.Rpc
import tech.pegasys.teku.infrastructure.async.AsyncRunner
import tech.pegasys.teku.infrastructure.unsigned.UInt64
import tech.pegasys.teku.networking.p2p.libp2p.LibP2PNetwork
import tech.pegasys.teku.networking.p2p.libp2p.LibP2PNodeId
import tech.pegasys.teku.networking.p2p.libp2p.PeerManager
import tech.pegasys.teku.networking.p2p.libp2p.gossip.GossipTopicHandlers
import tech.pegasys.teku.networking.p2p.libp2p.gossip.LibP2PGossipNetwork
import tech.pegasys.teku.networking.p2p.libp2p.gossip.PreparedPubsubMessage
import tech.pegasys.teku.networking.p2p.libp2p.rpc.RpcHandler
import tech.pegasys.teku.networking.p2p.network.P2PNetwork
import tech.pegasys.teku.networking.p2p.network.PeerHandler
import tech.pegasys.teku.networking.p2p.peer.Peer
import tech.pe


# This file was auto-generated by Fern from our API Definition.

import typing

DeleteFinetunedModelResponse = typing.Dict[str, typing.Any]


为道首杜雅轩存放反动证据。

   孟广泉，男，三十六岁，河北省昌平县人，住本市天桥西辅里九号。

   一贯道待命点传师，领导六个分坛，道徒一千多人，训练坛主等一千五百余人。解放后与道首张克振秘密计划及布置隐蔽活动。登记时拒缴道产、道具及退道费。

   刘庆瑞，男，五十四岁，北京市人，住本市金鱼池大街一○三号。

   一贯道“专诚坛”点传师，“龙化坛”坛主，领导四个分坛。解放后，将道徒组成五个小组，进行秘密活动，并召集四个坛主，制造谣言。登记时，隐瞒点传师身份及人名册、道具、道产。

   王焕庭，男，六十四岁，天津市人，住本市南长街东大坑二号。

   一贯道点传师，“保甲长”。解放后，将道徒编成小组，在他家里秘密开会，制造谣言，进行反革命宣传。登记后隐瞒点传师身份，造谣破坏政府法令。

   李传霖，男，三十五岁，北京市人，住本市三庙街八号。

   一贯道“清一坛”坛主，领导道徒三百余人，抗拒登记。隐瞒反动组织，分散道产，阻止道徒登记。

   陈希龄，男，六十五岁，北京市人，住本市太阳宫十二号。

   一贯道点传师，“吉一坛”坛主。领导道徒五百余人。解放后化整为零，秘密活动，散布谣言，抗拒登记。

   裴崇印，男，五十岁，北京市人，住本市西郊萧家河村正黄旗九十七号。

   一贯道“外东组达中坛”待命点传师，领导八个家坛，散布谣言，破坏土地改革。

   泉杨氏，化名杨如兰，女，五十三�


#include "../../lib/sdcc/vgs0lib.h"

void main(void)
{
    // パレットを初期化
    vgs0_palette_set(0, 0, 0, 0, 0);    // black
    vgs0_palette_set(0, 1, 7, 7, 7);    // dark gray
    vgs0_palette_set(0, 2, 24, 24, 24); // light gray
    vgs0_palette_set(0, 3, 31, 31, 31); // white

    // Bank 2 を Character Pattern Table ($A000) に転送 (DMA)
    vgs0_dma(2);

    // メニューを表示
    vgs0_bg_putstr(8, 7, 0x80, "PLAY: #1 PRELUDE");
    vgs0_bg_putstr(8, 9, 0x80, "PLAY: #2 GOLDBERG");
    vgs0_bg_putstr(8, 11, 0x80, "PLAY: #3 WTC1");
    vgs0_bg_putstr(8, 13, 0x80, "PLAY: #4 NSF");
    vgs0_bg_putstr(8, 15, 0x80, "PAUSE");
    vgs0_bg_putstr(8, 17, 0x80, "RESUME");
    vgs0_bg_putstr(8, 19, 0x80, "FADEOUT");
    vgs0_oam_set(0, 6 * 8, 7 * 8, 0x80, '>', 0, 0);

    // ボタン入力制御変数を準備
    uint8_t pushing = 0;
    uint8_t push = 0;

    // カーソル移動制御変数を準備
    uint8_t moving = 0;
    int8_t move = 0;
    uint8_t cursor = 7;

    while (1) {
        vgs0_wait_vsync();
        uint8_t pad = vgs0_joypad_get();

        // カーソル入力チェック
        if (pad & VGS0_JOYPAD_UP) {
            if (!moving) {
                move = -2;
                moving = 1;
            }
        } else if (pad & VGS0_JOYPAD_DW) {
            if (!moving) {
                move = 2;
                moving = 1;
            }
        } else {
            moving = 0;
        }

        // カーソル移動
        if (move) {
            vgs0_se_play(0);
            cursor += move;
            if (cursor < 7) {
                cursor = 19;
            } else if (19 < cursor) {
                cursor = 7;
            }
            VGS0_ADDR_OAM[0].y = cursor * 8;
            move = 0;
        }

        // ボタン入力チェック
        if ((pad & VGS0_JOYPAD_T1) || (pad & VGS0_JOYPAD_T2)) {
            if (!pushing) {
                push = 1;
                pushing = 1;
            }
        } else {
            if (pushing) {
                pushing = 0;
            } else {
                push = 0;
            }
        }

        // Aボタンを押して離した瞬間にカーソル位置のコマンドを実行
        if (!pushing && push) {
            vgs0_se_play(1);
            switch (cursor) {
                case 7: vgs0_bgm_play(0); break;
                case 9: vgs0_bgm_play(1); break;
                case 11: vgs0_bgm_play(2); break;
                case 13: vgs0_bgm_play(3); break;
                case 15: vgs0_bgm_pause(); break;
                case 17: vgs0_bgm_resume(); break;
                case 19: vgs0_bgm_fadeout(); break;
            }
        }
    }
}


E-2020-14882](https://nvd.nist.gov/vuln/detail/CVE-2020-14882)## CVE-2022-46169-Cacti-命令注入

**漏洞编号:** CVE-2022-46169

**漏洞类型:** 命令注入

**影响应用:** Cacti

**危害等级:** 高危，未经身份验证的远程命令执行

**影响版本:** <= 1.2.22

**利用条件:** 需要Cacti服务器可访问，且存在action类型为POLLER_ACTION_SCRIPT_PHP（2）的poller_item配置

**POC 可用性:** 是

**投毒风险:** 5%

## 详情

CVE-2022-46169 存在于 Cacti 1.2.22 及更早版本中，是一个未经身份验证的远程命令注入漏洞。攻击者可以通过伪造HTTP头绕过身份验证，然后通过操纵`poller_id`参数在`remote_agent.php`文件中执行任意命令。PoC代码通过Python脚本实现，利用此漏洞获取反向shell。该仓库的主要功能是提供漏洞利用代码，但由于开源软件的性质，任何人都可能修改并重新发布。**投毒风险较低 (5%)**，主要是因为该项目结构简单、代码量小，且功能单一，主要代码集中在cve_2022_46169/main.py中。需要人工审核确认没有恶意代码被隐藏。尽管存在风险，但考虑到代码的直接性和漏洞利用的明确性，以及利用反向shell的常见性，可以判断该代码的投毒可能性较低。

**利用方式：**
1.  攻击者首先需要确定目标Cacti服务器的版本低于或等于1.2.22。
2.  攻击者发送特制的HTTP请求到`remote_agent.php`，包含伪造的`Forwarded-For`头，绕过身份验证。
3.  攻击者构造包含恶意命令的`poller_id`参数，并将其发送到`remote_agent.php`，触发命令注入。
4.  如果目标服务器存在`POLLER_ACTION_SCRIPT_PHP`类型的`poller_item`配置，攻击者的命令将被执行。
5.  PoC代码利用此漏洞创建一个反向shell，允许攻击者远程控制目标服务器。

**项目地址:** [BKreisel/CVE-2022-46169](https://github.com/BKreisel/CVE-2022-46169)

**漏洞详情:** [CVE-2022-46169](https://nvd.nist.go


// Copyright (c) 2017 GeometryFactory Sarl (France).
// All rights reserved.
//
// This file is part of CGAL (www.cgal.org).
// 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.
//
// Licensees holding a valid commercial license may use this file in
// accordance with the commercial license agreement provided with the software.
//
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
//
// $URL: https://github.com/CGAL/cgal/blob/releases/CGAL-4.14/Classification/include/CGAL/Classification/internal/verbosity.h $
// $Id: verbosity.h ee57fc2 %aI Sébastien Loriot
// SPDX-License-Identifier: GPL-3.0+
//
// Author(s)     : Simon Giraudot

#ifndef CLASSIFICATION_INTERNAL_VERBOSITY_H
#define CLASSIFICATION_INTERNAL_VERBOSITY_H

#include <CGAL/license/Classification.h>

// General verbosity

#if defined(CGAL_CLASSIFICATION_VERBOSE)
#define CGAL_CLASSIFICATION_SILENT false
#else
#define CGAL_CLASSIFICATION_SILENT true
#endif

#define CGAL_CLASSIFICATION_CERR \
  if(CGAL_CLASSIFICATION_SILENT) {} else std::cerr

// Verbosity for training part

#if defined(CGAL_CLASSTRAINING_VERBOSE)
#define CGAL_CLASSTRAINING_SILENT false
#else
#define CGAL_CLASSTRAINING_SILENT true
#endif

#define CGAL_CLASSTRAINING_CERR \
  if(CGAL_CLASSTRAINING_SILENT) {} else std::cerr

#endif


v)", dp.info(), peer, dn.ID, dn.Addr)
				newReq := &proto.RemoveDataPartitionRaftMemberRequest{
					PartitionId: dp.partitionID,
					Force:       true,
					RemovePeer:  peer,
				}
				reqData, err := json.Marshal(newReq)
				if err != nil {
					log.LogWarnf("dp %v marshal newReq %v failed %v", dp.info(), newReq, err)
					continue
				}
				cc := &raftProto.ConfChange{
					Type: raftProto.ConfRemoveNode,
					Peer: raftProto.Peer{
						ID: peer.ID,
					},
					Context: reqData,
				}
				dp.dataNode.space.raftStore.RaftServer().RemoveRaftForce(dp.partitionID, cc)
				dp.ApplyMemberChange(cc, 0)
				dp.PersistMetadata()
				log.LogWarnf("dp %v remove expired peer %v", dp.info(), peer)
			}
		}
	}
}

func (dp *DataPartition) checkAvailable() (err error) {
	path := path.Join(dp.path, DpStatusFile)
	fp, err := os.OpenFile(path, os.O_TRUNC|os.O_RDWR, 0o755)
	if err != nil {
		dp.checkIsDiskError(err, ReadFlag)
		return
	}
	defer fp.Close()
	data := []byte(DpStatusFile)
	_, err = fp.WriteAt(data, 0)
	if err != nil {
		dp.checkIsDiskError(err, WriteFlag)
		return
	}
	if err = fp.Sync(); err != nil {
		dp.checkIsDiskError(err, WriteFlag)
		return
	}
	if _, err = fp.ReadAt(data, 0); err != nil {
		dp.checkIsDiskError(err, ReadFlag)
		if dp.partitionStatus == proto.Unavailable {
			log.LogErrorf("[checkAvailable] dp %v is unavailable", dp.partitionID)
		}
	}
	return
}

func (dp *DataPartition) GetExtentCountWithoutLock() int {
	return dp.extentStore.GetExtentCountWithoutLock()
}

func (dp *DataPartition) setChangeMemberWaiting() bool {
	return atomic.CompareAndSwapUint32(&dp.responseStatus, responseInitial, responseWait)
}

func (dp *DataPartition) setRestoreReplicaFinish() bool {
	return atomic.CompareAndSwapUint32(&dp.responseStatus, responseWait, responseInitial)
}

func (dp *DataPartition) EvictExtentCache() {
	err := dp.extentStore.DoExtentCacheTtl(dp.dataNode.ExtentCacheTtlByMin)
	if err != nil {
		log.LogWarnf("[EvictExtentCache] DoExtentCacheTtl err: %s", err.Error())
	}
}
// Copyright 2018 The CubeFS Authors.
//
// 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.k

package metanode

import (
	"encoding/json"
	"fmt"
	"sync"
	"time"

	"github.com/cubefs/cubefs/proto"
	"github.com/cubefs/cubefs/util/auditlog"
	"githu


, output);
                        fclose(output);
                        delete froot;
                    }
                }
                else
                {
                    fclose(n);
                }
            }
            // Delete the extracted file in the case of an error
            if (!file_ok)
                remove(szLocalFile);
        }
    }

    if (success)
        printf("\nExtract wmo complete (No (fatal) errors)\n");

    return success;
}

void ParsMapFiles()
{
    char fn[512];
    //char id_filename[64];
    char id[10];
    for (unsigned int i = 0; i < map_count; ++i)
    {
        sprintf(id, "%03u", map_ids[i].id);
        sprintf(fn, "World\\Maps\\%s\\%s.wdt", map_ids[i].name, map_ids[i].name);
        WDTFile WDT(fn, map_ids[i].name);
        if (WDT.init(id, map_ids[i].id))
        {
            printf("Processing Map %u\n[", map_ids[i].id);
            for (int x = 0; x < 64; ++x)
            {
                for (int y = 0; y < 64; ++y)
                {
                    if (ADTFile *ADT = WDT.GetMap(x, y))
                    {
                        //sprintf(id_filename,"%02u %02u %03u",x,y,map_ids[i].id);//!!!!!!!!!
                        ADT->init(map_ids[i].id, x, y);
                        delete ADT;
                    }
                }
                printf("#");
                fflush(stdout);
            }
            printf("]\n");
        }
    }
}

void getGamePath()
{
#ifdef _WIN32
    strcpy(input_path, "Data\\");
#else
    strcpy(input_path, "Data/");
#endif
}

bool scan_patches(char* scanmatch, std::vector<std::string>& pArchiveNames)
{
    int i;
    char path[512];

    for (i = 1; i <= 99; i++)
    {
        if (i != 1)
        {
            sprintf(path, "%s-%d.MPQ", scanmatch, i);
        }
        else
        {
            sprintf(path, "%s.MPQ", scanmatch);
        }
#ifdef __linux__
        if (FILE* h = fopen64(path, "rb"))
#else
        if (FILE* h = fopen(path, "rb"))
#endif
        {
            fclose(h);
            //matches.push_back(path);
            pArchiveNames.push_back(path);
        }
    }

    return(true);
}

bool fillArchiveNameVector(std::vector<std::string>& pArchiveNames)
{
    if (!hasInputPathParam)
        getGamePath();

    printf("\nGame path: %s\n", input_path);

    char path[512];
    string in_path(input_path);
    std::vector<std::string> locales, searchLocales;

    searchLocales.push_back("enGB");
    searchLocales.push_back("enUS");
    searchLocales.push_back("deDE");
    searchLocales.push_back("esES");
    searchLocales.push_back("frFR");
    searchLocales.push_back("koKR");
    searchLocales.push_back("zhCN");
    searchLocales.push_back("zhTW");
    searchLocales.push_back("enCN");
    searchLocales.push_back("enTW");
    searchLocales.push_back("esMX");
    searchLocales.push_back("ruRU");

    for (std::vector<std::string>::iterator i = searchLocales.begin(); i != searchLocales.end(); ++i)
    {
        std::string localePath = in_path + *i;
        // check if locale exists:
        struct stat status;
        if (stat(localePath.c_str(), &status))
            continue;
        if ((status.st_mode & S_IFDIR) == 0)
            continue;
        printf("Found locale '%s'\n", i->c_str());
        locales.push_back(*i);
    }
    printf("\n");

    // open locale expansion and common files
    printf("Adding data files from locale directories.\n");
    for (std::vector<std::string>::iterator i = locales.begin(); i != locales.end(); ++i)
    {
        pArchiveNames.push_back(in_path + *i + "/locale-" +


// FMOD-Unity-Tools by Ville Ojala
// MIT License
// https://github.com/VilleOjala/FMOD-Unity-Tools

using FMODUnity;
using UnityEngine;
using System.Collections.Generic;

namespace FMODUnityTools
{
    [AddComponentMenu("FMOD Unity Tools/Core/Audio Object Controller")]
    public class AudioObjectController : MonoBehaviour
    {
        public enum ControlMethod
        {
            Event,
            Reference
        }

        public enum TriggerOn
        {
            None,
            Start,
            OnDisable,
            OnDestroy,
            OnTriggerEnter,
            OnTriggerExit
        }

        public TriggerOn triggerOn;
        public ControlMethod controlMethod;
        public ControlAction controlAction;
        public ParamRef[] parameters;

        [HideInInspector]
        public List<EventTag> eventTags = new List<EventTag>();

        [HideInInspector]
        public List<AudioObject> audioObjects = new List<AudioObject>();

        [HideInInspector]
        public AudioTriggerArea audioTriggerArea;

        void Awake()
        {
           if (audioTriggerArea != null)
           {
               audioTriggerArea.Triggered += TriggeredHandler;
           }
        }

        void Start()
        {
            Trigger(TriggerOn.Start);
        }

        void OnDisable()
        {
            Trigger(TriggerOn.OnDisable);
        }

        void OnDestroy()
        {
            Trigger(TriggerOn.OnDestroy);

            if (audioTriggerArea != null)
            {


y, exportJob._outputFileName);
                Logging.LogDebug("Export file path calculated as '{0}'", filePath);
                using (var stream = File.Open(filePath, FileMode.Create, FileAccess.Write))
#endif
                {
                    string[] graphs = String.IsNullOrEmpty(exportJob._graphUri)
                                          ? null
                                          : new[] {exportJob._graphUri};
                    var triples = exportJob._storeWorker.ReadStore.Match(null, null, null, graphs:graphs);
                    var sw = new StreamWriter(stream);
                    var sink = GetWriterSink(exportJob._exportFormat, sw);
                    var nw = new BrightstarTripleSinkAdapter(sink);
                    foreach (var triple in triples)
                    {
                        nw.Triple(triple);
                    }
                    sink.Close();
                    sw.Flush();

#if !PORTABLE
                    stream.Flush(true);
                    stream.Close();
#endif
                }
                exportJob._successCallback(exportJob._jobId);
            }
            catch (Exception ex)
            {
                Logging.LogError(BrightstarEventId.ExportDataError, "Error Exporting Data {0} {1}", ex.Message, ex.StackTrace);
                exportJob._errorCallback(exportJob._jobId, ex);
            }

        }

        private static ITripleSink GetWriterSink(RdfFormat exportFormat, TextWriter textWriter)
        {
            if (exportFormat.MatchesMediaType(RdfFormat.NTriples))
            {
                return new NTriplesWriter(textWriter);
            }
            if (exportFormat.MatchesMediaType(RdfFormat.NQuads))
            {
                return new NQuadsWriter(textWriter);
            }
            if (exportFormat.MatchesMediaType(RdfFormat.RdfXml))
            {
                var xw = XmlWriter.Create(textWriter, new XmlWriterSettings {CloseOutput = false, Indent = true});
                return new RdfXmlWriter(xw);
            }
            throw new BrightstarClientException(String.Format(Strings.ExportJob_UnsupportedExportFormat, exportFormat.MediaTypes[0]));
        }
    }
}


* ***** ：表示匹配这个位置所有的时间
 *  * **?** ：表示匹配这个位置任意的时间（与"*"作用一致）
 *  * **L** ：表示匹配这个位置允许的最大值
 *  * ***/2** ：表示间隔时间，例如在分上，表示每两分钟，同样*可以使用数字列表代替，逗号分隔
 *  * **2-8** ：表示连续区间，例如在分上，表示2,3,4,5,6,7,8分
 *  * **2,3,5,8** ：表示列表
 *  * **wed** ：表示周别名
 *  * **jan** ：表示月别名
 *
 *
 * @author looly
 * @since 5.8.0
 */
class PartParser(val part: Part) {

    /**
     * 将表达式解析为[PartMatcher]

     *
     *  * * 或者 ? 返回[AlwaysTrueMatcher]
     *  * [Part.DAY_OF_MONTH] 返回[DayOfMonthMatcher]
     *  * [Part.YEAR] 返回[YearValueMatcher]
     *  * 其他 返回[BoolArrayMatcher]
     *
     *
     * @param value 表达式
     * @return [PartMatcher]
     */
    fun parse(value: String): PartMatcher {
        if (isMatchAllStr(value)) {
            //兼容Quartz的"?"表达式，不会出现互斥情况，与"*"作用相同
            return AlwaysTrueMatcher()
        }
        val values = parseArray(value)
        if (values.isEmpty()) {
            throw CronException("Invalid part value: [{}]", value)
        }
        return when (part) {
            Part.DAY_OF_MONTH -> DayOfMonthMatcher(values)
            Part.YEAR -> YearValueMatcher(values)
            else -> BoolArrayMatcher(values)
        }
    }

    /**
     * 处理数组形式表达式

     * 处理的形式包括：
     *
     *  * **a** 或 *****
     *  * **a,b,c,d**
     *
     *
     * @param value 子表达式值
     * @return 值列表
     */
    private fun parseArray(value: String): List<Int> {
        val values: List<Int> = ArrayList()
        val parts = StrUtil.split(value, StrUtil.C_COMMA)
        for (part in parts) {
            CollUtil.addAllIfNotContains(values, parseStep(part))
        }
        return values
    }

    /**
     * 处理间隔形式的表达式

     * 处理的形式包括：
     *
     *  * **a** 或 *****
     *  * **a/b** 或 ***/b**
     *  * **a-b/2**
     *
     *
     * @param value 表达式值
     * @return List
     */
    private fun parseStep(value: String): List<Int> {
        val parts = StrUtil.split(value, StrUtil.C_SLASH)
        val size = parts.size
        val results: List<Int>
        results = if (size == 1) { // 普通形式
            parseRange(value, -1)
        } else if (size == 2) { // 间隔形式
            val step = parseNumber(parts[1])
            if (step < 1) {
                throw CronException("Non positive divisor for field: [{}]", value)
            }
            parseRange(parts[0], step)
        } else {
            throw CronException("Invalid syntax of field: [{}]", value)
        }
        return results
    }

    /**
     * 处理表达式中范围表达式 处理的形式包括：
     *
     *  * *
     *  * 2
     *  * 3-8


]:,}")
        print(f"   • Resonance Strength: {quantum['resonance_strength']:.4f}")
        print(f"   • Quantum Coherence: {quantum['quantum_coherence']:.4f}")
        print(f"   • Attention Dynamics: {quantum['attention_dynamics']:.6f}")

        # Advantages
        advantages = results['advantages']
        print("\n🎯 QUANTUM ADVANTAGES:")
        print(f"   • Speed: {advantages['speed_advantage']:+.1f}%")
        print(f"   • Confidence: {advantages['confidence_advantage']:+.1f}%")
        print(f"   • Efficiency: {advantages['efficiency_advantage']:.1f}x")
        print(f"   • Memory Saving: {advantages['memory_saving']:.1f}%")

        # Visual indicators
        print("\n📊 VISUAL INDICATORS:")
        if advantages['speed_advantage'] > 0:
            print(f"   🚀 SPEED: Quantum is {advantages['speed_advantage']:.1f}% faster!")
        else:
            print(f"   ⏱  SPEED: Similar processing times")

        if advantages['confidence_advantage'] > 0:
            print(f"   ✅ CONFIDENCE: Quantum is {advantages['confidence_advantage']:.1f}% more confident!")
        else:
            print(f"   📉 CONFIDENCE: Classical is {-advantages['confidence_advantage']:.1f}% more confident")

        print(f"   💾 EFFICIENCY: Quantum uses {advantages['efficiency_advantage']:.1f}x fewer parameters!")
        print(f"   🌱 MEMORY: Quantum saves {advantages['memory_saving']:.1f}% memory!")

    def run_interactive_demo(self):
        """Run the interactive web-like demo"""
        print("🌐 QUANTUM BIO-NLP INTERACTIVE WEB DEMO")
        print("=" * 50)
        print("Experience quantum advantages in real-time!")
        print("Type any sentence and see both models analyze it.")
        print("Type 'quit' to exit.")
        print()

        while True:
            print("\n📝 Enter a sentence to analyze:")
            sentence = input(">>> ").strip()

            if sentence.lower() == 'quit':
                print("👋 Thank you for experiencing quantum advantages!")
                break

            if not sentence:
                continue

            try:
                results = self.analyze_sentence(sentence)
                self.print_results(sentence, results)

                # Show cumulative advantages after multiple tests
                print(f"\n💡 Try different types of sentences:")
                print("   • Simple sentences (e.g., 'The cat sat on the mat')")
                print("   • Complex sentences (e.g., 'Quantum mechanics explains subatomic behavior')")
                print("   • Ambiguous sentences (e.g., 'The bank has money and a river bank')")
                print("   • Technical sentences (e.g., 'Photosynthesis uses quantum effects')")

            except Exception as e:
                print(f"❌ Error analyzing sentence: {e}")
                print("Please try a different sentence.")

if __name__ == "__main__":
    demo = InteractiveWebDemo()
    demo.run_interactive_demo()


/* Properties of Unicode characters.
   Copyright (C) 2002, 2006-2007, 2009-2025 Free Software Foundation, Inc.
   Written by Bruno Haible <bruno@clisp.org>, 2002.

   This file is free software.
   It is dual-licensed under "the GNU LGPLv3+ or the GNU GPLv2+".
   You can redistribute it and/or modify it under either
     - the terms of the GNU Lesser General Public License as published
       by the Free Software Foundation, either version 3, or (at your
       option) any later version, or
     - the terms of the GNU General Public License as published by the
       Free Software Foundation; either version 2, or (at your option)
       any later version, or
     - the same dual license "the GNU LGPLv3+ or the GNU GPLv2+".

   This file 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
   Lesser General Public License and the GNU General Public License
   for more details.

   You should have received a copy of the GNU Lesser General Public
   License and of the GNU General Public License along with this
   program.  If not, see <https://www.gnu.org/licenses/>.  */

#include <config.h>

/* Specification.  */
#include "unictype.h"

#include "bitmap.h"

/* Define u_property_emoji_component table.  */
#include "pr_emoji_component.h"

bool
uc_is_property_emoji_component (ucs4_t uc)
{
  return bitmap_lookup (&u_property_emoji_component, uc);
}

const uc_property_t UC_PROPERTY_EMOJI_COMPONENT =
  { &uc_is_property_emoji_component };


582866 100%);
    background: #a048b9 linear-gradient(10deg, #a048b9 0%, #a048b9 10%, #9845b0 10%, #9845b0 20%, #8c40a3 19%, #9041a6 21%, #9041a6 20%, #9041a6 30%, #853c99 29%, #883e9d 31%, #883e9d 30%, #883e9d 40%, #7d3990 39%, #803a94 41%, #803a94 40%, #803a94 50%, #753587 49%, #78368b 51%, #78368b 50%, #78368b 60%, #6d317e 59%, #703381 61%, #703381 60%, #703381 70%, #652e74 69%, #682f78 71%, #682f78 70%, #682f78 80%, #5d2a6b 79%, #602b6f 81%, #602b6f 80%, #602b6f 90%, #552662 89%, #582866 91%, #582866 90%, #582866 100%)
}

pre[rel="jQuery"]::before.noisy,
pre[rel="JavaScript"]::before.noisy,
pre[rel="JSX"]::before.noisy {
    position: relative;
    overflow: hidden
}

pre[rel="jQuery"]::before.noisy:before,
pre[rel="jQuery"]::before.noisy:after,
pre[rel="JavaScript"]::before.noisy:before,
pre[rel="JavaScript"]::before.noisy:after,
pre[rel="JSX"]::before.noisy:before,
pre[rel="JSX"]::before.noisy:after {
    content: '';
    display: block;
    width: 100%;
    height: 100%;
    background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAMAAAAp4XiDAAAAUVBMVEWFhYWDg4N3d3dtbW17e3t1dXWBgYGHh4d5eXlzc3OLi4ubm5uVlZWPj4+NjY19fX2JiYl/f39ra2uRkZGZmZlpaWmXl5dvb29xcXGTk5NnZ2c8TV1mAAAAG3RSTlNAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAvEOwtAAAFVklEQVR4XpWWB67c2BUFb3g557T/hRo9/WUMZHlgr4Bg8Z4qQgQJlHI4A8SzFVrapvmTF9O7dmYRFZ60YiBhJRCgh1FYhiLAmdvX0CzTOpNE77ME0Zty/nWWzchDtiqrmQDeuv3powQ5ta2eN0FY0InkqDD73lT9c9lEzwUNqgFHs9VQce3TVClFCQrSTfOiYkVJQBmpbq2L6iZavPnAPcoU0dSw0SUTqz/GtrGuXfbyyBniKykOWQWGqwwMA7QiYAxi+IlPdqo+hYHnUt5ZPfnsHJyNiDtnpJyayNBkF6cWoYGAMY92U2hXHF/C1M8uP/ZtYdiuj26UdAdQQSXQErwS


 isChecked:boolean){
    if(!this.contains(account.login) && isChecked)
    {
      this.accountList.push(account);
      this.addData(account);
      //Here, add in database
    }

  }

  contains(login:string): boolean
  {
    var isInclude:boolean=false;
    this.accountList.forEach(function (data) {

      if(data.login === login){
        isInclude = true;
      }
    });
    return isInclude;
  }
}
// Attempt at a driver for rule-based representations.
// Probably not quite feasible with current rule support
import rdf from "@def.codes/rdf-data-model";
// re def:matches:
// moves the complexity to the assertion evaluation
// but gives an automatic syntax for
// - id assertions (?)
// - element assertions
// - class assertions (which are non-conflicting)
// - attribute value assertions
//   - including "contains" (for token list), which are non-conflicting
// - multiple assertions
// - :first-child / :last-child??? nth-child?? could be interesting though pointlessly crazy
// - ignoring everything else (:not(), descendant, sibling, etc)
// - still need another approach for has text/template

const n = rdf.namedNode;
const v = rdf.variable;
const l = rdf.literal;

const ISA = n("isa");
const MATCHES = n("def:matches");
const CONTAINS = n("def:contains");
const CONTAINS_TEXT = n("def:containsText");
const REPRESENTS = n("def:represents");
const HAS_STYLE = n("def:hasStyle");
const SUBJECT = n("rdf:subject");
const PREDICATE = n("rdf:predicate");
const OBJECT = n("rdf:object");
const DOM_ELEMENT = n("def:DomElement");
const HAS_PART = n("hasPart");

const GENERAL_VALUE_MAPPER = n("GeneralValueMapper");

// @ts-ignore
const general_value_to_template = l(value => ({
  element: "output",
  children: [
    // value === undefined ? "⊥" : value === null ? "∅" : value.toString(),
    value === undefined ? "⊥" : value === null ? "∅" : JSON.stringify(value),
  ],
}));

export default {
  name: "domRepresentationDriver",
  init: ({ q, is_node }) => ({
    claims: [
      ...q(
        // Maybe a bad term because it's “transitive” in an informal way
        "def:representsTransitive subpropertyOf def:represents",
        // Relate types with unicode symbols
        // These are hex strings...
        `Person def:symbolizedByCodePoint ${0x1f464}`,
        `Woman def:symbolizedByCodePoint ${0x2640}`,
        `Man def:symbolizedByCodePoint ${0x2642}`,
        `name subpropertyOf rdfs:label`
      ),
      [GENERAL_VALUE_MAPPER, n("mapsWith"), general_value_to_template],
    ],
    rules: [
      {
        name: "RDFaResourceRule",
        when: q("?rep isa def:DomElement", "?rep def:represents ?thing"),
        // TODO: conditions s/b in filter
        then: ({ rep, thing }) =>
          thing.termType === "NamedNode"
            ? { assert: [[rep, MATCHES, l(`[resource="${thing.value}"]`)]] }
            : thing.termType === "BlankNode"
            ? { assert: [[rep, MATCHES, l(`[resource="_:${thing.value}"]`)]] }
            : {},
      },
      {
        disabled: true,
        name: "RDFaPropertyRepresentationRule",
        comment: `A *transitive* representation of a resource contains a
          representation of each of its property values`,
        when: q(
          "?s ?p ?o",
          "?rep def:representsTransitive ?s",
          "?rep isa def:DomElement"
        ),
        then: ({ rep, s, p, o })


st int TyphoonPulseMotorHorsepower = 1200;
        private const decimal TyphoonPulseMotorPriceInUSADollars = 15999;

        public TyphoonPulseMotor()
            : base(
                  TyphoonPulseMotorPriceInUSADollars,
                  TyphoonPulseMotorWeightInGrams,
                  TyphoonPulseMotorAccelerationBonus,
                  TyphoonPulseMotorTopSpeedBonus,
                  TyphoonPulseMotorHorsepower,
                  TunningGradeType.HighGrade,
                  CylinderType.V16,
                  MotorType.PulseDetonationMotor)
        {
        }
    }
}


"""
The following code is from: https://github.com/ignacio-rocco/cnngeometric_pytorch.
"""

import torch
from torch.autograd import Variable
import numpy as np
from geotnf.transformation import TpsGridGen

class PointTnf(object):
    """

    Class with functions for transforming a set of points with affine/tps transformations

    """
    def __init__(self, use_cuda=True):
        self.use_cuda=use_cuda
        self.tpsTnf = TpsGridGen(use_cuda=self.use_cuda)

    def tpsPointTnf(self,theta,points):
        # points are expected in [B,2,N], where first row is X and second row is Y
        # reshape points for applying Tps transformation
        points=points.unsqueeze(3).transpose(1,3)
        # apply transformation
        warped_points = self.tpsTnf.apply_transformation(theta,points)
        # undo reshaping
        warped_points=warped_points.transpose(3,1).squeeze(3)
        return warped_points

    def affPointTnf(self,theta,points):
        theta_mat = theta.view(-1,2,3)
        warped_points = torch.bmm(theta_mat[:,:,:2],points)
        warped_points += theta_mat[:,:,2].unsqueeze(2).expand_as(warped_points)
        return warped_points

def PointsToUnitCoords(P,im_size):
    h,w = im_size[:,0],im_size[:,1]
    NormAxis = lambda x,L: (x-1-(L-1)/2)*2/(L-1)
    P_norm = P.clone()
    # normalize Y
    P_norm[:,0,:] = NormAxis(P[:,0,:],w.unsqueeze(1).expand_as(P[:,0,:]))
    # normalize X
    P_norm[:,1,:] = NormAxis(P[:,1,:],h.unsqueeze(1).expand_as(P[:,1,:]))
    return P_norm

def PointsToPixelCoords(P,im_size):
    h,w = im_size[:,0],im_size[:,1]
    NormAxis = lambda x,L: x*(L-1)/2+1+(L-1)/2
    P_norm = P.clone()
    # normalize Y
    P_norm[:,0,:] = NormAxis(P[:,0,:],w.unsqueeze(1).expand_as(P[:,0,:]))
    # normalize X
    P_norm[:,1,:] = NormAxis(P[:,1,:],h.unsqueeze(1).expand_as(P[:,1,:]))
    return P_norm


#!/usr/bin/env python3

"""
Misc. utils.
"""

import random

def my_shuffle(array):
    """
    Returns a shuffled array.

    random.shuffle shuffles in place and returns None. This way shuffle can be
    used in a chain.
    """
    random.shuffle(array)
    return array

def inc_string(text):
    """
    Increase a string by one.

    Examples: a -> b, e -> f, z -> aa, af -> ag.
    """
    text = list(text[::-1])
    go_over = False
    for index, c in enumerate(text):
        if index == 0 or go_over:
            up = chr(ord(c)+1)
        if up <= 'z':
            go_over = False
            text[index] = up
            break
        else:
            go_over = True
            text[index] = 'a'

    if go_over:
        text.append('a')

    return ''.join(text[::-1])

def pretty_num(n):
    """
    Converts a number to a nicely formatted string.

    Example: 6874 => '6,874'.
    """
    return "{:,}".format(n)

def filesize_fmt(num):
    """
    Human-readable file size.
    http://stackoverflow.com/questions/1094841
    """
    for x in ['b', 'KB', 'MB', 'GB']:
        if num < 1024.0:
            return "%3.1f %s" % (num, x)
        num /= 1024.0
    return "%3.1f %s" % (num, 'TB')

##############################################################################

if __name__ == "__main__":
    print(my_shuffle(['a', 'b', 'c'])[0])
    #
    print('a ->', inc_string('a'))
    print('f ->', inc_string('f'))
    print('z ->', inc_string('z'))
    print('af ->', inc_string('af'))
    print('zz ->', inc_string('zz'))
    #
    number = 6874
    print(pretty_num(number))   # '6,874'
    #
    length = 1322688512
    print(filesize_fmt(length))


a2f7793c">cutlass::gemm::device::GemmBatched< ElementA_, LayoutA_, ElementB_, LayoutB_, ElementC_, layout::ColumnMajor, ElementAccumulator_, OperatorClass_, ArchTag_, ThreadblockShape_, WarpShape_, InstructionShape_, EpilogueOutputOp_, ThreadblockSwizzle_, Stages, AlignmentA, AlignmentB, Operator_ >
, cutlass::gemm::device::GemmComplex< ElementA_, LayoutA_, ElementB_, LayoutB_, ElementC_, LayoutC_, ElementAccumulator_, OperatorClass_, ArchTag_, ThreadblockShape_, WarpShape_, InstructionShape_, EpilogueOutputOp_, ThreadblockSwizzle_, Stages, TransformA, TransformB, SplitKSerial >
, cutlass::gemm::device::GemmComplex< ElementA_, LayoutA_, ElementB_, LayoutB_, ElementC_, layout::ColumnMajor, ElementAccumulator_, OperatorClass_, ArchTag_, ThreadblockShape_, WarpShape_, InstructionShape_, EpilogueOutputOp_, ThreadblockSwizzle_, Stages, TransformA, TransformB, SplitKSerial >

TensorUpdateDiagonalFunc()
: cutlass::reference::device::detail::TensorUpdateDiagonalFunc< Element, Layout >

TensorUpdateOffDiagonalFunc()
: cutlass::reference::device::detail::TensorUpdateOffDiagonalFunc< Element, Layout >
, cutlass::reference::host::detail::TensorUpdateOffDiagonalFunc< Element, Layout >

TensorView
: cutlass::HostTensor< Element_, Layout_ >
, cutlass::reference::device::detail::TensorCopyDiagonalInFunc< Element, Layout >
, cutlass::reference::device::detail::TensorCopyDiagonalOutFunc< Element, Layout >
, <a class="el" href="structcutlass_1_1reference_1_1device_1_1de


caleContextHolder;

import java.util.Locale;

/**
 * status enum      // todo #4855 One category one interval
 */
public enum Status {

    SUCCESS(0, "success", "成功"),

    INTERNAL_SERVER_ERROR_ARGS(10000, "Internal Server Error: {0}", "服务端异常: {0}"),

    REQUEST_PARAMS_NOT_VALID_ERROR(10001, "request parameter {0} is not valid", "请求参数[{0}]无效"),
    TASK_TIMEOUT_PARAMS_ERROR(10002, "task timeout parameter is not valid", "任务超时参数无效"),
    USER_NAME_EXIST(10003, "user name already exists", "用户名已存在"),
    USER_NAME_NULL(10004, "user name is null", "用户名不能为空"),
    HDFS_OPERATION_ERROR(10006, "hdfs operation error", "hdfs操作错误"),
    TASK_INSTANCE_NOT_FOUND(10008, "task instance not found", "任务实例不存在"),
    OS_TENANT_CODE_EXIST(10009, "os tenant code {0} already exists", "操作系统租户[{0}]已存在"),
    USER_NOT_EXIST(10010, "user {0} not exists", "用户[{0}]不存在"),
    ALERT_GROUP_NOT_EXIST(10011, "alarm group not found", "告警组不存在"),
    ALERT_GROUP_EXIST(10012, "alarm group already exists", "告警组名称已存在"),
    USER_NAME_PASSWD_ERROR(10013, "user name or password error", "用户名或密码错误"),
    LOGIN_SESSION_FAILED(10014, "create session failed!", "创建session失败"),
    DATASOURCE_EXIST(10015, "data source name already exists", "数据源名称已存在"),
    DATASOURCE_CONNECT_FAILED(10016, "data source connection failed", "建立数据源连接失败"),
    TENANT_NOT_EXIST(10017, "tenant not exists", "租户不存在"),
    PROJECT_NOT_FOUNT(10018, "project {0} not found ", "项目[{0}]不存在"),
    PROJECT_ALREADY_EXISTS(10019, "project {0} already exists", "项目名称[{0}]已存在"),
    TASK_INSTANCE_NOT_EXISTS(10020, "task instance {0} does not exist", "任务实例[{0}]不存在"),
    TASK_INSTANCE_NOT_SUB_WORKFLOW_INSTANCE(10021, "task instance {0} is not sub process instance", "任务实例[{0}]不是子流程实例"),
    SCHEDULE_CRON_NOT_EXISTS(10022, "scheduler crontab {0} does not exist", "调度配置定时表达式[{0}]不存在"),
    SCHEDULE_CRON_ONLINE_FORBID_UPDATE(10023, "online status does not allow update operations", "调度配置上线状态不允许修改"),
    SCHEDULE_CRON_CHECK_FAILED(10024, "scheduler crontab expression validation failure: {0}", "调度配置定时表达式验证失败: {0}"),
    MASTER_NOT_EXISTS(10025, "master does not exist", "无可用master节点"),
    SCHEDULE_STATUS_UNKNOWN(10026, "unknown status: {0}", "未知状态: {0}"),
    CREATE_ALERT_GROUP_ERROR(10027, "create alert group error", "创建告警组错误"),
    QUERY_ALL_ALERTGROUP_ERROR(10028, "query all alertgroup error", "查询告警组错误"),
    LIST_PAGING_ALERT_GROUP_ERROR(10029, "list paging alert group error", "分页查询告警组错误"),
    UPDATE_ALERT_GROUP_ERROR(10030, "update alert group error", "更新告警组错误"),
    DELETE_ALERT_GROUP_ERROR(10031, "delete alert group error", "删除告警组错误"),
    ALERT_GROUP_GRANT_USER_ERROR(10032, "alert group grant user error", "告警组授权用户错误"),
    CREATE_DATASOURCE_ERROR(10033, "create datasource error", "创建数据源错误"),
    UPDATE_DATASOURCE_ERROR(10034, "update datasource error


tras: BD-Java
BDInfo: 0.7.5.8

PLAYLIST REPORT:

Name: 00800.MPLS
Length: 2:27:57.535 (h:m:s.ms)
Size: 35,626,303,488 bytes
Total Bitrate: 32.10 Mbps

VIDEO:

Codec Bitrate Description
----- ------- -----------
MPEG-4 AVC Video 21031 kbps 1080p / 23.976 fps / 16:9 / High Profile 4.1

AUDIO:

Codec Language Bitrate Description
----- -------- ------- -----------
Dolby TrueHD/Atmos Audio English 3588 kbps 7.1 / 48 kHz / 3140 kbps / 24-bit (AC3 Embedded: 5.1-EX / 48 kHz / 448 kbps / DN -27dB)
Dolby Digital Audio English 448 kbps 5.1 / 48 kHz / 448 kbps / DN -31dB
Dolby Digital Audio English 448 kbps 5.1 / 48 kHz / 448 kbps / DN -31dB
DTS-HD Master Audio Italian 2244 kbps 5.1 / 48 kHz / 2244 kbps / 16-bit (DTS Core: 5.1 / 48 kHz / 1509 kbps / 16-bit)
Dolby Digital Audio Spanish 448 kbps 5.1 / 48 kHz / 448 kbps / DN -31dB
Dolby Digital Audio Chinese 448 kbps 5.1 / 48 kHz / 448 kbps / DN -31dB
Dolby Digital Audio Czech 448 kbps 5.1 / 48 kHz / 448 kbps / DN -31dB

</fieldset>

<fieldset style="width: auto; border: 1px solid #CADCEB; padding: 10px;">
                                    <legend style="border: 1px solid #CADCEB; padding: 4px; color: #0000BF;">
                                        h264 Log & Quant Analyzer</legend>

Code: Select all • Expand/Compress

-[Information] Log for job2 (video, MatrixresffmsSD.avs -> MatrixresffmsSD.264)
--[Information] [07/03/2022 16:05:19] Started handling job
--[Information] [07/03/2022 16:05:19] Preprocessing
-[NoImage] LoadPlugin("C:\Users\FrandanI9\Documents\Megui\tools\haali\avss.dll")
-[NoImage] dss2("D:\MatrixResurrection\Matrixresffms.mkv", fps=23.976).AssumeFPS(24000,1001)
-[NoImage] crop(0,138,-0,-138)
-[NoImage] Blackmanresize(720,302)
-[NoImage] #histogram("luma")
-[NoImage] #selectrangeevery(400,20)
--[Information] [07/03/2022 16:05:19] AviSynth input script
-[NoImage] LoadPlugin(&quot


%A6%B0%E0%A6%A5%E0%A6%AE-%E0%A6%A6%E0%A6%95%E0%A7%8D%E0%A6%B7%E0%A6%BF%E0%A6%A3-%E0%A6%8F%E0%A6%B6%E0%A7%80%E0%A7%9F-%E0%A6%A6%E0%A7%87%E0%A6%B6-%E0%A6%B9%E0%A6%BF%E0%A6%B8%E0%A7%87%E0%A6%AC%E0%A7%87-%E0%A6%9C%E0%A6%BE%E0%A6%A4%E0%A6%BF%E0%A6%B8%E0%A6%82%E0%A6%98-%E0%A6%AA%E0%A6%BE%E0%A6%A8%E0%A6%BF-%E0%A6%95%E0%A6%A8%E0%A6%AD%E0%A7%87%E0%A6%A8%E0%A6%B6%E0%A6%A8%E0%A7%87)

---

বাংলাদেশ ২০ জুন আনুষ্ঠানিকভাবে জাতিসংঘের ‘প্রোটেকশন অ্যান্ড ইউজ অফ ট্রান্সবাউন্ডারি ওয়াটারকোর্সেস অ্যান্ড ইন্টারন্যাশনাল লেকস ইউএন ওয়াটার কনভেনশন’-এ যোগ দিয়েছে। এর মাধ্যমে বাংলাদেশ দক্ষিণ এশিয়ার প্রথম এবং বিশ্বে ৫৬তম দেশ হিসেবে এ চুক্তিতে যুক্ত হলো।

অন্তর্বর্তী সরকারের পরিবেশ, বন ও জলবায়ু পরিবর্তন এবং পানি সম্পদ উপদেষ্টা সৈয়দা রিজওয়ানা হাসান বলেন, জাতিসংঘ পানি কনভেনশনে যুক


 convention
        {
            var name = type.FullName!.Replace("ViewModel", "View");
            var viewType = Type.GetType(name);

            if (viewType != null)
            {
                return (Control)Activator.CreateInstance(viewType)!;
            }
        }

        throw new InvalidOperationException($"Could not resolve the View for '{type}'");
    }

    public TViewModel CreateViewModel<TViewModel>() where TViewModel : ObservableObject
    {
        return Ioc.Default.GetService<TViewModel>()!;
    }

    public Control CreateView<TView>() where TView : Control
    {
        return Activator.CreateInstance<TView>()!;
    }

    public void RegisterViewFactory<TViewModel, TView>()
        where TViewModel : class
        where TView : Control
        => _locatorFactory.Add(typeof(TViewModel), CreateView<TView>);
}


412@contosotest21.onmicrosoft.com/groupsubscription.ashx?realm=contosotest21.onmicrosoft.com&source=WarmingEmail&action=site\" data-auth=\"NotApplicable\" style=\"text-decoration:none;\">
\r\n
\r\n\r\n
Add to the team site

\r\n
\r\n\r\n
Start sharing and collaborating on content in SharePoint.

\r\n
\r\n
\r\n
\r\n<img data-imagetype=\"AttachmentByCid\" originalSrc=\"cid:filesicon\" explicitlogon=\"TestGroup412@contosotest21.onmicrosoft.com\" src=\"cid:filesicon\" width=\"64\" height=\"64\" style=\"display:block;text-decoration


0;padding:0 .375rem;margin-left:-.3125rem;-webkit-border-radius:.5rem;border-radius:.5rem}.button--tag button:hover,.button--tag button:focus,.button--tag button:active{background-color:transparent;border-color:#a4a4a4}.show-more-tags{vertical-align:bottom;display:inline-block}.more-tags{display:inline}.submeta{padding-top:.75rem}.gallery-lightbox__item--endslate .submeta{display:none}.submeta hr{border:0;margin:0 0 .375rem;border-top:.0625rem dotted #dcdcdc}.submeta .submeta__tone{float:left;margin-right:.625rem}.submeta .keyword-list{margin-bottom:1.125rem}.content--liveblog .submeta{padding-top:1.5rem}.submeta .submeta__share{float:left}.submeta .submeta__syndication{display:none;padding-top:.375rem;display:inline-block;font-size:.75rem;line-height:1rem;font-family:"Guardian Text Sans Web","Helvetica Neue",Helvetica,Arial,"Lucida Grande",sans-serif;height:2rem;float:right;line-height:.9375rem;margin-bottom:0}.submeta__head{font-size:.75rem;line-height:1rem;font-family:"Guardian Text Sans Web","Helvetica Neue",Helvetica,Arial,"Lucida Grande",sans-serif;color:#767676;padding:.25rem 0 .75rem;float:left;margin-right:.625rem}.submeta__share{margin-bottom:.375rem;float:left;margin-right:.625rem;margin-bottom:0}.submeta__save-for-later{display:none;float:left}.submeta__jump-to-comments{height:2rem;line-height:2rem}.submeta__jump-to-comments .inline-icon{position:relative}.submeta__jump-to-comments .inline-icon svg{height:1rem;width:1rem;position:absolute;top:0;left:0}.submeta__jump-to-comments .submeta__jump-to-comments-text{padding-left:1.25rem}.submeta .submeta__jump-to-comments-line{margin-top:1.125rem}.guardian-logo-footer{margin-top:.5625rem;float:right;line-height:0}.l-footer{padding:0;background:#484848}.l-footer .hide-in-footer{display:none!important}.l-footer .global-navigation__section:nth-of-type(2) .global-navigation__title{border-top:0}.js-off .l-footer .navigation-container--collapsed{height:auto}.js-off .l-footer .navigation__expandable{display:block}.js-off .l-footer .navigation__inner{display:none}.l-footer .control__info{display:inline-block}.site-message--footer{position:relative;z-index:1;background-color:#196795;border-bottom:.0625rem solid #fff}.site-message--footer .site-message__inner{background-color:#005689}.l-footer__primary{position:relative;overflow:hidden;background:#196795}.l-footer__secondary{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;font-size:.75rem;line-height:1rem;font-family:"Guardian Text Sans Web","Helvetica Neue",Helvetica,Arial,"Lucida Grande",sans-serif;padding-right:.625rem;padding-left:.625rem;padding-right:1.25rem;padding-left:1.25rem}.l-footer__secondary,.l-footer__secondary a{color:#dcdcdc}.colophon{padding-top:1.5rem;padding-bottom:.375rem}.colophon__list{f


D12GraphicsCommandList.Get()->Close().Assert();

        // Execute the command list to perform the copy
        fixed (ID3D12GraphicsCommandList** d3D12GraphicsCommandList = this.d3D12GraphicsCommandList)
        {
            this.d3D12CommandQueue.Get()->ExecuteCommandLists(1, (ID3D12CommandList**)d3D12GraphicsCommandList);
        }

        // Increment the fence value and signal the fence. Just like with normal dispatches,
        // the increment must be done after executing the command list and before signaling.
        ulong updatedFenceValue = ++this.nextD3D12FenceValue;

        this.d3D12CommandQueue.Get()->Signal(this.d3D12Fence.Get(), updatedFenceValue).Assert();

        // Present the new frame
        this.dxgiSwapChain3.Get()->Present(SyncInterval: this.syncInterval, 0).Assert();

        if (updatedFenceValue > this.d3D12Fence.Get()->GetCompletedValue())
        {
            this.d3D12Fence.Get()->SetEventOnCompletion(updatedFenceValue, default).Assert();
        }
    }

    /// <inheritdoc/>
    private unsafe partial void OnGetDynamicResolutionManager(out DynamicResolutionManager resolutionManager)
    {
        using ComPtr<IDXGIFactory6> dxgiFactory6 = default;

        DeviceHelper.CreateDXGIFactory6(dxgiFactory6.GetAddressOf());

        using ComPtr<IDXGIAdapter> dxgiAdapter = default;

        dxgiFactory6.Get()->EnumAdapters(0, dxgiAdapter.GetAddressOf()).Assert();

        int targetFramerate = dxgiAdapter.Get()->GetCompositionRefreshRate(DXGI_FORMAT.DXGI_FORMAT_R8G8B8A8_UNORM);

        resolutionManager = new DynamicResolutionManager(targetFramerate);
    }

    /// <inheritdoc/>
    protected override void DangerousOnDispose()
    {
        static void OnDisposeOnDispatcherQueueThread(SwapChainManager<TOwner> @this)
        {
            // Even while rendering is still running, we need to properly release all implicit references
            // that have been added when connecting the swap chain panel that was used. To do that, the
            // same ISwapChainPanelNative::SetSwapChain API has to be called, but passing null as the
            // target swap chain. This is handled correctly in the implementation, and all the additional
            // references to the swap chain we passed during initialization will be dropped. Once that
            // is done, we can then dispose our reference to the underlying swap chain panel for the control.
            // This API has to be called on the UI thread, and it ca


EG card, high)", .addressBlockName = "SH1", .baseAddress = 0x0A180000, .size =      0x10, .readFn = SH1BusRead, .writeFn = SH1BusWrite, .bgColorFn = MainBusBgColor, .paramsFn = nullptr, .hoverFn = nullptr },
        { .name = "MPEG card ROM",                   .addressBlockName = "SH1", .baseAddress = 0x0E000000, .size =   0x80000, .readFn = SH1BusRead, .writeFn = SH1BusWrite, .bgColorFn = MainBusBgColor, .paramsFn = nullptr, .hoverFn = nullptr },
        { .name = "SH1 on-chip RAM",                 .addressBlockName = "SH1", .baseAddress = 0x0F000000, .size =    0x1000, .readFn = SH1BusRead, .writeFn = SH1BusWrite, .bgColorFn = MainBusBgColor, .paramsFn = nullptr, .hoverFn = nullptr },
    };

    inline constexpr RegionGroup kRegionGroups[] = {
        { .name = "Main address space", .regions = kMainRegions },
        { .name = "Master SH-2",        .regions = kMSH2Regions },
        { .name = "Slave SH-2",         .regions = kSSH2Regions },
        { .name = "CD block SH-1",      .regions = kSH1Regions  },
    };
    // clang-format on

} // namespace regions

} // namespace app::ui::mem_view
#include "control_pad_config_view.hpp"

namespace app::ui {

ControlPadConfigView::ControlPadConfigView(SharedContext &context)
    : SettingsViewBase(context)
    , m_inputCaptureWidget(context, m_unboundActionsWidget)
    , m_unboundActionsWidget(context) {}

void ControlPadConfigView::Display(Settings::Input::Port::ControlPad &controllerSettings, uint32 portIndex) {
    auto &binds = controllerSettings.binds;

    if (ImGui::Button("Restore defaults")) {
        m_unboundActionsWidget.Capture(m_context.settings.ResetBinds(binds, true));
        MakeDirty();
    }
    ImGui::SameLine();
    if (ImGui::Button("Clear all")) {
        m_unboundActionsWidget.Capture(m_context.settings.ResetBinds(binds, false));
        MakeDirty();
    }

    ImGui::TextUnformatted("Left-click a button to assign a hotkey. Right-click to clear.");
    m_unboundActionsWidget.Display();
    if (ImGui::BeginTable("hotkeys", 1 + input::kNumBindsPerInput,
                          ImGuiTableFlags_SizingStretchProp | ImGuiTableFlags_ScrollY)) {
        ImGui::TableSetupColumn("Button", ImGuiTableColumnFlags_WidthFixed, 70.0f * m_context.displayScale);
        for (size_t i = 0; i < input::kNumBindsPerInput; i++) {
            ImGui::TableSetupColumn(fmt::format("Hotkey {}", i + 1).c_str(), ImGuiTableColumnFlags_WidthStretch, 1.0f);
        }
        ImGui::TableHeadersRow();

        auto drawRow = [&](input::InputBind &bind) {
            ImGui::TableNextRow();
            if (ImGui::TableNextColumn()) {
                ImGui::AlignTextToFramePadding();
                ImGui::TextUnformatted(bind.action.name);
            }
            for (uint32 i = 0; i < input::kNumBindsPerInput; i++) {
                if (ImGui::TableNextColumn()) {
                    m_inputCaptureWidget.DrawInputBindButton(bind, i, &m_context.controlPadInputs[portIndex]);
                }
            }
        };

        drawRow(binds.a);
        drawRow(binds.b);
        drawRow(binds.c);
        drawRow(binds.x);
        drawRow(bind


00401CC0 8FA20030 */  lw    $v0, 0x30($sp)
/* 001CC4 00401CC4 00530019 */  multu $v0, $s3
/* 001CC8 00401CC8 00001010 */  mfhi  $v0
/* 001CCC 00401CCC 0C100024 */  jal   foo
/* 001CD0 00401CD0 00022102 */   srl   $a0, $v0, 4
/* 001CD4 00401CD4 8FA30030 */  lw    $v1, 0x30($sp)
/* 001CD8 00401CD8 3C02B216 */  lui   $v0, 0xb216
/* 001CDC 00401CDC 344242C9 */  ori   $v0, $v0, 0x42c9
/* 001CE0 00401CE0 00620019 */  multu $v1, $v0
/* 001CE4 00401CE4 00001010 */  mfhi  $v0
/* 001CE8 00401CE8 0C100024 */  jal   foo
/* 001CEC 00401CEC 00022102 */   srl   $a0, $v0, 4
/* 001CF0 00401CF0 8FA20030 */  lw    $v0, 0x30($sp)
/* 001CF4 00401CF4 00510019 */  multu $v0, $s1
/* 001CF8 00401CF8 3C1051EB */  lui   $s0, 0x51eb
/* 001CFC 00401CFC 00001010 */  mfhi  $v0
/* 001D00 00401D00 0C100024 */  jal   foo
/* 001D04 00401D04 00022102 */   srl   $a0, $v0, 4
/* 001D08 00401D08 8FA20030 */  lw    $v0, 0x30($sp)
/* 001D0C 00401D0C 3610851F */  ori   $s0, $s0, 0x851f
/* 001D10 00401D10 00500019 */  multu $v0, $s0
/* 001D14 00401D14 00001010 */  mfhi  $v0
/* 001D18 00401D18 0C100024 */  jal   foo
/* 001D1C 00401D1C 000220C2 */   srl   $a0, $v0, 3
/* 001D20 00401D20 8FA20030 */  lw    $v0, 0x30($sp)
/* 001D24 00401D24 00540019 */  multu $v0, $s4
/* 001D28 00401D28 00001010 */  mfhi  $v0
/* 001D2C 00401D2C 0C100024 */  jal   foo
/* 001D30 00401D30 000220C2 */   srl   $a0, $v0, 3
/* 001D34 00401D34 3C042F68 */  lui   $a0, 0x2f68
/* 001D38 00401D38 8FA20030 */  lw    $v0, 0x30($sp)
/* 001D3C 00401D3C 34844BDB */  ori   $a0, $a0, 0x4bdb
/* 001D40 00401D40 00440019 */  multu $v0, $a0
/* 001D44 00401D44 00002010 */  mfhi  $a0
/* 001D48 00401D48 00441023 */  subu  $v0, $v0, $a0
/* 001D4C 00401D4C 00021042 */  srl   $v0, $v0, 1
/* 001D50 00401D50 00822021 */  addu  $a0, $a0, $v0
/* 001D54 00401D54 0C100024 */


S4.E30.m1.2.2.1.1.2.2.2.1"></times><ci id="S4.E30.m1.2.2.1.1.2.2.2.2a.cmml" xref="S4.E30.m1.2.2.1.1.2.2.2.2"><mtext id="S4.E30.m1.2.2.1.1.2.2.2.2.cmml" xref="S4.E30.m1.2.2.1.1.2.2.2.2">as </mtext></ci><ci id="S4.E30.m1.2.2.1.1.2.2.2.3.cmml" xref="S4.E30.m1.2.2.1.1.2.2.2.3">𝑚</ci></apply><infinity id="S4.E30.m1.2.2.1.1.2.2.3.cmml" xref="S4.E30.m1.2.2.1.1.2.2.3"></infinity></apply></apply></annotation-xml><annotation encoding="application/x-tex" id="S4.E30.m1.2c">\left\lvert{\mathcal{L}}(\mathbf{P},P_{E},\mathbf{m}^{n},\bm{\mu}^{n})-{%
\mathcal{L}}(\mathbf{P}^{m},P^{m}_{E},{\mathbf{m}}^{n},{\bm{\mu}}^{n})\right%
\rvert\to 0,\quad\text{as }m\to\infty,</annotation><annotation encoding="application/x-llamapun" id="S4.E30.m1.2d">| caligraphic_L ( bold_P , italic_P start_POSTSUBSCRIPT italic_E end_POSTSUBSCRIPT , bold_m start_POSTSUPERSCRIPT italic_n end_POSTSUPERSCRIPT , bold_italic_μ start_POSTSUPERSCRIPT italic_n end_POSTSUPERSCRIPT ) - caligraphic_L ( bold_P start_POSTSUPERSCRIPT italic_m end_POSTSUPERSCRIPT , italic_P start_POSTSUPERSCRIPT italic_m end_POSTSUPERSCRIPT start_POSTSUBSCRIPT italic_E end_POSTSUBSCRIPT , bold_m start_POSTSUPERSCRIPT italic_n end_POSTSUPERSCRIPT , bold_italic_μ start_POSTSUPERSCRIPT italic_n end_POSTSUPERSCRIPT ) | → 0 , as italic_m → ∞ ,</annotation></semantics></math>

uniformly over <math alttext="n\geq 1" class="ltx_Math" display="inline" id="S4.SS3.11.p11.1.m1.1"><semantics id="S4.SS3.11.p11.1.m1.1a"><mrow id="S4.SS3.11.p11.1.m1.1.1" xref="S4.SS3.11.p11.1.m1.1.1.cmml"><mi id="S4.SS3.11.p11.1.m1.1.1.2" xref="S4.SS3.11.p11.1.m1.1.1.2.cmml">n</mi><mo id="S4.SS3.11.p11.1.m1.1.1.1" xref="S4.SS3.11.p11.1.m1.1.1.1.cmml">≥</mo><mn id="S4.SS3.11.p11.1.m1.1.1.3" xref="S4.SS3.11.p


void QtMaterialAvatar::paintEvent(QPaintEvent *event)
{
    Q_UNUSED(event)

    Q_D(QtMaterialAvatar);

    QPainter painter(this);
    painter.setRenderHint(QPainter::Antialiasing);

    QRect r = rect();
    const qreal hs = d->size/2;

    if (!isEnabled())
    {
        QBrush brush;
        brush.setStyle(Qt::SolidPattern);
        brush.setColor(QtMaterialStyle::instance().themeColor("disabled"));
        painter.setPen(Qt::NoPen);
        painter.setBrush(brush);
        painter.drawEllipse(QRectF((width()-d->size)/2, (height()-d->size)/2,
                                   d->size, d->size));
        return;
    }

    if (Material::ImageAvatar != d->type)
    {
        QBrush brush;
        brush.setStyle(Qt::SolidPattern);
        brush.setColor(backgroundColor());
        painter.setPen(Qt::NoPen);
        painter.setBrush(brush);
        painter.drawEllipse(QRectF((width()-d->size)/2, (height()-d->size)/2,
                                   d->size, d->size));
    }

    switch (d->type)
    {
    case Material::ImageAvatar:
    {
        QPainterPath path;
        path.addEllipse(width()/2-hs, height()/2-hs, d->size, d->size);
        painter.setClipPath(path);

        painter.drawPixmap(QRect(width()/2-hs, height()/2-hs, d->size, d->size),
                           d->pixmap);
        break;
    }
    case Material::IconAvatar:
    {
        QRect iconGeometry((width()-hs)/2, (height()-hs)/2, hs, hs);
        QPixmap pixmap = d->icon.pixmap(hs, hs);
        QPainter icon(&pixmap);
        icon.setCompositionMode(QPainter::CompositionMode_SourceIn);
        icon.fillRect(pixmap.rect(), textColor());
        painter.drawPixmap(iconGeometry, pixmap);
        break;
    }
    case Material::LetterAvatar:
    {
        painter.setPen(textColor());
        painter.setBrush(Qt::NoBrush);
        painter.drawText(r, Qt::AlignCenter, QString(d->letter));
        break;
    }
    default:
        break;
    }
}
#include "qtmaterialbadge.h"
#include "qtmaterialbadge_p.h"
#include <QPainter>
#include "lib/qtmaterialstyle.h"

/*!
 *  \class QtMaterialBadgePrivate
 *  \internal
 */

/*!
 *  \internal
 */
QtMaterialBadgePrivate::QtMaterialBadgePrivate(QtMaterialBadge *q)
    : q_ptr(q)
{
}

/*!
 *  \internal
 */
QtMaterialBadgePrivate::~QtMaterialBadgePrivate()
{
}

/*!
 *  \internal
 */
void QtMaterialBadgePrivate::init()
{
    Q_Q(QtMaterialBadge);

    x              = 0;
    y              = 0;
    padding        = 10;
    useThemeColors = true;

    q->setAttribute(Qt::WA_TransparentForMouseEvents);

    QFont font(q->font());
    font.setPointSizeF(10);
    font.setStyleName("Bold");
    q->setFont(font);

    q->setText("+1");
}

/*!
 *  \class QtMaterialBadge
 */

QtMaterialBadge::QtMaterialBadge(QWidget *parent)
    : QtMaterialOverlayWidget(parent),
      d_ptr(new QtMaterialBadgePrivate(this))
{
    d_func()->init();
}

QtMaterialBadge::QtMaterialBadge(const QIcon &icon, QWidget *parent)
    : QtMaterialOverlayWidget(


urrent_time + cfg->vcfg_common.max_cache_entry_age;

	if (!ast_strlen_zero(cache_control_header)) {
		char *str_max_age;

		str_max_age = strstr(cache_control_header, "s-maxage");
		if (!str_max_age) {
			str_max_age = strstr(cache_control_header, "max-age");
		}

		if (str_max_age) {
			unsigned int m;
			char *equal = strchr(str_max_age, '=');
			if (equal && !ast_str_to_uint(equal + 1, &m)) {
				max_age_hdr = current_time + m;
			}
		}
	}

	if (!ast_strlen_zero(expires_header)) {
		struct ast_tm expires_time;

		ast_strptime(expires_header, "%a, %d %b %Y %T %z", &expires_time);
		expires_time.tm_isdst = -1;
		expires_hdr = ast_mktime(&expires_time, "GMT").tv_sec;
	}

	notAfter = X509_get_notAfter(cert->xcert);
	cert_expires = crypto_asn_time_as_time_t(notAfter);

	/*
	 * ATIS-1000074 says:
	 * The STI-VS shall implement the cache behavior described in
	 * [Ref 10]. If the HTTP response does not include any recognized
	 * caching directives or indicates caching for less than 24 hours,
	 * then the STI-VS should cache the HTTP response for 24 hours.
	 *
	 * Basically, they're saying "cache for 24 hours unless the HTTP
	 * response says to cache for longer."  Instead of the fixed 24
	 * hour minumum, however, we'll use max_cache_entry_age instead.
	 *
	 * We got all the possible values of expires so let's find the
	 * highest value greater than the configured max_cache_entry_age.
	 */

	/* The default */
	expires = config_expires;

	if (max_age_hdr > expires) {
		expires = max_age_hdr;
	}

	if (expires_hdr > expires) {
		expires = expires_hdr;
	}

	/*
	 * However...  Don't cache for longer than the
	 * certificate is actually valid.
	 */
	if (cert_expires && cert_expires < expires) {
		expires = cert_expires;
	}

	snprintf(time_buf, sizeof(time_buf), "%ld", expires);

	rc = ast_db_put(cert->hash_family, "expiration", time_buf);
	if (rc == 0) {
		strcpy(cert->expiration, time_buf); /* safe */
	}

	return rc;
}

static int add_cert_key_to_astdb(struct ast_stir_shaken_vs_ctx *cert,
	const char *cache_control_hdr, const char *expires_hdr)
{
	int rc = 0;

	rc = ast_db_put(cert->url_family, cert->public_url, cert->hash);
	if (rc) {
		return rc;
	}
	rc = ast_db_put(cert->hash_family, "path", cert->filename);
	if (rc) {
		ast_db_del(cert->url_family, cert->public_url);
		return rc;
	}

	rc = add_cert_expiration_to_astdb(cert, cache_control_hdr, expires_hdr);
	if (rc) {
		ast_db_del(cert->url_family, cert->public_url);
		ast_db_del(cert->hash_family, "path");
	}

	return rc;
}

static int is_cert_cache_entry_expired(char *expiration)
{
	struct timeval current_time = ast_tvnow();
	struct timeval expires = { .tv_sec = 0, .tv_usec = 0 };
	int res = 0;
	SCOPE_ENTER(3, "Checking for cache expiration: %s\n", expiration);

	if (ast_strlen_zero(expiration)) {
		SCOPE_EXIT_RTN_VALUE(1, "No expiration date provided\n");
	}

	if (ast_str_to_ulong(expiration, (unsigned long *)&expires.tv_sec)) {
		SCOPE_EXIT_RTN_VALUE(1, "Couldn't convert expiration string '%s' to ulong",
			expiration);
	}
	ast_trace(2, "Expiration comparison: exp: %" PRIu64 "  curr: %" PRIu64 "  Diff: %" PRIu64 ".\n",
		expires.tv_sec, current_time.tv_sec, expires.tv_sec - current_time.tv_sec);

	res = (ast_tvcmp(current_time, expires) == -1 ? 0 : 1);
	SCOPE_EXIT_RTN_VALUE(res , "entry was %sexpired\n", res ? "" : "not ");
}

#define ASN1_TAG_TNAUTH_SPC 0
#define ASN1_TAG_TNAUTH_TN_RANGE 1
#define ASN1_TAG_TNAUTH_TN 2

#define IS_GET_OBJ_ERR(ret) (ret & 0x80)

static enum ast_stir_shaken_vs_response_code
	check_tn_auth_list(struct ast_stir_shaken_vs_ctx * ctx)
{
	ASN1_OCTET_STRING *tn_exten;
	const unsigned char* octet_str_data = NULL;
	long xlen;
	int tag, xclass;
	int ret;
	SCOPE_ENTER(3, "%s: Checking TNAuthList in cert '%s'\n", ctx->tag, ctx->public_url);

	tn_exten = crypto_get_cert_extension_data(ctx->xcert, get_tn_auth_nid(), NULL);
	if (!tn_exten) {
		SCOPE_EXIT_LOG_RTN_VALUE(AST_STIR_SHAKEN_VS_CERT_NO_TN_AUTH_EXT,
			LOG_ERROR, "%s: Cert '%s' doesn't have a TNAuthList extension\n",
			ctx->tag, ctx->public_url);
	}
	octet_str_data = tn_exten->data;

	/* The first call to ASN1_get_object should return a SEQUENCE */
	ret = ASN1_get_object(&octet_str_data, &xlen, &tag, &xclass, tn_exten->length);
	if (IS_GET_OBJ_ERR(ret)) {
		crypto_log_openssl(LOG_ERROR, "%s: Cert '%s' has malformed TNAuthList extension\n",
			ctx->tag, ctx->public_url);
		SCOPE_EXIT_RTN_VALUE(AST_STIR_SHAKEN_VS_CERT_NO_TN_AUTH_EXT);
	}

	if (ret != V_ASN1_CONSTRUCTED || tag != V_ASN1_SEQUENCE)


: center;
}
.sk-spinner-three-bounce .sk-bounce1,
.sk-spinner-three-bounce .sk-bounce2,
.sk-spinner-three-bounce .sk-bounce3{
    display: inline-block;
    width: 18px;
    height: 18px;
    background-color: #1ab394;
    margin-right: 5px;
    border-radius: 50%;
    -webkit-animation: sk-threeBounceDelay 1.4s infinite ease-in-out;
    -moz-animation:  sk-threeBounceDelay 1.4s infinite ease-in-out;
    -o-animation:  sk-threeBounceDelay 1.4s infinite ease-in-out;
    animation:  sk-threeBounceDelay 1.4s infinite ease-in-out;
}
.sk-spinner-three-bounce .sk-bounce1{
    animation-delay: -0.32s;
}
.sk-spinner-three-bounce .sk-bounce2{
    animation-delay:-0.16s;
}
@keyframes sk-threeBounceDelay{
    0%,80%,100%{
        transform:scale(0);
    }
    40%{
        transform:scale(1);
    }
}

/*旋转加载中效果2*/
.sk-spinner-circle{
    position: relative;
    margin: 0 auto;
    width: 42px;
    height: 42px;
}
.sk-spinner-circle .sk-circle{
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
}
.sk-spinner-circle .sk-circle:before{
    content: "";
    display: block;
    margin: 0 auto;
    width: 20%;
    height: 20%;
    background-color: #1ab394;
    border-radius: 50%;
    animation:sk-circleBounceDelay 1.2s infinite ease-in-out;
}
.sk-spinner-circle .sk-circle2{
    transform:rotate(30deg);
}
.sk-spinner-circle .sk-circle2:before{
    -webkit-animation-delay: -1.1s;
    -moz-animation-delay: -1.1s;
    -o-animation-delay: -1.1s;
    animation-delay: -1.1s;
}
.sk-spinner-circle .sk-circle3{
    transform:rotate(60deg);
}
.sk-spinner-circle .sk-circle3:before{
    -webkit-animation-delay: -1s;
    -moz-animation-delay: -1s;
    -o-animation-delay: -1s;
    animation-delay: -1s;
}
.sk-spinner-circle .sk-circle4{
    transform:rotate(90deg);
}
.sk-spinner-circle .sk-circle4:before{
    -webkit-animation-delay: -0.9s;
    -moz-animation-delay:-0.9s;
    -o-animation-delay: -0.9s;
    animation-delay: -0.9s;
}
.sk-spinner-circle .sk-circle5{
    transform:rotate(120deg);
}
.sk-spinner-circle .sk-circle5:before{
    -webkit-animation-delay: -0.8s;
    -moz-animation-delay: -0.8s;
    -o-animation-delay: -0.8s;
    animation-delay: -0.8s;
}
.sk-spinner-circle .sk-circle6{
    transform:rotate(150deg);
}
.sk-spinner-circle .sk-circle6:before{
    -webkit-animation-delay: -0.7s;
    -moz-animation-delay: -0.7s;
    -o-animation-delay: -0.7s;
    animation-delay: -0.7s;
}
.sk-spinner-circle .sk-circle7{
    transform:rotate(180deg);
}
.sk-


numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
//extern CL_RUNTIME_EXPORT clblasStatus (*clblasiSamax)(size_t N, cl_mem iMax, size_t offiMax, const cl_mem X, size_t offx, int incx, cl_mem scratchBuff, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
//extern CL_RUNTIME_EXPORT clblasStatus (*clblasiZamax)(size_t N, cl_mem iMax, size_t offiMax, const cl_mem X, size_t offx, int incx, cl_mem scratchBuff, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
// This file is part of OpenCV project.
// It is subject to the license terms in the LICENSE file found in the top-level directory
// of this distribution and at http://opencv.org/license.html.
//
// Copyright (C) 2018-2019, Intel Corporation, all rights reserved.
// Third party copyrights are property of their respective owners.

#ifndef OPENCV_DNN_UTILS_INF_ENGINE_HPP
#define OPENCV_DNN_UTILS_INF_ENGINE_HPP

#include "../dnn.hpp"

namespace cv { namespace dnn {
CV__DNN_INLINE_NS_BEGIN

/* Values for 'OPENCV_DNN_BACKEND_INFERENCE_ENGINE_TYPE' parameter */
/// @deprecated
#define CV_DNN_BACKEND_INFERENCE_ENGINE_NN_BUILDER_API     "NN_BUILDER"
/// @deprecated
#define CV_DNN_BACKEND_INFERENCE_ENGINE_NGRAPH             "NGRAPH"

/** @brief Returns Inference Engine internal backend API.
 *
 * See values of `CV_DNN_BACKEND_INFERENCE_ENGINE_*` macros.
 *
 * `OPENCV_DNN_BACKEND_INFERENCE_ENGINE_TYPE` runtime parameter (environment variable) is ignored since 4.6.0.
 *
 * @deprecated
 */
CV_EXPORTS_W cv::String getInferenceEngineBackendType();

/** @brief Specify Inference Engine internal backend API.
 *
 * See values of `CV_DNN_BACKEND_INFERENCE_ENGINE_*` macros.
 *
 * @returns previous value of internal backend API
 *
 * @deprecated
 */
CV_EXPORTS_W cv::String setInferenceEngineBackendType(const cv::String& newBackendType);

/** @brief Release a Myriad device (binded by OpenCV).
 *
 * Single Myriad device cannot be shared across multiple processes which uses
 * Inference Engine's Myriad plugin.
 */
CV_EXPORTS_W void resetMyriadDevice();

/* Values for 'OPENCV_DNN_IE_VPU_TYPE' parameter */
#define CV_DNN_INFERENCE_ENGINE_VPU_TYPE_UNSPECIFIED ""
/// Intel(R) Movidius(TM) Neural Compute Stick, NCS (USB 03e7:2150), Myriad2 (https://software.intel.com/en-us/movidius-ncs)
#define CV_DNN_INFERENCE_ENGINE_VPU_TYPE_MYRIAD_2 "Myriad2"
/// Intel(R) Neural Compute Stick 2, NCS2 (USB 03e7:2485), MyriadX (https://software.intel.com/ru-ru/neural-compute-stick)
#define CV_DNN_INFERENCE_ENGINE_VPU_TYPE_MYRIAD_X "MyriadX"
#define CV_DNN_INFERENCE_ENGINE_CPU_TYPE_ARM_COMPUTE "ARM_COMPUTE"
#define CV_DNN_INFERENCE_ENGINE_CPU_TYPE_X86


ave, original_jump, original_apply = Nes.have, Nes.jump, Nes.apply

    Nes.have = function()
      return true
    end
    Nes.jump = function()
      return false
    end
    Nes.apply = function()
      return true
    end

    assert.is_true(Sidekick.nes_jump_or_apply())

    Nes.have = function()
      return false
    end
    Nes.jump = function()
      return true
    end
    Nes.apply = function()
      return false
    end

    assert.is_false(Sidekick.nes_jump_or_apply())

    Nes.have, Nes.jump, Nes.apply = original_have, original_jump, original_apply
  end)
end)


 *mut gbm_bo,
                             mut data: *mut libc::c_void) {
    let mut id: uint32_t = data as uintptr_t as uint32_t;
    if id != 0 {
        let mut gbm: *mut gbm_device = gbm_bo_get_device(bo);
        drmModeRmFB(gbm_device_get_fd(gbm), id);
    };
}
#[no_mangle]
pub unsafe extern "C" fn get_fb_for_bo(mut bo: *mut gbm_bo,
                                       mut drm_format: uint32_t,
                                       mut with_modifiers: bool) -> uint32_t {
    let mut id: uint32_t = gbm_bo_get_user_data(bo) as uintptr_t as uint32_t;
    if id != 0 { return id }
    let mut gbm: *mut gbm_device = gbm_bo_get_device(bo);
    let mut fd: libc::c_int = gbm_device_get_fd(gbm);
    let mut width: uint32_t = gbm_bo_get_width(bo);
    let mut height: uint32_t = gbm_bo_get_height(bo);
    let mut handles: [uint32_t; 4] = [0i32 as uint32_t, 0, 0, 0];
    let mut strides: [uint32_t; 4] = [0i32 as uint32_t, 0, 0, 0];
    let mut offsets: [uint32_t; 4] = [0i32 as uint32_t, 0, 0, 0];
    let mut modifiers: [uint64_t; 4] = [0i32 as uint64_t, 0, 0, 0];
    let mut i: libc::c_int = 0i32;
    while i < gbm_bo_get_plane_count(bo) {
        handles[i as usize] = gbm_bo_get_handle_for_plane(bo, i).u32_0;
        strides[i as usize] = gbm_bo_get_stride_for_plane(bo, i);
        offsets[i as usize] = gbm_bo_get_offset(bo, i);
        // KMS requires all BO planes to have the same modifier
        modifiers[i as usize] = gbm_bo_get_modifier(bo);
        i += 1
    }
    if with_modifiers as libc::c_int != 0 &&
           gbm_bo_get_modifier(bo) as libc::c_ulonglong !=
               (0i32 as __u64) << 56i32 |
                   (1u64 << 56i32).wrapping_sub(1i32 as libc::c_ulonglong) &
                       0xffffffffffffffu64 {
        if drmModeAddFB2WithModifiers(fd, width, height, drm_format,
                                      handles.as_mut_ptr() as *const uint32_t,
                                      strides.as_mut_ptr() as *const uint32_t,
                                      offsets.as_mut_ptr() as *const uint32_t,
                                      modifiers.as_mut_ptr() as
                                          *const uint64_t, &mut id,
                                      (1i32 << 1i32) as uint32_t) != 0 {
            _wlr_log(WLR_ERROR,
                     b"[%s:%d] Unable to add DRM framebuffer: %s\x00" as
                         *const u8 as *const libc::c_char,
                     b"../backend/drm/util.c\x00" as *const u8 as
                         *const libc::c_char, 209i32,
                     strerror(*__errno_location()));
        }
    } else if drmModeAddFB2(fd, width, height, drm_format,
                            handles.as_mut_ptr() as *const uint32_t,
                            strides.as_mut_ptr() as *const uint32_t,