text
stringlengths
27
775k
let usuarioAltura = 170 let usuarioIdade = 21 //seu código aqui if(usuarioAltura > 150 || usuarioIdade >= 21){ console.log("Você pode subir") } else{ console.log("Desculpe, você não atende os requisitos para usar o brinquedo") }
module Api::V1 class ProjectsController < Api::ApiController expose(:projects) { projects_repository.to_synchronize } expose(:project) end end
// Copyright 2020 The Chubao Authors. Licensed under Apache-2.0. fn main() { tonic_build::compile_protos("proto/pserverpb.proto").unwrap(); }
$ErrorActionPreference = 'SilentlyContinue' (Get-Item "$env:ChocolateyInstall\bin\sudo.exe").Delete() (Get-Item "$env:ChocolateyInstall\bin\gsudo.exe").Delete()
use crate::collections::TreeNode; use std::{cell::RefCell, rc::Rc}; pub fn add_one_row(root: Option<Rc<RefCell<TreeNode>>>, val: i32, depth: i32) -> Option<Rc<RefCell<TreeNode>>> { } pub fn _add_one_row(node: Option<Rc<RefCell<TreeNode>>>, val: i32, depth: i32) -> Option<Rc<RefCell<TreeNode>>> { }
const output = require('next/dist/build/output/log'); const tm = require('next-transpile-modules'); const shell = require('shelljs'); const tmModules = shell .exec('ls ./packages', { silent: true }) .stdout.trim() .split(/\s+/) .map((name) => `@cofe/${name}`); output.info(`next-transpile-modules: ${tmModules....
// portable/BsdSocketStartup.cpp // Created by Robin Rowe on 2019/5/31 // Copyright (c) 2015 Robin.Rowe@CinePaint.org // License open source MIT #ifdef _WIN32 #include "BsdSocketStartup.h" bool portable::BsdSocketStartup::isSingleton; #endif
# The appropriate tarbal and download url can be constructed by the # three-part boost version. i.e. 1.58.0. Therefore, it's normally only # required to override the first few attributes. # Major version number default['boost']['source']['major_ver'] = "1" # Minor version number default['boost']['source']['minor_ver...
using System.Collections.Generic; using System.Diagnostics.Contracts; using System.Linq; namespace LOG670.TP1.Classes { public class Lane { public Lane(List<Object> objects, List<Destination> allDestinations, int identifier) { Objects = objects; AllDestinations = allDestina...
import 'package:charcode/ascii.dart'; import 'package:regular_scanner/src/range.dart'; import 'package:regular_scanner/src/regex/ast.dart'; import 'package:regular_scanner/src/regex/lexer.dart'; import 'package:regular_scanner/src/regex/parser.dart'; import 'package:test/test.dart'; /// Expects that `callback` throws ...
# The Trainer TFX Pipeline Component The Trainer TFX pipeline component trains a TensorFlow model. Trainer consumes: * Training tf.Examples transformed by a Transform pipeline component. * Eval tf.Examples transformed by a Transform pipeline component. * A data schema create by a SchemaGen pipeline component and opt...
(ns domestic.core-test (:require [domestic.core :as sut] [domestic.logger :as logger] [cljs.test :as t :include-macros true] [reagent.core :as reagent] [reagent.dom :as reagent-dom] [helix.core :refer [defnc $]] [helix.hooks :as helix-hooks])) (...
# name: techtalks-ui # about: Encapsulates the UI for techtalks.xyz # version: 0.0.1 # authors: Benjamin Kampmann, Anouk Ruhaak # url: https://github.com/techtalksHQ/techtalks-ui register_asset "javascripts/index.js.es6" # stylesheet register_asset "stylesheets/main.scss" register_asset "stylesheets/vendor/video-js.c...
using DataAccess.Entities; using System.Data.Entity.ModelConfiguration; namespace DataAccess.Configuration { internal class MessageConfiguration : EntityTypeConfiguration<Message> { public MessageConfiguration() { Property(m => m.Text).IsRequired(); HasOptional(m => m....
def aws_connect compute = Fog::Compute.new( :provider => 'AWS', :aws_access_key_id => @access_key, :aws_secret_access_key => @secret_key ) end def list_all_servers(groups, default_group) compute = aws_connect servers_list = [] compute.servers.each do |server| if server_visible(server, group...
from collections import namedtuple n, Score = int(input()), namedtuple('Score', input().split()) # print(Score) scores = [Score(*input().split()).MARKS for i in range(n)] print(sum(map(int, scores)) / n)
<?php /** * @author Maxim Sokolovsky */ namespace WS\Utils\Collections; interface Stack extends Collection { /** * Adds element to the top of stack * @param $element * @return bool */ public function push($element): bool; /** * Gets element from the top of stack * @return ...
package Audio; import javax.sound.sampled.*; import java.io.IOException; import java.net.DatagramPacket; import java.net.DatagramSocket; import java.net.InetAddress; import java.net.SocketException; class Sender implements Runnable { Sender(DatagramSocket socket, AudioFormat format) { this.socket = socke...
export 'package:flutter/material.dart'; export 'package:firebase_auth/firebase_auth.dart'; export 'package:flutter/scheduler.dart'; export 'dart:async'; export 'package:cloud_firestore/cloud_firestore.dart'; export 'scr_welcome.dart'; export 'scr_create_goal.dart'; export 'scr_goal_detail.dart'; export 'model_user.da...
{-# LANGUAGE CPP #-} {-# LANGUAGE OverloadedStrings #-} -- | -- Module : Data.Array.Accelerate.LLVM.Native.Link.Runtime -- Copyright : [2022] The Accelerate Team -- License : BSD3 -- -- Maintainer : Trevor L. McDonell <trevor.mcdonell@gmail.com> -- Stability : experimental -- Portability : n...
PASSWORD=$1 docker-compose down echo $PASSWORD | sudo -S rm -rf ~/.jitsi-meet-cfg make docker-compose up -d
(cl:defpackage :valtan-core/loop (:use :cl)) (cl:in-package :valtan-core/loop) (defvar *loop-exps*) (defvar *named*) (defvar *initially-forms*) (defvar *finally-forms*) (defvar *loop-test-forms*) (defvar *before-update-forms*) (defvar *after-update-forms*) (defvar *result-forms*) (defvar *bindings*) (defvar *it*) (...
using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; using Moq; using Notes.Net.Controllers; using Notes.Net.Models; using Notes.Net.Models.ViewModels; using Notes.Net.Service; using System; using System.IO; using System.Linq; using Xunit; namespace WebApp.Test { public class NoteControllerTest { ...
# download and install the BenchmarkTools Julia package # Pkg.clone("https://github.com/JuliaCI/BenchmarkTools.jl") # load the BenchmarkTools module into the current Julia session using BenchmarkTools # `@benchmark` defines, tunes, and runs the expression you provide it trial_results = @benchmark sin(1) # print the ...
mkdir html pushd tweets/step1 npx qx deploy --out=../../html/step1 --clean --source-maps popd pushd tweets/step2 npx qx deploy --out=../../html/step2 --clean --source-maps popd pushd tweets/step3 npx qx deploy --out=../../html...
part of api; abstract class Xof extends Digest { /// Create the Xof specified by the standard [algorithmName]. factory Xof(String algorithmName) => registry.create<Xof>(algorithmName); /// int doFinalRange(Uint8List out, int outOff, int outLen); int doOutput(Uint8List out, int outOff, int outLen); }
function Get-TargetResource { [CmdletBinding()] [OutputType([System.Collections.Hashtable])] param ( [ValidateSet("Present","Absent")] [System.String] $Ensure = "Present", [parameter(Mandatory = $true)] [System.String] $Principal, [parameter(Mand...
package main import ( "bufio" "fmt" "os" "strings" ) // shows specified prompt and returns one line entered by user func enterTextPrompt(promptText string) string { reader := bufio.NewReader(os.Stdin) fmt.Println("") fmt.Println("///////////////////////////////////////////////////////////////////") fmt.Print...
package server import ( "context" "fmt" "strconv" "testing" "github.com/alicebob/miniredis" api "github.com/memes/pi/v2/api/v2" ) const ( // First 99 fractional digits of pi PI_DIGITS = "1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679" ) func testGetDigit...
import InputValidator from "../utility/InputValidator.js"; function Squad(factionKey, name, year, description, tokens) { InputValidator.validateNotNull("factionKey", factionKey); InputValidator.validateNotNull("name", name); InputValidator.validateIsNumber("year", year); InputValidator.validateNotNull("des...
/// creates a path from several components. all components except for the first are treated as relative paths, even if /// they begin with a leading slash. /// /// # examples. /// /// ``` /// # use ari::path; /// # use std::path::PathBuf; /// /// let path = path!["/var", "/bin", "/ari/hello.so"]; /// /// assert_eq!(pat...
package technology.mainthread.apps.gatekeeper.model.event fun getGatekeeperState(state: String?): GatekeeperState { if (state != null) { val gatekeeperState = state.toUpperCase() when (gatekeeperState) { GatekeeperState.OFFLINE.label -> return GatekeeperState.OFFLINE Gatekee...
#!/usr/bin/env ruby # -*- coding: utf-8 -*- # Emits Git metadata for use in a Zsh prompt. # # AUTHOR: # Ben Hoskings # https://github.com/benhoskings/dot-files/blob/master/files/bin/git_cwd_info # # MODIFIED: # Geoffrey Grosenbach http://peepcode.com # The methods that get called more than once are memoized. ...
export { ArcOverlayMixin, ArcOverlayMixinConstructor } from './src/ArcOverlayMixin' export { ArcOverlayBackdrop } from './src/ArcOverlayBackdrop' export { ArcOverlayManager } from './src/ArcOverlayManager' export { ArcFocusableHelper } from './src/ArcFocusableHelper'
package com.yashovardhan99.composenotes import org.junit.Assert.* import org.junit.Test import java.util.* class RoomConvertersTest { private val date = Calendar.getInstance().apply { set(Calendar.YEAR, 2020) set(Calendar.MONTH, Calendar.SEPTEMBER) set(Calendar.DAY_OF_MONTH, 8) }.time ...
#!/usr/bin/perl use strict; foreach (@ARGV) { $ENV{MASON_NO_CLEANUP} = 1; my @command = (-e 'Build' ? ('Build', 'test', "test_files=$_", 'verbose=1') : ('make', 'test', "TEST_FILES=$_", 'TEST_VERBOSE=1') ); print "@command\n"; system @command; }
/* * Copyright (c) 2020, Xiaomi and/or its affiliates. All rights reserved. * * 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 * * Unl...
package cn.iocoder.yudao.adminserver.modules.activiti.convert.oa; import java.util.*; import cn.iocoder.yudao.framework.common.pojo.PageResult; import org.mapstruct.Mapper; import org.mapstruct.factory.Mappers; import cn.iocoder.yudao.adminserver.modules.activiti.controller.oa.vo.*; import cn.iocoder.yudao.adminserv...
const fs = require('fs'); const path = require('path'); const globby = require('globby'); const ejs = require('ejs'); const mkdirp = require('mkdirp'); module.exports = async (options) => { const templatedir = path.resolve(__dirname, '../template'); const templates = globby.sync([ path.join(templatedir, '**/*'...
import { ApiProperty } from '@nestjs/swagger'; import { AsteroidEntity } from '../entities/asteroid.entity'; import { PlanetEntity } from '../entities/planet.entity'; import { SunEntity } from '../entities/sun.entity'; export class GetSolarSystemResponceDto { @ApiProperty({ type: [PlanetEntity] }) planets: PlanetE...
<?php /** * 2007-2015 PrestaShop * * NOTICE OF LICENSE * * This source file is subject to the Academic Free License (AFL 3.0) * that is bundled with this package in the file LICENSE.txt. * It is also available through the world-wide-web at this URL: * http://opensource.org/licenses/afl-3.0.php * If you did no...
using System.Collections.Generic; using Mono.Cecil; using Mono.Cecil.Cil; using Xamarin.Forms.Build.Tasks; namespace Xamarin.Forms.Xaml { interface ICompiledValueProvider { IEnumerable<Instruction> ProvideValue(VariableDefinitionReference vardefref, ModuleDefinition module, BaseNode node, ILContext context); } }
/* vim:set ts=4 sw=4 sts=4 et: */ /* plfit.h * * Copyright (C) 2010-2011 Tamas Nepusz * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or (at * your opti...
#define _GNU_SOURCE 1 #include <netinet/in.h> #include <fcntl.h> #define BUFFER_SIZE 64 struct client_data { sockaddr_in address; // client socket addr char *write_buf; // write to client char buf[BUFFER_SIZE]; // read from client }; int setnonblock(int fd) { int old_option = fcntl(fd, F_GETF...
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE DerivingStrategies #-} {-# LANGUAGE DeriveAnyClass #-} module Views.DBSpec where import qualified Generics.SOP as SOP import qualified GHC.Generics as GHC import Test.Hspec import Views.Public import Squeal.PostgreSQL import Data.Int ...
// // TBVImageBrowserView.h // TBVImageBrowser // // Created by tripleCC on 9/13/16. // Copyright © 2016 tripleCC. All rights reserved. // #import <UIKit/UIKit.h> #import "TBVImageProviderManagerProtocol.h" @class TBVImageBrowserView; @class TBVImageBrowserConfiguration; @protocol TBVImageBrowserViewDelegate <NS...
void cairo_append_path() {} ; void cairo_arc() {} ; void cairo_arc_negative() {} ; void cairo_clip() {} ; void cairo_clip_extents() {} ; void cairo_clip_preserve() {} ; void cairo_close_path() {} ; void cairo_copy_clip_rectangle_list() {} ; void cairo_copy_page() {} ; void cairo_copy_path() {} ; void cairo_copy_path_fl...
using System; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using Microsoft.EntityFrameworkCore; namespace MiWebAPIMVC.Models { public class Producto { public int ID {get; set;} public string Nombre {get; set;} public string Categoria {get; set;} ...
class UserSerializer include FastJsonapi::ObjectSerializer attributes :id, :name, :password, :email has_many :works has_many :projects end
[bits 32] section .text global probe_fpu probe_fpu: mov eax, cr0 bt eax, 2 jc fpu_not_detected bt eax, 4 jnc fpu_not_detected btr eax, 2 btr eax, 4 mov cr0, eax fninit fnstsw [fpu_test_word] cmp word [fpu_test_word], 0 mov cr0, eax jne fpu_not_detected mov eax...
# frozen_string_literal: true class Repositories::DestroyService < Repositories::BaseService def execute return success unless repository return success unless repo_exists?(disk_path) # Flush the cache for both repositories. This has to be done _before_ # removing the physical repositories as some e...
<?php namespace App\Model; class ProdutoDao { public function create(Produto $p){ $sql = 'INSERT INTO produtos (nome, descricao) VALUES (?,?)'; $stmt = Conexao::getConn()->prepare($sql); $stmt->bindValue(1, $p->getNome()); $stmt->bindValue(2, $p->getDescricao()); ...
<?php /* * NeutrinoAPI * * This file was automatically generated for NeutrinoAPI by APIMATIC v2.0 ( https://apimatic.io ). */ namespace NeutrinoAPILib\Models; use JsonSerializable; /** * @todo Write general description for this model */ class GeocodeAddressResponse implements JsonSerializable { /** * ...
package docking import ( "fmt" "strconv" ) type Mask1 struct { ones Value // holds 1 where the mask has a one zeros Value // holds 0 where the mask has a zero } // NewMask parses a mask and returns it func NewMask(s string) (Mask1, error) { // replace all Xes and 0s by 1s zeros, err := strconv.ParseUint(onesR...
/* * Copyright (C) 2016 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 ...
# Sources schema # --- !Ups create table "sources" ( "id" BIGSERIAL NOT NULL PRIMARY KEY, "section" VARCHAR NOT NULL, "group" VARCHAR, "url" VARCHAR NOT NULL, "site_url" VARCHAR, "title" VARCHAR ); # --- !Downs DROP TABLE "sources";
#import <Foundation/Foundation.h> #import <AVFoundation/AVFoundation.h> #import "BFDecoder.h" /** * Opus implementation of the decoder. */ @interface BFOpusDecoder : BFDecoder /** * Customized initializer. * * @param audioFormat * format of the audio data. * @param frameDuration * duration o...
module Paperclip # Provides two helpers that can be used in migrations. # # In order to use this module, the target class should implement a # +column+ method that takes the column name and type, both as symbols, # as well as a +remove_column+ method that takes a table and column name, # also both symbols. ...
-module(cerlnan_avro_socket_v1). -behaviour(cerlnan_avro_socket). -export([init/1, publish_blob/3]). -define(VERSION, 1). -define(CONTROL_SYNC, 1). %%==================================================================== %% Types %%==================================================================== -type v1_state(...
module Memberships class UpdateStays def initialize(project_id, membership_ids) @project_id = project_id @membership_ids = membership_ids end def call return if @membership_ids.nil? Membership.where.not(id: clear_ids).where(project_id: @project_id).update_all(stays: false) M...
var options = { /** * @member $.fn.ajaxSelectPicker.defaults * @deprecated Since version `1.2.0`, see: {@link $.fn.ajaxSelectPicker.defaults#preprocessData}. * @cfg {Function} ajaxResultsPreHook */ /** * @member $.fn.ajaxSelectPicker.defaults * @cfg {Object} ajax (required) *...
// https://app.codility.com/programmers/lessons/5-prefix_sums/count_div/ function countDiv(A: number, B: number, K: number): number { const firstDiv = Math.floor(A / K); const lastDiv = Math.floor(B / K); const offset = A % K === 0 ? 1 : 0; return lastDiv - firstDiv + offset; } describe('countDiv', () => { ...
json.array!(@raids) do |raid| json.extract! raid, :id, :title, :date, :time, :location_id json.url raid_url(raid, format: :json) end
# Rules for updating instance groups Updating an instance group is performed to ensure minimum implications for the instances managed by the group. In ascending order of risk, instance groups can perform the following actions: * Updating an instance without stopping. * Updating an instance with restart: stopping and...
package com.google.api.client.util; final class NanoClock$1 implements NanoClock { public long nanoTime() { return System.nanoTime(); } }
/* * Copyright 2022 HM Revenue & Customs * * 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 a...
#! /bin/sh # # build.sh # Copyright (C) 2021 Yang Liu <liuyang2020@amss.ac.cn> # # Distributed under terms of the GPL license. # set -e # # get file's name # if [[ $# == "1" ]]; then fileName=`echo *.tex` elif [[ $# == "2" ]]; then fileName=$2 else echo "----------------------------------------------------------...
import 'package:flutter/material.dart'; class CustomAppBarWidget extends StatelessWidget implements PreferredSizeWidget { final String? title; const CustomAppBarWidget({Key? key, this.title}) : super(key: key); @override Widget build(BuildContext context) { return AppBar( title: Row( chi...
# frozen_string_literal: true require 'spec_helper' describe RubyTerraform::Commands::Plan do before do RubyTerraform.configure do |config| config.binary = 'path/to/binary' config.logger = Logger.new(StringIO.new) end end after do RubyTerraform.reset! end it 'logs the command being...
require 'spec_helper' describe Jackpot::PaymentsController do let(:user) { FactoryGirl.create(:user) } before :each do sign_in :user, user end describe "POST 'create'" do before(:each) do Jackpot::Customer.stub!(:find).with('42').and_return customer Jackpot::Customer.stub!(:find).wit...
using TrajectoryOptimization using RobotDynamics using StaticArrays using LinearAlgebra const TO = TrajectoryOptimization const RD = RobotDynamics
(defpackage :functional-trees/interval-trees (:nicknames :ft/it) (:use :common-lisp :alexandria :iterate) (:shadowing-import-from :fset :convert) (:export itree itree-root itree-size node node-left node-right node-key node-lo node-hi node-data node-size itree-find-node itree-fin...
#!/bin/bash #-------------------------------------------- # Name: SES SMTP CONVERTER # Author: Tomas Nevar (tomas@lisenet.com) # Version: v1.0 # Date: 14/10/2014 (dd/mm/yy) # Licence: copyleft free software #-------------------------------------------- # # Many thanks to: # http://blog.celingest.com/en/201...
<?php namespace Billmate\BillmateCheckout\Model\Config\Source; class Attributes implements \Magento\Framework\Option\ArrayInterface { /** * Get status options * * @return array */ public function toOptionArray(){ return [ 'super' => 'Show Super Attributes', 'all' => 'Show All...
var dataset = ee.ImageCollection('IDAHO_EPSCOR/PDSI') .filter(ee.Filter.date('2018-07-01', '2018-08-01')); var pdsi = dataset.select('pdsi'); var pdsiVis = { min: -5.0, max: 10.0, palette: ['red', 'yellow', 'green', 'cyan', 'blue'], }; Map.setCenter(-115.356, 38.686, 5); Map.addLayer(pdsi, pdsiV...
N = gets.chomp.to_i A = gets.chomp.split(" ").map(&:to_i) A.unshift(0) A << 0 dist = [] sum = 0 p = 0 A.each_with_index do |a, i| sum += (p-a).abs p = a dist[i] = sum end N.times do |i| sum = dist[i] p = A[i] A[i+2..-1].each_with_index do |a, idx| sum += (p - a).abs p = a end puts sum end
class ImagesController < ApplicationController def show image = Image.order('random() asc').first redirect_to image.file.url end def download if user_signed_in? Dropbox::Copier.copy_to_users_dropbox current_user.id, params[:id] end render :nothing => true end end
<?php /** * @author Todd Burry <todd@vanillaforums.com> * @copyright 2009-2017 Vanilla Forums Inc. * @license MIT */ namespace Garden\Container\Tests; use Garden\Container\Container; use Garden\Container\Tests\Fixtures\Db; /** * Tests for the container's rule factories. */ class RuleFactoryTest extends Abstract...
; RUN: llc -O0 -mtriple=x86_64-apple-darwin %s -o %t -filetype=obj ; RUN: llvm-dwarfdump -debug-dump=info %t | FileCheck %s @e = global i16 0, align 2 !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!9} !0 = metadata !{i32 786449, metadata !8, i32 4, metadata !"clang version 3.2 (trunk 165274) (llvm/trunk 165272)", i1 f...
<?php namespace App\Models; use DirectoryIterator; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Relations\BelongsTo; use Illuminate\Database\Eloquent\Relations\BelongsToMany; use Illuminate\Database\Eloquent\Relations\HasMany; use Illu...
package clierror import ( "errors" "fmt" "github.com/aws/amazon-genomics-cli/internal/pkg/cli/clierror/actionableerror" "github.com/rs/zerolog/log" ) type Error struct { Command string CommandVars interface{} Cause error SuggestedAction string } func (e *Error) Error() string { messag...
package com.twitter.finagle.client import com.twitter.finagle.{Filter, Service, SimpleFilter} import com.twitter.util.tunable.Tunable import com.twitter.util.{Duration, Future} import scala.collection.mutable /** * @see [[MethodBuilderScaladoc]] */ private[finagle] class MethodBuilderTimeout[Req, Rep] private[clien...
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile plugins { id("otel.library-instrumentation") id("org.jetbrains.kotlin.jvm") } dependencies { library("io.ktor:ktor-server-core:1.0.0") implementation("io.opentelemetry:opentelemetry-extension-kotlin") compileOnly("org.jetbrains.kotlin:kotlin-stdlib-j...
// <copyright file="ViewModelBase.cs" company="Hexhead404"> // Copyright (c) Hexhead404. All rights reserved. // </copyright> namespace ConversationLogger.Viewer.ViewModels { using System; using System.ComponentModel; using System.Runtime.CompilerServices; /// <summary> /// A base class for view ...
package shapes.vector.rectilinear; import shapes.vector.Vector; import shapes.vector.VectorShape; public class Propane implements VectorShape { public static final double DIAM_SMALL = 8.0/14.0; // Middle diam is 1. public static final double CHECK_1 = 1.0/6.0; public static final double CHECK_2 = 1.0/6.0...
def anagram(s) string_length = s.length return -1 if string_length.odd? blacklist = [] half_string_length = string_length/2 first_half_string = s[0...half_string_length] last_half_string = s[half_string_length...string_length] to_leave_count = 0 first_half_string.split('').each do |x| unless blac...
# go-aliyundrive > 阿里云盘 Go SDK ## 安装 ```shell go get github.com/chyroc/go-aliyundrive ``` ## 使用 ### 初始化 SDK 实例 ```go ins := aliyundrive.New() // 下面所有提到的 ins 都是指这个实例 ``` ### 登录 > [具体代码参考这里](./_examples/login-by-qrcode/main.go) ```go user, err := ins.Auth.LoginByQrcode(context.TODO()) ``` <img src="screenshot...
; Source for testing in and out instructions in a (0) ; valid out (1) a ; valid in b (200) ; invalid in a b ; invalid
#!/bin/bash PACKAGE="github.com/gravitational/workshop/crd/controller" # run the code-generator entrypoint script $GOPATH/src/k8s.io/code-generator/generate-groups.sh \ "deepcopy,client,informer,lister" \ $PACKAGE/pkg/generated \ $PACKAGE/pkg/apis \ nginxcontroller:v1
import { Option, Obj } from '@ephox/katamari'; const readOpt = function (key) { return function (obj) { return Obj.has(obj, key) ? Option.from(obj[key]) : Option.none(); }; }; const readOr = function (key, fallback) { return function (obj) { return Obj.has(obj, key) ? obj[key] : fallback; }; }; const...
def render(cells) grid = cells.reduce({}) do |acc, cell| acc[cell] = 1 acc end xs = cells.map { |x, y| x } ys = cells.map { |x, y| y } puts "---GENERATION---" puts "(#{xs.min},#{ys.min}) (#{xs.max},#{ys.max})" puts graph(grid, xs, ys) end def graph(grid, xs, ys) ((xs.min - 1)..(xs.max + 1)).t...
#!/bin/sh # # $Id$ flunk () { echo "$0: $@" >&2 exit 1 } srcdir="$(cd "$(dirname "$0")"/.. && pwd)" || exit 1 testdir=$srcdir/test/t ruby=${RUBY:-$(which ruby)} while getopts d opt; do case "$opt" in d) debug=1 ;; esac done shift $(($OPTIND - 1)) initialize () { mkdir -p $testdir || ...
# frozen_string_literal: false require "bundler/version" if Bundler::VERSION.split(".").first.to_i >= 2 if Gem::Version.new(Object::RUBY_VERSION.dup) < Gem::Version.new("2.3") abort "Bundler 2 requires Ruby 2.3 or later. Either install bundler 1 or update to a supported Ruby version." end end
'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); require('./chunk-14c82365.js'); require('./helpers.js'); require('./chunk-60255743.js'); require('./chunk-f15fa0c2.js'); require('./chunk-16a405b8.js'); var __chunk_5 = require('./chunk-13e039f5.js'); require('./chunk-e2eb88e7.js'); require(...
# v2.5.7 ## Bugfix - fixed version in console - fixed UI bug: multiple doi overlap - fixed UI bug: sometimes missing doi are also rendered - fixed waxholm v4 preview image ## Feature - Add menu to change perspective orientation by coronal/sagittal/axial views. - re-introduced saneUrl ## Under the hood - added san...
const IKAKAUDET_UPDATED = (state, items) => { state.ikakaudet = items } const ALALEIRIT_UPDATED = (state, items) => { state.alaleirit = items } export { IKAKAUDET_UPDATED, ALALEIRIT_UPDATED }
<?php namespace App\Http\Controllers; use Illuminate\Http\Request; use App\User; /** * @OA\Info( * version="1.0.0", * title="TDI API", * ) */ /** * @OA\Server( * url="http://tdi-api.test:81/api", * description="L5 Swagger OpenApi Server", * ) */ /** * @OA\SecurityScheme( * type="o...
#!/bin/bash echo "running the $0 script test" read -p 'see bin?' see_bin if [[ $see_bin = "yes" ]]; then #statements myComandVar=$( ls /bin ) else echo "you said $see_bin" fi echo "This is my Bin: $myComandVar" if [[ -d /usr/local/Caskroom/google-cloud-sdk ]]; then read -p 'Enter something here: ' parm1 myV...
using GatewayServer.ConfigrationAPI.Dtos; using Microsoft.AspNetCore.Mvc; namespace GatewayServer.ConfigrationAPI.Controllers { [ApiController] [Route("api/routes")] public class RouteController : ControllerBase { private readonly ILogger<RouteController> _logger; public RouteControll...
# 运行原理 ## 1. 整体架构 ![](./picture/architecture.png) 整个体系分为如下部分: ### 1.1. 节点服务器 节点服务器相关的组件包括: #### 1)FISCO BCOS节点 FISCO BCOS节点的账本按照mysql存储。每次新增加一个区块,都会为mysql里添加一些数据。mysql表的变化会被记录到binlog中。binlog目录被放在data/groupX/BinaryLogs目录下,x表示群组号: #### 2)Nginx FISCO BCOS节点本身并不会暴露binlog,如果希望外界读取到binlog,需要借助nginx。通过在nginx中配置端口和binl...