text
stringlengths
27
775k
using Shockah.CommonModCode.SMAPI; namespace Shockah.ProjectFluent { internal class FluentTranslationSet<Key>: ITranslationSet<Key> { private IFluent<Key> Fluent { get; set; } public FluentTranslationSet(IFluent<Key> fluent) { this.Fluent = fluent; } public bool ContainsKey(Key key) => Fluent.Cont...
<?php defined('BASEPATH') OR exit('No direct script access allowed'); ?><!DOCTYPE html> <html lang="en"> <head> <link rel="stylesheet" href="css/miEstilo.css" type="text/css" /> </head> <body> <h1> Datos del Trabajador </h1> <br/> <br/> <img src="img/diane.jpg" /> <h4>Clave: <?php echo $clave; ?></h4> ...
namespace StatsDownload.Email { using System; using System.Collections.Generic; public class EmailSettingsValidatorProvider : IEmailSettingsValidatorService { public string ParseFromAddress(string unsafeFromAddress) { if (string.IsNullOrWhiteSpace(unsafeFromAddress)) ...
import FoodTypeProps from "../src/shared/types/FoodType"; export const fakeFoodType: FoodTypeProps = { _id: "fake", name: "fake food type", picture: "https://fake.com", }; export default fakeFoodType;
package com.rocbillow.core.uikit.extension import androidx.annotation.ColorRes import androidx.core.content.ContextCompat import com.rocbillow.core.assist.ContextProvider val @receiver:ColorRes Int.colorInt get() = ContextCompat.getColor(ContextProvider.context, this)
#!/bin/bash emcc cryptonight.c crypto/*.c -O0 \ -s DISABLE_EXCEPTION_CATCHING=1 \ -s BINARYEN_ASYNC_COMPILATION=1 \ -s ALIASING_FUNCTION_POINTERS=0 \ -s ALLOW_MEMORY_GROWTH=1 \ -s VERBOSE=1 \ -s WASM=1 \ -s BINARYEN=1 \ -s NO_EXIT_RUNTIME=1 \ -s ASSERTIONS=1 \ -s SAFE_HEAP=0 \ ...
import * as ProductActions from './product'; import * as MenuActions from './menu'; import * as CartActions from './cart'; export { ProductActions, MenuActions, CartActions, };
using System.Collections.Generic; namespace PizzaStore.Business.Models { public class ProductListModel { public IEnumerable<ProductModel> Products { get; set; } } }
<?php namespace App\Http\Controllers\Marketers; use App\Http\Controllers\Controller; use App\Models\Marketers\Marketer; use App\Models\Projects\Project; use Illuminate\Http\Request; use Illuminate\Support\Facades\Auth; class MarketerController extends Controller { public function list() { if(Auth::us...
using adnumaZ.Data; using adnumaZ.ViewModels; using AutoMapper; using Microsoft.AspNetCore.Mvc; using Microsoft.EntityFrameworkCore; using System.Collections.Generic; using System.Linq; namespace adnumaZ.ViewComponents { public class RecentTorrentsViewComponent : ViewComponent { private readonly Appli...
;/***************************************************************************** ; * ; * XVID MPEG-4 VIDEO CODEC ; * - 3dnow 8x8 block-based halfpel interpolation - ; * ; * Copyright(C) 2001 Peter Ross <pross@xvid.org> ; * 2002-2008 Michael Militzer <michael@xvid.org> ; * 2002 Pascal Massi...
package com.whisk.hulk.testing import com.whisk.docker.testkit.ContainerState import org.scalatest.FunSuite import scala.concurrent.Await import scala.concurrent.duration._ class CockroachTestkitTest extends FunSuite with CockroachTestKit { test("test container started") { assert(cockroachContainer.state().is...
--- uid: crmscript_ref_MacroParameter_getIsOptional title: MacroParameter.getIsOptional() intellisense: MacroParameter.getIsOptional sortOrder: 479 keywords: getIsOptional() so.topic: reference --- # MacroParameter.getIsOptional() This function returns true if the value is optional, and false if it is compulsory.
PHP Utils ========= General PHP utilities. Currently only contains a method for deeply merging (TJM\Component\Utils\Arrays::deepMerge()).
/* * usb_messages.h * * * Copyright (c) 2017 Jeremy Garff * * 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 list of conditi...
import Sparkles from 'components/sparkles'; import Social from 'components/social'; import { email } from 'lib/site'; import style from './style.module.css'; function Contact() { return ( <section className={`${style.contact} -inverted`} id="contact"> <div className={`${style['contact-wrapper']} wrapper`...
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. namespace Microsoft.IIS.Administration.WebServer.Sites { using Core.Utils; using Web.Administration; using System; using System.Collections...
#!/bin/sh # PATH=/bin:/usr/bin:/usr/local/bin:.; export PATH # . mux.config # # You'll want to use gzip if you have it. If you want really good # compression, try 'gzip --best'. If you don't have gzip, use 'compress'. # ZIP=gzip # DBDATE=`date +%m%d-%H%M` # if [ "$1" -a -r "$1" ]; then echo "Using flatfile from $1,...
namespace Polity { public class Product { public ProductType Type { get; set; } public double Amount { get; set; } public override string ToString() => Type.Name + " (" + Amount + ")"; public Product() { } public Product(ProductType type, double amount) { ...
#!/usr/bin/env bash . env.sh echo ### Fail to create because of missing tokens. mantra-oracle create $CONFIG $ADDRESS_0 $PAYMENT_0 $DATUM_0 2>/dev/null assert_failure "01a No creation without tokens." ### Fail to create because of incorrect signing key. mantra-oracle create $CONFIG $ADDRESS_1 $PAYMENT_0 $DATUM_...
describe BookmarksController do # initialize any recurring objects let(:bookmark) { build(:bookmark) } let(:student) { build(:student, id: 1) } let(:instructor) { build(:instructor, id: 2) } let(:ta) { build(:teaching_assistant, id: 3) } # for student describe '#action_allowed?' do context 'when para...
{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE UndecidableInstances #-} module UCap.Domain.Const where import UCap.Domain.Classes import Data.InfSet (InfSet) import qualified Data.InfSet as IS import Data.Aeson import Data.Biapplicative import GHC.Generics {-| t'ConstE' wraps an effect do...
<?php session_start(); /*$a1 = 10; $a2 = 5; $a3 = $a1 * $a2; echo $a3.', '; if ($a3 == 50) { echo "50"; } else if ($a3 > 50) { echo "0"; } else { † echo "100"; } $q1 = true; $q2 = false; */ $ios = array(); if (isset($_POST["ua"])) { $white = rand(1, 9); echo $white.'<br>'; if ($white == 2 or $white == 5) { e...
function FormulaDataService($http, $rootScope, LoginService, URL, EVENTS) { function _on_mathml_received() { $rootScope.$broadcast(EVENTS.MATHML_RECEIVED); } function _on_formula_categories_received() { $rootScope.$broadcast(EVENTS.FORMULA_CATEGORIES_RECEIVED); } function _on_formu...
package uk.sky.cqlmigrate; import org.junit.Before; import org.junit.Test; import java.io.FileNotFoundException; import java.time.Duration; import java.time.Instant; import java.util.concurrent.Callable; import java.util.concurrent.TimeoutException; import static org.assertj.core.api.Assertions.assertThat; import st...
<?php if (!defined('THINK_PATH')) exit(); $config = require './config.php'; $HTTP_HOST = "http://" . $_SERVER['HTTP_HOST']; $HOST_DIR = dirname($_SERVER['PHP_SELF']); if ($HOST_DIR != '/') { $HTTP_HOST = $HTTP_HOST . $HOST_DIR; } $mail_config['config']['smtp_server'] = 'mail.yx1758.com'; $mail_config['config']['sm...
@testset "SimpleCovariance" begin v = simple() @test sprint(show, v) == "Simple covariance estimator" end @testset "RobustCovariance" begin v = robust() @test sprint(show, v) == "Heteroskedasticity-robust covariance estimator" end @testset "ClusterCovariance" begin @test_throws MethodError cluster...
using LambdaSharp.App.EventBus; using FluentAssertions; using Newtonsoft.Json.Linq; using Xunit; namespace Test.LambdaSharp.App.EventBus.EventPatternMatcherTests { public class IsMatch { //--- Methods --- [Fact] public void Empty_event_is_not_matched() { // arrange ...
ALTER TABLE Users ADD COLUMN `isSuperMentor` TINYINT(1) DEFAULT '0', ADD COLUMN `isMentor` TINYINT(1) DEFAULT '0';
// To parse this JSON data, do // // final postModel = postModelFromMap(jsonString); import 'dart:convert'; class PostModel { PostModel( {required this.tipo, this.id, this.descripcion, this.titulo, this.autor, this.link, required this.tematicas}); String tipo; Stri...
using System; using Xamarin.Forms; namespace SNSUI.Extensions { /// <summary> /// The BaseTypeCell contains Text, TextEnd, Sub, Icon, and Checkbox(IsCheckVisible). /// </summary> /// <remarks> /// The BaseTypeCell is an abstract class inherited from a cell.<br> /// The Type1Cell class is used t...
import React, { useState } from 'react' import './App.css'; import Interval from './components/Interval' import Average from './components/Average' import Sum from './components/Sum' import Draw from './components/Draw' function App() { const [min, setMin] = useState(10) const [max, setMax] = useState(20) ret...
use anyhow::{anyhow, Result}; use std::sync::Arc; use vulkano::{ buffer::{BufferUsage, CpuAccessibleBuffer, CpuBufferPool, TypedBufferAccess}, command_buffer::{AutoCommandBufferBuilder, CommandBufferUsage::OneTimeSubmit}, command_buffer::{CopyBufferImageError, SubpassContents}, descriptor_set::{persiste...
-module(capi_handler_encoder). -include_lib("damsel/include/dmsl_payment_processing_thrift.hrl"). -include_lib("damsel/include/dmsl_merch_stat_thrift.hrl"). -export([encode_contact_info/1]). -export([encode_client_info/1]). -export([encode_cash/1]). -export([encode_cash/2]). -export([encode_currency/1]). -export([enc...
package chooongg.box.core.activity import androidx.annotation.StyleRes @Target(AnnotationTarget.CLASS) annotation class Theme(@StyleRes val value: Int)
namespace ExtensionsForOneDrive { public class CloseLoginWindow { public CloseLoginWindow(bool continueProcessing) { this.ContinueProcessing = continueProcessing; } public bool ContinueProcessing { get; private set; } } }
// Copyright 2015 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. import 'dart:async'; import 'package:flutter/foundation.dart'; import 'debug.dart'; /// Whether the gesture was accepted or rejected. enum GestureDispo...
package org.mostlylikeable.gradle.kotlin.dsl import org.gradle.api.artifacts.ExternalModuleDependency import org.gradle.api.artifacts.dsl.DependencyHandler fun DependencyHandler.annotationProcessor(dependency: String) : Unit = addInternal("annotationProcessor", dependency) fun DependencyHandler.annotationProcess...
module diag_dom_utility contains subroutine to_diag_dom(n,m,A,out_status) !This routime checks if a given matriz A can be converted to diagonally !dominant form, and in case that is true, it makes the conversion and returns !the diagonally dominant matrix. ! !For the matrix to be convertible, tw...
unit dtinyatoi; // Tiny atoi() replacement. rlyeh, public domain | wtrmrkrlyeh // Ported to pascal by Doj {$MODE FPC} {$MODESWITCH DEFAULTPARAMETERS} {$MODESWITCH OUT} {$MODESWITCH RESULT} interface function tinyatoi(S: PAnsiChar): PtrInt; implementation function tinyatoi(S: PAnsiChar): PtrInt; var v, n: PtrInt...
import Pet from '../models/pet.model'; import SeedHelper from '../../core/helpers/seed.helper'; import moment from 'moment'; export default function () { return SeedHelper.cleanAndCreate(Pet, 'Pet', [ { _id: "580d84ee3731f70996579a65", name: 'Doggy', availableFrom: moment().add(-5, ...
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Hefezopf.Contracts.Communication { /// <summary> /// This service provide a fast way to communicate. /// </summary> [System.ServiceModel.ServiceContract(Namespace = ContractCon...
#if UNITY_EDITOR using UnityEditor; namespace Svelto.Tasks.Internal { #if UNITY_2017_2_OR_NEWER [InitializeOnLoad] class StopThreadsInEditor { static StopThreadsInEditor() { EditorApplication.playModeStateChanged += Update; } static void Update(PlayModeStateChan...
#include "system/System.hpp" #include "wrappers.hpp" using namespace cpb; template<class T> void wrap_registry(py::module& m, char const* name) { py::class_<T>(m, name) .def_property_readonly("name_map", &T::name_map) .def(py::pickle([](T const& r) { return py::dict("energies"_a=r.get_e...
<?php declare(strict_types=1); /** * BBB On Demand PHP VM Library * * Copyright (c) BBB On Demand * All rights reserved. * * MIT License * * 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 Softwa...
// pages/checkin/checkin_content/checkin_content.js // TODO: 日历上显示所有已打卡的日期 const app = getApp() Page({ /** * 页面的初始数据 */ data: { cur: '', // 当前名称 cur_id: 0, // 当前id uid: "3", // 用户ID motto: 'Hello World', userInfo: {}, hasUserInfo: false, canIUse: wx.canIUse('button.open-type.getU...
package com.coenvk.android.zycle.adapter import android.view.ViewGroup import androidx.annotation.LayoutRes import androidx.recyclerview.widget.RecyclerView import com.coenvk.android.zycle.ktx.inflate import com.coenvk.android.zycle.viewholder.ViewHolder internal sealed class ViewAdapter : Adapter() { override f...
module Activecube module CubeDefinition class DefinitionError < ::StandardError end class NamedHash < Hash def initialize cube, entry_class @cube = cube @entry_class = entry_class end def [] key v = super key v.nil? ? nil : @entry_class.new(@cube, key,...
if (Test-Path .\chess-results.csv) { Remove-Item .\chess-results.csv } python .\play_chess.py --search-depth 1 --max-children 1 --max-turns 999 python .\play_chess.py --search-depth 1 --max-children 5 --max-turns 999 python .\play_chess.py --search-depth 1 --max-children 10 --max-turns 999 python .\play_chess.py --...
require 'csv' instructor_ids = Instructable.pluck(:user_id).uniq.compact instructors = User.where(id: instructor_ids) CSV.open('instructors_contacts.csv', 'wb') do |csv| csv << ['InstructorName', 'ProfileEmail', 'AlternateEmail', 'Facebook', 'Twitter', 'WebPage'] instructors.each do |instructor| methods = i...
# DON'T EDIT ME! class Board attr_reader :rows def self.blank_grid Array.new(3) { Array.new(3) } end def initialize(rows = self.class.blank_grid) @rows = rows end def [](pos) row, col = pos[0], pos[1] @rows[row][col] end def []=(pos, mark) raise "mark already placed there!" unle...
# -*- shell-script -*- # gdb-like "next" (step through) commmand. # # Copyright (C) 2008, 2010, 2015, 2016 Rocky Bernstein rocky@gnu.org # # 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;...
const { build } = require('esbuild') build({ entryPoints: [ './src/extension.ts', './src/webview/form.ts', ], platform: 'node', external: ['vscode'], outdir: 'build', tsconfig: './tsconfig.json', bundle: true, watch: true, ...(process.env.NODE_ENV === 'production' ? { watch: false } : {...
# Sod Encryption util; two flavours: Sodium (preferred), or Sugar. ## Getting Started ```bash $ composer require ssitu/sod ``` ## How to ```php use SSITU\Sod\Sod; require_once '/path/to/vendor/autoload.php'; // Sod config: $sodConfig["cryptKey"] = '703af4dd03ebe11e35167157a8a697d8a2cb545a907a38289f8a7ba19432a34...
# -*- coding: utf-8 -*- root = File.dirname(__FILE__) + '/..' $:.unshift File.join(root, 'lib') require 'reblog_bot' job_type :reblog_bot, 'cd :path && bundle exec ruby reblog_bot.rb :task :output' @config = ReblogBot::Environment.instance.config @config[:accounts].each do |name, account| log_name = "log/#{name}....
# AMP-Toolbox Cache List Lists known AMP Caches, as available at `https://cdn.ampproject.org/caches.json`. By default, it uses a one-behind strategy to fetch the caches. This can be customised by passing a custom fetch strategy to the constructor. ## Usage ```javascript const Caches = require('amp-toolbox-cache-li...
using System.ComponentModel.DataAnnotations; namespace GeraFin.Models.ViewModels.Admin { public class AdminUserViewModel { [Required(ErrorMessage = "User Name Required")] public string UserName { get; set; } [Required(ErrorMessage = "User Email Required")] [EmailAddress(ErrorMe...
import 'package:firebase_auth/firebase_auth.dart'; import 'package:firebase_core/firebase_core.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'components/rounded_button.dart'; class splashScreen extends StatefulWidget { const splashScreen({Key? key}) : super(key: key)...
// Copyright 2021 Touca, Inc. Subject to Apache-2.0 License. export { ElementItemMetricComponent } from './metric.component'; export { ElementItemResultComponent } from './result.component'; export { ElementListMetricsComponent } from './metrics.component'; export { ElementListResultsComponent } from './results.compon...
<?php namespace App; use Illuminate\Database\Eloquent\Model; class GoodReceiveNoteItem extends Model { public $fillable = [ 'grn_id', 'po_item_id', 'order_quantity', 'receive_quantity' ]; public function purchaseOrderItem() { return $this->belongsTo(PurchaseOr...
#!/bin/sh export CC=/opt/rh/llvm-toolset-7.0/root/usr/bin/clang export CPP=/opt/rh/llvm-toolset-7.0/root/usr/bin/clang-cpp export CXX=/opt/rh/llvm-toolset-7.0/root/usr/bin/clang++ export PATH=/opt/rh/llvm-toolset-7.0/root/usr/bin:/opt/rh/llvm-toolset-7.0/root/usr/sbin${PATH:+:${PATH}} export LD_LIBRARY_PATH=/opt/rh/ll...
unit AqDrop.Core.Generics.Releaser; interface uses System.TypInfo; type TAqGenericReleaser = class strict private class var FImplementation: TAqGenericReleaser; private class procedure ReleaseImplementation; strict protected function DoTryToRelease(const pType: PTypeInfo; const pD...
module Mrt module Ingest class IngestException < RuntimeError end end end
#include "regutils.h" #include <memory> #include <strsafe.h> void Log(const wchar_t *format, ...); std::wstring RegUtil::GuidToString(const GUID &guid) { wchar_t guidStr[64]; HRESULT hr = ::StringCbPrintfW( guidStr, sizeof(guidStr), L"{%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}", guid.Data1, ...
require "vagrant" module VagrantPlugins module Cloudstack class Config < Vagrant.plugin("2", :config) # Cloudstack api host. # # @return [String] attr_accessor :host # Hostname for the machine instance # This will be passed through to the api. # # @return [String]...
__author__ = "Aadil Latif" __version__ = "1.0.0" __maintainer__ = "Aadil Latif" __email__ = "aadil.latif@nrel.gov" customer_types = { 0 : 'Residential', 1 : 'Small_Commercial', 2 : 'Large_Commercial', 3 : 'Large_Power', 4 : 'Motor_Load', 5 : 'Irrigation', 6 : 'Oil_and_Gas', 7 : '...
/* * Created on 29 Mar 2008 */ package uk.org.ponder.messageutil; /** A convenient exception class to contribute a {@link TargettedMessage} to the * current environment, without requiring to inject a particular * {@link TargettedMessageList}, or take particular responsibility for the * target. * * @...
--- ENTRYTYPE: inproceedings added: 2020-03-01 authors: - K. Rustan M. Leino booktitle: 2013 35th International Conference on Software Engineering (ICSE) doi: 10.1109/ICSE.2013.6606754 issn: 1558-1225 keywords: program verification;specification languages;Dafny programs;specification langauge;program verifier;program...
// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; using Microsoft.WindowsAzure.Storage; using Micro...
immutable PointwiseLayerState{P<:AbstractPointwise} <: AbstractScatteredLayerState blobs::Vector{Mocha.Blob} layer::PointwiseLayer{P} end function PointwiseLayerState( backend::Mocha.CPUBackend, layer::PointwiseLayer, inputs::Vector{Mocha.Blob}) blobs = Vector{Mocha.Blob}(le...
package ammonite.interp import acyclic.file import ammonite._ import ammonite.util._ import ammonite.util.Util.{windowsPlatform, newLine, normalizeNewlines} import fastparse.all._ import scala.reflect.internal.Flags import scala.tools.nsc.{Global => G} import collection.mutable /** * Responsible for all scala-sourc...
use cagra::graph; use std::fs; fn main() -> Result<(), failure::Error> { let mut g = graph!(f64, { let x = 1.0; let y = x * 2.0; let z = square(y); }); g.to_dot(&mut fs::File::create("init.dot")?)?; let z = g.get_index("z"); g.eval_value(z)?; g.to_dot(&mut fs::File::cre...
using Base: min, max export Rectangle, set!, intersect!, intersects, bounds!, contains_point # A two-dimensional axis-aligned rectangle. # # X-axis directed towards the right # # Y-Axis directed downward. # # left(X)/Top(Y) # *------------. --> X # | | | # | | v ...
while true do nvidia-smi -i 0 --query-gpu=timestamp,memory.total,memory.free,memory.used --format=csv | tail -n 1 sleep 1 done
import _ from 'lodash'; import { $try } from './utils'; export default class Bindings { templates = { // default: ({ field, props, keys, $try }) => ({ // [keys.id]: $try(props.id, field.id), // }), }; rewriters = { default: { id: 'id', name: 'name', type: 'type', value...
<?php use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class CreateFanDraftTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('fan_drafts', function (Blueprint $table) { ...
# TAC Participation ## Description This is the skill for participating in a TAC. This skill is part of the Fetch.ai TAC demo. It searches for a TAC on the sOEF, and if found, participates in the TAC by communicating with the controller agent. ## Behaviours * `tac_search`: searches for a TAC * `transaction_process...
#!/bin/bash ##################### # Message Functions # ##################### # Define colours BLUE='\033[1;34m' GREEN='\033[1;32m' RED='\033[1;31m' YELLOW='\e[1;93m' BOLD='\033[1m' NC='\033[0m' # No Color error(){ printf "$RED"'Error'"$NC"' ('"$GREEN"'%s'"$NC"'): %s\n' "$(basename $0)" "$@" } notice(){ pri...
/* Copyright 2021. 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 distributed un...
def calculate_sum_via_args(*args): result = 0 for number in args: result += number return result def add_two_numbers(first, second): return first + second def run_example(): numbers = [1, 2, 3, 4, 5, 6] result = calculate_sum_via_args(numbers) print(result) result = calcu...
val subProject = if (file("debug.txt").exists()) "debugging_debug" else "debugging_release" include(subProject)
package com.sweetrpg.catherder.api.impl; import com.sweetrpg.catherder.api.registry.ICasingMaterial; import net.minecraft.world.item.crafting.Ingredient; import net.minecraft.resources.ResourceLocation; import net.minecraft.network.chat.Component; import net.minecraft.network.chat.TranslatableComponent; public class ...
import os import gc import sys print(sys.path) import pickle import warnings import numpy as np import pandas as pd import datetime as dt from diamond import helpers as helper from diamond import utilities as util from copy import deepcopy from sklearn.preprocessing import StandardScaler CONFIG = util.load_config() ...
using System.Collections.Generic; using MithrilShards.Core.Shards; using MithrilShards.Example.Network.Client; namespace MithrilShards.Example { public class ExampleSettings : MithrilShardSettingsBase { const long DEFAULT_MAX_TIME_ADJUSTMENT = 70 * 60; public long MaxTimeAdjustment { get; set; } = ...
(function() { "use strict"; const coll = db.find5; coll.drop(); assert.writeOK(coll.insert({a: 1})); assert.writeOK(coll.insert({b: 5})); assert.eq(2, coll.find({}, {b: 1}).count(), "A"); function getIds(projection) { return coll.find({}, projection).map(doc => doc._id).sort(); ...
# frozen_string_literal: true require_relative '../../test_helper' class TestFakerKpop < Test::Unit::TestCase def setup @tester = Faker::Kpop end def test_i_groups assert @tester.i_groups.match(/\w+/) end def test_ii_groups assert @tester.ii_groups.match(/\w+/) end def test_iii_groups ...
#!/bin/bash set -e docker build -t invokit-web-test . echo Running on http://localhost:8080 docker run --rm -p 8080:80 invokit-web-test
package com.daimler.mbingresskit.implementation.filestorage import com.daimler.mbingresskit.filestorage.FileWriter import java.io.File internal class HtmlFileWriter : FileWriter<String> { override fun writeToFile(data: String, outFile: File): String? { val outStream = outFile.outputStream() outSt...
<# .Synopsis Requirements .Description Requirements Feature Modules .NOTES Author: Yi Website: http://fengyi.tel #> <# .Requirements .先决条件 #> Function Requirements { Clear-Host $Host.UI.RawUI.WindowTitle = "$($Global:UniqueID)'s Solutions | Prerequisites" Write-Host "`n Prerequisites`n --------...
package config import ( "os" "path" "github.com/pkg/errors" "github.com/spf13/viper" ) const ( availableContextsKey = "availableContexts" defaultContextKey = "defaultContext" credentialsStoreBackendKey = "credentialsStore.backend" credentialsStoreFilePassphrase = "credentialsStore....
require 'rails/generators/generated_attribute' module GeneratorUtils RAILS_ADDED_COLS = %w(id created_at updated_at) #TODO...There has GOT to be a better way to do this (column name gets listed first if it contains the word "name") ATTR_SORT_PROC = proc do |a, b| if a =~ /name/ 1 els...
// Portable Grid v0.7.3 // © 2018 Gus Cost // MIT license (function (r, f) { if (typeof exports === "object" && typeof module !== "undefined") { module.exports = f(require("react"), require("prop-types"), require("create-react-class")); } else if (typeof define === "function" && define.amd) { define(["rea...
<?php /** * PHP Parser and UML/XMI generator. Reverse-engineering tool. * * A package to scan PHP files and directories, and get an UML/XMI representation * of the parsed classes/packages. * The XMI code can then be imported into a UML designer tool, like Rational Rose * or ArgoUML. * * PHP version 5 * * @cat...
use crate::model::complex_types::{local_simple_type, top_level_simple_type}; // xsd:simpleType // Element information // Namespace: http://www.w3.org/2001/XMLSchema // Schema document: datatypes.xsd // Type: xsd:localSimpleType // Properties: Local, Qualified // // Used in // Anonymous type of element xsd:list // Anon...
# prezto-contrib [Prezto][1] is a configuration framework for zsh aimed at providing better defaults and other conveniences. However, to avoid feature bloat in the core repository, prezto-contrib was born. This repository is meant to include additional modules which are either not ready for inclusion in prezto-core or...
 namespace D_Parser.Dom { public interface IMetaDeclaration : ISyntaxRegion, IVisitable<MetaDeclarationVisitor> { } public interface IMetaDeclarationBlock : IMetaDeclaration { CodeLocation BlockStartLocation { get; set; } new CodeLocation EndLocation {get;set;} } public class AttributeMetaDeclaration : IM...
[ -n "$1" ] || { echo Node must be supplied ; exit 1;} [ -n "$2" ] || { echo PID must be supplied; exit 1; } list=$(invoke ssh ps-childs $1 $2) for i in $list do invoke ssh command $1 kill $i || echo Failed to kill $i done invoke ssh command $1 kill $2
using System; using System.Globalization; using System.IO; using System.Linq; using System.Text.RegularExpressions; using Unity.VectorGraphics; using UnityEngine; /// <summary> /// Tools for image processing /// </summary> namespace ImageUtils { /// <summary> /// Processes PNG and SVG images ...
<?php $table = Table::withContents($books->items())->striped() ->callback('Ações', function ($field, $book) { $linkEdit = route('books.edit', ['book' => $book->id]); $linkDestroy = route('books.destroy', ['book' => $book->id]); $linkChapters = route('chapters.index', ['book' => $book->id]); ...
import numpy as np def load_data(): data = np.loadtxt('input.csv', dtype='int32', delimiter=',') return data def find_noun_verb(data): for noun in range(0, 100): for verb in range(0, 100): d = np.array(data, copy=True) d[1] = noun d[2] = verb index = 0 while(True): cmd ...