text
stringlengths
27
775k
#! /bin/sh ## ## Copyright (C) by Argonne National Laboratory ## See COPYRIGHT in top-level directory ## cfile="src/mpi/coll/src/csel_json_autogen.c" create_json_buf() { json_file=$1 bufname=$2 echo "const char $bufname[] = {" >> $cfile # split all the characters in the json file into a characte...
// Copyright eeGeo Ltd (2012-2015), All Rights Reserved #include "PlaceJumpController.h" #include "IPlaceJumpsModel.h" #include "LatLongAltitude.h" #include "Types.h" #include "ICameraTransitionController.h" namespace ExampleApp { namespace PlaceJumps { namespace SdkModel { PlaceJu...
/* * Copyright 2015-2019 the original author or authors. * * 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 * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by a...
import lldb from lldbsuite.test.lldbtest import * from lldbsuite.test.decorators import * import os class TestTargetSourceMap(TestBase): mydir = TestBase.compute_mydir(__file__) @no_debug_info_test def test_source_map(self): """Test target.source-map' functionality.""" def assertBreakpo...
package com.padcmyanmar.mmnews.kotlin.data.vos import android.arch.persistence.room.ColumnInfo import android.arch.persistence.room.Entity import android.arch.persistence.room.Ignore import android.arch.persistence.room.PrimaryKey import android.text.TextUtils import com.google.gson.annotations.SerializedName @Entity...
<?php /** * @project bkn-api. * @since 1/15/2017 6:43 PM * @author <a href = "fauzi.knightmaster.achmad@gmail.com">Achmad Fauzi</a> */ namespace app\ConstantValue; interface IModelAssignmentLetterConstant { const ASSIGNMENT_LETTER_TABLE_NAME = 'mst_assigment_letter'; const ASSIGNMENT_LETTER_COL_LET...
# 1D data @recipe function f(metric::Metric{T, 1}; axes="nil", coordinates=nothing) where {T <: UltrasoundMetric} axes == "nil" && error("Keyword missing: axes=\"x\" or axes=\"y\"..") check_coordinates(coordinates) title --> get_metric_display_name(metric) xguide --> "$(axes)-axis" aspect_ratio -->...
using System; namespace WarOfEmpires.Database.ReferenceEntities { public abstract class BaseReferenceEntity<TEnum> where TEnum : Enum { public virtual TEnum Id { get; set; } public virtual string Name { get; set; } } }
<?php namespace App\Http\Controllers; use App\bookRoom; use App\Http\Requests\carRent; use App\Http\Requests\RoomRequest; use App\Post; use App\rent_car; use Illuminate\Http\Request; class PublicController extends Controller { // public function index(){ $posts = Post::all(); return view('...
def allLongestStrings(a) return a.filter{|e| e.size == a.map{|e| e.size}.max} end
///////////////////////////////////////////////////////////////////////////// // AGCEventDef.cpp : Implementation of CAGCEventDef // #include "pch.h" #include <AGC.h> #include "AGCEventDef.h" #include "resource.h" #include <..\TCLib\ObjectLock.h> //////////////////////////////////////////////////////////////////////...
# == Schema Information # # Table name: bank_accounts # # id :integer not null, primary key # name :string # account_type_description :string # account_no :string # user_id :integer # institution_id :integer # ...
#!/usr/bin/env bash export KUBE_NAMESPACE=$1 export DEPLOYMENT=$2 read -p "Kube Api Endpoint: " export KUBE_API_ENDPOINT=$REPLY helm upgrade \ --install \ --force \ --set ingress.hosts[0]=api.order-service.${KUBE_API_ENDPOINT} \ --set ingress.tls[0].hosts[0]=api.order-service.${KUBE_API_ENDPOINT} \ --set ingress.tls[0]...
@testset "gain" begin # Create a system. Ngrid = [3,3,3] N = 3prod(Ngrid) ind_in = 5:7 εc = ones(ComplexF64, N) εc[ind_in] .= 12+0.1im m = 1 ωₐ = 1.0 γ˔ = 1.0 D₀ = fill(0.01, N) D₀[ind_in] .= 1.0 M = 4 ω = rand(M) a² = rand(M) Ψ = randn(ComplexF64,N,M) ψ = [Ψ[:,j] for j = 1:M] # Check automatic differentiation perfo...
--- title: Toss site: https://toss.im logo: toss.svg ---
package github.aq.mvcstudentdemo.service; import github.aq.mvcstudentdemo.dao.StudentDao; import github.aq.mvcstudentdemo.model.Student; import java.util.Collection; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; @Component public class Stu...
<?php namespace common\domain\models; class Changes { /** * @param Change[] $changes * * @return array with new and old value maps */ public static function toArray(array $changes) { return \common\domain\utils\Changes::toArray($changes); } }
package io.nuvo.nio import io.nuvo.runtime.Config._ import java.nio.ByteBuffer /** * Trait for buffer allocators. */ trait BufferAllocator { /** * Allocate a buffer using the configured default size and sets it into native byte order * @return the allocated buffer */ def allocate(): RawBuffer /** ...
OCLineReporter ============== Place your OCLint JSON reports in this directory. ###Example ![Overview](../screenshots/ReportsDirectory.png)
// DESCRIPTION = Disallow unused variables (no-unused-vars) // STATUS = 2 /* eslint no-console: 0*/ /* eslint @typescript-eslint/no-unused-vars: 0*/ /* eslint @typescript-eslint/no-non-null-assertion: 0*/ /* eslint @typescript-eslint/consistent-type-assertions: 0*/ // <!START // Bad /* // Write-only variables are not...
# frozen_string_literal: true FactoryBot.define do sequence(:filepath) do |n| "#{n}_#{Faker::File.file_name(nil, nil, 'txt')}" end end
/* Copyright 2021 WeAreFrank! 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 dis...
package main import ( "net" "net/http" _ "net/http/pprof" "github.com/spf13/cobra" "github.com/liupzmin/weewoe/config" "github.com/liupzmin/weewoe/log" "github.com/liupzmin/weewoe/mail" pb "github.com/liupzmin/weewoe/proto" "github.com/liupzmin/weewoe/scrape" "github.com/robfig/cron/v3" "github.com/spf13/...
--- html_meta: "description": "" "property=og:description": "" "property=og:title": "" "keywords": "" --- (lifecycle-methods-label)= # Use Lifecycle Methods Lifecycle methods are methods which are called on specific external events. For example the {file}`componentDidMount` method is called when the componen...
# encoding: UTF-8 # # Copyright (c) 2010-2017 GoodData Corporation. All rights reserved. # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. require_relative 'base_action' module GoodData module LCM2 class CollectDataProduct < BaseActi...
package pltype import ( pb "github.com/findy-network/findy-common-go/grpc/agency/v1" "github.com/golang/glog" ) // name constants const ( HandshakePairwiseName = "HANDSHAKE" ) // Protocol constants const ( Terminate = "" Nothing = "" Agent = "urn:indy:sov:agent:message_type:findy.fi" // This will b...
-module(basics). -include("include.hrl"). -export([ fun_test/1, atom_test/0, send_test/1, multiline_string_test/0 ]). fun_test(ok) -> ok; fun_test(X) when is_atom(X) -> X; fun_test(X) -> X. atom_test() -> ok, a_b@c, 'Bob', 'Weird Atom Because I Can'...
! chk_long_statement.f90 ! Check: does the compiler support statements of 40 lines or more? ! program chk_long_statement implicit none character(len=60), dimension(40) :: string string = (/ '1aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' , & '2aaaaaaaaaaaaaaaaaaaaa...
# -*- coding: utf-8 -*- import requests PUSH_URL = "https://api.pushbullet.com/v2/pushes" DEVICES_URL = "https://api.pushbullet.com/v2/devices" class PushbulletClient(object): """Pushbullet client""" def __init__(self, api_key): self.api_key = api_key self.session = requests.Session() ...
package com.skyyo.template.application.models.remote import com.squareup.moshi.JsonClass @JsonClass(generateAdapter = true) class SignInRequest( val email: String, val password: String )
/* * File: OpenKinect.hpp * Author: imam * * Created on 13 October 2015, 10:49 PM */ /* * libfreenect class from the scratch to use multiple Kinect devices in OpenCV * */ #ifndef OPENKINECT_HPP #define OPENKINECT_HPP #include <thread> #include <mutex> #include <opencv2/opencv.hpp> #include <libfreenect...
package ru.job4j.io; import ru.job4j.io.connect.SocketServer; import org.junit.After; import org.junit.Before; import org.junit.Test; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.DataInputStream; import java.io.IOException; import java.io.PrintStream; import java.net.Sock...
#!/usr/bin/env bash python train_ShuffleNetV2_robot.py \ --json_path='/path/to/json/robot_keypoints_20190426_640x360.json' \ --saved_model='robotkp_LWShuffleNetV2_v1_16_cat_w1.0_v0.1.pth' \ --model='LWShuffleNetV2_v1_16_cat' \ --multistage 0 \ --gpu_ids 3 \ --epochs=400 \ --batch_size=24 \ --workers=4 \ --lr=0.5 \ --b...
import React, { FC, Dispatch, SetStateAction } from 'react'; import { useHistory } from 'lib/router'; import { SIGNIN_URL } from 'constants/urls'; import { Modal } from 'components'; interface LoginModalProps { visible: boolean; setVisible: Dispatch<SetStateAction<boolean>>; } const LoginModal: FC<LoginModalPro...
#!/usr/bin/env ruby # # Seed AbstractLocation and AbstractEvent objects with earliest known # versions of venues and events imported from 3rd party calendars. The # new recurring event import backend performs de-duplication and event # updates at the source level; this allows us to match against original # values found...
# coffeeorder This is my updated version of the Udacity "Just Java" app. Here are some screenshots of the app First page: Quantity <img src="./content/quantity.png" alt="drawing" width="325"/> Second page: Toppings <img src="./content/toppings.png" alt="drawing" width="325"/> Thrid page: ID <img src="./content/i...
--- layout: post title:04-05 Ruby Koans Questions [4/05/22] --- # Ruby Koans Questions to Answer - explain pushing and popping arrays - how do you know the object id? - I don't really understand when to put in NoMethodError - What do you use Inspect for?
package app import ( "github.com/gorilla/mux" "github.com/deemount/kraken/api/config" "github.com/deemount/kraken/api/config/driver" ) // App ... type App struct { // refer DB driver.DataService Routes config.Routes // pointer API *config.API Kraken *config.Kraken Options *config.Options Swagger...
# Copyright 2016 Max Erickson # # 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...
using UnityEngine; public class WaitForInputTimeout : CustomYieldInstruction { public bool ReceivedInput { get; set; } private float _targetTime; private float _seconds; public WaitForInputTimeout(float seconds) { _seconds = seconds; Reset(); } public override bool keepWa...
from typing import ( Any, Dict, List, Tuple, Union, ) from eth_utils import ( to_canonical_address, decode_hex, big_endian_to_int, ) from eth_typing import ( Address, ) from sharding.contracts.utils.smc_utils import ( get_smc_json, ) from sharding.handler.exceptions import ( ...
using System; using UnityEngine; namespace KAU.Utilities.Serializer { /// <summary> Each Primitive should be used in Here </summary> public class PlayerPrefsSerializerPrimitiveString : IDataSerializer<string> { protected override string _SaveName { get { return "playerSave.kau"; } } public...
import {Template} from 'src/types' export const trimAndRemoveQuotes = elt => { const trimmed = elt.trim() const dequoted = trimmed.replace(/(^")|("$)/g, '') return dequoted } export const formatTempVar = name => `:${name.replace(/:/g, '').replace(/\s/g, '')}:` export const getSelectedValue = (template: Temp...
using GetIntoTeachingApi.Services; using Hangfire; using Microsoft.AspNetCore.Builder; using Prometheus; namespace GetIntoTeachingApi.Utils { public static class ApplicationExtensions { public static IApplicationBuilder UsePrometheusHangfireExporter(this IApplicationBuilder app) { ...
module Exposition class Post < ActiveRecord::Base include Concerns::Models::Post end end
import 'SettingsModel.dart'; import 'package:http/http.dart' as http; import 'dart:convert'; class Clue { final int id; final String answer; final String question; final int value; final String airdate; final int category_id; final int game_id; final int invalid_count; static List<Clue> clues = []; ...
<?php namespace App\Entity; use ApiPlatform\Core\Annotation\ApiResource; use ApiPlatform\Core\Annotation\ApiSubresource; use App\Repository\TagRepository; use Doctrine\ORM\Mapping as ORM; #[ORM\Entity(repositoryClass: TagRepository::class)] #[ApiResource] class Tag { #[ORM\Id] #[ORM\GeneratedValue(strategy: ...
## Some resources in the future that might be useful server_security=https://plusbryan.com/my-first-5-minutes-on-a-server-or-essential-security-for-linux-servers
struct Cancelled <: Exception end cancellation_token() = Promise{Cancelled}() const CancellationTokenType = typeof(cancellation_token()) const DissolveHandle = let send, _ = Reagents.channel() handle = Reagents.dissolve(send) typeof(handle) end struct CancelScope token::CancellationTokenType dis...
package com.amazonaws.xray.opentelemetry.tracing.metadata; import com.amazonaws.xray.entities.Entity; import io.opentelemetry.trace.Span; import java.util.Map; public class EntityMetadataFactory { private static final String OT_METADATA_NAMESPACE = "sdk"; private static final String OT_METADATA_KEY = "open_telem...
package com.tunasushi.activity; import android.app.Activity; import android.os.Bundle; import android.widget.SeekBar; import android.widget.SeekBar.OnSeekBarChangeListener; import com.tunasushi.R; import com.tunasushi.tuna.TAnalysis; /** * @author TunaSashimi * @date 2015-10-30 16:53 * @Copyright 2015 TunaSashimi....
using System; using System.IO; using Aliencube.GitHubActions.Teams.ConsoleApp; using FluentAssertions; using MessageCardModel; using MessageCardModel.Actions; using Newtonsoft.Json; using Microsoft.VisualStudio.TestTools.UnitTesting; namespace GitHubActions.Teams.ConsoleApp.Tests { [TestClass]...
# Python Counter Dictionary e.g.) ``` >>> from pycountdict import CounterDictionary >>> cd = CounterDictionary() >>> cd['a'] = 1 >>> print(cd) a: 1 >>> cd['b'] = 1 >>> print(cd) a: 1, b: 1 >>> cd['A'] = 1 >>> print(cd) a: 1, A: 1, b: 1 >>> cd['a'] = 1 >>> print(cd) a: 2, A: 1, b: 1 ```
//#define USE_PP // Copyright (c) <2015> <Playdead> // This file is subject to the MIT License as seen in the root of this folder structure (LICENSE.TXT) // AUTHOR: Lasse Jon Fuglsang Pedersen <lasse@playdead.com> #if UNITY_5_5_OR_NEWER #define SUPPORT_STEREO #endif #if USE_PP using System; using PDTAAFork.Scripts.C...
use std::sync::Arc; use serde::{Deserialize, Serialize}; use twilight_model::guild::{Permissions, Role}; use twilight_model::id::RoleId; use super::is_default; #[derive(Debug, Serialize, Deserialize)] pub struct CachedRole { #[serde(rename = "a")] pub id: RoleId, #[serde(rename = "b")] pub name: Stri...
package com.tanyayuferova.muteme.data import com.google.android.gms.location.places.Place /** * Author: Tanya Yuferova * Date: 11/30/2018 */ fun LocationData.toLocation() = Location( id = id, name = name, address = address ) fun Place.toLocationData() = LocationData( id = id, name = name.toStr...
<?php $form['id'] = 'form'; $select['class'] = 'form-control text-center'; ?> <!DOCTYPE html> <html lang="en"> <?php $this->load->view('templates/head',array('title'=>'Lista de Mensagens')); ?> <body> <?php $this->load->view('templates/header'); ?> <div class="container"> <div class="panel"> <h1 class="...
/* Define an at-style functions like fstatat, unlinkat, fchownat, etc. Copyright (C) 2006 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 o...
class EmbedController < OutletsController layout "embed" def verify @page_title = "Register an account" super end end
package com.github.bhlangonijr.kengine import com.github.bhlangonijr.chesslib.Board import com.github.bhlangonijr.chesslib.move.MoveList import java.util.concurrent.Executors class Search(val board: Board, val engine: SearchEngine) { private val executor = Executors.newSingleThreadExecutor() private var stat...
DATA=../dataset/preprocess/NHG TRAIN=nhg_en_train VALID=nhg_en_valid TEST=nhg_ja_test SRC=en_XX TGT=hi_IN NAME=en-hi DEST=../dataset/postprocess/NHG DICT=../mbart.cc25/dict.txt python -u preprocess.py \ --source-lang ${SRC} \ --target-lang ${TGT} \ --trainpref ${DATA}/${TRAIN}.spm \ --validpref ${DATA}/${VALID}.spm \ ...
var path = require('path'); var fs = require('fs'); var COMMAND_SRC = /^(\w+)\.js$/; exports.LIST = []; fs.readdirSync(path.resolve(__dirname)).forEach(function(file) { var match; if (match = COMMAND_SRC.exec(file)) { var name = path.resolve(__dirname, file); if (name !== __filename && fs.statSync(name)....
--- title: "[Python-CodingTest] 6-6. 중복순열 구하기 (DFS: 깊이우선탐색)" categories: - Python CodingTest tags: - [Python] toc: true toc_sticky: true date: 2022-04-26 last_modified_at: 2022-04-26 --- # 중복순열 구하기 ## 문제 정리 ### 입력 ``` 3 2 ``` ### 처리 과정 1. 중복순열 결과 리스트(`res[L]`)에 값 넣고 `DFS(L+1)`로 재귀 2. L이 m`(=2)`이 되면 `res` 출력 3...
#include <stdio.h> #include <stdint.h> #include <assert.h> #include <cpuid.h> #include <immintrin.h> #include <sys/mman.h> /* XMM/YMM registers to use */ /* For permanently storing all round-keys. */ #define K0 "5" #define K1 "6" #define K2 "7" #define K3 "8" #define K4 "9" #define K5 "10" #define K6 "11" #define K7 "...
sga="/Users/ed/Projects/sga" user="ubuntu" ip="shelleygodwinarchive.org" host="shelleygodwinarchive.org" ids=(a b c1 c2) for id in ${ids[*]} do tei="$sga/data/tei/ox/ox-frankenstein_notebook_$id.xml" echo "generating Manifest.jsonld for $tei" bin/unbind $tei http://$host/data/ox/ox-frankenstein-notebook_$i...
using System; using System.IO; using System.Linq; using PortableRest.Extensions; namespace PortableRest { /// <summary> /// A parameter that can be passed over an HTTP request with a given encoding. /// </summary> /// <remarks> /// This enables parameters to be encoded individually. For example, ...
module Solver where import DataTypes import Utils -- Simplify the expression. simplify' :: [Law] -> Expression -> [Step] simplify' ls e = f steps where steps = rws ls e f [] = [] f (x:_) = x:(simplify' ls (expression x)) -- Wrapper around simplify'. -- Adds the "Simplification" step. simplify :: Bo...
import { AnalysisJSONI, ApplicantI, ConversionTypesI, ExistingRequestSearchI, LocationT, NameRequestI, RequestNameI, SelectOptionsI, StatsI, SubmissionTypeT, WaitingAddressSearchI } from '@/interfaces/models' import { NameChoicesIF, NrDataIF, RequestOrConsentIF } from '@/interfaces' interface RequestNameMa...
import { GetLookupsQuery, useDeleteLookupMutation, useDeleteLookupValueMutation, useGetLookupsQuery } from 'client' import React, { MouseEventHandler, useState } from 'react' import { useQueryClient } from 'react-query' import type { Column, Row, TableInstance } from 'react-table' import { GqlType, notEmpty } from 'uti...
using CalculatorApp.Models; using Microsoft.AspNetCore.Mvc; namespace CalculatorApp.Controllers { public class HomeController : Controller { [HttpGet] public IActionResult Index(Calculator calculator) { return View(calculator); } public IActionResult Calcul...
import { ActionType } from "../action"; type Ball = { x: number, y: number, z: number, } export type BallState = ReadonlyArray<Ball>; const initialState: BallState = [{ x: 0, y: 0, z:0 }]; export const balls = (state: BallState = initialState, action: ActionType): BallState => { switch (action.type) { c...
#!/bin/bash -e THIS_SCRIPT_DIR=$(cd $(dirname "${BASH_SOURCE[0]}") && pwd) if [ $# -lt 1 ]; then echo "Usage: .build-faiss-debian.sh faiss_version [docker_image_name]"; exit 1; fi FAISS_VERSION=$1 DOCKER_IMAGE_NAME=${2:-vektonn/faiss-lib} DOCKER_IMAGE_NAME_AND_TAG=$DOCKER_IMAGE_NAME:$FAISS_VERSION echo "Buil...
package co.anitrend.retrofit.graphql.data.bucket.model.upload import co.anitrend.retrofit.graphql.data.bucket.model.node.BucketFileNode import com.google.gson.annotations.SerializedName internal data class UploadResult( @SerializedName("uploadFile") val uploaded: BucketFileNode )
package dev.vusi.ktor.authsample.feature import io.ktor.auth.* data class FirebaseUserPrincipal(val uid: String, val emailAddress: String) : Principal
; RUN: opt < %s -instcombine -S | FileCheck %s target datalayout = "e-p:32:32" target triple = "i686-pc-linux-gnu" define i32 @main() { ; CHECK-LABEL: @main( ; CHECK: call i32 bitcast entry: %tmp = call i32 bitcast (i7* (i999*)* @ctime to i32 (i99*)*)( i99* null ) ret i32 %tmp } define i7* @ctime(i999*) { ; CHECK-...
<?php namespace App; class Greeter { private $greetings = [ 'Hello', 'Bonjour', 'Hola', 'Hallo', 'Ciao', 'Olá', 'Privét', 'Hej', 'Namasté', 'Shalóm', ]; public function __invoke(string $subject): string { return s...
import React, { Component } from 'react' import hoistNonReactStatic from 'hoist-non-react-statics' /** * { * loader: 异步获取组件的回调函数 * loading: loading动画,根据状态,传入不同的参数。 * timeout: 如果超过这个时间,那么会给loading组件传递一个timeOut为true的props * } * @param {object} opt 配置对象 * @returns {Component} 返回一个react组件 * @constructor */ ...
require "bunto/feed_meta_tag" require "bunto/bunto-feed" require "bunto/page_without_a_file" require "bunto/strip_whitespace"
Install-Module posh-git -Scope CurrentUser Install-Module oh-my-posh -Scope CurrentUser git config set color.status.add 'green bold' git config set color.status.changed 'red bold' git config set color.status.untracked 'red bold' git config set color.diff.old 'red bold'
import { choice, maybe, sequenceOf, str, avoid, regexp_parser } from "../../combinator"; import assert from "assert"; const IdentStart = /^[a-zA-Z_]/; const IdentBody = /^[a-zA-Z_0-9]+/; export const strict_keywords = choice(Array.from(new Set([ "break", "continue", "for", "of", "in", "on", ...
package com.xjt.controller; import com.xjt.common.Request; import com.xjt.common.Result; import com.xjt.entity.goods.*; import com.xjt.service.IGoodsService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.C...
<?php use Illuminate\Foundation\Inspiring; use App\Task; use Carbon\Carbon; /* |-------------------------------------------------------------------------- | Console Routes |-------------------------------------------------------------------------- | | This file is where you may define all of your Closure based consol...
package com.dreamlab.edgefs.misc; import java.lang.reflect.Field; import java.lang.reflect.Modifier; import java.util.ArrayList; import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Set; import java.util.concurrent.ConcurrentHashMap; import org.slf4j.Logger; import org.slf4j.Logg...
<?php class LabyRoomMinetunnel extends LabyRoomHelper { public function generate($oRoom) { $w = $oRoom->getWidth(); $h = $oRoom->getHeight(); if ($oRoom->getRoomData('type') !== '') { $oRoom->generateCentralPillar(BLOCK_WALL, $oRoom->getWidth() - 6, $oRoom->getHeight() - 6); } else { switch ($this->oRnd...
import { normalizeResponse } from "~/plugins/Repository/index" describe("normaliseResponse", () => { it("normalizes a successful api response", () => { const resp = { code: 200, message: "foo", body: "bar", } const sut = normalizeResponse(resp) expect(sut.code).toEqual(resp.code) ...
/* MIT License Copyright (c) 2016 Edward Rowe, RedBlueGames 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, mer...
package mempool import ( "testing" "github.com/anakreon/anacoin/internal/block" ) func TestNewUnconfirmedTransactions(t *testing.T) { unconfirmedTransactions := NewUnconfirmedTransactions() if len(unconfirmedTransactions) != 0 { t.Fail() } } func TestAddTransaction(t *testing.T) { newTransactionOne := buildT...
echo $(date) " - Starting Bastion Prep Script" export USERNAME_ORG=${USERNAME_ORG} export PASSWORD_ACT_KEY="${PASSWORD_ACT_KEY}" export POOL_ID=${POOL_ID} export SUDOUSER=${SUDOUSER} export CUSTOMROUTINGCERTTYPE=${CUSTOMROUTINGCERTTYPE} export CUSTOMMASTERCERTTYPE=${CUSTOMMASTERCERTTYPE} export CUSTOMROUTINGCAFILE="${...
# frozen_string_literal: true module Bundler module Plugin autoload :API, "bundler/plugin/api" autoload :DSL, "bundler/plugin/dsl" autoload :Index, "bundler/plugin/index" autoload :Installer, "bundler/plugin/installer" autoload :SourceList, "bundler/plugin/source_list" cl...
import classes from './FollowButton.module.css'; export const FollowButton = () => { return ( <a href="/newsletter"> <div className={classes.button}>Follow</div> </a> ); };
module ArticleRepresentable extend ActiveSupport::Concern included do include Representable::JSON property :id, render_nil: true property :title, render_nil: true property :content, render_nil: true property :is_pickup property :user do property :name end property :created_a...
import { SerialNum } from '../view/game'; export const allowSwap: number[][] = [ [-1, 1, 3, -1], [-1, 2, 4, 0], [-1, -1, 5, 1], [0, 4, 6, -1], [1, 5, 7, 3], [2, -1, 8, 4], [3, 7, -1, -1], [4, 8, -1, 6], [5, -1, -1, 7], ]; export const allowDict: string[] = ['w', 'd', 's', 'a']; export class QueueIte...
/** * Copyright (c) 2016 Carnegie Mellon University. All Rights Reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, * this l...
import os import sys import threading import socket import time parentdir = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) sys.path.insert(0, parentdir) import shadowysocket class echoserver(): def __init__(self): self.conn = socket.socket() self.conn.bind(("127.0.0.1", 12300)) ...
import { EntityRepository, Repository } from 'typeorm'; import OrderItemEntity from '../order-item.entity'; import { OrderItemCreateBody } from '../../orders/orders.dto'; import ItemEntity from '../../item/item.entity'; import OrderEntity from '../../orders/orders.entity'; @EntityRepository(OrderItemEntity) export def...
// Copyright (c) Microsoft Corporation. // Licensed under the MIT license. using System.Collections.Generic; using Microsoft.PowerFx.Core.Public; using Microsoft.PowerFx.Core.Utils; using Microsoft.PowerFx.Syntax; using Xunit; namespace Microsoft.PowerFx.Core.Tests { public class FormulaSetTests { pr...
// Copyright (C) 2015 Wright State University // Author: Daniel P. Foose // This file is part of FreeIModPoly. // FreeIModPoly is distributed under two licenses, the GNU GPL v3 and the MIT License // Which license applies is up to your discretion. // GPL Statement: // FreeIModPoly is free software; you can redistribut...
function escapeTitle(text) { return text .replace(/"/g, ' ') .replace(/'/g, " ") .replace(/</g, ' ') .replace(/>/g, ' ') .replace(/&/g, ' '); } function update_bookmarks() { chrome.bookmarks.search({}, (bookmarkItems) => { if (bookmarkItems) { var bookmarks = []; for (var i = 0;...
<?php namespace backend\controllers; use backend\models\CopyFlowForm; use backend\models\FlowForm; use backend\models\FlowPublishForm; use backend\models\FlowRelationForm; use backend\models\FlowSearch; use backend\models\ProductSearch; use common\models\AdministratorLog; use common\models\Flow; use Yii; use yii\boot...
#### C++ Include cctype --- # The C Character Type Library > This header declares a set of functions to classify and transform individual characters. ### isalpha( c ) true if alphabetic: a-z or A-Z ```cpp isalpha('x') // true isalpha('6') // false isalpha('!') // false ``` ### isdigit( c ) true if digit: 0-9. ...