text stringlengths 27 775k |
|---|
/*81*****************************************************************************
* test_lib
** -------- */
import { isObjectLike } from "../lib/jslang.js";
import { assert } from "../lib/util/trace.js";
import { BaseStream } from "./pdf.ts-src/core/base_stream.js";
import { DocStats } from "./pdf.ts-src/core/core_ut... |
"use strict";
/********************************************************************************
* Copyright (C) 2017 TypeFox and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl... |
[playlist]
File1=http://stream.ucfm.com.au:8000/listen.mp3
Title1=UCFM 87.8 - Canberra's Alternative
NumberOfEntries=1
Length1=-1
Version=2
|
/*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed u... |
using System;
using Aspekt.AI;
using UnityEngine;
namespace Aspekt.Drones
{
public class DroneAIAgent : AIAgent<AIAttributes, object>
{
private enum Views
{
Execution,
Memory,
}
private Views view;
private IUnit unit;
public str... |
// Copyright 2019 RetailNext, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed t... |
namespace EA.Iws.Web.Areas.ImportNotification.ViewModels.Producer
{
using Core.ImportNotification.Draft;
using Shared;
public class ProducerViewModel
{
public AddressViewModel Address { get; set; }
public BusinessViewModel Business { get; set; }
public ContactViewModel Contac... |
using Cinemachine;
using UnityEngine;
public class CameraTrigger : MonoBehaviour
{
[SerializeField, Tag] private string m_tag;
[SerializeField] private Transform m_cameraProgressionAngle;
[SerializeField] private CinemachineVirtualCamera m_virtualCamera;
private bool m_useVirtualCamera;
private... |
if which swiftlint >/dev/null; then
swiftlint autocorrect
swiftlint --no-cache
else
echo "warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint or brew install swiftlint"
fi
|
#!./miniruby -s
# Used to expand Ruby config entries for Win32 Makefiles.
config = File.read(conffile = $config)
config.sub!(/^(\s*)RUBY_VERSION\b.*(\sor\s*)$/, '\1true\2')
rbconfig = Module.new {module_eval(config, conffile)}::RbConfig
config = $expand ? rbconfig::CONFIG : rbconfig::MAKEFILE_CONFIG
config["RUBY_RELE... |
module.exports = {
content: ['./.vitepress/theme/**/*.vue'],
plugins: [require('@tailwindcss/typography')]
}
|
mod activity;
mod simulator;
mod stock;
pub use activity::*;
pub use simulator::*;
pub use stock::*;
use std::collections::HashMap;
use std::sync::{atomic::AtomicU64, atomic::Ordering};
use std::thread;
use std::time::{Duration, SystemTime};
#[cfg(test)]
mod tests {
use crate::*;
// cargo test -- --nocapture... |
import java.util.LinkedList
import collection.convert.ImplicitConversions._
object Test extends App {
def assertListEquals[A](expected: List[A], actual: collection.Seq[A]) {
assert(expected.sameElements(actual),
"Expected list to contain " + expected.mkString("[", ", ", "]") +
", but was " ... |
# learngit
Git is a distributed version control system.
Git is free software distributed under the GPL.
|
package no.nav.melosys.eessi.identifisering;
import java.util.Collection;
import lombok.extern.slf4j.Slf4j;
import no.nav.melosys.eessi.integration.PersonFasade;
import no.nav.melosys.eessi.models.exception.NotFoundException;
import no.nav.melosys.eessi.models.person.PersonModell;
import no.nav.melosys.eessi.service.... |
#pragma once
#include "core/event.h"
#include "entity.h"
class Player : public Entity
{
public:
Player();
void onUpdate(float delta) override;
void onMouseMoved(const glm::vec2& offset);
private:
}; |
<?php
/**
* Check if field values are the same
*
* @param $form_values
* @param array $form
* @param array $params
* @return bool
*/
function validate_fields_match($form_values, array &$form, array $params): bool {
foreach ($params as $field_index) {
if ($form_values[$params[0]] !== $form_values[$fi... |
import RootStore from '@/store'
import UIStore from '@/store/ui'
import { UIWalletData } from '@/model/Wallet'
import { getModule } from 'vuex-module-decorators'
let ui: UIStore
beforeEach(() => {
ui = getModule(UIStore, RootStore)
})
it('get ui', () => {
expect(ui.loading).toBeTruthy()
expect(ui.error).toBeNu... |
---
title: "3. 표본 분포"
date: 2020-12-15T19:47:23+09:00
author: Jinpyo Hong
image : "images/blog/default.jpg"
bg_image: "images/laptop-coffee.jpg"
categories: ["None"]
tags: ["None"]
description:
draft: false
type: "post"
---
## 표본 분포란?
__통계량__ 의 확률분포이다.
__통계량:__ 표본평균, 표본분산 등
- __모집단이 정규분포__ 를 이룰 때 표본평균은 아래와 같이 구한다. ... |
from typing import List
from unittest import IsolatedAsyncioTestCase
from unittest.mock import AsyncMock, patch, MagicMock
from fastapi import HTTPException, FastAPI, Depends, Request
from httpx import AsyncClient, Response
from fastapi_framework.rate_limit import (
RateLimitManager,
RateLimiter,
RateLimi... |
// Copyright 2015-2021 Swim Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to ... |
package main
import (
"FenDZ/glog-master"
"FenDZ/go-concurrentMap-master"
"LollipopGo/conf"
"LollipopGo/game"
"LollipopGo/gate"
"LollipopGo/global"
"flag"
_ "time"
"LollipopGo/login"
_ "github.com/dop251/goja" // JS 解析器
"github.com/name5566/leaf"
lconf "github.com/name5566/leaf/conf"
)
func init() {
glo... |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
module Main where
import Data.Functor ((<&>))
import Data.List (intersect, nub)
import Data.Text (Text)
import qualified Data.Text as T
import Data.Text.IO as T (getContents)
import Data.Void (Void)
import Text.Megaparsec (Parsec, eof, many, parse, s... |
<?php
namespace Fusion\Models;
use Fusion\Concerns\HasActivity;
use Fusion\Database\Eloquent\Model;
use Spatie\Activitylog\Models\Activity;
class Directory extends Model
{
use HasActivity;
/**
* Fillable fields for Directory model.
* @var
*/
protected $fillable = ['parent_id', 'name', 'sl... |
---
title: 編譯器錯誤 CS0423
ms.date: 07/20/2015
f1_keywords:
- CS0423
helpviewer_keywords:
- CS0423
ms.assetid: e4ec44b6-bf9c-41f7-a309-8f8b9e325691
ms.openlocfilehash: 53dbf4a5a17b729a202e787f641663273c1d6c3d
ms.sourcegitcommit: 9b552addadfb57fab0b9e7852ed4f1f1b8a42f8e
ms.translationtype: MT
ms.contentlocale: zh-TW
ms.las... |
// Copyright 2020 Two Sigma Investments, LP.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable... |
C @(#)pqsort.f 20.4 11/12/98
c****************************************************************
c
c File: pqsort.for
c Purpose: Sort one p-q curve into ascending order on pgen,
c rearranging the qmax and qmin points to match.
C
c
c Author: Merilyn George Date: 15 Oct 1992
c WSCC ... |
using System;
using System.Collections.Generic;
/**
* @author koqizhao
*
* Apr 1, 2018
*/
namespace MyDotey.Quantile.Validation
{
public class ValidationDecorator<T> : IQuantileEstimator<T>
{
private IQuantileEstimator<T> _quantileEstimator;
public ValidationDecorator(IQuantileEstimator<T>... |
package io.llambda.compiler.valuetype
object SubtractTypes {
private[valuetype] def stackedSubtractTypes(
inputStack: SchemeType.Stack,
removingType: SchemeType
): SchemeType = (inputStack.head, removingType) match {
case (UnionType(inputMemberTypes), _) =>
val remainingMembers = inputMember... |
import { Fcal } from '../fcal';
test('Number format', () => {
const expression = '34535345323452345.3345345';
expect(Fcal.eval(expression).toFormat()).toStrictEqual('34,535,345,323,452,345.3345345');
});
test('Percentage format', () => {
const expression = '34535345323452345.3345345%';
expect(Fcal.eval(expres... |
require "helper"
module ActiveJobExpectationTests
def test_must_enqueue_jobs
must_enqueue_jobs 0
UserInviteJob.logger.silence { UserInviteJob.perform_later }
must_enqueue_jobs 1
end
def test_wont_enqueue_jobs
wont_enqueue_jobs
UserInviteJob.new
wont_enqueue_jobs
end
def test_must_pe... |
// Copyright 2016 Ajit Yagaty
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in ... |
# Mr. MIME (Multipurpose Internet Mail Extensions)
`mrmime` is a library to parse and generate mail according several RFCs:
- [RFC822][rfc822]: Standard For The Format of ARPA Internet Text Messages
- [RFC2822][rfc2822]: Internet Message Format
- [RFC5321][rfc5321]: Simple Mail Transfer Protocol
- [RFC5322][rfc5322]: ... |
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/
export type JobType = 'anomaly-detector' | 'data-frame-analytics';
export con... |
# UCTooth_Android
Please open this project with Android Studio, and ensure to build the `.jar` file.
|
import torch
import torch.nn as nn
import torch.nn.functional as F
class ReactivePolicy(nn.Module):
def __init__(self, args):
super(ReactivePolicy, self).__init__()
self.args = args
self.batch_size = args.batch_size
self.repeats = 10
self.feature_size = 6 + args.max_steps... |
# init.zsh
#
# setup shell, load plugins and configs
#
# don't do anything if not interactive
[[ ! -o interactive ]] && return
# paths
ZDOTALIAS="$ZDOTDIR/alias"
ZDOTCACHE="$ZDOTDIR/cache"
ZDOTCOMP="$ZDOTDIR/completions"
ZDOTCONF="$ZDOTDIR/conf"
ZDOTFUNC="$ZDOTDIR/functions"
ZDOTPLUG="$ZDOTDIR/plugins"
ZDOTTHEME="$Z... |
#include "eval2.h"
#include <algorithm>
#include <numeric>
#include "core/column_puyo_list.h"
#include "core/core_field.h"
#include "core/rensa/rensa_detector.h"
#include "field.h"
using namespace std;
Eval2::Eval2() {
}
Eval2::~Eval2() {
}
static double getConnectionScore(const LF& field) {
static double CONN... |
import * as dayjs from "dayjs";
/**
* Allow the construction of a large string piece by
* piece with some useful methods to help the
* string manipulation.
*/
export class StringBuilder {
private readonly contents: string[] = [];
/**
* Appends a string to the current content.
* @param s
*/
public a... |
import imaplib,email
import urllib.request
import urllib.parse
import json
results = []
ip_address = []
username = 'pytester.py@gmail.com' #server email address
password = 'pypypy12' #server email password
imap_url = 'imap.gmail.com'
def auth(username,password,imap_url):
con = imaplib.IMAP4_SSL(imap_url)
con... |
---
authors:
- admin
avatar_image: claudio_zanettini.png
bio: My research interests include cancer biology, `omics` and bioinformatic.
btn:
display_education: true
education:
courses:
- course: Ph.D. PsychoBiology and PsychoPharmacology
institution: University "Sapienza", Rome, Italy
year: 2010
email: "c... |
//************************************************************************
// Copyright 2021 Massachusetts Institute of Technology
// SPDX short identifier: BSD-2-Clause
//
// File Name:
// Program: Common Evaluation Platform (CEP)
// Description:
// Notes:
//
//******************************... |
package context
import (
"reflect"
"github.com/pkg/errors"
)
type Context struct {
variables map[string]Valuer
functions map[string]map[int]Function
converters map[reflect.Type]Converter
next *Context
}
func (c *Context) DefineVariable(name string, v Valuer) {
c.variables[name] = v
}
func (c *Contex... |
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateEvkinKeberlanjutanTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('evki... |
package org.ageage.eggplant.common.ui.adapter
import android.content.Context
import android.view.LayoutInflater
import android.view.ViewGroup
import androidx.databinding.DataBindingUtil
import androidx.recyclerview.widget.DiffUtil
import androidx.recyclerview.widget.ListAdapter
import androidx.recyclerview.widget.Recy... |
import React from "react";
import FormWindow from "./FormWindow";
import Grid from "@material-ui/core/Grid/Grid";
import TextField from "@material-ui/core/TextField/TextField";
import FormControl from "@material-ui/core/FormControl/FormControl";
import InputLabel from "@material-ui/core/InputLabel/InputLabel";
import I... |
"""
Base64Engine
"""
import base64
from .engine import BlockCipherEngine
__all__ = [
"Base64Engine",
]
class Base64Engine(BlockCipherEngine):
"""
Simple base64 encode/decode engine.
Base64 encodes 3 bytes of data into 4 6-bit characters.
The 6-bit character set is used is A-Z, a-z, + and /.... |
import html from "./html";
class sClock extends HTMLElement {
constructor() {
super();
this.styles();
this.logic();
}
logic() {
return setInterval(() => {
this.innerHTML = this.time;
}, 1000);
}
styles() {
const shadowRoot = this.attachShadow({ mode: "open" });
shadowRoot.i... |
var string = msg.payload;
// Constants
mac_addresses =
{"000D6F0003BD6969":'01',
"000D6F0003BD8974": '02',
"000D6F0002C0DDDB": '03',
"000D6F000416DD83": '04',
"000D6F0003BD5FE2": '05',
"000D6F0003561FC7": '06',
"000D6F0004B1EC41": '07',
"000D6F0002C0E746": '08',
"000D6F0000469B3E": '09',
"000D6F0004B613A8": '10',
"... |
# -*- coding: utf-8 -*-
import time
from requests import Session
from metf_python_client.utils import str2hex, hex2str
from metf_python_client.logger import log
HIGH = 0x1
LOW = 0x0
INPUT = 0x00
INPUT_PULLUP = 0x02
OUTPUT = 0x01
class METFClient:
def __init__(self, host, port=80, **kwargs):
self._root =... |
package com.zhengsr.jetpackdemo.entity.livedata
import androidx.lifecycle.LiveData
import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.Transformations
import androidx.lifecycle.ViewModel
import com.zhengsr.jetpackdemo.entity.User
/**
* @author by zhengshaorui on 2020/6/13
* Describe:
*/
class UserV... |
encode :: (Eq a) => [a] -> [(a, Int)]
encode [] = []
encode (x:xs) = let (first, rest) = span (== x) xs
in (x, 1 + length first) : encode rest
primeFactors :: Int -> [Int]
primeFactors n = primeFactors' n 2
where primeFactors' 1 _ = []
primeFactors' x factor
| x `mod` factor == ... |
use super::super::RpiApi;
use super::{util::uv2be, I2cAddress};
use crate::error::Result;
/// MCP 9808
/// High-accuracy temperature Sensor -40°C to +125°C ±0.5°C
/// http://ww1.microchip.com/downloads/en/DeviceDoc/25095A.pdf
pub async fn read_temp(rapi: &RpiApi, address: I2cAddress) -> Result<f32> {
let ts = rapi... |
module.exports = class B {
constructor(arg1, arg2) {
this.arg1 = arg1;
this.arg2 = arg2;
}
someFunctionOfClassB() {}
};
|
---
title: Largeur de buste supérieur
---
La mesure de **largeur de buste supérieur** est la partie avant de votre mesure de **tour de buste supérieur** : votre circonférence de poitrine mesurée juste sous vos bras, au-dessus de la partie la plus forte de votre poitrine.
Pour mesurer votre largeur de buste supérieur,... |
use lexer::tokenizer::Tokenizer;
use lexer::token::{Token, TokenType};
pub trait Matcher {
fn try_match(&self, tok: &mut Tokenizer) -> Option<Token>;
}
#[allow(dead_code)]
pub struct MatchWhitespace {
}
impl Matcher for MatchWhitespace {
fn try_match(&self, tok: &mut Tokenizer) -> Option<Token> {
le... |
ALTER TABLE ONLY "public"."VideoRenderJob" ALTER COLUMN "jobStatusName" SET DEFAULT 'NEW';
|
import { ViewEntity, ViewColumn } from 'typeorm';
/**
* Comments in this file were automatically generated from Postgres files */
@ViewEntity({
schema: 'pg_catalog',
name: 'pg_cursors',
synchronize: false,
})
export class PgCursors {
@ViewColumn({ name: 'name' })
public readonly name!: string | null /* text... |
package com.test.site.contenter;
import com.axes.contenter.template.macro.base.ContentProviderBase;
import com.axes.mvc.annotation.ControllerService;
import com.axes.mvc.mapping.ServiceContainer;
import com.axes.util.base.reflect.ObjectSnooper;
import com.axes.util.base.reflect.each.FieldAnnotaionEach;
import java.lan... |
# TeacherAPIView
Представление для отображения списка учителей |
INSERT INTO departments (name)
VALUES
('Sales'),
('Accounting'),
('IT'),
('Management');
INSERT INTO roles (title, salary, department_id) VALUES
('Salesperson', 40000, 1),
('Accountant', 50000, 2),
('Developer', 90000, 3),
('Manager', 100000, 4);
INSERT INTO employees (first_name, last_name, role_id, manager_id) VALU... |
$NetBSD: patch-io_iom__init.c,v 1.1 2019/12/22 22:23:00 joerg Exp $
--- io/iom_init.c.orig 2019-12-22 18:12:04.396371533 +0000
+++ io/iom_init.c
@@ -6,6 +6,8 @@
#include <sys/types.h>
#include <sys/event.h>
#include <sys/time.h>
+#include <sys/fcntl.h>
+#include <unistd.h>
#endif
int iom_init(iomux_t* c) {
|
# tool_matrixbot
A useful bot for FOSS-AG
# Project initialization
```bash
pipenv --python 3.7
pipenv install --dev
``` |
#!/usr/bin/php
<?php
include_once ("java/Java.inc");
$s = new JavaClass("java.lang.System");
if(!$s) die("test failed1\n");
// check null proxy
java_begin_document();
$k = $s->getProperty("php.java.bridge.VOID");
java_end_document();
echo $k; echo "\n";
if(is_null($k)) die("test failed3\n");
echo "test okay\n";
exit... |
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:mobileui/auth/token_repository.dart';
import 'package:mobileui/config/app_config.dart';
import 'package:mobileui/login/logout_button.dart';
import 'package:mobileui/model/user.dart';
import 'package:mobileui/ui_mod... |
! dpd_module.f90
! Dissipative particle dynamics module
MODULE dpd_module
!------------------------------------------------------------------------------------------------!
! This software was written in 2016/17 !
! by Michael P. Allen <m.p.allen@warwick.... |
<div class="form-group">
<div class="row">
<div class="col-sm-4">
<label for="material">Malzeme Cinsi:</label>
</div>
<div class="col-sm-8">
<select class="form-control" name="material" id="material">
<option value="" selected disabled>Malzeme Seçiniz<... |
import net from 'net';
const server = net.createServer(c => {
console.log('socket opened');
c.setEncoding('utf8');
c.on('end', () => {
console.log('connection/socket closed');
});
c.on('data', (data) => {
console.log('Data:'+data);
c.write('Answer:'+data);
// c.end(); // close socket/conec... |
# frozen_string_literal: true
module ActiveGraphql
class Client
module Actions
class Action
# converts ruby object in to varbiable stype grapqhl input
class FormatVariableInputs
include VariableDetectable
def initialize(inputs)
@initial_inputs = inputs
... |
import {DateType, PrimaryKey, Property} from "@mikro-orm/core";
import { Field, Int, ObjectType } from "type-graphql";
@ObjectType()
export class BaseEntity {
@Field(() => Int)
@PrimaryKey()
id!: number;
@Field(() => String)
@Property({type: 'date'})
createdAt = new Date();
@Field(() => ... |
package gui;
import javax.swing.*;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.File;
import java.io.IOException;
import java.util.List;
import static gui.GuiUtil.setFrameCenter... |
<!DOCTYPE html>
<html lang="{{ Config::get('app.locale') }}" ng-app="irailapp" ng-controller="PlannerCtrl">
@include('core.head')
<body>
<div class="wrapper">
<div id="main">
@include('core.navigation')
<section class="container">
<div class="row">
<div class="col-md-12">... |
///! TODO expose everything with more idomatic names and types
#[allow(non_snake_case, non_camel_case_types, non_upper_case_globals)]
pub use sokol_bindings_sys::*;
/// An alias for `c_int`. So in practice probably 32 bits, but technically allowed
/// to be as low as 16 on some platforms.
pub type Int = ::std::os::ra... |
// Copyright 2021 VMware, Inc.
// SPDX-License-Identifier: Apache-2.0
package toml
import (
"bytes"
"fmt"
"strings"
"github.com/BurntSushi/toml"
"github.com/k14s/starlark-go/starlark"
"github.com/k14s/starlark-go/starlarkstruct"
"github.com/vmware-tanzu/carvel-ytt/pkg/orderedmap"
"github.com/vmware-tanzu/car... |
define([
'backbone',
'models/country',
'vocabs'
], function (Backbone, Country, vocabs) {
return Backbone.Collection.extend({
model: Country,
parse: function (countrie) {
_.each(countrie, function (country) {
country.name = vocabs['country_' + country.code];
});
return cou... |
from django.contrib.auth import get_user_model
from django_filters.rest_framework import DjangoFilterBackend
from rest_framework.filters import SearchFilter
from rest_framework.generics import ListAPIView
from common.mixins import NeverCacheMixin
from data_import.models import DataType
from data_import.serializers im... |
// Copyright 2018 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
use fidl_fuchsia_hardware_ethernet_ext::MacAddress as MacAddr;
use num_derive::FromPrimitive;
use serde::{Deserialize, Serialize};
use std::convert::{TryFr... |
// These are meant to be typed into the REPL. You can also run
// scala -Xnojline < repl-session.scala to run them all at once.
import scala.actors._
import scala.actors.Actor._
val actor1 = actor {
while (true) {
receive {
case "Hi" => println("Hello")
case "Bye" => exit()
}
}
}
actor1 ! "Hi... |
package utils
object Constants {
var baseAppContext = "context"
var ELContextFileName = "ELContext"
var javaExtractTemplate = "getString(\$id)"
object PREFERENCES {
const val EL_PREFERENCES = "EL_PREFERENCES"
const val PREFIX = "PREFIX"
const val IMPORT_PACKAGE = "IMPORT_PACKA... |
#[cfg(feature = "gpu")]
use crate::gpu;
use crate::prelude::*;
use crate::{
Bitmap, Canvas, DeferredDisplayList, IPoint, IRect, ISize, Image, ImageInfo, Paint, Pixmap,
Size, SurfaceCharacterization, SurfaceProps,
};
use skia_bindings as sb;
use skia_bindings::{SkRefCntBase, SkSurface};
use std::ptr;
... |
package net;
import viaversion.viabackwards.protocol.protocol1_13_2to1_14.storage.EntityPositionStorage1_14;
public class a01 {
public static double a(EntityPositionStorage1_14 var0) {
return var0.a();
}
public static double b(EntityPositionStorage1_14 var0) {
return var0.c();
}
public st... |
using static TACTLib.Core.Product.Tank.ManifestCryptoHandler;
using static TACTLib.Core.Product.Tank.ContentManifestFile;
namespace TACTLib.Core.Product.Tank.CMF {
[ManifestCrypto(AutoDetectVersion = true, Product = TACTProduct.Overwatch)]
public class ProCMF_37664 : ICMFEncryptionProc {
public byte[]... |
{-# OPTIONS_GHC -fno-warn-orphans #-}
module Unit.ModelSpec (spec) where
import TestImport
-------------------------------------------------------------------------------
spec :: Spec
spec = do
describe "pageToOffset" $ do
it "page number 0" $ do
(pageToOffset 0) `shouldBe` 0
... |
"""
A component which pulls down the daily Toronto Public Health COVID-19 updates.
For more details about this component, please refer to the documentation at
https://github.com/danielnguyen/home-assistant-toronto-coronavirus
"""
import datetime
import logging
from datetime import timedelta
from dateutil import parser... |
import 'dart:async';
import '../src/connection.dart';
import 'dom.dart' as dom;
import 'runtime.dart' as runtime;
class AnimationApi {
final Client _client;
AnimationApi(this._client);
/// Event for when an animation has been cancelled.
Stream<String> get onAnimationCanceled => _client.onEvent
.where((... |
---
layout: post
title: 解决两个 Android 模拟器之间无法网络通信的问题
categories: Android
description: 如何配置,让同一台 PC 上的两个 Android 模拟器之间能够使用 TCP 通信?
keywords: Android, Emulator, TCP
---
本文解决的是一个小众场景的问题:
出差在外,需要调试局域网内的两台 Android 设备之间通过 TCP 通信的情况,可手边又不是随时有多台可用的设备,于是想在笔记本上同时跑两台 Android 模拟器来构造调试环境,但是发现它俩的 IP 地址竟然都是 10.0.2.15,场面一度十分尴尬……
![]... |
# frozen_string_literal: true
require 'test_helper'
class FetchServiceTest < ActiveSupport::TestCase
def setup
@service = FetchService.new
end
test 'call with Service' do
assert_kind_of Entry, @service.call(models(:service))
end
test 'call with Application' do
stub_request(:get, "#{tenants(:one... |
/* You can use block/inline comments, just don't forget the semi-column! */
-- MyEntity table
CREATE TABLE `my_entities` (
`id` INT NOT NULL AUTO_INCREMENT,
`version` INT NOT NULL DEFAULT 0,
`is_discarded` TINYINT(1) NOT NULL DEFAULT 0,
`registered_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
... |
using System;
using System.Collections.Generic;
namespace Ambs.Reporting.DAL.Entities
{
public partial class GraphicalFeature
{
public long Id { get; set; }
public long ReportId { get; set; }
public int GraphType { get; set; }
public string Script { get; set; } = null!;
... |
# quiz-api
Flask/MongoDB API for original, multiple choice quiz questions
## Features
* Original questions found nowhere else on the internet
* Automatically shuffled choice array
## Example response
```
{
"question": "The final dissolution of the Soviet Union occured on which date?",
"correct_answer": "December ... |
use std::cell::RefCell;
use diesel::*;
use diesel::backend::Backend;
use diesel::query_builder::{AstPass, QueryFragment, QueryId};
use tracing::info;
use url::Url;
use crate::settings::DatabaseSettings;
embed_migrations!();
thread_local! {
pub static TEMP_DATABASES: RefCell<TempDatabases> = RefCell::new(TempDat... |
#!/bin/bash
# usage: $0 <pid to check>
#heading
echo "alpha,gamma,reached destination,mistakes,rewards"
for alpha in 1 0.1 0.01 0.001
do
for gamma in 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9
do
fileName=rl$1_$alpha\_$gamma.out
positives=`cat $fileName | awk '{if ($2 > $3) print 1;}' | wc -l`
... |
package main
import (
"encoding/json"
"fmt"
"net/http"
"net/url"
"os"
"strings"
)
func SendSMS(msg Message) {
accountSid := os.Getenv("TWILIO_ACCOUNT_SID")
authToken := os.Getenv("TWILIO_AUTH_TOKEN")
fromNum := os.Getenv("TWILIO_FROM_NUM")
urlStr := "https://api.twilio.com/2010-04-01/Accounts/" + accountSid... |
import { rotate } from './matrix'
export class Box {
constructor() {
this.x = 0;
this.y = 0;
this.shape = [
[1, 1],
[1, 1]
];
}
_rotates = []
_rotateIndex = 0
rotate() {
// -90 -180 -270 0
const rotateFn = this._rotates[this._rotateIndex]
if (!rotateFn) {
return;
}
this.shape = rotateFn.... |
(ns date-service.test.routes
(:use clojure.test
ring.mock.request
date-service.routes)
(:require [date-service.endpoints :as endpoints]))
(deftest test-root-route
(is (= (route (request :get "/")) [endpoints/current-time])))
(deftest test-not-found
(is (= (route (request :get "/nothing-here"))... |
package org.recap.filter;
import org.apache.commons.lang3.StringUtils;
import org.recap.ScsbConstants;
import org.recap.security.UserInstitutionCache;
import org.recap.util.HelperUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.filter.OncePerRequestFilter;
import javax.ser... |
.model tiny
.data
table_kbrd dw 0eeh, 0edh, 0ebh, 0e7h, 0deh, 0ddh, 0dbh, 0d7h, 0beh, 0bdh, 0bbh, 0b7h, 7eh, 7dh, 7bh, 77h
table_dis db 3fh, 06h, 5bh, 4fh, 66h, 6dh;, 007dh, 0027h, 007fh, 006fh, 0077h, 007ch, 0039h, 005eh, 0079h, 0071h
speed dw 00h
started dw 00h
auto_speed dw 03h
time ... |
package featurea.jvm
import org.w3c.dom.Attr
import org.w3c.dom.Document
import org.w3c.dom.Element
import org.w3c.dom.Node
import org.w3c.dom.Node.ATTRIBUTE_NODE
import org.xml.sax.InputSource
import java.io.File
import java.io.FileInputStream
import java.io.StringReader
import javax.xml.parsers.DocumentBuilder
impor... |
import { createStore, usePersistedState } from '../../../src';
const useName = () => {
const [name, persistName] = usePersistedState('', 'name');
const setName = (name: string) => {
persistName(name);
};
return {
name,
setName,
};
};
const NameStore = createStore(useName, { displayName: 'Name... |
/*
* Copyright 2017 Apereo
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in wr... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.