text stringlengths 27 775k |
|---|
import com.dfsek.tectonic.getGitHash
plugins {
java
`maven-publish`
}
val versionObj = Version("4", "2", "0", false)
allprojects {
version = versionObj
group = "com.dfsek.tectonic"
tasks.withType<JavaCompile>().configureEach {
options.isFork = true
options.isIncremental = true
... |
#if !defined(BLOCKCHAIN_H)
#define BLOCKCHAIN_H
#include <stdbool.h>
#include "block.h"
typedef struct blockchain_t {
/**
* Tête de liste chaînée. Dernier block ajouté.
*/
Chain* head;
/**
* Difficulté de minage selon l'algorithme du nonce.
*/
int difficulty;
/**
* Taille de la blockchain.
... |
class CampaignMonitor
# Provides access to the lists and campaigns associated with a client
class Base
attr_reader :result, :attributes, :cm_client
@@client=nil
def self.client
@@client
end
def self.client=(a)
@@client=a
end
def [](k)
if m=self.class.get_da... |
#include "global.h"
#include "LifeMeterTime.h"
#include "ThemeManager.h"
#include "Song.h"
#include "Steps.h"
#include "ActorUtil.h"
#include "Course.h"
#include "Preference.h"
#include "StreamDisplay.h"
#include "GameState.h"
#include "StatsManager.h"
#include "PlayerState.h"
#include "MessageManager.h"
const float F... |
<?php
namespace Tests\Unit\Domain\Tab;
use Codderz\Yoko\Support\Collection;
use Src\Domain\Tab\Commands\CloseTab;
use Src\Domain\Tab\Events\DrinksOrdered;
use Src\Domain\Tab\Events\DrinksServed;
use Src\Domain\Tab\Events\FoodOrdered;
use Src\Domain\Tab\Events\FoodPrepared;
use Src\Domain\Tab\Events\FoodServed;
use Sr... |
; RUN: llc < %s -march=bfin -join-liveintervals=0 -verify-machineinstrs
; RUN: llc < %s -march=bfin -join-liveintervals=0 -verify-machineinstrs -regalloc=greedy
; Provoke an error in LowerSubregsPass::LowerExtract where the live range of a
; super-register is illegally extended.
define i16 @f(i16 %x1, i16 %x2, i16 %x... |
enum PortStarboardEnum {
"PORT" = 1,
"STARBOARD" = 2,
}
export default PortStarboardEnum;
export const getStafPortStarboardValue = (
s: "PORT" | "STBD"
): PortStarboardEnum => {
if (s === "PORT") return PortStarboardEnum.PORT;
return PortStarboardEnum.STARBOARD;
};
|
-------------------
//unschedules the "update" method.
cc.director.getScheduler().unscheduleUpdateForTarget(this);
|
json.set! "expired", "This server does not cache search results. Please re-submit your search."
|
/*
* Copyright (c) 2019 InterDigital Communications, 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 ap... |
import React, { Component } from 'react';
import { connect } from 'react-redux';
import * as PropTypes from 'prop-types';
import SubmissionUploadComponent from '@/modules/shared/components/Tournament/SubmissionUpload';
import {
hideSubmissionModal,
uploadSubmission,
} from '@/modules/shared/ducks/submission';
impor... |
---
layout: post
title: Matlab生成01随机矩阵
excerpt: ""
modified: 2014-05-08
tags: [技术]
comments: true
category: cn
image:
feature:
credit:
creditlink:
---
#### 举例
~~~ matlab
temp = randi([0 1],3,3);
matrix = tril(temp,-1)+triu(temp',0);
matrix=matrix-diag(diag(matrix))
~~~~
生成的是3*3的随机矩阵 |
$release = 'foo Version: bar'
$release = $release -replace "\s+Version:\s+", ""
Write-Host $release |
subroutine z2jetsq(i1,i2,i3,i4,i5,i6,za,zb,msq)
c-----Author R.K. Ellis
c---Matrix element squared averaged over initial colors and spins
c q(-p1)+qbar(-p2) --> Gamma^* +g(p5) +g(p6)
c |
c --> l(p3)+a(p4)
c
c--all momenta incoming
implicit none
inc... |
var updateChangedPackages = require("./updateChangedPackages");
var checkUpdatedPackages = require("../../utils/checkUpdatedPackages");
var npmPublishSemiAtomic = require("./npmPublishSemiAtomic");
var gitAddFile = require("../../utils/gitAddFile");
var readline = require("readline-sync");
var... |
require 'rails_helper'
feature 'doc auth self image step' do
include IdvStepHelper
include DocAuthHelper
include DocCaptureHelper
before do
allow(FeatureManagement).to receive(:document_capture_step_enabled?).and_return(false)
allow(Figaro.env).to receive(:liveness_checking_enabled).and_return('true')... |
<?php defined('BASEPATH') or exit('No direct script access allowed');
class Home extends CI_Controller {
public function __construct() {
parent::__construct();
}
public function index() {
// Jika sudah login dan jika belum login
if ($this->session->userdata('email')) {
$user = $thi... |
/*
* Copyright 2017 47 Degrees, LLC. <http://www.47deg.com>
*
* 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 ... |
//
// OCSMessageModel.h
// onlineC
//
// Created by zyd on 2018/7/13.
//
#import "OCSModel.h"
@interface OCSMessageModel : OCSModel
// 文本内容
@property (copy, nonatomic) NSString *content;
// 展示页面时间
@property (copy, nonatomic) NSString *showTime;
// 坐席标识
@property (copy, nonatomic) NSString *empFlag;
// 图片路径
@prope... |
---
layout: publication
authors: "Mizumoto, I., R. Michino, Z. Iwai, R. Bhushan Gopaluni, Sirish L. Shah"
type: "paper"
order: 76
year: 2003
title: "Robust Adaptive Back-stepping Control Based on High-Gain Feedback and Its Application to a CSTR"
journal: "Trans. of the Japan Society of Mechanical Engineers"
pagenum: "1... |
---
title: "Overview"
excerpt: "Development Information regarding LibrePhotos Frontend."
last_modified_at: 2020-01-18
category: 4
---
## Overview
The Front end, what everyone sees.
|
declare namespace Phaser {
interface IGameConfig {
scaleMode: number,
}
}
|
#region license
// Copyright (c) 2004, Rodrigo B. de Oliveira (rbo@acm.org)
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// * Redistributions of source code must retain the above co... |
export 'TextValidator.dart';
export 'CNPJ.dart';
export 'Ean13.dart';
export 'Phone.dart';
export 'Price.dart'; |
/*
* Public API Surface of ng-animations
*/
export * from './lib/attention-seekers/bounce';
export * from './lib/attention-seekers/flash';
export * from './lib/attention-seekers/head-shake';
export * from './lib/attention-seekers/jello';
export * from './lib/attention-seekers/pulse';
export * from './lib/attention-s... |
Don't make manual changes to files in the dist/ or platform/ directories.
Source code changes should be made in the mongodb-labs/gperftools repo.
Tweaks or reconfigurations of our third-party installation have to be
made in scripts/ or SConscript files, etc.
== contents ==
```
src/third_party/
gperftool... |
module.exports = {
extends: [
'ash-nazg/sauron-node', 'plugin:qunit/recommended'
],
parserOptions: {
ecmaVersion: 2018,
sourceType: 'module'
},
plugins: ['qunit'],
env: {
browser: true
},
settings: {
polyfills: [
'Array.isArray',
... |
<?php
namespace Modules\Dosen\Http\Controllers;
use Auth;
use Illuminate\Http\Request;
use Illuminate\Http\Response;
use Illuminate\Routing\Controller;
use Illuminate\Support\Facades\DB;
class ProfileController extends Controller
{
/**
* Display a listing of the resource.
* @return Response
*/
... |
/*
* Copyright 2019 Daniel Hinojosa
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish... |
using System;
using System.Collections.Generic;
using System.Text;
namespace Rin.Hubs.Payloads
{
public class RinServerInfoPayload
{
public string Version { get; set; }
public DateTimeOffset BuildDate { get; set; }
public string[] FeatureFlags { get; set; }
}
}
|
-- DATABASE AND SCHEMA
-- create database coolmovies with owner postgres;
\c coolmovies;
-- USERS
create table if not exists users
(
id uuid default gen_random_uuid() not null
constraint user_pk
primary key,
name varchar not null
);
alter table users owner to postgres;
create unique index if not exists user_... |
require 'spec_helper'
module Rockauth
describe PasswordsController do
let(:parsed_response) { JSON.parse(response.body).with_indifferent_access }
let(:client) { create(:client) }
let(:user) { create(:user) }
let(:password) { Faker::Internet.password }
describe 'POST forgot' do
context 'wh... |
package fr.poulpogaz.isekai.editor.ui.about;
import fr.poulpogaz.isekai.editor.pack.PackSprites;
import fr.poulpogaz.isekai.editor.utils.concurrent.Alarm;
import java.awt.*;
import java.awt.image.BufferStrategy;
import java.util.Random;
public class BackgroundPanel extends Canvas {
private static final int WIDT... |
# Copyright 2009-2017 Ram Rachum.
# This program is distributed under the MIT license.
import re
def searchall(pattern, string, flags=0):
'''
Return all the substrings of `string` that match `pattern`.
Note: Currently returns only non-overlapping matches.
'''
if isinstance(pattern, str):
... |
using RedisAdminUI.ServiceModel.Operations.Common;
namespace RedisAdminUI.ServiceInterface.Admin
{
public class EchoService : RedisServiceBase
{
public object Any(Echo request)
{
return new EchoResponse
{
Text = RedisNative.Echo(request.Text)
};
}
}
} |
package pl.kamilszustak.justfit.ui.main.employee.details
import android.app.Application
import pl.kamilszustak.justfit.common.livedata.ResourceDataSource
import pl.kamilszustak.justfit.domain.model.employee.Employee
import pl.kamilszustak.justfit.domain.usecase.employee.GetEmployeeByIdUseCase
import pl.kamilszustak.ju... |
self.__precacheManifest = [
{
"revision": "9c030026e8929adc6739",
"url": "/static/css/main.5ff331b9.chunk.css"
},
{
"revision": "9c030026e8929adc6739",
"url": "/static/js/main.5c41e030.chunk.js"
},
{
"revision": "42ac5946195a7306e2a5",
"url": "/static/js/runtime~main.a8a9905a.js"
},
... |
// Copyright 2016 Palantir Technologies, 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 ... |
covers 'facets/enumargs'
test_case Enumerable::Arguments do
setup do
@PlusArray = Class.new do
include Enumerable::Argumentable
def initialize(arr)
@arr = arr
end
def each(n=0)
@arr.each{ |e| yield(e+n) }
end
end
end
method :collect do
test do
t =... |
// Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/ui/ash/multi_user/multi_user_util.h"
#include <vector>
#include "base/strings/string_util.h"
#include "chrome/browser/browser_p... |
require 'i18n'
I18n.config.load_path += Dir[File.join(File.expand_path('../', __FILE__), 'locales', '*.{rb,yml}')]
I18n.config.available_locales = [:en, :nl, :de]
I18n.config.default_locale = :en
|
def find_active_record_object_by_id body
find_active_record_object body
end
def find_active_record_object body
object, oid = body.split('#')
object.strip!
object.capitalize!
oid.strip!
object.constantize.find(oid).inspect
end
def run_rake_task body #please don't run arbitrary system commands here
`#{body}`
en... |
/*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
use std::str::FromStr;
use anyhow::{Context, Error, Result};
use kernel_cmdline::KernelCmdArgs;
use reqwest::Url;
use serde::{de, ... |
#!/usr/bin/env bash
if [ "$#" -lt "1" ]; then
echo "Usage:
$0 -ct <token>
$0 -ct <token> --force -p <CSV list of pack IDs>
-ct, --circle-token The circleci token.
[-f, --force] Whether to trigger the force upload flow.
[-p, --packs] CSV list of pack IDs. Mandatory when the ... |
package com.secretapp.backend.data.message.update
import scodec.bits.BitVector
@SerialVersionUID(1L)
case class RemovedDevice(userId: Int, keyHash: Long) extends SeqUpdateMessage {
val header = RemovedDevice.header
def userIds: Set[Int] = Set(userId)
def groupIds: Set[Int] = Set.empty
}
object RemovedDevice ... |
<?php
/**
* Created by PhpStorm.
* User: Administrator
* Date: 2017/11/14/014
* Time: 17:50
*/
namespace Larfree\Components\Base;
use Larfree\Components\Components;
class Edit extends Components
{
static public function component(&$path, &$config, $model)
{
parent::component($path, $config, $mo... |
package org.ostelco.prime
import com.palantir.docker.compose.DockerComposeRule
import com.palantir.docker.compose.connection.waiting.HealthChecks
import io.dropwizard.testing.DropwizardTestSupport
import io.dropwizard.testing.ResourceHelpers
import org.joda.time.Duration
import org.junit.AfterClass
import org.junit.As... |
# apache traffic server 启动脚本
在官方基础上增加archlinux支持,需要通过aur安装start-stop-daemon包
ats目录需要手动修改为自己的安装目录
## 安装start-stop-daemon包
wget http://developer.axis.com/download/distribution/apps-sys-utils-start-stop-daemon-IR1_9_18-2.tar.gz
tar zxf apps-sys-utils-start-stop-daemon-IR1_9_18-2.tar.gz
cd apps/sys-utils/s... |
'use strict';
var angular = require('angular');
var template = require('./contributionActivity.html');
var activityService = require('../../services/activityService.js');
// sub components
var blogPostComponent = require('../../components/blogPost/blogPost');
module.exports = angular.module('myApp.components.contrib... |
import {Results} from "./execution-types.js"
import {recursivelyGenerateGraph} from "./graphing/recursively-generate-graph.js"
import {recursivelyCountFailures} from "./graphing/recursively-count-failures.js"
import {recursivelyAssertValidity} from "./graphing/recursively-assert-validity.js"
export function graph(res... |
package com.goertek.commonlib.custom.fragment;
import com.goertek.commonlib.custom.BaseCustomFragment;
import com.goertek.commonlib.view.unit.UnitConstants;
/**
* 日期Fragment
*
* @author ww
* @version 1.0.0
* @since 2019/07/19
*/
public class DateFragment extends BaseCustomFragment {
public DateFragment() {... |
from enum import Enum
from . import directory
from .traversal import resolve, ResourceProxy
from ..model.data import Entries, Entry
from ..model.common.resource import Resource
class DataCardinality(Enum):
MANY = 1
MAYBE_ONE = 2
class Data:
def __init__(self, data, maybe_meta=None, maybe_jsonapi=N... |
#!/bin/bash
# :::: fzf Stuff ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# fzf fuzzy completion:
if [[ "$DISTRO_IS" == "fedora" ]]; then
[ -f /usr/share/fzf/shell/key-bindings.bash ] && source /usr/share/fzf/shell/key-bindings.bash
export FZF_DEFAULT_COMMAND='fd --hidden --follow --exclude ".g... |
import { LOAD_DEPARTMENT, CREATE_DEPARTMENT } from "../action/department";
const initialState = {
departments: [],
code: "null",
};
export default (state = initialState, action) => {
switch (action.type) {
case CREATE_DEPARTMENT:
return {
...state,
departments: state.departments.push(a... |
namespace ExaLearn.Bl.DTO
{
public class AssessmentDTO
{
public int passedTestId { get; set; }
public int Essay { get; set; }
public int Speaking { get; set; }
}
}
|
org 0x7c00
setup:
push word 0
pop cs
push word 0
pop ds
push word 0
pop es
jmp start
print:
pusha
mov ah, 0Eh
mov bh, 0
.loop:
lodsb
cmp al, 0
je .end
int 10h
jmp .loop
.end:
popa
ret
getstring:
pusha
mov di, buffer
.loop:
xor ah, ah
int 16h
cmp al, 13
je .end
stosb
mov ah, 0x0E
... |
# -*- coding: utf-8 -*-
module SoftBankHealthCare
class Client
def initialize(params)
@api = ApiClient.new
@api.login params
refresh
end
def date=(v)
refresh v
end
def refresh(date = Date.today)
@summary = @api.home_summary(date)['root']
end
def weight
... |
# frozen_string_literal: true
$LOAD_PATH.unshift(File.expand_path("..", __FILE__))
require "validatr/version"
require "validatr/utils"
require "validatr/luhn"
require "validatr/damm"
require "validatr/verhoeff"
require "validatr/ext"
module Validatr
end
|
// Copyright (C) 2003-2011 Marc Duruflé
// Copyright (C) 2001-2011 Vivien Mallet
//
// This file is part of the linear-algebra library Seldon,
// http://seldon.sourceforge.net/.
//
// Seldon is free software; you can redistribute it and/or modify it under the
// terms of the GNU Lesser General Public License as publish... |
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
package common
//snippet-keyword:[secretsmanager]
//snippet-sourcetype:[snippet]
//snippet-sourcedate:[10/27/2021]
//snippet-sourceauthor:[gangwere]
import (
"context"
"github.com/aws/aws-sdk-go-v2/aws"
"g... |
using FluentAssertions;
using Sequel.Core.Parser;
using Xunit;
namespace Sequel.Tests
{
public class LexerTest
{
[Theory]
[InlineData(TokenType.Assignment, " :=")]
[InlineData(TokenType.Command, @" \pgsql")]
[InlineData(TokenType.Comment, " --comment1\r\n")]
[InlineData... |
<?php
include_once __DIR__ . '/_common.php';
bad_request_if(!array_key_exists('view', $_POST));
no_access_if_not_allowed('service*');
if ($_POST['view'] === '0')
{
exec_stmt("DELETE FROM grid_view_defaults WHERE grid='service/issues' AND user=? LIMIT 1",
array(1 => $_SESSION['user']->getId()));
set... |
{-# LANGUAGE FlexibleInstances, MultiParamTypeClasses, QuasiQuotes, OverloadedStrings #-}
module Main where
import Control.Monad (msum)
import Control.Monad.Trans
import Web.Plugins.Core
import MyPlugin
import ClckPlugin
import Happstack.Server
import Happstack.Server.HSP.HTML
import qualified Data.Text as Text
import... |
Title: Modular Lumbar Pack
Date: 2013-10-18 23:02
Author: Michael
Category: Design
Tags: Cordura
Slug: modular-lumbar-pack
Status: published
I hiked the Grand Canyon with a few friends a few years ago. We decided
to "hike" the canyon in a manner known as ["Rim to
Rim."](http://www.rimtorim.org/) We also decided to ac... |
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Carts.Api.Requests.Carts;
using Carts.Carts.GettingCartAtVersion;
using Carts.Carts.GettingCartById;
using Carts.Carts.GettingCartHistory;
using Carts.Carts.GettingCarts;
using Carts.Carts.Products;
using Microsoft.AspNetCore.Mvc;
using... |
from flask import Flask, request, jsonify
import jsonpickle
import logging
import av
import io
import os
import datetime
import shutil
from PIL import Image
from tqdm import tqdm
logging.basicConfig(
level=logging.DEBUG,
format='%(asctime)s.%(msecs)03d %(levelname)s %(module)s - %(funcName)s: %(message)s',
... |
using ATInternet;
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
using System;
using System.Collections.Generic;
using System.Linq;
namespace TrackerTests
{
[TestClass]
public class OnAppAdTest : AbstractTest
{
Publisher pub;
Publisher pub1;
SelfPromotion selfP;
... |
import os
import random
import numpy as np
import torch
from pommerman import utility, constants
from pommerman.dqn.nets.recurrent_cnn import CommDRCNN, PreprocessingDRCNN
def load_trained_team(comm, team_dir, random_agent, resume_training):
assert team_dir is not None
# TODO: Add handling for random agent... |
package interpreter
import lox.LoxCallError
import lox.stringify
object LoxPrintFunction : LoxCallable {
override var arity: Int = 1
override fun call(interpreter: Interpreter<Any?>, arguments: List<Any?>): Any? {
println(stringify(arguments[0]))
return null
}
override fun toString()... |
use rome_formatter::{IndentStyle, LineWidth};
use rome_js_formatter::context::QuoteStyle;
use rome_service::settings;
use serde::{Deserialize, Serialize};
use serde_json::{Error, Value};
use tracing::{info, trace};
pub const CONFIGURATION_SECTION: &str = "rome";
#[derive(Debug, Default, Clone, Deserialize, Serialize,... |
"""
Remove Item
There are several methods to remove items from a list:
"""
thislist = ["apple", "banana", "cherry"]
thislist.remove("banana")
print(thislist)
|
from __future__ import division, absolute_import, print_function
import numpy as np
import esutil
import matplotlib.pyplot as plt
from .fgcmUtilities import objFlagDict
from .sharedNumpyMemManager import SharedNumpyMemManager as snmm
class FgcmConnectivity(object):
"""
Class to check the star/observation co... |
from __future__ import absolute_import
from __future__ import unicode_literals
from mb.lib.memoize import memoize
class SomeClass:
def __init__(self):
self._x = 0
def _the_test(self, number):
self._x += 1
return number * self._x
@memoize
def TestCache1(self, number):
... |
SUBROUTINE MHIGGSTREE_CPV(PAR,IFAIL)
c Tree-level Higgs masses.
c - The tree-level neutral Higgs squared-mass matrix MH02(i,j), (i,j=1..5;
c 1 -> hu, 2 -> hd, 3 -> hs, 4 -> cosb*au+sinb*ad, 5 -> as) and the
c tree-level charged-higgs squared mass MHC2 are stored in the common
c SQ... |
using Juce.CoreUnity.PointerCallback;
using Juce.CoreUnity.UI;
using UnityEngine;
using UnityEngine.EventSystems;
namespace Playground.Content.Meta.UI.StageEnd
{
public class StageEndUIView : UIView
{
[Header("References")]
[SerializeField] private PointerCallbacks playAgainPointerCallbacks = ... |
using Microsoft.Win32;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
public class Antis
{
public static bool TaskManager()
{
try
{
RegistryKey objRegistryKey = Registry.CurrentUser.CreateSubKey(
@"Softwar... |
----functions----
CREATE OR REPLACE FUNCTION istore_length(bigistore)
RETURNS integer
LANGUAGE c
IMMUTABLE STRICT
AS 'istore', $function$bigistore_length$function$;
----
CREATE OR REPLACE FUNCTION istore_length(istore)
RETURNS integer
LANGUAGE c
IMMUTABLE STRICT
AS 'istore', $function$istore_length$function$;
|
# frozen_string_literal: true
module Simulator
module Unit
class FetchUnit < Base
def self.get(state)
@get ||= new(state)
end
def execute
accept if peek.nil?
instruction = peek
return nil if instruction.nil?
instruction.out_clock_cycles['IF'] = state.cl... |
<?php
// This file was auto-generated from sdk-root/src/data/email/2010-12-01/waiters-1.json
return [ 'waiters' => [ '__default__' => [ 'interval' => 3, 'max_attempts' => 20, ], 'IdentityExists' => [ 'operation' => 'GetIdentityVerificationAttributes', 'success_type' => 'output', 'success_path' => 'VerificationAttribute... |
package calclavia.api.resonantinduction.mechanical;
import java.util.List;
import net.minecraft.entity.Entity;
/**
* An interface applied to the tile entity of a conveyor belt
*
* @Author DarkGuardsman
*/
public interface IBelt
{
/**
* Used to get a list of entities the belt exerts an effect upon.
*
* @... |
import React, { Component } from 'react';
import PostActions from './PostActions';
import PostComments from './PostComments';
import PostDescription from './PostDescription';
export default class Post extends Component {
constructor(props) {
super(props);
this.state = {
commentsShown:... |
# frozen_string_literal: true
require 'spec_helper'
RSpec.describe Trav3::REST, :vcr do
let(:t) { build :travis }
describe '#get' do
it 'happy path' do
expect(t.owner).to be_an_instance_of(Trav3::Success)
end
it 'not happy path' do
expect(
t.send(:get, "#{t.send(:without_repo)}/e... |
using Acquaintance.Nets;
using Acquaintance.PubSub;
using FluentAssertions;
using NUnit.Framework;
using System;
using System.Collections.Generic;
using System.Threading;
namespace Acquaintance.Tests.Nets
{
[TestFixture]
public class NetTests
{
[Test]
public void Transform_Pipeline_Simple(... |
package com.raycoarana.plaayer.car.main.viewmodel
import com.raycoarana.plaayer.R
import com.raycoarana.plaayer.car.core.Navigator
import com.raycoarana.plaayer.car.main.domain.AppSection
import com.raycoarana.plaayer.core.ResourceProvider
import javax.inject.Inject
class CarViewModel @Inject constructor(
pri... |
/*
* shidao
* SupperManagerFunctionImpl.java
* 2015年10月31日
*/
package com.yizhuoyan.shidao.platform.support.function;
import com.yizhuoyan.common.dao.support.SelectLikePo;
import com.yizhuoyan.common.util.KeyValueMap;
import com.yizhuoyan.common.util.validatation.ParameterObjectValidator;
import com.yizhuoyan.shi... |
use std::cmp::{min, Ordering};
use std::error;
use std::io;
use std::str::FromStr;
fn read_line() -> Result<String, io::Error> {
let mut result = String::new();
io::stdin().read_line(&mut result)?;
Ok(result)
}
fn read_array<T: FromStr>() -> Result<Vec<T>, Box<dyn error::Error>>
where T::Err: error::Erro... |
package com.imooc.o2o.util;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class FTPTransferUtil {
private static Logger logger = LoggerFactory.getLogger(PropertiesUtil.class);
private static String ftpIp = PropertiesUtil.getProperties("ftp.server.ip");
private static String ftpPort= Prop... |
<?php
require_once 'phing/Task.php';
require_once('PEAR/PackageFileManager2.php');
/**
* Task to run phpDocumentor for PRADO API docs.
*/
class PradoPearTask extends Task
{
private $pkgdir;
private $channel;
private $version;
private $state;
private $category;
private $package;
private $summary;
private $pk... |
package me.panpf.sketch.sample.bean
import com.google.gson.annotations.SerializedName
class TenorSearchResponse(@SerializedName("results") val dataList: List<TenorData>?)
class TenorData(@SerializedName("media") private val media: List<TenorMedia>?) {
val gifMedia: TenorMediaData?
get() = media?.get(0)?.... |
require 'bundler/setup'
Bundler.require :test
require 'psych/e'
FIXTURES_ROOT = File.expand_path("fixtures", __dir__)
SUPPORT_ROOT = File.expand_path("support", __dir__)
Dir["#{__dir__}/support/**/*.rb"].each {|file| require file }
RSpec.configure do |c|
c.include Helpers
c.include CustomMatchers
c.filter_ru... |
--add new columns
ALTER TABLE user_project ADD created_time TIMESTAMP NOT NULL DEFAULT '2017-001-01 00:00:00';
ALTER TABLE user_project ADD updated_time TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
ALTER TABLE user_organization ADD created_time TIMESTAMP NOT NULL DEFAULT '2017-001-01 00:00:... |
import os
import numpy as np
import torch
from torch.utils.data import Dataset
import random
def load_sleep_data(data_path='preprocessed'):
data = []
labels = []
for file in os.listdir(data_path):
if not file.endswith('.npz'):
continue
path = os.path.join(data_path, file)
... |
import { createBrowserHistory } from 'history';
import { getFromLocalStorage, setToLocalStorage } from '../services/local-storage.service';
import { USER_TOKENS, AUTH_ERRORS } from '../configs';
import { regenerateUserTokenPairs } from '../redux/user/user.operations';
export const history = createBrowserHistory();
con... |
# this file imports some js-native components for use in reactive-ruby
# note that assigning a symbol to constants is a bit hacky but whatever.
# the alternative would be to use e.g. :Spinner everywhere
React::API.import_native_component(:Spinner, `Spinner`)
Spinner = :Spinner
|
#pragma once
#include "VulkanResources.h"
#include "RenderResource.h"
enum struct TextureSource
{
Checker,
ColorGradient
};
struct RenderTextureResource : RenderResourceBase
{
RenderTextureResource(ResourceManagerBase& manager) : RenderResourceBase(manager) {}
TextureSource source = TextureSource::Checker;
... |
<?php
use Illuminate\Support\Facades\Route;
/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the Route... |
module TransactionService::API
class Process
TxProcessStore = TransactionService::Store::TransactionProcess
def get(community_id:, process_id: nil)
if process_id.nil?
Result::Success.new(TxProcessStore.get_all(community_id: community_id))
else
Maybe(TxProcessStore.get(community_i... |
package com.ymy.web.beans
import com.google.gson.annotations.SerializedName
import com.ymy.core.user.YmyUserManager
import com.ymy.web.WebUrlConstant
data class WebEnvs(
@SerializedName("baseUrl")
val baseUrl: String = "",
@SerializedName("quick_url")
val quickUrl: String = WebUrlConstant.quickWebBa... |
'use strict';
var bootstrap = module.exports;
var http = require('http');
var express = require('express');
var bodyParser = require('body-parser');
var getRawBody = require('raw-body');
var signatureVerify = require('../lib/express');
var TEST_MASTER_KEY = 'jj4tA4PDmEhYGBkUNwvfNzMW703D9nRGtp4U9S5b5nM';
bootstrap.T... |
// This file is auto generated
// Use `npm run code-generate:images` to update this file
export type ImageAssets = Readonly<
Record<
| 'autoBattleSwitchOff'
| 'cancelButton'
| 'closeButton'
| 'cloverButton'
| 'cloverPage'
| 'continueButtonBlue'
| 'continueButtonRed'
| 'enemyLegend'
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.