87.0 26.5\nL 84.1 26.5\nL 84.1 26.1\nQ 84.9 25.5, 85.4 25.1\nQ 85.9 24.7, 86.1 24.3\nQ 86.3 23.9, 86.3 23.6\nQ 86.3 23.2, 86.1 22.9\nQ 85.9 22.7, 85.6 22.7\nQ 85.2 22.7, 85.0 22.8\nQ 84.8 23.0, 84.6 23.3\nL 84.1 23.1\n' fill='#191919'/>\n<path class='atom-6' d='M 91.6 45.4\nL 90.6 43.7\nL 90.6 43.7\nL 89.9 43.7\nL 89.9 45.4\nL 89.3 45.4\nL 89.3 41.2\nL 90.6 41.2\nQ 91.3 41.2, 91.7 41.5\nQ 92.0 41.8, 92.0 42.4\nQ 92.0 42.9, 91.8 43.2\nQ 91.6 43.5, 91.2 43.6\nL 92.2 45.4\nL 91.6 45.4\nM 89.9 43.2\nL 90.6 43.2\nQ 91.0 43.2, 91.2 43.0\nQ 91.4 42.8, 91.4 42.4\nQ 91.4 42.0, 91.2 41.9\nQ 91.0 41.7, 90.6 41.7\nL 89.9 41.7\nL 89.9 43.2\n' fill='#191919'/>\n<path class='atom-6' d='M 92.9 44.9\nL 93.8 44.9\nL 93.8 41.8\nL 92.8 42.1\nL 92.6 41.7\nL 93.9 41.2\nL 94.4 41.2\nL 94.4 44.9\nL 95.2 44.9\nL 95.2 45.4\nL 92.9 45.4\nL 92.9 44.9\n' fill='#191919'/>\n<path class='atom-9' d='M 85.2 65.1\nQ 85.4 65.1, 85.7 65.0\nL 85.8 65.5\nQ 85.5 65.6, 85.2 65.6\nQ 84.7 65.6, 84.3 65.3\nQ 84.0 64.9, 83.9 64.3\nQ 83.1 64.2, 82.7 63.7\nQ 82.3 63.1, 82.3 62.2\nQ 82.3 61.1, 82.8 60.6\nQ 83.3 60.0, 84.2 60.0\nQ 85.2 60.0, 85.7 60.6\nQ 86.2 61.1, 86.2 62.2\nQ 86.2 63.2, 85.7 63.7\nQ 85.3 64.3, 84.4 64.4\nQ 84.4 64.7, 84.7 64.9\nQ 84.9 65.1, 85.2 65.1\nM 82.9 62.2\nQ 82.9 63.0, 83.2 63.5\nQ 83.6 63.9, 84.2 63.9\nQ 84.9 63.9, 85.2 63.5\nQ 85.6 63.0, 85.6 62.2\nQ 85.6 61.3, 85.2 60.9\nQ 84.9 60.5, 84.2 60.5\nQ 83.6 60.5, 83.2 60.9\nQ 82.9 61.3, 82.9 62.2\n' fill='#191919'/>\n<path class='atom-12' d='M 79.2 83.4\nL 78.2 81.6\nL 78.2 81.6\nL 77.5 81.6\nL 77.5 83.4\nL 76.9 83.4\nL 76.9 79.1\nL 78.2 79.1\n


: ItemRecyclerBinding) : RecyclerView.ViewHolder(binding.root) {
        var mMemo:RoomMemo? = null
        init {
            binding.buttonDelete.setOnClickListener {
                helper?.roomMemoDao()?.delete(mMemo!!)
                listData.remove(mMemo)
                notifyDataSetChanged()
            }
            // 수정 기능 추가
            binding.textContent.setOnClickListener {
                mainActivity?.setUpdate(mMemo!!)
            }
        }
        fun setMemo(memo:RoomMemo) {
            binding.textNo.text = "${memo.no}"
            binding.textContent.text = memo.content
            val sdf = SimpleDateFormat("yyyy/MM/dd hh:mm")
            // 날짜 포맷은 SimpleDateFormat으로 설정합니다.
            binding.textDatetime.text = "${sdf.format(memo.datetime)}"

            this.mMemo = memo
        }
    }
}

package com.example.permission

import android.Manifest
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.widget.Toast
import androidx.activity.result.ActivityResultLauncher
import androidx.activity.result.contract.ActivityResultContracts
import com.example.permission.databinding.ActivityMainBinding

class MainActivity : AppCompatActivity() {

    val binding by lazy {ActivityMainBinding.inflate(layoutInflater)}

    lateinit var activityResult:ActivityResultLauncher<String>

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(binding.root)

        activityResult = registerForActivityResult(ActivityResultContracts.RequestPermission()) { isGranted ->
            if (isGranted) {
                startProcess()
            } else {
                finish()
            }
        }

        binding.btnCamera.setOnClickListener {
            activityResult.launch(Manifest.permission.CAMERA)
        }
    }

    fun startProcess() {
        Toast.makeText(this, "카메라를 실행합니다.", Toast.LENGTH_LONG).show()
    }
}
package kr.co.hanbit.miniquiz4_2_2

import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import kr.co.hanbit.miniquiz4_2_2.databinding.ActivityMainBinding

class MainActivity : AppCompatActivity() {

    val binding by lazy { ActivityMainBinding.inflate(layoutInflater) }

    var apple = false
    var banana = false
    var orange = false

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(binding.root)

        binding.checkApple.setOnCheckedChangeListener { buttonView, isChecked ->
            apple = isChecked
            printCheckedItems()
        }
        binding.checkBanana.setOnCheckedChangeListener { buttonView, isChecked ->
            banana = isChecked
            printCheckedItems()
        }
        binding.checkOrange.setOnCheckedChangeListener { buttonView, isChecked ->
            orange = isChecked
            printCheckedItems()
        }
    }

    fun printCheckedItems() {
        var result = ""
        if (apple) result = " 사과"

        if (banana) {
            if (result.isNotEmpty()) result += "와"
            result += " 바나나"
        }
        if (orange) {
            if (result.isNotEmpty()) result += "와"
            result += " 오렌지"
        }
        binding.textView.text = "${result}가 선택되었습니다."
    }

}
package com.example.controlflow3

import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.util.Log

class MainActivity : AppCompatActivity() {

    override


	}
		glogBody("Request Body", data)
		r.body = bytes.NewReader(data)
		r.SetHeader("Content-Type", r.c.content.ContentType)
	default:
		r.err = fmt.Errorf("unknown type used for body: %+v", obj)
	}
	return r
}

// Context adds a context to the request. Contexts are only used for
// timeouts, deadlines, and cancellations.
func (r *Request) Context(ctx context.Context) *Request {
	r.ctx = ctx
	return r
}

// URL returns the current working URL.
func (r *Request) URL() *url.URL {
	p := r.pathPrefix
	if r.tenantSet && len(r.tenant) > 0 {
		p = path.Join(p, "tenants", r.tenant)
	}
	if r.namespaceSet && len(r.namespace) > 0 {
		p = path.Join(p, "namespaces", r.namespace)
	}
	if len(r.resource) != 0 {
		p = path.Join(p, strings.ToLower(r.resource))
	}
	// Join trims trailing slashes, so preserve r.pathPrefix's trailing slash for backwards compatibility if nothing was changed
	if len(r.resourceName) != 0 || len(r.subpath) != 0 || len(r.subresource) != 0 {
		p = path.Join(p, r.resourceName, r.subresource, r.subpath)
	}

	finalURL := &url.URL{}
	if r.c.base != nil {
		*finalURL = *r.c.base
	}
	finalURL.Path = p

	query := url.Values{}
	for key, values := range r.params {
		for _, value := range values {
			query.Add(key, value)
		}
	}

	// timeout is handled specially here.
	if r.timeout != 0 {
		query.Set("timeout", r.timeout.String())
	}
	finalURL.RawQuery = query.Encode()
	return finalURL
}

// finalURLTemplate is similar to URL(), but will make all specific parameter values equal
// - instead of name or namespace, "{name}" and "{namespace}" will be used, and all query
// parameters will be reset. This creates a copy of the url so as not to change the
// underlying object.
func (r Request) finalURLTemplate() url.URL {
	newParams := url.Values{}
	v := []string{"{value}"}
	for k := range r.params {
		newParams[k] = v
	}
	r.params = newParams
	url := r.URL()
	segments := strings.Split(r.URL().Path, "/")
	groupIndex := 0
	index := 0
	if r.URL() != nil && r.c.base != nil && strings.Contains(r.URL().Path, r.c.base.Path) {
		groupIndex += len(strings.Split(r.c.base.Path, "/"))
	}
	if groupIndex >= len(segments) {
		return *url
	}

	const CoreGroupPrefix = "api"
	const NamedGroupPrefix = "apis"
	isCoreGroup := segments[groupIndex] == CoreGroupPrefix
	isNamedGroup := segments[groupIndex] == NamedGroupPrefix
	if isCoreGroup {
		// checking the case of core group with /api/v1/... format
		index = groupIndex + 2
	} else if isNamedGroup {
		// checking the case of named group with /apis/apps/v1/... format
		index = groupIndex + 3
	} else {
		// this should not happen that the only two possibilities are /api... and /apis..., just want to put an
		// outlet here in case more API groups are added in future if ever possible:
		// https://kubernetes.io/docs/concepts/overview/kubernetes-api/#api-groups
		// if a wrong API groups nam


ov    $0x1,%eax
 807b7ec:	49 89 c2             	mov    %rax,%r10
 807b7ef:	48 8d 85 48 f7 ff ff 	lea    -0x8b8(%rbp),%rax
 807b7f6:	48 89 c6             	mov    %rax,%rsi
 807b7f9:	48 8d 85 50 f7 ff ff 	lea    -0x8b0(%rbp),%rax
 807b800:	48 89 c7             	mov    %rax,%rdi
 807b803:	4c 89 d2             	mov    %r10,%rdx
 807b806:	b8 00 00 00 00       	mov    $0x0,%eax
 807b80b:	e8 f0 fb ff ff       	callq  807b400 <parse_asm_operands>
 807b810:	8b 85 48 f7 ff ff    	mov    -0x8b8(%rbp),%eax
 807b816:	89 85 4c f7 ff ff    	mov    %eax,-0x8b4(%rbp)
 807b81c:	48 8b 05 05 27 01 00 	mov    0x12705(%rip),%rax        # 808df28 <_GLOBAL_OFFSET_TABLE_+0x2a8>
 807b823:	8b 00                	mov    (%rax),%eax
 807b825:	83 f8 3a             	cmp    $0x3a,%eax
 807b828:	0f 85 f0 00 00 00    	jne    807b91e <asm_instr+0x21a>
 807b82e:	b8 00 00 00 00       	mov    $0x0,%eax
 807b833:	e8 92 ce fd ff       	callq  80586ca <next>
 807b838:	48 8b 05 e9 26 01 00 	mov    0x126e9(%rip),%rax        # 808df28 <_GLOBAL_OFFSET_TABLE_+0x2a8>
 807b83f:	8b 00                	mov    (%rax),%eax
 807b841:	83 f8 29             	cmp    $0x29,%eax
 807b844:	0f 84 d4 00 00 00    	je     807b91e <asm_instr+0x21a>
 807b84a:	b8 00 00 00 00       	mov    $0x0,%eax
 807b84f:	49 89 c2             	mov    %rax,%r10
 807b852:	48 8d 85 48 f7 ff ff 	lea    -0x8b8(%rbp),%rax
 807b859:	48 89 c6             	mov    %rax,%rsi
 807b85c:	48 8d 85 50 f7 ff ff 	lea    -0x8b0(%rbp),%rax
 807b863:	48 89 c7             	mov    %rax,%rdi
 807b866:	4c 89 d2             	mov    %r10,%rdx
 807b869:	b8 00 00 00 00       	mov    $0x0,%eax
 807b86e:	e8 8d fb ff ff       	callq  807b400 <parse_asm_operands>
 807b873:	48 8b 05 ae 26 01 00 	mov    0x126ae(%rip),%rax        # 808df28 <_GLOBAL_OFFSET_TABLE_+0x2a8>
 807b87a:	8b 00                	mov    (%rax),%eax
 807b87c:	83 f8 3a             	cmp    $0x3a,%eax
 807b87f:	0f 85 99 00 00 00    	jne    807b91e <asm_instr+0x21a>
 807b885:	b8 00 00 00 00       	mov    $0x0,%eax
 807b88a:	e8 3b ce fd ff       	callq  80586ca <next>
 807


local Translations = {
    error = {
        ["failed_notification"] = "فشل",
        ["not_near_veh"] = "أنت لست بالقرب من سيارة",
        ["out_range_veh"] = "أنت بعيد جدًا عن السيارة",
        ["inside_veh"] = "لا يمكنك إصلاح محرك السيارة من الداخل",
        ["healthy_veh"] = "السيارة صحية للغاية وتحتاج إلى أدوات أفضل",
        ["inside_veh_req"] = "يجب أن تكون في مركبة لإصلاحها",
        ["roadside_avail"] = "تتوفر خدمة المساعدة على الطريق ، يمكنك الاتصال بذلك عبر هاتفك!",
        ["no_permission"] = "ليس لديك إذن لإصلاح المركبات",
        ["fix_message"] = "%{message} والآن اذهب إلى المرآب",
        ["veh_damaged"] = "سيارتك تالفة للغاية",
        ["nofix_message_1"] = "نظرت إلى مستوى الزيت الخاص بك وبدا هذا طبيعيًا",
        ["nofix_message_2"] = "نظرت إلى دراجتك ولا يبدو أن هناك شيئًا خطأ",
        ["nofix_message_3"] = "نظرت إلى شريط البط الموجود على خرطوم الزيت وبدا أنك بخير",
        ["nofix_message_4"] = "لقد قمت بتشغيل الراديو وذهب الآن ضجيج المحرك الغريب",


from fastapi import HTTPException
from app.schemas.discordnews_schema import DiscordNewsRequest, DiscordNewsResponse, DiscordNewsData
from app.services.discordnews_service import summarize_headiline_discordnews_service
import uuid

async def discord_news_controller(request: DiscordNewsRequest) -> DiscordNewsResponse:
    request_id = str(uuid.uuid4())

    # 뉴스 요약 서비스 호출
    headline, summary, isCompleted = await summarize_headiline_discordnews_service(request.title, request.content, request_id)

    # JSON 파싱 실패 시 500 예외로 전파
    if not isCompleted:
        raise HTTPException(
            status_code=500,
            detail="뉴스 헤드라인 및 요약 생성 중 JSON 파싱 오류가 발생했습니다."
        )

    # 표준 응답 스키마로 래핑하여 반환
    return DiscordNewsResponse(
        message="뉴스 헤드라인, 요약 생성이 완료되었습니다.",
        data=DiscordNewsData(headline=headline, summary=summary, isCompleted=isCompleted)
    )


4',
        'thanks Julie'
      );

      /*
       * Also checks that recipient using doc property value is resolved
       * correctly.
       */
      testMessage(
        getScheduledMessage(doc, 0),
        '+1234',
        'Mustaches.  Overrated or underrated?'
      );
    });
  });

  it('patients chp is resolved correctly as recipient with hardcoded contact types', () => {
    config.get.returns([{
      form: 'PATR',
      events: [],
      validations: [],
      messages: [{
        translation_key: 'thanks',
        recipient: 'patient.parent.contact.phone'
      }]
    }]);
    sinon.stub(schedules, 'getScheduleConfig').returns({});
    sinon.stub(utils, 'getContactUuid').resolves({_id: 'uuid'});
    sinon.stub(utils, 'getRegistrations').resolves([]);
    sinon.stub(utils, 'translate').withArgs('thanks', 'en').returns('Thanks');

    const doc = {
      reported_date: moment().toISOString(),
      form: 'PATR',
      from: contact.phone,
      contact: contact,
      fields: { patient_id: '98765' },
      patient: { parent: { contact: { phone: '+5551596' } }, type: 'person' },
    };

    return transition.onMatch({ doc: doc }).then(complete => {
      assert.equal(complete, true);
      assert(doc.tasks);
      assert.equal(doc.tasks && doc.tasks.length, 1);

      testMessage(
        getMessage(doc, 0),
        '+5551596',
        'Thanks'
      );
    });
  });

  it('patients chp is resolved correctly as recipient with configurable contact types', () => {
    config.get.returns([{
      form: 'PATR',
      events: [],
      validations: [],
      messages: [{
        translation_key: 'thanks',
        recipient: 'patient.parent.contact.phone'
      }]
    }]);
    sinon.stub(schedules, 'getScheduleConfig').returns({});
    sinon.stub(utils, 'getRegistrations').resolves([]);
    sinon.stub(utils, 'translate').withArgs('thanks', 'en').returns('Thanks');
    config.getAll.returns({ contact_types: [{ id: 'patient', person: true }] });

    const doc = {
      reported_date: moment().toISOString(),
      form: 'PATR',
      from: contact.phone,
      contact: contact,
      fields: { patient_id: '98765' },
      patient: {
        parent: { contact: { phone: '+5551596' } },
        type: 'contact',
        contact_type: 'patient',
        patient_id: '98765'
      },
    };

    return transition.onMatch({ doc: doc }).then(complete => {
      assert.equal(complete, true);
      assert(doc.tasks);
      assert.equal(doc.tasks && doc.tasks.length, 1);

      testMessage(
        getMessage(doc, 0),
        '+5551596',
        'Thanks'
      );
    });
  });

  it('two phase registration sets up schedule using bool_expr', () => {

    config.get.returns([{
      form: 'PATR',
      events: [
        {
          name: 'on_create',
          trigger: 'assign_schedule',
          params: 'group1',
          bool_expr: 'doc.foo === "baz"'
        }
      ],
      validations: [],
      messages: [
        {
          message: [{
            content: 'thanks for registering {{patient_name}}',
            locale: 'en'
          }],
          recipient: 'reporting_unit'
        }
      ]
    }]);
    sinon.stub(utils, 'getRegistrations')
      .withArgs({ id: '123' }).resolves([ { fields: { patient_name: 'barry' } } ])
      .withArgs({ id: undefined }).resolves([]);


ualmente encendida','ph400t004':'Agregar contraseña','ph400t005':'Quitar contraseña','p600t001':'Visite la página de Software opcional de su enrutador para recuperar un software similar para sus demás computadoras y dispositivos móviles.','p600t002':'Gracias, lléveme al panel','p600t003':'Software opcional','p600t004':'Estas herramientas de software le permiten aprovechar las características avanzadas que su enrutador ofrece. Hay descargas para Apple iOS, Android, Windows y OS X.','p601t001':'Gracias por registrarse.','1852':'Esto sirve como capa de protección contra sitios Web inseguros o inadecuados. Los filtros Web examinan sitios por verificación de su nombre en comparación con una lista de sitios aprobados.','1854':'Opciones de filtrado','1856':'Sin filtro','1858':'Bloquear sitios maliciosos','1859':'Bloquea malware, intentos de suplantación de identidad (phishing) y sitios fraudulentos.','1860':'Bloquear sitios maliciosos y para adultos','1861':'Bloquea malware, intentos de suplantación de identidad (phishing), sitios fraudulentos y sitios con contenido sexualmente explícito.','1862':'Bloquear sitios maliciosos, para adultos y otros sitios aptos para toda la familia','1863':'Bloquea malware, intentos de suplantación de identidad (phishing), sitios fraudulentos y sitios con material sexualmente explícito, contenido para adultos, sitios sobre aborto, bebidas alcohólicas, tabaco, crimen, cultos satánicos, drogas, apuestas, odio, suicidio o violencia.','1864':'Para modificar su dirección DNS siga hasta WAN Internet > {DNS}','gtNoFilter':'Sin Filtrado','gtLowFilter':'Filtrado bajo','gtMediumFilter':'Filtrado medio','gtHighFilter':'Filtrado alto','pe100t002':'Permitir todos los sitios.','pe100t003':'Bloquear estos sitios:','pe100t007':'Bloquea todos las páginas de Filtrado bajo además de:','pe100t009':'Bloquea todas las páginas del Filtrado medio además de: ','pe100t019':'Para cambiar sus direcciones DNS, vaya a los ajustes WAN / DNS → ','htNorton2':'¿Qué es Norton™ ConnectSafe? ','htNortonContent2':'Es un filtro de sitio web que sirve como una capa de protección contra sitios peligrosos o de contenido inapropiado.  Cada sitio requerido es evaluado usando la base de datos Norton para el filtro seleccionado.','pe100t004':'malware','pe100t005':'phishing','pe100t006':'scam','pe100t008':'pornografía','pe100t010':'Contenido para adultos','pe100t011':'sectas','pe100t012':'apuestas','pe100t013':'suicidio','pe100t014':'violencia','pe100t015':'crimen','pe100t016':'drogas & alcohol ','pe100t017':'odio','pe100t018':'tabaco ','':null});require([
    "jquery",
    "UtilitiesForTesting",
    "util",
    "chroma",
    "Empress",
    "BiomTable",
], function ($, UtilitiesForTesting, util, chroma, Empress, BiomTable) {
    $(document).ready(function () {
        // Setup test variables
        // Note: This is ran for each test() so tests can modify bpArray
        // without affecting other tests.
        module("Empress", {
            setup: function () {
                this.empress = UtilitiesForTesting.getTestData(true).empress;
                this.empress._drawer.initialize();

                // Since layouts are now computed client-side which means
                // _treeData and _tdToInd are created on client-side. The test were
                // originally written when coordinates were calculated on python
                // side. Thus we need to set them back.


ADER, fragShaderSource);

    if (!vertexShader || !fragShader) {
      console.error('shader compile error: ', !!vertexShader, !!fragShader);
      console.log('vertex', withLineNums(vertexShaderSource));
      console.log('fragment', withLineNums(fragShaderSource));
      return null;
    }

    const program = createProgram(gl, vertexShader, fragShader);
    if (!program) console.error('error creating program');

    return program;
  }
}
export function logInfo(...args: unknown[]) {
  setTimeout(() => {
    console.info(...args);
  }, 0);
}

export function logError(...args: unknown[]) {
  setTimeout(() => {
    console.error(...args);
  }, 0);
}

//decapitalize
function decapitalize(str = '')  : string {
    var first = str.charAt(0)
    console.log(lowerfunc(first))
    return(lowerfunc(first))
}
decapitalize("la chaine de caractères")import { Terminal } from 'vscode'
import { FindBinaryStatus } from './binutil'
import { affectsUs, TiUPVersioning } from './components/config/config'
import { FS } from './fs'
import { Host } from './host'
import { Shell } from './shell'

export interface TiUP {
  invokeInSharedTerminal(command: string): Promise<void>

  // FIXME: should be abstracted in Shell interface
  invokeAnyInNewTerminal(command: string, terminalName: string): Promise<void>
}

interface Context {
  readonly host: Host
  readonly fs: FS
  readonly shell: Shell
  readonly pathfinder: (() => Promise<string>) | undefined
  binPath: string
  status: FindBinaryStatus | undefined
}

class TiUPImpl implements TiUP {
  constructor(
    host: Host,
    fs: FS,
    shell: Shell,
    pathfinder: (() => Promise<string>) | undefined
  ) {
    this.context = {
      host: host,
      fs: fs,
      shell: shell,
      pathfinder: pathfinder,
      binPath: 'tiup',
      status: undefined,
    }
  }
  invokeInSharedTerminal(command: string): Promise<void> {
    const terminal = this.getSharedTerminal()
    return invokeInTerminal(this.context, command, undefined, terminal)
  }

  invokeAnyInNewTerminal(command: string, terminalName: string): Promise<void> {
    const terminal = this.context.host.createTerminal(terminalName)
    return invokeAnyInTerminal(this.context, command, undefined, terminal)
  }

  private readonly context: Context
  private sharedTerminal: Terminal | null = null

  private getSharedTerminal(): Terminal {
    if (!this.sharedTerminal) {
      this.sharedTerminal = this.context.host.createTerminal('tiup')
      const disposable = this.context.host.onDidCloseTerminal((terminal) => {
        if (terminal === this.sharedTerminal) {
          this.sharedTerminal = null
          disposable.dispose()
        }
      })
      this.context.host.onDidChangeConfiguration((change) => {
        if (affectsUs(change) && this.sharedTerminal) {
          this.sharedTerminal.dispose()
        }
      })
    }
    return this.sharedTerminal
  }
}

export function create(
  versioning: TiUPVersioning,
  host: Host,
  fs: FS,
  shell: Shell
): TiUP {
  // TODO: automatically update version
  // if (versioning === TiUPVersioning.Infer) {
  //     return createAutoVersioned(host, fs, shell);
  // }
  return createSingleVersion(host, fs, shell)
}

function createSingleVersion(host: Host, fs: FS, shell: Shell): TiUP {
  return new Ti


	{
		ghlInfo->mCustomSkin = customSkin;
		if (renderSkin)
		{//this is going to set the surfs on/off matching the skin file
			G2_SetSurfaceOnOffFromSkin( ghlInfo, renderSkin );
		}

		return qtrue;
	}
	return qfalse;
}

qboolean G2API_SetShader(CGhoul2Info *ghlInfo, qhandle_t customShader)
{
	if (G2_SetupModelPointers(ghlInfo))
	{
		ghlInfo->mCustomShader = customShader;
		return qtrue;
	}
	return qfalse;
}

qboolean G2API_SetSurfaceOnOff(CGhoul2Info_v &ghoul2, const char *surfaceName, const int flags)
{
	CGhoul2Info *ghlInfo = NULL;

	if (ghoul2.size()>0)
	{
		ghlInfo = &ghoul2[0];
	}

	if (G2_SetupModelPointers(ghlInfo))
	{
		// ensure we flush the cache
		ghlInfo->mMeshFrameNum = 0;
		return G2_SetSurfaceOnOff(ghlInfo, ghlInfo->mSlist, surfaceName, flags);
	}
	return qfalse;
}

int G2API_GetSurfaceOnOff(CGhoul2Info *ghlInfo, const char *surfaceName)
{
	if (G2_SetupModelPointers(ghlInfo))
	{
		return G2_IsSurfaceOff(ghlInfo, ghlInfo->mSlist, surfaceName);
	}
	return -1;
}

qboolean G2API_SetRootSurface(CGhoul2Info_v &ghoul2, const int modelIndex, const char *surfaceName)
{
	if (G2_SetupModelPointers(ghoul2))
	{
		return G2_SetRootSurface(ghoul2, modelIndex, surfaceName);
	}

	return qfalse;
}

int G2API_AddSurface(CGhoul2Info *ghlInfo, int surfaceNumber, int polyNumber, float BarycentricI, float BarycentricJ, int lod )
{
	if (G2_SetupModelPointers(ghlInfo))
	{
		// ensure we flush the cache
		ghlInfo->mMeshFrameNum = 0;
		return G2_AddSurface(ghlInfo, surfaceNumber, polyNumber, BarycentricI, BarycentricJ, lod);
	}
	return -1;
}

qboolean G2API_RemoveSurface(CGhoul2Info *ghlInfo, const int index)
{
	if (G2_SetupModelPointers(ghlInfo))
	{
		// ensure we flush the cache
		ghlInfo->mMeshFrameNum = 0;
		return G2_RemoveSurface(ghlInfo->mSlist, index);
	}
	return qfalse;
}

int G2API_GetParentSurface(CGhoul2Info *ghlInfo, const int index)
{
	if (G2_SetupModelPointers(ghlInfo))
	{
		return G2_GetParentSurface(ghlInfo, index);
	}
	return -1;
}

int G2API_GetSurfaceRenderStatus(CGhoul2Info_v& ghoul2, int modelIndex, const char *surfaceName)
{
	CGhoul2Info *ghlInfo = &ghoul2[modelIndex];

	if (G2_SetupModelPointers(ghlInfo))
	{
		return G2_IsSurfaceRendered(ghlInfo, surfaceName, ghlInfo->mSlist);
	}
	return -1;
}

qboolean G2API_HasGhoul2ModelOnIndex(CGhoul2Info_v **ghlRemove, const int modelIndex)
{
	CGhoul2Info_v &ghlInfo = **ghlRemove;

	if (!ghlInfo.size() || (ghlInfo.size() <= modelIndex) || (ghlInfo[modelIndex].mModelindex == -1))
	{
		return qfalse;
	}

	return qtrue;
}

qboolean G2API_RemoveGho


 nonce gap must be dropped
//   - 4. All transactions after an already included nonce must be dropped
//   - 5. All transactions after an underpriced one (including it) must be dropped
//   - 6. All transactions after an overdrafting sequence must be dropped
//   - 7. All transactions exceeding the per-account limit must be dropped
//
// Furthermore, some strange corner-cases can also occur after a crash, as Billy's
// simplicity also allows it to resurrect past deleted entities:
//
//   - 8. Fully duplicate transactions (matching hash) must be dropped
//   - 9. Duplicate nonces from the same account must be dropped
func TestOpenDrops(t *testing.T) {
	log.Root().SetHandler(log.StdoutHandler)
	// Create a temporary folder for the persistent backend
	storage, _ := os.MkdirTemp("", "blobpool-")
	defer os.RemoveAll(storage)

	os.MkdirAll(filepath.Join(storage, pendingTransactionStore), 0700)
	store, _ := billy.Open(billy.Options{Path: filepath.Join(storage, pendingTransactionStore)}, newSlotter(), nil)

	// Insert a malformed transaction to verify that decoding errors (or format
	// changes) are handled gracefully (case 1)
	malformed, _ := store.Put([]byte("this is a badly encoded transaction"))

	// Insert a transaction with a bad signature to verify that stale junk after
	// potential hard-forks can get evicted (case 2)
	tx := types.NewTx(&types.BlobTx{
		ChainID:    uint256.MustFromBig(testChainConfig.ChainID),
		GasTipCap:  new(uint256.Int),
		GasFeeCap:  new(uint256.Int),
		Gas:        0,
		Value:      new(uint256.Int),
		Data:       nil,
		BlobFeeCap: new(uint256.Int),
		V:          new(uint256.Int),
		R:          new(uint256.Int),
		S:          new(uint256.Int),
	})
	blob, _ := rlp.EncodeToBytes(tx)
	badsig, _ := store.Put(blob)

	// Insert a sequence of transactions with a nonce gap in between to verify
	// that anything gapped will get evicted (case 3).
	var (
		gapper, _ = crypto.GenerateKey()

		valids = make(map[uint64]struct{})
		gapped = make(map[uint64]struct{})
	)
	for _, nonce := range []uint64{0, 1, 3, 4, 6, 7} { // first gap at #2, another at #5
		tx := makeTx(nonce, 1, 1, 1, gapper)
		blob, err := rlp.EncodeToBytes(tx)
		if err != nil {
			t.Fatal(err)
		}

		id, _ := store.Put(blob)
		if nonce < 2 {
			valids[id] = struct{}{}
		} else {
			gapped[id] = struct{}{}
		}
	}
	// Insert a sequence of transactions with a gapped starting nonce to verify
	// that the entire set will get dropped (case 3).
	var (
		dangler, _ = crypto.GenerateKey()
		dangling   = make(map[uint64]struct{})
	)
	for _, nonce := range []uint64{1, 2, 3} { // first gap at #0, all set dangling
		tx := makeTx(nonce, 1, 1, 1, dangler)
		blob, _ := rlp.EncodeToBytes(tx)

		id, _ := store.Put(blob)
		dangling[id] = struct{}{}
	}
	// Insert a sequence of transactions with already passed nonces to veirfy
	// that the entire set will get dropped (c


.8 39.6 47.8 92.1 19.3 160h108c8.7-56.9 25.5-107.8 49.9-141.6zM487.4 192H372.7c2.1 21 3.3 42.5 3.3 64s-1.2 43-3.3 64h114.6c5.5-20.5 8.6-41.8 8.6-64s-3.1-43.5-8.5-64zM120 256c0-21.5 1.2-43 3.3-64H8.6C3.2 212.5 0 233.8 0 256s3.2 43.5 8.6 64h114.6c-2-21-3.2-42.5-3.2-64zm39.5 96c14.5 89.3 48.7 152 88.5 152s74-62.7 88.5-152h-177zm159.3 141.6c71.4-21.2 129.4-73.7 158-141.6h-108c-8.8 56.9-25.6 107.8-50 141.6zM19.3 352c28.6 67.9 86.5 120.4 158 141.6-24.4-33.8-41.2-84.7-50-141.6h-108z"/></svg>')}a.cta.secondary i.icn-lightbulb:before,button.cta.secondary i.icn-lightbulb:before{content:url('data:image/svg+xml; utf8,<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 24 24" version="1.1"><g id="Atoms-/-Icons-/-Lightbulb" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><path fill="rgba(25, 165, 162, 0.99)" d="M13.2563027,22.7499934 C13.4866298,22.7499934 13.701473,22.6348509 13.8286585,22.4432124 L14.88181,20.8602122 C14.9565855,20.7476713 14.9965329,20.6153245 14.9969525,20.4803761 L14.9999738,17.2500066 C15.0970728,16.5745512 16.1597076,14.5347993 17.2532681,13.2874496 C18.4181213,11.9584008 19.1249639,10.2190518 19.1249639,8.31252787 C19.1249639,4.13596693 15.7390429,0.750045896 11.562482,0.750045896 C7.13885131,0.750045896 3.99483873,4.33964839 3.99999365,8.32285041 C4.00255966,10.2254719 4.70898268,11.9610024 5.87169582,13.2874496 C6.97385842,14.5442826 8.03259079,16.5917134 8.12499017,17.2500066 L8.12754982,20.4803761 C8.12754982,20.6157441 8.16795881,20.7476713 8.24273433,20.8602122 L9.29588581,22.4432124 C9.42349095,22.6348509 9.63833418,22.7499934 9.86824162,22.7499934 L13.2563027,22.7499934 Z M14.0460614,15.8745902 L9.07932215,15.8745902 C8.46659931,14.4471415 7.50710605,13.0665639 6.9059646,12.380786 C5.91210482,11.2472781 5.38057761,9.80996845 5.37711963,8.31252787 C5.36941583,5.00436162 7.97157867,2.12504262 11.562482,2.12504262


        }

        objIndex += gotSequential;
    }
    if (numBytes) {
        Jim_AppendString(interp, resultPtr, span, numBytes);
    }

    Jim_Free(num_buffer);
    return resultPtr;

  errorMsg:
    Jim_SetResultString(interp, msg, -1);
  error:
    Jim_FreeNewObj(interp, resultPtr);
    Jim_Free(num_buffer);
    return NULL;
}

#if defined(JIM_REGEXP)
#include <stdio.h>
#include <ctype.h>
#include <stdlib.h>
#include <string.h>

#define REG_MAX_PAREN 100

#define	END	0
#define	BOL	1
#define	EOL	2
#define	ANY	3
#define	ANYOF	4
#define	ANYBUT	5
#define	BRANCH	6
#define	BACK	7
#define	EXACTLY	8
#define	NOTHING	9
#define	REP	10
#define	REPMIN	11
#define	REPX	12
#define	REPXMIN	13
#define	BOLX	14
#define	EOLX	15
#define	WORDA	16
#define	WORDZ	17

#define	OPENNC 	1000
#define	OPEN   	1001

#define	CLOSENC	2000
#define	CLOSE	2001
#define	CLOSE_END	(CLOSE+REG_MAX_PAREN)

#define	REG_MAGIC	0xFADED00D

#define	OP(preg, p)	(preg->program[p])
#define	NEXT(preg, p)	(preg->program[p + 1])
#define	OPERAND(p)	((p) + 2)

#define	FAIL(R,M)	{ (R)->err = (M); return (M); }
#define	ISMULT(c)	((c) == '*' || (c) == '+' || (c) == '?' || (c) == '{')
#define	META		"^$.[()|?{+*"

#define	HASWIDTH	1
#define	SIMPLE		2
#define	SPSTART		4
#define	WORST		0

#define MAX_REP_COUNT 1000000

static int reg(regex_t *preg, int paren, int *flagp );
static int regpiece(regex_t *preg, int *flagp );
static int regbranch(regex_t *preg, int *flagp );
static int regatom(regex_t *preg, int *flagp );
static int regnode(regex_t *preg, int op );
static int regnext(regex_t *preg, int p );
static void regc(regex_t *preg, int b );
static int reginsert(regex_t *preg, int op, int size, int opnd );
static void regtail(regex_t *preg, int p, int val);
static void regoptail(regex_t *preg, int p, int val );
static int regopsize(regex_t *preg, int p );

static int reg_range_find(const int *string, int c);
static const char *str_find(const char *string, int c, int nocase);
static int prefix_cmp(const int *prog, int proglen, const char *string, int nocase);

#ifdef DEBUG
static int regnarrate = 0;
static void regdump(regex_t *preg);
static const char *regprop( int op );
#endif

static int str_int_len(const int *seq)
{
	int n = 0;
	while (*seq++) {
		n++;
	}
	return n;
}

int jim_regcomp(regex_t *preg, const char *exp, int cflags)
{
	int scan;
	int longest;
	unsigned len;
	int flags;

#ifdef DEBUG
	fprintf(stderr, "Compiling: '%s'\n", exp);
#endif
	memset(preg, 0, sizeof(*preg));

	if (exp == NULL)
		FAIL(preg, REG_ERR_NULL_ARGUMENT);

	preg->cflags = cflags;
	preg->regparse = exp;

	preg->proglen = (strlen(exp) + 1) * 5;
	preg->program = malloc(preg->proglen * sizeof(int));
	if (preg->program == NULL)
		FAIL(preg, REG_ERR_NOMEM);

	regc(preg, REG_MAGIC);
	if (reg(preg, 0, &flags) == 0) {
		return preg->err;
	}

	if (preg->re_nsub >= REG_MAX_PAREN)
		FAIL(preg,REG_ERR_TOO_BIG);

	preg->regstart = 0;
	preg->reganch = 0;
	preg->regmust = 0;
	preg->regmlen = 0;
	scan = 1;
	if (OP(preg, regnext(preg, scan)) == END) {
		scan = OPERAND(scan);

		if (OP(preg, scan) == EXACTLY) {
			preg->regstart = preg->program[OPERAND(scan)];
		}
		else if (OP(preg, scan) == BOL)
			preg->reganch++;

		if (flags&SPSTART) {
			longest = 0;
			len = 0;
			for (; scan != 0; scan = regnext(preg, scan)) {
				if (OP(preg, scan) == EXACTLY) {
					int plen = str_int_len(preg->program + OPERAND(scan));
					if (plen >= len) {
						longest = OPERAND(scan);
						len = plen;
					}
				}
			}
			preg->regmust = longest;
			preg->regmlen = len;
		}
	}

#ifdef DEBUG
	regdump(preg);
#endif

	return 0;
}

static int reg(regex_t *preg, int paren, int *flagp )
{
	int ret;
	int br;
	int ender;
	int parno = 0;
	int flags;

	*flagp = HASWIDTH;

	if (paren) {
		if (preg->regparse[0] == '?' && preg->regparse[1] == ':') {

			preg->regparse += 2;
			parno = -1;
		}
		else {
			parno = ++preg->re_nsub;
		}
		ret = regnode(preg, OPEN+parno);
	} else
		ret = 0;

	br = regbranch(preg, &flags);
	if (br == 0)
		return 0;
	if (ret != 0)
		regtail(preg, ret, br);
	else
		ret = br;
	if (!(flags&HASWIDTH))
		*flagp &= ~HASWIDTH;
	*flagp |= flags&SPSTART;
	while (*preg->regparse == '|') {
		preg->regparse++;
		br = regbranch(preg, &flags);
		if (br == 0)
			return 0;
		regtail(preg, ret, br);
		if (!(flags&HASWIDTH))
			*flagp &= ~HASWIDTH;
		*flagp |= flags&SPSTART;
	}

	ender = regnode(preg, (paren) ? CLOSE+parno : END);
	regtail(preg, ret, ender);

	for (br = ret; br != 0; br = regnext(preg, br))


 *
 * @param direction the direction of the packet (Rx, Tx).
 *
 * @param src_addr the source address of the packet.
 *
 * @ingroup upperedge
 */
void unifi_ta_indicate_protocol(void                              *ospriv,
                                CsrWifiRouterCtrlTrafficPacketType packet_type,
                                CsrWifiRouterCtrlProtocolDirection direction,
                                const CsrWifiMacAddress           *src_addr);

/**
 *
 * Indicates statistics for the sample data over a period.
 * Typically, this information is processed by the SME so
 * unifi_ta_indicate_sampling() needs to schedule a call to
 * unifi_sys_traffic_sample_ind().
 *
 * @param ospriv the OS layer context.
 *
 * @param stats the pointer to the structure that contains the statistics.
 *
 * @ingroup upperedge
 */
void unifi_ta_indicate_sampling(void *ospriv, CsrWifiRouterCtrlTrafficStats *stats);
void unifi_ta_indicate_l4stats(void     *ospriv,
                               u32 rxTcpThroughput,
                               u32 txTcpThroughput,
                               u32 rxUdpThroughput,
                               u32 txUdpThroughput);
#endif

void unifi_rx_queue_flush(void *ospriv);

/**
 * Call-out from the SDIO glue layer.
 *
 * The glue layer needs to call unifi_sdio_interrupt_handler() every time
 * an interrupts occurs.
 *
 * @param card the HIP core context.
 *
 * @ingroup bottomedge
 */
void unifi_sdio_interrupt_handler(card_t *card);

/* HELPER FUNCTIONS */

/*
 * unifi_init() and unifi_download() implement a subset of unifi_init_card functionality
 * that excludes HIP initialization.
 */
CsrResult unifi_init(card_t *card);
CsrResult unifi_download(card_t *card, s32 led_mask);

/*
 * unifi_start_processors() ensures both on-chip processors are running
 */
CsrResult unifi_start_processors(card_t *card);

CsrResult unifi_capture_panic(card_t *card);

/*
 * Configure HIP interrupt processing mode
 */
#define CSR_WIFI_INTMODE_DEFAULT        0
#define CSR_WIFI_INTMODE_RUN_BH_ONCE    1       /* Run BH once per interrupt */

void unifi_set_interrupt_mode(card_t *card, u32 mode);

/*
 * unifi_request_max_clock() requests that max SDIO clock speed is set at the
 * next suitable opportunity.
 */
void unifi_request_max_sdio_clock(card_t *card);

/* Functions to lookup bulk data command names. */
const char* lookup_bulkcmd_name(u16 id);

/* Function to log HIP's global debug buffer */
#ifdef CSR_WIFI_HIP_DEBUG_OFFLINE
void unifi_debug_buf_dump(void);
void unifi_debug_log_to_buf(const char *fmt, ...);
void unifi_debug_hex_to_buf(const char *buff, u16 length);
#endif

/* Mini-coredump utility functions */
CsrResult unifi_coredump_get_value(card_t *card, struct unifi_coredump_req *req);
CsrResult unifi_coredump_capture(card_t *card, struct unifi_coredump_req *req);
CsrResult unifi_coredump_request_at_next_reset(card_t *card, s8 enable);
CsrResult unifi_coredump_init(card_t *card, u16 num_dump_buffers);
void unifi_coredump_free(card_t *card);

#endif /* __CSR_WIFI_HIP_UNIFI_H__ */


esprite gBoltBeakBlueFlashingSparkTemplate, 0x4, 0x8, 0x0, 0x0, 0x10, 0xc, 0x60, 0x14, 0x1, 0x0
	createsprite gSparkElectricityFlashingSpriteTemplate, 0x4, 0x8, 0x0, 0x0, 0x10, 0xc, 0xa0, 0x14, 0x0, 0x0
	createsprite gBoltBeakBlueFlashingSparkTemplate, 0x4, 0x8, 0x0, 0x0, 0x10, 0xc, 0xe0, 0x14, 0x2, 0x0
	delay 0x4
	return

Move_FISHIOUS_REND::
	loadspritegfx ANIM_TAG_SHARP_TEETH @Teeth
	loadspritegfx ANIM_TAG_SMALL_BUBBLES
	createvisualtask AnimTask_BlendParticle, 5, ANIM_TAG_SHARP_TEETH, 0, 10, 10, 0x726A @Blue Teeth
	playsewithpan SE_M_WATERFALL, SOUND_PAN_TARGET
	createsprite gFishiousRendTeethTemplate, ANIM_TARGET, 0, 50, 4
	createvisualtask AnimTask_ShakeMon, 2, ANIM_TARGET, 4, 0, 12, 2
	call FishousRendBubbles
	waitforvisualfinish
	end
FishousRendBubbles:
	createsprite gSmallDriftingBubblesSpriteTemplate, ANIM_ATTACKER, 4, 0xF, 0x0
	createsprite gSmallDriftingBubblesSpriteTemplate, ANIM_ATTACKER, 4, 0xF, 0x0
	delay 0x2
	createsprite gSmallDriftingBubblesSpriteTemplate, ANIM_ATTACKER, 4, 0xA, 0x0
	createsprite gSmallDriftingBubblesSpriteTemplate, ANIM_ATTACKER, 4, 0xA, 0x0
	delay 0x2
	createsprite gSmallDriftingBubblesSpriteTemplate, ANIM_ATTACKER, 4, 0x5, 0x0
	createsprite gSmallDriftingBubblesSpriteTemplate, ANIM_ATTACKER, 4, 0x5, 0x0
	delay 0x2
	createsprite gSmallDriftingBubblesSpriteTemplate, ANIM_ATTACKER, 4, 0x0, 0x0
	createsprite gSmallDriftingBubblesSpriteTemplate, ANIM_ATTACKER, 4, 0x0, 0x0
	delay 0x2
	createsprite gSmallDriftingBubblesSpriteTemplate, ANIM_ATTACKER, 4, 0xfffb, 0x0
	createsprite gSmallDriftingBubblesSpriteTemplate, ANIM_ATTACKER, 4, 0xfffb, 0x0
	delay 0x2
	createsprite gSmallDriftingBubblesSpriteTemplate, ANIM_ATTACKER, 4, 0xfff6, 0x0
	createsprite gSmallDriftingBubblesSpriteTemplate, ANIM_ATTACKER, 4, 0xfff6, 0x0
	delay 0x2
	createsprite gSmallDriftingBubblesSpriteTemplate, ANIM_ATTACKER, 4, 0xfff1, 0x0
	createsprite gSmallDriftingBubblesSpriteTemplate, ANIM_ATTACKER, 4, 0xfff1, 0x0
	delay 0x2
	createsprite gSmallDriftingBubblesSpriteTemplate, ANIM_ATTACKER, 4, 0xffec, 0x0
	createsprite gSmallDriftingBubblesSpriteTemplate, ANIM_ATTACKER, 4, 0xffec, 0x0
	delay 0x2
	createsprite gSmallDriftingBubblesSpriteTemplate, ANIM_ATTACKER, 4, 0xfff1, 0x0
	createsprite gSmallDriftingBu


playback_status]
///
/// [playback_status]: https://specifications.freedesktop.org/mpris-spec/latest/Player_Interface.html#Enum:Playback_Status
enum PlaybackStatus {
  /// A track is currently playing.
  playing,

  /// A track is currently paused.
  paused,

  /// There is no track currently playing.
  stopped,
}
/// This is copied from Cargokit (which is the official way to use it currently)
/// Details: https://fzyzcjy.github.io/flutter_rust_bridge/manual/integrate/builtin

import 'dart:io';

import 'package:collection/collection.dart';
import 'package:ed25519_edwards/ed25519_edwards.dart';
import 'package:hex/hex.dart';
import 'package:logging/logging.dart';
import 'package:path/path.dart' as path;
import 'package:source_span/source_span.dart';
import 'package:yaml/yaml.dart';

import 'builder.dart';
import 'environment.dart';
import 'rustup.dart';

final _log = Logger('options');

/// A class for exceptions that have source span information attached.
class SourceSpanException implements Exception {
  // This is a getter so that subclasses can override it.
  /// A message describing the exception.
  String get message => _message;
  final String _message;

  // This is a getter so that subclasses can override it.
  /// The span associated with this exception.
  ///
  /// This may be `null` if the source location can't be determined.
  SourceSpan? get span => _span;
  final SourceSpan? _span;

  SourceSpanException(this._message, this._span);

  /// Returns a string representation of `this`.
  ///
  /// [color] may either be a [String], a [bool], or `null`. If it's a string,
  /// it indicates an ANSI terminal color escape that should be used to
  /// highlight the span's text. If it's `true`, it indicates that the text
  /// should be highlighted using the default color. If it's `false` or `null`,
  /// it indicates that the text shouldn't be highlighted.
  @override
  String toString({Object? color}) {
    if (span == null) return message;
    return 'Error on ${span!.message(message, color: color)}';
  }
}

enum Toolchain {
  stable,
  beta,
  nightly,
}

class CargoBuildOptions {
  final Toolchain toolchain;
  final List<String> flags;

  CargoBuildOptions({
    required this.toolchain,
    required this.flags,
  });

  static Toolchain _toolchainFromNode(YamlNode node) {
    if (node case YamlScalar(value: String name)) {
      final toolchain =
          Toolchain.values.firstWhereOrNull((element) => element.name == name);
      if (toolchain != null) {
        return toolchain;
      }
    }
    throw SourceSpanException(
        'Unknown toolchain. Must be one of ${Toolchain.values.map((e) => e.name)}.',
        node.span);
  }

  static CargoBuildOptions parse(YamlNode node) {
    if (node is! YamlMap) {
      throw SourceSpanException('Cargo options must be a map', node.span);
    }
    Toolchain toolchain = Toolchain.stable;
    List<String> flags = [];
    for (final MapEntry(:key, :value) in node.nodes.entries) {
      if (key case YamlScalar(value: 'toolchain')) {
        toolchain = _toolchainFromNode(value);
      } else if (key case YamlScalar(value: 'extra_flags')) {
        if (value case YamlList(nodes: List<YamlNode> list)) {
          if (list.every((element) {
            if (element case YamlScalar(value: String _)) {
              return true;
            }
            return false;
          })) {
            flags = list.map((e) => e.value as String).toList();
            continue;
          }
        }
        throw SourceSpan


        ); // we ignore errors here
        }
    }

    fn flush(&self) {
        let _ = self.file.lock().unwrap().flush();
    }
}
<filename>imap-proto/examples/parse_response.rs<gh_stars>0
use imap_proto::parse_response;
use std::io::Write;

fn main() -> std::io::Result<()> {
    loop {
        let line = {
            print!("Enter IMAP4REV1 response: ");
            std::io::stdout().flush().unwrap();

            let mut line = String::new();
            std::io::stdin().read_line(&mut line)?;
            line
        };

        match parse_response(line.replace("\n", "\r\n").as_bytes()) {
            Ok((remaining, command)) => {
                println!("{:#?}", command);

                if !remaining.is_empty() {
                    println!("Remaining data in buffer: {:?}", remaining);
                }
            }
            Err(_) => {
                println!("Error parsing the response. Is it correct? Exiting.");
                break;
            }
        }
    }

    Ok(())
}
<gh_stars>0
use cpuprofiler::PROFILER;
use criterion::Criterion;
use tornado_common_api::Event;
use tornado_engine_matcher::matcher::Matcher;

use crate::utils;
use tornado_engine_matcher::config::MatcherConfig;

// Use case with a single rule and a single event that does not match the rule.
// This benchmark represents the "best case" situation from a performance point of view.
pub fn bench(c: &mut Criterion) {
    // Create rule
    let rule = utils::read_rule_from_file("./benches_resources/no_match/rules/rule_01.json");

    // Create event
    let event = utils::read_event_from_file("./benches_resources/no_match/events/event_01.json");

    // Create Matcher
    let matcher = Matcher::build(&MatcherConfig::Rules { rules: vec![rule] }).unwrap();

    // println!("result is : {:?}", matcher.process(event.clone()));
    PROFILER.lock().unwrap().start("./target/no_match.profile").unwrap();
    c.bench_function("No match", move |b| b.iter(|| execute_test(&matcher, event.clone())));
    PROFILER.lock().unwrap().stop().unwrap();
}

fn execute_test(matcher: &Matcher, event: Event) {
    matcher.process(event);
}
use hyper;
use hyper::header::parsing::from_one_raw_str;
use hyper::header::{Header, HeaderFormat};
use std::fmt;
use std::ops::Deref;

/// Represents an Origin header
#[derive(PartialEq, Clone, Debug)]
pub struct Origin(pub String);

impl Deref for Origin {
	type Target = String;
	fn deref(&self) -> &String {
		&self.0
	}
}

impl Header for Origin {
	fn header_name() -> &'static str {
		"Origin"
	}

	fn parse_header(raw: &[Vec<u8>]) -> hyper::Result<Origin> {
		from_one_raw_str(raw).map(Origin)
	}
}

impl HeaderFormat for Origin {
	fn fmt_header(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
		let Origin(ref value) = *self;
		write!(fmt, "{}", value)
	}
}

impl fmt::Display for Origin {
	fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
		self.fmt_header(fmt)
	}
}

#[cfg(all(feature = "nightly", test))]
mod tests {
	use super::*;
	use hyper


// SPDX-FileCopyrightText: 2025 James Graham <james.h.graham@protonmail.com>
// SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL

#pragma once

#include <QQmlEngine>
#include <QSortFilterProxyModel>

/**
 * @class MessageContentFilterModel
 *
 * This model filters a message's contents.
 */
class MessageContentFilterModel : public QSortFilterProxyModel
{
    Q_OBJECT
    QML_ELEMENT

    /**
     * @brief Whether the author component should be shown.
     */
    Q_PROPERTY(bool showAuthor READ showAuthor WRITE setShowAuthor NOTIFY showAuthorChanged)

public:
    explicit MessageContentFilterModel(QObject *parent = nullptr);

    bool showAuthor() const;
    void setShowAuthor(bool showAuthor);

Q_SIGNALS:
    void showAuthorChanged();

protected:
    /**
     * @brief Whether a row should be shown out or not.
     *
     * @sa QSortFilterProxyModel::filterAcceptsRow
     */
    [[nodiscard]] bool filterAcceptsRow(int source_row, const QModelIndex &source_parent) const override;

private:
    bool m_showAuthor = true;
};


Offset,
              item.size.height / 2 +
                  baseOffset +
                  deltaOffsetMultiplicator * deltaOffset)));
    } else {
      data.add(item);
    }

    _indexMap[item.id] = data.length - 1;

    value = value.copyWith(data: data, indexMap: _newIndexMap);
  }

  /// * 移除 item
  /// * remove item
  void removeItem(StackItem<StackItemContent> item) {
    final List<StackItem<StackItemContent>> data =
        List<StackItem<StackItemContent>>.from(innerData);

    data.remove(item);
    _indexMap.remove(item.id);

    _reorder(data);

    value = value.copyWith(data: data, indexMap: _newIndexMap);
  }

  /// * 通过 id 移除 item
  /// * remove item by id
  void removeById(String id) {
    if (!_indexMap.containsKey(id)) return;

    final List<StackItem<StackItemContent>> data =
        List<StackItem<StackItemContent>>.from(innerData);

    data.removeAt(_indexMap[id]!);
    _indexMap.remove(id);

    _reorder(data);

    value = value.copyWith(data: data, indexMap: _newIndexMap);
  }

  /// * 选中唯一 item
  /// * select only item
  void selectOne(String id, {bool forceMoveToTop = false}) {
    // 全部 item status 重置为 idle
    final List<StackItem<StackItemContent>> data =
        List<StackItem<StackItemContent>>.from(innerData);

    for (int i = 0; i < data.length; i++) {
      final StackItem<StackItemContent> item = data[i];
      final bool selectedOne = item.id == id;
      // Update the status only if the item is not locked
      if (item.status != StackItemStatus.locked || selectedOne) {
        data[i] = item.copyWith(
            status:
                selectedOne ? StackItemStatus.selected : StackItemStatus.idle);
      }
    }

    if (_indexMap.containsKey(id)) {
      final StackItem<StackItemContent> item = data[_indexMap[id]!];
      if (!item.lockZOrder || forceMoveToTop) {
        data.removeAt(_indexMap[id]!);
        data.add(item);
      }
    }

    _reorder(data);

    value = value.copyWith(data: data, indexMap: _newIndexMap);
  }

  /// * update one item status
  void setItemStatus(String id, StackItemStatus status) {
    if (!_indexMap.containsKey(id)) return;

    final int index = _indexMap[id]!;

    final StackItem<StackItemContent> item = innerData[index];

    final List<StackItem<StackItemContent>> data =
        List<StackItem<StackItemContent>>.from(innerData);

    data[index] = item.copyWith(status: status);

    value = value.copyWith(data: data);
  }

  /// * update all item status
  void setAllItemStatuses(StackItemStatus status) {
    final List<StackItem<StackItemContent>> data =
        List<StackItem<StackItemContent>>.from(innerData);

    for (int i = 0; i < data.length; i++) {
      final StackItem<StackItemContent> item = data[i];
      data[i] = item.copyWith(status: status);
    }

    value = value.copyWith(data: data, indexMap: _newIndexMap);
  }

  /// * move item on top
  void moveItemOnTop(String id, {bool force = false}) {
    if (!_indexMap.containsKey(id)) return;

    final List<StackItem<StackItemContent>> data =
        List<StackItem<StackItemContent>>.from(innerData);

    final Sta


ndhttp.Client
	Context                  *context
	sendErrorCount           uint32
	sendBackoffMax           uint32
	maxMetricsBatchSizeBytes int
	agentIDProvide           id.Provide
	connectEnabled           bool
	getBackoffTimer          func(time.Duration) *time.Timer
	postCount                uint64 // counts post requests for debugging purposes
}

func newMetricsIngestSender(ctx *context, licenseKey, userAgent string, httpClient backendhttp.Client, connectEnabled bool) *metricsIngestSender {
	cfg := ctx.Config()

	metricIngestURL := fmt.Sprintf("%s/%s", ctx.Config().CollectorURL,
		strings.TrimPrefix(cfg.MetricsIngestEndpoint, "/"))

	if os.Getenv("DEV_METRICS_INGEST_URL") != "" {
		metricIngestURL = os.Getenv("DEV_METRICS_INGEST_URL")
	}
	metricIngestURL = strings.TrimSuffix(metricIngestURL, "/")
	eventQueue := EVENT_QUEUE_CAPACITY
	if cfg.EventQueueDepth > eventQueue {
		eventQueue = cfg.EventQueueDepth
	}

	batchQueue := BATCH_QUEUE_CAPACITY
	if cfg.BatchQueueDepth > batchQueue {
		batchQueue = cfg.BatchQueueDepth
	}

	maxMetricsBatchSizeBytes := cfg.MaxMetricsBatchSizeBytes
	if maxMetricsBatchSizeBytes <= 0 || maxMetricsBatchSizeBytes > config.DefaultMaxMetricsBatchSizeBytes {
		maxMetricsBatchSizeBytes = config.DefaultMaxMetricsBatchSizeBytes
	}

	return &metricsIngestSender{
		eventQueue:               make(chan eventData, eventQueue),
		batchQueue:               make(chan eventBatch, batchQueue),
		metricIngestURL:          metricIngestURL,
		internalRoutineWaits:     &sync.WaitGroup{},
		licenseKey:               licenseKey,
		userAgent:                userAgent,
		Context:                  ctx,
		sendBackoffMax:           config.MAX_BACKOFF,
		maxMetricsBatchSizeBytes: maxMetricsBatchSizeBytes,
		HttpClient:               httpClient,
		agentIDProvide:           ctx.Identity,
		connectEnabled:           connectEnabled,
		getBackoffTimer:          time.NewTimer,
		postCount:                0,
	}
}

// Start a couple of background routines to handle incoming data and post it to the server periodically.
func (sender *metricsIngestSender) Start() (err error) {
	if sender.stopChannel != nil {
		return fmt.Errorf("Cannot start sender: The sender is already running. (stopChannel is not nil)")
	}

	// Set up the stop channel so the routines can wait for it to be closed
	sender.stopChannel = make(chan bool)

	// Wait for accumulateBatches and sendBatches to complete
	sender.internalRoutineWaits.Add(3)

	go func() {
		defer sender.internalRoutineWaits.Done()
		reportEventQueueMetrics(sender.eventQueue, sender.stopChannel)
	}()

	go func() {
		defer sender.internalRoutineWaits.Done()
		sender.accumulateBatches()
	}()

	go func() {
		defer sender.internalRoutineWaits.Done()
		sender.sendBatches()
	}()

	return
}

// Stop will gracefully shut down all sending processes and reset the state of the sender.
// After Stop() returns, it is safe to call Start() again on the same sender instance.
func (sender *metricsIngestSender) Stop() (err error) {
	if sender.stopChannel == nil {
		return fmt.Errorf("Cannot stop sender: The sender is not running. (stopChannel is nil)")
	}

	close(sender.stopChannel)
	sender.internalRoutineWaits.Wait()
	sender.stopChannel = nil

	return
}

// We can accept any kind of object to represent an event. We assume that it will marshal to a valid JSON event object.
func (sender *metricsIngestSender) QueueEvent(event sample.Event, key entity.Key) (err error) {
	agentKey := sender.Context.


Broker] MsalRuntime initialization successful.");
            return true;
        }

        internal class LogEventWrapper : IDisposable
        {
            private bool _disposedValue;
            RuntimeBroker _broker;

            public LogEventWrapper(RuntimeBroker broker)
            {
                _broker = broker;
                s_lazyCore.Value.LogEvent += _broker.LogEventRaised;
            }

            protected virtual void Dispose(bool disposing)
            {
                if (!_disposedValue)
                {


ordaSerializable::class.java), true).visitEnd()
                }
                generateAbstractGetters(schema)
            }.visitEnd()
        }
    }

    private fun generateClass(classSchema: Schema): Class<*> {
        return generate(classSchema) { cw, schema ->
            val superName = schema.superclass?.jvmName ?: jlObject
            val interfaces = schema.interfaces.map { Type.getInternalName(it) }.toMutableList()

            if (SimpleFieldAccess::class.java !in schema.interfaces
                    && schema.flags.cordaSerializable()
                    && schema.flags.simpleFieldAccess()) {
                interfaces.add(Type.getInternalName(SimpleFieldAccess::class.java))
            }

            cw.apply {
                visit(TARGET_VERSION, ACC_PUBLIC + ACC_SUPER, schema.jvmName, null, superName,
                        interfaces.toTypedArray())

                if (schema.flags.cordaSerializable()) {
                    visitAnnotation(Type.getDescriptor(CordaSerializable::class.java), true).visitEnd()
                }
                generateFields(schema)
                generateClassConstructor(schema)
                generateGetters(schema)
                if (schema.superclass == null) {
                    generateGetMethod()   // From SimplePropertyAccess
                }
                generateToString(schema)
            }.visitEnd()
        }
    }

    private fun generate(schema: Schema, generator: (ClassWriter, Schema) -> Unit): Class<*> {
        // Lazy: we could compute max locals/max stack ourselves, it'd be faster.
        val cw = ClassWriter(ClassWriter.COMPUTE_FRAMES or ClassWriter.COMPUTE_MAXS)

        generator(cw, schema)

        val clazz = classloader.load(schema.name, cw.toByteArray())
        _loaded[schema.name] = clazz
        return clazz
    }

    private fun ClassWriter.generateFields(schema: Schema) {
        schema.generateFields(this)
    }

    private fun ClassWriter.generateToString(schema: Schema) {
        with(visitMethod(ACC_PUBLIC, "toString", "()L$jlString;", null, null)) {
            visitCode()
            // com.google.common.base.MoreObjects.toStringHelper("TypeName")
            visitLdcInsn(schema.name.split('.').last())
            visitMethodInsn(INVOKESTATIC, moreObjects, "toStringHelper",
                    "(L$jlString;)L$toStringHelper;", false)
            // Call the add() methods.
            for ((name, field) in schema.fieldsIncludingSuperclasses().entries) {
                visitLdcInsn(name)
                visitVarInsn(ALOAD, 0)  // this
                visitFieldInsn(GETFIELD, schema.jvmName, name, schema.descriptorsIncludingSuperclasses()[name])
                visitMethodInsn(INVOKEVIRTUAL, toStringHelper, "add", "(L$jlString;${field.type})L$toStringHelper;", false)
            }
            // call toString() on the builder and return.
            visitMethodInsn(INVOKEVIRTUAL, toStringHelper, "toString", "()L$jlString;", false)
            visitInsn(ARETURN)
            visitMaxs(0, 0)
            visitEnd()
        }
    }

    private fun ClassWriter.generateGetMethod() {
        val ourJvmName = Type.getInternalName(ClassCarpenterImpl::class.java)
        with(visitMethod(ACC_PUBLIC, "get", "(L$jlString;)L$jlObject;", null, null)) {
            visitCode()
            visitVarInsn(ALOAD, 0)  // Load 'this'
            visitVarInsn(ALOAD, 1)  // Load the name argument
            // Using this generic helper method is slow, as it relies on reflection. A faster way would be
            // to use a tableswitch opcode,


			; disable ROM (enable language card)
	lda	$c08b
	lda	#<interrupt_handler
	sta	$fffe
	lda	#>interrupt_handler
	sta	$ffff

	lda	#$EA			; nop out the "lda $45" in the irq hand
	sta	interrupt_smc
	sta	interrupt_smc+1

done_apple_detect:

	;=========================
	; Setup Interrupt Handler
	;=========================
	; Vector address goes to 0x3fe/0x3ff
	; FIXME: should chain any existing handler

	lda	#<interrupt_handler
	sta	$03fe
	lda	#>interrupt_handler
	sta	$03ff

	;============================
	; Enable 50Hz clock on 6522
	;============================

	; 4fe7 / 1e6 = .020s, 50Hz

	; 9c40 / 1e6 = .040s, 25Hz
	; 411a / 1e6 = .016s, 60Hz

	sei			; disable interrupts just in case

	lda	#$40		; Continuous interrupts, don't touch PB7
setup_irq_smc1:
	sta	MOCK_6522_ACR	; ACR register
	lda	#$7F		; clear all interrupt flags
setup_irq_smc2:
	sta	MOCK_6522_IER	; IER register (interrupt enable)

	lda	#$C0
setup_irq_smc3:
	sta	MOCK_6522_IFR	; IFR: 1100, enable interrupt on timer one oflow
setup_irq_smc4:
	sta	MOCK_6522_IER	; IER: 1100, enable timer one interrupt

	lda	#$E7
setup_irq_smc5:
	sta	MOCK_6522_T1CL	; write into low-order latch
	lda	#$4f
setup_irq_smc6:
	sta	MOCK_6522_T1CH	; write into high-order latch,
				; load both values into counter
				; clear interrupt and start counting

	rts


//-----------------------------------------------------------------------
// <copyright file="ClusterShardingMessages.g.cs" company="Akka.NET Project">
//     Copyright (C) 2009-2022 Lightbend Inc. <http://www.lightbend.com>
//     Copyright (C) 2013-2025 .NET Foundation <https://github.com/akkadotnet/akka.net>
// </copyright>
//-----------------------------------------------------------------------

// <auto-generated>
//     Generated by the protocol buffer compiler.  DO NOT EDIT!
//     source: ClusterShardingMessages.proto
// </auto-generated>
#pragma warning disable 1591, 0612, 3021, 8981
#region Designer generated code

using pb = global::Google.Protobuf;
using pbc = global::Google.Protobuf.Collections;
using pbr = global::Google.Protobuf.Reflection;
using scg = global::System.Collections.Generic;
namespace Akka.Cluster.Sharding.Serialization.Proto.Msg {

  /// Holder for reflection information generated from ClusterShardingMessages.proto
  internal static partial class ClusterShardingMessagesReflection {

    #region Descriptor
    /// File descriptor for ClusterShardingMessages.proto
    public static pbr::FileDescriptor Descriptor {
      get { return descriptor; }
    }
    private static pbr::FileDescriptor descriptor;

    static ClusterShardingMessagesReflection() {
      byte[] descriptorData = global::System.Convert.FromBase64String(
          string.Concat(
            "Ch1DbHVzdGVyU2hhcmRpbmdNZXNzYWdlcy5wcm90bxItQWtrYS5DbHVzdGVy",
            "LlNoYXJkaW5nLlNlcmlhbGl6YXRpb24uUHJvdG8uTXNnGg5kdXJhdGlvbi5w",
            "cm90bxoWQ29udGFpbmVyRm9ybWF0cy5wcm90byLjAQoQQ29vcmRpbmF0b3JT",
            "dGF0ZRJaCgZzaGFyZHMYASADKAsySi5Ba2thLkNsdXN0ZXIuU2hhcmRpbmcu",
            "U2VyaWFsaXphdGlvbi5Qcm90by5Nc2cuQ29vcmRpbmF0b3JTdGF0ZS5TaGFy",
            "ZEVudHJ5Eg8KB3JlZ2lvbnMYAiADKAkSFQoNcmVnaW9uUHJveGllcxgDIAMo",
            "CRIZChF1bmFsbG9jYXRlZFNoYXJkcxgEIAMoCRowCgpTaGFyZEVudHJ5Eg8K",
            "B3NoYXJkSWQYASABKAkSEQoJcmVnaW9uUmVmGAIgASgJIh4KD0FjdG9yUmVm",


r into a message.
	///
	/// This is functionally equivalent to calling `From` but allows the user
	/// to handle the case of `nng` being out of memory.
	pub fn from_slice(s: &[u8]) -> Result<Self>
	{
		let mut msgp: *mut nng_sys::nng_msg = ptr::null_mut();
		let rv = unsafe { nng_sys::nng_msg_alloc(&mut msgp as _, s.len()) };

		let msgp = validate_ptr(rv, msgp)?;

		// At this point, `nng` thinks we have the requested amount of memory.
		// There is no more validation we can try to do.
		unsafe {
			ptr::copy_nonoverlapping(s.as_ptr(), nng_sys::nng_msg_body(msgp.as_ptr()) as _, s.len())
		}

		Ok(Message::from_ptr(msgp))
	}

	/// Shortens the message, dropping excess elements from the back.
	///
	/// If `len` is greater than the message body's current length, this has no
	/// effect.
	pub fn truncate(&mut self, len: usize)
	{
		let rv = unsafe {
			let current_len = nng_sys::nng_msg_len(self.msgp.as_ptr());
			nng_sys::nng_msg_chop(self.msgp.as_ptr(), current_len.saturating_sub(len))
		};

		// We are guarding against this, so this should never happen
		debug_assert_eq!(rv, 0, "Message was too short to truncate");
	}

	/// Remove the first `len` bytes from the front of the message body.
	///
	/// If `len` is greater than the message body's current length then this
	/// will clear the entire message.
	pub fn trim(&mut self, len: usize)
	{
		let rv = unsafe {
			let current_len = nng_sys::nng_msg_len(self.msgp.as_ptr());
			nng_sys::nng_msg_trim(self.msgp.as_ptr(), len.min(current_len))
		};

		debug_assert_eq!(rv, 0, "Message was too short to trim");
	}

	/// Returns a slice that contains the contents of the message body.
	pub fn as_slice(&self) -> &[u8]
	{
		unsafe {
			let ptr = nng_sys::nng_msg_body(self.msgp.as_ptr());
			let len = nng_sys::nng_msg_len(self.msgp.as_ptr());

			slice::from_raw_parts(ptr as _, len)
		}
	}

	/// Returns a mutable slice that contains the contents of the message body.
	pub fn as_mut_slice(&mut self) -> &mut [u8]
	{
		unsafe {
			let ptr = nng_sys::nng_msg_body(self.msgp.as_ptr());
			let len = nng_sys::nng_msg_len(self.msgp.as_ptr());

			slice::from_raw_parts_mut(ptr as _, len)
		}
	}

	/// Returns a reference to the message header.
	pub const fn as_header(&self) -> &Header { &self.header }

	/// Returns a mutable reference to the message header.
	pub fn as_mut_header(&mut self) -> &mut Header { &mut self.header }

	/// Returns the length of the message.
	pub fn len(&self) -> usize { unsafe { nng_sys::nng_msg_len(self.msgp.as_ptr()) } }

	/// Returns true if the message body is empty.
	pub fn is_empty(&self) -> bool { self.len() == 0 }

	/// Clears the message body.
	pub fn clear(&mut self)
	{
		unsafe {
			nng_sys::nng_msg_clear(self.msgp.as_ptr());
		}
	}

	/// Prepends the data to the message body.
	pub fn push_front(&mut self, data: &[u8]) -> Result<()>
	{
		let rv =
			unsafe { nng_sys::nng_msg_insert(self.msgp.as_ptr(), data.as_ptr() as _, data.len()) };

		rv2res!(rv)


M_GTX_simd_mat4 extension).
	detail::fmat4x4SIMD outerProduct(
		detail::fvec4SIMD const & c,
		detail::fvec4SIMD const & r);

	//! Returns the transposed matrix of x
	//! (From GLM_GTX_simd_mat4 extension).
	detail::fmat4x4SIMD transpose(
		detail::fmat4x4SIMD const & x);

	//! Return the determinant of a mat4 matrix.
	//! (From GLM_GTX_simd_mat4 extension).
	float determinant(
		detail::fmat4x4SIMD const & m);

	//! Return the inverse of a mat4 matrix.
	//! (From GLM_GTX_simd_mat4 extension).
	detail::fmat4x4SIMD inverse(
		detail::fmat4x4SIMD const & m);

	/// @}
}// namespace glm

#include "simd_mat4.inl"

#endif//(GLM_ARCH != GLM_ARCH_PURE)

#endif//GLM_GTX_simd_mat4
///////////////////////////////////////////////////////////////////////////////////
/// OpenGL Mathematics (glm.g-truc.net)
///
/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net)
/// Permission is hereby granted, free of charge, to any person obtaining a copy
/// of this software and associated documentation files (the "Software"), to deal
/// in the Software without restriction, including without limitation the rights
/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
/// copies of the Software, and to permit persons to whom the Software is
/// furnished to do so, subject to the following conditions:
///
/// The above copyright notice and this permission notice shall be included in
/// all copies or substantial portions of the Software.
///
/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
/// THE SOFTWARE.
///
/// @ref gtx_wrap
/// @file glm/gtx/wrap.hpp
/// @date 2009-11-25 / 2011-06-07
/// @author Christophe Riccio
///
/// @see core (dependence)
///
/// @defgroup gtx_wrap GLM_GTX_wrap
/// @ingroup gtx
///
/// @brief Wrapping mode of texture coordinates.
///
/// <glm/gtx/wrap.hpp> need to be included to use these functionalities.
///////////////////////////////////////////////////////////////////////////////////

#ifndef GLM_GTX_wrap
#define GLM_GTX_wrap GLM_VERSION

// Dependency:
#include "../glm.hpp"

#if(defined(GLM_MESSAGES) && !defined(glm_ext))
#	pragma message("GLM: GLM_GTX_wrap extension included")
#endif

namespace glm
{
	/// @addtogroup gtx_wrap
	/// @{

	//! Simulate GL_CLAMP OpenGL wrap mode
	//! From GLM_GTX_wrap extension.
	template <typename genType>
	genType clamp(genType const & Texcoord);

	//! Simulate GL_REPEAT OpenGL wrap mode
	//! From GLM_GTX_wrap extension.
	template <typename genType>
	genType repeat(genType const & Texcoord);

	//! Simulate GL_MIRROR_REPEAT OpenGL wrap mode
	//! From GLM_GTX_wrap extension.
	template <typename genType>
	genType mirrorRepeat(genType const & Texcoord);

	/// @}
}// namespace glm

#include "wrap.inl"

#endif//GLM_GTX_wrap
///////////////////////////////////////////////////////////////////////////////////
/// OpenGL Mathematics (glm.g-truc.net)
///
/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net)
/// Permission


pl<T, bool>(x, in, has_fractional);
}

template <typename T> void readFloatTextSimple(T & x, ReadBuffer & in) { readFloatTextSimpleImpl<T, void>(x, in); }
template <typename T> bool tryReadFloatTextSimple(T & x, ReadBuffer & in) { return readFloatTextSimpleImpl<T, bool>(x, in); }

/// Implementation that is selected as default.

template <typename T> void readFloatText(T & x, ReadBuffer & in) { readFloatTextFast(x, in); }
template <typename T> bool tryReadFloatText(T & x, ReadBuffer & in) { return tryReadFloatTextFast(x, in); }

/// Don't read exponent part of the number.
template <typename T> bool tryReadFloatTextNoExponent(T & x, ReadBuffer & in)
{
    bool has_fractional;
    return readFloatTextFastImpl<T, bool, false>(x, in, has_fractional);
}

/// With a @has_fractional flag
/// Used for input_format_try_infer_integers
template <typename T> bool tryReadFloatTextExt(T & x, ReadBuffer & in, bool & has_fractional)
{
    return readFloatTextFastImpl<T, bool>(x, in, has_fractional);
}
template <typename T> bool tryReadFloatTextExtNoExponent(T & x, ReadBuffer & in, bool & has_fractional)
{
    return readFloatTextFastImpl<T, bool, false>(x, in, has_fractional);
}

}


"] = "45675|241|32|36.3|65.9",
		["Objectives"] = 	{
			[1] = 		{
				"|241|35|35|61|5.01|3.34"
			}
		}
	},
	[27803] = {
		["Quest"] = "Welcome Relief|0|84|84|27806|0|0",
		["Start"] = "46804|241|32|60.1|57.8",
		["End"] = "46804|241|32|60.1|57.8",
		["Objectives"] = 	{
			[1] = 		{
				"|241|35|59|56|10.02|20.04"
			}
		}
	},
	[27804] = {
		["Quest"] = "The Only Homes We Have|0|84|84|27806|0|0",
		["Start"] = "46804|241|32|60.1|57.8",
		["End"] = "46804|241|32|60.1|57.8",
		["Objectives"] = 	{
			[1] = 		{
				"|241|35|59|56|10.02|13.36"
			}
		}
	},
	[27805] = {
		["Quest"] = "Small Comforts|0|84|84|0|0|0",
		["Start"] = "46814|241|32|60.4|58.3",
		["End"] = "46814|241|32|60.4|58.3",
		["Objectives"] = 	{
			[1] = 		{
				"|241|35|59.5|56|5.01|3.34"
			},
			[2] = 		{
				"|241|35|59|56.5|5.01|3.34"
			},
			[3] = 		{
				"|241|35|59|55.5|5.01|3.34"
			}
		}
	},
	[27806] = {
		["Quest"] = "Honorable Bearing|0|84|84|0|0|0",
		["Start"] = "46804|241|32|60.1|57.8",
		["End"] = "46805|241|32|57.4|58.1"
	},
	[27807] = {
		["Quest"] = "Clan Mullan|0|84|84|27810|0|0",
		["Start"] = "46805|241|32|57.4|58.1",
		["End"] = "46811|241|32|50.7|60.2"
	},
	[27808] = {
		["Quest"] = "Stubborn as a Doyle|0|84|84|0|0|0",
		["Start"] = "46805|241|32|57.4|58.1",
		["End"] = "47317|241|32|61.4|67.4"
	},
	[27809] = {
		["Quest"] = "Firebeard Bellows|0|84|84|27813|0|0",
		["Start"] = "46805|241|32|57.4|58.1",
		["End"] = "46850|241|32|62.5|48.3"
	},
	[27810] = {
		["Quest"] = "The Fighting Spirit|0|84|84|27812|0|0",
		["Start"] = "46811|241|32|50.7|60.2",
		["End"] = "46811|241|32|50.7|60.2",
		["Objectives"] = 	{
			[1] = 		{
				"|241|35|50.5|59.5|10.02|6.68"
			}
		}
	},
	[27811] = {
		["Quest"] = "The Scent of Battle|0|84|84|0|0|0",


Q= 28272
IGJhbGQ= 28273
IERvY3RvcnM= 28274
IHRvdXRlZA== 28275
IE1heHdlbGw= 28276
IDIxNA== 28277
IGRpcGxvbWF0 28278
IHJlcHJlc3Npb24= 28279
IGNvbnN0aXR1ZW5jeQ== 28280
dmljZQ== 28281
cmFua2Vk 28282
IE5hcG9sZW9u 28283
Z2FuZw== 28284
IEZvcmV2ZXI= 28285
dHVu 28286
IGJ1bGI= 28287
IFBEVA== 28288
IENpc2Nv 28289
VkVO 28290
IHJlc3VtZWQ= 28291
U3RldmVu 28292
IE1hbml0b2Jh 28293
IGZhYnVsb3Vz 28294
IEFnZW50cw== 28295
MTk4NA== 28296
IGFtdXNpbmc= 28297
IE15c3Rlcmllcw== 28298
IG9ydGhvZG94 28299
Zmxvb3I= 28300
IHF1ZXN0aW9ubmFpcmU= 28301
IHBlbmV0cmF0ZQ== 28302
IGZpbG1tYWtlcnM= 28303
IFVuYw== 28304
IHN0YW1wZWQ= 28305
IHRoaXJ0ZWVu 28306
IG91dGZpZWxk 28307
IGZvcndhcmRlZA== 28308
IGFwcHJh 28309
IGFpZGVk 28310
dHJ5 28311
IHVuZm9jdXNlZA== 28312
IExpeg== 28313
IFdlbmR5 28314
IFNjZW5l 28315
Q2hhcmc= 28316
IHJlamVjdHM= 28317
IGxlZnRpc3Q= 28318
IFByb3ZpZGVuY2U= 28319
IEJyaWQ= 28320
cmVnbg== 28321
IHByb3BoZWN5 28322
IExJVkU= 28323
NDk5 28324
IGZvcmdl 28325
IEZNTA== 28326
IGludHJpbnNpYw== 28327
IEZyb2c= 28328
IHdvbnQ= 28329
IEhvbHQ= 28330
IGZhbWVk 28331
Q0xVUw== 28332
YWVwZXJuaWNr 28333
IEhhdGU= 28334
IENheQ== 28335
IHJlZ2lzdGVyaW5n 28336
b3J0YWxpdHk= 28337
cm9weQ== 28338
b2NhbHlwdGlj 28339
YWFu 28340
bmF2 28341
IGZhc2Npc3Q= 28342
SUZJRUQ= 28343
IGltcGxpY2F0ZWQ= 28344
IFJlc29ydA== 28345
IENoYW5kbGVy 28346
IEJyaWNr 28347
UGlu 28348
eXNj 28349
VXNhZ2U= 28350
IEhlbG0= 28351
dXNyYQ== 28352
4piF4piF 28353
IEFiYmFz 28354
IHVuYW5pbW91c2x5 28355
IGtlZXBlcg== 28356
IGFkZGljdGVk 28357
Pz8/ 28358
IGhlbG1ldHM= 28359
IGFudGlveGlk 28360
YXBzZWQ= 28361
ODA4 28362
Z2llbmU= 28363
IHdhaXRz 28364
IG1pbmlvbg== 28365
cmF2ZWQ= 28366
IFBvcnNjaGU= 28367
IGRyZWFtaW5n 28368
IDE3MQ== 28369
IENhaW4= 28370


. Si vous faites cela pour moi, je considérerai que votre examen est terminé."}, {"Trouver le garde Roberts et soigner ses blessures en utilisant Soins inférieurs (Rang 2). Lui accorder ensuite le Mot de pouvoir : Robustesse, puis retourner voir la prêtresse Josetta, à Goldshire."}},
[5625] = {"Vêtements de la Lumière", {"Il est de coutume de tester l'un de vos pouvoirs pour savoir si vous êtes digne de porter les robes qui symbolisent votre place dans l'Eglise. Mais il y a plus urgent. Le citoyen de Kharanos qui vient d'entrer m'a parlé d'un montagnard blessé à l'extérieur de la ville, au sud.","Guérissez ce Dolf, restaurez sa fortitude et je considérerai que vous avez fait vos preuves. Cela vous convient-il ?"}, {"Trouver le Montagnard Dolf et guérir ses blessures en utilisant Soins inférieurs (Rang 2). Lui accorder ensuite le Mot de pouvoir : Robustesse, puis retourner voir Maxan Anvol, à Kharanos."}},
[5626] = {"Au service de la Lumière", {"Eh ! <nom> ! Vous avez une minute ? !","Vous avez suivi la Lumière suffisamment longtemps pour trouver la route qui mène à Maxan Anvol à Kharanos. Il vous enseignera de nombreuses choses et si vous vous avérez courageux, il vous donnera votre première robe, pour vous démarquer en tant que <prêtre/prêtresse>.","Allez, continuez votre chemin ! Dès que vous en avez fini ici, passez par le tunnel, il vous attendra."}, {"Parler à Maxan Anvol à Dun Morogh."}},
[5627] = {"Etoiles d'Elune", nil, nil},
[5628] = {"Retour à la maison", {"Bonjour, <nom>. Quel bonheur que vous me parliez pendant quelques instants. Vous êtes bien loin de chez vous et vous êtes si jeune. J'admire les ambitieux. Ah si j'avais eu le courage de voyager lorsque j'étais plus jeune...","Il y avait une prêtresse de votre ordre ici, il n'y a pas longtemps. Elle a dit qu'il était important que vous reveniez au temple de la Lune à Darnassus et que vous parliez à la prêtresse Alathea. Cela concerne votre entraînement. Je ne traînerai pas trop si j'étais vous."}, {"Parler à la prêtresse Alathea à Darnassus."}},
[5629] = {"Retour à la maison", {"Encore bonjour, <nom>. Je sais que votre temps a été bien rempli à aider les gens, mais vous devez prendre du temps pour vous. La prêtresse Alathea a envoyé quelqu'un ici pour vous chercher. Il semble que vous ayez attiré l'attention de nos aînés et ils pensent que vous pouvez accomplir de grandes choses. Allez au temple de la Lune et cherchez Alathea. Elle vous y attendra. Bonne chance et qu'Elune soit avec vous."}, {"Parler à la prêtresse Alathea à Darnassus."}},
[5630] = {"Retour à la maison", {"Bien le bonjour <mon garçon/ma fille>. Ça fait plaisir de vous voir, vous qui venez de si loin. Sans vouloir vous offenser, la plupart de vos compatriotes ne supportent pas trop ces climats froids. Vous avez l'air plus à l'aise.","Il n'y a pas longtemps, l'une de vos prêtresses vous cherchait. Elle a dit quelque chose à propos de trouver une prêtresse Alathea dans le temple de la Lune à Darnassus. Elle a dit que c'était important et que vous devriez retourner là-bas très vi


oZOffsetStep
	mov r4, r0
	mov r0, #0x1
	bl NNSi_G2dSetOamSoftEmuAutoZOffsetFlag
	ldr r0, _020B31EC ; =pCurrentInstance_
	ldr r0, [r0, #0x0]
	ldr r0, [r0, #0x80]
	bl NNSi_G2dSetOamSoftEmuAutoZOffsetStep
	mov r0, r5
	bl DrawCellAnimationImpl_
	mov r0, #0x0
	bl NNSi_G2dSetOamSoftEmuAutoZOffsetFlag
	mov r0, r4
	bl NNSi_G2dSetOamSoftEmuAutoZOffsetStep
	bl NNSi_G2dResetOamSoftEmuAutoZOffset
	add sp, sp, #0x4
	ldmia sp!, {r4-r5,pc}
_020B31E0:
	bl DrawCellAnimationImpl_
	add sp, sp, #0x4
	ldmia sp!, {r4-r5,pc}
	.balign 4
_020B31EC: .word pCurrentInstance_
	arm_func_end NNS_G2dDrawCellAnimation

	arm_func_start NNS_G2dEndRendering
NNS_G2dEndRendering: ; 0x020B31F0
	stmdb sp!, {lr}
	sub sp, sp, #0x4
	ldr r1, _020B3260 ; =0x04000448
	mov r2, #0x1
	ldr r0, _020B3264 ; =pCurrentInstance_
	str r2, [r1, #0x0]
	ldr r2, [r0, #0x0]
	ldr r3, [r2, #0x7c]
	cmp r3, #0x0
	beq _020B324C
	ands r0, r3, #0x1
	ldrne r0, _020B3268 ; =bDonotUseSRTransform
	movne r1, #0x0
	strne r1, [r0, #0x0]
	ands r0, r3, #0x2
	beq _020B323C
	mov r0, #0x0
	str r0, [r2, #0x74]
	bl NNS_G2dRndCoreEndRendering
_020B323C:
	ldr r0, _020B3264 ; =pCurrentInstance_
	mov r1, #0x0
	ldr r0, [r0, #0x0]
	str r1, [r0, #0x7c]
_020B324C:
	ldr r0, _020B3264 ; =pCurrentInstance_
	mov r1, #0x0
	str r1, [r0, #0x0]
	add sp, sp, #0x4
	ldmia sp!, {pc}
	.balign 4
_020B3260: .word 0x04000448
_020B3264: .word pCurrentInstance_
_020B3268: .word bDonotUseSRTransform
	arm_func_end NNS_G2dEndRendering

	arm_func_start NNS_G2dBeginRendering
NNS_G2dBeginRendering: ; 0x020B326C
	stmdb sp!, {r4-r8,lr}
	ldr r5, _020B330C ; =currentMtxCachePos_
	ldr r3, _020B3310 ; =pCurrentInstance_
	ldrh r6, [r5, #0x0]
	ldr r2, _020B3314 ; =stackPos_
	mov r4, #0x0
	ldr r7, _020B3318 ; =0x0000FFFE
	ld


8c89-8c8a, U+8c8d-8c8e, U+8c90, U+8c94, U+8c98-8c99, U+8c9b, U+8c9f, U+8ca3-8ca4, U+8cad-8cb0, U+8cb2, U+8cb9-8cba, U+8cbd, U+8cc1-8cc2, U+8cc4-8cc5, U+8ccd, U+8ccf-8cd2, U+8cd4-8cd6, U+8cd9-8cda;
}
/* [t0/gf_40] (168) */
@font-face {
  font-family: 'Chiron Hei HK WS';
  font-style: italic;
  font-weight: 200 900;
  font-display: swap;
  src: url('../woff2/vf-italic/t0/gf_40.woff2') format('woff2-variations'), url('../woff2/vf-italic/t0/gf_40.woff2') format('woff2 supports variations');
  unicode-range: U+89a1, U+89a4-89a7, U+89a9, U+89ac, U+89af, U+89b2-89b3, U+89b7, U+89bb-89bc, U+89bf, U+89c5, U+89c9-89ca, U+89d1, U+89d4-89d5, U+89da, U+89dc-89de, U+89e5-89e7, U+89ed, U+89f1, U+89f3-89f4, U+89f6, U+89ff, U+8a01, U+8a03, U+8a07, U+8a09, U+8a0c, U+8a0f-8a12, U+8a16, U+8a1b-8a1c, U+8a22, U+8a25, U+8a27, U+8a29, U+8a2b, U+8a33, U+8a36, U+8a38, U+8a3d-8a3e, U+8a41, U+8a45-8a46, U+8a48-8a49, U+8a4e, U+8a51-8a52, U+8a54, U+8a56-8a58, U+8a5b, U+8a5d, U+8a61, U+8a63, U+8a67, U+8a6a-8a6c, U+8a70, U+8a74-8a76, U+8a7a-8a7c, U+8a7e, U+8a82, U+8a84-8a86, U+8a89, U+8a8f-8a92, U+8a94, U+8a9a, U+8a9c, U+8aa1, U+8aa3, U+8aa5, U+8aa7-8aa9, U+8aad, U+8aaf, U+8ab1, U+8ab4, U+8ab6, U+8abe, U+8ac2, U+8ac4, U+8ac6, U+8ac9, U+8acc-8acf, U+8ad1, U+8ada-8adb, U+8add-8ae2, U+8ae4, U+8ae6, U+8aea-8aeb, U+8aed, U+8af1-8af6, U+8af9-8afa, U+8afc, U+8b01, U+8b04-8b05, U+8b07, U+8b0b-8b0d, U+8b0f-8b10, U+8b13-8b14, U+8b16, U+8b1a, U+8b


/*
---------------------------------------------------------------------------
Open Asset Import Library (assimp)
---------------------------------------------------------------------------

Copyright (c) 2006-2012, assimp team

All rights reserved.

Redistribution and use of this software in source and binary forms,
with or without modification, are permitted provided that the following
conditions are met:

* Redistributions of source code must retain the above
  copyright notice, this list of conditions and the
  following disclaimer.

* Redistributions in binary form must reproduce the above
  copyright notice, this list of conditions and the
  following disclaimer in the documentation and/or other
  materials provided with the distribution.

* Neither the name of the assimp team, nor the names of its
  contributors may be used to endorse or promote products
  derived from this software without specific prior
  written permission of the assimp team.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
---------------------------------------------------------------------------
*/

#if (!defined AV_CAMERA_H_INCLUDED)
#define AV_CAMERA_H_INCLUDED

//-------------------------------------------------------------------------------
/** \brief Camera class
*/
//-------------------------------------------------------------------------------
class Camera
    {
    public:

        Camera ()
            :

            vPos(0.0f,0.0f,-10.0f),
            vUp(0.0f,1.0f,0.0f),
            vLookAt(0.0f,0.0f,1.0f),
            vRight(0.0f,1.0f,0.0f)
            {

            }
    public:

        // position of the camera
        aiVector3D vPos;

        // up-vector of the camera
        aiVector3D vUp;

        // camera's looking point is vPos + vLookAt
        aiVector3D vLookAt;

        // right vector of the camera
        aiVector3D vRight;

        // Equation
        // (vRight ^ vUp) - vLookAt == 0
        // needn't apply

    } ;

#endif // !!IG


he 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.
*/
package session

import (
	"sync"

	"github.com/admpub/log"
	codec "github.com/admpub/securecookie"
	"github.com/admpub/sessions"
	"github.com/webx-top/echo"
	ss "github.com/webx-top/echo/middleware/session/engine"
	cookieStore "github.com/webx-top/echo/middleware/session/engine/cookie"
)

func NewSession(ctx echo.Context) echo.Sessioner {
	return ss.NewSession(ctx)
}

func NewMySession(store sessions.Store, name string, ctx echo.Context) echo.Sessioner {
	return ss.NewMySession(store, name, ctx)
}

var fallbackStore sessions.Store
var fallbackOnce sync.Once

func initFallbackStore() {
	fallbackStore = cookieStore.New(&cookieStore.CookieOptions{
		KeyPairs: [][]byte{
			[]byte(codec.GenerateRandomKey(32)),
			[]byte(codec.GenerateRandomKey(32)),
		},
	})
	cookieStore.Reg(fallbackStore)
}

func FallbackStore() sessions.Store {
	fallbackOnce.Do(initFallbackStore)
	return fallbackStore
}

func StoreEngine(options *echo.SessionOptions) (store sessions.Store) {
	store = ss.StoreEngine(options)
	if store == nil {
		store = FallbackStore()
		log.Warn(`session uses fallback storage engine: cookie`)
	}
	return
}
package ratelimit

import (
	"fmt"
	"net/http"
	"sync"
	"testing"
	"time"

	"github.com/stretchr/testify/assert"
	"github.com/webx-top/echo"
	myTesting "github.com/webx-top/echo/testing"
)

func TestRateLimit(t *testing.T) {
	e := echo.New()
	var touched []int

	handler := echo.HandlerFunc(func(c echo.Context) error {
		pts := c.Get("procTime")
		fmt.Println(`--------------------`, pts, c.Request().RemoteAddress())
		procTime, _ := pts.(int)
		touched = append(touched, procTime)
		//time.Sleep(time.Duration(procTime) * time.Millisecond)

		return c.NoContent(http.StatusOK)
	})

	// Create a limiter struct.
	limiter := New(1, time.Second)
	mw := LimitHandler(limiter)

	testCases := []struct {
		procTime int // in Milliseconds
	}{
		{50},
		{99},
		{99},
		{99},
		{99},
		{150},
		{150},
		{150},
		{300},
		{300},
		{300},
	}

	ch := make(chan int, len(testCases))
	var wg sync.WaitGroup

	for _, tc := range testCases {

		wg.Add(1)

		go func(pt int) {

			defer wg.Done()
			req, rec := myTesting.NewRequestAndResponse(http.MethodGet, "/")
			req.StdRequest().RemoteAddr = `127.0.0.1`
			c := e.NewContext(req, rec)
			c.Set("procTime", pt)

			err := mw(handler).Handle(c)
			if err != nil {
				ch <- err.(*echo.HTTPError).Code
				return
			}

			ch <- rec.Status()


            .value_name("BASE_URL")
            .takes_value(true))
        .get_matches();

    let basepath = get_base_path();
    println!("Frontend at \"{}\"", basepath.join("fe").to_str().unwrap());

    if matches.is_present("verbose") || env::var("SECRETNOTE_VERBOSE").is_ok() {
        env::set_var("RUST_LOG", "actix_web=debug,actix_server=info");
        env_logger::init();
    }
    let redis: Arc<String> = Arc::new(matches.value_of("redis").unwrap_or(&env::var("SECRETNOTE_REDIS").unwrap_or("127.0.0.1:6379".into())).into());
    let redis_db: u32 = matches.value_of_t("redis-db").unwrap_or(env::var("SECRETNOTE_REDIS_DB").unwrap_or("0".into()).parse().expect("Redis database must be a number"));
    let redis_auth = Arc::new(if let Some(x) = matches.value_of("redis-auth") { Some(String::from(x)) } else { env::var("SECRETNOTE_REDIS_AUTH").ok() });
    let bind: String = matches.value_of("bind").unwrap_or(&env::var("SECRETNOTE_BIND").unwrap_or("127.0.0.1:8080".into())).into();
    let threads: usize = matches.value_of_t("threads").unwrap_or(env::var("SECRETNOTE_THREADS").unwrap_or("".into()).parse().unwrap_or(num_cpus::get()));
    let telegram_token: Arc<String> = Arc::new(matches.value_of("telegram-token").unwrap_or(&env::var("SECRETNOTE_TELEGRAM_TOKEN").unwrap_or("".into())).into());
    let base_url: Arc<String> = Arc::new(matches.value_of("base-url").unwrap_or(&env::var("SECRETNOTE_BASE_URL").unwrap_or("".into())).trim_end_matches("/").into());
    println!("Base URL: \"{}\"", base_url);
    println!("Using Redis at \"{}\", database {} ...", redis, redis_db);
    println!("Binding to \"{}\" ...", bind);
    println!("Starting {} threads ...", threads);

    let base_url_2: &str = &**base_url;
    let mut webhook_url: String = base_url_2.into();
    if !base_url.is_empty() {
        webhook_url.push_str("/api/telegram/webhook/");
        webhook_url.push_str(telegram_token.as_str());
    }
    let telegram = TelegramActor::new(&**telegram_token, &webhook_url).start();
    let broker = ChatMessageBroker::default().start();

    HttpServer::new(move || {
        let mut app = App::new()
            .wrap(middleware::Logger::default())
            .wrap(middleware::Compress::default())
            .wrap(middleware::DefaultHeaders::new().header("Cache-Control", "max-age=5184000"))
            .data(MyRedisActor::start((*redis).clone(), Some(redis_db), (*redis_auth).clone()))
            .data(broker.clone())
            .data(telegram.clone())
            .service(websocket)
            .service(note_store)
            .service(note_check)
            .service(note_retrieve)
            .service(note_admin_status)
            .service(note_admin_action)
            .service(chat_messages);

        if !telegram_token.is_empty() {
            let mut s: String = "/api/telegram/webhook/".to_owned();
            s.push_str(telegram_token.as_str());


andı... Bizatihi cuntalaşmış bir TSK sistemine geçildi...

Bugünlerde ordu ile ilgili söyledikleri habire ulusalcılar tarafından koz olarak kullanılmaya çalışılan Mümtaz’er Türköne bu durumu reddeden bir yazar aynı zamanda... Tam aksine Türköne, hâlâ bir yanı sıkı milliyetçi olduğu için, 27 Mayıs’ın askerler tarafından da benimsenmediğine, sahiplenilmediğine inanır. Evet, 27 Mayıs asker içinde travma yaratmıştır ama bugün Türk general zihniyeti tüm darbeleri olduğu gibi 27 Mayıs’ı da sahiplenen bir zihniyet çizgisine sahiptir. 27 Mayıs “başarılı” olduğu için kurumsal sahiplenme görmüştür... Talat Aydemir başarılı olsa, o darbeyi de sahiplenirdi Genelkurmay...

1963’ten itibaren 27 Mayıs cuntasının bir darbe ortamının yaratılması için yaptıklarını kurumsal hiyerarşi içinde yapmaya başlamıştır Genelkurmay... Yine iç iktidar savaşları olmuştur. Ama kavga eden tarafların zihniyeti özünde aynıdır... Sürekli bir kaos ortamını diri tutmak, sıkıyönetime ihtiyaç duyulan bir toplumsal psikoloji oluşturmak, ardından da bir yolunu bulup darbe yapmak, iktidarı ele geçirmek... Bu 12 Eylül harekâtındaki gibi doğrudan da olabilir... 12 Mart ve 28 Şubat harekâtlarında olduğu gibi parlamentoyu kapatmadan, kukla bir sivil hükümet aracılığıyla da olabilir... Yeter ki Genelkurmay’ın “kurumsal hegemonya”sı devam etsin... Genelkurmay’ın yüksek imtiyazları artarak devam etsin... Doğrudan askerî diktatörlük kurmak istemez Türk Genelkurmayı... Çünkü “yönetim başarısızlığı”nın sorumluluğunu üstlenmekten korkar... Yönetimi doğrudan ele aldığında Yunanistan’da ve Latin Amerika’da olduğu gibi ebediyen madara olma ihtimali olduğunu bilir çünkü... Türk Genelkurmay zihniyeti yetki sahibi olmak ister ama sorumluluğu sivillere yüklemek ister... Balyoz Darbe Planı’nda da Rıfat Hisarcıklıoğlu kabinesine sorumluluğun yükleneceği gibi...

Açık konuşalım... Ortada bir “Vatan Sevgisi” yok... “Makam Sevgisi” var... “İktidar Sevgisi” var... Kurumsal imtiyazlarını yitirmemek için her türlü çılgınlığı yapabilecek bir zihniyetle karşı karşıyayız... AK Parti hükümeti dindar insanlardan oluştuğu için bahane “irtica” oluyor... Ama 2001 yılında Ecevit iktidardayken de bir şekilde yönetimi ele almak kararlılığında generaller vard


s)", LogLevel.Info, ConsoleColor.DarkGreen);

            foreach (var pokemon in pokemonToEvolve)
            {
                //if (!EvolveList.Contains(pokemon.PokemonId))
                //    continue;

                if (pokemon.Cp < keepCp || CalculatePokemonPerfection(pokemon) < keepIv)
                {
                    Logger.Write($"Did not Evolve {pokemon.PokemonId} ({pokemon.Cp} cp, {CalculatePokemonPerfection(pokemon).ToString("0.00")}%) (Under Requirement) ", LogLevel.Info);
                    continue;
                }

                var evolvePokemonOutProto = await _client.Inventory.EvolvePokemon((ulong)pokemon.Id);
                _stats.increasePokemonsTransfered();
                _stats.updateConsoleTitle(_inventory);
                if (evolvePokemonOutProto.Result == EvolvePokemonResponse.Types.Result.Success)
                    Logger.Write($"Evolved {pokemon.PokemonId} successfully for {evolvePokemonOutProto.ExperienceAwarded}xp", LogLevel.Info, ConsoleColor.DarkGreen);
                else
                    Logger.Write($"Failed to evolve {pokemon.PokemonId}. EvolvePokemonOutProto.Result was {evolvePokemonOutProto.Result}, stopping evolving {pokemon.PokemonId}", LogLevel.Info);

                await T.Delay(rand.Next(3000, 5000));
            }
        }

        public async Task EvolvePokemonFromList()
        {
            var pokemonToEvolve = await _inventory.GetPokemonToEvolve();
            Logger.Write($"Sorting through {pokemonToEvolve.ToList().Count} pokemon to evolve...", LogLevel.Info, ConsoleColor.DarkGreen);
            foreach (var pokemon in pokemonToEvolve)
            {
                // skip ones we do not want to evolve
                if (!EvolveList.Contains(pokemon.PokemonId))
                    continue;


veTo(16.19f, 2f)
                horizontalLineTo(7.81f)
                curveTo(4.6f, 2f, 2f, 4.6f, 2f, 7.81f)
                verticalLineTo(9.16f)
                curveTo(2f, 9.71f, 2.45f, 10.16f, 3f, 10.16f)
                horizontalLineTo(9.67f)
                curveTo(9.9f, 8.84f, 11.21f, 7.9f, 12.64f, 8.28f)
                curveTo(13.44f, 8.49f, 14.09f, 9.14f, 14.3f, 9.94f)
                curveTo(14.32f, 10.01f, 14.32f, 10.09f, 14.33f, 10.16f)
                horizontalLineTo(21f)
                curveTo(21.55f, 10.16f, 22f, 9.71f, 22f, 9.16f)
                verticalLineTo(7.81f)
                curveTo(22f, 4.6f, 19.4f, 2f, 16.19f, 2f)
                close()
            }
        }.build()

        return _Strongbox!!
    }

@Suppress("ObjectPropertyName")
private var _Strongbox: ImageVector? = null
/*
 *
 *  * Copyright (c) 2025, Рабeх Аззам
 *  *
 *  * This file is part of Iconsax Compose.
 *  *
 *  * Iconsax Compose is free software: you can redistribute it and/or modify
 *  * it under the terms of the GNU General Public License as published by
 *  * the Free Software Foundation, either version 3 of the License, or
 *  * (at your option) any later version.
 *  *
 *  * Iconsax Compose is distributed in the hope that it will be useful,
 *  * but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 *  * GNU General Public License for more details.
 *  *
 *  * You should have received a copy of the GNU General Public License
 *  * along with Iconsax Compose. If not, see <https://www.gnu.org/licenses/>.
 *
 */

package io.github.rabehx.iconsax.filled

import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.SolidColor
import androidx.compose.ui.graphics.vector.ImageVector
import androidx.compose.ui.graphics.vector.path
import androidx.compose.ui.unit.dp
import io.github.rabehx.iconsax.Iconsax

val Iconsax.Filled.ArrangeCircle: ImageVector
    get() {
        if (_ArrangeCircle != null) {
            return _ArrangeCircle!!
        }
        _ArrangeCircle = ImageVector.Builder(
            name = "Filled.ArrangeCircle",
            defaultWidth = 24.dp,
            defaultHeight = 24.dp,
            viewportWidth = 24f,
            viewportHeight = 24f
        ).apply {
            path(fill = SolidColor(Color(0xFF000000))) {
                moveTo(12f, 2f)
                curveTo(6.48f, 2f, 2f, 6.48f, 2f, 12f)
                curveTo(2f, 17.52f, 6.48f, 22f, 12f, 22f)
                curveTo(17.52f, 22f, 22f, 17.52f, 22f, 12f)
                curveTo(22f, 6.48f, 17.52f, 2f, 12f, 2f)
                close()
                moveTo(10.93f, 17.15f)
                curveTo(10.93f, 17.25f, 10.91f, 17.34f, 10.87f, 17.44f)
                curveTo(10.79f, 17.62f, 10.65f, 17.77f, 10.46f, 17.85f)
                curveTo(10.37f, 17.89f, 10.


      handler: CreateEmptyBlogHandler(),
    ),

    // 📝 CREATE BLOG WITH METAFIELD
    ApiService(
      name: 'Create Blog With Metafield',
      endpoint: '/blogs',
      category: ApiCategory.onlineStore,
      subcategory: 'Blog',
      handler: CreateEmptyBlogWithMetafieldHandler(),
    ),

    // 🏷 METAFIELD TO EXISTING BLOG
    ApiService(
      name: 'Metafield To Existing Blog',
      endpoint: '/blogs/:blog_id/metafields',
      category: ApiCategory.onlineStore,
      subcategory: 'Blog',
      handler: MetafieldExistingBlogHandler(),
    ),

    // 📝 UPDATE EXISTING BLOG TITLE
    ApiService(
      name: 'Update Existing Blog Title',
      endpoint: '/blogs/:blog_id',
      category: ApiCategory.onlineStore,
      subcategory: 'Blog',
      handler: UpdateExistingBlogTitleHandler(),
    ),

    // 📝 Update Blog Title
    ApiService(
      name: 'Update Blog Title',
      endpoint: '/blogs/:blog_id',
      category: ApiCategory.onlineStore,
      subcategory: 'Blog',
      handler: UpdateBlogTitleHandler(),
    ),

    // 🗑 REMOVE BLOG
    ApiService(
      name: 'Remove Blog',
      endpoint: '/blogs/:blog_id',
      category: ApiCategory.onlineStore,
      subcategory: 'Blog',
      handler: RemoveBlogHandler(),
    ),

    // 📋 LIST ALL COMMENTS
    ApiService(
      name: 'List All Comments',
      endpoint: '/blogs/:blog_id/articles/:article_id/comments',
      category: ApiCategory.onlineStore,
      subcategory: 'Comment',
      handler: ListAllCommentsHandler(),
    ),

    //📋 GET SINGLE COMMENT
    ApiService(
      name: 'Get Single Comment',
      endpoint: '/blogs/:blog_id/articles/:article_id/comments/:comment_id',
      category: ApiCategory.onlineStore,
      subcategory: 'Comment',
      handler: GetSingleCommentHandler(),
    ),

    // 🔢 COUNT COMMENTS
    ApiService(
      name: 'Count Comments',
      endpoint: 'comments/count',
      category: ApiCategory.onlineStore,
      subcategory: 'Comment',
      handler: CountCommentsHandler(),
    ),

    // ✏ UPDATE COMMENT BODY
    ApiService(
      name: 'Update Comment Body',
      endpoint: '/blogs/:blog_id/articles/:article_id/comments/:comment_id',
      category: ApiCategory.onlineStore,
      subcategory: 'Comment',
      handler: UpdateCommentBodyHandler(),
    ),

    // 💬 CREATE COMMENT WITH TEXTILE MARKUP
    ApiService(
      name: 'Create Comment With Textile Markup',
      endpoint: '/blogs/:blog_id/articles/:article_id/comments',
      category: ApiCategory.onlineStore,
      subcategory: 'Comment',
      handler: CreateCommentTextileMarkupHandler(),
    ),

    // ✅ APPROVE AND PUBLISH COMMENT
    ApiService(
      name: 'Approve And Publish Comment',
      endpoint: '/blogs/:blog_id/articles/:article_id/comments/:comment_id',
      category: ApiCategory.onlineStore,
      subcategory: 'Comment',
      handler: ApproveAndPublishCommentHandler(),
    ),

    // 🔄 MARK COMMENT NOT SPAM & RESTORE
    ApiService(
      name: 'Mark Comment Not Spam & Restore',
      endpoint: '/blogs/:blog_id/articles/:article_id/comments/:comment_id',
      category: ApiCategory.onlineStore,
      subcategory: 'Comment',
      handler: MarkCommentNotSpamRestoreHandler(),
    ),

    /// 📦 Remove a comment
    ApiService(
      name: 'Remove Comment',
      endpoint: '/blogs/:blog_id/articles/:article_id/comments/:comment


d::pop_heap(begin, end);
		}

		return group.ScalarMultiply(last->base, last->exponent);
	}
}

struct WindowSlider
{
	WindowSlider(const Integer &expIn, bool fastNegate, unsigned int windowSizeIn=0)
		: exp(expIn), windowModulus(Integer::One()), windowSize(windowSizeIn), windowBegin(0), expWindow(0)
		, fastNegate(fastNegate), negateNext(false), firstTime(true), finished(false)
	{
		if (windowSize == 0)
		{
			unsigned int expLen = exp.BitCount();
			windowSize = expLen <= 17 ? 1 : (expLen <= 24 ? 2 : (expLen <= 70 ? 3 : (expLen <= 197 ? 4 : (expLen <= 539 ? 5 : (expLen <= 1434 ? 6 : 7)))));
		}
		windowModulus <<= windowSize;
	}

	void FindNextWindow()
	{
		unsigned int expLen = exp.WordCount() * WORD_BITS;
		unsigned int skipCount = firstTime ? 0 : windowSize;
		firstTime = false;
		while (!exp.GetBit(skipCount))
		{
			if (skipCount >= expLen)
			{
				finished = true;
				return;
			}
			skipCount++;
		}

		exp >>= skipCount;
		windowBegin += skipCount;
		expWindow = word32(exp % (word(1) << windowSize));

		if (fastNegate && exp.GetBit(windowSize))
		{
			negateNext = true;
			expWindow = (word32(1) << windowSize) - expWindow;
			exp += windowModulus;
		}
		else
			negateNext = false;
	}

	Integer exp, windowModulus;
	unsigned int windowSize, windowBegin;
	word32 expWindow;
	bool fastNegate, negateNext, firstTime, finished;
};

template <class T>
void AbstractGroup<T>::SimultaneousMultiply(T *results, const T &base, const Integer *expBegin, unsigned int expCount) const
{
	std::vector<std::vector<Element> > buckets(expCount);
	std::vector<WindowSlider> exponents;
	exponents.reserve(expCount);
	unsigned int i;

	for (i=0; i<expCount; i++)
	{
		assert(expBegin->NotNegative());
		exponents.push_back(WindowSlider(*expBegin++, InversionIsFast(), 0));
		exponents[i].FindNextWindow();
		buckets[i].resize(1<<(exponents[i].windowSize-1), Identity());
	}

	unsigned int expBitPosition = 0;
	Element g = base;
	bool notDone = true;

	while (notDone)
	{
		notDone = false;
		for (i=0; i<expCount; i++)
		{
			if (!exponents[i].finished && expBitPosition == exponents[i].windowBegin)
			{
				Element &bucket = buckets[i][exponents[i].expWindow/2];
				if (exponents[i].negateNext)
					Accumulate(bucket, Inverse(g));
				else
					Accumulate(bucket, g);
				exponents[i].FindNextWindow();
			}
			notDone = notDone || !exponents[i].finished;
		}

		if (notDone)
		{
			g = Double(g);
			expBitPosition++;
		}
	}

	for (i=0; i<expCount; i++)
	{
		Element &r = *results++;
		r = buckets[i][buckets[i].size()-1];
		if (buckets[i].size() > 1)
		{
			for (int j = (int)buckets[i].size()-2; j >= 1; j--)
			{
				Accumulate(buckets[i][j], buckets[i][j+1]);
				Accumulate(r, buckets[i][