text stringlengths 27 775k |
|---|
module AbbrvKW
import StatsBase.countmap
export @AbbrvKW
function findAbbrv(symLong::Vector{Symbol})
if length(symLong) == 0
return symLong
end
out = Dict()
for sym in symLong
out[sym] = Vector{Symbol}()
end
symAbbr = deepcopy(symLong)
symStr = convert.(String, symLong)
... |
import {Component, OnInit} from '@angular/core';
import {TodoListService} from './todo-list.service';
import {Todo} from './todo';
import {Observable} from "rxjs/Observable";
@Component({
selector: 'app-todo-list-component',
templateUrl: 'todo-list.component.html'
})
export class TodoListComponent implements OnIn... |
---
layout: archive
title: "Sitemap"
permalink: /sitemap/
author_profile: true
---
{% include base_path %}
A list of all the posts and pages found on the site.
* [About](https://yangliuy.github.io/)
* [CV](https://yangliuy.github.io/cv/) |
<ompts:test>
<ompts:testdescription>Test which checks the if clause of the omp task directive. The idear of the tests is to generate a tasks in a single region and pause it immediately. The parent thread now shall set a counter variable which the paused task shall evaluate when woke up.</ompts:testdescription>
<ompts:o... |
package my.itgungnir.grouter.api
import android.net.Uri
import my.itgungnir.grouter.api.dto.RouterRequest
import java.lang.ref.WeakReference
/**
* RouterBuilder
*/
class RouterBuilder(val context: WeakReference<Any>) {
// 初始化RouterRequest对象
private var request = RouterRequest(context = context)
/**
... |
import { expect } from 'chai'
import * as m from 'ts-mockito'
import { TupleLiteralType, BasicType } from '../'
import { ImplementationError } from '../../errors';
describe('empty TupleLiteralType', () => {
let instance: TupleLiteralType
before(() => {
instance = new TupleLiteralType([])
})
... |
package service
import (
"context"
"fmt"
"testing"
lmdl "go-common/app/admin/main/activity/model"
. "github.com/smartystreets/goconvey/convey"
)
func TestService_Archives(t *testing.T) {
Convey("service test", t, WithService(func(s *Service) {
res, err := s.Archives(context.Background(), &lmdl.ArchiveParam{... |
#include <umapTest.H>
module umap_test_module
use amrex_fort_module, only : dim=>bl_spacedim, amrex_real
implicit none
type, bind(c) :: facedata
real(amrex_real) :: aperature
real(amrex_real) :: centroid(0:dim-1)
end type facedata
type, bind(c) :: ebbndrydata
real(amrex_real) :: normal(0:di... |
//*******************************************************************************************************
// ManagePDCs.xaml.cs
// Copyright © 2009 - TVA, all rights reserved - Gbtc
//
// Build Environment: C#, Visual Studio 2008
// Primary Developer: Mehul P. Thakkar
// Office: INFO SVCS APP DEV, CHATTANOOGA... |
(in-package #:docstample.mechanics)
(defclass mechanics-generator (fundamental-generator)
())
(defclass mechanics-generator-visitor (fundamental-plist-visitor)
())
|
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
module Azure::StorSimple8000Series::Mgmt::V2017_06_01
module Models
#
# The extended info of the manager.
#
class ManagerExtendedInfo < BaseModel
inc... |
-- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Feb 27, 2018 at 12:47 AM
-- Server version: 10.1.30-MariaDB
-- PHP Version: 7.0.27
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... |
import { queryProject } from '@/services/api';
const buy = (number, crowdAddress, callback) => {
if (!web3) {
return Promise.reject();
}
const account = web3.eth.coinbase;
const weiPerShare = '10000000000000000';
const amount = number * weiPerShare;
web3.eth.sendTransaction(
{
from: account,
... |
ENV['MT_NO_PLUGINS'] = '1' # Work around stupid autoloading of plugins
gem 'minitest'
require 'minitest/global_expectations/autorun'
require 'minitest/hooks/default'
require 'minitest/shared_description'
require_relative "deprecation_helper"
def Sequel.guarded?(*checked)
unless ENV['SEQUEL_NO_PENDING']
checked.... |
--
-- packages/acs-lang/sql/oracle/language-create.sql
--
-- @author Jeff Davis (davis@arsdigita.com)
-- @author Christian Hvid
-- @author Bruno Mattarollo (bruno.mattarollo@ams.greenpeace.org)
--
-- @creation-date 2000-09-10
-- @cvs-id $Id: message-catalog.sql,v 1.4 2015/12/04 13:50:04 cvs Exp $
--
create table lang_... |
//! Log module
use byteorder::{BigEndian, ByteOrder};
use super::types::*;
/// As log trait for how primitive types are represented as indexed arguments
/// of the event log
pub trait AsLog {
/// Convert type to hash representation for the event log.
fn as_log(&self) -> H256;
}
impl AsLog for u32 {
fn as_log(&sel... |
export { default as activeStyle } from './activeStyle';
export { default as getAvailableActions } from './getAvailableActions';
|
package cn.gjing.tools.excel.read.listener;
import cn.gjing.tools.excel.ExcelField;
import cn.gjing.tools.excel.metadata.listener.ExcelReadListener;
import org.apache.poi.ss.usermodel.Cell;
/**
* Empty value listener
*
* @author Gjing
**/
@FunctionalInterface
public interface ExcelEmptyReadListener<R> extends Exc... |
package com.liyafeng;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.ServiceConnection;
import android.os.Handler;
import android.os.IBinder;
import android.os.Message;
import android.os.Messenger;
import android.os.RemoteException;
import an... |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SGF;
using UnityEngine;
namespace SGF.UI.Framework
{
public class UIRoot:MonoBehaviour
{
public const string LOG_TAG = "UIRoot";
/// <summary>
/// 从UIRoot下通过类型寻找一个组件对象
/// </summary>
... |
use crate::generator::random::{generate_random, generate_random_string};
use crate::{print_message_per_sec};
use log::info;
use rumqttc::{AsyncClient, Event, MqttOptions, Outgoing, QoS};
use std::time::Instant;
pub(crate) async fn bench(host: String, port: u16) {
let name: String = generate_random_string(30);
... |
/** Copyright © 2018 Socket Mobile, Inc. */
package com.socketmobile.stockCount.ui
import android.content.Intent
import android.net.Uri
import android.os.Bundle
import android.support.v4.app.DialogFragment
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import com.socketmobi... |
package com.absinthe.anywhere_.utils
import android.content.pm.PackageManager
import android.util.Patterns
import com.absinthe.anywhere_.constants.AnywhereType
import com.absinthe.anywhere_.constants.Const
import com.absinthe.anywhere_.constants.GlobalValues.workingMode
import com.absinthe.anywhere_.model.ExtraBean
im... |
// VeriBlock NodeCore
// Copyright 2017-2021 Xenios SEZC
// All rights reserved.
// https://www.veriblock.org
// Distributed under the MIT software license, see the accompanying
// file LICENSE or http://www.opensource.org/licenses/mit-license.php.
package org.veriblock.miners.pop.api.controller
import com.papsign.kt... |
FactoryBot.define do
factory :order do
amount { 200 }
manual_order { true }
marketplace_order_id { 1 }
network_id { 1 }
total_weight_in_lb { 1.1 }
warehouse_address_id { 'a854ff0b-d655-42cf-84a9-68c8dd8e2405' }
delivery_location_id { 'c5898a34-599d-4f3f-b3b3-263367e5dc50' }
end
end
|
<?php
namespace App\Models\HT10;
use Illuminate\Database\Eloquent\Model;
class Feedback extends Model
{
protected $fillable = [
'content','order', 'note','user_id','create_by','modify_by'
];
protected $fillable_store = [
'content','order', 'note','user_id'
];
protected $fillable_u... |
import tensorflow.compat.v1 as tf
import dense_layer
tf.disable_v2_behavior()
'''
a non-recurrent 'cell' to use as the controller
using this makes sure that any recurrent functionality
is learned using the DNC's read / write heads.
'''
class StatelessCell(tf.nn.rnn_cell.RNNCell):
def __init__(self, layer_name, ... |
<!--Dear friend, we, the rest of the NativeScript community thank you for your
contribution! Because we want to present a really nice, readable changelog with each
release, please provide the following information: -->
### Create a meaningful title
<!-- Please, ensure your title is less than 50 characters and starts w... |
define([
'jasmine',
'streamhub-scorecard',
'streamhub-sdk',
'streamhub-sdk/stream-manager',
'../MockStream',
'jasmine-jquery'],
function (jasmine, ScorecardView, Hub, StreamManager, MockStream) {
describe('A ScorecardView', function () {
it ("can have tests run", function () {
expect... |
#!/bin/sh
VODUS=../../vodus.release
set -xe
rm -rf ./expected-frames/
mkdir -p ./expected-frames/
$VODUS ./utf-8.txt expected-frames/ --config ./test.conf
|
package com.molko.assistedreminder
import androidx.room.*
@Entity(tableName = "reminders")
data class Reminder(
@PrimaryKey(autoGenerate = true) var uid: Int?,
@ColumnInfo(name = "time") var time: Long?,
@ColumnInfo(name = "location") var location: String?,
@ColumnInfo(name = "message") var message: S... |
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
; RUN: llc -mcpu=pwr9 -mtriple=powerpc64le-unknown-unknown \
; RUN: -verify-machineinstrs -ppc-vsr-nums-as-vr \
; RUN: -ppc-asm-full-reg-names < %s | FileCheck %s
define dso_local void @clobberVR(<4 x i32> %a, <4 x i32> %b) local_unnamed... |
import schedule from '../build/index.js'
test('schedule', async () => {
const task = await schedule('1h', async () => {
console.log('Hello World')
})
expect(task).toEqual(
expect.objectContaining({
pause: expect.any(Function),
resume: expect.any(Function)
})
)
await task.pause()
}) |
// SPDX-License-Identifier: Apache-2.0
// Copyright Authors of Cilium
//go:build !privileged_tests
// +build !privileged_tests
package pidfile
import (
"fmt"
"os"
"os/exec"
"testing"
. "gopkg.in/check.v1"
"github.com/cilium/cilium/pkg/checker"
)
const (
path = "/tmp/cilium-test-pidfile"
)
// Hook up goche... |
# Authors
[@rpunkfu](https://github.com/rpunkfu) - [@zzarcon](https://github.com/zzarcon) |
{"timestamp": 1580812033.0, "score": 7.78, "score_count": 11224}
{"timestamp": 1580204147.0, "score": 7.79, "score_count": 9613}
{"timestamp": 1581420088.0, "score": 7.8, "score_count": 13132}
{"timestamp": 1578986863.0, "score": 7.8, "score_count": 4930}
{"timestamp": 1579596383.0, "score": 7.8, "score_count": 7640}
{... |
# LoginApp-NodeJS-MongoDB
Simply login app using node.js and mongoDB as database. which uses passport for authentication.
# Working
### Install all the packages.
```code
npm install
```
### To start the server
```
npm start
```
|
package main
import (
"fmt"
"math/rand"
"os"
"time"
"github.com/andrewarrow/feedbacks/server"
"github.com/andrewarrow/feedbacks/util"
e "github.com/andrewarrow/feedbacks/email"
)
func main() {
rand.Seed(time.Now().UnixNano())
if util.InitConfig() == false {
print("no config")
return
}
if len(os.Args)... |
<?php
/**
* @package Divante\PimcoreIntegration
* @author Mateusz Bukowski <mbukowski@divante.pl>
* @copyright 2018 Divante Sp. z o.o.
* @license See LICENSE_DIVANTE.txt for license details.
*/
namespace Divante\PimcoreIntegration\Model\Queue\Product;
use Divante\PimcoreIntegration\Api\Queue\Data\ProductQ... |
package com.ttenushko.androidmvi
interface Transformer<I, O> {
fun transform(input: I): O
} |
package me.chill.commands
import me.chill.arguments.types.Sentence
import me.chill.database.operations.disableWelcome
import me.chill.database.operations.editWelcomeMessage
import me.chill.database.operations.enableWelcome
import me.chill.database.operations.getWelcomeDisabled
import me.chill.database.states.WelcomeSt... |
<?php
namespace Esat\Esatisfaction\Block;
use \Magento\Framework\View\Element\Template;
use \Magento\Framework\View\Element\Template\Context;
use \Magento\Store\Model\StoreManagerInterface;
use Esat\Esatisfaction\Helper\Data;
class Head extends Template
{
public function __construct (Context $context, St... |
CREATE TABLE [ml].[model]
(
[id] INT NOT NULL PRIMARY KEY IDENTITY,
[name] NVARCHAR(50) NOT NULL,
[model] varbinary(max) NOT NULL,
[training_observations] INT,
[test_observations] INT,
[key_metric] VARCHAR(50),
[key_metric_value] FLOAT,
[metrics] VARCHAR(MAX),
[info] VARCHAR(MAX),
[SysStart] DATETIME2 ... |
package org.roboquant.strategies.utils
import org.roboquant.feeds.PriceBar
import java.time.Instant
import java.time.temporal.ChronoUnit
/**
* Calculates the Daily VWAP. VWAP is a single-day indicator, and is restarted at the opening of each new trading day.
* If there is more than 8 hours between two events, it i... |
package gma.logs.app.controller.openconfig
import gma.logs.app.model.config.LogsConfiguration
import tornadofx.*
class OpenConfigurationEvent(val configuration: LogsConfiguration) : FXEvent()
|
package persistence
import (
"todo-app/domain/model"
"todo-app/domain/repository"
"github.com/pkg/errors"
"gorm.io/gorm"
)
type TaskPersistence struct {
conn *gorm.DB
}
func NewTaskPersistence(conn *gorm.DB) repository.TaskRepository {
return &TaskPersistence{
conn,
}
}
func (tp *TaskPersistence) Create(t... |
# frozen_string_literal: true
# Represent a specific voting round
class Vote < ApplicationRecord
acts_as_paranoid
acts_as_list(scope: :sub_item)
belongs_to :sub_item
has_many :audits, as: :auditable
has_many :vote_options, dependent: :destroy
has_many :vote_posts, dependent: :destroy
validates :title, ... |
@extends('layouts.owner')
<!-- タイトル・メタディスクリプション -->
@section('title', '出金リクエスト | おけいcom')
@section('description', '出金リクエスト')
<!-- CSS -->
@push('css')
@endpush
<!-- 本文 -->
@section('content')
<div class="l-wrap--owner--main">
<div class="l-wrap--owner--header">
<div class="l-wrap--owner--header--title">
<... |
package com.alainodea.idp.service;
import org.opensaml.core.xml.io.MarshallingException;
import org.opensaml.saml.saml2.core.Assertion;
import org.opensaml.saml.saml2.core.impl.AssertionMarshaller;
import org.opensaml.security.credential.Credential;
import org.opensaml.xmlsec.signature.Signature;
import org.opensaml.x... |
import {NgModule} from '@angular/core';
import {IonicPageModule} from 'ionic-angular';
import {MediaPage} from './media';
import {PhotoViewer} from '@ionic-native/photo-viewer';
import {StreamingMedia} from '@ionic-native/streaming-media';
@NgModule({
declarations: [
MediaPage,
],
imports: [
... |
# Sage 0.4 pre alpha
An uncompleted multiparadigmatic functional language based on the idea of message passing - inspired by Ocaml and Self
## License:
https://github.com/frank-hliva/Sage/blob/master/LICENSE.md
|
# Pulumi Project in Typescript (AWS) Template
A general template to use for Pulumi projects in Typescript (for AWS) with some good practices.
- [Pulumi 3](https://pulumi.com/)
- [Typescript 4](https://www.typescriptlang.org/)
- [ESLint](https://eslint.org/)
- [Prettier](https://prettier.io/)
- NPM Scripts
- Editor Co... |
require 'data_mapper'
require 'dm-validations'
require "#{File.dirname(__FILE__)}/user"
require "#{File.dirname(__FILE__)}/weapon"
require "#{File.dirname(__FILE__)}/victim"
require "#{File.dirname(__FILE__)}/killer"
require "#{File.dirname(__FILE__)}/match"
DataMapper::Logger.new($stdout, :info)
DataMapper.setup(:def... |
package org.jenkinsci.plugins.github.webhook.subscriber;
import com.cloudbees.jenkins.GitHubPushTrigger;
import hudson.model.FreeStyleProject;
import hudson.plugins.git.GitSCM;
import org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition;
import org.jenkinsci.plugins.workflow.job.WorkflowJob;
import org.junit.Rule;
imp... |
class AddWebpToBackgroundInTailHome < ActiveRecord::Migration[6.0]
def change
add_column :tail_homes, :background_1_webp, :string
add_column :tail_homes, :background_2_webp, :string
add_column :tail_homes, :background_3_webp, :string
add_column :tail_homes, :background_4_webp, :string
add_column :... |
# Copyright [2020] [Toyota Research Institute]
#
# 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 agre... |
Rails.application.routes.draw do
devise_for :users #, :controllers => { :omniauth_callbacks => "users/omniauth_callbacks" }
# For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html
resources :users
namespace :api do
resources :reactions, :chemicals
end
# roo... |
function hide_password(){
var input_password = document.getElementById("input-login-password");
var img_eye = document.getElementById("eye");
var img_hidden = document.getElementById("hidden");
if (input_password.type === "password"){
input_password.type = "text"
img_eye.style.display ... |
@extends('skins.template')
@section('content')
<x-content-header :title='$title' :breadcrumbs="$breadcrumbs"/>
<section class="content">
<div class="container-fluid">
<div class="card shadow">
<div class="card-body">
<form id="form-project" method="post">
... |
;; ajure.state.doc
;;
;; Document structure and creation helper functions.
(ns ajure.state.doc
(:require (ajure.util [text-format :as text-format])))
(defstruct Doc
:text-box
:numbering
:canvas
:doc-name
:file-path
:directory
:is-modified
:undo-stack
:redo-stack
:endings
:character-set
:styl... |
const { trim } = require("lodash");
const fun = require("./component/fun");
const less = require("./component/less");
const mdx = require("./component/mdx");
const provider = require("./component/provider");
const init = async ({ ilog, env, data, services, storeg, spinner }, node) => {
let micro = await services.inp... |
module Slugifiable
def slug
name = self.name.strip.downcase
name.gsub! /['`]/,""
name.gsub! /\s*@\s*/, " at "
name.gsub! /\s*&\s*/, " and "
name.gsub! /\s*[^A-Za-z0-9\.\-]\s*/, '-'
name.gsub! /_+/,"-"
name.gsub! /\A[_\.]+|[_\.]+\z/,""
name
end
def find_by_slug(arg)
self.all.de... |
function Set-NexusContentSelector {
<#
.SYNOPSIS
Updates a Content Selector in Nexus
.DESCRIPTION
Updates a Content Selector in Nexus
.PARAMETER Name
The content selector to update
.PARAMETER Description
A human-readable description
.PARAMETER Expression
T... |
module ActiveModel
class Errors
MESSAGE_OPTIONS = [:message]
attr_accessor :details
def initialize(base)
@base = base
@messages = Hash.new { |messages, attribute| messages[attribute] = [] }
@details = Hash.new { |details, attribute| details[attribute] = [] }
end
def initi... |
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace FlyThrough
{
[RequireComponent(typeof(HandlingKeyStrokeAssignment))]
public class HandlerForKeyBindingApplying : MonoBehaviour
{
private HandlingKeyStrokeAssignment _keyBindingProvider;
[SerializeField]
priva... |
using NSpec;
using Entitas.Unity.VisualDebugging;
using Entitas;
class describe_SystemInfo : nspec {
void when_SystemInfo() {
it["creates systemInfo for initialize system"] = () => {
var system = new TestInitializeSystem();
var info = new SystemInfo(system);
info.syst... |
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class UpdateLeadTrigger extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
\DB::unprepared('CREATE TRIGGER ... |
extern crate alloc;
use crate::Constdef;
mod vec {
use super::*;
use alloc::vec::Vec;
impl<T> Constdef for Vec<T> {
const DEFAULT: Self = new!();
}
}
mod string {
use super::*;
use alloc::string::String;
impl Constdef for String {
const DEFAULT: Self = new!();
}
}
|
<div class="navbar navbar-inverse navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="i... |
using System.Collections.Generic;
namespace DevTeam.QueryMappings.Tests.Context.RentalContext.Entities
{
public class Building
{
public int Id { get; set; }
public int Floors { get; set; }
public int Year { get; set; }
public bool IsParking { get; set; }
public bool IsL... |
pub struct Joypad {
select_buttons: bool,
select_directions: bool,
buttons_state: u8,
directions_state: u8,
}
impl Joypad {
pub fn new() -> Self {
Joypad {
select_buttons: true,
select_directions: true,
buttons_state: 0x00,
directions_state: ... |
---
layout: post
title: "mockito使用"
subtitle: ""
date: 2016-9-14 12:00:00
author: "boredream"
catalog: false
header-style: text
tags:
- 自动化测试
---
java junit测试的模拟框架
mockito和junit的gradle 不能在依赖project的build中配置
需要放在主项目中
#### 模拟变量
方式1,使用静态方法mock(XXXObject.class) 生成模拟数据,如
```java
// mock creation
Lis... |
import React from "react";
import Avatar from "../Avatar";
import MenuList from "../MenuList";
import * as S from "./styled";
const Navbar = () => {
let Wrapper = S.NavbarWrapper
window.onscroll = () => {
Wrapper = window.scrollY > 20 ? S.NavbarWrapperDown : S.NavbarWrapper
console.log(Wrapper);
};
re... |
rm -rf /var/www/html/blog/*
cp -r /root/blog/my-blog/public/* /var/www/html/blog
|
import React from 'react'
import * as rtl from '@testing-library/react'
import whyDidYouRender from 'index'
import {diffTypes} from 'consts'
describe('hooks - useState', () => {
let updateInfos = []
beforeEach(() => {
updateInfos = []
whyDidYouRender(React, {
notifier: updateInfo => updateInfos.push... |
pub use windows::Error;
pub use windows::IUnknown;
pub use windows::Interface;
pub use windows::Result;
windows::include_bindings!();
|
import sys
sys.path.append('../')
import numpy as np
import matplotlib.pyplot as plt
from pathlib import Path
from py_diff_stokes_flow.core.py_diff_stokes_flow_core import ShapeComposition3d
from py_diff_stokes_flow.common.common import ndarray, create_folder, print_error
def test_shape_composition_3d(verbose):
... |
/// Web/json interface to access settings
use actix_http::Payload;
use actix_session::{CookieSession, Session};
use actix_web::{
error, http, middleware, web, App, Error, FromRequest, HttpRequest, HttpResponse, HttpServer,
Responder,
};
use core::ops::Deref;
use futures::prelude::*;
use lazy_static::lazy_stati... |
class InputManager
#opens the input file and create an array with all cases to evaluate
#params:
# file_name: name of input file
def initialize(file_name)
File.open(file_name) do |file|
if(@totalCases = file.gets)
@cases = Array.new
while line = file.gets
@cases.push line
... |
package server
import (
"github.com/gorilla/handlers"
"github.com/gorilla/mux"
"github.com/rainu/docker-image-watcher/internal/database"
"github.com/rainu/docker-image-watcher/internal/server/handler"
"net/http"
"os"
)
func NewRouter(repo database.Repository) http.Handler {
router := mux.NewRouter()
// RESTf... |
DELETE FROM game_stats;
DELETE FROM teamkills;
SET FOREIGN_KEY_CHECKS = 0;
INSERT INTO game_stats (id, startTime, gameName, gameType, gameMod, `host`, mapId, validity) VALUES
(1, NOW(), 'Test game', '0', 6, 1, 1, 0);
SET FOREIGN_KEY_CHECKS = 1;
INSERT INTO teamkills (id, teamkiller, victim, game_id, gametime, re... |
use super::flash_properties::FlashProperties;
use super::memory::{PageInfo, RamRegion, SectorInfo};
use std::{borrow::Cow, convert::TryInto};
#[derive(Debug, Default, Clone, Serialize, Deserialize)]
pub struct FlashAlgorithm {
/// The name of the flash algorithm.
pub name: String,
/// Whether this flash al... |
#!/usr/bin/env bash
if [ "$USER" != "root" ]
then
echo "Installation must be run as 'root' (use sudo)."
exit 1
fi
set -x
# bad hack to run a dockerfile like a shell script.
RUN() {
$@
if [ "$?" != "0" ]
then
echo 'Error during previous command.'
exit 1
fi
}
FROM() {
echo... |
(function () {
document.addEventListener('DOMContentLoaded', function () {
var languageNode = document.createElement('div');
var tpl = String()
+ '<img src="./manual/asset/chinese.png" class="language-flag" />'
+ '<i class="dropdown-arrow"></i>'
+ '<div class="dropdown-list">'
+ '<ul>'
... |
#!/bin/bash
source ../../test-utils.sh
rm -f -R cmd_del
rm -f -R cmd
rm -f -R .build1
rm -f -R .build2
rm -f -R .build3
log "-------------------------------------------------------"
log "Test for multi-label script"
run_bigmler whizzml --package-dir ../../items-to-features --output-dir ./.build1
run_bigmler whizzml ... |
import { includes } from 'shared/blacklists';
describe("shared/blacklist", () => {
it('matches by *', () => {
let blacklist = ['*'];
expect(includes(blacklist, 'https://github.com/abc')).to.be.true;
})
it('matches by hostname', () => {
let blacklist = ['github.com'];
expect(includes(blacklist,... |
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Xml.Linq;
namespace PXWe... |
package org.elm.ide.refactoring
import com.intellij.application.options.CodeStyle
import com.intellij.openapi.actionSystem.DataContext
import com.intellij.openapi.editor.Editor
import com.intellij.openapi.project.Project
import com.intellij.psi.PsiDocumentManager
import com.intellij.psi.PsiElement
import com.intellij.... |
// Copyright (c) 2018, the R8 project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
package com.android.tools.r8;
import static org.junit.Assert.assertEquals;
import com.android.tools.r8.D... |
%%% @doc
%%% Logger process.
%%% @author Aleksey Morarash <aleksey.morarash@gmail.com>
%%% @since 20 Jan 2012
%%% @copyright 2012, Aleksey Morarash
-module(echessd_log).
-behaviour(gen_server).
%% API exports
-export([start_link/0, err/2, info/2, debug/2, hup/0]).
%% gen_server callbacks
-export([init/1, handle_ca... |
// @require core/cash.js
// @require core/each.js
// @require ./insert_before.js
fn.before = function () {
each ( arguments, content => {
cash ( content ).insertBefore ( this );
});
return this;
};
|
package aws
import (
"errors"
"fmt"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/pricing"
"log"
"strconv"
)
func onDemandPrice(instanceType string, region string) (float64, error) {
sess := session.Must(session.NewSession(&aws.Config{
// API Endp... |
// local
#include "../headers/exports.hpp"
// deps
#include <spdlog/spdlog.h>
namespace lua100
{
void lua_atprint([[maybe_unused]] lua_State* _state, [[maybe_unused]] uintptr_t _unk_ptr)
{
spdlog::warn("lua_atprint called");
}
}
// https://youtu.be/SdxsT40DaCg?list=PLJ4jpRq1tGIlNAo3AblOFj9ovg... |
1 125 178 295
2 137 233 267
3 41 54 130 276
4 64 128 133 208
5 61 155 199 200
6 17 37 69 138 253
7 24 105 167 281
8 37 56 186 253 278
9 22 107 113 243 262
10 14
11 22 33 112 114
12 60 151
13 73 150
14 126 136 154 189 195
15 115 190 192 235 284
16 59 74 75 111 131 164 167
17 138 293
18 61 116 217
19 77 236 237 287
20 30... |
/*
* Copyright 2015-2022 The Developers Team.
*
* 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... |
import { Injectable } from '@nestjs/common';
import { CreateStatDto } from './dto/create-stat.dto';
import { UpdateStatDto } from './dto/update-stat.dto';
@Injectable()
export class StatsService {
create(createStatDto: CreateStatDto) {
return 'This action adds a new stat';
}
findAll() {
return `This act... |
package com.cisco.thunderhead.example.ui;
/**
* This is a simple example to show how you can call the Context Service Client.
*/
public class Connect {
public static void main(String args[]) {
Utils.runIt(ConnectionData.getConnectionData(), (contextServiceClient) -> {
System.out.println("\n\... |
#1 – Morpheous API
######Following the integration steps here: https://github.com/vesparny/morpheus.
######After reviewing the code and learning the format I created one blog post with headline/body copy and an image.
######Run from the command line:
######1. cd lars_morpheus (change to the directory where you have do... |
package benchmark
import (
"io/ioutil"
"os"
"testing"
"github.com/ppp225/unjson"
"github.com/tidwall/gjson"
)
func Benchmark_LargeFile_unjson(b *testing.B) {
data := unjson.LoadFile("large.json")
path1 := "categories.performance.score"
path2 := "audits.screenshot-thumbnails.details.items"
path3 := "audits.... |
const mongoose = require('mongoose');
const NewPostSchema = new mongoose.Schema({
drinkname: {
type: String,
default: ''
},
barname: {
type: String,
default: ''
},
description: {
type: String,
default: ''
},
deleted: {
type: Boolean,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.