text
stringlengths
27
775k
#!/bin/sh set -e # Format with Black black errantbot/*.py if [[ -n $(git diff) ]]; then echo "Formatted with Black" fi DBNAME=$(python - <<EOF from errantbot import helper print(helper.get_secrets()["database"]["name"]) EOF ) # Export schema ./export_schema.sh $DBNAME if [[ -n $(git diff schema.sql) ]];...
test_that("Integer check fails when character or factor is added", { expect_error(phyloseq2ML:::is.wholenumber(c("blabla"))) }) test_that("Integer check returns TRUE for decimals without rest", { expect_true(phyloseq2ML:::is.wholenumber(c(7.0))) }) test_that("Integer check works for vectors", { expect_true(phyl...
/** * LiveData に関する拡張関数群 */ package com.github.fhenm.himataway.extensions import android.arch.lifecycle.LiveData /** null でない値を取得する。null の場合例外。 */ fun <T> LiveData<T>.get() : T = this.value!!
using System.Collections.Generic; using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; using PackIT.Application.Commands; using PackIT.Application.DTO; using PackIT.Application.Queries; using PackIT.Shared.Abstractions.Commands; using PackIT.Shared.Abstractions.Queries; namespace PackIT.Api.Controllers { ...
TICA TAC TOE V2 =============== Tic Tac Toe game designed for three players with a minimum playfield of 3x3 to a maximum playfield of 10x10. Design decisions ---------------- - I took the decision to create a Maven Java project. - I created a "Player" Business Object (bo) to define the properties that the player con...
# Sample go server that uses the Grafeas go client library To run this server against the Grafeas reference implementation run the following: ``` go get github.com/Grafeas/Greafeas/samples/server/go-server/api/ go get github.com/Grafeas/client-go go run grafeas/samples/server/go-server/api/server/main/main.go go run ...
package com.platform.service; import com.platform.dao.ApiKeywordsMapper; import com.platform.entity.KeywordsVo; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.util.List; import java.util.Map; @Service public class ApiKeywordsService { @A...
package analysis /** * Panther is a scalable, powerful, cloud-native SIEM written in Golang/React. * Copyright (C) 2020 Panther Labs Inc * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as * published by the Free Software Found...
export * from '@drizzle-http/core' export * from '@drizzle-http/undici' export * from '@drizzle-http/logging-interceptor' export * from '@drizzle-http/rxjs-adapter' export * from '@drizzle-http/response-mapper-adapter' export * from '@drizzle-http/opossum-circuit-breaker'
require 'net/http' require 'json' module Oculus module Helpers class GraphiteHelper def initialize(hostname) @host=hostname end def get_graphite_json(namespace,time_from,time_to) begin params = URI.escape("target=#{namespace}&from=#{time_from}&until=#{time_to}") ...
import EventEmitter from 'events'; require('whatwg-fetch'); const SERVER_ERROR_STRING = 'Server unavailable'; function apiError (status, message) { var err = new Error(message); err.status = status; return err; } function onAPIResponse (res) { if (res.status >= 500) { return Promise.reject(apiError(res....
<?php namespace App\Console\Commands; use Illuminate\Console\Command; use App\Console\BoilerplateInputParser; use App\Console\BoilerplateGenerator; use Illuminate\Filesystem\Filesystem; class BoilerplateGenerate extends Command { /** * The name and signature of the console command. * * @var string...
{-# LANGUAGE DeriveAnyClass #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} module River.Core.Primitive ( Prim(..) ) where import Control.DeepSeq (NFData) import Data.Data (Data) import Data.Set (Set) import qualified Data.Set as Set import Data.Typ...
package com.example.android.guesstheword import com.example.android.guesstheword.screens.game.GameViewModel const val GameViewModelTag: String = "GameViewModel"
package com.theslipper.chargebackspecialist.chargebackspecialist.controllers; import com.theslipper.chargebackspecialist.chargebackspecialist.models.SystemUserRole; import com.theslipper.chargebackspecialist.chargebackspecialist.services.HelpEntryService; import com.theslipper.chargebackspecialist.chargebackspecialist...
<?php $I = new AcceptanceTester($scenario); $I->wantTo('Contacts'); $I->amOnPage('/contacts'); $I->see('Тел. (044) 221-65-78'); $I->see('Email: web@wezoom.net');
--- title: "Differential Equation: Test 2-4" categories: - Differential Equation tags: - Differential Equation toc: true toc_sticky: true --- # 질문 ## 내용 $$(e^{y}-ye^{x})dx + (xe^{y}-e^{x})dy = 0$$이 완전미분방정식임을 보이고 해를 구하시오. # 답변 ## 내용 ![Answer](/assets/images/differential_equation/test_2/test_4.png)
# frozen_string_literal: true require 'spec_helper' RSpec.describe GitlabSchema.types['NugetMetadata'] do it 'includes nuget metadatum fields' do expected_fields = %w[ id license_url project_url icon_url ] expect(described_class).to include_graphql_fields(*expected_fields) end %w[projectUrl ...
#!perl -w # vim: ft=perl use strict; use Test::More; use DBI; use lib 't', '.'; require 'lib.pl'; use vars qw($table $test_dsn $test_user $test_passwd); $|= 1; my $dbh; eval {$dbh= DBI->connect($test_dsn, $test_user, $test_passwd, { RaiseError => 1, PrintError => 1, AutoCommit => 0 });}; if ($...
/********************************************* 作者:曹旭升 QQ:279060597 访问博客了解详细介绍及更多内容: http://blog.shengxunwei.com **********************************************/ using System.Collections.Generic; using System.Configuration; using Microsoft.Practices.EnterpriseLibrary.Common.Configuration...
use jni::JNIEnv; use jni::objects::{JClass, JString}; use jni::sys::jlong; use crate::common::context::Context; #[allow(non_snake_case)] #[no_mangle] pub extern "C" fn Java_org_nativescript_canvas_TNSSVG_nativeDrawSVG( env: JNIEnv, _: JClass, context: jlong, svg: JString, ) { unsafe { let ...
/* SecurityPermission.java -- Class for named security permissions Copyright (C) 1998, 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. GNU Classpath 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...
MODULES.moduleClasses["casterlabs_donation"] = class { constructor(id) { this.namespace = "casterlabs_donation"; this.displayname = "caffeinated.donation_alert.title"; this.type = "overlay settings"; this.id = id; this.supportedPlatforms = ["TWITCH", "CAFFEINE", "TROVO"]; ...
#!/bin/sh pacman -Qen > "sync_packages" pacman -Qem > "aur_packages"
/* Copyright 2014 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing,...
# frozen_string_literal: true require 'json' module RubyCandy class Client module FirmwareConfigAPI API_METHODS = %i[ auto_status dithering= interpolation= status= ].freeze VAR_NAME = '@firmware_config' def reset_firmware_config(send: true) instan...
// getopt_book.c // Chapter 20 // Learn C Programming, 2nd Edition // // Demonstrate how to // * retrieve arguments entered on the command line with the C Standard // Library routine getopts(). // // compile with: // cc getopt_book.c -o getopt_book -Wall -Werror -std=c17 // // sample inputs; // // ./getopt_book ...
import { StorageService } from './providers/storage.service'; import { CartService } from './providers/cart.service'; import { ProductsService } from './providers/products.service'; import { MenuService } from './providers/menu.service'; import { BrowserModule } from '@angular/platform-browser'; import { NgModule } fro...
/* global createCanvas, mouseIsPressed, fill, mouseX, mouseY, ellipse, windowHeight, windowWidth, cos, sin, random, vec, rndInCirc */ let state; function makeBristles(bnum, blen, rad){ const bristles = []; for (let i=0; i < bnum; i++){ const r = sqrt(random()); const a = random(-PI, PI); bristles....
// Copyright 2018 The Fuchsia Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "src/developer/debug/shared/message_loop_poll.h" #include <fcntl.h> #include <lib/syslog/cpp/macros.h> #include <poll.h> #include <string.h> #inc...
#require "spreadsheet/excel" # writing excel #include Spreadsheet # writing excel #require 'parseexcel' # reading excel module Crud class << self # Crud tools provide Crud class methods that can perform operations across # multiple tables. These methods inlcude: # # - tables_list # - gen...
mod stats; mod stats_by_team; use stats_by_team::StatsByTeam; use std::convert::TryFrom; pub fn tally(log: &str) -> String { let stats_by_team = StatsByTeam::try_from(log).expect("failed to parse log"); format!("{}", stats_by_team) }
import pickle import gc import pandas as pd from keras_preprocessing.sequence import pad_sequences from tensorflow_core.python.keras.models import load_model from src.neuralnetwork import lstm_utils from src.pipelineapplication import utils lstm_model = "../../output/official/neuralnetwork.h5" tokenizer_model = ".....
package at.roteskreuz.stopcorona.screens.base.epoxy import android.widget.CheckBox import android.widget.TextView import androidx.constraintlayout.widget.ConstraintLayout import at.roteskreuz.stopcorona.R import at.roteskreuz.stopcorona.skeleton.core.screens.base.view.BaseEpoxyHolder import at.roteskreuz.stopcorona.sk...
<footer> <span class='sitefooter'><?=$footer?></span> </footer>
package com.nurbk.ps.countryweather.ui.activity import android.os.Bundle import android.view.View import androidx.appcompat.app.AppCompatActivity import androidx.databinding.DataBindingUtil import androidx.navigation.fragment.NavHostFragment import androidx.navigation.ui.AppBarConfiguration import androidx.navigation....
package com.cognifide.gradle.lighthouse.config import com.fasterxml.jackson.annotation.JsonIgnoreProperties @JsonIgnoreProperties(ignoreUnknown = true) class Suite { lateinit var name: String var default: Boolean = false var baseUrl: String? = null var paths: List<String> = listOf() var args:...
<?php namespace App\Repositories\EmployeeRepositories; use App\Repositories\EmployeeRepositories\EmployeeRepositoryInterface; use Illuminate\Support\Facades\Hash; use Illuminate\Http\Request; use App\Models\User; use Illuminate\Support\Facades\Auth; class EmployeeRepository implements EmployeeRepositoryInterface{ ...
namespace IQMStarterKit.Migrations { using System.Data.Entity.Migrations; public partial class ChangeFilePathFields : DbMigration { public override void Up() { AddColumn("dbo.FilePaths", "ContentType", c => c.String(maxLength: 100)); AddColumn("dbo.FilePaths", "Conte...
<?php require(__DIR__ . "/this-file-does-not-exist.php");
function solve(a) { let p = JSON.parse(a); for(let key of Object.keys(p)) { console.log(`${key}: ${p[key]}`); } }
Pod::Spec.new do |spec| spec.name = "TVMeetingSDK" spec.version = "2.0.4" spec.summary = "TVMeetingSDK for IOS" spec.description = "TVMeetingSDK.framework一款用于开启即时视频会议的sdk" spec.homepage = "https://github.com/loneKiss/TVMeetingSDK" spec.license = { :type => "MIT", :file => "LICENSE" } spec....
package io.particle.android.sdk.cloud.models enum class ParticleSimStatus { READY_TO_ACTIVATE, // ok == "ready" ACTIVATED_FREE, // already activated on a free plan ACTIVATED, // already activated NOT_FOUND, NOT_OWNED_BY_USER, ERROR } internal fun statusCodeToSimStatus(statusCod...
import 'package:flutter/material.dart'; import 'package:flutter_holo_date_picker/flutter_holo_date_picker.dart'; import 'package:intl/intl.dart'; class DateTesting extends StatefulWidget { DateTesting({Key? key}) : super(key: key); @override _DateTestingState createState() => _DateTestingState(); } class _Date...
import 'package:firebase_database/firebase_database.dart'; import 'package:flutter/material.dart'; import 'package:rxdart/rxdart.dart'; import 'bloc_provider.dart'; import 'auth_bloc.dart'; class ConfigBloc extends BlocBase { final FirebaseDatabase db = FirebaseDatabase.instance; final BehaviorSubject<String> _us...
// // Generated by class-dump 3.5 (64 bit) (Debug version compiled Sep 17 2017 16:24:48). // // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2015 by Steve Nygard. // #import <MMCommon/MMService.h> #import "IRemoteControlMusicPlayerExt-Protocol.h" #import "ISysCallCheckExt-Protocol.h" #import "MMImag...
package com.fasterxml.jackson.dataformat.protobuf.schema; import java.util.List; import com.fasterxml.jackson.dataformat.protobuf.ProtobufTestBase; public class ReadCyclicSchema140Test extends ProtobufTestBase { final protected static String PROTOC_CYCLIC = "message Front {\n" +" optional...
@extends('layouts.admin.master') @section('title')Apex Chart {{ $title }} @endsection @push('css') @endpush @section('content') @component('components.breadcrumb') @slot('breadcrumb_title') <h3>Apex Chart</h3> @endslot <li class="breadcrumb-item">Charts</li> <li class="breadcrumb-item active">Apex Chart...
package com.elementary.tasks.core.calendar import android.content.Context import android.util.AttributeSet import android.view.MotionEvent import androidx.viewpager.widget.PagerAdapter import androidx.viewpager.widget.ViewPager class InfiniteViewPager : ViewPager { private var enabled = true override fun isEnabl...
--- title: werf config render sidebar: documentation permalink: documentation/cli/management/config/render.html --- {% include /cli/werf_config_render.md %}
#include "llvm/IR/Function.h" #include "llvm/IR/Instructions.h" #include "llvm/IR/Module.h" #include "sea_dsa/CallSite.hh" using namespace llvm; namespace sea_dsa { bool DsaCallSite::isPointerTy::operator()(const Value *v) { return v->getType()->isPointerTy(); } bool DsaCallSite::isPointerTy::operator()(const Ar...
import { bridgeSql } from '../database/postgre'; import { sql } from '../utils/sql'; export const up = async (knex, db = bridgeSql(knex)) => { // Create documents structure await db.execute(sql` CREATE TABLE "products" ( id VARCHAR(255) PRIMARY KEY, name ...
package io.petros.movies.network.rest import io.mockk.coEvery import io.mockk.mockk import io.petros.movies.network.raw.movie.MovieRaw import io.petros.movies.network.raw.movie.MoviesPageRaw import io.petros.movies.test.domain.movie import io.petros.movies.test.domain.moviesPage import kotlinx.coroutines.ExperimentalC...
<?php namespace App\Http\Controllers; use App\Models\Mascota; use Illuminate\Http\Request; use Illuminate\Support\Facades\DB; class MascotaController extends Controller { // function test(Request $request){ return response()->json(["error"=>false,"message"=>"Consulta Exitosa"],200); } functio...
package com.afdhal_fa.treasure.core.utils interface IBaseView { fun onShowProgressBar() fun onHideProgressBar() }
-- Revert seattleflu/id3c-customizations:shipping/views from pg -- requires: seattleflu/schema:shipping/schema -- Hello! All shipping views are defined here. Rework this change with Sqitch -- to change a view definition or add new views. This workflow helps keep -- inter-view dependencies manageable. begin; -- Th...
# CreateUser {#reference_lmj_ftk_xdb .reference} ## Interface description {#section_whn_4tk_xdb .section} Creates an RAM user. ## Request parameters {#section_k2y_ptk_xdb .section} **Action** - Type: String - Required: Yes - Description: Operation interface, required. The parameter value is "CreateUser". **...
require_relative '../exercise2/file_sorter.rb' require 'timeout' module Exercise2 describe FileSorter do describe '::by_size_biggest_first' do it 'Sorts files by their length attribute' do File = Struct.new(:length) file1 = File.new 1 file2 = File.new 5 file3 = File.new 7 ...
#!/bin/bash source ~/.dotfiles.env if [[ "$DOTFILES_CONFIG_I3_DISABLE_VOLUME_WIDGET" == 'true' ]]; then echo >&2 'Widget is disabled by variable DOTFILES_CONFIG_I3_DISABLE_VOLUME_WIDGET' exit 0 fi I3_HOME="$DOTFILES_HOME/config/i3" SOUND_ICON='' NO_SOUND_ICON='' dir="$(dirname "${BASH_SOURCE[@]}")" VOLUME...
package unikv // Key is the type of unikv key type Key interface { // Convert to string String() string } // KeyString is string key type KeyString string // String converts KeyString to string func (ks KeyString) String() string { return string(ks) } // KeyNil is blanck key var KeyNil = KeyString("(unikv_nil)")...
using RumahScarlett.Domain.Models.Pembelian; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace RumahScarlett.Services.Services.Pembelian { public class PembelianReturnServices : IPembelianReturnServices { private IPembelianReturnR...
Python Style Guidelines ======================= For Python programming, we use a slightly modified version of the standard [PEP-8 Style Guide for Python Code](http://legacy.python.org/dev/peps/pep-0008 "PEP-8 Style Guide for Python Code"). Read below for our modifications. - - - ## Code lay-out ## ### Indentation ### T...
/* * Copyright (C) 2011 The Android Open Source Project * * 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 app...
# Dashboard This folder contains the components necessary to build and deploy a dashboard to visualize gRPC OSS benchmarking results. gRPC OSS benchmarks save results to [BigQuery][bigquery]. The dashboard consists of two components: 1. A [Postgres replicator][replicator], to transfer the results to a Postgres da...
package net.codecision.startask.http.code.sample.network import net.codecision.startask.http.code.HttpStatusCode import retrofit2.Response fun <T> Response<T>.toHttpStatusCode(): HttpStatusCode { return HttpStatusCode.fromValue(code()) }
<?php namespace App; use Illuminate\Database\Eloquent\Model; class Employee extends Model { //whitelist protected $fillable=['name','alamat','phone','email','position_id','picture']; //blacklist protected $guarded=['id']; public function position(){ return $this->belongsTo('App\Position...
require 'app/controllers/html_controller' require 'app/helpers/manage_helper' require 'app/models/pod' require 'app/controllers/slack_controller' require 'active_support/core_ext/hash/except' require 'peiji_san/view_helper' require 'sinatra/twitter-bootstrap' require 'sinatra/url_for' module Pod module TrunkApp ...
use crate::*; #[derive(Clone, Copy, PartialEq, Eq, Debug)] #[repr(C)] #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] pub struct Circle<T> { pub center: Point<T>, pub radius: T, } impl<T> Circle<T> { #[inline] pub fn new(center: impl Into<Point<T>>, radius: T) -> Self { ...
/* * Copyright (C) 2020 The Android Open Source Project * * 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 app...
expect fun functionNoParameters() expect fun functionSingleParameter(i: Int) expect fun functionTwoParameters(i: Int, s: String) expect fun functionThreeParameters(i: Int, s: String, l: List<Double>) // hasStableParameterNames=false expect fun functionMismatchedParameterNames1(arg0: Int) // hasStableParameterNames=fa...
#include <bits/stdc++.h> using namespace std; int dis[6000][6000], n, a, b, w, q; vector<pair<int,int> > adj[6000]; int main(){ scanf("%d",&n); for(int i=1; i<n;i++){ scanf("%d%d%d", &a,&b,&w); adj[a].push_back(make_pair(b,w)); adj[b].push_back(make_pair(a,w)); } for(int i = 0; i < n; i++){ bool vis[6000]={...
import { GridColumnTypesRecord } from './gridColTypeDef'; import { GRID_STRING_COL_DEF } from './gridStringColDef'; import { GRID_NUMERIC_COL_DEF } from './gridNumericColDef'; import { GRID_DATE_COL_DEF, GRID_DATETIME_COL_DEF } from './gridDateColDef'; export const DEFAULT_GRID_COL_TYPE_KEY = '__default__'; export con...
'use strict'; import * as angular from "angular"; import "angular-ui-router"; import "angular-material"; import "app/components/sampleOne/index"; import "app/partials/stateControllers/index"; import "app/components/sampleOne/index"; var AppTest = angular.module("appTest", ["ui.router", "stateControllers", "sampleOn...
# --- LRR Windows build script --- echo "🎌 Building up LRR Windows Package 🎌" echo "Inferring version from package.json..." $json = (Get-Content "package.json" -Raw) | ConvertFrom-Json $version = $json.version echo "Version is $version" $env:LRR_VERSION_NUM=$version # Use Docker image mv .\package\package.tar .\to...
<?php class NeverEver extends Game { private $type = Games::NEVEREVER; private $answer; private $question; public function __construct($value) { parent::__construct($value); $this->answer = $value->answer; $this->question = $value->question; } public function getU...
if RUBY_PLATFORM == 'opal' require 'volt/extra_core/logger' else require 'logger' end # Simple global access to the logger. # You can also include Log into a class to get the logger # inside of it. module Log def self.logger @logger = Logger.new(STDOUT) end # Module methods, Log.info... def self.fatal...
import { RGBToRGBArray } from './rgb-to-rgb' import { hexToRGBArray } from './hex-to-rgb' import { HSLtoRGBArray } from './hsl-to-rgb' import { ColorInput, ColorArray } from '../index.types' import { RGBRegex, HSLRegex } from '../constants' export const getColorArray = (color: ColorInput): ColorArray => { const getA...
#!/bin/bash HOSTNAME=$1 if [ -z "$HOSTNAME" ]; then echo "Usage: docker exec nginx-vhost-proxy /add-ssl-vhost.sh <domain.example.com> [container-port-or-80]" exit 1 fi PORT=$2 if [ -z "$PORT" ]; then PORT=80 fi function sep { echo -e "\n\n####################" } function ifexit { [ "$?" -eq "0" ] || exit 1 } ...
json.set! "@type", "SearchResult" json.hits do json.found @search.total json.start @search.start json.hit @search.hits do |hit| json.partial! "v1/search/hit", hit: hit end end json.facets @search.facets do |facet| json.partial! "v1/search/facet", facet: facet end json.sorts @search.sorts do |sort_field| ...
using Microsoft.AspNetCore.Identity.EntityFrameworkCore; using Microsoft.EntityFrameworkCore; using Entidades; using System; using System.Collections.Generic; using System.Text; namespace Persistencia { public class DB_OverseasContext : IdentityDbContext<AppUser, AppRole, int> { public DB_OverseasCont...
/* Package table contains functions that use the github.com/Azure/azure-sdk-for-go/sdk/tables/aztable package (see: https://github.com/Azure/azure-sdk-for-go/tree/track2-tables ). While in preview, this must be installed via: go get github.com/Azure/azure-sdk-for-go/sdk/internal@track2-tables go get github.com/Azure...
#!/usr/bin/bash set -e ################################################################################ ## CMake setup export PYTHONPATH=$PYTHONPATH:@CMAKE_BINARY_DIR@/python export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:@CMAKE_BINARY_DIR@/lib export SCRATCHDIR=@CMAKE_BINARY_DIR@/scratch export GEOMH1=@CMAKE_SOURCE_DIR@/Un...
// Copyright 2015-2016 Sevki <s@sevki.org>. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Package builder parses build graphs and coordinates builds package postprocessor import ( "fmt" "log" "os" "path" "path/filepath" "reflect" ...
package com.ymy.im.module import com.tencent.qcloud.tim.uikit.modules.conversation.base.ConversationInfo import com.ymy.core.bean.FunctionInfo import java.io.Serializable /** * Created on 1/16/21 09:15. * @author:hanxueqiang * @version: 1.0.0 * @desc: */ data class CompanyFunctionData( val companyId: String ...
import React, { useCallback } from 'react'; import { withRouter, RouteComponentProps } from 'react-router'; import VelogSearchInput from '../../components/velog/VelogSearchInput'; export interface VelogSearchInputContainerProps extends RouteComponentProps { initial: string; username: string; } function VelogSearc...
## 类型转换 对于`byte`/`short`/`char`三种类型来说,如果右侧赋值的数值没有超过范围,会自动强制类型转换 `byte`/`short`涉及到运算会自动提升为`int`类型 ## 变量赋值 赋值时,若右侧表达式中都是常量,编译时就会直接计算出结果 ## 文件层次 项目 -> 模块 -> 包 -> 文件 ## 函数定义 1. 定义顺序无关 2. 方法定义不能嵌套 3. 定义在类中 4. return的返回值必须与定义的方法类型一致 5. 对于一个void么有返回值的方法,不写return后面的返回值 ## 函数重载 ### 方法重载与下列因素相关 1. 参数不同 2. 参数类型不同 3. 参数的多类型顺序不...
import _ from 'lodash/fp' export let isTraversable = x => _.isArray(x) || _.isPlainObject(x) export let traverse = x => isTraversable(x) && !_.isEmpty(x) && x
module PlanSpec where import Control.Lens import Control.Monad import Data.Either import Data.Maybe import Data.Time import Instances () import Plan.Env import Plan.Functions import Plan.Plan import Plan.Task import Test.Hspec import Test.QuickCheck import TestData spec :: SpecWith () spec = describe "Planning" $ d...
using System.Collections.Generic; using System.Linq; using Avalonia.Controls; using Avalonia.Controls.Templates; using Avalonia.Metadata; namespace WalletWasabi.Fluent; public class DataTemplateSelector : IDataTemplate { public IControl Build(object param) { return Templates.FirstOrDefault()?.Build(param) ?? new ...
; Yul Library ; ; Copyright (C) 2022 Kestrel Institute (http://www.kestrel.edu) ; ; License: A 3-clause BSD license. See the LICENSE file distributed with ACL2. ; ; Author: Alessandro Coglio (coglio@kestrel.edu) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (in-package "YUL") (incl...
/* * (c) Copyright 2012 EVRYTHNG Ltd London / Zurich * www.evrythng.com */ #if !defined(_MQTT_MARVELL_) #define _MQTT_MARVELL_ #include <stddef.h> #include <wm_os.h> #include <wm_mbedtls_helper_api.h> #include "FreeRTOS.h" #include "task.h" typedef struct Timer { portTickType xTicksToWait; xTimeOutType xTimeOu...
php-casperjs ============ [![Travis branch](https://img.shields.io/travis/alwex/php-casperjs/stable.svg)]() [![Packagist](https://img.shields.io/packagist/dt/phpcasperjs/phpcasperjs.svg?maxAge=2592000)]() [![Version](http://img.shields.io/packagist/v/phpcasperjs/phpcasperjs.svg?style=flat)](https://packagist.org/packa...
#pragma once #include <vector> #include "items/item.hpp" #include "../types.hpp" #include "../non_copyable.hpp" #include "../definitions/grass_effect_definition.hpp" namespace space { class Area; class GameSession; class AreaInstances : private NonCopyable { public: // Fields ...
// DomApi // --------- import _ from 'underscore'; import Backbone from 'backbone'; // Performant method for returning the jQuery instance function getEl(el) { return el instanceof Backbone.$ ? el : Backbone.$(el); } // Static setter export function setDomApi(mixin) { this.prototype.Dom = _.extend({}, this.proto...
package org.springframework.beans.support; /** * @since 29.07.2004 */ public class DerivedFromProtectedBaseBean extends ProtectedBaseBean { }
Rails.application.routes.draw do # The priority is based upon order of creation: first created -> highest priority. # See how all your routes lay out with "rake routes". # mount RailsAdmin::Engine => '/teacher', as: 'rails_admin' resources :subjects resources :staffs resources :students resources :facultie...
using MpcCore.Contracts.Mpd; using System; namespace MpcCore.Mpd { public class Status : IStatus { /// <summary> /// Status has error /// </summary> public bool HasError => Error != null; /// <summary> /// Mpd playback is running /// </summary> public bool IsPlaying => State == "play"; /// <summ...
// Copyright 2017 Mikio Hara. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package tcpopt_test import ( "log" "net" "time" "github.com/mikioh/tcp" "github.com/mikioh/tcpopt" ) func ExampleOption() { c, err := net.D...
import type { NextApiRequest, NextApiResponse } from "next"; import { PrismaClient } from "@prisma/client"; const prisma = new PrismaClient(); export default async function handler( req: NextApiRequest, res: NextApiResponse ) { let { id } = req.query; if (!id || typeof id !== "string") { res .status...
// Copyright 2014-2015 Matthew Endsley // All rights reserved // // Redistribution and use in source and binary forms, with or without // modification, are permitted providing that the following conditions // are met: // 1. Redistributions of source code must retain the above copyright // notice, this list of condit...