text
stringlengths
27
775k
#coding=utf-8 from __future__ import division import os, os.path import zipfile import math from file_utils import * # 压缩文件夹 def ZipFile(dirname, zipfilename): fileList = FileUtils.GetAllFiles(dirname) zf = zipfile.ZipFile(zipfilename, "w", zipfile.zlib.DEFLATED) for index, tar in enumerate(fi...
<?php namespace App\Http\Controllers; use App\Admin; use App\Brand; use App\Banner; use App\User; use App\Order; use App\Seller; use App\Slider; use App\Product; use App\Promote; use App\Category; use App\Customer; use App\Coupon; use App\Subcategory; use App\Singlepage; use App\Categorybanner; use App\Undersubcatego...
import EmberObject, { computed } from '@ember/object'; export default EmberObject.extend({ initialState: null, currentState: computed({ get() { let name = this.get('initialState'); return this.get(name); }, set(_key, val) { return val; } }), transitionTo(path) { let curr...
# BAT大牛带你横扫初级前端JavaScript面试 ## 第1章 课程简介 ### 1-1 课程简介 基础知识 - 原型、原型链 - 作用域、闭包 - 异步、单线程 JS API - DOM 操作 - Ajax - 事件绑定 开发环境 - 版本管理 - 模块化 - 打包工具 运行环境 - 页面渲染 - 性能优化 ### 1-2 前言 关于面试 - 基层工程师 - 基础知识 - 高级工程师 - 项目经验 - 架构师 - 解决方案 关于基础 - 工程师的自我修养 - 基础 - 扎实的基...
/* Copyright 2019-2020 Netfoundry, 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 https://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, softw...
--- region: CEWA country: Nigeria name: Rights Monitoring Group (RMG) acronym: RMG is_member: yes no_gndem_member_countries: regional_network: website: http://rightsgroup.org/about-us/ ---
<?php namespace App; use Illuminate\Database\Eloquent\Model; class Speedometer extends Model { protected $tables = 'speedometers'; protected $fillable = [ 'baku_mutu', 'emisi_sumber', 'udara_ambient', 'no_incident', 'impact', 'unique_id', ]; }
class BodyTypeController < ApplicationController def index @body_types = BodyType.all.includes(:bodies) end def show @body_type = BodyType.find(params[:id]) @bodies = Body.where(body_type: @body_type).order("name ASC") end end
package slack import ( "fmt" "github.com/slack-go/slack" "gopkg.in/yaml.v2" "io/ioutil" "os" ) type conf struct { Token string `yaml:"slack_api_token"` Channel string `yaml:"slack_channel"` } func UploadFile(configFilePath,reportFilePath string) error { c, err := GetCredentials(configFilePath) if err != ...
/* * @test /nodynamiccopyright/ * @bug 8003280 * @summary Add lambda tests * speculative cache contents are overwritten by deferred type-checking of nested stuck expressions * @compile/fail/ref=MostSpecific07.out -XDrawDiagnostics MostSpecific07.java */ import java.util.*; class MostSpecific07 { interface ...
<?php namespace App\Observers; use App\Jobs\TaskReminder; use App\Mail\TaskCreatedMail; use App\Models\Task; use App\Notifications\SampleNotification; use Carbon\Carbon; use Illuminate\Support\Facades\Mail; use Illuminate\Support\Facades\Storage; use PharIo\Manifest\Email; class TaskObserver { public function c...
import { R5_BackboneElement } from './R5_BackboneElement' import { R5_DeviceMetricCalibrationStateEnum } from './R5_DeviceMetricCalibrationStateEnum' import { R5_DeviceMetricCalibrationTypeEnum } from './R5_DeviceMetricCalibrationTypeEnum' import { R5_DomainResource } from './R5_DomainResource' export class R5_DeviceM...
# This file is a part of Simple-XX/SimpleKernel (https://github.com/Simple-XX/SimpleKernel). # # bochs.sh for Simple-XX/SimpleKernel. #!/bin/bash if ! [ -x "$(command -v pkg-config)" ]; then echo 'Error: pkg-config is not installed.' exit 1 elif ! [ -x "$(command -v sdl2)" ]; then echo 'Error: sdl2 is no...
package me.hvkcoder.java_basic.java8.lambda; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.function.Function; /** * java.util.function.Function<T, R> 接口定义了一个 apply 方法,它接受一个泛型 T 对象,并返回一个泛型 R 的对象 * * <p>如果需要定义一个 Lambda ,将输入对象的信息映射到输出,就可以使用该接口 * * @author h-vk * @sinc...
%%%------------------------------------------------------------------- %%% @author halid %%% @copyright (C) 2015, <COMPANY> %%% @doc %%% %%% @end %%% Created : 26. Sep 2015 1:30 PM %%%------------------------------------------------------------------- -module(tk_lib). -author("halid"). %% API -export([read_file/1]). -...
trait Expr { type T } def foo[A](e: Expr { type T = A }) = e match case e1: Expr { type T <: Int } => // error: type test cannot be checked at runtime val i: Int = ??? : e1.T
/* * Copyright 2019 The Starlark in Rust Authors. * Copyright (c) Facebook, Inc. and its affiliates. * * 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/lic...
// ========================================================================== // NumberField.cs // Squidex Headless CMS // ========================================================================== // Copyright (c) Squidex Group // All rights reserved. // ===========================================================...
extern crate bincode; extern crate core; extern crate libc; extern crate rustler; extern crate serde; extern crate siphasher; mod atoms; mod bindings; mod nif; rustler::init!("crypt3_nif", [nif::encrypt], load = nif::on_load);
2020年08月14日15时数据 Status: 200 1.张雨绮光脚跳屋顶着火 微博热度:2774989 2.央视再评大胃王吃播 微博热度:1192961 3.郑恺带了一朵什么花 微博热度:1192815 4.吴亦凡保安 微博热度:1191329 5.乘风破浪的姐姐复活换位战 微博热度:1170938 6.陕西镇安回应7.1亿建豪华中学 微博热度:717676 7.警方通报女游客无故推倒景区设施 微博热度:573278 8.全球43%的学校缺基本洗手设施 微博热度:482843 9.商务部发文称将开展数字人民币试点 微博热度:475141 10.阿朵缘分一道桥 鸡皮疙瘩 微博热度:4744...
<?php namespace Chamilo\Core\Home\Rights; use Chamilo\Libraries\Architecture\Application\Application; use Chamilo\Libraries\Format\Structure\BreadcrumbTrail; /** * Manager for the components * * @author Sven Vanpoucke - Hogeschool Gent */ abstract class Manager extends Application { // Parameters const P...
<?php /** * Created by JetBrains PhpStorm. * User: thuan * Date: 4/29/14 * Time: 8:39 AM * To change this template use File | Settings | File Templates. */ namespace Goxob\Catalog\Model; use Goxob\Core\Model\Model; class Vendor extends Model{ protected $table = 'vendor'; protected $primaryKey = 'vendo...
--- name: Bug report about: Report a bug in the software labels: bug --- **Description** <!-- Please provide a clear and concise description of what the bug is. --> **Steps To Reproduce** <!-- Please provide instructions on how to reproduce the bug. --> 1. 2. 3. 4. **Expected Behavior** <!-- Please prpovide ...
#!/usr/bin/env python3 # The following line will rename a file import shutil import os os.chdir('/home/student/mycode/') shutil.move('raynor.obj', 'ceph_storage/') xname = input('What is the new name for kerrigan.obj? ') shutil.move('ceph_storage/kerrigan.obj', 'ceph_storage/' + xname)
import { isLeafNode } from '../../common-utils' import { transformColumn } from '../utils' export default function visible(visibleCodes: string[]) { const set = new Set(visibleCodes) return transformColumn((column) => { if (!isLeafNode(column)) { return column } return set.has(column.code) ? colu...
package persistence import ( "bytes" "encoding/gob" "github.com/google/uuid" . "ivory/model" ) type CredentialRepository struct { common common secretBucket []byte credentialBucket []byte encryptedRefKey string decryptedRefKey string } func (r CredentialRepository) UpdateRefs(encrypted strin...
@if (Auth::guard('org')->check()) @include('partials.org-nav-links') @else @include('partials.vol-nav-links') @endif
# encoding: UTF-8 class Preference < ActiveRecord::Base belongs_to :reviewer belongs_to :track belongs_to :audience_level has_one :user, through: :reviewer validates :accepted, inclusion: {in: [true, false]}, reviewer_track: {if: :accepted?} validates :reviewer, existence: true validates :audience_leve...
<?php namespace Error; /** * 4xx User errors. */ abstract class User extends HttpException { public function __construct(int $code = 400, $message = null, \Throwable $reason = null) { parent::__construct($code, $message, $reason); } }
# coconutchain 一个用来学习的区块链实现 # 编译 ``` mvn clean compile assembly:single ``` 上面的命令会把所有依赖库都打包在一个jar中 # 运行 ``` java -jar target/coconut-chain-1.0-SNAPSHOT-jar-with-dependencies.jar ``` # 使用的第三方库 * [Spark](https://github.com/perwendel/spark) 一款轻量级的web框架,用来对外提供REST接口 * [Bouncy Castle](http://bouncycastle.org/java.html)...
using System; using System.Collections.Generic; namespace Bakery { public class Pastry { public int QuantityPastry { get; set;} public int TotalPastry { get; set;} public int PerPastry { get; set; } public Pastry(int quantityPatry, int totalPastry) { Qu...
using HyperFabric.Logging; namespace HyperFabric.Factories { internal interface ILoggingFactory { ILogger Create(string[] names); } }
<?php namespace App\Http\Controllers; use App\Service; use App\SubService; use Carbon\Carbon; use Illuminate\Http\Request; use Illuminate\Support\Facades\Auth; class ServiceController extends Controller { /** * Display a listing of the resource. * * @return \Illuminate\Http\Response */ pu...
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
var ejs = require('ejs'); var SprintModel = function (params) { this.log = function(message) { if (this.params.debug) { console.log(message); } }.bind(this);; this.get = function (param) { return this.params[param]; }.bind(this); this.set = function(param, value) { this.params[param]...
using ScriptableObjectArchitecture.Utility; using UnityEngine; namespace ScriptableObjectArchitecture.Collections { [CreateAssetMenu( fileName = "IntCollection.asset", menuName = SoArchitectureUtility.COLLECTION_SUBMENU + "int", order = SoArchitectureUtility.ASSET_MENU_ORDER_COLLECTIONS + 4...
package bridges.core trait Renderer[A] { def render(decl: DeclF[A]): String def render(decls: List[DeclF[A]]): String = decls.map(render).mkString("\n\n") }
require_relative 'helpers' class TestTaskList < IWNGTest def test_task_list tasks = client.tasks.list() code_names = {} tasks.each do |t| puts "#{t.code_name} - #{t.status}" code_names[t.code_name] ||= 0 code_names[t.code_name] += 1 end puts "num codes: #{code_names.size}" ...
namespace YunXun.Entity { /// <summary> /// Defines the <see cref="BaseEntity{Tkey}" />. /// </summary> /// <typeparam name="Tkey">.</typeparam> public class BaseEntity<Tkey> : IEntity<Tkey> { /// <summary> /// Gets or sets the id. /// </summary> public Tkey id {...
import { Callable, Constructor, isObject } from '../reflectable'; import { Expression, Property, getProperty } from '../property'; import { Observable, isObservable } from './observable'; /** * Observables factory. */ export class ObservableFactory { /** * @param PropertyConstructor - Observable property constr...
<?php class Controller { const APP_URL = "localhost/index.php"; private $vars = []; private $notification = []; public function getVars() { return $this->vars; } public function hasNotification(){ return !empty($this->notification); } public function GetNotificationLevel() { return $this->not...
import { Quota, QuotaManager } from '../src'; import { sleep } from '../src/util'; import test from 'ava'; test('invocations are logged', async t => { const quota: Quota = { rate: 3, interval: 500, concurrency: 2 }; const qm: QuotaManager = new QuotaManager(quota); t.true(qm.start(1), 'should start job 1'); ...
from setuptools import setup install_requires = [ 'rdflib', 'lepl', 'lxml', 'six', ] schemato_validators = [ 'rnews=schemato.schemas.rnews:RNewsValidator', 'opengraph=schemato.schemas.opengraph:OpenGraphValidator', 'schemaorg=schemato.schemas.schemaorg:SchemaOrgValidator', 'schemaorg_r...
function all() { var f = confirm("Are you sure you want to make changes to this website? Please note changes will not be immediate"); if (f == false) { exit(); } else { while (true) { var name = prompt("What is your name? (Optional)"); var subject = prompt("What is the subject you would like to fix?"); v...
package org.dstadler.csv.fuzz; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; import java.nio.charset.StandardCharsets; import org.junit.jupiter.api.Test; import com.code_intelligence.jazzer.api.FuzzedDataProvider; class FuzzComplexTest { @Test public void test() { FuzzedDataPr...
import 'package:dlxapp/apps/saucetv/MediaController.dart'; import 'package:dlxapp/apps/saucetv/components/PlaybackControls.dart'; import 'package:flutter/material.dart'; import 'package:flutter/physics.dart'; import 'package:flutter/widgets.dart'; import 'package:logger/logger.dart'; import 'package:provider/provider.d...
% Acting on Data The patterns for Acting on Data provide solutions for performing actions on lists of data, individual data objects, and object metadata. You may enable these actions in the Action Bar of any panel within your app. The Action Bar provides a consistent location for actions performed in the context of...
<?php use TheClinicDataStructures\DataStructures\User\DSUser; $privileges = [ "accountsRead", "accountRead", "selfAccountRead", "accountCreate", "accountDelete", "selfAccountDelete", "accountUpdate", "selfAccountUpdate", "selfLaserOrdersRead", "selfLaserOrderCreate", "...
DO $$ BEGIN IF EXISTS (SELECT 1 FROM information_schema.columns WHERE table_schema=current_schema AND table_name = 'encrypted_secret' AND column_name = 'secret_type') THEN ALTER TABLE "encrypted_secret" ALTER COLUMN "secret_type" type VARCHAR(255); END IF; END; $$
[VisibleToOtherModulesAttribute] // RVA: 0xC1B30 Offset: 0xC1C31 VA: 0xC1B30 internal enum CodegenOptions // TypeDefIndex: 2766 { // Fields public int value__; // 0x0 public const CodegenOptions Auto = 0; public const CodegenOptions Custom = 1; public const CodegenOptions Force = 2; }
print "Wpisz wartość liczby a: " a = gets.chomp().to_f print "Wpisz wartośc liczby b: " b = gets.chomp().to_f def nwd(k, n) while k != n if k > n k -= n else n -= k end end return k end def nww(k, n) result = nwd(k, n) return (k * n) / result end pu...
// import action constants import { PAGE_SET_DB_SOURCE, PAGE_PAGINATE, PAGE_PAGINATE_NETWORK_BEGINN, PAGE_PAGINATE_NETWORK_END, PAGE_PROCESS_ARTICLES_SUCCESS, PAGE_RELOAD, PAGE_RELOAD_FINISHED, PAGE_REQUEST, PAGE_REQUEST_FAILURE, PAGE_REQUEST_SUCCESS } from './../actions/pages'; import {PAGE_PROCESS_ARTICLE...
module Aula13 where import Control.Applicative -- um data constructor com value constructor de mesmo nome, -- dois campos usando record syntax data Produtoz = Produtoz {produtozNome :: String, produtozValor :: Double } deriving Show -- EX. 1 (COBRAR MEIO PONTO N...
enumerate start length = if length == 0 then [] else start : enumerate (start + 1) (length - 1) main = do print $ enumerate 6 10
--- layout: post title: Dark theme comments: false --- <p style="text-align:justify;"> Add dark theme to my webpage. </p> The website contains a slider allowing user to switch between **light** ore **dark** theme: ```html <label class="theme-switch" for="checkbox"> <input type="checkbox" id="checkbox" /> <div cl...
require 'vagrant/plugins/berkshelf/vagrant' module Berkshelf module Vagrant class Plugin < ::Vagrant.plugin("2") name "berkshelf" description <<-DESC Automatically make available cookbooks to virtual machines provisioned by Chef Solo or Chef Client using Berkshelf. DESC [:m...
use schemars::JsonSchema; use serde::{Deserialize, Serialize}; use cosmwasm_std::{Binary, CosmosMsg, CustomQuery, HumanAddr, QueryRequest}; #[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] pub struct InitMsg {} #[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] #[serde(renam...
using System.Collections.Generic; using UnityEngine; public static class CreateCurvedMeshBake { public static Mesh BakedMesh(CreateCurvedGrass.MeshCluster cluster, int maxAllowedVertices) { Mesh baseMesh = cluster.clusterMesh; float clusterArea = cluster.clusterArea; float clusterHeigh...
package encoder import ( "log" "github.com/giongto35/cloud-game/v2/pkg/encoder/yuv" ) type VideoPipe struct { Input chan InFrame Output chan OutFrame done chan struct{} encoder Encoder // frame size w, h int } // NewVideoPipe returns new video encoder pipe. // By default it waits for RGBA images on the...
<!-- Sidebar menu--> <div class="app-sidebar__overlay" data-toggle="sidebar"></div> <aside class="app-sidebar"> <!-- Images --> <div class="app-sidebar__user"> <img class="app-sidebar__user-avatar" src="<?php echo base_url() ?>assets/images/logo.png" alt="Rental Mobil"> <div> <p class="app-sidebar__user...
--- title: Backpropagation localeTitle: 反向传播 --- ## 反向传播 Backprogapation是[神经网络](../neural-networks/index.md)的子主题,是计算网络中每个节点的梯度的过程。这些梯度测量每个节点对输出层有贡献的“误差”,因此在训练神经网络时,这些梯度被最小化。 注意:反向传播和机器学习一般需要非常熟悉线性代数和矩阵操作。在尝试理解本文的内容之前,强烈建议您阅读或阅读此主题。 ### 计算 反向传播的过程可以分三个步骤来解释。 鉴于以下内容 * m个L层神经网络的训练样例(x,y) * g = sigmoid函数 * Thet...
/* * Copyright 2021 IBM Corp. * SPDX-License-Identifier: Apache-2.0 */ package org.apache.spark.sql.execution.datasources.xskipper import io.xskipper.Registration import io.xskipper.configuration.XskipperConf import io.xskipper.metadatastore.MetadataStoreManager import io.xskipper.search.{DataSkippingFileFilter, D...
using System; namespace cv19ResSupportV3.V3.Domain.Commands { public class CreateHelpRequestCall { public int HelpRequestId { get; set; } public string CallType { get; set; } public string CallDirection { get; set; } public string CallOutcome { get; set; } public DateTim...
module ResearchMetadata # Semantic version number # VERSION = "2.1.0" end
/** * This file is part of Aion-Lightning <aion-lightning.org>. * * Aion-Lightning 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 of the License, or * (at your option) any later ver...
//----------------------------------------------------------------------- // <copyright file="DialogStateMachine.cs" company="Lost Signal LLC"> // Copyright (c) Lost Signal LLC. All rights reserved. // </copyright> //----------------------------------------------------------------------- namespace Lost { usin...
# Component card Membership hero component ## License Copyright (c) 2021 Co-operative Group Limited. Licensed [MIT](https://github.com/coopdigital/coop-frontend/blob/master/LICENSE).
from __future__ import print_function import os import shutil import six import numpy as np from stompy.io.local import cimis # os.environ['CIMIS_KEY']='FILL_THIS_IN' def test_cimis(): """ Fetch CIMIS data for station 171. This requires a network connection and defining CIMIS_KEY (freely available applic...
# Updatable Timer Sample A helper structure that supports blocking sleep that can be rescheduled at any moment. Demonstrates: * Timer and its cancellation * Signal Channel * Selector used to wait on both timer and channel ### Steps to run this sample: 1) You need a Temporal service running. See details in README.m...
package com.linkedin.android.tachyon data class DayViewConfig( val startHour: Int, val endHour: Int, val dividerHeight: Int, val halfHourHeight: Int, val hourDividerColor: Int, val halfHourDividerColor: Int, val hourLabelWidth: Int, val hourLabelMarginEnd...
# frozen_string_literal: true module API module Entities class Environment < Entities::EnvironmentBasic include RequestAwareEntity include Gitlab::Utils::StrongMemoize expose :project, using: Entities::BasicProjectDetails expose :last_deployment, using: Entities::Deployment, if: { last_d...
s = Runners::Testing::Smoke default_version = Runners::VERSION s.add_test_with_git_metadata( "success", { type: "success", issues: [ { id: "metrics_fileinfo", path: "hello.rb", location: nil, message: "hello.rb: loc = 7, last commit datetime = 2021-01-01T10:00:00+09:00", ...
use super::{Window, WindowId}; use bevy_utils::HashMap; #[derive(Default)] pub struct Windows { windows: HashMap<WindowId, Window>, } impl Windows { pub fn add(&mut self, window: Window) { self.windows.insert(window.id, window); } pub fn get(&self, id: WindowId) -> Option<&Window> { s...
using BehaviorDesigner.Runtime.Tasks; namespace Module { public class AgentConditional : Conditional, IAgentAction { public float GetArgs(int index) { return ((AgentBehaviorTree) this.Owner.ExternalBehavior).args[index]; } } }
import 'package:json_annotation/json_annotation.dart'; part 'prediction_stats.g.dart'; @JsonSerializable() class PredictionStats { String? databaseName; String? collectionName; double? avgObjectSize; int? dataSize; Map<String, int>? indexSizes; Map<String, int>? objectCounts; int? objectCount; bool? ...
unit Test.REST.Base; interface uses DUnitX.TestFramework, nePimlico.REST.Types; type [TestFixture] TTestRESTBase = class(TObject) private fREST: IPimlicoRESTBase; public [SetupFixture] procedure setupFixture; [Test] procedure request; end; implementation uses nePimlico.REST.Base,...
class C def to_str puts 'to_str' 'xxx' end end class Regexp def =~(*args) puts "=~#{args}" end def !~(*args) puts "=~#{args}" end end c = C.new puts '-- match' /foo/ =~ c puts '-- not match' /foo/ !~ c
--- layout: default title: frontpage description: DIVD --- <!-- Highlights --> <header class="special"> <h2>our mission</h2> <p>We aim to make the digital world safer by reporting vulnerabilities we find in digital systems to the people who can fix them. We have a global reach, but do it Dutch style: open, hone...
One should use the equivalent file from the sample platform as an example. The pdn.cfg file defines rules used to generate the power grid of designs on this platform. This must be manually adjusted based on the user’s preference, as well as the underlying technology.
<?php /** * Copyright © 2013-2017 Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ namespace Magento\Catalog\Model\Product\Edit; class WeightResolver { /** * Product has weight */ const HAS_WEIGHT = 1; /** * Product don't have weight */ const HAS_NO_...
#!/usr/bin/env bash set -e # Copyright (c) 2019 Anton Semjonov # Licensed under the MIT License # input and output INFILE=${1:?input file required} OUTDIR=${2:?output directory required} OUTFILE="${OUTDIR}/$(basename "${INFILE}")" # ocrmypdf location OCRMYPDF=${OCRMYPDF:-/appenv/bin/ocrmypdf} # ocrmypdf options OPT...
module Wordle.Validation (checkGuess, Checked) where import Data.List (elemIndex) import Data.Maybe (isJust) import Wordle.State (Checked (..), GameState (guess, word)) checkChar :: GameState -> Char -> Checked checkChar state c | isInWord && indexInGuess == indexInWord = CGreen c | isInWord && indexInGuess /= in...
#!/usr/bin/perl #RedRep Utility fastq2fasta.pl #Copyright 2016 Shawn Polson, Keith Hopper, Randall Wisser #reads from stdin $i=0; while(<>) { if(/^\@/&&$i==0) { s/^\@/\>/; print; } elsif($i==1) { print; $i=-3; } $i++; }
using System; using System.Collections.Generic; using TestStack.Dossier.DataSources.Generators; namespace TestStack.Dossier.DataSources.Picking { /// <summary> /// Implements the repeatable sequence strategy /// </summary> public class RepeatingSequenceSource<T> : DataSource<T> { ...
<?php namespace App\Http\Controllers; use Illuminate\Support\Facades\DB; use App\Models\Guild; use Inertia\Inertia; class GuildController extends Controller { public function allGuilds() { } public function getGuildById($id) { return Inertia::render('Guild', [ 'guild' => Gui...
import axios from 'axios'; import { API_URL } from '../constants/index'; export const apiService = axios.create({ baseURL: API_URL });
import { Module } from '@nestjs/common'; import { RoomsController } from './rooms.controller'; import { RoomsService } from './rooms.service'; import { TypeOrmModule } from '@nestjs/typeorm'; import { RoomRepository } from './room.repository'; import { FacilityRepository } from '../facility/facility.repository'; ...
module HealthMonitor class Configuration attr_accessor :providers, :error_callback, :basic_auth_credentials def initialize @providers = [:database] end end end
#! /bin/bash wget https://packages.erlang-solutions.com/erlang-solutions-1.0-1.noarch.rpm rpm -Uvh erlang-solutions-1.0-1.noarch.rpm rpm --import https://packages.erlang-solutions.com/rpm/erlang_solutions.asc rpm --import https://packagecloud.io/rabbitmq/rabbitmq-server/gpgkey rpm --import https://packagecloud.io/gpg.k...
package com.katana.koin.data.local.db import androidx.lifecycle.LiveData import com.katana.koin.data.local.db.entities.Mail import com.katana.koin.data.local.db.entities.Member import io.reactivex.Observable interface DbHelper { fun getAllMember(): List<Member> fun insertMember(member: Member): Observable<L...
--- title: Pallindromic array date: 2019-09-30 author: varuntheruler categories: - Data Structures - arrays --- ### PALINDROMIC ARRAY #### programme description: <br> You are given an array of size n. Your task is to find an the minimum number of operations to convert the given array to palindromic array. ...
package types import ( "reflect" . "github.com/101loops/bdd" ) var _ = Describe("Query", func() { It("should initialize", func() { qry := NewQuery("my-kind") Check(*qry, Equals, Query{ Filter: make([]Filter, 0), Order: make([]Order, 0), TypeOf: FullQuery, kind: "my-kind", Limit: -1, }) ...
var playerContainer_; var player_ = null; var playerContext_ = {}; var playerUI_ = null; var isEnableAnalyticsOverlay = true; var analyticsInfo; // UI Elements var nIntervId; var idAnalyticsOverlay = null; var idAnalytics_playerVersion = null; var idAnalytics_startupTime = null; var idAnalytics_playTime = null; var i...
# SEGY reader ### Designed to be a very light weight seismic reader that is easy and flexible. Because of the history of SEGY standard there have been lots of places where people tended to use as default byte positions and data formats, For that reason we do minimal (no) checking to make sure the bit positions h...
import Data from './Data'; import {API_URL} from '../constants'; class NewsData { static getAll(page = 1, limit = 5, langId = 1) { return Data.get(`${API_URL}news/list?page=${page}&limit=${limit}&langId=${langId}`); } static getNewsDetails(id, langId = 1) { return Data.get(`${API_URL}news/view?id=${id...
import { injectable } from 'inversify' import fetch from 'cross-fetch' import { gaTrackingId, logger } from '../../../config' import IGaPageViewForm from '../ga/types/IGaPageViewForm' import { generateCookie } from '../ga' const gaEndpoint = 'https://www.google-analytics.com/collect' @injectable() export class Analyt...
import sys import torch from args import get_argparser, parse_args, get_aligner, get_bbox from os.path import join if __name__ == '__main__': parser = get_argparser() parser.add_argument('--align_start', help='align without vector voting the 2nd & 3rd sections, otherwise copy them', action='store_true') ar...
<?php include "connection.php"; // Group by year $month = array(); $year = array(); $region = array(); $season = array(); $table_name="disease"; # dengue_cases if(!isset($disease['Dengue_Cases'])){ $dengue_cases = array(); $query1="select Month, AVG(Dengue_Cases) as avgdeng from ".$table_name." GROUP...
using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEditor; public class EndNode : BaseNode { private void OnEnable() { AddInput(); } public override void SetWindowRect(Vector2 mousePos) { width = 100; height = 80; WindowTitle...
import numpy as np from MSnet.cfp import cfp_process from MSnet.utils import get_split_lists, get_split_lists_vocal, select_vocal_track, csv2ref import argparse import h5py import pickle def seq2map(seq, CenFreq): CenFreq[0] = 0 gtmap = np.zeros((len(CenFreq), len(seq))) for i in range(len(seq)): f...