text
stringlengths
27
775k
import { URL } from "url"; import { SpiderRequest, SpiderRequestWithResponse } from "../../types"; type SignalBase = { name: string; }; export type DomSignalChecker = SignalBase & { matches(req: SpiderRequestWithResponse, $: cheerio.Root): boolean; }; export type RequestSignalChecker = SignalBase & { requestMa...
module Legion module Extensions module Todoist module Runners module Projects include Legion::Extensions::Helpers::Lex def list; end def create; end def get; end def update; end def delete; end def collaborators; end ...
// Imports. // Long import. use syntax::ast::{ItemForeignMod, ItemImpl, ItemMac, ItemMod, ItemStatic, ItemDefaultImpl}; use exceedingly::looooooooooooooooooooooooooooooooooooooooooooooooooooooooooong::import::path::{ItemA, ItemB}; use exceedingly::loooooooooooooooooooooooooooooooooooooooooooooooooooooooong::import::pa...
import React from 'react'; import withSession from '../Session/withSession'; import { MessageCreate, Messages } from '../Message'; import ShowUsers from '../ShowUsers'; const rowStyles = { display: 'flex', }; const columnStyles = { flex: '50%', }; const MessageBoard = ({ session }) => ( <div style={rowStyles}>...
<?php namespace App\Http\Controllers; use Illuminate\Http\Request; use App\Models\Blog; use App\Models\BlogCategory; use App\Models\Comment; class welcomeController extends Controller { public function index() { $comments = Comment::get(); $categories = BlogCategory::get(); ...
package cypher /** * BLANK CIPHER * * Reference implementation to * show how the cyphers should * be layed out. * * Just returns the plaintext as-is. * */ type BlankCypher struct { Cypher } func (c *BlankCypher) Encypher(plain string, key Key) string { return plain } func (c *BlankCypher) Decypher(plain string, ...
[ ! -d "target/shaders" ] & mkdir "target/shaders" glslc src/shaders/shader.vert -o target/shaders/vert.spv glslc src/shaders/shader.frag -o target/shaders/frag.spv
using System; using System.Collections.Generic; using System.Text; using Microsoft.VisualStudio.TestTools.UnitTesting; namespace AlgoTest.LeetCode.GasStation { [TestClass] public class GasStation { [TestMethod] public void Test() { //var gas = new int[] { 1, 2, 3, 4, 5 ...
--- title: さらなる研究 date: 23/08/2019 --- 参考資料として、『各時代の希望』第 54 章「よいサマリヤ人」、第 70 章「わたしの兄弟であるこれらの最も小さい者」、『キリストの実物教訓』第 21 章「大きな淵がおいてあって」、第 27 章「わたしの隣人とはだれのことですか」を読んでください。 「キリストはへだての壁、利己主義、国民と国民をへだてる偏見を打破し、人類家族全体に対する愛をお教えになっている。主は利己主義が規定する狭い囲いから人々を引きあげ、すべての国境線や社会の人為的な差別を廃される。主は隣人と見知らぬ他人、また友人と敵の区別をなくされる。そしてわたしたちに、すべての困窮者を隣...
import React from "react"; import PropTypes from 'prop-types'; export class PlaceholderRow extends React.Component { constructor(props) { super(props); } render() { return ( <tr className="d-flex"> <th scope="row" className="col-first pl-4 py-3"> ...
package neotypes package cats package object data { final object implicits extends CatsData }
from bs4 import BeautifulSoup import requests from datetime import datetime import json from pydantic import BaseModel class Post(BaseModel): title: str = "" author: str = "" url: str = "" date: str = "" class DevToScrap: def __init__(self, url): self.url_page = url self.posts = ...
import argparse import collections import os import numpy as np import torch import torch.optim as optim import torchsummary from torch.optim import lr_scheduler from torch.utils.data import DataLoader from torchvision import datasets, models, transforms from tqdm import tqdm import skimage.io from sklearn.metrics imp...
using System; using Web.Models; namespace Web.Db { public partial class ContactSubmission { public static ContactSubmission CreateFromViewModel(ContactUsViewModel s) { return new ContactSubmission { Name = s.Name, Email = s.Email, Message = s.Message, Created = DateTimeOffset.Now, ...
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ModelViewPresenter { public class Presenter { private readonly IView m_View; private IModel m_Model; public Presenter(IView view, IModel model) { ...
/* * Copyright 2007-2021, CIIC Guanaitong, Co., Ltd. * All rights reserved. */ package com.ciicgat.grus.excel; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; /** * @Auther: chunhong.wan * @Date: 202...
* [The Basics](#basics) * [Collections](#collections) * [Operators](#operators) * [Control Flow](#flow) * [Scope](#scope) * [Modules](#modules) * [Classes](#classes) * [Functions](#functions)
export * from './account'; export * from './account-pool'; export * from './account-pools'; export * from './account-registry';
package com.zxiang.project.business.supplyTissue.service; import com.zxiang.project.business.supplyTissue.domain.SupplyTissue; import java.util.List; /** * 补纸记录 服务层 * * @author ZXiang * @date 2018-09-09 */ public interface ISupplyTissueService { /** * 查询补纸记录信息 * * @param supply...
using System; using System.Drawing; using System.Runtime.InteropServices; using System.Windows.Forms; namespace MetaCopy { public partial class MiniMode : Form { private MetaCore mainForm; private const int WM_NCHITTEST = 0x84; private const int HT_CAPTION = 0x2; public const int...
// ysoftman // readcloser test package main import ( "bytes" "fmt" "io/ioutil" ) func main() { ////////////////////////// // 일반 슬라이스에서 할당은 참조고 copy 를 해야지만 복사가 된다. // https://blog.golang.org/go-slices-usage-and-internals a := []byte{} a = append(a, 1, 2, 3, 4, 5) fmt.Println("a:", a) b := a c := a[0:] d :...
/** * @file tvinpaint.c * @brief Total variation regularized inpainting demo for IPOL * @author Pascal Getreuer <getreuer@gmail.com> * * * Copyright (c) 2011-2012, Pascal Getreuer * All rights reserved. * * This program is free software: you can use, modify and/or * redistribute it under the terms of the ...
package expo.modules.kotlin import expo.modules.kotlin.modules.Module class ModuleRegistry : Iterable<ModuleHolder> { private val registry = mutableMapOf<String, ModuleHolder>() fun register(module: Module) { val holder = ModuleHolder(module) registry[holder.name] = holder } fun register(provider: M...
require "record_accessors/version" module RecordAccessors def self.included(base) base.class_eval do class << self def available_attributes @available_attributes ||= [] end alias_method :attr_accessor_without_tracking, :attr_accessor def attr_accessor(*names) ...
// The MIT License (MIT) // // Copyright (c) Andrew Armstrong/FacticiusVir 2019 // // 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 r...
using MediatR; namespace StEn.FinCalcR.WinUi.Events { public class HintEvent : INotification { public HintEvent(string message) { this.Message = message; } public string Message { get; } } }
// test_bit_array.cpp #include <ulib/utility/bit_array.h> #ifndef U_HTTP2_DISABLE # include <ulib/utility/http2.h> #endif int U_EXPORT main(int argc, char** argv) { U_ULIB_INIT(argv); U_TRACE(5, "::main(%d,%p)", argc, argv) UBitArray addrmask; uint32_t i, nbits = addrmask.getNumBits(); U_ASSERT_EQ...
package np.core; import java.io.*; public class IO { public static String LoadString(InputStream stream) { try (BufferedReader reader = new BufferedReader(new InputStreamReader(stream))) { String line; StringBuffer buffer = new StringBuffer(); while((line = reader.readLine()) != null) { buffer.append...
import { Component, OnInit } from "@angular/core"; import { TvListService } from "~/services/tvlist.service"; import { RouterExtensions } from "nativescript-angular/router"; import { MiscService } from "~/services/misc.service"; @Component({ selector: "ns-landing", templateUrl: "./explore.component.html", s...
-- | This module is used to implement a wrapper program for propellor -- distribution. -- -- Distributions should install this program into PATH. -- (Cabal builds it as dist/build/propellor/propellor). -- -- This is not the propellor main program (that's config.hs). -- This bootstraps ~/.propellor/config.hs, builds it ...
subroutine takemolec(kk,infoonly,molinquire,indexanswer) * * to add new molecules, just fill in with name as in Tsuji molecular file * starting with the first ' ' at th ened of data block molinpresmo. * BPz 10/10-95 * * this routine is to be used after a call to jon, * -if eqmol has been called also-, ...
# cording: utf-8 require 'term/table' RSpec.describe IO do it '#table 制表' do t = IO.table << ['中', 2] << ['a', 'b'] expect(t.to_s).to eq "┌--┬-┐\n│中│2│\n├--┼-┤\n│a │b│\n└--┴-┘\n" end end
package com.chen.ddd.interfaces.http.handle; import com.chen.ddd.core.common.exception.DomainRuntimeException; import com.chen.ddd.core.common.exception.NotExistException; import com.chen.ddd.interfaces.http.exception.NotLoginException; import com.chen.ddd.interfaces.http.result.R; import lombok.extern.slf4j.Slf4j; i...
#! /bin/sh find ../../loom/graphics -name "*.[ch]" -o -name "*.cpp" > ./files.txt files=$(cat files.txt) for item in $files ; do dn=$(dirname $item) mkdir -p out/$dn ./uncrustify -f $item -c default.cfg > out/$item done
import { Redis } from "ioredis"; import faker from "faker"; import { connect } from "../../src/redis/connect"; import { disconnect } from "../../src/redis/disconnect"; import { clear } from "../../src/redis/clear"; const mocks = require("../../mocks"); describe("redis/clear", () => { const pattern = String(faker.r...
include defs # docant # # Similar to cant(name), however precede the messge with the name # of the program that was running when the file could not be # opened. Helpful in a pipeline to verify which program was not # able to open a file. # subroutine docant(name) character name(ARB), prog(FILENAMESIZE) in...
import type { Fn, Fn0, Fn2 } from "@thi.ng/api"; export type Timestamp = number | bigint; export type TimingResult<T> = [T, number]; export interface BenchmarkOpts { /** * Benchmark title (only used if `print` enabled) */ title: string; /** * Number of iterations * * @defaultValu...
import React from "react"; import { graphql, PageProps } from "gatsby"; import styled from "styled-components"; import Layout from "@/components/layout.tsx"; import Header from "@/components/header/header.tsx"; import Description from "@/components/description/description.tsx"; import Features from "@/components/featur...
package com.example.sharingang.ui.adapters import android.content.Context import android.view.LayoutInflater import android.view.View import android.view.ViewGroup import android.widget.ImageView import android.widget.TextView import androidx.lifecycle.LifecycleCoroutineScope import androidx.navigation.findNavControll...
/*jshint node:true, esversion:6*/ 'use strict'; const grpc = require('grpc'); const etcd = require('etcd3-rpc'); const client = new etcd.Watch('localhost:2379', grpc.credentials.createInsecure()); const stream = client.watch(); stream.on('data', function (data) { const id = data.watch_id; console.log('Creat...
'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _path = require('path'); var _paths = require('./paths'); // import webpack from 'webpack'; exports.default = { entry: { app: [(0, _path.join)(_paths.SRC_PATH, 'client/index.js')] // vendor: [ // 'react', // 're...
<?php /** * This file is part of the GordyAnsell GreenFedora PHP framework. * * (c) Gordon Ansell <contact@gordonansell.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ declare(strict_types=1); namespace GreenFedora\Router; ...
using System.Collections.Generic; using System.Threading.Tasks; namespace CrossX.Abstractions.Async { public static class AsyncExtensions { public static Sequence AsSequence(this Task task) { return Sequence.Agregate(GetSequence(task, 0)); } public stat...
class ContactFilterParamsValidator < ActiveModel::EachValidator def validate_each(record, attribute, value) return if value.blank? return if valid?(value) record.errors.add(attribute, :invalid) end private def valid?(value) Filter::Resource::Contact.new( { association_chain: Contact.all...
section .text global _start _start: ; we need some help! section .data ; template: ; mov edx,LENGTH ; mov ecx,MSG ; mov ebx,1 ; mov eax,4 ; int 0x80 ; end file: ; move eax,1 ; int 0x80
require 'spec_helper' describe "Checkout", js: true do let!(:country) { create(:country, states_required: true) } let!(:state) { create(:state, country: country) } let!(:shipping_method) { create(:shipping_method) } let!(:stock_location) { create(:stock_location) } let!(:product) {...
#!/usr/bin/env python # -*- coding: utf-8 -*- import json from alipay.aop.api.constant.ParamConstants import * class AlipayCommerceIotDeviceUpgradeappCreateModel(object): def __init__(self): self._remark = None self._sn = None self._target_app_id = None self._target_app_version =...
package cn.codethink.xiaoming.concurrent; import cn.chuanwise.common.concurrent.Promise; /** * 机器人相关异步结果 * * @author Chuanwise * * @see cn.chuanwise.common.concurrent.Promise */ public interface BotPromise<T> extends BotTask, Promise<T> { }
# frozen_string_literal: true namespace :profile do desc "Profile Template match memory allocations" task :template_match_memory do require "memory_profiler" require "addressable/template" start_at = Time.now.to_f template = Addressable::Template.new("https://example.com/{?one,two,three}") rep...
use pyo3::PyResult; /// The Protocol that is currently active. pub enum SelectedProtocol { /// The HTTP/1.x protocol handler. H1, } /// Defines the two states a protocol's switch status can be either SwitchTo /// type T, or dont switch at all. pub enum SwitchStatus { SwitchTo(SelectedProtocol), NoSw...
using Microsoft.Extensions.DependencyInjection; using Xunit; namespace HttpTracker.SQLServer.Tests { public class HttpTrackerSQLServerProvider_Test : TestBase { [Fact] public void GetConnection() { var provider = Services.BuildServiceProvider().GetRequiredService<IDbConnect...
package web import ( "github.com/gin-gonic/gin" "github.com/sirupsen/logrus" ) const ( logKeyRequestID = "requestId" logKeyModule = "module" ) // LogContext 包装 gin 的上下文,用于打印日志,并给日志添加唯一的请求 ID。 type LogContext struct { Ctx *gin.Context Module string Logger *logrus.Logger } func (c *LogContext) entry() (e...
module ManageUserSupport include MasterSupport def list_valid_attribs res = [] i = -1 if User.count > 0 i = User.order(id: :desc).first.id end (1..5).each do |l| res << { email: "tst-euser-#{i+l}@testmanage.com", disabled: false } end (...
<?php namespace FSVendor\WPDesk\Forms\Serializer; use FSVendor\WPDesk\Forms\Serializer; class NoSerialize implements \FSVendor\WPDesk\Forms\Serializer { public function serialize($value) { return $value; } public function unserialize($value) { return $value; } }
module FioAPI class Base # Allow ruby object to be initialized with params # # == Parameters: # hash:: # Hash where key is attribute and value is new attribute value # # == Returns: # New object with prefilled attributes # def initialize(*hash) hash.first.each { |k, v...
import os from django.shortcuts import render from django.views import View from django.urls import reverse from django.http import Http404, HttpResponse, HttpResponseNotFound from django.conf import settings from rest_framework.views import APIView from rest_framework.response import Response from rest_framework impo...
package js_test import ( "testing" "github.com/sensu/sensu-go/js" "github.com/sensu/sensu-go/types" "github.com/sensu/sensu-go/types/dynamic" ) func BenchmarkCheckEval(b *testing.B) { check := types.FixtureCheck("foo") for i := 0; i < b.N; i++ { synth := dynamic.Synthesize(check) params := map[string]inter...
# Non-Raspberry Pi OS images In theory there is no reason this could not mount an arbitrary disk image's partitions. However, this has knowledge of the specific partitions, e.g. the first partition is the boot partition and should mount to `/boot`, while the second is the root partition, and no other partition are exa...
var dir_4d8456d82305c4d30846a28617d1ad4b = [ [ "onosproject", "dir_722c769f378eac8c3f9b59d51141f76a.html", "dir_722c769f378eac8c3f9b59d51141f76a" ] ];
{----------------------------------------------------------------------------- -- -- Module | -- Dependency and other Codes -- -- | the codes for TinT parser for italian --name of pos tagset ISST TANL Tagset -- from http://www.italianlp.it/docs/ISST-TANL-POStagset.pdf -- model used TinT -------------------------...
//===-- common.cpp ----------------------------------------------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===---------------------------...
package com.tickr.tickr.api.utils import java.io.IOException import retrofit2.Response import retrofit2.Retrofit /** * Created by bry1337 on 25/01/2018. * * @author edwardbryan.abergas@gmail.com */ class RetrofitException(builder: Builder) : RuntimeException(builder.message, builder.exception) { /** The reque...
// // AppDelegate+CJAppDelegateCategory.h // sliderViewcontroller // // Created by ccj on 2017/1/16. // Copyright © 2017年 ccj. All rights reserved. // #import "AppDelegate.h" /**********************作用:适配屏幕******************************** 用法: cjW(width) cjH(height) cjX(x) cjY(y) cjSize(size) **************...
package dora.db.table import android.database.SQLException import android.database.sqlite.SQLiteDatabase import dora.db.Orm import dora.db.OrmLog import dora.db.Transaction import dora.db.constraint.* import dora.db.dao.DaoFactory.removeDao import dora.db.exception.ConstraintException import dora.db.type.DataType impo...
package levenshtein func (l Levenshtein) IterativeCache() int { prev := make([]int, len(l.s2)+1) for i := 0; i <= len(l.s2); i++ { prev[i] = i } cur := make([]int, len(l.s2)+1) for i := 1; i <= len(l.s1); i++ { cur[0] = i for j := 1; j <= len(l.s2); j++ { eq := 1 if l.s1[i-1] == l.s2[j-1] { eq = 0...
// tag::create-archive-with-base-plugin-example[] plugins { base } version = "1.0.0" tasks.register<Zip>("packageDistribution") { from(layout.buildDirectory.dir("toArchive")) { exclude("**/*.pdf") } from(layout.buildDirectory.dir("toArchive")) { include("**/*.pdf") into("docs"...
/* * Copyright (C) 2013 Square, 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 agre...
#![cfg_attr(not(feature = "std"), no_std)] use core::cmp::PartialEq; use core::convert::From; use core::ops::Neg; use core::ops::{Add, AddAssign}; use core::ops::{Div, DivAssign}; use core::ops::{Index, IndexMut}; use core::ops::{Mul, MulAssign}; use core::ops::{Sub, SubAssign}; use core::slice::SliceIndex; use serde...
/** ****************************************************************************** * @file inet_hal.h * @author Matthew McGowan * @version V1.0.0 * @date 25-Sept-2014 * @brief Internet APIs ****************************************************************************** Copyright (c) 2013-2015 Particle ...
""" 3D version of Res2Net (v1b) encoder with a UNet-like decoder. Adapted from their official git repo: https://github.com/Res2Net/Res2Net-PretrainedModels/blob/master/res2net_v1b.py """ import pathlib import math from os import stat from collections import OrderedDict import torch import torch.nn as nn import torc...
// Package console provides a simple interface for logging things to stdout & a log file package console import ( "fmt" "os" "runtime/debug" "sync" "time" "github.com/fatih/color" ) const ( // LevelDebug debug level includes debugging information and is very verbose LevelDebug = 3 // LevelInfo informational...
package io.gustavoamigo.quill.pgsql.encoding.json.play import java.sql.{Types, PreparedStatement} import io.getquill.source.jdbc.JdbcSource trait JsonEncoder { this: JdbcSource[_, _] => import play.api.libs.json._ private def genericEncoder[T](valueToString: (T => String) = (r: T) => r.toString): Encoder[T] =...
// Distributed under the MIT software license, see the accompanying // file LICENSE or http://www.opensource.org/licenses/mit-license.php. use hex::encode; use qrllib::rust_wrapper::shasha::shasha::sha2_256; #[test] fn hashing_test() { let mut input = String::from("This is a test X").into_bytes(); let count = ...
using Builder.Sample; using System; namespace Builder { class Program { static void Main(string[] args) { Sample.Builder notebookBuilder = new NoteBookBuilder(); Sample.Builder gameComputerBuilder = new GameComputerBuilder(); Director director = new Direc...
/* * Copyright (C) 2017-2019 Hazuki * * 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...
from django.test import TransactionTestCase from django.apps import apps from django.db import connection from django.db.migrations.executor import MigrationExecutor from care.facility.models.patient_base import DiseaseStatusEnum from care.utils.tests.test_base import TestBase from care.users.models import District, S...
#include <glib.h> #include <string.h> #include <stdbool.h> #include <stddef.h> #include <stdlib.h> typedef struct _GPtrArrayImplementation { gpointer *storage; guint logical_size; guint physical_size; guint ref_count; } GPtrArrayImplementation; GPtrArray *g_ptr_array_new(void) { GPtrArrayImple...
/** * Tests for the Authenticator functionality. * * @author Sam Claus * @version 1/17/17 * @copyright Tera Insights */ import { Authenticator } from '../src/Authenticator'; import { getServerKey, authenticate, verifySignature } from './TestUtils' import { websafeBase64ToBytes } from '../src/Converters'; import...
export const generateId = (key?: string | number): string => { return 'react-persistant-state-' + (key ?? generateHash(new Error().stack ?? '')) } const generateHash = (x: string): number => { return x.split('').reduce((prevHash, currVal) => (((prevHash << 5) - prevHash) + currVal.charCodeAt(0)) | 0, 0) }
""" Import recipes from URLs to our database """ import re import json from txpx import background, EchoProcess from txpx.process import LineGlueProtocol from supperfeed.build import Recipe LineGlueProtocol.MAX_LENGTH=10000 class ImportProcess(EchoProcess): """ Import a recipe by loading the json data dump...
2020年09月02日20时数据 Status: 200 1.被前男友当街打死女孩家属发声 微博热度:3394562 2.华春莹拿钟南山的话回应提问 微博热度:2213212 3.姐姐发光的样子真好看 微博热度:2057909 4.以家人之名 微博热度:1882778 5.中元节 微博热度:1278047 6.这就是灌篮录制路透 微博热度:1179158 7.金鹰奖首轮评选结果 微博热度:1161706 8.天津一小区住十万个骨灰盒 微博热度:1124255 9.停课致韩国万吨牛奶订单取消 微博热度:969399 10.多地发声要求非全日制学历一视同仁 微博热度:712200 11.泰国国王...
using LinearAlgebra: Matrix using Random, LinearAlgebra f(X) = 3sin(X[1]/3.0) + 2cos(X[2]/2.0) τ(n) = 1/√(10n) mutable struct CMAES{T} dim::Int λ::Int μ::Int centroid::Array{T, 1} c_m::T weights::Array{T, 1} μ_eff::T σ::T p_σ::Array{T, 1} c_σ::T d_σ::T C::Array{T, ...
set -x CURRENT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" source $CURRENT_DIR/version.sh if [ ! -f $working_directory/sources/ssh_wait-$ssh_wait_version-py2.py3-none-any.whl ]; then wget -P $working_directory/sources/ $ssh_wait_version_url fi rm -Rf $working_directory/build/ssh-wai...
package com.mrb.remember.presentation.levels import androidx.lifecycle.MutableLiveData import com.mrb.remember.domain.interactor.GetCompletedDay import com.mrb.remember.domain.interactor.GetHomework import com.mrb.remember.domain.interactor.SaveCompletedDay import com.mrb.remember.domain.interactor.UseCase import com....
/* * Copyright (C) 2018 Square, 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 agre...
package hackerrank import "regexp" // BracesValidation returns array of validated results. func BracesValidation(values []string) []string { var result []string for _, list := range values { status := "YES" var temp string for len(list) > 0 { char, listL := divideFirst(list) list = listL ok,e:=regexp...
/* * File: * System: * Module: * Author: * Copyright: * Source: $HeadURL: $ * Last modified by: $Author: $ * Date: $Date: $ * Version: $Revision: $ * Description: * Preconditions: */ package stallone.algebra; import stallone.api.complex.IComplexIterator...
import unittest, json from src import tkfinder kazuya = { "name": "kazuya", "proper_name": "Kazuya", "local_json": "kazuya.json", "online_webpage": "http://rbnorway.org/kazuya-t7-frames", "portrait": "https://i.imgur.com/kMvhDfU.jpg" } class MyTestCase(unittest.TestCase): def test_get_commands...
#ifndef TMINE_RNG_HPP #define TMINE_RNG_HPP #include <cstdint> #include <functional> namespace tmine { // ptr to a function that provides random numbers in a range // min and max of range are both inclusive using rng_func = std::function<int32_t(int32_t, int32_t)>; // default implementation of rng_func using std::m...
export { default as ArrayChip } from './ArrayChip'; export { default as DurationChip } from './DurationChip'; export { default as HttpChip, HttpStatusChip, getHttpStatusCode, } from './HttpChip'; export { default as NavigationChip } from './NavigationChip'; export { default as TitleChip } from './TitleChip'; expo...
from django.conf.urls import url from . import views urlpatterns = [ url(r'^$', views.index, name='index'), url(r'^settings$', views.settings, name='settings'), url(r'^settings/profile$', views.settings_profile, name='settings-profile'), url(r'^settings/keys$', views.settings_keys, name='settings-key...
/* Copyright 2017-2019 VMware, Inc. SPDX-License-Identifier: BSD-2-Clause */ package com.vmware.weathervane.workloadDriver.common.representation; import java.util.List; import com.vmware.weathervane.workloadDriver.common.core.Run; import com.vmware.weathervane.workloadDriver.common.core.WorkloadStatus; public class ...
require 'rails_helper' RSpec.describe DraftPicksChannel, type: :channel do let(:league) { create :league } it 'successfully subscribes' do subscribe league_id: league.id expect(subscription).to be_confirmed end it 'rejects a subscription if the league_id is not present' do subscribe league_id: ni...
/** * @file SpeciesThermoFactory.cpp */ // Copyright 2001 California Institute of Technology #ifdef WIN32 #pragma warning(disable:4786) #endif #include "SpeciesThermoFactory.h" #include "SpeciesThermo.h" #include "NasaThermo.h" #include "ShomateThermo.h" //#include "PolyThermoMgr.h" #include "...
import React = require('react'); const { connect } = require('react-redux'); import FlatButton from 'material-ui/FlatButton'; import Dialog from 'material-ui/Dialog'; import Map from './Map'; import { track, fetchLocation } from '../actions'; export default connect(null, { fetchLocation, track })( class extends Reac...
require "payler/version" module Payler class << self # Starts payler session and returns hash # required: order_id, amount # optional: type, product, currency, recurrent, total, template, lang, userdata, pay_page_param_* # defaults: type=OneStep, currency=RUB, recurrent=true # # = Success re...
module PostsHelper def post_belongs_to_user(post) return false unless current_user.present? post.blog.user_id == current_user.id end end
<?php namespace App\Http\Controllers\HomePage; use App\Models\CarInfoPage\CarInfoPage; use App\Models\Page\Page; use Illuminate\Http\Request; use App\Http\Controllers\Controller; /** * Class HomePageController * @package App\Http\Controllers\HomePage */ class HomePageController extends Controller { /** ...
package extracells.network import cpw.mods.fml.common.FMLCommonHandler import cpw.mods.fml.common.eventhandler.SubscribeEvent import cpw.mods.fml.common.network.FMLEventChannel import cpw.mods.fml.common.network.FMLNetworkEvent.ClientCustomPacketEvent import cpw.mods.fml.common.network.FMLNetworkEvent.ServerCustomPack...
# Copyright The PyTorch Lightning 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 or agreed to i...