https://fonts.gstatic.com/s/notosanssymbols2/v24/I_uyMoGduATTei9eI8daxVHDyfisHr71-pTgfFz26AM.woff2)
    format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212,
    U+2215, U+FEFF, U+FFFD;
}
:root {
  /* Font Sizes */
  --font-size-normal: 16px;
  --font-size-code: 14px;
  --font-size-side-dock: 14px;
  --font-size-side-dock-title: 16px;
  --font-size-status-bar: 14px;
  --font-size-h1: 26px;
  --font-size-h2: 24px;
  --font-size-h3: 20px;
  --font-size-h4: 18px;
  --font-size-h5: 17px;
  --font-size-h6: 16px;

  /* Font Families */
  --font-family-editor:
    "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
  --font-family-preview:
    "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
  --font-family-monospace:
    "Geist Mono", "SF Mono", SFMono-Regular, Consolas, "Liberation Mono", Menlo,
    Courier, monospace;

  /* Vercel Color System - Grays */
  --vercel-gray-100: #ffffff;
  --vercel-gray-200: #eaeaea;
  --vercel-gray-300: #999999;
  --vercel-gray-400: #888888;
  --vercel-gray-500: #666666;
  --vercel-gray-600: #444444;
  --vercel-gray-700: #333333;
  --vercel-gray-800: #111111;
  --vercel-gray-900: #000000;

  /* Vercel Color System - Blue (Accent) */
  --vercel-blue-100: #ffffff;
  --vercel-blue-200: #d6e4ff;
  --vercel-blue-300: #adc8ff;
  --vercel-blue-400: #84a9ff;
  --vercel-blue-500: #4d8bf9;
  --vercel-blue-600: #0070f3;
  --vercel-blue-700: #0051cc;
  --vercel-


import uvicorn
from routes import router as rag_router
from fastapi.middleware.cors import CORSMiddleware
from fastapi import FastAPI, Request
import logging
import os

logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__)

app = FastAPI(
    title="chatbot-rag",
    description="This API provides chat functionalities for the chatbot.",
    version="1.0.0",
    swagger_ui_parameters={"displayRequestDuration": True},
)

app.include_router(rag_router)

app.add_middleware(
    CORSMiddleware,
    allow_origins=["*"],
    allow_credentials=True,
    allow_methods=["*"],
    allow_headers=["*"],
)

# Middleware to log requests for troubleshooting
@app.middleware("http")
async def log_requests(request: Request, call_next):
    logger.info(f"Incoming request: {request.method} {request.url}")
    response = await call_next(request)
    logger.info(f"Response status: {response.status_code}")
    return response

# Basic route to confirm server is running
@app.get("/")
async def root():
    return {"message": "FastAPI server is running"}

# Health check route (useful for debugging and testing)
@app.get("/health")
async def health_check():
    return {"status": "healthy"}

if __name__ == "__main__":
    uvicorn.run("main:app", host='localhost', port= 8000, reload=True)


.nfeCabecalhoMontado!, atualizaFilhos: false);
      await _cancelarOperacaoVenda();
      _imprimirCupomSatCancelamento(retorno);
    } catch (e) {
      Sessao.fecharDialogBoxEspera(context);
      gerarDialogBoxErro(context, 'Ocorreu um problema ao tentar realizar o procedimento: $e');
    }
  }

  void _imprimirCupomSatCancelamento(Uint8List cupom) {
    Sessao.fecharDialogBoxEspera(context);
    Navigator.of(context)
      .push(MaterialPageRoute(
        builder: (BuildContext context) => PdfPage(
          arquivoPdf: cupom, title: 'Cfe-Sat')
        )
      ).then(
        (value) {
        }
      );
  }

  /////////////////////////////////////////
  /// Utilize o código abaixo para se comunicar diretamente com o ACBrMonitor
  /////////////////////////////////////////
  // Future _processarCancelamento() async {
  //   NfceAcbrService servicoNfce = NfceAcbrService();
  //   try {
  //     await servicoNfce.conectar(
  //       context,
  //       formaEmissao: '1',
  //       funcaoDeCallBack: _cancelarOperacaoVenda,
  //       operacao: 'CANCELAR',
  //       chaveAcesso: nfceCabecalho.chaveAcesso,
  //       motivoCancelamento: motivoCancelamento,
  //     ).then((socket) async {
  //       socket!.write('NFe.CANCELARNFE("' + nfceCabecalho.chaveAcesso! + '", "' + motivoCancelamento + '", "' + Sessao.empresa!.cnpj! + '")\r\n.\r\n');
  //     });
  //   } catch (e) {
  //     gerarDialogBoxErro(context, 'Ocorreu um problema ao tentar realizar o procedimento: ' + e.toString());
  //   }
  // }
}

/// codigo referente a fonte de dados
class _PdvVendaCabecalhoDataSource extends DataTableSource {
  final List<PdvVendaCabecalho>? listaPdvVendaCabecalho;
  final BuildContext context;
  final Function refrescarTela;
  final Function cancelarVenda;

  _PdvVendaCabecalhoDataSource(this.listaPdvVendaCabecalho, this.context, this.refrescarTela, this.cancelarVenda);

  void _sort<T>(Comparable<T>? Function(PdvVendaCabecalho contasPagar) getField, bool ascending) {
    listaPdvVendaCabecalho!.sort((PdvVendaCabecalho a, PdvVendaCabecalho b) {
      if (!ascending) {
        final PdvVendaCabecalho c = a;
        a = b;
        b = c;
      }
      Comparable<T>? aValue = getField(a);
      Comparable<T>? bValue = getField(b);

      aValue ??= '' as Comparable<T>;
      bValue ??= '' as Comparable<T>;

      return Comparable.compare(aValue, bValue);
    });
  }

  final int _selectedCount = 0;

  @override
  DataRow? getRow(int index) {
    assert(index >= 0);
    if (index >= listaPdvVendaCabecalho!.length) return null;
    final PdvVendaCabecalho pdvVendaCabecalho = listaPdvVendaCabecalho![index];
    return DataRow.byIndex(
      color: MaterialStateProperty.resolveWith<Color?>((Set<MaterialState> states) {
        if ((pdvVendaCabecalho.cupomCancelado != null) && (pdvVendaCabecalho.cupomCancelado == 'S')) {
          return Theme.of(context).colorScheme.error.withOpacity(0.2);
        }
        return


index = usize::from(scalar.byte());
    for item in octets {
        let octet_index = usize::from(*item);
        // SAFETY: `OCTET_MUL` is a 256x256 matrix, both indexes are `u8` inputs.
        *item = unsafe {
            *OCTET_MUL
                .get_unchecked(scalar_index)
                .get_unchecked(octet_index)
        };
    }
}

#[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
#[target_feature(enable = "avx2")]
unsafe fn mulassign_scalar_avx2(octets: &mut [u8], scalar: &Octet) {
    #[cfg(target_arch = "x86")]
    use std::arch::x86::*;
    #[cfg(target_arch = "x86_64")]
    use std::arch::x86_64::*;

    let low_mask = _mm256_set1_epi8(0x0F);
    let hi_mask = _mm256_set1_epi8(0xF0 as u8 as i8);
    let self_avx_ptr = octets.as_mut_ptr();
    // Safe because _mm256_loadu_si256 loads from unaligned memory
    #[allow(clippy::cast_ptr_alignment)]
    let low_table =
        _mm256_loadu_si256(OCTET_MUL_LOW_BITS[scalar.byte() as usize].as_ptr() as *const __m256i);
    // Safe because _mm256_loadu_si256 loads from unaligned memory
    #[allow(clippy::cast_ptr_alignment)]
    let hi_table =
        _mm256_loadu_si256(OCTET_MUL_HI_BITS[scalar.byte() as usize].as_ptr() as *const __m256i);

    for i in 0..(octets.len() / 32) {
        #[allow(clippy::cast_ptr_alignment)]
        let self_vec = _mm256_loadu_si256((self_avx_ptr as *const __m256i).add(i));
        let low = _mm256_and_si256(self_vec, low_mask);
        let low_result = _mm256_shuffle_epi8(low_table, low);
        let hi = _mm256_and_si256(self_vec, hi_mask);
        let hi = _mm256_srli_epi64(hi, 4);
        let hi_result = _mm256_shuffle_epi8(hi_table, hi);
        let result = _mm256_xor_si256(hi_result, low_result);
        #[allow(clippy::cast_ptr_alignment)]
        _mm256_storeu_si256((self_avx_ptr as *mut __m256i).add(i), result);
    }

    let remainder = octets.len() % 32;
    let scalar_index = scalar.byte() as usize;
    for i in (octets.len() - remainder)..octets.len() {
        *octets.get_unchecked_mut(i) = *OCTET_MUL
            .get_unchecked(scalar_index)
            .get_unchecked(*octets.get_unchecked(i) as usize);
    }
}

pub fn mulassign_scalar(octets: &mut [u8], scalar: &Octet) {
    #[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
    {
        if is_x86_feature_detected!("avx2") {
            unsafe {
                return mulassign_scalar_avx2(octets, scalar);
            }
        }
    }

    return mulassign_scalar_fallback(octets, scalar);
}

fn fused_addassign_mul_scalar_fallback(octets: &mut [u8], other: &[u8], scalar: &Octet) {
    let scalar_index = scala


type")) {
                    if (config.field.xtype !== field.xtype) {
                        needMerge = false;
                    }
                }

                if (Ext.isObject(config.field) && needMerge) {
                    config.field = Ext.Object.merge(field, config.field);
                }
                if (Ext.isEmpty(config.renderer)) {
                    config.renderer = FastExt.Entity.getColumnRender(entity, columnName);
                }
                config.configField = config.field;

            }
            return config;
        };

        /**
         * 获取实体类对象属性的编辑器
         * @param entity 实体对象
         * @param attrName 属性名
         */
        static getEditorField(entity: any, attrName: string): any {
            if (Ext.isEmpty(entity)) {
                return null;
            }
            if (Ext.isFunction(entity.getEditorField)) {
                return entity.getEditorField(attrName);
            }
            return null;
        }

        /**
         * 获取实体类对象属性的编辑器，将返回Ext.create创建的对象
         * @param entity 实体对象
         * @param attrName 属性名
         */
        static getEditorFieldObject(entity: any, attrName: string): any {
            let editorField = FastExt.Entity.getEditorField(entity, attrName);
            if (editorField) {
                return Ext.create(editorField);
            }
            return null;
        }

        /**
         * 获取实体类对象属性的渲染器
         * @param entity 实体对象
         * @param attrName 属性名
         */
        static getColumnRender(entity: any, attrName: string): any {
            if (Ext.isEmpty(entity)) {
                return null;
            }
            if (Ext.isFunction(entity.getColumnRender)) {
                return entity.getColumnRender(attrName);
            }
            return null;
        }

        /**
         * 获取column或field实际存入数据库的属性名
         * @param target
         */
        static getRealAttr(target: any) {
            if (!target) {
                return null;
            }
            if (Ext.isObject(target.field) && target.field.hasOwnProperty("name")) {
                return target.field.name;
            }

            if (target.hasOwnProperty("columnName")) {
                return target.columnName;
            }
            if (target.hasOwnProperty("dataIndex")) {
                return target.dataIndex;
            }
            return FastExt.Base.toString(target.name, "").replace("data.", "");
        }

        /**
         * 获取实体类Grid列的的编辑器
         * @param entity 实体对象
         * @param column grid列
         */
        static getEditorFieldByColumn(entity: any, column: any): any {
            if (Ext.isEmpty(entity)) {
                if (Ext.isObject(column.field)) {
                    return column.field;
                }
                return {xtype: column.field};
            }
            if (Ext.isFunction(entity.getEditorField)) {
                return entity.getEditorField(FastExt.Entity.getRealAttr(column));
            }
            return null;
        }

    }

}
import * as Sequelize from 'sequelize';

let Model: Sequelize.Model<any, any>;

let where: Sequelize.WhereOptions;

// From http://docs.sequelizejs.com/en/v3/doc


"prefix": "fa"}
            );
            marker_3edfdd1858fd5b66d8ba3212ec01bfad.setIcon(icon_4ffd78176f9322f9f9fcfae53a9d9675);

        var popup_0772d832e4814eadf1d6255e91ec234b = L.popup({"maxWidth": "100%"});

                var i_frame_e768610fa108926d14e5d332fe854879 = $(``)[0];
                popup_0772d832e4814eadf1d6255e91ec234b.setContent(i_frame_e768610fa108926d14e5d332fe854879);

        marker_3edfdd1858fd5b66d8ba3212ec01bfad.bindPopup(popup_0772d832e4814eadf1d6255e91ec234b)
        ;

            var marker_f56ae246e0fb33fad4fa0132f682966f = L.marker(
                [-6.61574, -78.94949],
                {}
            ).addTo(map_b9c5d8f9961c79d7689febffbf13099c);

            var icon_c65f7b5d7b1f084bbeddf18fee79d54a = L.AwesomeMarkers.icon(
                {"extraClasses": "fa-rotate-0", "icon": "university", "iconColor": "white", "markerColor": "blue", "prefix": "fa"}
            );
            marker_f56ae246e0fb33fad4fa0132f682966f.setIcon(icon_c65f7b5d7b1f084bbeddf18fee79d54a);

        var popup_fcb02b0f8dc7a58ef57336f0644029a6 = L.popup({"maxWidth": "100%"});

                var i_frame_65790b6bce311a9f53199d331eeeb4af = $(``)[0];
                popup_fcb02b0f8dc7a58ef57336f0644029a6.setContent(i_frame_65790b6bce311a9f53199d331eeeb4af);

        marker_f56ae246e0fb33fad4fa0132f682966f.bindPopup(popup_fcb02b0f8dc7a58ef57336f0644029a6)
        ;

            var marker_f00bde7adad520c3d519750ff104cb54 = L.marker(
                [-7.33141, -78.17118],
                {}


OwI3J7zs/8MfAz49PS/
gVn1nLitavOyHa+7t+OBdwMnS1oK7AB8Imt7OLA4K2vMA1YMON4mwKXZhculwJPAGdlrw0awrHk+
W4R/k55fEGbJ87KulixJz4yIR7L7HwGeHxEfqDkss9q5xm0p20/SiXR+Tm8HDq01GrNEuMdtZtYw
rnGbmTWME7eZWcM4cZuZNYwTt5lZwzhxm5k1jBO3mVnD/D+Vj81suSp92wAAAABJRU5ErkJggg==
"
>

<matplotlib.figure.Figure at 0x10eaa9c50>

In [38]:

plot_sfrbins()

<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAW4AAAEKCAYAAAAyx7/DAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz
AAALEgAACxIB0t1+/AAAIABJREFUeJztnXu8JFV1778/B0QGFB9cXyBzrkRhvAqioKgobS75iCB6
o8aQgFeIIIlRQU2I5Kpzjq9ElMRXoogfUVQEidxE78eAEtNqJBdUBAeY8YHOgOhFBRlwHIaZYd0/
qvucfXp2narurura1Wd9P5/+THXVrl2runvWWbX2esjMcBzHcdrD/ZoWwHEcxxkOV9yO4zgtwxW3
4zhOy3DF7TiO0zJccTuO47SMXZoWoG1Is/NhOGazalIWx3GWJ2pDOKCk9IV0HCcZzGwso2pYnTPu
9YalNRZ3G/7ADMPs7Cyzs7NNi1E5fl/tYhrvS6pGh76j5Lg3V3K14WiN4nYcx5kkuzYtwBLUvjgp
6XRJayVdL+n0yPETJF0n6XuSvinpoLplchzHKWKXkq+mZKsNSU8ETgEOA7YBl0


 = "shd",
			group_min = 0,
			duration = {
				10,
				10
			},
			interval = {
				0.5,
				1
			}
		},
		incomming_taser = {
			radius = 1500,
			max_nr = 0,
			queue = "tsr",
			group_min = 0,
			duration = {
				60,
				60
			},
			interval = {
				0.5,
				1
			}
		}
	}
end

function GroupAITweakData:_init_unit_categories(difficulty_index)
	local access_type_walk_only = {
		walk = true
	}
	local access_type_all = {
		acrobatic = true,
		walk = true
	}

	if difficulty_index <= 2 then
		self.special_unit_spawn_limits = {
			shield = 2,
			medic = 3,
			taser = 1,
			tank = 1,
			spooc = 0
		}
	elseif difficulty_index == 3 then
		self.special_unit_spawn_limits = {
			shield = 4,
			medic = 3,
			taser = 2,
			tank = 2,
			spooc = 0
		}
	elseif difficulty_index == 4 then
		self.special_unit_spawn_limits = {
			shield = 4,
			medic = 3,
			taser = 2,
			tank = 2,
			spooc = 2
		}
	elseif difficulty_index == 5 then
		self.special_unit_spawn_limits = {
			shield = 4,
			medic = 3,
			taser = 2,
			tank = 2,
			spooc = 2
		}
	elseif difficulty_index == 6 then
		self.special_unit_spawn_limits = {
			shield = 4,
			medic = 3,
			taser = 3,
			tank = 2,
			spooc = 2
		}
	elseif difficulty_index == 7 then
		self.special_unit_spawn_limits = {
			shield = 4,
			medic = 3,
			taser = 3,
			tank = 2,
			spooc = 2
		}
	elseif difficulty_index == 8 then
		self.special_unit_spawn_limits = {
			shield = 4,
			medic = 3,
			taser = 3,
			tank = 3,
			spooc = 2
		}
	else
		self.special_unit_spawn_limits = {
			shield = 8,
			medic = 3,
			taser = 4,
			tank = 2,
			spooc = 2
		}
	end

	self.unit_categories = {}

	if difficulty_index == 8 then
		self.unit_categories.spooc = {
			special_type = "spooc",
			unit_types = {
				america = {
					Idstring("units/pd2_dlc_gitgud/characters/ene_zeal_cloaker/ene_zeal_cloaker")
				},
				russia = {
					Idstring("units/pd2_dlc_mad/characters/ene_akan_fbi_spooc_asval_smg/ene_akan_fbi_spooc_asval_smg")
				},
				zombie = {
					Idstring("units/pd2_dlc_hvh/characters/ene_spook_hvh_1/ene_spook_hvh_1")
				},
				murkywater = {
					Idstring("units/pd2_dlc_bph/characters/ene_murkywater_cloaker/ene_murkywater_cloaker")
				},
				federales = {
					Idstring("units/pd2_dlc_bex/characters/ene_swat_cloaker_policia_federale/ene_swat_cloaker_policia_federale")
				}
			},
			access = access_type_all
		}
	else
		self.unit_categories.spo


		t.Fatalf("Failed importing ECDSA public key [%s]", err)
	}
	if pk == nil {
		t.Fatal("Failed importing ECDSA public key. Return BCCSP key cannot be nil.")
	}

	// Sign and verify with the imported public key
	msg := []byte("Hello World")

	digest, err := currentBCCSP.Hash(msg, &bccsp.SHAOpts{})
	if err != nil {
		t.Fatalf("Failed computing HASH [%s]", err)
	}

	signature, err := currentBCCSP.Sign(sk, digest, nil)
	if err != nil {
		t.Fatalf("Failed generating ECDSA signature [%s]", err)
	}

	valid, err := currentBCCSP.Verify(pk, signature, digest, nil)
	if err != nil {
		t.Fatalf("Failed verifying ECDSA signature [%s]", err)
	}
	if !valid {
		t.Fatal("Failed verifying ECDSA signature. Signature not valid.")
	}
}

func TestKeyImportFromX509ECDSAPublicKey(t *testing.T) {

	// Generate an ECDSA key
	k, err := currentBCCSP.KeyGen(&bccsp.ECDSAKeyGenOpts{Temporary: false})
	if err != nil {
		t.Fatalf("Failed generating ECDSA key [%s]", err)
	}

	// Generate a self-signed certificate
	testExtKeyUsage := []x509.ExtKeyUsage{x509.ExtKeyUsageClientAuth, x509.ExtKeyUsageServerAuth}
	testUnknownExtKeyUsage := []asn1.ObjectIdentifier{[]int{1, 2, 3}, []int{2, 59, 1}}
	extraExtensionData := []byte("extra extension")
	commonName := "test.example.com"
	template := x509.Certificate{
		SerialNumber: big.NewInt(1),
		Subject: pkix.Name{
			CommonName:   commonName,
			Organization: []string{"Σ Acme Co"},
			Country:      []string{"US"},
			ExtraNames: []pkix.AttributeTypeAndValue{
				{
					Type:  []int{2, 5, 4, 42},
					Value: "Gopher",
				},
				// This should override the Country, above.
				{
					Type:  []int{2, 5, 4, 6},
					Value: "NL",
				},
			},
		},
		NotBefore: time.Now().Add(-1 * time.Hour),
		NotAfter:  time.Now().Add(1 * time.Hour),

		SignatureAlgorithm: x509.ECDSAWithSHA256,

		SubjectKeyId: []byte{1, 2, 3, 4},
		KeyUsage:     x509.KeyUsageCertSign,

		ExtKeyUsage:        testExtKeyUsage,
		UnknownExtKeyUsage: testUnknownExtKeyUsage,

		BasicConstraintsValid: true,
		IsCA: true,

		OCSPServer:            []string{"http://ocurrentBCCSP.example.com"},
		IssuingCertificateURL: []string{"http://crt.example.com/ca1.crt"},

		DNSNames:       []string{"test.example.com"},
		EmailAddresses: []string{"gopher@golang.org"},
		IPAddresses:    []net.IP{net.IPv4(127, 0, 0, 1).To4(), net.ParseIP("2001:4860:0:2001::68")},

		PolicyIdentifiers:   []asn1.ObjectIdentifier{[]int{1, 2, 3}},
		PermittedDNSDomains: []string{".example.com", "example.com"},

		CRLDistributionPoints: []string{"http://crl1.example.com/ca1.crl", "http://crl2.example.com/ca1.crl"},

		ExtraExtensions: []pkix.Extension{


Qfv:
nop
.text
.globl b__MA6vph_6414ZrffntrCnggrea16cnefrPubvprFglyrRvvC11HCnefrReebeE10HReebePbqr
.type b__MA6vph_6414ZrffntrCnggrea16cnefrPubvprFglyrRvvC11HCnefrReebeE10HReebePbqr,%function
b__MA6vph_6414ZrffntrCnggrea16cnefrPubvprFglyrRvvC11HCnefrReebeE10HReebePbqr:
nop
.text
.globl b__MA6vph_6416OlgrfGevrOhvyqre5jevgrRv
.type b__MA6vph_6416OlgrfGevrOhvyqre5jevgrRv,%function
b__MA6vph_6416OlgrfGevrOhvyqre5jevgrRv:
nop
.text
.globl b_hcei_pbzcnerNFPVVCebcreglAnzrf_64
.type b_hcei_pbzcnerNFPVVCebcreglAnzrf_64,%function
b_hcei_pbzcnerNFPVVCebcreglAnzrf_64:
nop
.text
.globl b__MAX6vph_6413FvzcyrSnpgbel16hcqngrIvfvoyrVQfREAF_9UnfugnoyrRE10HReebePbqr
.type b__MAX6vph_6413FvzcyrSnpgbel16hcqngrIvfvoyrVQfREAF_9UnfugnoyrRE10HReebePbqr,%function
b__MAX6vph_6413FvzcyrSnpgbel16hcqngrIvfvoyrVQfREAF_9UnfugnoyrRE10HReebePbqr:
nop
.text
.globl b_ybpnyr_trgXrljbeqfFgneg_64
.type b_ybpnyr_trgXrljbeqfFgneg_64,%function
b_ybpnyr_trgXrljbeqfFgneg_64:
nop
.data
.globl b__MGFA6vph_6410NccraqnoyrR
.type b__MGFA6vph_6410NccraqnoyrR,%object
b__MGFA6vph_6410NccraqnoyrR:
.space __SIZEOF_POINTER__
.text
.globl b__MA6vph_6418HavpbqrFrgVgrengbe5erfrgRi
.type b__MA6vph_6418HavpbqrFrgVgrengbe5erfrgRi,%function
b__MA6vph_6418HavpbqrFrgVgrengbe5erfrgRi:
nop
.text
.globl b__MAX6vph_6415Abeznyvmre2Vzcy9qrpbzcbfrRCXQfF2_EAF_13HavpbqrFgevatRvE10HReebePbqr
.type b__MAX6vph_6415Abeznyvmre2Vzcy9qrpbzcbfrRCXQfF2_EAF_13HavpbqrFgevatRvE10HReebePbqr,%function
b__MAX6vph_6415Abeznyvmre2Vzcy9qrpbzcbfrRCXQfF2_EAF_13HavpbqrFgevatRvE10HReebePbqr:
nop
.text
.globl b__MA6vph_6422EhyrOnfrqOernxVgrengbeP2Ri
.type b__MA6vph_6422EhyrOnfrqOernxVgrengbeP2Ri,%function
b__MA6vph_6422EhyrOnfrqOernxVgrengbeP2Ri:
nop
.text
.globl b_hpcgevr_trgInyhrJ


= createBlock();
    const expectedState = createState('some text', [block]);
    const store = createStore({ reducer, initialState: expectedState });
    expect(store.getState()).toEqual(expectedState);
  });
  it('changes the state when action is dispatched', () => {
    const expectedState: State = {
      currentText: 'some text',
      blocks: [],
    };
    const store = createStore({ reducer, initialState: expectedState });
    const action = createAppendOrChangeInputAction(
      ActionType.AppendBlock,
      'test@miro.com'
    );
    store.dispatch(action);
    const state = store.getState();
    expect(state.currentText).toEqual('affected');
  });
});
import { Operator } from '../Operator';
import { Observable, ObservableInput } from '../Observable';
import { Subscriber } from '../Subscriber';
import { Subscription } from '../Subscription';
import { OuterSubscriber } from '../OuterSubscriber';
import { InnerSubscriber } from '../InnerSubscriber';
import { subscribeToResult } from '../util/subscribeToResult';

/* tslint:disable:max-line-length */
export function switchMap<T, R>(this: Observable<T>, project: (value: T, index: number) => ObservableInput<R>): Observable<R>;
export function switchMap<T, I, R>(this: Observable<T>, project: (value: T, index: number) => ObservableInput, resultSelector: (outerValue: T, innerValue: I, outerIndex: number, innerIndex: number) => R): Observable<R>;
/* tslint:enable:max-line-length */

/**
 * 将每个源值投射成 Observable，该 Observable 会合并到输出 Observable 中，
 * 并且只发出最新投射的 Observable 中的值。
 *
 * 将每个值映射成 Observable ，然后使用 {@link switch}
 * 打平所有的内部 Observables 。
 *
 *
 *
 * 返回的 Observable 基于应用一个函数来发送项，该函数提供给源 Observable 发出的每个项，
 * 并返回一个(所谓的“内部”) Observable 。每次观察到这些内部 Observables 的其中一个时，
 * 输出 Observable 将开始发出该内部 Observable 所发出的项。当发出一个新的内部
 * Observable 时，`switchMap` 会停止发出先前发出的内部 Observable 并开始发出新的内部
 * Observable 的值。后续的内部 Observables 也是如此。
 *
 * @example
每次点击返回一个 interval Observable

 * var clicks = Rx.Observable.fromEvent(document, 'click');
 * var result = clicks.switchMap((ev) => Rx.Observable.interval(1000));
 * result.subscribe(x => console.log(x));
 *
 * @see {@link concatMap}
 * @see {@link exhaustMap}
 * @see {@link mergeMap}
 * @see {@link switch}
 * @see {@link switchMapTo}
 *
 * @param {function(value: T, ?index: number): ObservableInput} project 函数，
 * 当应用于源 Observable 发出的项时，返回一个 Observable 。
 * @param {function(outerValue: T, innerValue: I, outerIndex: number, innerIndex: number): any} [resultSelector]
 * 函数，它用于产生基于值的输出 Observable 和源(外部)发送和内部 Observable 发送的索引。
 * 传递给这个函数参数有：
 * - `outerValue`: 来自源的值
 * - `innerValue`: 来自投射的 Observable 的值
 * - `outerIndex`: 来自源的值的 "index"
 * - `innerIndex`: 来自投射的 Observable 的值的 "index"
 * @return {Observable} 该 Observable 发出由源 Observable 发出的每项应用投射函数
 * (和可选的 `resultSelector`)后的结果，并只接收最新投射的内部 Observable 的值。


er C06 AF3
# pin C06: TIM8 CH1 (AF3)
timer C07 AF3
# pin C07: TIM8 CH2 (AF3)
timer C08 AF3
# pin C08: TIM8 CH3 (AF3)
timer C09 AF3
# pin C09: TIM8 CH4 (AF3)
timer B08 AF2
# pin B08: TIM4 CH3 (AF2)
timer A02 AF1
# pin A02: TIM2 CH3 (AF1)
timer B07 AF2
# pin B07: TIM4 CH2 (AF2)
timer A03 AF1
# pin A03: TIM2 CH4 (AF1)
timer A01 AF2
# pin A01: TIM5 CH2 (AF2)
timer B00 AF1
# pin B00: TIM1 CH2N (AF1)
timer B05 AF2
# pin B05: TIM3 CH2 (AF2)
timer A00 AF2
# pin A00: TIM5 CH1 (AF2)
timer B01 AF1
# pin B01: TIM1 CH3N (AF1)
timer B04 AF2
# pin B04: TIM3 CH1 (AF2)

# dma
dma ADC 1 1
# ADC 1: DMA2 Stream 4 Channel 0
dma pin C06 0
# pin C06: DMA2 Stream 2 Channel 0
dma pin C07 1
# pin C07: DMA2 Stream 3 Channel 7
dma pin C08 1
# pin C08: DMA2 Stream 4 Channel 7
dma pin C09 0
# pin C09: DMA2 Stream 7 Channel 7
dma pin B08 0
# pin B08: DMA1 Stream 7 Channel 2
dma pin A02 0
# pin A02: DMA1 Stream 1 Channel 3
dma pin B07 0
# pin B07: DMA1 Stream 3 Channel 2
dma pin A03 1
# pin A03: DMA1 Stream 6 Channel 3
dma pin A01 0
# pin A01: DMA1 Stream 4 Channel 6
dma pin B00 1
# pin B00: DMA2 Stream 2 Channel 6
dma pin B05 0
# pin B05: DMA1 Stream 5 Channel 5
dma pin A00 0
# pin A00: DMA1 Stream 2 Channel 6
dma pin B01 0
# pin B01: DMA2 Stream 6 Channel 0
dma pin B04 0
# pin B04: DMA1 Stream 4 Channel 5

# feature
feature OSD

# master
set mag_bustype = NONE
set baro_bustype = I2C
set baro_i2c_device = 2
set blackbox_device = SPIFLASH
set beeper_inversion = ON
set beeper_od = OFF
set max7456_spi_bus = 3
set flash_spi_bus = 2
set gyro_1_bustype = SPI
set gyro_1_spibus = 1
set gyro_1_sensor_align = CW270
set gyro_1_align_yaw = 2700

*/


-inline')
$ThumbCopyWith<$Res> get media {

  return $ThumbCopyWith<$Res>(_self.media, (value) {
    return _then(_self.copyWith(media: value));
  });
}
}

// dart format on
// GENERATED CODE - DO NOT MODIFY BY HAND
// coverage:ignore-file
// ignore_for_file: type=lint
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark

part of 'jm_week_ranking_json.dart';

// **************************************************************************
// FreezedGenerator
// **************************************************************************

// dart format off
T _$identity<T>(T value) => value;

/// @nodoc
mixin _$JmWeekRankingJson {

@JsonKey(name: "list") List<ListElement> get list;
/// Create a copy of JmWeekRankingJson
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$JmWeekRankingJsonCopyWith<JmWeekRankingJson> get copyWith => _$JmWeekRankingJsonCopyWithImpl<JmWeekRankingJson>(this as JmWeekRankingJson, _$identity);

  /// Serializes this JmWeekRankingJson to a JSON map.
  Map<String, dynamic> toJson();

@override
bool operator ==(Object other) {
  return identical(this, other) || (other.runtimeType == runtimeType&&other is JmWeekRankingJson&&const DeepCollectionEquality().equals(other.list, list));
}

@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,const DeepCollectionEquality().hash(list));

@override
String toString() {
  return 'JmWeekRankingJson(list: $list)';
}

}

/// @nodoc
abstract mixin class $JmWeekRankingJsonCopyWith<$Res>  {
  factory $JmWeekRankingJsonCopyWith(JmWeekRankingJson value, $Res Function(JmWeekRankingJson) _then) = _$JmWeekRankingJsonCopyWithImpl;
@useResult
$Res call({
@JsonKey(name: "list") List<ListElement> list
});

}
/// @nodoc
class _$JmWeekRankingJsonCopyWithImpl<$Res>
    implements $JmWeekRankingJsonCopyWith<$Res> {
  _$JmWeekRankingJsonCopyWithImpl(this._self, this._then);

  final JmWeekRankingJson _self;
  final $Res Function(JmWeekRankingJson) _then;

/// Create a copy of JmWeekRankingJson
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? list = null,}) {
  return _then(_self.copyWith(
list: null == list ? _self.list : list // ignore: cast_nullable_to_non_nullable
as List<ListElement>,
  ));
}

}

/// Adds pattern-matching-related methods to [JmWeekRankingJson].
extension JmWeekRankingJsonPatterns on JmWeekRankingJson {
/// A variant of `map` that fallback to returning `orElse`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
///   case final Subclass value:
///     return ...;
///   case _:
///     return orElse();
/// }
/// ```

@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Fun


    return TRUE;
  }

  //
  // Depex section not in the encapsulated section.
  //
  Status = PeiServicesFfsFindSectionData (
              EFI_SECTION_PEI_DEPEX,
              FileHandle,
              (VOID **)&DepexData
              );

  if (EFI_ERROR (Status)) {
    //
    // If there is no DEPEX, assume the module can be executed
    //
    DEBUG ((DEBUG_DISPATCH, "  RESULT = TRUE (No DEPEX)\n"));
    return TRUE;
  }

  //
  // Evaluate a given DEPEX
  //
  return PeimDispatchReadiness (&Private->Ps, DepexData);
}

/**
  This routine enable a PEIM to register itself to shadow when PEI Foundation
  discovery permanent memory.

  @param FileHandle             File handle of a PEIM.

  @retval EFI_NOT_FOUND         The file handle doesn't point to PEIM itself.
  @retval EFI_ALREADY_STARTED   Indicate that the PEIM has been registered itself.
  @retval EFI_SUCCESS           Successfully to register itself.

**/
EFI_STATUS
EFIAPI
PeiRegisterForShadow (
  IN EFI_PEI_FILE_HANDLE       FileHandle
  )
{
  PEI_CORE_INSTANCE            *Private;
  Private = PEI_CORE_INSTANCE_FROM_PS_THIS (GetPeiServicesTablePointer ());

  if (Private->CurrentFileHandle != FileHandle) {
    //
    // The FileHandle must be for the current PEIM
    //
    return EFI_NOT_FOUND;
  }

  if (Private->Fv[Private->CurrentPeimFvCount].PeimState[Private->CurrentPeimCount] >= PEIM_STATE_REGISITER_FOR_SHADOW) {
    //
    // If the PEIM has already entered the PEIM_STATE_REGISTER_FOR_SHADOW or PEIM_STATE_DONE then it's already been started
    //
    return EFI_ALREADY_STARTED;
  }

  Private->Fv[Private->CurrentPeimFvCount].PeimState[Private->CurrentPeimCount] = PEIM_STATE_REGISITER_FOR_SHADOW;

  return EFI_SUCCESS;
}


и: ярлык не может написать текст и выполнить команду одновременно.

Ярлык

Текстовая форма нажатия клавиш, в том же формате, как и в окне конфигурации.

Код

Численное представление комбинации клавиши, которые образуются и используются в программе. Этот код используется только, если поле Ярлык ошибочно.

РазличатьЛеваяПравая

Указывает программе различать нажатия между левой и правой сторонами специальных клавиш. Если этот параметр равен 1, Ctrl, Alt, Shift и Win клавиши, расположенные в левой части клавиатуры отличаются от их эквивалента на правой стороне. Это позволяет создавать больше комбинаций. Если эта настройка равна 0 (значение по умолчанию), сторона специальных клавиш не играет роли в нажатии клавиш.

Директория (только режим команд)

Папка запуска команды. Если не указано, программа использует папку исполняемого файла.

Окно (только режим команд)

Первоначальный размер главного окна запускаемой программы, варианты: Нормально, Свернуто, Развернуто.

Программы, ВсехПрограммКроме (взаимоисключения)

Условие активации: список только программ  для которых активирован ярлык  (Программы) или отключен (ВсехПрограммКроме). Программы разделяются запятыми. Они не имеют полного пути:только имя файла с расширением.

CapsLock, NumLock, ScrollLock

Если указано, определяет условия для активации ярлыка. Допустимые значения: нет условий (по умолчанию), должно быть вкл. и должно быть выкл..

Опции ком


nfig_report() {
    echo "Generating configuration audit report..."

    # 运行配置审计并保存结果
    ./scripts/config-audit.sh > reports/security/config-audit.txt 2>&1

    echo "Configuration audit report generated"
}

# 生成综合报告
generate_summary_report() {
    echo "Generating summary report..."

    cat > reports/security/security-summary.md << EOF
# 安全审计报告

**生成时间**: $(date)
**项目**: $(basename $(pwd))

## 审计概述

本报告包含了项目的全面安全审计结果。

## 依赖安全

\`\`\`
$(cat reports/security/dependency-audit.json | jq '.' 2>/dev/null || echo "No dependency issues found")
\`\`\`

## 代码安全

\`\`\`
$(cat reports/security/code-audit.txt)
\`\`\`

## 配置安全

\`\`\`
$(cat reports/security/config-audit.txt)
\`\`\`

## 建议

基于审计结果，建议：

1. 及时更新有安全漏洞的依赖
2. 修复代码中的安全问题
3. 优化配置以提高安全性
4. 定期进行安全审计

EOF

    echo "Summary report generated"
}

# 主函数
main() {
    generate_dependency_report
    generate_code_report
    generate_config_report
    generate_summary_report

    echo "Security audit report generated successfully!"
    echo "Reports saved to: reports/security/"
}

main "$@"
```

---

## 📝 最佳实践

### 安全审计原则

1. **定期审计**: 定期进行安全审计
2. **全面覆盖**: 覆盖所有安全方面
3. **及时修复**: 及时修复发现的问题
4. **持续改进**: 持续改进安全措施

### 审计检查清单

- [ ] 依赖安全审计
- [ ] 代码安全审计
- [ ] 配置安全审计
- [ ] 许可证审计
- [ ] 漏洞扫描
- [ ] 合规性检查
- [ ] 安全报告生成
- [ ] 问题跟踪和修复

### 维护建议

1. **自动化审计**: 自动化安全审计流程
2. **集成CI/CD**: 集成到CI/CD流程
3. **定期更新**: 定期更新审计工具
4. **团队培训**: 定期进行安全培训
5. **事件响应**: 建立安全事件响应流程

---

-**遵循这些安全审计配置，您将能够建立全面、有效的安全审计体系！🦀**-
# 🦀 Rust部署指南

**创建时间**: 2025年9月25日
**版本**: 1.0.0
**适用对象**: 所有Rust开发者

---

## 📋 目录

- [🦀 Rust部署指南](#-rust部署指南)
  - [📋 目录](#-目录)
  - [🎯 部署概述](#-部署概述)
  - [🐳 Docker部署](#-docker部署)
  - [☸ Kubernetes部署](#-kubernetes部署)
  - [🌐 云平台部署](#-云平台部署)
  - [📦 包管理部署](#-包管理部署)
  - [🔧 环境配置](#-环境配置)
  - [📊 部署监控](#-部署监控)
  - [📝 最佳实践](#-最佳实践)

---

## 🎯 部署概述

### 部署目标

1. **可靠性**: 确保部署的可靠性
2. **可扩展性**: 支持水平扩展
3. **安全性**: 保证


//
//  BRCryptoWalletP.h
//  BRCore
//
//  Created by Ed Gamble on 11/22/19.
//  Copyright © 2019 Breadwinner AG. All rights reserved.
//
//  See the LICENSE file at the project root for license information.
//  See the CONTRIBUTORS file at the project root for a list of contributors.

#ifndef BRCryptoWalletP_h
#define BRCryptoWalletP_h

#include <pthread.h>

#include "BRCryptoWallet.h"
#include "BRCryptoBaseP.h"

#include "bitcoin/BRWallet.h"
#include "bitcoin/BRWalletManager.h"

#include "ethereum/BREthereum.h"
#include "generic/BRGeneric.h"

#ifdef __cplusplus
extern "C" {
#endif

struct BRCryptoWalletRecord {
    pthread_mutex_t lock;

    BRCryptoBlockChainType type;
    union {
        struct {
            BRWalletManager bwm;
            BRWallet *wid;
        } btc;

        struct {
            BREthereumEWM ewm;
            BREthereumWallet wid;
        } eth;

        // The GEN wallet is owned by the GEN Manager!
        BRGenericWallet gen;
    } u;

    BRCryptoWalletState state;

    BRCryptoUnit unit;
    BRCryptoUnit unitForFee;

    //
    // Do we hold transfers here?  The BRWallet and the BREthereumWallet already hold transfers.
    // Shouldn't we defer to those to get transfers (and then wrap them in BRCryptoTransfer)?
    // Then we avoid caching trouble (in part).  For a newly created transaction (not yet signed),
    // the BRWallet will not hold a BRTransaction however, BREthereumWallet will hold a new
    // BREthereumTransaction. From BRWalet: `assert(tx != NULL && BRTransactionIsSigned(tx));`
    //
    // We are going to have the same
    //
    BRArrayOf (BRCryptoTransfer) transfers;

    BRCryptoRef ref;
};

/// MARK: - Wallet

private_extern BRCryptoBlockChainType
cryptoWalletGetType (BRCryptoWallet wallet);

private_extern void
cryptoWalletSetState (BRCryptoWallet wallet,
                      BRCryptoWalletState state);

private_extern BRWallet *
cryptoWalletAsBTC (BRCryptoWallet wallet);

private_extern BREthereumWallet
cryptoWalletAsETH (BRCryptoWallet wallet);

private_extern BRGenericWallet
cryptoWalletAsGEN (BRCryptoWallet wallet);

private_extern BRCryptoWallet
cryptoWalletCreateAsBTC (BRCryptoUnit unit,
                         BRCryptoUnit unitForFee,
                         BRWalletManager bwm,
                         BRWallet *wid);

private_extern BRCryptoWallet
cryptoWalletCreateAsETH (BRCryptoUnit unit,
                         BRCryptoUnit unitForFee,
                         BREthereumEWM ewm,
                         BREthereumWallet wid);

private_extern BRCryptoWallet
cryptoWalletCreateAsGEN (BRCryptoUnit unit,
                         BRCryptoUnit unitForFee,
                         BRGenericWallet wid);

private_extern BRCryptoTransfer
cryptoWalletFindTransferAsBTC (BRCryptoWallet wallet,
                               BRTransaction *btc);

private_extern BRCryptoTransfer
cryptoWalletFindTransferAsETH (BRCryptoWallet wallet,
                               BREthereumTransfer eth);

private_extern BRCryptoTransfer
cryptoWalletFindTransferAsGEN (BRCryptoWallet wallet,
                               BRGenericTransfer gen);

private_extern void
cryptoWalletAddTransfer (BRCryptoWallet wallet, BRCryptoTransfer transfer);

private_extern void
cryptoWalletRemTransfer (BRCryptoWallet wallet, BRCryptoTransfer transfer);

/// MARK: - Wallet Sweeper

private_extern BRWalletSweeper
cryptoWalletSweeperAsBTC (BRCryptoWalletSweeper sweeper);

#ifdef __cplusplus
}
#endif

#endif /* BRCryptoWalletP_h */


ify_mark]
  411 root       0:00 [crypto]
  467 root       0:00 [kapmd]
  507 root       0:00 [mtdblock0]
  512 root       0:00 [mtdblock1]
  517 root       0:00 [mtdblock2]
  522 root       0:00 [mtdblock3]
  527 root       0:00 [mtdblock4]
  532 root       0:00 [mtdblock5]
  540 root       0:00 [ubi_bgt0d]
  572 root       0:00 [vpu_wq]
  577 root       0:00 [galcore workque]
  578 root       0:00 [kworker/0:1]
  579 root       0:00 [galcore daemon ]
  580 root       0:00 [galcore daemon ]
  646 root       0:00 [scsi_eh_0]
  647 root       0:00 [usb-storage]
  723 root       0:00 [kworker/u:2]
  725 root       0:00 [kworker/0:2]
  756 root       0:00 race_daemon sda true /devices/platform/fsl-ehci.0/usb1/1-
  788 root       0:00 [ubi_bgt1d]
  792 root       0:00 [ubi_bgt2d]
  795 root       0:00 [ubifs_bgt1_0]
  798 root       0:00 [ubifs_bgt2_0]
  808 root       0:00 ./vmf
  811 root       0:00 ./pwr_agent -o -v
  812 root       0:00 ./sysupdate
  825 root       0:00 ./mfid
  833 root       0:00 -sh
  842 root       0:00 ./vgw
  848 root       0:00 [irq/283-atmel_m]
  872 root       0:02 ./hmi
  874 root       0:03 ./media
  876 root       0:00 ./pss
  880 root       0:00 ./audio_proc
  919 root       0:02 ./bt
  921 root       0:00 ./exlap
  958 root       0:02 /usr/bin/devicemanager 5 0 /usr/bin 239 393247 1 1  0 0 0
  967 root       0:00 [race_daemon]
  981 root       0:00 ./diag
  983 root       0:00 ./diag_eol
  987 root       0:00 ./screenshot
  992 root       0:00 [flush-ubifs_1_0]
  993 root       0:00 [flush-ubifs_2_0]
  998 root       0:00 ./mdnsd -debug
 1009 root       0:00 ./connect_mgr
 1014 root       0:00 ./carplay_App
 1021 root       0:00 ./iap2d
 1024 root       0:00 ./carlife_daemon
 1026 root       0:00 ./carplayd
 1050 root       0:00 {clear-cache.sh} /bin/sh ./clear-cache.sh
 1095 root       0:00 [flush-8:0]
 1106 root       0:00 sleep 2
 1107 root       0:00 ps -ef

发现有很多进程，由于名字都是缩写，很难直接猜出这些程序的用途。例如vmf、mfid、vgw、hmi、exlap、diag等等这些都是鬼？他们大多没有-h –help 之类能显示信息的参数可用，想知道他们的用途，估计是要上IDA逆向一下……

经过了几天的研究，我终于知道了部分核心程序的用途。

他这套软件，大部分都是在后台工作的，只有少部分是QT编写的，有界面的。例如hmi和sysupdate。其中hmi体积最大，他就是界面主程序，他包含了所有的


pub struct ExecutionResult {
    pub command_id: CommandId,
    pub focus_id: Option<CommandId>,
    pub exit_code: i32,
    pub aborted: bool,
    pub duration: Option<std::time::Duration>,
}

impl ExecutionResult {
    pub fn is_success(&self) -> bool {
        self.exit_code == 0
    }

    pub fn is_aborted(&self) -> bool {
        self.aborted
    }
}

#[derive(Debug, Clone)]
pub struct ExecutionContext {
    pub options: config::Options,
    pub env: Env,
    pub cwd: PathBuf,
    pub log_dir: PathBuf,
    pub state: ExecutionState,
    pub will_execute: bool,
    pub current: Option<(CommandId, Command)>,
    pub focus: Option<CommandId>,
    pub previous: Option<ExecutionResult>,
}

impl ExecutionContext {
    pub fn new(options: config::Options, cwd: PathBuf) -> Self {
        Self {
            options,
            cwd,
            env: Env::default(),
            log_dir: PathBuf::new(),
            state: ExecutionState::Running,
            will_execute: true,
            current: None,
            focus: None,
            previous: None,
        }
    }

    pub fn is_in_hook(&self) -> bool {
        if let Some((_, command)) = &self.current {
            command.is_hook
        } else {
            false
        }
    }

    pub fn current_command_id(&self) -> &CommandId {
        self.current.as_ref().map(|(id, _)| id).expect("No current command")
    }
}

/// Reads the contents of a file into a buffer.
fn read_buffer<T: std::io::Read>(source: &mut BufReader<T>, buffer: &mut [u8]) -> io::Result<Option<usize>> {
    match source.read(buffer) {
        Ok(count) => Ok(Some(count)),
        Err(e) => match e.kind() {
            io::ErrorKind::WouldBlock => Ok(None),
            _ => Err(e),
        },
    }
}

fn capture_stream<T: std::io::Read + std::marker::Send + 'static>(
    source: BufReader<T>,
    sender: Sender<([u8; BUFFER_SIZE], usize, InputStream)>,
    stream: InputStream,
) -> JoinHandle<anyhow::Result<()>> {
    thread::spawn(move || {
        let mut buffer = [0; BUFFER_SIZE];
        let mut source = source;

        loop {
            match read_buffer(&mut source, &mut buffer) {
                Ok(None) => break,
                Ok(Some(size)) if size == 0 => {
                    break;
                }
                Ok(Some(size)) => {
                    sender.send((buffer, size, stream)).unwrap();
                }

                Err(e) => return Err(anyhow::Error::from(e)),
            }
        }
        Ok(())
    })
}

const BUFFER_SIZE: usize = 1024; // 1 KB

/// Responsible for executing a command and capturing its output.
pub fn capture_command(
    child: &std::process::Child,
    output: &mut MultiOutputStream,
) -> Result<()> {
    let stdout = BufReader::new(unsafe {
        File::from_raw_fd(child.stdout.as_ref().unwrap().as_raw_fd())
    });
    let stderr = BufReader::new(unsafe {
        File::from_raw_fd(child.stderr.as_ref().unwrap().as_raw_fd())
    });

    let (s1, r) = bounded(4);
    let s2 = s1.clone();

    let thread_stdout = capture_stream(stdout, s1, InputStream::Stdout);
    let thread_stderr = capture_stream(stderr, s2, InputStream::Stderr);

    for (buffer, size, stream) in r {
        output.write_stream(stream, &buffer[..size])?;


;>   HAL_RCC_GetPCLK1Freq

>>   HAL_RCC_GetPCLK2Freq

HAL_RCC_GetPCLK1Freq (Thumb, 26 bytes, Stack size 4 bytes, stm32h7xx_hal_rcc.o(i.HAL_RCC_GetPCLK1Freq))

[Stack]

Max Depth = 32
Call Chain = HAL_RCC_GetPCLK1Freq ⇒ HAL_RCC_GetHCLKFreq ⇒ HAL_RCC_GetSysClockFreq

[Calls]

>>   HAL_RCC_GetHCLKFreq

[Called By]

>>   UART_SetConfig

HAL_RCC_GetPCLK2Freq (Thumb, 26 bytes, Stack size 4 bytes, stm32h7xx_hal_rcc.o(i.HAL_RCC_GetPCLK2Freq))

[Stack]

Max Depth = 32
Call Chain = HAL_RCC_GetPCLK2Freq ⇒ HAL_RCC_GetHCLKFreq ⇒ HAL_RCC_GetSysClockFreq

[Calls]

>>   HAL_RCC_GetHCLKFreq

[Called By]

>>   UART_SetConfig

>>   HAL_InitTick

HAL_RCC_GetSysClockFreq (Thumb, 524 bytes, Stack size 20 bytes, stm32h7xx_hal_rcc.o(i.HAL_RCC_GetSysClockFreq))

[Stack]

Max Depth = 20
Call Chain = HAL_RCC_GetSysClockFreq

[Called By]

>>   HAL_RCC_ClockConfig

>>   HAL_Init

>>   Delay_us

>>   HAL_RCC_GetHCLKFreq

>>   Generate_Time_Points

HAL_RCC_OscConfig (Thumb, 2130 bytes, Stack size 32 bytes, stm32h7xx_hal_rcc.o(i.HAL_RCC_OscConfig))

[Stack]

Max Depth = 32
Call Chain = HAL_RCC_OscConfig

[Calls]

>>   HAL_GetREVID

>>   HAL_GetTick

[Called By]

>>   SystemClock_Config

HAL_TIMEx_Break2Callback (Thum


goldCoast2.jpeg" title="surfers paradise">}}
{{< gallery src="/img//GoldenCoast/goldCoast3.jpeg">}}
{{< gallery src="/img//GoldenCoast/goldCoast8.jpeg" title="With baby😍">}}
{{< gallery src="/img//GoldenCoast/goldCoast5.jpeg" title="Parasail 😍">}}
{{< gallery src="/img//GoldenCoast/goldCoast4.jpeg">}}
{{< gallery src="/img//GoldenCoast/goldCoast6.jpeg">}}
{{< gallery src="/img//GoldenCoast/goldCoast7.jpeg">}}
{{< gallery src="/img//GoldenCoast/goldCoast9.jpeg">}}
{{< gallery src="/img//GoldenCoast/goldCoast10.jpeg">}}
{{< gallery src="/img//GoldenCoast/goldCoast11.jpeg">}}
{{< gallery src="/img//GoldenCoast/goldCoast12.jpeg">}}
{{< gallery src="/img//GoldenCoast/goldCoast14.jpeg">}}
{{< /galleries >}}

# MELBOURNE
{{< galleries >}}
{{< gallery src="/img//Melbourne/melbourne1.jpeg" title="With Baby 😍">}}
{{< gallery src="/img//Melbourne/melbourne2.jpeg">}}
{{< gallery src="/img//Melbourne/melbourne3.jpeg">}}
{{< gallery src="/img//Melbourne/melbourne4.jpeg">}}
{{< gallery src="/img//Melbourne/melbourne5.jpeg">}}
{{< gallery src="/img//Melbourne/melbourne6.jpeg">}}
{{< gallery src="/img//Melbourne/melbourne7.jpeg">}}
{{< gallery src="/img//Melbourne/melbourne8.jpeg">}}
{{< gallery src="/img//Melbourne/melbourne9.jpeg">}}
{{< gallery src="/img//Melbourne/melbourne10.jpeg">}}
{{< gallery src="/img//Melbourne/melbourne11.jpeg">}}
{{< gallery src="/img//Melbourne/melbourne12.jpeg">}}
{{< gallery src="/img//Melbourne/melbourne13.jpeg">}}
{{< gallery src="/img//Melbourne/melbourne14.jpeg">}}
{{< gallery src="/img//Melbourne/melbourne15.jpeg">}}
{{< /galleries >}}---
title: "Download APache Maven on MacOS"
date: 2023-01-19T00:15:03Z
lastmod: 2023-01-18T08:34:35Z
draft: false
author: ["Martin"]
tags:
- Apache
description: ""
weight: # 输入1可以顶置文章，用来给文章展示排序，不填就默认按时间排序
slug: ""
comments: true
showToc: true # 显示目录
TocOpen: true # 自动展开目录
hidemeta: false # 是否隐藏文章的元信息，如发布日期、作者等
disableShare: false # 底部不显示分享栏
showbreadcrumbs: true #顶部显示当前路径
cover:
    image: ""
    caption: ""
    alt: ""
    relative: false
---
I finally got maven installed, and the steps were generally easy, but I stepped in a few holes, I'll record them.

# Download APache Maven

Website📡: [Apache-Maven](https://maven.apache.org/download.cgi)

Choose Binary zip archive and download it.

# Unzip the zip archive
I unzip it into /Libaray on my computer.

# Configuration
``` bash
vi .bash_profile
```
Add 2 lines into this profile
```bash
export M2_HOME=/Library/apache-maven-3.8.7 // Or you can choose your own path and folder
export PATH=$PATH:$M2_HOME/bin
```
Then, type ```:wq```, save and quit vim.

# Check if it is successful
```bash
(base) ******** ~ % mvn -verison

//If terminal output like this, congratulations!

Apache Maven 3.8.7 (b89d5959fcde851


f the aggregation circuit and returns the
// corresponding proof.
func MakeProof(
	setup *circuits.Setup,
	maxNbProof int,
	proofClaims []ProofClaimAssignment,
	piInfo PiInfo,
	publicInput fr.Element,
) (
	plonk.Proof,
	error,
) {

	logrus.Infof("Creating the assignment")
	assignment, err := AssignAggregationCircuit(
		maxNbProof,
		proofClaims,
		piInfo,
		publicInput,
	)

	if err != nil {
		return nil, fmt.Errorf("while generating the aggregation circuit assignment: %w", err)
	}

	logrus.Infof("Running the prove-check")
	return circuits.ProveCheck(
		setup,
		assignment,
		emPlonk.GetNativeProverOptions(ecc.BN254.ScalarField(), setup.Circuit.Field()),
		emPlonk.GetNativeVerifierOptions(ecc.BN254.ScalarField(), setup.Circuit.Field()),
	)
}

// Assigns the proof using placeholders
func AssignAggregationCircuit(maxNbProof int, proofClaims []ProofClaimAssignment, piInfo PiInfo, publicInput fr.Element) (c *Circuit, err error) {

	c = &Circuit{
		ProofClaims:                    make([]proofClaim, maxNbProof),
		PublicInputWitnessClaimIndexes: utils.ToVariableSlice(piInfo.ActualIndexes),
		PublicInput:                    publicInput,
	}

	if c.PublicInputProof, c.PublicInputWitness, err = piInfo.claim(); err != nil {
		return nil, fmt.Errorf("while emulating the PI proof claim: %w", err)
	}

	for i := range c.ProofClaims {
		if i < len(proofClaims) {
			c.ProofClaims[i], err = assignProofClaim(&proofClaims[i])
			if err != nil {
				return nil, fmt.Errorf(
					"while emulating the proof claim #%v (circ ID %v): %w",
					i, proofClaims[i].CircuitID, err,
				)
			}
		} else {
			// If we go over capacity, we should use the
			c.ProofClaims[i] = c.ProofClaims[len(proofClaims)-1]
		}
	}

	return c, nil
}
package emulation

import (
	"fmt"

	"github.com/consensys/gnark-crypto/ecc"
	"github.com/consensys/gnark/backend/plonk"
	"github.com/consensys/gnark/constraint"
	"github.com/consensys/gnark/frontend"
	"github.com/consensys/gnark/frontend/cs/scs"
)

type builder struct {
	innerVkeys []plonk.VerifyingKey
}

func NewBuilder(
	innerVkeys []plonk.VerifyingKey,
) *builder {
	return &builder{
		innerVkeys: innerVkeys,
	}
}

func (b *builder) Compile() (constraint.ConstraintSystem, error) {
	return MakeCS(b.innerVkeys)
}

// Generate the setup of the aggregation circuit. The provided innerCS can be
func MakeCS(
	innerVkeys []plonk.VerifyingKey,
) (constraint.ConstraintSystem, error) {

	outerCircuit, err := allocateOuterCircuit(innerVkeys)

	if err != nil {
		return nil, fmt.Errorf("while allocating the aggregation circuit: %w", err)
	}

	ccs, err := frontend.Compile(
		ecc.BN254.ScalarField(),
		scs.NewBuilder,
		outerCircuit,
		frontend.WithCapacity(1<<25),
	)

	if err !=


">   25 #include <vector>

   26

   27 class FixContactHertz : public Fix {

   28 public:

   29   FixContactHertz(class MPM *, vector<string>);

   30   ~FixContactHertz();

   31   void setmask();

   32   void init();

   33   void setup();

   34

   35   void initial_integrate();

   36   void post_particles_to_grid(){};

   37   void post_update_grid_state(){};

   38   void post_grid_to_point(){};

   39   void post_advance_particles(){};

   40   void post_velocities_to_grid(){};

   41   void final_integrate(){};

   42

   43 private:

   44   string usage = "Usage: fix(fix-ID, contact/hertz, solid1, solid2)\n";</di


 from jo_w6dgr0fe import tcbgbo4rsoq, ckli2hj_2i1 as r4stb3dk0n4, yhr1r45sl1v as h_lzw56c96a, dbxp_aeqe33, fp_p5j2ntxt, uhfcpnyy3t5 as kyka_la0hha
    '# jackboxes_alkalinity_pyramid -> manpower_reviews_gloves'
    assert ikuokf6ztpe, None
    import sq3_3f3y5zd, dyqmb2nq2jt, qo8a603qi5u as lrq5sq4dn0m, f5qt_1q5mfi as hzhh0aw1a0f, atvsnctu3p6, q5alz2rlrpf, peaxo8rjs2m as l6e4o_u9_c5
    b''
    global ukx8w9ci3e9
    raise fq298i1shvs
    del egigadbfval
    import dyxa6uc6y3p as ootsmf97ff2, per35pz2c_n, bx4qh96nict, o1bhingzku5 as wqsmddmhjpc, bh_3taw488a
def h64a2mnyvuv(v_0agtbwufi, rip2zd4gvnq: v_4y2tdjj3u):
    qezypnohlxz = 0j
    assert l6tfohzy53s
    lo7q3_crjn7
    from aysm4k2ewbz import crq36l4enij as lsrbri4512t, tkyvn_zjoep, lqt8ebwza0e as tko02aonofc
    nonlocal nx65ao11if3
    global t0byegmd27i
    '# jackboxes_alkalinity_pyramid -> manpower_reviews_gloves'
    return
    '# jackboxes_alkalinity_pyramid -> manpower_reviews_gloves'
    gt23mtklqly ^= ''
    pass
    (j3dmeqx4b5e): False = qjeu0hsiuwr
    '# jackboxes_alkalinity_pyramid -> manpower_reviews_gloves'
@b'' > huv9cabhoof
def n8ubxwygx73(gay4ruqz60_, acd1hgs22vj: bgdc7yoc5z0, vtu20ps_p1l):
    """# jackboxes_alkalinity_pyramid -> manpower_reviews_gloves"""
    del ye1g6g2dm4n
    assert h_bzcrs78da, 0.0
    pass
    global ky5projsmh3
    nonlocal k7o6qtfrctp
    '# jackboxes_alkalinity_pyramid -> manpower_reviews_gloves'
    False .mt0dryyyd4g: p5c5vl9ofgq = x1t96cr71eh
    import hwjkn5sxxb8, dfq3jokdva9, eo5x_c_6m95 as gkk_nfrkfks, mixgvcvl0gm as jfijdzs1o8i, d8ir2w9wu7_, f3xwru_ho5j as hmswq8x96sd
    raise 0
    bki9s0mbx24[0.0] <<= ''
    k2npnzzujbj
    '# jackboxes_alkalinity_pyramid -> manpower_reviews_gloves'


//
//     Generated by class-dump 3.5 (64 bit).
//
//     class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard.
//

#import "NSControl.h"

@class NSImage, NSTimer, NSTrackingArea;

@interface GPURenderBufferButton : NSControl
{
    NSTrackingArea *_ta;
    NSImage *_currentImage;
    NSTimer *_imageUpdateTimer;
    NSImage *_image;
    NSImage *_overImage;
    struct {
        unsigned int mouseInside:1;
        unsigned int mouseDown:1;
        unsigned int sentAction:1;
        unsigned int firstResponder:1;
        unsigned int _pad:4;
    } _state;
}

+ (Class)cellClass;
@property(retain, nonatomic) NSImage *overImage; // @synthesize overImage=_overImage;
@property(retain, nonatomic) NSImage *image; // @synthesize image=_image;
- (id).cxx_construct;
- (void).cxx_destruct;
- (id)accessibilityAttributeValue:(id)arg1;
- (id)accessibilityAttributeNames;
- (BOOL)accessibilityIsIgnored;
- (void)viewWillMoveToWindow:(id)arg1;
- (void)updateTrackingAreas;
- (void)drawRect:(struct CGRect)arg1;
- (BOOL)resignFirstResponder;
- (BOOL)becomeFirstResponder;
- (BOOL)acceptsFirstMouse:(id)arg1;
- (void)mouseExited:(id)arg1;
- (void)mouseEntered:(id)arg1;
- (void)_updateImage:(id)arg1;
- (void)mouseUp:(id)arg1;
- (void)mouseDown:(id)arg1;
- (id)_filtersForMousePressed;
- (id)_filtersForDisabled;
- (void)_updateFilters;
- (void)setEnabled:(BOOL)arg1;
- (BOOL)isOpaque;
- (id)initWithFrame:(struct CGRect)arg1;

@end


;
        done = true;
        that.$$resolve(val);
      }
      function rejectPromise(val) {
        if (done) return;
        done = true;
        that.$$reject(val);
      }
    },

    reject: function(reason) {
      if (this.promise.$$state.status) return;
      this.$$reject(reason);
    },

    $$reject: function(reason) {
      this.promise.$$state.value = reason;
      this.promise.$$state.status = 2;
      scheduleProcessQueue(this.promise.$$state);
    },

    notify: function(progress) {
      var callbacks = this.promise.$$state.pending;

      if ((this.promise.$$state.status <= 0) && callbacks && callbacks.length) {
        nextTick(function() {
          var callback, result;
          for (var i = 0, ii = callbacks.length; i < ii; i++) {
            result = callbacks[i][0];
            callback = callbacks[i][3];
            try {
              result.notify(isFunction(callback) ? callback(progress) : progress);
            } catch (e) {
              exceptionHandler(e);
            }
          }
        });
      }
    }
  });

  /**
   * @ngdoc method
   * @name $q#reject
   * @kind function
   *
   * @description
   * Creates a promise that is resolved as rejected with the specified `reason`. This api should be
   * used to forward rejection in a chain of promises. If you are dealing with the last promise in
   * a promise chain, you don't need to worry about it.
   *
   * When comparing deferreds/promises to the familiar behavior of try/catch/throw, think of
   * `reject` as the `throw` keyword in JavaScript. This also means that if you "catch" an error via
   * a promise error callback and you want to forward the error to the promise derived from the
   * current promise, you have to "rethrow" the error by returning a rejection constructed via
   * `reject`.
   *
   * ```js
   *   promiseB = promiseA.then(function(result) {
   *     // success: do something and resolve promiseB
   *     //          with the old or a new result
   *     return result;
   *   }, function(reason) {
   *     // error: handle the error if possible and
   *     //        resolve promiseB with newPromiseOrValue,
   *     //        otherwise forward the rejection to promiseB
   *     if (canHandle(reason)) {
   *      // handle the error and recover
   *      return newPromiseOrValue;
   *     }
   *     return $q.reject(reason);
   *   });
   * ```
   *
   * @param {*} reason Constant, message, exception or an object representing the rejection reason.
   * @returns {Promise} Returns a promise that was already resolved as rejected with the `reason`.
   */
  var reject = function(reason) {
    var result = new Deferred();
    result.reject(reason);
    return result.promise;
  };

  var makePromise = function makePromise(value, resolved) {
    var result = new Deferred();
    if (resolved) {
      result.resolve(value);
    } else {
      result.reject(value);
    }
    return result.promise;
  };

  var handleCallback = function handleCallback(value, isResolved, callback) {
    var callbackOutput = null;
    try {
      if (isFunction(callback)) callbackOutput = callback();
    } catch (e) {
      return makePromise(e, false);
    }
    if (isPromiseLike(callbackOutput)) {
      return callbackOutput.then(function() {
        return makePromise(value, isResolved);
      }, function(error) {
        return makePromise(error, false);
      });
    } else {
      return makePromise(value, isResolved);


sleep = 1

num_wallets = 3
sleep_wallets = 1200

ref = '3UwGF8YNHXCK'

max_concurrent_wallets = 1

retray = 1

base_delay = 2.0 # Начальная задержка перед ретраем

backoff_factor = 2.0    # Множитель экспоненциального роста

max_delay = 50.0 # Максимальная задержка


  }

}
import { readRecords, saveRecords } from "../dao/contactsDao"
import { Contact } from "../models/contact"

export const fetchContacts = async (): Promise<Contact[]> => {
    console.log('fetch called')
    const all = await readRecords()
    if (all.length === 0) {
        return Promise.reject('no records found')
    } else {
        return all
    }
}

export const addContact = async (contactData: Contact): Promise<string> => {
    const all = await readRecords()
    if (all.find(c => c.id === contactData.id)) {
        return 'record exists'
    } else {
        all.push(contactData)
        return saveRecords(all)
    }
}

export const fetchContactById = async (id: number): Promise<Contact> => {
    const all = await readRecords()
    const found = all.find(c => c.id === id)
    if (!found) {
        return Promise.reject('record not found')
    }
    return found
}

export const fetchContactsByName = async (name: string): Promise<Contact[]> => {
    const all = await readRecords()
    const filtered = all.filter(c => c.name.toLowerCase().indexOf(name.toLowerCase()) !== -1)
    if (!filtered || filtered.length === 0) {
        return Promise.reject('no record foud')
    }
    return filtered
}

export const updateContact = async (data: Contact, id: number) => {
    const all = await readRecords()
    const found = all.find(c => c.id === id)

    if (!found) {
        return Promise.reject('record not found')
    } else {
        // for (const propName in data) {
        //     found[propName] = data[propName]
        // }
        const index = all.findIndex(c => c.id === found.id)
        const updatedRecord = { ...found, ...data }
        all.splice(index, 1, updatedRecord)
        return saveRecords(all)
    }
}

export const deleteContact = async (id: number) => {
    const all = await readRecords()
    const index = all.findIndex(c => c.id === id)
    if (index === -1) {
        return Promise.reject('record not found')
    } else {
        all.splice(index, 1)
        return saveRecords(all)
    }
}

import {toArray} from "../src/toArray";

describe('toArray tests', () => {

    it('should convert to array', () => {
        const data = {
            0: 'yee',
            1: 'boi',
            length: 2,
        }

        const arr = toArray(data)

        expect(Array.isArray(arr)).toBe(true)
        expect(arr.length).toBe(2)
    })

    it('should iterate until length is reached', () => {
        const data = {
            0: 'yee',
            1: 'boi',
            2: 'other_boi',
            length: 1,
        }

        const arr = toArray(data)

        expect(arr.length).toBe(1)
    })

})
import { ExtError, ExtErrorCode } from '../framework/error'
import { shortenTxt } from './transform'

export const is2xx = (httpCode?: number) => (httpCode && httpCode.toString()[0] === '2')
export const is4xx = (httpCode?: number) => (httpCode && httpCode.toString()[0] === '4')
export const is5xx = (httpCode?: number) => (httpCode && httpCode.toString()[0] ===


.read<TautulliState>()
              .api!
              .users
              .getUser(userId: widget.user.userId!),
        );
    // Initial load or refresh of the user watch stats
    context.read<TautulliState>().setUserWatchStats(
          widget.user.userId!,
          context.read<TautulliState>().api!.users.getUserWatchTimeStats(
              userId: widget.user.userId!, queryDays: [1, 7, 30, 0]),
        );
    // Initial load or refresh of the user player stats
    context.read<TautulliState>().setUserPlayerStats(
          widget.user.userId!,
          context
              .read<TautulliState>()
              .api!
              .users
              .getUserPlayerStats(userId: widget.user.userId!),
        );
    setState(() => _initialLoad = true);
    // This await keeps the refresh indicator showing until the data is loaded
    await Future.wait([
      context.read<TautulliState>().userProfile[widget.user.userId!]!,
      context.read<TautulliState>().userWatchStats[widget.user.userId!]!,
      context.read<TautulliState>().userPlayerStats[widget.user.userId!]!,
    ]);
  }

  @override
  Widget build(BuildContext context) {
    super.build(context);
    return LunaScaffold(
      scaffoldKey: _scaffoldKey,
      module: LunaModule.TAUTULLI,
      body: _initialLoad ? _body() : const LunaLoader(),
    );
  }

  Widget _body() {
    return LunaRefreshIndicator(
      context: context,
      key: _refreshKey,
      onRefresh: loadCallback,
      child: FutureBuilder(
        future: Future.wait([
          context.watch<TautulliState>().userProfile[widget.user.userId!]!,
          context.watch<TautulliState>().userWatchStats[widget.user.userId!]!,
          context.watch<TautulliState>().userPlayerStats[widget.user.userId!]!,
        ]),
        builder: (context, AsyncSnapshot<List<Object>> snapshot) {
          if (snapshot.hasError) {
            if (snapshot.connectionState != ConnectionState.waiting)
              LunaLogger().error(
                'Unable to fetch Tautulli user: ${widget.user.userId}',
                snapshot.error,
                snapshot.stackTrace,
              );
            return LunaMessage.error(onTap: _refreshKey.currentState!.show);
          }
          if (snapshot.hasData)
            return _list(
              user: snapshot.data![0] as TautulliUser,
              watchtime: snapshot.data![1] as List<TautulliUserWatchTimeStats>,
              player: snapshot.data![2] as List<TautulliUserPlayerStats>,
            );
          return const LunaLoader();
        },
      ),
    );
  }

  Widget _list({
    required TautulliUser user,
    required List<TautulliUserWatchTimeStats> watchtime,
    required List<TautulliUserPlayerStats> player,
  }) {
    return LunaListView(
      controller: TautulliUserDetailsNavigationBar.scrollControllers[0],
      children: [
        const LunaHeader(text: 'Profile'),
        _profile(user),
        const LunaHeader(text: 'Global Stats'),
        _globalStats(watchtime),
        if (player.isNotEmpty) const LunaHeader(text: 'Player Stats'),
        if (player.isNotEmpty) ..._playerStats(player),
      ],
    );
  }

  Widget _profile(TautulliUser user) {
    return LunaTableCard(
      content: [
        LunaTableContent(title: 'email', body: user.email),
        LunaTableContent(
          title: 'last seen',
          body: widget.user.lastSeen != null
              ? widget.user.l


func check_errata_2139242
	/* Applies to r0p0, r1p0, r1p1 */
	mov	x1, #0x11
	b	cpu_rev_var_ls
endfunc check_errata_2139242

	/* --------------------------------------------------
	 * Errata Workaround for Neoverse V1 Errata #2108267.
	 * This applies to revisions r0p0, r1p0, and r1p1, it
	 * is still open.
	 * x0: variant[4:7] and revision[0:3] of current cpu.
	 * Shall clobber: x0-x1, x17
	 * --------------------------------------------------
	 */
func errata_neoverse_v1_2108267_wa
	/* Check workaround compatibility. */
	mov	x17, x30
	bl	check_errata_2108267
	cbz	x0, 1f

	/* Apply the workaround. */
	mrs	x1, NEOVERSE_V1_CPUECTLR_EL1
	mov	x0, #NEOVERSE_V1_CPUECTLR_EL1_PF_MODE_CNSRV
	bfi	x1, x0, #CPUECTLR_EL1_PF_MODE_LSB, #CPUECTLR_EL1_PF_MODE_WIDTH
	msr	NEOVERSE_V1_CPUECTLR_EL1, x1
1:
	ret	x17
endfunc errata_neoverse_v1_2108267_wa

func check_errata_2108267
	/* Applies to r0p0, r1p0, r1p1 */
	mov	x1, #0x11
	b	cpu_rev_var_ls
endfunc check_errata_2108267

	/* --------------------------------------------------
	 * Errata Workaround for Neoverse V1 Errata #2216392.
	 * This applies to revisions r1p0 and r1p1 and is
	 * still open.
	 * This issue is also present in r0p0 but there is no
	 * workaround in that revision.
	 * x0: variant[4:7] and revision[0:3] of current cpu.
	 * Shall clobber: x0-x17
	 * --------------------------------------------------
	 */
func errata_neoverse_v1_2216392_wa
	/* Check workaround compatibility. */
	mov	x17, x30
	bl	check_errata_2216392
	cbz	x0, 1f

	ldr	x0, =0x5
	msr	S3_6_c15_c8_0, x0 /* CPUPSELR_EL3 */
	ldr	x0, =0x10F600E000
	msr	S3_6_c15_c8_2, x0 /* CPUPOR_EL3 */
	ldr	x0, =0x10FF80E000
	msr	S3_6_c15_c8_3, x0 /* CPUPMR_EL3 */
	ldr	x0, =0x80000000003FF
	msr	S3_6_c15_c8_1, x0 /* CPUPCR_EL3 */

	isb
1:
	ret	x17
endfunc errata_neoverse_v1_2216392_wa

func check_errata_2216392
	/* Applies to revisions r1p0 and r1p1. */
	mov	x1, #CPU_REV(1, 0)
	mov	x2, #CPU_REV(1, 1)
	b	cpu_rev_var_range
endfunc check_errata_2216392

	/* -----------------------------------------------------------------
	 * Errata Workaround for Neoverse V1 Errata #2294912.
	 * This applies to revisions r0


;
    double minLineHeight = double.infinity;
    double maxLineHeight = 0;
    double totalLineHeight = 0;
    double maxLineAscent = 0,
        maxLineDescent = 0,
        minLineAscent = double.infinity,
        minLineDescent = double.infinity;
    double maxLineBaseline = 0;

    List<RichTextRun> runs = [];
    for (int i = 0; i < _runs.length; i++) {
      if (_maxLines > 0 && _lines.length >= _maxLines) {
        // 到达最大行数限制
        _showOverflow = true;
        return;
      } else if (totalLineHeight > maxHeight) {
        _showOverflow = true;
        // 到达最大高度限制
        return;
      }
      final run = _runs[i];
      final double runWidth = run.isTurn ? 0 : run.size.width;
      final double runHeight = run.isTurn ? 0 : run.size.height;
      minLineHeight = math.min(minLineHeight, runHeight);
      maxLineHeight = math.max(maxLineHeight, runHeight);
      minLineAscent = math.min(minLineAscent, run.ascent);
      maxLineAscent = math.max(maxLineAscent, run.ascent);
      minLineDescent = math.min(minLineDescent, run.descent);
      maxLineDescent = math.max(maxLineDescent, run.descent);
      maxLineBaseline = math.max(maxLineBaseline, run.baseline);
      if (run.isTurn || lineWidth + runWidth > maxWidth) {
        // 换行
        _addLine(
            runs,
            maxWidth,
            lineWidth,
            lineHeight,
            minLineHeight,
            maxLineHeight,
            minLineAscent,
            maxLineAscent,
            minLineDescent,
            maxLineDescent,
            maxLineBaseline);
        totalLineHeight += lineHeight;
        lineWidth = runWidth;
        lineHeight = runHeight;
        minLineHeight = lineHeight;
        maxLineHeight = lineHeight;
        maxLineAscent = run.ascent;
        maxLineDescent = run.descent;
        maxLineBaseline = run.baseline;
        minLineAscent = run.ascent;
        minLineDescent = run.descent;
        runs = [];
        runs.add(run);
      } else {
        lineWidth += runWidth;
        lineHeight = math.max(lineHeight, runHeight);
        runs.add(run);
      }
    }
    _addLine(
        runs,
        maxWidth,
        lineWidth,
        lineHeight,
        minLineHeight,
        maxLineHeight,
        minLineAscent,
        maxLineAscent,
        minLineDescent,
        maxLineDescent,
        maxLineBaseline);
  }

  void _addLine(
      List<RichTextRun> runs,
      double maxWidth,
      width,
      height,
      minHeight,
      maxHeight,
      minLineAscent,
      maxLineAscent,
      minLineDecent,
      maxLineDecent,
      maxLineBaseline) {
    if (runs.isEmpty) return;
    double dy = 0;
    int numberOfLines = _lines.length;
    if (numberOfLines > 0) {
      Rect bounds = _lines[numberOfLines - 1].bounds;
      dy = bounds.height + bounds.top;
    }
    final bounds = Rect.fromLTWH(0, dy, width, height);
    final RichTextLine lineInfo = RichTextLine(runs, bounds, maxWidth);
    lineInfo.minLineHeight = minHeight;
    lineInfo.maxLineHeight = maxHeight;
    lineInfo.minLineAscent = minLineAscent;
    lineInfo.maxLineAscent = maxLineAscent;
    lineInfo.minLineDecent = minLine


l2.197-2.41 149.013-148.715a32.107 32.107 0 0 1 42.944-2.134l2.432 2.198 126.443 126.826L713.344 350.7a32.085 32.085 0 0 1 45.27-.064z" /></symbol><symbol class="icon" viewBox="0 0 1024 1024"  id="local-icon-jingying_mian"><path d="M736 853.333a32 32 0 0 1 0 64H288a32 32 0 0 1 0-64h448zm106.667-746.666a96 96 0 0 1 96 96V672a96 96 0 0 1-96 96H181.333a96 96 0 0 1-96-96V202.667a96 96 0 0 1 96-96zm-84.054 243.968a32.085 32.085 0 0 0-45.269.064l-127.168 126.89-126.443-126.826-2.432-2.198a32.107 32.107 0 0 0-42.944 2.134L265.344 499.392l-2.197 2.432a31.787 31.787 0 0 0 2.24 42.667l2.453 2.176c12.587 10.197 31.104 9.429 42.816-2.24l126.272-126.038 126.464 126.848 2.41 2.198c12.587 10.304 31.211 9.6 42.966-2.134l149.888-149.589 2.197-2.432a31.787 31.787 0 0 0-2.24-42.645z" /></symbol><symbol class="icon" viewBox="0 0 1024 1024"  id="local-icon-jingyinggonglve"><path d="M618.667 259.563a10.667 10.667 0 0 0 15.68 9.386l38.272-20.394a21.333 21.333 0 0 1 20.096 0l38.272 20.416a10.667 10.667 0 0 0 15.68-9.408V106.667h42.666A85.333 85.333 0 0 1 874.667 192v640a85.333 85.333 0 0 1-85.334 85.333H234.667A85.333 85.333 0 0 1 149.333 832V192a85.333 85.333 0 0 1 85.334-85.333h384zM277.333 106.667H320v810.666h-42.667V106.667z" /></symbol><symbol class="icon" viewBox="0 0 1024 1024"  id="local-icon-jingzhunyingxiao"><path d="M512 106.667c60.01 0 116.97 13.034 168.213 36.437l-64.32 61.077a63.232 63.232 0 0 0-16.533 60.48l1.173 4.011 9.686 30.144A233.792 233.792 0 0 0 512 277.333C382.4 277.333 277.333 382.4 277.333 512S382.4 746.667 512 746.667 746.667 641.6 746.667 512c0-28.8-5.184-56.405-14.699-81.92l54.528 15.467c21.525 7.189 41.813-7.574 58.283-23.552l2.709-2.688 45.227-46.784A404.544 404.544 0 0 1 917.333 512c0 223.85-181.482 405.333-405.333 405.333S106.667 735.851 106.667 512 288.149 106.667 512 106.667zm0 234.666c27.307 0 53.099 6.4 75.99 17.814L483.391 468.928c-18.517 18.517-12.715 60.65 10.71 82.88 22.485 21.333 69.717 19.285 89.834 2.688l2.368-2.133 89.77-87.51A170.667 170.667 0 1 1 512 341.333zm288


 The war, it turns out, is over which
end of a soft boiled egg one should open. The big end. Or the little
end.

Please read the entirety of Gulliver's Travels keeping in mind how
absolutely nasty Swift's portrayal of 18th century politics can be. You
won't be disappointed.

The classic cartoon version, Max Fleischer's 1939 masterpiece, doesn't
do the book justice.

## How do the terms apply?

A multi-byte quantity like a `short`, `int` or `long` has a big end
where the most significant byte lives and a little end, where the least
significant byte lives. Thus the terms...

If the most significant byte comes first, the architecture is said to
be big-endian. If the least significant byte comes first, it is little
endian. There's a little more to it than that, but not much.

**Notice I have not discussed strings.**

**And, notice I have not talked about bits.**

## Strings are not affected by endianness

A string is a series of distinct bytes. The `sizeof()` of a `char` is 1.
Its least significant byte is the same as its most significant byte.
Strings appear in memory in the order you expect.

## Bits are not affected by endianness

It is a common misconception that little- and big-endian alters the
order in which bits appear. They do not. Endianness affects only the
order in which bytes appear in a multi-byte integer (or floating
point) value.

## Code to visualize endianness

Please have a look at [this](./main.cpp) code.

```c++
int main() {                                                      // 26
    int16_t i16 = 0x0123;                                         // 27
    int32_t i32 = 0x01234567;                                     // 28
    int64_t i64 = 0x0123456789ABCDEF;                             // 29
                                                                  // 30
    cout << hex << setfill('0');                                  // 31
    cout << "Endianness of this computer:\n";                     // 32
    cout << "i16: " << setw(16) << Dump(i16) <<
    " value: " << setw(16) << i16 << endl; // 33
    cout << "i32: " << setw(16) << Dump(i32) <<
    " value: " << setw(16) << i32 << endl; // 34
    cout << "i64: " << setw(16) << Dump(i64) <<
    " value: " << setw(16) << i64 << endl; // 35
    cout << "If little endian, column 1 will not equal column 2.\n"; // 36
    return 0;                                                     // 37
}                                                                 // 38
```

In `main()` we define a `short` (`int16_t`), an `int` (`int32_t`) and a
`long` (`int64_t`) to have readily identifiable values. We define a
function that will return a string with the individual bytes of each
value broken into the order in which the bytes appear in memory.

Here is the function:

```c++
template <class T>                                                // 14
string Dump(T & i) {                                              // 15
    stringstream ss;                                              // 16
    unsigned char * p = reinterpret_cast<unsigned char *>(&i);    // 17
                                                                  // 18
    ss << hex << setfill('0');                                    // 19
    for (uint32_t counter = 0; counter < sizeof(T); counter++) {  // 20
        ss << setw(2) << static_cast<int>(*(p++));                // 21
    }                                                             // 22
    return ss.str();                                              // 23
}                                                                 // 24
```

You might not be familiar with templated functions. Notice line 14 tells
the compiler t


where() == None

    def test_has_date_value(self):
        query = DatetimeMinQuery(datetime_min="2024-01-01")
        params = query.model_dump()
        assert params == {"datetime_min": date(2024, 1, 1)}
        assert (
            query.where()
            == "datetime_last > (:datetime_min::timestamp AT TIME ZONE tzid)"
        )

    def test_has_timestamp_value(self):
        query = DatetimeMinQuery(datetime_min="2024-01-01 01:01:01")
        params = query.model_dump()
        assert params == {"datetime_min": datetime(2024, 1, 1, 1, 1, 1)}
        assert (
            query.where()
            == "datetime_last > (:datetime_min::timestamp AT TIME ZONE tzid)"
        )

    def test_has_timestamptz_value(self):
        query = DatetimeMinQuery(datetime_min="2024-01-01 01:01:01-00:00")
        params = query.model_dump()
        assert params == {
            "datetime_min": datetime(2024, 1, 1, 1, 1, 1, tzinfo=ZoneInfo("UTC"))
        }
        assert query.where() == "datetime_last > :datetime_min"


ld_not_annotate_type: bool,
}

impl VisitMut for AddTypes {
    ///
    /// - `(this.foo)` => `(this as any).foo`
    fn visit_mut_member_expr(&mut self, e: &mut MemberExpr) {
        e.visit_mut_children_with(self);

        match &*e.obj {
            Expr::This(..) => {
                e.obj = Expr::Paren(ParenExpr {
                    span: DUMMY_SP,
                    expr: Box::new(Expr::TsAs(TsAsExpr {
                        span: DUMMY_SP,
                        expr: e.obj.clone(),
                        type_ann: any_type(),
                    })),
                })
                .into();
            }
            _ => {}
        }
    }

    fn visit_mut_stmt(&mut self, s: &mut Stmt) {
        s.visit_mut_children_with(self);

        self.comments.add_leading(
            s.span().lo,
            Comment {
                kind: CommentKind::Line,
                span: DUMMY_SP,
                text: "@ts-ignore".into(),
            },
        );
    }

    fn visit_mut_var_decl_or_expr(&mut self, n: &mut VarDeclOrExpr) {
        let old = self.should_not_annotate_type;
        self.should_not_annotate_type = true;
        n.visit_mut_children_with(self);
        self.should_not_annotate_type = old;
    }

    fn visit_mut_var_decl_or_pat(&mut self, n: &mut VarDeclOrPat) {
        let old = self.should_not_annotate_type;
        self.should_not_annotate_type = true;
        n.visit_mut_children_with(self);
        self.should_not_annotate_type = old;
    }

    fn visit_mut_var_declarator(&mut self, v: &mut VarDeclarator) {
        v.visit_mut_children_with(self);

        if !self.should_not_annotate_type {
            match &mut v.name {
                Pat::Ident(id) => {
                    id.type_ann = Some(TsTypeAnn {
                        span: DUMMY_SP,
                        type_ann: any_type(),
                    });
                }

                _ => {}
            }
        }
    }
}

fn any_type() -> Box<TsType> {
    Box::new(TsType::TsKeywordType(TsKeywordType {
        span: DUMMY_SP,
        kind: TsKeywordTypeKind::TsAnyKeyword,
    }))
}
<filename>src/framebuffer.rs
use header::Tag;
use ::Reader;
use core::slice;

#[derive(Debug, PartialEq)]
pub struct FramebufferTag<'a> {
    pub address: u64,
    pub pitch: u32,
    pub width: u32,
    pub height: u32,
    pub bpp: u8,
    pub buffer_type: FramebufferType<'a>
}

#[derive(Debug, PartialEq)]
pub enum FramebufferType<'a> {
    Indexed {
        palette: &'a [FramebufferColor]
    },
    RGB {
        red: FramebufferField,
        green: FramebufferField,
        blue: FramebufferField
    },
    Text
}

#[derive(Debug, PartialEq)]
pub struct FramebufferField {
    pub position: u8,
    pub size: u8
}

#[derive(Clone, Copy, Debug, PartialEq)]
#[repr(C, packed


py[j] += azmul(pz[j], x);
	}
}

} } // END_CPPAD_LOCAL_NAMESPACE
# endif
# ifndef CPPAD_LOCAL_LOAD_OP_HPP
# define CPPAD_LOCAL_LOAD_OP_HPP

/* --------------------------------------------------------------------------
CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-17 Bradley M. Bell

CppAD is distributed under multiple licenses. This distribution is under
the terms of the
                    GNU General Public License Version 3.

A copy of this license is included in the COPYING file of this distribution.
Please visit http://www.coin-or.org/CppAD/ for information on other licenses.
-------------------------------------------------------------------------- */

namespace CppAD { namespace local { // BEGIN_CPPAD_LOCAL_NAMESPACE
/*!
\file load_op.hpp
Setting a variable so that it corresponds to current value of a VecAD element.
*/
/*
==============================================================================

The C++ source code corresponding to this operation is
\verbatim
	v[x] = y
\endverbatim
where v is a VecAD<Base> vector, x is an AD<Base> object,
and y is AD<Base> or Base objects.
We define the index corresponding to v[x] by
\verbatim
	i_v_x = index_by_ind[ arg[0] + i_vec ]
\endverbatim
where i_vec is defined under the heading arg[1] below:

==============================================================================
*/
/*!
Shared documentation for zero order forward mode implementation of
op = LdpOp or LdvOp (not called).

The C++ source code corresponding to this operation is
\verbatim
	v[x] = y
\endverbatim
where v is a VecAD<Base> vector, x is an AD<Base> object,
and y is AD<Base> or Base objects.
We define the index corresponding to v[x] by
\verbatim
	i_v_x = index_by_ind[ arg[0] + i_vec ]
\endverbatim
where i_vec is defined under the heading arg[1] below:

\tparam Base
base type for the operator; i.e., this operation was recorded
using AD<Base> and computations by this routine are done using type Base.

\param play
is the tape that this operation appears in.
This is for error detection and not used when NDEBUG is defined.

\param i_z
is the AD variable index corresponding to the variable z.

\param arg
\n
arg[0]
is the offset of this VecAD vector relative to the beginning
of the isvar_by_ind and index_by_ind arrays.
\n
\n
arg[1]
\n
If this is the LdpOp operation (if x is a parameter),
i_vec is defined by
\verbatim
	i_vec = arg[1]
\endverbatim
If this is the LdvOp operation (if x is a variable),
i_vec is defined by
\verbatim
	i_vec = floor( taylor[ arg[1] * cap_order + 0 ] )
\endverbatim
where floor(c) is the greatest integer less that or equal c.
\n
\n
arg[2]
Is the index of this vecad load instruction in the
var_by_load_op array.

\param parameter
If v[x] is a parameter, parameter[ i_v_x ] is its value.
This vector has size play->num_par_rec().

\param cap_order
number of columns in the matrix containing the Taylor coefficients.

\param taylor
\n
Input
\n
In LdvOp case, taylor[ arg[1] * cap_order + 0 ]
is used to compute the index in the definition of i_vec above.
If v[x] is a variable, t


                            break;

                        case CLOCKWISE_180:
                            d5 = x + (d3 < 0.0D ? d1 - 0.01D : d1 + 1.0D + 0.01D);
                            d7 = z + (d4 < 0.0D ? d2 - 0.01D : d2 + 1.0D + 0.01D);
                            d8 = d5 - d3;
                            d10 = d7 - d4;
                            break;

                        case COUNTERCLOCKWISE_90:
                            d5 = x + (d4 < 0.0D ? d1 + 1.0D + 0.01D : d1 - 0.01D);
                            d7 = z + (d3 < 0.0D ? d2 - 0.01D : d2 + 1.0D + 0.01D);
                            d8 = d5 + d4;
                            d10 = d7 - d3;
                            break;

                        default:
                            d5 = x + (d3 < 0.0D ? d1 + 1.0D + 0.01D : d1 - 0.01D);
                            d7 = z + (d4 < 0.0D ? d2 + 1.0D + 0.01D : d2 - 0.01D);
                            d8 = d5 + d3;
                            d10 = d7 + d4;
                    }

                    int i = 255;
                    int j = 223;
                    int k = 127;
                    Tessellator tessellator = Tessellator.getInstance();
                    BufferBuilder bufferbuilder = tessellator.getBuffer();
                    GlStateManager.disableFog();
                    GlStateManager.disableLighting();
                    GlStateManager.disableTexture2D();
                    GlStateManager.enableBlend();
                    GlStateManager.tryBlendFuncSeparate(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ZERO);
                    this.setLightmapDisabled(true);

                    if (te.getMode() == TileEntityStructure.Mode.SAVE || te.showsBoundingBox())
                    {
                        this.renderBox(tessellator, bufferbuilder, d5, d6, d7, d8, d9, d10, 255, 223, 127);
                    }

                    if (te.getMode() == TileEntityStructure.Mode.SAVE && te.showsAir())
                    {
                        this.renderInvisibleBlocks(te, x, y, z, blockpos, tessellator, bufferbuilder, true);
                        this.renderInvisibleBlocks(te, x, y, z, blockpos, tessellator, bufferbuilder, false);
                    }

                    this.setLightmapDisabled(false);
                    GlStateManager.glLineWidth(1.0F);
                    GlStateManager.enableLighting();
                    GlStateManager.enableTexture2D();
                    GlStateManager.enableDepth();
                    GlStateManager.depthMask(true);
                    GlStateManager.enableFog();
                }
            }
        }
    }

    private void renderInvisibleBlocks(TileEntityStructure p_190054_1_, double p_190054_2_, double p_190054_4_, double p_190054_6_, BlockPos p_190054_8_, Tessellator p_190054_9_, BufferBuilder p_190054_10_, boolean p_190054_11_)
    {
        GlStateManager.glLineWidth(p_190054_11_ ? 3.0F : 1.0F);
        p_190054_10_.begin(3, DefaultVertexFormats.POSITION_COLOR);
        World world = p_190054_1_.getWorld();
        BlockPos blockpos = p_190054_1_.getPos();
        BlockPos blockpos1 = blockpos.add(p_190054_8_);

        for (BlockPos blockpos2 : BlockPos.getAllInBox(blockpos1, blockpos1.add(p_190054_1_.getStructure


aset_cfg=dict(
                type=korbenchDataset,
                path='opencompass/korbench',
                prompt_mode='0_shot',
                category=category,
                reader_cfg=reader_cfg,
            ),
            judge_cfg=dict(),
            dict_postprocessor=dict(type=generic_llmjudge_postprocess),
        ),
        pred_role='BOT',
    )

    # Dataset
    korbench_dataset = dict(
        type=korbenchDataset,
        abbr=f'korbench_{category}',
        path='opencompass/korbench',
        prompt_mode='0_shot',
        category=category,
        reader_cfg=reader_cfg,
        infer_cfg=infer_cfg,
        eval_cfg=eval_cfg,
        mode='singlescore',
    )

    korbench_0shot_single_datasets.append(korbench_dataset)


	/**
	 * 添加一个单位
	 */
	public static void putOneShapeUnit(ShapeUnit shapeUnit) {
		RuntimeParameter.addBuildingToQueue(shapeUnit);
		ShapeUnitResourceCenter.addUnit(shapeUnit);

	}

	/**
	 * @param positionX  表示图片的左上角在Panel中的X坐标
	 * @param positionY  表示图片的左上角在Panel中的Y坐标
	 * @param buildingName 建筑的名称
	 * @param scene 表示场景
	 */
	public static boolean putOneBuilding(Building building) {

		//占
		List<CenterPoint> mbuildingAreas = building.getNoConstCpList();//建筑使用中心块列表(建筑占地)
		List<CenterPoint> noVehicleLs = building.getNoVehicleCpList();//车辆禁止入内用地
		if(mbuildingAreas==null) {
			RuntimeParameter.addBuildingToQueue(building);
			playOneMusic("uplace");
			return true;
		}else {
			boolean isCanMake = true;
			for(CenterPoint cp:mbuildingAreas) {
				if(!cp.isBuildingCanPutOn()) {
					isCanMake = false;
				}
			}

			if(isCanMake) {
				for(CenterPoint cp:mbuildingAreas) {
					if(noVehicleLs.contains(cp)) {
						cp.addBuilding(building,BuildingAreaType.Normal);//军事建筑占用
					}else {
						cp.addBuilding(building,BuildingAreaType.WeighBridge);//磅秤占用
					}
				}

				//将建筑阴影中的建筑设置为被遮挡
				List<CenterPoint> shadowAreas = building.getShadownCpList();
				for(CenterPoint shadowCp:shadowAreas) {//声明阴影区域
					shadowCp.setInShadow(true);
					Building inShadowBuilding = shadowCp.getBuilding();
					Vehicle inShadowVehicle = shadowCp.getVehicle();
					List<Soldier> soldiers = shadowCp.getSoldiers();

					if(inShadowBuilding!=null) {
						inShadowBuilding.setHided(true);
					}
					if(inShadowVehicle!=null) {
						inShadowVehicle.setHided(true);
					}
					if(!soldiers.isEmpty()) {
						for(Soldier soldier:soldiers) {
							soldier.setHided(true);//阴影中的单位被挡了
						}
					}
				}

				//如果自己也在阴影中,设置自己为被遮挡
				if(PointUtil.isBuidingInShadow(building)) {
					building.setHided(true);
				}

				ShapeUnitResourceCenter.addBuilding(building);
				RuntimeParameter.addBuildingToQueue(building);
				playOneMusic("uplace");
				return true;
			}else {
				playOneMusic("ceva063");//Can not deploy here
				System.out.println("不能建造");
				return false;
			}
		}
	}

	public static void randomPlayOneMusic(String ... wavPrefix) {
		Random r = new Random();
		int index = r.nextInt(wavPrefix.length);
		playOneMusic(wavPrefix[index]);
	}

	public static void playOneMusic(String wavPrefix) {
		Thread audioTask = new Thread() {
			public void run() {
				try {
					synchronized (Constructor.class) {
						ByteArrayInputStream musicInputStream = WavFileReader.getMusicInputStream(wavPrefix);
						AudioInputStream audioStream = AudioSystem.getAudioInputStream(musicInputStream);//打开音频文件
						AudioFormat format = audioStream.getFormat();//获取音频格式
						DataLine.Info info = new DataLine.Info(Clip.class, format);
						Clip clip = (Clip)AudioSystem.getLine(info);//创建音频剪


proto__:null,diagram:{parser:oqe,db:Uqe,renderer:{setConf:Wqe,draw:function(i,a,f,p){const w=Oe().gantt,m=Oe().securityLevel;let b;m==="sandbox"&&(b=yr("#i"+a));const E=yr(m==="sandbox"?b.nodes()[0].contentDocument.body:"body"),_=m==="sandbox"?b.nodes()[0].contentDocument:document,A=_.getElementById(a);N5=A.parentElement.offsetWidth,N5===void 0&&(N5=1200),w.useWidth!==void 0&&(N5=w.useWidth);const I=p.db.getTasks();let B=[];for(const vt of I)B.push(vt.type);B=ut(B);const N={};let R=2*w.topPadding;if(p.db.getDisplayMode()==="compact"||w.displayMode==="compact"){const vt={};for(const pt of I)vt[pt.section]===void 0?vt[pt.section]=[pt]:vt[pt.section].push(pt);let X=0;for(const pt of Object.keys(vt)){const U=Yqe(vt[pt],X)+1;X+=U,R+=U*(w.barHeight+w.barGap),N[pt]=U}}else{R+=I.length*(w.barHeight+w.barGap);for(const vt of B)N[vt]=I.filter(X=>X.type===vt).length}A.setAttribute("viewBox","0 0 "+N5+" "+R);const z=E.select(`[id="${a}"]`),W=Y7e().domain([Mxe(I,function(vt){return vt.startTime}),Lxe(I,function(vt){return vt.endTime})]).rangeRound([0,N5-w.leftPadding-w.rightPadding]);function et(vt,X){const pt=vt.startTime,U=X.startTime;let Tt=0;return pt>U?Tt=1:pt<U&&(Tt=-1),Tt}I.sort(et),st(I,N5,R),k0(z,R,N5,w.useMaxWidth),z.append("text").text(p.db.getDiagramTitle()).attr("x",N5/2).attr("y",w.titleTopMargin).attr("class","titleText");function st(vt,X,pt){const U=w.barHeight,Tt=U+w.barGap,nt=w.topPadding,It=w.leftPadding,Ot=AA().domain([0,B.length]).range(["#00B9FA","#F95002"]).interpolate(Zke);bt(Tt,nt,It,X,pt,vt,p.db.getExcludes(),p.db.getIncludes()),mt(It,nt,X,pt),at(vt,Tt,nt,It,U,Ot,X),yt(Tt,nt),ft(It,nt,X,pt)}function at(vt,X,pt,U,Tt,nt,It){const Bt=[...new Set(vt.map(xt=>xt.order))].map(xt=>vt.find(Ht=>Ht.order===xt));z.append("g").selectAll("rect").data(Bt).enter().append("rect").attr("x",0).attr("y",function(xt,Ht){return Ht=xt.order,Ht*X+pt-2}).attr("width",function(){return It-w.rightPadding/2}).attr("height",X).attr("class",function(xt){for(const[Ht,Le]of B.entries())if(xt.type===Le)return"section section"+Ht%w.numberSectionStyles;return"section section0"});const Et=z.append("g").selectAll("rect").data(vt).enter(),Z=p.db.getLinks();if(Et.append("rect").attr("id",function(xt){return xt.id}).attr("rx",3).attr("ry",3).attr("x",function(xt){return xt.milestone?W(xt.startTime)


  ): Promise<LoginResponse> {

    const user = await User.findOne({where: { email }});

    if (!user) {
      throw new Error('could not find user');
    }

    const isValid = compare(password, user.password);

    if (!isValid) {
      throw new Error('bad password');
    }

    // login successful

    return {
      accessToken: '',
    };
  }
}import { TestBed } from '@angular/core/testing';
import {
  HttpBackend,
  HttpClient
} from '@angular/common/http';
import {
  HttpTestingController,
  HttpClientTestingModule
} from '@angular/common/http/testing';
import { Employee } from '../models/Employee';

import { EmployeesService } from './employees.service';

describe('EmployeesService', () => {
  let httpClient: HttpClient;
  let httpTestingController: HttpTestingController;

	let service:EmployeesService;
  beforeEach(() => {
  	TestBed.configureTestingModule({
  		imports:[HttpClientTestingModule]
  		,providers: [
        EmployeesService
      ]
  	})
    httpClient = TestBed.get(HttpClient);
    httpTestingController = TestBed.get(HttpTestingController);
  });

  it('should be created', () => {
    const service: EmployeesService = TestBed.get(EmployeesService);
    expect(service).toBeTruthy();
  });

  it('can test HttpClient.get', () => {
	  const testData: Employee = new Employee({
	  	  	id:1,
	  	  	nombre:"Omar",
	  	  	apellido:"Trapaga",
	  	  	telefono:56221984968,
	  	  	rut:"21984968-0",
	  	  	fechaNacimiento:"12/05/1982",
	  	  	direccion:{
	  			calle:"Av. Matta",
	  			numero:143,
	  			comuna:"Santiago"
	  		},
	  		activo:1
	  });
	  var testUrl:string = 'https://my-json-server.typicode.com/HaibuSolutions/prueba-tecnica-sf/user';

  // Make an HTTP GET request
  httpClient.get<Employee>(testUrl)
    .subscribe(data =>
      // When observable resolves, result should match test data
      expect(data).toEqual(testData)
    );

  // The following `expectOne()` will match the request's URL.
  // If no requests or multiple requests matched that URL
  // `expectOne()` would throw.
  const req = httpTestingController.expectOne(testUrl);

  // Assert that the request is a GET.
  expect(req.request.method).toEqual('GET');

  // Respond with mock data, causing Observable to resolve.
  // Subscribe callback asserts that correct data was returned.
  req.flush(testData);

  // Finally, assert that there are no outstanding requests.
  httpTestingController.verify();
});

});
import {
  Storage, NotesObject, Note, NotesOrder,
} from "shared/storage/schema";
import migrate from "../core";
import expectItems from "./expect-items";

const expectDefaultValues = (items: Storage) => {
  expectItems(items);

  let counter = 0;
  const countedExpect = () => {
    counter += 1;
    return expect;
  };

  // Appearance
  countedExpect()(items.font).toEqual({
    id: "helvetica",
    name: "Helvetica",
    genericFamily: "sans-serif",
    fontFamily: "Helvetica, sans-serif",
  });
  countedExpect()(items.size).toBe(200);
  countedExpect()(items.theme).toBe("light");
  countedExpect()(items.customTheme).toBe("");
  countedExpect()(items.sidebar).toBe(true);
  countedExpect()(items.toolbar).toBe(true);

  /


rono::time_point<std::chrono::high_resolution_clock> m_start;
    };

private:
    Logger() = default;
    ~Logger();
    Logger(const Logger&);
    Logger& operator=(const Logger&);

    static void swssPrioNotify(const std::string& component, const std::string& prioStr);

    void settingThread();
    void terminateSettingThread();
    void restartSettingThread();

    typedef ConcurrentMap<std::string, std::pair<PriorityChangeNotify, OutputChangeNotify>> LogSettingChangeObservers;

    LogSettingChangeObservers m_settingChangeObservers;
    ConcurrentMap<std::string, std::string> m_currentPrios;
    std::atomic<Priority> m_minPrio = { SWSS_NOTICE };
    ConcurrentMap<std::string, std::string> m_currentOutputs;
    std::atomic<Output> m_output = { SWSS_SYSLOG };
    std::unique_ptr<std::thread> m_settingThread;
    std::mutex m_mutex;
    std::unique_ptr<SelectableEvent> m_stopEvent;
};

}


namespace Content.Server.Explosion.Components;

[RegisterComponent]
publi


        to_namespace.emit_f32(5.4, 20.0, true, SeedNumber::Default);
        let to_data_1:i32 = 6;
        let to_data_1_value = 20.0 * (5.4 - 5.0);
        let hash_index_1 = murmur3::hash32_with_seed(to_data_1.to_le_bytes(), to_namespace.namespace_seeds[SeedNumber::Default as usize]) & parser::MASK31;
        let to_data_2:i32 = 5;
        let to_data_2_value = 20.0 * (6.0 - 5.4);
        let hash_index_2 = murmur3::hash32_with_seed(to_data_2.to_le_bytes(), to_namespace.namespace_seeds[SeedNumber::Default as usize]) & parser::MASK31;
        assert_eq!(to_namespace.tmp_data, vec![(hash_index_1, to_data_1_value), (hash_index_2, to_data_2_value)]);
    }

    #[test]
    fn test_transformerweightmutliplier() {

        let from_namespace_float = ExecutorFromNamespace {
            namespace_index: 0,
            namespace_verbose: "a".to_string(),
            namespace_is_float: true,
        };
        let to_namespace_index = 1;

        let to_namespace_empty = ExecutorToNamespace {
            namespace_index: to_namespace_index,
            namespace_verbose: "b".to_string(),
            namespace_seeds: default_seeds!(to_namespace_index),	// These are precomputed namespace seeds
            tmp_data: Vec::new(),
        };

        let transformer = TransformerMultiplyWeight::create_function("Blah", &vec![from_namespace_float], &vec![40.]).unwrap();
        let record_buffer = [7,	// length
                            0,	// label
                            (1.0_f32).to_bits(), // Example weight
                            nd(4, 7) | IS_NOT_SINGLE_MASK | IS_FLOAT_NAMESPACE_MASK,
                            // Feature triple
                            1775699190 & MASK31,    // Hash location
                            2.0f32.to_bits(),       // Feature value of the feature
                            3.0f32.to_bits()];       // Float feature value

        let mut to_namespace = to_namespace_empty.clone();
        let mut transform_executors = TransformExecutors {executors: vec![]}; // not used

        transformer.execute_function(&record_buffer, &mut to_namespace, &mut transform_executors);

        // Couldn't get mocking to work, so instead of intercepting call to emit_i32, we just repeat it and see if the results match
        let mut to_namespace_comparison = to_namespace_empty.clone();
        to_namespace_comparison.emit_i32((1775699190 & MASK31) as i32, 2.0f32 * 40., SeedNumber::Default);
        assert_eq!(to_namespace.tmp_data, to_namespace_comparison.tmp_data);

        // But weightmultiplier can take non-float namespaces
        let from_namespace_nonfloat = ExecutorFromNamespace {
            namespace_index: 0,
            namespace_verbose: "a".to_string(),
            namespace_is_float: false,
        };

        let transformer = TransformerMultiplyWeight::create_function("Blah", &vec![from_namespace_nonfloat], &vec![40.]).unwrap();
        let record_buffer = [7,	// length
                            0,	// label
                            (1.0_f32).to_bits(), // Example weight
                            nd(4, 6) | IS_NOT_SINGLE_MASK,
                            // Feature triple
                            1775699190 & MASK31,    // Hash location