text
stringlengths
27
775k
=begin @author: aaditkamat @date: 07/01/2019 =end def fibonacci_recursive_value(num, array, ctr) if num < 1 return "Incorrect num #{num} for fibonacci sequence" end if num == 1 or num == 2 array[num - 1] = 1 return array[num - 1] end if array[num - 2] != 0 and array[num - 1] != 0 return array...
use swc_ecma_ast::*; use swc_ecma_visit::{noop_fold_type, Fold, FoldWith}; /// Converts destructured parameters with default values to non-shorthand /// syntax. This fixes the only arguments-related bug in ES Modules-supporting /// browsers (Edge 16 & 17). Use this plugin instead of /// @babel/plugin-transform-paramet...
# Spicy Chili Cheese Dip ## Ingredients - 8 oz cream cheese (1 brick) - 15 oz chili (1 can) - 4 oz pepperjack cheese, shredded - tortilla chips ## Directions Preheat oven to 350° F. In a 13x9 inch baking pan spread cream cheese in a flat layer across the bottom. Add chili and spread across the top of the cream che...
#!/usr/bin/env bash set -eux pytest python transitions_example.py jupyter nbconvert --execute README.ipynb rm README.html
import express from "express"; import { getUserController, loginController, signupController } from "../controller/user.js"; import { auth } from "../auth.js"; const userRouter = express.Router(); userRouter.use((req, res, next) => { req.endpoint = "/user"; next(); }); userRouter.get("/", auth, getUserController...
class Invite < ApplicationRecord belongs_to :rescue_action belongs_to :rescuer enum status: [:unanswered, :accepted, :denied] end
import "./index.scss"; import { render } from "react-dom"; import { BrowserRouter } from "react-router-dom"; import { ApplicationProvider } from "@providers/application-provider"; import { Routes as RouterLoader } from "@providers/application-provider/routes"; import { ModelProvider, useRootStore } from "@providers/mod...
import _ from 'the-lodash'; import { Context } from '../context'; import { Router } from '@kubevious/helper-backend'; import Joi from 'joi'; import { SearchQuery } from '../types'; export default function (router: Router, context: Context) { router.url('/api/v1/diagram'); router .get('/node', functio...
import { CornerstoneImage, CornerstoneSingleImage, DCMImage, installWADOImageLoader, unloadWADOImage, withInsightViewerStorybookGlobalStyle, } from '@lunit/insight-viewer'; import { withOPTComponentsStorybookGlobalStyle } from '@lunit/opt-components'; import React, { useMemo } from 'react'; installWADOImag...
package main import ( "context" "net/http" "net/http/httptest" "github.com/stretchr/testify/mock" "github.com/xmidt-org/wrp-go/v3" "github.com/xmidt-org/wrp-go/v3/wrphttp" ) type mockWRPAccessAuthority struct { mock.Mock } func (m *mockWRPAccessAuthority) authorizeWRP(ctx context.Context, message *wrp.Messag...
mirpipe.pl -file ./data/test.fastq -ref ./data/mirbase20_mature.fa DIFF=$(diff target.output mirpipe_mirna.tsv) if [ "$DIFF" != "" ] then echo "Automatic test failed. Please check the content of mirpipe_mirna.tsv manually." fi if [ "$DIFF" == "" ] then echo "Automatic testing was successful. You are ready to ...
--- layout: post microblog: true date: 2016-11-11 19:38 +1300 guid: http://JacksonOfTrades.micro.blog/2016/11/11/t796965199567720448.html --- Well, I ran into its owners on the way back. Apparently it does this a lot.
package com.vanniktech.maven.publish.tasks import org.gradle.jvm.tasks.Jar @Suppress("UnstableApiUsage") open class EmptySourcesJar : Jar() { init { archiveClassifier.set("sources") } }
#include <assert.h> #include <tbb/parallel_for.h> #include <vector> // for test sample only; class Solution { public: bool isPerfectSquare(const int num) { int lower = 1; int upper = num; while (1 < upper - lower) { const size_t mid = (lower + upper) / 2; if (mid * mid < num) lower...
"use strict"; const express = require( "express" ); const expressApp = express(); const compression = require( "compression" ); const cookieParser = require( "cookie-parser" ); const bodyParser = require( "body-parser" ); const lager = require( "properjs-lager" ); const csurf = require( "csurf" ); const listeners = ...
from typing import List from pydantic import BaseModel, Field from aos_sw_api.enums import Dot1xAuthenticatorPortControlEnum, Dot1xControlledDirectionEnum from aos_sw_api.globel_models import CollectionResult class Dot1xModel(BaseModel): is_dot1x_enabled: bool cached_reauth_delay: int = Field(..., ge=0, le=...
{-# LANGUAGE TypeOperators, FlexibleContexts, FlexibleInstances, MultiParamTypeClasses #-} module SessionCheck.Backend.TCP.Instances where import SessionCheck.Backend.TCP.Types import SessionCheck.Classes instance [Char] :< TCPMessage where inj = TCPMessage prj = Just . unTCPMessage
use strict; use warnings; use Net::EmptyPort qw(check_port empty_port); use Test::More; use t::Util; my $upstream_port = empty_port(); my $upstream = spawn_server( argv => [ qw(plackup -s Starlet --access-log /dev/null -p), $upstream_port, ASSETS_DIR . "/upstream.psgi", ], is_ready => sub { ...
import { StateService } from '../state/state.service'; import { NotifyEnum } from '../enum/notify.enum'; export function notify (tittle : string , msg : string ,type:NotifyEnum , time : number ) { StateService.$emit('notify', {tittle, msg,type, time}); };
<!-- Thank you for helping to improve pre-commit-terraform! --> Put an `x` into the box if that apply: - [ ] This PR introduces breaking change. - [ ] This PR fixes a bug. - [ ] This PR adds new functionality. - [ ] This PR enhances existing functionality. ### Description of your changes <!-- Briefly describe what ...
package io.testaxis.intellijplugin.models import com.intellij.icons.AllIcons import javax.swing.Icon enum class BuildStatus { SUCCESS { override val icon get() = AllIcons.General.InspectionsOK }, BUILD_FAILED { override val icon get() = AllIcons.General.Warning }, TESTS_FAILED { ...
define({ "defaultAreaUnit": "Standard arealenhet", "defaultLengthUnit": "Standard lengdeenhet", "acres": "Acre", "sqMiles": "mile²", "sqKilometers": "km²", "hectares": "Hektar", "sqYards": "yard²", "sqFeet": "fot²", "sqFeetUS": "fot² (USA)", "sqMeters": "m²", "miles": "Miles", "kilom...
<div {!! $attributes->merge($attrs) !!}> @if(!isset($_header['hide']) && (!empty($_header) || isset($header))) <div class="card-header {{ $_header['class'] ?? '' }}" {!! $_header['id'] ?? '' !!}> @if(!empty($_header['headline'])) <x-headline :all="$_header['headline']"/> @endif {!! $_he...
<?php /** * Created by PhpStorm. * User: alex * Date: 12.09.18 * Time: 9:52 */ namespace frontend\assets; class SidebarAsset extends FrontAsset { public $js = [ 'js/jquery.sticky-sidebar.js', ]; public $depends = [ 'frontend\assets\AppAsset' ]; }
/* * 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 ...
import { ARCCookie as LegacyARCCookie } from './legacy/models/Cookies.js'; export type CookieSameSiteType = 'unspecified' | 'no_restriction' | 'lax' | 'strict'; export type CookieChangeReason = 'explicit' | 'overwrite' | 'expired' | 'evicted' | 'expired-overwrite'; // eslint-disable-next-line no-control-regex const fi...
module ActiveData module Model module Attributes module Reflections class Represents < Attribute def self.build(target, generated_methods, name, *args, &block) options = args.extract_options! reference = target.reflect_on_association(options[:of]) if target.respond...
<?php namespace App\Http\Controllers; use Illuminate\Http\Request; use App\User; use App\ClassSchedules; use App\ClassSchedulesSubjects; use App\Enrolled; use App\Payments; use App\StudentGrades; use App\GradeAndSubjects; class EnrollmentController extends Controller { /** * Display a listing of the resour...
<?hh $x = Vector {'a'}; var_dump($x->toKeysArray()); var_dump($x->lazy()->toKeysArray()); var_dump($x->lazy()->map(function($x){return $x;})->toKeysArray()); $x = Map {123 => 'a'}; var_dump($x->toKeysArray()); var_dump($x->lazy()->toKeysArray()); var_dump($x->lazy()->map(function($x){return $x;})->toKeysArray()); $x = ...
Digital Image Processing This project perform on the given image: Brightness, Contrast, Range Filter, Median Filter, Binarization, HSL.
# description `attore` is an actor and IO framework for Scala 3. The design of the framework is not stable at this stage, please do not use it in the production environment.
import 'package:animatingpagetransition/theme.dart'; import 'package:animatingpagetransition/ui/beachscreen.dart'; import 'package:animatingpagetransition/utils/fadepageroute.dart'; import 'package:animatingpagetransition/utils/title.dart'; import 'package:animatingpagetransition/widgets/header.dart'; import 'package:f...
{-# LANGUAGE NumericUnderscores #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TypeApplications #-} {-| Generators for the property tests -} module Convex.Options.Generators( -- * Generators for @convex-options@ types optionType, optionState, option, -- * Generators for @Ledger@ types tokenName, ...
package gofmts import ( "io" "io/ioutil" ) func ApplyReplacements(w io.Writer, r io.Reader, issues []Issue) (unresolvedIssues []Issue, _ error) { lastOffset := 0 for _, i := range issues { replacement, ok := i.(IssueWithReplacement) if !ok { unresolvedIssues = append(unresolvedIssues, replacement) } if...
import { Repository } from "typeorm"; import { ApiToken } from "../models/apiToken.model"; export abstract class ApiProvider { public ApiUrl: string; public ApiTokenUrl: string; abstract get Auth(): any; constructor( public ApiKey: string, public ApiSecret: string, public tokenRepository: Reposit...
using System; namespace EventsExpress.Db.Entities { public class AccountRole { public Enums.Role RoleId { get; set; } public Guid AccountId { get; set; } public virtual Account Account { get; set; } public virtual Role Role { get; set; } } }
using System.Reflection; using System.Runtime.CompilerServices; [assembly: AssemblyTitle("NuGet importer for Unity")] [assembly: AssemblyDescription("NuGet importer for Unity.")] [assembly: AssemblyCompany("kumaS")] [assembly: AssemblyCopyright("Apache 2.0 Copyright 2021 kumaS")] [assembly: AssemblyVersion("1.1...
// Copyright Kani Contributors // SPDX-License-Identifier: Apache-2.0 OR MIT //! To run this test, do //! kani fixme_varadic.rs -- lib.c use std::os::raw::c_int; // https://doc.rust-lang.org/reference/items/external-blocks.html // https://doc.rust-lang.org/nomicon/ffi.html extern "C" { fn my_add(num: usize, ...) ...
// SPDX-License-Identifier: Apache-2.0 import { RuleTester } from "eslint"; import { InputOptions } from "./options"; import { rule } from "./rule"; const groups: InputOptions["group-ordering"] = [ { name: "parent directories", match: "^\\.\\.", order: 10 }, { name: "current directory", match: "^\\.", order: 20 ...
# Python GTFS-realtime Language Bindings [![PyPI version](https://badge.fury.io/py/gtfs-realtime-bindings.svg)](http://badge.fury.io/py/gtfs-realtime-bindings) Provides Python classes generated from the [GTFS-realtime](https://github.com/google/transit/tree/master/gtfs-realtime) Protocol Buffer specification. These ...
package de.webis.webisstud.thesis.reimer.ltr.pipeline import de.webis.webisstud.thesis.reimer.model.FeatureVector import de.webis.webisstud.thesis.reimer.model.RunLine import de.webis.webisstud.thesis.reimer.model.format.RunLineFormat interface Reranker { fun rerank(testRuns: Sequence<RunLine>, testVectors: Sequence...
import React from 'react'; import Customer from '../features/customer/customer'; export default function CustomerPage() { return <Customer />; }
package redisearch_test import ( "crypto/tls" "crypto/x509" "fmt" "io/ioutil" "log" "os" "time" "github.com/RediSearch/redisearch-go/redisearch" "github.com/gomodule/redigo/redis" ) // exemplifies the NewClient function func ExampleNewClient() { // Create a client. By default a client is schemaless // unl...
# FORMS MODULE FOR FUEL CMS This is a [FUEL CMS](http://www.getfuelcms.com) forms module for easily adding form functionality to your website. ## INSTALLATION There are a couple ways to install the module. If you are using GIT you can use the following method to create a submodule: ### USING GIT 1. Open up a Terminal...
import 'package:flutter/material.dart'; import 'package:url_launcher/url_launcher.dart'; /// OpenURLOnTap is a component that opens the URL in a new tab on tap. /// It's used to render paper list item and repository list item. class OpenURLOnTap extends StatelessWidget { final String url; final Widget? child; c...
//go:build linux || darwin // +build linux darwin package ui import ( "bytes" "context" "fmt" "io" "os" "sync" "github.com/anchore/syft/internal/log" "github.com/anchore/syft/internal/logger" syftEvent "github.com/anchore/syft/syft/event" "github.com/anchore/syft/ui" "github.com/wagoodman/go-partybus" "g...
<?php namespace App\Http\Controllers\Admin; use App\Http\Controllers\Controller; use App\Jobs\NewsParsing; use App\Source; use Illuminate\Http\RedirectResponse; class NewsParserController extends Controller { /** * обработка ранее зарегистрированных источников по одному * @return RedirectResponse ...
//-- Filename: //-- plot_timeline.js //-- //-- Author: //-- Chieh-An Lin var PT_plot_list = [ [CT_Main, CT_wrap, 1500], [ET_Main, ET_wrap, 1500], ]; GP_Cascade(PT_plot_list);
docker run --restart always --name crawlab \ -e CRAWLAB_REDIS_ADDRESS=192.168.99.1:6379 \ -e CRAWLAB_MONGO_HOST=192.168.99.1 \ -e CRAWLAB_SERVER_MASTER=N \ -v /var/logs/crawlab:/var/logs/crawlab \ tikazyq/crawlab:0.3.0
#!/bin/bash PACKAGE_NAME=com.licenta.grt_benchmark; ACTIVITY=MainActivity adb shell am start -n $PACKAGE_NAME/$PACKAGE_NAME.$ACTIVITY #adb logcat com.licenta.grt_benchmark:* *:S; adb logcat | grep `adb shell ps | grep com.licenta.grt_benchmark | cut -c10-15`
# typed: false # frozen_string_literal: true # This is a default, one-size-fits all protocol that shows how you can # access the inputs and outputs of the operations associated with a job. # Add specific instructions for this protocol! needs 'Collection Management/CollectionDisplay' class Protocol include Collecti...
<?php namespace App\Helpers; use Illuminate\Support\Facades\Request; class RouteHelper { public static function set_active($route) { $path = Request::path(); if ($path == "/") { $path = 'index'; } return ($path == $route ? "active" : ''); } }
# espoir-cli --- ## 命令 ### espoir {create, new} * 若当前工作目录位于一个由 espoir 创建的 monorepo 中,则新建一个 package。 在创建 package 时,可以选择预定义的模板,它们由 espoir-cli 内置。 * 若当前工作目录不位于一个由 espoir 创建的 monorepo 中,则新建一个 monorepo。 #### 用例 * `espoir create` --- ### espoir {install, i, ins} 为指定(或所有)子仓库安装新增的依赖,或为指定(或所有)子仓库安装已定义的依赖。 #### ...
import 'package:equatable/equatable.dart'; import 'package:guardian/slack/model/slack_text_object.dart'; import 'package:guardian/slack/model/validation_result.dart'; /// A class representing Section Block element /// (https://api.slack.com/reference/block-kit/blocks#section) class SlackSectionBlock extends Equatable ...
package com.lykke.matching.engine.order import com.lykke.matching.engine.order.transaction.ExecutionContext import com.lykke.matching.engine.outgoing.messages.v2.builders.EventFactory import com.lykke.matching.engine.outgoing.messages.v2.events.Event import com.lykke.matching.engine.services.MessageSender import com.l...
//===-- MainLoopTest.cpp --------------------------------------------------===// // // 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 // //===---------------------------...
composer install #yarn install yarn encore production php bin/console doctrine:migrations:migrate --no-interaction php bin/console c:c --env=prod #php bin/console opti:covers
import { Component, OnInit } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; @Component({ selector: 'banner', templateUrl: './banner.component.html', styleUrls: ['./banner.component.css'] }) export class BannerComponent implements OnInit { //Instance variables private title: string; ...
export interface Listener<T> { (e: T): void } export class TypedEmitter<T> { private listeners: Listener<T>[] = [] on(l: Listener<T>) { this.listeners.push(l) } off(l: Listener<T>) { const idx = this.listeners.indexOf(l) if (idx > -1) this.listeners.splice(idx, 1) } emit(e: T) { this.l...
"""Add Sutami, Wlingi, Sutami Operasi Revision ID: 8dd3bf604083 Revises: 9bf8d3c01e1d Create Date: 2021-03-20 14:42:14.308774 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '8dd3bf604083' down_revision = '9bf8d3c01e1d' branch_labels = None depends_on = None ...
#!/bin/sh echo [$0]: $1 ... > /dev/console case "$1" in start|stop|restart) service LAYOUT $1 ;; *) echo [$0]: invalid argument - $1 > /dev/console ;; esac
## Prolific Inherit Utility to determine which file handles the user wants a child to inherit from its Prolific supervisor.
# # This file is a part of MolecularGraph.jl # Licensed under the MIT License http://opensource.org/licenses/MIT # @testset "graph.triangle" begin @testset "triangles" begin graph1 = pathgraph(5) @test isempty(triangles(graph1)) graph2 = plaingraph(5, [(1, 2), (2, 3), (3, 1)]) @test issetequal(collect...
# pass ### does nothing ``` >>> while True: ... pass # Busy-wait for keyboard interrupt (Ctrl+C) ```
using System; namespace CodelyTv.Mooc.CoursesCounters.Domain { public class CoursesCounterNotInitialized : SystemException { } }
package jp.gree.techcon.common.util import com.soywiz.klock.DateFormat import com.soywiz.klock.DateTime import com.soywiz.klock.KlockLocale import com.soywiz.klock.hours import com.soywiz.klock.locale.japanese // To resolve format issue on klock internal object AppDateTime { fun parseToArticleTime(timeSecond: Lon...
[Eureka source repo](https://github.com/Netflix/eureka) for detailed documentation fork from the eureka-1.9.2 release zip source code.
#!/bin/sh set -e set -x FILE=$1 CONTENT="foo" CONTENT2="foo2" ret=0 adduser -D testuser adduser -D testuser2 adduser testuser daemon rm -rf "$FILE" echo "$CONTENT" > "$FILE" chmod 0600 "$FILE" chown root:daemon "$FILE" echo TEST="file r/w root user only. Read access as root" RESULT=$(cat "$FILE") if [ "$CONTENT" !...
{-# language DataKinds #-} {-# language GADTSyntax #-} {-# language KindSignatures #-} {-# language LinearTypes #-} module Linear.Stack ( Stack , empty , push , pop -- * Consume , foldl ) where import Prelude hiding (foldl) import Data.Kind (Type) import Linear.Slate (Slate) import Linear.Types (Mode...
package com.smxy.hencoder.testkotlin import java.util.* /** * @author huangkangqiang * @name TestA * @description * @date 2019/5/1 */ class TestA { private fun getA() { val objects = ArrayList<Any>() objects.add(Any()) } }
# 🙌 Contributions and Community ```{toctree} :maxdepth: 2 ../n00b-overview ../development ../CHANGELOG ../newDiagram ```
module.exports = { vue: [ { name: 'Vue + antdUI', description: '基于vue + antdUI搭建的中后台项目模板', value: 'https://gitee.com/misthin/vue-frame-antd.git' }, { name: 'Vue + TS + ElementUI', description: '基于vue + TS + ElementUI搭建的中后台项目模板', value: 'https://gitee.com/misthin/vue-ts-...
# Fill the values and save this file as credentials.rb # Don't forget to also download spotify_appkey.key, # available https://developer.spotify.com/en/libspotify/application-key/ # and place it in the same directory as the spotify2rdio.rb # Get these by signing up or creating a new app # at http://developer.rdio.com...
class String # Verifica se uma máscara de Título de Eleitor é válida: # # "7590.2631.1727".valid_titulo_eleitor_mask? => # true def valid_titulo_eleitor_mask? without_mask = !!(self =~ /^[0-9]{12}+$/) with_mask = !!(self =~ /^[0-9]{4}\.[0-9]{4}\.[0-9]{4}+$/) with_mask || without_mask end # Ver...
package org.idiosapps import java.io.PrintWriter class SummaryPageUtils { // TODO fun writeTeXGrammarSection // TODO fun writeTeXQuestionsSection // TODO fun writeNamesSection companion object { const val endLine = "\\\\" fun writeVocabSection( outputStoryWriter: PrintWrite...
#!/usr/bin/env bash # # Remove OpenStack configuration from a server. # pycassaShell -f drop-cassandra-cfgm-keyspaces # shutdown all the services if [ -f /etc/lsb-release ] && (egrep -q 'DISTRIB_RELEASE.*16.04' /etc/lsb-release); then for svc in api config-nodemgr device-manager schema svc-monitor; do ch...
// License [CC0](http://creativecommons.org/publicdomain/zero/1.0/) library startstopstats; import 'dart:html'; // in milliseconds ( like window.performance.now() ) class StartStopStats { Function displayFct; double displayLast = 0.0; double resetLast = 0.0; double min; double max; double total; int co...
package com.conlect.oatos.dto.client; import com.conlect.oatos.dto.autobean.IEnterpriseLoginDTO; /** * 企业用户登录dto * * @author yang * */ public class EnterpriseLoginDTO extends LoginDTO implements IEnterpriseLoginDTO { private static final long serialVersionUID = 1L; /** * 企业名称 */ public String enterpri...
# Author: Bichen Wu (bichen@berkeley.edu) 08/25/2016 """Neural network model base class.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import os import sys from utils import util from easydict import EasyDict as edict import numpy as np import tensor...
require_relative 'test_helper' SAMPLE_CONFIG = %( common_fields: fields: - name: name width: 20 starts_at: 1 validate: - not_blank test_format: skip_top_lines: 1 skip_bottom_lines: 1 inherit_from: common_fields new_line_style: true fields: - name: phone width: 12 ...
<?php namespace NilPortugues\Serializer; use Closure; use NilPortugues\Serializer\Serializer\InternalClasses\SplFixedArraySerializer; use NilPortugues\Serializer\Strategy\StrategyInterface; use ReflectionClass; use ReflectionException; use SplObjectStorage; class Serializer { const CLASS_IDENTIFIER_KEY = '@type'...
<?php namespace Tests; use PHPUnit\Framework\TestCase; use Logme\Soap\Ups\TransactionReference; class TransactionReferenceTest extends TestCase { /** * @test Sets the customer context attribute value. */ public function it_sets_customer_context_attribute_value() { $transactionReference ...
type Pedigree{T<:Integer} sire::Vector{T} dam::Vector{T} perm::Vector{T} lappt::Vector{T} end function Pedigree{T<:Integer}(sire::Vector{T},dam::Vector{T}) (n = length(sire)) == length(dam) || throw(DimensionMismatch("")) for i in 1:n zero(T) ≤ sire[i] ≤ n && zero(T) ≤ dam[i] ≤ n || ...
package com.github.donkirkby.vograbulary.client; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import com.github.donkirkby.vograbulary.WordDisplay; import com.github.donkirkby.vograbulary.WordDisplay.WordDisplayListener; import com.github.donkirkby.vograbulary.bacronyms.BacronymsScreen; ...
import { ComponentFixture, TestBed, async, fakeAsync, tick, flushMicrotasks } from '@angular/core/testing'; import { NO_ERRORS_SCHEMA, ApplicationInitStatus, Component } from '@angular/core'; import { APP_BASE_HREF } from '@angular/common'; import { Router } from '@angular/router'; import { RouterTestingModule } from '...
package models type Machine struct { ID int `json:"id"` ItemProxy NamedAPIResource `json:"item"` MoveProxy NamedAPIResource `json:"move"` VersionGroupProxy NamedAPIResource `json:"version_group"` Item *Item Move *Move VersionGroup *Versi...
const validator = require('validator'); const isEmpty = require('./is-empty'); const isString = require('./is-string'); module.exports = ({ firstName, lastName, phone }) => { const errors = {}; // Check if first name is a string if (!isEmpty(firstName) && !isString(firstName)) { errors.firstName = 'First na...
import { test } from 'ember-qunit'; import { moduleFor } from 'dummy/tests/helpers/test-module-for-engine'; moduleFor('service:transfers', 'Unit | Service | transfers', {}); test('it can get and set transfer state', function(assert) { const service = this.subject(); service.setTransferState({ tickets: [], email:...
def post_tax_income() puts "How much is earned per year?" yearly = gets.chomp.to_i puts "How much is rent per month?" rent = gets.chomp.to_i puts "How many miscellaneous bills are there per month?" bills = gets.chomp.to_i # This is assuming single taxable income for 2017. case when yearly < 9325 ...
import {AttributePath} from "./AttributePath"; import {AttributeValue} from "./AttributeValue"; import {ExpressionAttributes} from "./ExpressionAttributes"; import {FunctionExpression} from "./FunctionExpression"; export type ComparisonOperand = AttributePath|AttributeValue|FunctionExpression|any; export interface Bi...
<?php if (! function_exists('phone_format')) { function phone_format($str) { $number = chunk_split($str,4,"-"); $split = str_split($number); for($i = 0; $i < count($split)-1; $i++ ){ $array[$i] = $split[$i]; } return implode($array); } }
trait Higher[F[_]] trait Box[A] object Box { implicit def HigherBox = new Higher[Box] {} } object Foo { val box = implicitly[Higher[Box]] // compiles fine !!! type Bar[A] = Box[A] val bar = implicitly[Higher[Bar]] // <-- this doesn't compile in 2.10.1-RC1, but does in 2.10.0 !!! }
-- 与清算有关的业务表 create table SETTLE_STATEMT ( SETTLE_ID BIGINT primary key not null auto_increment comment '结算单主键', SETTLE_NO VARCHAR(12) not null comment '结算单号,商铺号后两位+年月日+2位随机码', YEAR char(4) not null comment '年份', MONTH char(2) not null comment '月份', STORE_NO VARCHAR(18) not null comment '商铺号', STA...
import 'package:flutter/material.dart'; /// This extension is for form validations using the [FormKey] approach /// Import this file in any form view and call the methods from the [Buildcontext]'s /// [context] variable /// /// This extension still needs improvement extension ValidationExtension on BuildContext { St...
using System; using Csla; namespace ParentLoadROSoftDelete.DataAccess.ERCLevel { /// <summary> /// DTO for F07_Country_Child type /// </summary> public partial class F07_Country_ChildDto { /// <summary> /// Gets or sets the parent Country ID. /// </summary> ...
#### Flutter >https://flutter.io/ >https://github.com/flutter/flutter >环境变量 ```bash export PATH=/Users/zl/code/flutter/bin:$PATH export PUB_HOSTED_URL=https://pub.flutter-io.cn export FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn ``` ```bash vim ~/.bash_profile source ~/.bash_profile ``` >新建必要文件夹并授权 > ...
using System.IO; using System.Linq; using Data; using Microsoft.AspNetCore.Mvc; using Models.Diagnosis; using Serilog; using System; using System.Collections.Generic; namespace WebAPI.Controllers { [Route("[Controller]")] [ApiController] public class SurgeryController : ControllerBase { //Depe...
LDA 50 Push two numbers, 1 and 2, to the stack. PUSH LDA 51 PUSH LDA 52 Clear the accumulator to ensure pop actually works. POP 0 Then, pop the two numbers in order and output them. OUT 0 They should be displayed in reverse order, so 2 then 1. POP OUT HALT 50 DATA 1 51 DATA 2 52 DATA 0
package com.example.weatherapp.data.network import com.example.weatherapp.data.model.WeatherModel import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.withContext import javax.inject.Inject class OpenWeatherMapService @Inject constructor(private val api : OpenWeatherMapApiClient) { suspend fun getWea...
using System; using System.Collections.Generic; using CompanyName.MyMeetings.Modules.Meetings.Application.Contracts; namespace CompanyName.MyMeetings.Modules.Meetings.Application.MeetingComments.GetMeetingCommentLikes { public class GetMeetingCommentLikersQuery : IQuery<List<MeetingCommentLikerDto>> { ...