text stringlengths 27 775k |
|---|
import pinchSimulator from './utils/Gesture/pinchSimulator';
import sleep from './utils/sleep';
import AnyTouch from '../src/main'
const el = document.createElement('div');
const at = new AnyTouch(el);
test('pinch缩放计算是否正确?', (done) => {
let index = 0;
let expectScales = [2, 4, 6, 3, 1, 0.5, 0.2];
at.on('... |
package net.selenate.common.comms.req;
import java.net.URL;
import net.selenate.common.exceptions.SeInvalidArgumentException;
import net.selenate.common.exceptions.SeNullArgumentException;
public final class SeReqSessionDownload implements SeCommsReq {
private static final long serialVersionUID = 45749879L;
priv... |
from utils import (
create_dir,
open_source,
create_source,
create_sources,
open_sources
)
from contest import (
fetch_sources,
fetch_all_tests
)
from problem import (
fetch_tests,
check_problem
)
import argparse
import json
JUDGES = ['codeforces', 'cf']
def main():
with open... |
<?php
namespace EddieJaoude\Zf2Logger\Tests\Zf2LoggerTest\Log;
use EddieJaoude\Zf2Logger\Log\Logger;
/**
* Class LoggerTest
* @package EddieJaoude\Zf2Logger\Tests\Zf2LoggerTest\Log
*/
class LoggerTest extends \PHPUnit_Framework_TestCase
{
/**
* @var \EddieJaoude\Zf2Logger\Log\Logger
*/
private $... |
# PSW-ISA
# How to run
## Linux
cd scripts
./runDB.sh
./setupDB.sh
./runBackend.sh ../backend
./runFrontend.sh ../frontend
## Windwos
cd scripts/windows
./runDB.ps1
Login to your postgresql database (port 6666, localhost, user postgres and password is admin)
create server with port 6666, localhost;
cre... |
/*
* State takes an initialState and a reducer function to maintain a centralized
* location for data.
*/
class State {
#state
#reducer
constructor(initialState, reducer) {
this.#state = initialState
this.#reducer = reducer
}
set(state) {
this.#state = state
}
get() {
return this.#state... |
#30 * * * * ntpdate time.nist.gov
#59 * * * * sleep 50; /usr/local/openresty/nginx/sbin/split.sh
_prefix="/usr/local/openresty/nginx"
time=`date +%Y%m%d%H`
mv ${_prefix}/logs/ma.log ${_prefix}/logs/ma/ma-${time}.log
kill -USR1 `cat ${_prefix}/logs/nginx.pid`
|
import React from "react"
import {
SectionWrapper,
Div,
FooterSection,
SocialMedia,
RawMedia,
FooterJoinLink,
CopyRight,
} from "../design/Styles"
import rotaractVideo from "../../src/images/rotaractVideo.mp4"
import facebook from "../images/facebook.png"
import instagram from "../images/instagram.png"
im... |
#!/bin/bash
# The easiest method to demo is to have individual `az storage cors add` commands
# as shown here. If you wish to read in JSON and then execute az commands, you may
# be better off using a different tool than bash since it's complex
# to transform array elements into command arguments like below.
az stora... |
# frozen_string_literal: true
require 'rubygems/command'
require 'rubygems/query_utils'
##
# Searches for gems starting with the supplied argument.
class Gem::Commands::ListCommand < Gem::Command
include Gem::QueryUtils
def initialize
super 'list', 'Display local gems whose name matches REGEXP',
:na... |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Pirate.Ldap
{
/// <summary>
/// Type of membership used by Person objects.
/// </summary>
public enum EmployeeType
{
/// <summary>
/// Person is not a member. Used for forum accounts.
/// </summary>
... |
#pragma once
#include <memory>
#include <string>
#include <libadb/cfg/secrets.hpp>
namespace adb::api
{
class Context : public std::enable_shared_from_this<Context>
{
public:
Context(const std::string &baseUrl);
const std::string getBaseUrl() const;
const adb::cfg::SecretsData &ge... |
<?php
namespace App\Http\Controllers\Atek;
use App\Http\Controllers\Controller;
use App\Http\Controllers\Metro\ApiController;
use Carbon\Carbon;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Validator;
class TicketController extends Controller
{
function genTicket... |
import csv
if __name__ == "__main__":
"""
Parse the csv resulting from a call to kenken.gather
and print the algorithms sorted by various criteria in markdown format
"""
path = input("filepath: ")
with open(path, "r") as csvfile:
data = list(csvfile)
metrics = {}
for values i... |
import { stripHtml } from '@matters/matters-html-formatter'
import * as cheerio from 'cheerio'
import cloneDeep from 'lodash/cloneDeep'
import flow from 'lodash/flow'
export const countWords = (html: string) => {
const matches = stripHtml(html).match(/[\u4e00-\u9fcc]|\w+/g)
return matches ? matches.length : 0
}
/... |
package main
/*
Copyright (C) 2020 Manetu 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 in wr... |
#!/usr/bin/perl
open IN, "xxd -i fpga_bitmap|";
open OUT, ">fpga_bitmap.h";
while(<IN>) {
s/unsigned char/const PROGMEM unsigned char/;
s/unsigned int/unsigned long/;
print OUT;
} |
#!/bin/bash
unlockKeychain() {
KCP=$1
if [ "" = "$KCP" ]; then
echo "No password specified for keychain unlock - aborting"
exit 1
fi
KC="$HOME/Library/Keychains/login.keychain"
/usr/bin/security -v list-keychains -s "$KC"
/usr/bin/security -v default-keychain -d user -s "$KC" || failed "Cant make login key... |
-- migrate:up
ALTER TABLE public.links
ALTER COLUMN url TYPE VARCHAR ( 2048 );
-- migrate:down
ALTER TABLE public.links
ALTER COLUMN url TYPE VARCHAR ( 255 );
|
#!/usr/local/bin/bash
# set -x
YEAR=`date +"%Y"`
POSTS=($(grep title: _posts/$YEAR* | cut -d "/" -f 2 | cut -d "." -f 1))
IFS=$'\n';
TITLES=($(grep title: _posts/$YEAR* | cut -d "/" -f 2 | cut -d "." -f 2 | cut -d "\"" -f2| grep Day))
for t in $(seq ${#POSTS[*]}); do
echo "- [${TITLES[$t-1]}](http://www.dockeradvent.c... |
<?php
namespace Laminas\Db\Sql\Predicate;
use Laminas\Db\Sql\Literal as BaseLiteral;
class Literal extends BaseLiteral implements PredicateInterface
{
}
|
This sample demonstrates conversion of an MNIST network in ONNX format to
a TensorRT network. The network used in this sample can be found at https://github.com/onnx/models/tree/master/mnist
(model.onnx)
|
package deploy
import (
"github.com/YTF0/xiaomei_bb/release"
"github.com/lovego/config/config"
)
func GetCommonArgs(svcName, env, tag string) []string {
args := []string{`-e`, config.EnvVar + `=` + env}
service := release.GetService(env, svcName)
args = append(args, service.Options...)
args = append(args, serv... |
# BEGIN-SCRIPT-BLOCK
#
# Script-Filter:
# true
#
# Script-Variables:
# $command word "show version"
# END-SCRIPT-BLOCK
import requests, json, re
from infoblox_netmri.easy import NetMRIEasy
# This values will be provided by NetMRI before execution
defaults = {
"api_url": api_url,
"http_username": http_... |
CREATE TABLE `votes` (
`id` BIGINT NOT NULL AUTO_INCREMENT COMMENT 'unique identifier',
`document` VARCHAR(11) NOT NULL COMMENT 'cooperate document',
`vote` INT(1) NOT NULL COMMENT '1 - YES, 2 - NO',
`registe... |
# -*- coding: utf-8 -*-
"""
TODO: Please check readme.txt file first!
--
This Python2.7 program is to reproduce Figure-1 and Figure-4. In this test,
we compare GraphStoIHT with three baseline methods including IHT, StoIHT, and
GraphIHT. IHT is proposed in [3]. StoIHT is proposed in [1]. GraphIHT is
proposed [4] with h... |
## Managing Resources in Storage System Tests
Whenever possible (i.e. when your test does not mutate buckets), you should use
the default bucket available at `StorageTestCase::$bucket`. If you must create a
bucket, use `StorageTestCase::createBucket()` in order to correctly configure
the deletion queue.
Becaus... |
// SPDX-FileCopyrightText: 2021 Lars Geyer-Blaumeiser <lars@lgblaumeiser.de>
// SPDX-License-Identifier: MIT
package de.lgblaumeiser.ptm.service
import de.lgblaumeiser.ptm.service.analysis.ActivityComputer
import de.lgblaumeiser.ptm.service.analysis.HourComputer
import de.lgblaumeiser.ptm.service.analysis.ProjectCompu... |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using UnityEngine;
/// <summary>
/// 基于运行系统时间的时钟,可获得对应的时间,或者设置Timer
/// </summary>
class SystemTimer
{
//----------------------------------------------------------------------------
// 时间获取
//------------------... |
/**
Утилиты
**/
function z_ajax(ajax_params, params) {
// !!! Не доделал !!!
// Загружает по ajax данные.
// Отслеживает и ошибочные статусы, и "error" при корректном статусе
// Обработка результатов осуществялется через .then, .catch, .finally
// .finally вызывается в любом случае
// Если then вызывает исключе... |
part of axmvvm.models;
/// A subscription to be used with the MessageService.
class Subscription {
final String _name;
final Function(Object parameter) _messageHandler;
Subscription(this._name, this._messageHandler);
/// The name of the subscription to listen to messages for.
///
/// Any messages sent wi... |
using JT809.Protocol.Extensions;
using JT809.Protocol.MessageBody;
using System;
using System.Buffers;
using System.Collections.Generic;
using System.Text;
namespace JT809.Protocol.Formatters.MessageBodyFormatters
{
public class JT809_0x9003_Formatter : IJT809Formatter<JT809_0x9003>
{
public JT809_0x9... |
use std::collections::BTreeMap;
use std::cmp::{Ord, PartialOrd, Ordering};
use std::alloc::{alloc, dealloc, Layout};
use std::ptr::NonNull;
// I wrote my own Box + vtable after spending hours battling:
// * std::Any and it's 'static requirement
// * * This makes the casting safer and easier, but requires 'static makin... |
import * as React from 'react'
import styled, { css, StyledComponent } from 'styled-components'
import { Label } from '../Label'
import { fromTheme, StyledProps } from '../utils/styled'
import { preciseEm } from '../utils/styled/isolated'
import { Container } from './Container'
const ALIGNED_WIDTH = 20 // em
export... |
#include <gtest/gtest.h>
// Requires C++20
TEST(LambdaTypes, StatelessLambdas) {
auto x = [] {}; // A lambda without captures
auto y = x; // Assignable
decltype(y) z; // Default-constructible
static_assert(std::is_same_v<decltype(x), decltype(y)>); // passes
static_assert(std::is_same_v<decltype(x), dec... |
use crate::{encode_functype, encoders, ComponentSection, ComponentSectionId, EntityType, ValType};
/// Represents a module type.
#[derive(Debug, Clone, Default)]
pub struct ModuleType {
bytes: Vec<u8>,
num_added: u32,
types_added: u32,
}
impl ModuleType {
/// Creates a new module type.
pub fn new(... |
<?php declare(strict_types=1);
namespace Lengow\Connector\Storefront\Controller;
use Shopware\Core\Framework\Routing\Annotation\RouteScope;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Lengow\Connector\Service\LengowAc... |
using UnityEditor;
namespace UnityToCustomEngineExporter.Editor
{
public class BoolEditorProperty
{
private readonly string _name;
private readonly string _key;
public BoolEditorProperty(string key, string name, bool value)
{
_key = key;
_name = name;
... |
package renetik.android.framework.store.property.value
import renetik.android.framework.json.data.CSJsonObject
import renetik.android.framework.store.CSStoreInterface
import kotlin.reflect.KClass
class CSJsonListValueStoreEventProperty<T : CSJsonObject>(
store: CSStoreInterface,
key: String,
val type: KCl... |
@extends('layouts.lyttest')
@section('content')
<table>
<thead>
<th>ID</th>
</thead>
<tbody>
<tr><td>1</td></tr>
</tbody>
</table>
@endsection
@section('title','hijo') |
define void @Microsoft__Quantum__Testing__QIR__TestOperationCalls__body() #0 {
entry:
%doNothing = call %Callable* @Microsoft__Quantum__Testing__QIR__ReturnDoNothing__body(i64 1)
call void @__quantum__rt__capture_update_alias_count(%Callable* %doNothing, i32 1)
call void @__quantum__rt__callable_update_alias_coun... |
from django.db import models
from django.conf import settings
# Create your models here.
class Catagories(models.Model):
title = models.CharField(max_length=150, db_index=True)
detail = models.TextField(max_length=5000, blank=True, null=True)
photo = models.ImageField(
upload_to='catagories_photos/'... |
### java-lib
This project module is used to generate a .module and .pom from
the `java-library` and `maven-publish` as an output guide.
`./gradlew -b java-lib/build.gradle.kts publish` |
require 'spec_helper'
RSpec.shared_examples :capybara_methods_proxy do
let(:session) { double(:session) }
before do
allow(Capybara).to receive(:current_session) { session }
allow(Howitzer).to receive(:driver) { driver_name }
allow(session).to receive(:current_url) { 'google.com' }
end
describe '#d... |
package kt
class KotlinCodeBuilder {
private val imports: MutableList<String> = mutableListOf()
private val classes: MutableList<KotlinClassBuilder> = mutableListOf()
fun imports(file: String) {
imports.add("import $file")
}
fun writeClass(name: String, superName: String? = null, fn: Kotl... |
#include <iostream>
#include <tool/Input.hpp>
namespace tool {
void InputState::reset() {
this->released = false;
this->pressed = false;
}
std::ostream &operator<<(std::ostream &os, const InputState &inputState) {
os << "Pressed: " << (inputState.pressed ? "true" :... |
export const keys = Object.freeze({
APP_NAME: 'APP_NAME',
FLAGS: 'FLAGS',
RADIX_API_ENVIRONMENT: 'RADIX_API_ENVIRONMENT',
RADIX_CLUSTER_BASE: 'RADIX_CLUSTER_BASE',
RADIX_ENVIRONMENT: 'RADIX_ENVIRONMENT',
RADIX_CLUSTER_NAME: 'RADIX_CLUSTER_NAME',
RADIX_CLUSTER_TYPE: 'RADIX_CLUSTER_TYPE',
});
export const ... |
-- 天气表
DROP TABLE IF EXISTS `weather_history`;
CREATE TABLE `weather_history` (
`id` int NOT NULL,
`SORT_NUM` int DEFAULT NULL,
`LAST_UPD_TIME` datetime DEFAULT NULL,
`LAST_UPD_USER` int DEFAULT NULL,
`CREAT_TIME` datetime DEFAULT NULL,
`CREATOR` int DEFAULT NULL COMMENT '上报人',
`LAST_UPD_IP` varchar(100)... |
#!/bin/bash
#SBATCH --gres=gpu:1
#SBATCH -c 6
#SBATCH --mail-type=FAIL,END
if [[ ! -z ${SLURM_JOBID+z} ]];
then
echo "Setting up SLURM env"
setcuda 10.2
conda activate python37
else
echo "Not a SLURM job"
fi
set -o errexit
set -o pipefail
set -o nounset
CONFIG_FILE=${1-./configs/config.env}
set -o allexport
so... |
import {Workbook} from 'exceljs';
import {ExportDataInterface} from '../types/common/export-data.interface';
export interface FillerInterface {
fill(workbook: Workbook, data: ExportDataInterface): Promise<void>;
}
|
CREATE TABLE v3_0_ballot_candidates (ballot_id INTEGER,
candidate_id INTEGER);
|
---
published: true
layout: post
date: '2017-03-21 11:25 +0100'
title: geany-plugin-overview
tags: linux
---
In Stretch
sudo apt install geany-plugin-overview

Stretch compared to Jessie
[https://forums.bunsenlabs.org/viewtopic.php?id=3344](ht... |
import 'dart:async';
import 'dart:math';
import 'package:aliyun_oss_dart_sdk/src/client_exception.dart';
import 'package:aliyun_oss_dart_sdk/src/common/oss_log.dart';
import 'package:aliyun_oss_dart_sdk/src/common/utils/extension_util.dart';
import 'package:aliyun_oss_dart_sdk/src/exception/lib_exception.dart';
import... |
import test from 'ava';
import chalk from 'chalk';
import { info, erro, warn } from './log';
test('info', t => {
t.is(info('teste'), `${chalk.bgBlue(' INFO ')}: teste`);
});
test('info without args', t => {
t.is(info(), `${chalk.bgBlue(' INFO ')}: `);
});
test('erro', t => {
t.is(erro('teste'), `${chalk.bgRed... |
import * as fromActions from './chain-list-page.actions';
import * as fromReducers from './chain-list-page.reducers';
describe('chain-list-page: reducers', () => {
it('should return with the initial state.', () => {
expect(fromReducers.reducer(undefined, new fromActions.NoopChainAction())).toBe(fromReducers.ini... |
module Jekyll
class Site
# Introduce complement to {::Jekyll::Site#find_converter_instance} for generators.
def find_generator_instance type
generators.find {|candidate| type === candidate } || (raise %(No Generators found for #{type}))
end
end
end unless Jekyll::Site.method_defined? :find_generat... |
using SnapsLibrary;
using Newtonsoft.Json;
class Ch10_07_PizzaPicker
{
class PizzaDetails
{
public int CheeseAndTomatoCount = 0;
public int pepperoniCount = 0;
public int chickenCount = 0;
public int vegetarianCount = 0;
}
public void StartProgram()
{
stri... |
---
title: Flashlight
---
# Flashlight
The flashlight is a simple item that is simply used to light up a small area. It never runs out of battery.
**It is not a light source for specific types of ghosts that care about lights.**
## During the hunt
When the hunt begins, your flashlight will flicker.
## Tips
- tur... |
namespace Miruken.AspNetCore.SignalR.Test.Site
{
using Api;
using Callback;
using Microsoft.Extensions.Logging;
using Tests;
public class PlayerListener : Handler
{
private readonly ILogger _logger;
public PlayerListener(ILogger logger)
{
_logg... |
import mediaGallery from 'media-gallery';
describe('In media gallery', () => {
beforeEach((done) => {
mediaGallery.clear().then(done);
});
describe('When I call "count" after saving 2 files', () => {
let count;
beforeEach((done) => {
mediaGallery.save('somefile1.mp3', createRandomArrayBuffer(3... |
require ('./lib/config.js');
module.exports = {
checker: require ('./lib/checker.js'),
sendMail: require ('./lib/helper.js').sendMail
}
|
package creek
import (
"compress/gzip"
"fmt"
"io"
"os"
"path/filepath"
"sync"
"time"
)
// Logger defines our custom Logger type.
type Logger struct {
Filename string // the file to log to
MaxSize int64 // max file size in MB
file *os.File
size int64
mu sync.Mutex
}
// New creates a new cr... |
// $Id$
//! \file
//! minimal decoders
/*************** base primitives ***********************/
//! base64
ssize_t codecs_from_base64(const uint8_t* data,size_t sz,uint8_t** ret,uint32_t* err);
//! quoted-printable
ssize_t codecs_from_qp(const uint8_t* data,size_t sz,uint8_t** ret,uint32_t* err);
//! uuencoded /T... |
---
layout: post
title: 肉食者鄙,未能远谋
---
> 我什么都不知道。——川
在伟大的党中央作出关闭著名违法网站Gmail这一重大决定之前,我几乎就要成为一只自干五了。
不久,在人民群众的大力拥护下,Wikipedia, Google Scholar, Google Code, GitHub等海外反华势力的主要据点相继被英明的党中央铲除了。
最神奇的是,Python的官网和Ruby Gems也从中国消失了?
据我推测, Python被封杀是因为驻华分裂势力使用的通讯工具GoAgent是用Python编写的? 唉,真是醉了。
后来, Wikipedia, Github和Python的官网都相继解封了。
... |
/*
Copyright 2022 rev1e
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
distribute... |
module Chess
class Game
attr_accessor :board, :player1, :player2
def initialize(player1, player2)
@player1 = player1
@player2 = player2
@board = Board.new
@board.new_game
end
def coordinate_parser(coord)
y = nil
x = nil
coord.split(//)
if coord[0] == 'a'
x = 0
elsif coord[0] ... |
package ru.maximkulikov.goodgame.api.chatmodels;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.Data;
/**
* @author Maxim Kulikov
* @since 10.01.2017
*/
@Data
@JsonIgnoreProperties(ignoreUnknown = true)
public class ReqPrivateMessageContainer implements ReqChatObject {
private Str... |
-module(swidden_middleware).
-export([failure/2, failure/3]).
failure(Req, Type) when is_binary(Type) ->
cowboy_req:reply(400, #{<<"content-type">> => <<"application/json">>},
jsone:encode(#{error_type => Type}), Req).
failure(Req, Type, Reason) when is_binary(Type) andalso is_map(Reason) ... |
import 'package:flutter/material.dart';
import 'package:rad_onc_project/data/global_data.dart' as datas;
import 'package:rad_onc_project/data/particle_data.dart' as particles;
import 'package:rad_onc_project/functions/preferences_functions.dart'
as funcPrefs;
import 'package:rad_onc_project/functions/spline_functio... |
package com.birdsgenesis.dto.nft;
import com.birdsgenesis.dto.meta.Metadata;
import com.birdsgenesis.dto.meta.NftAttribute;
import lombok.Getter;
import lombok.Setter;
@Getter
@Setter
public class Bird extends Nft {
private NftAttribute background;
private NftAttribute eyes;
private NftAttribute headWear... |
import { mapStateToProps } from 'pages/Series';
describe('containers/series', () => {
it('should return the right stuff', () => {
expect(mapStateToProps({ series: {
shows: {
items: [],
},
} })).toMatchSnapshot();
});
});
|
import classes from './Cart.module.css';
import { useContext } from 'react';
import Modal from '../UI/Modal';
import CardItem from './CartItem/CartItem';
import { useSelector } from 'react-redux';
import { useDispatch } from 'react-redux';
import { cartActions } from '../../store/cart-slice';
const Cart = (props) => {
... |
package sensordata
//tag::logic[]
import akka.grpc.scaladsl.ServerReflection
//end::logic[]
import akka.http.scaladsl.server.Directives._
import akka.http.scaladsl.server.Route
import akka.http.scaladsl.server.directives.RouteDirectives
import cloudflow.akkastream._
//tag::logic[]
import cloudflow.akkastream.util.sca... |
import Cascade from '../cascade/Cascade';
import { observable } from '../cascade/Decorators';
import { Component } from './Component';
class ViewModel {
runs: number = 0;
@observable info: string = 'test';
}
interface IParentProps {
viewModel: ViewModel;
}
class Parent extends Component<IParentProps> {
... |
package de.trundicho.warp.reader.core.view.api.timer;
import de.trundicho.warp.reader.core.controller.WarpUpdater;
public interface WarpTimer extends WarpReaderTimer {
void doNextWarp(WarpUpdater warpUpdater);
}
|
#!/usr/bin/env bash
# Variables
PLIST_FILE=$APPCENTER_SOURCE_DIRECTORY/StatusChecker.iOS/Info.plist
APPVERSION_FILE=$APPCENTER_SOURCE_DIRECTORY/appversion.txt
# ./Variables
# Replacing Info.plist
if [ -e "$PLIST_FILE" ]
then
echo "Updating configuration in Info.plist"
sed -i '' 's/$(CFBundleIdentifier)/'$PLI... |
export 'src/blocks/async.dart';
export 'src/blocks/for.dart';
export 'src/blocks/html.dart';
export 'src/blocks/if.dart';
export 'src/blocks/key.dart';
export 'src/blocks/slot.dart';
export 'src/blocks/subcomponent.dart';
export 'src/core/component.dart' hide parentComponent;
export 'src/core/fragment.dart';
export 's... |
<?php
namespace Ekyna\Component\Commerce\Order\EventListener;
use Ekyna\Component\Commerce\Common\Model\SaleInterface;
use Ekyna\Component\Commerce\Exception\InvalidArgumentException;
use Ekyna\Component\Commerce\Order\Event\OrderEvents;
use Ekyna\Component\Commerce\Order\Model\OrderShipmentInterface;
use Ekyna\Compo... |
import { AlunoModel } from './../Models/Aluno.model.js'
export class AlunosController {
constructor(service, view) {
view.render(service.alunos)
this.view = view
this.service = service
}
add(aluno) {
this.service.add(new AlunoModel(aluno))
this.view.render(this.serv... |
import { IdentityKeyPair } from './utils';
interface RefreshOptions {
gaiaUrl: string;
}
export interface Identity {
keyPair: IdentityKeyPair;
address: string;
usernames: string[];
defaultUsername?: string;
profile?: Profile;
profileUrl(gaiaUrl: string): Promise<string>;
appPrivateKey(appDomain: strin... |
<?php
$empresa = $_SESSION['empresa'];
$nomeUsuario = $_SESSION['usuario'];
$statusUsuario = $_SESSION['status'];
$funcao = $_SESSION['funcao'];
$nivel = $_SESSION['nivel'];
$nomeEquipe = $_SESSION['equipe'];
$nomePrestadora = $_SESSION['prestadora'];
$acessoSP = $_SESSION['acessoSP'];
$acessoBR = $_SESSION['acessoBR... |
import os, glob, shelve
from xlrd import open_workbook, XL_CELL_TEXT, XL_CELL_NUMBER, XL_CELL_DATE
import matplotlib.pylab as plt
#SRCDIR="""\\nsls2fs\Accelerator\MagnetMeasurements\RotatingCoil\Latest_Data"""
#SRCDIR="""Y:\MagnetMeasurements\RotatingCoil\Latest_Data"""
SRCDIR="./MagnetMeasurements/RotatingCoil/Latest... |
## 0.0.1+2
* Fix `\frac` line positioning.
## 0.0.1+1
* Expanded color support to include HTML color keywords and hexadecimal strings.
* Improved documentation.
## 0.0.1
* Initial release of the CaTeX package.
## 0.0.0
* Placeholder version.
|
export default function validate(values, props) {
let { attributes } = props;
values.members === undefined ? (values.members = {}) : "";
const errors = { members: {} };
if (!values.name) {
errors.name = "Name is required";
}
if (attributes.find(el => el.name === values.name)) {
errors.name = `Anoth... |
begin_unit|revision:0.9.5;language:Java;cregit-version:0.0.1
begin_package
DECL|package|org.jabref.logic.cleanup
package|package
name|org
operator|.
name|jabref
operator|.
name|logic
operator|.
name|cleanup
package|;
end_package
begin_import
import|import
name|java
operator|.
name|nio
operator|.
name|file
operator|.
n... |
//线图方法
function createLine(id,names,datas,ttl,ttl2){
var presets = window.chartColors;
var utils = Samples.utils;
var inputs = {
min: 0,
max: 10000,
count: 8,
decimals: 1,
continuity: 1
};
function generateData(config) {
return utils.numbers(utils.merge(inputs, ... |
# Introduction to Load Testing with Gatling
Source-code from the Introduction to Load Testing with [Gatling](http://gatling.io) articles.
<li>The first article can be found here: https://www.ivankrizsan.se/2016/04/16/introduction-to-load-testing-with-gatling-part-1/</li>
<li>The second article can be found here: http... |
package org.gotson.komga.infrastructure.datasource
import com.zaxxer.hikari.HikariDataSource
import org.gotson.komga.infrastructure.configuration.KomgaProperties
import org.springframework.boot.autoconfigure.jdbc.DataSourceProperties
import org.springframework.boot.context.properties.ConfigurationProperties
import org... |
package com.hendraanggrian.javapoet.dsl
import com.google.common.truth.Truth
import com.squareup.javapoet.TypeName
import com.hendraanggrian.javapoet.asTypeName
import kotlin.test.Test
class TypeNameHandlerTest {
private val list = TypeNameHandler(mutableListOf())
@Test
fun test() {
list += TypeN... |
set names iso88591;
select charset('abc'), if(charset('abc')='iso88591', 'OK','NOK');
select charset(''), if(charset('')='iso88591', 'OK','NOK');
select charset('~*. '), if(charset('~*. ')='iso88591', 'OK','NOK');
set names utf8;
select charset('abc'), if(charset('abc')='utf8', 'OK','NOK');
select charset(''), if(cha... |
package com.example.androiddevchallenge.ui.components
import androidx.compose.material.MaterialTheme
import androidx.compose.runtime.Composable
import com.example.androiddevchallenge.R
@Composable
fun logoResource() =
if (MaterialTheme.colors.isLight) R.drawable.ic_light_welcome_illos else R.drawable.ic_dark_welc... |
from wtforms.widgets import HTMLString
class InlineWidget(object):
"""
Renders a list of fields inline.
This is used for fields which encapsulate many inner fields as subfields.
The widget will try to iterate the field to get access to the subfields and
call them to render them.
If `prefix_lab... |
<?php
namespace PHPfriends\SimplePdf\LowLevelParts;
use PHPfriends\SimplePdf\Common\GetAliasInterface;
class Content implements PartInterface
{
use LazyReferenceTrait;
/** @var string */
protected $stream;
/**
*/
public function __construct()
{
$this->stream = '';
}
/... |
# Wellcome to Hippo Project
[Visit us! Hippoapp](http://fathomless-journey-9978.herokuapp.com/) |
<?php
declare(strict_types=1);
namespace Antidot\Logger\Container\Config;
use Antidot\Logger\Application\Http\Middleware\ExceptionLoggerMiddleware;
use Antidot\Logger\Application\Http\Middleware\RequestLoggerMiddleware;
use Antidot\Logger\Container\MonologFactory;
use Psr\Log\LoggerInterface;
class ConfigProvider
{... |
#
# Table structure for table 'radippool'
#
CREATE TABLE radippool (
id int(11) unsigned NOT NULL auto_increment,
pool_name varchar(30) NOT NULL,
framedipaddress varchar(15) NOT NULL default '',
nasipaddress varchar(15) NOT NULL default '',
calledstationid ... |
module Dependent.HListSpec where
import Basic.TypeOf (typeOf)
import Dependent.HList (HList (..))
import Test.Hspec (Spec, describe, it, shouldBe)
spec_HList :: Spec
spec_HList = describe "HListSpec" $ do
construction
construction :: Spec
construction = describe "Construction"... |
/*
* Copyright (C) 2015 The Android Open Source Project
*
* 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 app... |
require "rails_admin_password_edit/engine"
module RailsAdminPasswordEdit
end
require 'rails_admin/config/actions'
module RailsAdmin
module Config
module Actions
class PasswordEdit < Base
RailsAdmin::Config::Actions.register(self)
register_instance_option :member? do
true
... |
import { NestedPageMetadata, PageMetadata } from '@docfy/core/lib/types';
import flatNested from './flat-nested';
export default function findPreviousOrNextPage(
url: string,
isPrevious: boolean,
nested: NestedPageMetadata
): PageMetadata | undefined {
const flat = flatNested(nested);
const index = flat.find... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.