text
stringlengths
27
775k
from datetime import datetime, timedelta from functools import wraps import logging import icat.client from icat.entities import getTypeMap from icat.exception import ( ICATInternalError, ICATNoObjectError, ICATObjectExistsError, ICATParameterError, ICATSessionError, ICATValidationError, ) fro...
#!/usr/bin/ruby require 'fileutils' def usage puts "usage: #{File.basename $0} <destination-to-update>" puts puts "<destination-to-update> values:" puts puts " Tools - Copy the UserInterface files to the Tools directory" puts " UserInterface - Copy the Tools files to the UserInterface directory"...
<?php namespace App\Http\Controllers; use Tightenco\Ziggy\Ziggy; class ZiggyController { public function index() { return response()->json(new Ziggy()); } }
```jsx import React from 'react'; import { AmplifyAuthenticator, AmplifySignUp, AmplifySignIn } from '@aws-amplify/ui-react'; const App = () => { return ( <AmplifyAuthenticator usernameAlias="email"> <AmplifySignUp slot="sign-up" usernameAlias="email" formFields={[ { ...
#include <QApplication> #include <QQmlApplicationEngine> #include <QQuickWindow> #include <QQmlContext> #include <QtQml> #include "ganalytics.h" int main(int argc, char* argv[]) { QApplication::setApplicationName("QtQuick-App"); QApplication::setApplicationVersion("0.1"); QApplication app(argc, argv); ...
package com.shibuiwilliam.firebase_tflite_arcore import android.Manifest import android.content.pm.PackageManager import android.graphics.Bitmap import android.graphics.BitmapFactory import android.graphics.Matrix import android.graphics.Rect import androidx.appcompat.app.AppCompatActivity import android.os.Bundle imp...
import 'package:asset_repository/asset_repository.dart'; import 'package:flutter/material.dart'; import 'package:polist/detail_page.dart'; class HomeItem extends StatelessWidget { HomeItem({Key key, @required Asset asset}) : assert(asset != null), _asset = asset, super(key: key); final Asset...
// Copyright by Barry G. Becker, 2017. Licensed under MIT License: http://www.opensource.org/licenses/MIT package com.barrybecker4.simulation.verhulst /** * Everything we need to know about a population of creatures. * @author Barry Becker */ abstract class Population() { var birthRate = .0 private var popu...
#!/usr/bin/env bash python train_parse_generator.py \ --model_dir ./model \ --output_dir ./output_pg \ --dictionary_path ./data/dictionary.pkl \ --train_data_path ./data/train_data.h5 \ --valid_data_path ./data/valid_data.h5 \ --max_sent_len 40 \ --max_tmpl_len 100 \ --max_synt_len 160 \ --word_dropo...
import { getSession, withApiAuthRequired } from "@auth0/nextjs-auth0"; import { addUserUserGoal } from "../../utils/fauna"; export default withApiAuthRequired(async function handler(req, res) { const { user } = getSession(req, res); if (req.method !== "POST") { return res .status(405) .json({ erro...
#!/usr/bin/env ruby # encoding: utf-8 # frozen_string_literal: true require 'spec_helper' describe CloudPayments::Namespaces::Orders do subject{ described_class.new(CloudPayments.client) } describe '#create' do let(:attributes) do { amount: 10.0, currency: 'RUB'...
module I18n # Implemented to support method call on translation keys INTERPOLATION_WITH_METHOD_PATTERN = Regexp.union( /%%/, /%\{(\w+)\}/, /%<(\w+)>(.*?\d*\.?\d*[bBdiouxXeEfgGcps])/, /%\{(\w+)\.(\w+)\}/ ) class << self def interpolate_hash(string, values) string.gsub(INTERPOLATION_WIT...
require 'spec_helper' describe Typhoeus do before(:each) do Typhoeus.configure { |config| config.verbose = false; config.block_connection = false } end describe ".configure" do it "yields config" do Typhoeus.configure do |config| expect(config).to be_a(Typhoeus::Config) end end ...
// ---------------------------------------------------------------------------------- // // Copyright Microsoft Corporation // 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://w...
<!-- Do not edit this file. It is automatically generated by API Documenter. --> [Home](./index.md) &gt; [bullmq](./bullmq.md) &gt; [JobsOptions](./bullmq.jobsoptions.md) &gt; [priority](./bullmq.jobsoptions.priority.md) ## JobsOptions.priority property Ranges from 1 (highest priority) to MAX\_INT (lowest prio...
package com.telenor.possumlib.abstractservices; import android.content.Intent; import com.telenor.possumlib.functionality.AmazonFunctionality; import com.telenor.possumlib.interfaces.IAmazonIdentityConfirmed; /** * Service dealing with amazon's S3 service */ public abstract class AbstractAmazonService extends Abst...
const fs = require('fs'); const tour = JSON.parse(fs.readFileSync(`${__dirname}/../data/tours.json`, 'utf-8')); // user相关API模拟 exports.getAllUser = (req, res) => { console.log('返回所有的数据!'); res.status(200).json({ status: 'success', nowTime: req.nowTime, data: 'all user!', }); }; e...
package com.daasuu.sample; import android.graphics.Bitmap; import android.graphics.Canvas; import com.daasuu.mp4compose.filter.GlOverlayFilter; /** * Created by sudamasayuki on 2018/01/07. */ public class GlBitmapOverlaySampleFilter extends GlOverlayFilter { private Bitmap bitmap; public GlBitmapOverlayS...
const VotingConverter = { type: 'x-my/voting', tagName: 'object', matchElement: function(el) { //console.log("TEST" + el.is('object[type="x-my/voting"]')) return el.is('object[type="x-my/voting"]') }, import: function(el, node) { node.id = el.attr(...
/* * Copyright (c) 2018 Texas Instruments Incorporated - http://www.ti.com * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above cop...
/*eslint no-unused-vars: ["error", { "vars": "local" }]*/ //http://stackoverflow.com/a/14853974 window.arrayEquals = function(a, b) { 'use strict'; // if the other array is a falsy value, return if (!b) return false; // compare lengths - can save a lot of time if (a.length != b.length) return false; for (...
#!/bin/bash set -e function debug_and_die { OUTPUT_PATH=$HOME/.zkg/testing/external_dns/clones/external_dns if [ -s $OUTPUT_PATH/zkg.test_command.stdout ]; then echo "zkg test command stdout" echo "-----------------------" cat $OUTPUT_PATH/zkg.test_command.stdout fi if [ -s $OUTPUT_PATH/zkg.te...
# ImagePlot [![Build Status](https://travis-ci.org/rened/ImagePlot.jl.svg?branch=master)](https://travis-ci.org/rened/ImagePlot.jl) A very simple package for drawing on top of images, based on work by @cdsousa. #### Lets draw a sun ```jl using ImagePlot, TestImages img = plot(testimage("lighthouse"), 30*randn(2,1...
# encoding: UTF-8 import urllib import requests import hashlib import hmac import base64 import json from datetime import datetime from collections import OrderedDict import pandas as pd class HuobiAgent: ''' symbol: btcusdt, bchbtc period: 1min, 5min, 15min, 30min, 60min, 1day, 1mon, 1week, 1year '''...
HelixToolkit.Extended ===================== Loading models from ZIP file ---------------------------- using ICSharpCode.SharpZipLib.Zip; using System.Windows.Threading; --- using (var zipFile = new ZipFile("Resources.zip")) { var reader = new ObjReaderZip(zipFile, Dispatcher.CurrentDispa...
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading; using System.Threading.Tasks; namespace Cosmos.Awaitable { internal class CoroutineAwaiterMonitor : MonoSingleton<CoroutineAwaiterMonitor> { /// <summary> /// 用于线程同步;多线程的数据发送到unity的主线...
using NUnit.Framework; namespace Svg.UnitTests { [TestFixture] public class SvgAttributeCollectionTests { [Test] public void TestGetInheritedAttribute() { var owner = new SvgCircle(); var parent = new SvgFragment(); parent.Children.Add(owner); ...
val flyway_version: String by project dependencies { api("org.flywaydb:flyway-core:$flyway_version") api(project(":ktor-sql")) }
/* * Copyright (c) 2017 - 2021 Pedro Falcato * This file is part of Onyx, and is released under the terms of the MIT License * check LICENSE at the root directory for more information * * SPDX-License-Identifier: MIT */ #include <assert.h> #include <onyx/limits.h> #include <stdio.h> #include <errno.h> #include <...
package com.github.pshirshov.izumi.distage.testkit.services import org.scalatest.exceptions.TestCanceledException private[testkit] trait IgnoreSupport { protected final def ignoreThisTest(cause: Throwable): Nothing = { ignoreThisTest(None, Some(cause)) } protected final def ignoreThisTest(message: String):...
import React, { useEffect, useState } from 'react'; import { AiOutlineLoading3Quarters } from 'react-icons/ai'; import { Link } from 'react-router-dom'; import { toast } from 'react-toastify'; import { Form } from '@unform/web'; import { InputPrice } from '~/components'; import api from '~/services/api'; import { con...
# frozen_string_literal: true require 'test_helper' module SexpExamples def self.included(base) base.let(:sexp_with_initialize) { parse_file('road_bike.rb') } base.let(:sexp_without_initialize) do RubyParser.new.parse(<<~EMPTY_CLASS_DEFINITION) class Scooter end EMPTY_CLASS_DEFIN...
describe 'NSData' do before do @file_name = 'write_to_file'.temporary_path @url = NSURL.alloc.initFileURLWithPath 'write_to_file'.temporary_path end describe 'writing to a file' do it 'should write data to a file' do subject = 'data'.dataUsingEncoding(NSUTF8StringEncoding) subject.write_...
using WebGL; namespace THREE { public class LineDashedMaterial : Material { public Color color; public dynamic linewidth; public dynamic scale; public dynamic dashSize; public dynamic gapSize; public dynamic vertexColors; public dynamic fog; public LineDashedMaterial(dynamic parameters = null) { ...
# frozen_string_literal: true require 'rails_helper' RSpec.describe 'injuries/index', type: :view do before(:each) do bridge = FactoryBot.create(:bridge) @regular_inspection = FactoryBot.create(:regular_inspection, bridge: bridge) component1 = FactoryBot.create(:component, bridge: bridge) component2...
import React, { Component } from "react"; import { bindActionCreators } from "redux"; import { connect } from "react-redux"; import { Divider } from "antd"; import PropTypes from "prop-types"; import queryString from "query-string"; import { getMineRegionHash } from "@common/selectors/staticContentSelectors"; import { ...
package org.fisco.bcos.sdk.amop; import io.netty.util.Timeout; public abstract class AmopResponseCallback { private Timeout timeout; public Timeout getTimeout() { return timeout; } public void setTimeout(Timeout timeout) { this.timeout = timeout; } public abstract void onRes...
import { IAIREP, IAVT7Metar, IAirSigmet, IAirSigmetOptions, IAircraftReportsOptions, IClientOptions, IDatasourceType, IGAirMet, IGAirmetOptions, IMetaSkyCondition, IMetar, IMetarOptions, IOptions, IStation, IStationOptions, ITaf, ITafOptions, } from "./index.js"; import axios from "axi...
import * as Either from 'fp-ts/lib/Either'; import * as Option from 'fp-ts/lib/Option'; import { pipe } from 'fp-ts/lib/pipeable'; import * as TaskEither from 'fp-ts/lib/TaskEither'; import { defaults } from 'lodash'; import { IPrism, IPrismComponents, IPrismConfig, IPrismDiagnostic, IPrismProxyConfig } from './types';...
# -*- coding:utf-8 -*- import sys reload(sys) sys.setdefaultencoding('utf-8') class ValidationError(ValueError): pass
package com.fintechplatform.api.profile.models data class UserDocuments(val userId: String?, val documentId: String?, val docType: DocType?, val bucketObjectIdPages: List<String>?, val imagesBase64: List<String>? = null...
import ServiceSettings from "../settings"; const BaseURL = ServiceSettings.apiURL; export {BaseURL};
-- -- this test shows the dependency system in action; -- autocommit off; create table t(i int); create table s(i int); prepare ins as 'insert into t (i) values (1956)'; prepare ins_s as 'insert into s (i) values (1956)'; prepare sel as 'select i from t'; prepare sel2 as 'select i from (select i from t...
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- 主机: localhost -- 生成日期: 2020-12-22 22:33:28 -- 服务器版本: 8.0.19 -- PHP 版本: 7.4.4 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET...
#!/usr/bin/env python ''' tags ---- Extract all tags from the file. ''' import json import os from collections import Counter # CONSTANTS # --------- HOME = os.path.dirname(os.path.realpath(__file__)) JSON = os.path.join(HOME, "json") TAGS = os.path.join(HOME, "tags") # FUNCTIONS # --------- def pr...
/* Myrtille: A native HTML4/5 Remote Desktop Protocol client. Copyright(c) 2014-2021 Cedric Coste 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...
#!/bin/bash DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" docker images thoughtworks/strongauth-tests | grep thoughtworks/strongauth-tests if [ $? == 0 ]; then echo "deleting go image" docker rmi -f thoughtworks/strongauth-tests else echo "go image doesn't exist" fi docker build --tag "thoughtw...
#include "PolyphonyGroup.h" #include <absl/algorithm/container.h> sfz::PolyphonyGroup::PolyphonyGroup() { voices.reserve(config::maxVoices); } void sfz::PolyphonyGroup::setPolyphonyLimit(unsigned limit) noexcept { polyphonyLimit = limit; } void sfz::PolyphonyGroup::registerVoice(Voice* voice) noexcept { ...
// Developed by Softeq Development Corporation // http://www.softeq.com using System; using System.IO; using Autofac; using CorrelationId; using EnsureThat; using Softeq.NetKit.Auth.AppServices.Utility; using Softeq.NetKit.Auth.Common.EmailTemplates; using Softeq.NetKit.Auth.Common.Utility.Hashing; using Softeq.NetKi...
<?php namespace Nwidart\Themes\Commands; use Illuminate\Console\Command; class SetupCommand extends Command { /** * The console command name. * * @var string */ protected $name = 'theme:setup'; /** * The console command description. * * @var string */ protecte...
## [coolq-cross-bot](https://github.com/kizx/coolq-cross-bot) 基于[酷Q](https://cqp.cc/)和[nonebot](https://nonebot.cqp.moe/)的QQ机器人 ## 功能 * handsome时光机功能 > 功能说明见[我的博客](https://www.2bboy.com/archives/124.html) * 群管理功能 > 目前包括群成员加好友自动同意、入群欢迎和退群提示、清除酷Q图片缓存、智能复读机
Pod::Spec.new do |s| s.name = 'UseDesk_SDK_Swift' s.version = '0.3.10' s.summary = 'A short description of UseDesk.' s.description = <<-DESC TODO: Add long description of the pod here. DESC s.homepage = 'https://github.com/usedesk/UseDeskSwift...
using System; using System.Collections.Generic; using System.Reflection; using System.Threading.Tasks; using System.Web.Cors; using System.Web.Hosting; using Autofac; using Autofac.Extras.FileSystemRegistration; using Microsoft.Owin; using Microsoft.Owin.Cors; using MirrorSharp; using MirrorSharp.Advanced; ...
/** * Copyright (C) 2016-2020 Xilinx, Inc * * Licensed under the Apache License, Version 2.0 (the "License"). You may * not use this file except in compliance with the License. A copy of the * License is located at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agre...
--- layout: post title: "使用Lua管理不同的渠道" tags: [Lua, cocos] --- 最近做的项目需要去接不同渠道. 由于各种因素, 导致逻辑代码里分布了各种 if .. else 去进行不同渠道的需求处理, 时间一长会造成原有的代码逻辑会更加混乱. 为了防止之前的代码更加混乱, 所以把不用渠道的逻辑进行了相对统一的处理, 对于游戏逻辑代码, 只需要使用SDKManager:XXX就可自动调用相应的渠道代码, 如: ``` lua SDKManager:getOpenId() ``` # 分析 和接SDK的妹子了聊了聊, 基本的SDK都会有以下的功能 * 获取openid * 支...
package io.github.danielpeach.plugin import com.google.protobuf.Empty import io.github.danielpeach.plugin.grpc.GRPCStdioGrpcKt import io.grpc.ManagedChannel import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.channels.Channel import kotlinx.coroutines.channels.consumeEach import kotlinx.coroutines.flow....
// Copyright 2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or ...
#!/bin/bash set -e # Read the current version from the file VERSION VERSION=$(cat ../VERSION | tr -d '[[:space:]]') APP=presi-aoke [ -z $QMAKE ] && QMAKE=qmake umask 0022 # Put all of the files in the right places for the Debian package INSTALL_ROOT=../pkg-debian make -C ../build install APP_SIZE=$(du -k usr/bin/p...
--- title: "About" permalink: "/about.html" image: "/assets/images/myAvatar.svg" --- I'm nine and I like playing Fashion Famous and Royal High for fun. I also like playing outside and hanging out with my friends. I like plaing with American girl dolls. My favriote food is pepperoni pizza. Made with <i class="fa fa-he...
<?php require_once("../config/header.php"); $professorDAO = new ProfessorDAO($con); $turmas = $professorDAO->getTurmas(getUserId()); //echo "Turma ".$_POST['select']; foreach ($turmas as $turma) { if($turma->getId() === $_POST['select']) { $selected = $turma; } } ...
package com.purbon.kafka.connect.smt; import org.apache.kafka.common.config.ConfigDef; import org.apache.kafka.common.config.ConfigDef.Importance; import org.apache.kafka.common.config.ConfigDef.Type; import java.util.Map; public class DebeziumTimeTransformConfig extends AbstractConnectConfig { public DebeziumTim...
package main import ( "fmt" "github.com/dynport/gocli" ) type regionsList struct { } func (r *regionsList) Run() error { cl, e := client() if e != nil { return e } rsp, e := cl.Regions() if e != nil { return e } t := gocli.NewTable() for _, r := range rsp.Regions { t.Add(r.Slug, r.Name, r.Available)...
/**************************************************************************** * * Copyright (c) 2013-2017 PX4 Development Team. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Red...
import React from "react" import PropTypes from "prop-types" import { Box, ChakraProvider, useColorMode } from "@chakra-ui/core" // import { merge } from "@chakra-ui/utils" import { SlideFade } from "@chakra-ui/transition" import theme from "../theme" import { Global } from "./global" import SEO from "../../component...
# Week09 ## 基于 react & react-dnd & monaco 实现的基础版low-code 工具 ### 实现方式 * 借助 react-dnd 实现拖拽 * 使用 monaco 显示 json ### 启动方式 * 启动应用 ```code yarn dev ``` * 鼠标拖拽的配置的工具 * 拖动左侧列表的组件至中间 放置部分 * 显示对应组件 * 实时生成对应的配置json * 一个能渲染 JSON 配置的 form 组件 * 复制以下 json 粘贴至 monaco 编辑器中 * 显示对应组件 * 删除部分json 中的顶级 key 会让 for...
import { createServiceFactory, SpectatorService } from '@ngneat/spectator'; import { MockMaster } from '@wa/app/common/mock-master'; import { ComponentService } from './component.service'; describe('ComponentService', () => { let spectator: SpectatorService<ComponentService>; const createService = createServiceFac...
require 'faker' product_types = ["Product", "Component", "Sub component"] FactoryBot.define do factory :product, class: Product do name { Faker::Commerce.product_name } product_type { product_types[Faker::Number.between(0, 2)] } is_assessed {false} factory :product_with_tags, class: Pro...
import { Module } from '@nestjs/common'; import { RequerimientosService } from './requerimientos.service'; import { RequerimientosController } from './requerimientos.controller'; import { RequerimientosProvider } from './requerimientos.provider'; @Module({ providers: [RequerimientosProvider, RequerimientosService], ...
#!/usr/bin/perl # Test "sha1sum". # Copyright (C) 2000-2015 Free Software Foundation, Inc. # 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 3 of the License, or # (at your option...
# archer Written in 2018, this is my first "real" program. While I've come a long way since this, it's fun to look back! archer is built on PyGame, and is an arcade-style game where the objective is to dodge the projectiles shot at you by enemy Cubes while also destroying as many Cubes as you can. ### Installation To ...
import 'package:flutter/material.dart'; extension VisibilitySpreadExtension on Widget { Visibility setVisible(bool visible) => Visibility(visible: visible, child: this); }
<?php namespace App\Http\Controllers; use Illuminate\Http\Request; use App\data; use App\category; use App\client; use App\jurnal_masuk; use App\jurnal_keluar; use Alert; use Excel; class jurnalController extends Controller { // versi 2.0 public function __construct(){ $this->middleware('auth'); } ...
use std::f32; struct Solution {} impl Solution { pub fn bulb_switch(n: i32) -> i32 { let m = n as f32; return m.sqrt() as i32; } } fn main() { let input: i32 = 16; println!("Input: {}", input); println!("Output: {}", Solution::bulb_switch(input)); }
package tests import testkit.{TestFile, Specs} import syntactic.Checker import syntactic.CheckResult import syntactic.Violation import scala.meta.io.AbsolutePath import scala.meta.Dialect abstract class SyntacticSuite extends munit.FunSuite { protected def getTestFile(name: String): TestFile = { val path = Ab...
import React from "react"; import Button from "components/Button"; import MoreVertIcon from "@material-ui/icons/MoreVert"; import { Card, makeStyles, Theme } from "@material-ui/core"; import { LoansAvailableProps } from "screens/LoanConfirmation/LoanConfirmation"; export type CardProps = { data: LoansAvailableProps; ...
package main import ( "flag" "fmt" "io" "os" "path/filepath" "strings" ) var helpFlag bool var rootDir string func NewFlagSet() *flag.FlagSet { ret := flag.NewFlagSet("initialize_toybox", flag.ExitOnError) ret.Usage = func() { fmt.Println("initialize_toybox") ret.PrintDefaults() } ret.BoolVar(&helpFl...
/** * Date: 11/05/2018 * Time: 03:54 */ class TestSubject( var persistenceUnit: String ) { var clazz: Class<*> = Book::class.java override fun toString(): String { return persistenceUnit } }
<?php declare(strict_types = 1); namespace Contributte\Psr7\Extra; use Contributte\Psr7\Exception\Logical\InvalidStateException; trait ExtraServerRequestTrait { use ExtraRequestTrait; /** * QUERY PARAM ************************************************************* */ public function hasQueryParam(string $na...
package es.fernandopal.yato.commands.music; import es.fernandopal.yato.Main; import es.fernandopal.yato.commands.CommandContext; import es.fernandopal.yato.commands.CommandType; import es.fernandopal.yato.commands.ICommand; import es.fernandopal.yato.commands.PermLevel; import es.fernandopal.yato.core.audio.AudioManag...
package com.knight.kotlin.library_widget import android.content.Context import android.util.AttributeSet import android.widget.TextView /** * Author:Knight * Time:2021/12/24 16:51 * Description:MarqueeTextView */ class MarqueeTextView:TextView { @JvmOverloads constructor(context: Context, attributeSet: At...
package com.lany192.box.sample.data.bean import com.google.gson.annotations.SerializedName class ApiResult<T> { @SerializedName(value = "code", alternate = ["errorCode"]) var code = 0 @SerializedName(value = "msg", alternate = ["errorMsg"]) var msg: String? = null @SerializedName(value = "data",...
# Exercise In this exercise we will implement the following computations as recusrsive functions: - sum of the numbers between (lower_value, upper_value) - product of the numbers between (lower_value, upper_value) E.g. recursive_sum(1, 10) => 45 recursive_product(1, 10) => 3628800 ## Main Function ```cpp #inc...
// Copyright 2017 The Gitea Authors. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. package models import ( "testing" "code.gitea.io/gitea/modules/setting" "github.com/stretchr/testify/assert" ) func TestIssueList_LoadRepositories(t *...
# README *forked from [jmfederico/run-xtrabackup.sh](https://gist.github.com/jmfederico/1495347)* Note: have tested on Ubuntu 18.04 with MariaDB 10.3 ## Links [Full Backup and Restore with Mariabackup](https://mariadb.com/kb/en/library/full-backup-and-restore-with-mariabackup/) [Incremental Backup and Restore with...
package com.braffdev.steganofy.lib.domain data class PlainTextPayload(val plaintext: String) : Payload { override fun getType(): Type { return Type.PLAINTEXT } override fun getBytes(): ByteArray { return plaintext.toByteArray() } override fun getLengthInBytes(): Int { retu...
<? $MESS ['STAT_TEMPLATE_SECTION_NAME'] = "Statistics"; $MESS ['STAT_TABLE_DEFAULT_TEMPLATE_NAME'] = "Statistics table"; $MESS ['STAT_TABLE_DEFAULT_TEMPLATE_DESCRIPTION'] = "Displays a table with basic statistical parameters of the site"; ?>
nescalante.github.io ==================== nescalante github page
package AdventOfCode2019 abstract class Rule { def apply(number: Int): Boolean = validate(number) protected def validate(number: Int): Boolean } object IsSixDigit extends Rule { override def validate(number: Int): Boolean = { number.toString.length == 6 } } object AtLeastTwoAdjacentDigitsTheSame extend...
namespace MAVN.Service.SmartVouchers.Client.Models.Responses.Enums { /// <summary> /// Voucher campaign update error codes /// </summary> public enum UpdateVoucherCampaignErrorCodes { /// <summary>No error code</summary> None = 0, /// <summary>Campaign not found</summary> ...
package message import ( "io" "github.com/pkg/errors" ) type ConnAck struct { *Frame Property *ConnAckProperty SessionPresentFlag bool ReasonCode ReasonCode } type ConnAckProperty struct { SessionExpiryInterval uint32 AssignedClientIdentifier string ServerKeepAlive ...
%% ===================================================================== %% @doc An abstraction library providing an interface to the possible %% options supported by hugin. The values returned from the functions %% in this library can be returned in the hugin init/0 callback %% function, or be used in the hugin API fu...
require 'bundler/setup' require 'mini_magick' cursor_x = 0 cursor_y = 0 increment_x = 0 increment_y = 'a' main_image = MiniMagick::Image.open(ARGV[0]) while(cursor_y < main_image.dimensions[1]) do while(cursor_x < main_image.dimensions[0]) do image = MiniMagick::Image.open(ARGV[0]) #puts "cropping " + "128x1...
// Copyright (c) 2013 Couchbase, 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 w...
import 'package:TOrder/db/models/visitor.dart'; import '../dao.dart'; class VisitorDao implements Dao<Visitor> { final tableName = 'visitors'; final columnVisitorCode = 'Visitor_Code'; final _columnVisitorName = 'Visitor_Name'; final _columnMobileNo = 'MobileNo'; final _columnPocketPassword = 'PocketPasswor...
$(document).ready(function(){ $(".imgup").hide(); $("#pic").click(function () { $("#img").click(); //隐藏了input:file样式后,点击头像就可以本地上传 $("#img").on("change",function(){ var objUrl = getObjectURL(this.files[0]) ; //获取图片的路径,该路径不是图片在本地的路径 if (objUrl) { $("#pic").attr("src", objUrl) ; //将图片路径存入src中,显示出图片 } }); }); function...
#!/usr/bin/ruby # Control structures if true 'if statement' elsif false 'else if, optional' else 'else, also optional' end for counter in 1..5 puts "iteration #{counter}" end #=> iteration 1 #=> iteration 2 #=> iteration 3 #=> iteration 4 #=> iteration 5 # HOWEVER # No-one uses for loops # Use `each` instea...
package com.example.movieshowstracker.base import androidx.multidex.MultiDexApplication import com.example.movieshowstracker.di.appComponent import net.danlew.android.joda.JodaTimeAndroid import org.koin.android.ext.koin.androidContext import org.koin.core.context.startKoin class MainApp : MultiDexApplication...
#! /bin/bash function say_world() { echo "World (from lib.sh)" }
#!/bin/bash set -e set -x # Create an HTTP server instance template gcloud compute instance-templates create simple-http-server-v1 \ --machine-type f1-micro \ --region us-east1 \ --tags http-server \ --metadata-from-file startup-script=./startup-script.sh # Create two instances using the instance tem...
<?php namespace App\Http\Controllers; use Illuminate\Http\Request; class AlbumController extends Controller { public function index() { return 'Hello Album!'; } public function test() { // $url = route('profile'); return redirect()->route('album'); } public func...