text
stringlengths
27
775k
<?php namespace Neat\Widget; /** * Prompt widget. */ class Prompt extends Form { /** * Retrieves the HTML string. * * @return string */ public function toHtml() { $dialog = new Dialog; $dialog->bottom = new Bar; $dialog->center = $this->content; $dialog->bottom->right = ...
# 工具类 java 给我们提供了一系列的工具类,我们直接使用接可。 ## 1、处理异常 对于运行时候产生的错误,Java 提供异常处理机制。 Throwable : - Erorr:产生的错误,内存溢出,虚拟机错误等等 - Exception: 可以处理的异常 Exception: - RunTimeException:空指针异常,数组下标越界,算数异常,类型转换异常等 - IO异常:读写文件产生的异常 - SQL异常:操作数据库产生的异常 **(1)try-catch-finally** `try` 必须与`catch` 或 `finally` 组合使用。 ```java int num = 12; ...
var helper = require('../helper'); helper.test({ expect: `.functions-step { width: step(4); }`, toBe: `.functions-step { width: 33.33333%; }` }); helper.test({ expect: `.functions-step-2 { width: step(4, 10); }`, toBe: `.functions-step-2 { width: 40%; }` });
# Group-8 Assignment repository - Group 8 | Name | Student ID | | :------------ |:---------------:| | Anaghashree R K | 2020SP93039 | | Milan Bansal | 2020SP93092 | | Nisha | 2020SP93090 | | Salman Mohammed | 2020SP93060 |
# ng-inactivity-timer ## Description ng-inactivity-timer provides a service that keeps track of user activity based on custom activity monitors. ## Installation Install the package by running `npm install ng-inactivity-timer` ## Usage ### Provide a configuration for the service (numbers are in seconds): ```types...
rootProject.name = "Knowledger" include( "agent", "agent:ontologies", "agent:publish", "annotations", "benchmarks", "collections-extensions", "encoding-extensions", "example", "ledger", "ledger:core", "ledger:core:crypto", "ledger:core:data", "ledger:core:db", "ledger:core:data-serial", "ledger:orient",...
import * as LRU from 'lru-cache' import Koa from 'koa' import Context from '../context' export type RenderFn = (ctx: Koa.Context, context: Context) => Promise<string> | Promise<Error> export default interface IRenderer<T, U> { config: U cache: LRU renderer: T middleware: () => Koa.Middleware create: () => v...
@include('manage.calendar.entry_remarks_add') @foreach($model->remarks()->orderBy('created_at' , 'desc')->get() as $remark) <div class="remark mv30" aria-atomic="{{$remark->spreadMeta()}}"> <div class="meta text-grey mv5"> <i class="fa fa-comment f10"></i> <span class="mh5 f9">{{$remark->user->full_name}}</spa...
name := "datomisca-core" libraryDependencies += Dependencies.Compile.datomic mappings in (Compile, packageSrc) <++= (sourceManaged in Compile, managedSources in Compile) map { (base, srcs) => srcs pair (Path.relativeTo(base) | Path.flat) } (sourceGenerators in Compile) <+= (sourceManaged in Compile) map Boi...
<?php require_once __DIR__ . "/vendor/autoload.php"; use Cornford\Googlmapper\Mapper; use Illuminate\Container\Container; use Illuminate\Events\Dispatcher; use Illuminate\Filesystem\Filesystem; use Illuminate\View\Compilers\BladeCompiler; use Illuminate\View\Engines\CompilerEngine; use Illuminate\View\Factory; use Il...
from commands.AbstractCommand import AbstractCommand class CommandCreateAuction(AbstractCommand): def __init__( self, auction_system, auction_id, lowest_possible_bid, highest_possible_bid, part_cost, seller_id, ): self.auction_system = auction_sy...
package com.example.android.androidarchkotlin import android.app.Activity import android.app.Application import com.example.android.androidarchkotlin.di.AppComponent import com.example.android.androidarchkotlin.di.AppModule import com.example.android.androidarchkotlin.di.DaggerAppComponent import com.example.android.a...
--- title: Metrics for the Quantification of Seeding Characteristics to Enhance Image Velocimetry Performance in Rivers publication_types: - "2" authors: - Silvano Fortunato Dal Sasso - admin - Salvatore Manfreda doi: 10.3390/rs12111789 publication: in Remote Sensing abstract: River flow monitoring is essenti...
;;;-*-Mode:LISP; Package: CHAOS; Base:10; Syntax:Common-lisp -*- ;;; (in-package :chaos) #|============================================================================= System:CHAOS Module:tools File:inspect.lisp =============================================================================|# #-:chaos-de...
TERMUX_PKG_HOMEPAGE=https://github.com/lnslbrty/ptunnel-ng TERMUX_PKG_DESCRIPTION="Tunnel TCP connections through ICMP." TERMUX_PKG_LICENSE="BSD 3-Clause" TERMUX_PKG_MAINTAINER="@termux" TERMUX_PKG_VERSION=1.42 TERMUX_PKG_SRCURL=https://github.com/lnslbrty/ptunnel-ng/archive/v${TERMUX_PKG_VERSION}.tar.gz TERMUX_PKG_SHA...
#include<bits/stdc++.h> using namespace std; bool poss(int mid,int space[],int size,int c){ int cows=1; int cowplaced=1,lastpos=space[0]; for(int i=1;i<size;i++){ if(space[i]-lastpos>=mid){ if(++cowplaced==c) return 1; lastpos=space[i]; } } return 0; } int main(){ int n,c,t; cin>>t; while(t--){ c...
/// Certificate fingerprints: /// MD5: 69:3D:D9:FE:2B:39:4A:68:59:A8:DD:78:6C:E8:9A:3B /// SHA1: 40:F1:83:3D:77:C2:F4:E1:55:66:EA:EA:1F:87:DC:7A:90:24:6C:48 /// /// will give: /// /// 40:F1:83:3D:77:C2:F4:E1:55:66:EA:EA:1F:87:DC:7A:90:24:6C:48 String? keytoolOutLinesExtractSha1Digest(Iterable<String> lines) { var...
# RabbitMQ ## Overview The RabbitMQ addon wraps the [Bitnami helm chart](https://github.com/bitnami/charts/tree/master/bitnami/rabbitmq). Find more information about the RabbitMQ chart in the chart's [documentation](chart/rabbitmq/README.md). ## Details The RabbitMQ addon offers the following plans: - custom
require 'slack-aws/commands/about' require 'slack-aws/commands/help' require 'aws-sdk' require 'slack-aws/util/aws_client_response' require 'slack-aws/commands/s3' require 'slack-aws/commands/ec2' require 'slack-aws/commands/ops_works'
import LayoutComponent from "@src/components/LayoutComponent"; import { Container } from "semantic-ui-react"; const ShowCasePage = () => { return ( <LayoutComponent> <div style={{ margin: "1.5rem 0rem" }}>&nbsp;</div> <Container> <h2> Showcase </h2> <...
package kamon.cloudwatch import java.time.{Clock, Instant, ZoneOffset} import com.github.tomakehurst.wiremock.WireMockServer import com.github.tomakehurst.wiremock.client.WireMock.{givenThat => _, _} import com.github.tomakehurst.wiremock.core.WireMockConfiguration import com.github.tomakehurst.wiremock.junit.Stubbin...
using System; using System.Collections.Generic; namespace iot.solution.entity { public class DashboardOverviewResponse { public Guid Guid { get; set; } public string TotalBuilding { get; set; } public string TotalDisconnectedElevators { get; set; } public string TotalConnected...
const occ = require("../lib/occ"); const should = require("should"); describe("demonstrate how to extrude a face",function() { it("extrudeFace",function() { // create a planar wire close line. const aPnt1 = [0, 0.0, 0]; const aPnt2 = [10, 1.0, 0]; const aPnt3 = [10, 9.0, 0]; ...
require File.join(File.dirname(__FILE__), 'spec_helper') valid_src = <<-EOK __kernel void dot_product (__global const float4 *a, __global const float4 *b, __global float *c) { int gid = get_global_id(0); c[gid] = dot(a[gid], b[gid]); } EOK invalid_src = <<-EOK __kerne...
import 'dart:ui' as ui; import 'package:gentle/constants.dart'; import 'package:gentle/services/device_info_service.dart'; import 'package:gentle/services/service_locator.dart'; import 'package:gentle/theme.dart'; import 'package:flutter/rendering.dart'; import 'package:flutter/widgets.dart'; class BlurOverlayRoute<T...
module Jekyll class SemesterGenerator < Generator def generate(site) now = Time.new sem_abbr = now.month > 7 ? 'fa' : 'sp' site.config['semester'] = sem_abbr + (now.year % 100).to_s end end end
CREATE INDEX "video_ImmediateSwitch_executedAt_eventId" ON video."ImmediateSwitch" USING btree ("executedAt" DESC NULLS LAST, "eventId" ASC NULLS LAST) ;
This is a sample project to demonstrate the usage of https://github.com/dlsniper/debugger ## License This project is under the MIT License. You can [read it here](LICENSE).
import React from 'react'; import { createStackNavigator } from '@react-navigation/stack'; import { MainMenu } from '@/screens/MainMenu/MainMenu'; import { MainMenuParamList } from './routes'; const MainMenuStack = createStackNavigator<MainMenuParamList>(); export function MainMenuNavigator() { return ( <MainMe...
module DXRuby module Tiled class Tilesets attr_reader :tiles, :tile_left, :tile_right, :tile_top, :tile_bottom def initialize(data, map) @last_time = 0 @tiles = {} dummy_tile = Tile.new(DXRuby::Image.new(map.tile_width, map.tile_height), 0, 0, 0) def dummy_tile.r...
// Flutter imports: import 'package:flutter/material.dart'; // Package imports: import 'package:shared_themes/colors.dart'; class Rating extends StatefulWidget { final int maximumRating; final Function? onRatingChanged; final int currentRating; const Rating( {this.maximumRating = 5, required this....
#!/bin/bash DATE=$(date +'%Y-%m-%dT%H-%M-%S') gpio write 29 1 echo ${DATE}: serial $1 >> /home/pi/serialmount.log 2>&1 sleep 0.5 gpio write 29 0
# -*- coding: utf-8 -*- __author__ = "Johnnatan Messias" __copyright__ = "Max Planck Institute for Software Systems - MPI-SWS" __email__ = "johnme@mpi-sws.org" __website__ = "http://johnnatan.me" __status__ = "Done" import requests import traceback nerros_permited = 3 class Political_Leaning: def __init__(self,...
package teadb import "github.com/iwind/TeaGo/maps" // 数据库驱动 type DriverInterface interface { // 初始化 Init() // 设置是否可用 SetIsAvailable(b bool) // 取得是否可用 IsAvailable() bool // 查找单条记录 FindOne(query *Query, modelPtr interface{}) (interface{}, error) // 查找多条记录 FindOnes(query *Query, modelPtr interface{}) ([]in...
require "rails/generators/named_base" module Css module Generators class ScaffoldGenerator < Rails::Generators::NamedBase # In order to allow the Sass generators to pick up the default Rails CSS and # transform it, we leave it in a standard location for the CSS stylesheet # generators to handle...
s = gets.chomp cnt1 = s.count("4") cnt2 = s.count("7") if cnt1 == 0 and cnt2 == 0 puts -1 elsif cnt1 >= cnt2 puts 4 else puts 7 end
package com.sdirin.games.testingsnake.providers import android.support.v4.content.FileProvider /** * Created by SDirin on 19.01.2018. */ class GenericFileProvider : FileProvider() { }
// Package twse - Fetch stock data from TWSE, OTC // 擷取台灣股市上市/上櫃股票資訊、上市/上櫃類股清單、外資及陸資持股比率前二十名彙總表、 // 三大法人買賣金額統計表、三大法人買賣超日報、自營商、投信、外資及陸資買賣超彙總表 // package twse
use rustc_ast::ast::Crate; use rustc_interface::interface::Compiler; use rustc_interface::Queries; use rustc_span::Span; use rustc_span::source_map::SourceMap; use crate::refactorings::utils::map_change_from_span; use em_refactor_lib_types::FileStringReplacement; use super::{QueryResult, SourceMapContext}; pub struct ...
# Check-02 Repositório com o intuito de estudar e praticar Programação em DOT-NET MVC. Neste Projeto, é criado uma espécie de PetShop com suas funções básicas.
<?php /** * @Copyright (c) 2011 Ganji Inc. * @author longweiguo@ganji.com * @date 2011-03-30 * * http分析与跳转的一些操作 */ /** * @class http分析与跳转的一些操作 * 包括分析url、ip,获取$_GET、$_POST、$_REQUEST数据,页面跳转等 */ class RequestUtil { /** * 判断是否是ajax操作的数据 */ public static function isAjax() { ...
# frozen_string_literal: true class ProjectDeleteService < ApplicationService module Error class Unauthorized < CloudError def message "You do not have a permission to delete this project." end end class ProjectNotFound < CloudError attr_reader :id def initialize(id) ...
<?php namespace Webkul\StripeConnect\Models; use Illuminate\Database\Eloquent\Model; use Webkul\StripeConnect\Contracts\StripeCart as StripeCartContract; class StripeCart extends Model implements StripeCartContract { protected $table = 'stripe_cart'; protected $fillable = [ 'cart_id', 'stripe_token'...
class Attachment include Mongoid::Document include Mongoid::Timestamps include Mongoid::Paperclip belongs_to :user belongs_to :attachable, polymorphic: true has_mongoid_attached_file :file validates_attachment :file, content_type: { content_type: %w[image/jpeg image/jpg image/png image/gif applicat...
/* * Copyright 2021 Harshith Shetty (justadeveloper96@gmail.com) * * 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...
import { AsyncSourceIterable, AsyncResultIterable, MaybePromise } from '../../types/async-iterable'; declare function asyncFilterParallel<S extends T, T = any>( func: (item: T, i: number) => item is S, ): (iterable: AsyncSourceIterable<T>) => AsyncResultIterable<S>; declare function asyncFilterParallel<S extends T,...
#!/usr/bin/env bash # # Copyright 2017 Sergey Rudyshin. 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 # # Unless requ...
package controllers import ( . "github.com/smartystreets/goconvey/convey" "net/http" "net/http/httptest" "testing" ) func TestArticleController_GetAll(t *testing.T) { Convey("Test GetAll", t, func() { engine := getHttpServer() Convey("Normal", func() { recorder := httptest.NewRecorder() request, _ := h...
import 'dart:io'; void overwriteFile() { var logFile = new File('log.txt'); var sink = logFile.openWrite(); sink.write('FILE ACCESSED ${new DateTime.now()}\n'); sink.close(); } void appendToFile() { var logFile = new File('betterLog.txt'); var sink = logFile.openWrite(mode: FileMode.APPEND); sink.write(...
<?php /** * @file * Contains Slim\Turbo\Routing\RouteCollector */ namespace Slim\Turbo\Routing; use Psr\Container\ContainerInterface; use Psr\Http\Message\ResponseFactoryInterface; use Slim\Interfaces\RouteGroupInterface; use Slim\Interfaces\RouteInterface; use Slim\Interfaces\RouteParserInterface; use Slim\Routi...
# Set Discord Activity Set "Playing", "Streaming", "Listening to" & "Watching" in Discord to whatever you want. ## [[ Get it on the Chrome Web Store ]](https://chrome.google.com/webstore/detail/set-discord-activity/dlmmhgaeahcfkojednnfghfpinbinicj) [[ Manual Download ]](https://clients2.google.com/service/update2/crx...
import { NgModule } from '@angular/core'; import { ReactiveFormsModule } from '@angular/forms'; import { BrowserModule } from '@angular/platform-browser'; import { DatepickerComponent } from './datepicker.component'; import { InputDateComponent, DateStampPipe } from './input-date.component'; @NgModule({ imports: [ ...
# 11 Exceptions and Conditions ## 11.1 Raising and Handling Exceptions ## 11.2 Defining Condition Types ## 11.3 Standard Condition Types
-- Add migration script here CREATE TABLE pokemon ( id INTEGER NOT NULL, PRIMARY KEY (id), name TEXT NOT NULL UNIQUE, description TEXT, shakespeare_description TEXT ); CREATE UNIQUE INDEX pokemon_name ON pokemon(name);
package se.gustavkarlsson.track.sqlite internal data class Selection( val column: String, val operator: Operator<*>, val value: Any? ) internal fun List<Selection>.toSelectionSql(): String? = takeIf { it.isNotEmpty() } ?.joinToString(" AND ", transform = Selection::toSelectionSql) private fun...
"use strict"; module.exports = { exit: true, slow: 1000, ui: "bdd-lazy-var/global", require: ["@babel/register"], recursive: true, file: ["./test/helpers.js"], };
<?php namespace ProcessWire; /** * Search Page * * Get search results * @example $page->results(10); * * Mark Keyword * @example $page->markWord("lorem ipsum", "ipsum"); * */ class SearchPage extends Page { public function headline() { $str_start = "<em class='w-text-bold w-text-up'>"; $str...
package com.pine.celo.main_activity import android.view.View import android.widget.ImageView import android.widget.TextView import com.blueberrysolution.pinelib19.view.recycler_view.MyRecyViewHolder class MainActivityViewHolder(v: View): MyRecyViewHolder(v) { var gender: TextView? = null; var user_icon: Ima...
package Exercises.PartI import org.scalatest._ import Book.List import Exercises.PartI.Chapter3._ class Chapter3Spec extends FlatSpec with Matchers { "tail" should "return the tail of a Book.List" in { tail(List(1)) should be (List()) tail(List(1, 2, 3)) should be (List(2, 3)) } it should "throw Unsupp...
<?php $lang['all_employees'] = 'Tous les employés'; $lang['all_companies'] = 'Toutes les entreprises'; $lang['menu_company'] = 'Société'; $lang['menu_employee'] = 'Employée'; $lang['companies_list'] = 'Liste des entreprises'; $lang['company_logo'] = "logo d'entreprise"; $lang['company_name'] = "Nom de la compagn...
@{ ModuleToProcess = 'RDUserSetting.psm1' # RootModule = 'RDUserSetting.psm1' ModuleVersion = '1.0.0.0' GUID = '1f7ce1e0-a188-4c15-8fb1-36e8284d4385' Author = 'Bill Stewart' CompanyName = 'Bill Stewart' Copyright = '(C) 2019 by Bill Stewart' Description ...
import { createContext, PropsWithChildren, useEffect, useMemo, useState, } from "react"; import { ServiceClientCredentials, TokenCredentials } from "@azure/ms-rest-js"; import { AuthManager } from "@azure/ms-rest-browserauth"; import { parse as parseQuery } from "querystring"; /** * Logout function type */...
const { MessageEmbed } = require("discord.js"); const sendError = require("../util/error"); module.exports = { name: "clear", description: "Clears the server queue", usage: "clear", permissions: { channel: ["VIEW_CHANNEL", "SEND_MESSAGES", "EMBED_LINKS"], member: ["MANAGE_MESSAGES"], }, aliases: ["...
/** * Created by lx4r on 23.10.16. */ 'use strict' const fs = require('fs') const config = require('./../configuration') const electron = require('electron') const BrowserWindow = electron.BrowserWindow const shell = electron.shell // ensure that the directory for the report exists, then write it to disk function s...
import React from 'react'; import ViewTripContainer from './containers/ViewTripContainer'; import EditTripContainer from './containers/EditTripContainer'; import PreBookingPopupContainer from './containers/PreBookingPopupContainer'; import { Route } from 'react-router-dom'; const Trips = props => { return ( <div...
package tasks; import node.Node; import services.IcasResponsible; public class RegistrationTask implements Runnable { private final Node node; private final IcasResponsible icasService; public RegistrationTask(Node node, IcasResponsible kati) { this.node = node; this.icasService = kati; } @Override publi...
require 'toolbelt/version' require 'hashie' require 'hash_validator' require 'toolbelt/util/option_validator' require 'toolbelt/service' require 'toolbelt/policy' module Toolbelt class ToolbeltError < StandardError end class OverrideInSubclassError < ToolbeltError end class RequiredOptionsError < Toolbelt...
package net.henryhc.mocksniffer.codeinput import java.io.File import java.nio.file.Path class MavenProject(codeRepository: CodeRepository, rootDirectory: File) : Project(codeRepository, rootDirectory) { override val targetClassDir = File(this.rootDirectory, "target/classes").normalize() override val testTarg...
using System; using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; using Random = System.Random; using DodoDataModel; public class Victorine : MonoBehaviour { public GameObject GameManager; public QuestionList[] Questions; public Text[] AnswersText; ...
import 'rxjs/add/operator/switchMap'; import { Component, OnInit } from '@angular/core'; import { Router, ActivatedRoute, Params } from '@angular/router'; import { WorkService } from './work-service'; import { Work } from './work'; @Component({ moduleId:module.id, selector: 'bas...
// Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // This file has been auto-generated by code_generator_v8.py. DO NOT MODIFY! #include "config.h" #include "V8SecurityPolicyViolationEventInit.h" ...
import React, { useRef } from 'react' import { Slider } from '@material-ui/core' const HackySlider = ({ value, hackyRef, ...args }) => { const ref = useRef() hackyRef.current = { setValue(val) { const styleVal = `${val / 2}%` for (const child of ref.current.children) { if (child.classList.c...
<?php namespace EolabsIo\AmazonMws\Tests\Feature\Inventory; use EolabsIo\AmazonMws\Support\Facades\InventoryServiceStatus; use EolabsIo\AmazonMws\Tests\Factories\InventoryFactory; use EolabsIo\AmazonMws\Tests\Factories\StoreFactory; use EolabsIo\AmazonMws\Tests\TestCase; use Illuminate\Support\Carbon; use Illuminate\...
package lock type LockedValue interface { Get() interface{} Set(value interface{}) Unlock() } type lockedValue struct { *value } func (lv *lockedValue) Unlock() { lv.mutex.Unlock() }
[import, title:"title<1>", id:"edit:true<2>", lang:"javascript+theme:abc<3>", class="class<4>", edit=true, check=true, theme="monokai"](./test&1.js)
program TMATRIX implicit none integer :: TypeCode ! ----------------------------------------------------------------------------------- ! Select the type of T-matrix code ! ! ----------------------------------------------------------------------------------- ...
require './spec/helper' require './lib/telegrams/commands/direct/replies/get_battery_level_reply' describe GetBatteryLevelReply do describe "when creating the reply" do before do @millivolts = 4100 # null pad out to max length and convert to ASCIIZ bytes @millivolts_bytes = [@millivolts.to_s(1...
using System; using System.Linq; using LightsOutPuzzle.Application.Interfaces; using LightsOutPuzzle.Domain.Entities; using LightsOutPuzzle.Domain.ValueObjects; using LightsOutPuzzle.MVC.Models; using LightsOutPuzzle.MVC.ViewModels; using Microsoft.AspNetCore.Mvc; namespace LightsOutPuzzle.MVC.Controllers { publi...
require File.expand_path( File.join( File.dirname(__FILE__), 'spec_helper')) $: << File.expand_path(File.join(File.dirname(__FILE__),"..","lib")) require 'amalgalite/requires' #describe Amalgalite::Requires do # it "#require_order has all files in 'lib' and no more" do # dir_files = Dir.glob( File.join( Amalgalite...
using System; using System.Collections.Generic; using System.IO; using System.Text; using GroupDocs.Annotation.Models; using GroupDocs.Annotation.Models.AnnotationModels; namespace GroupDocs.Annotation.Examples.CSharp.AdvancedUsage { class PutImageAnnotationOverText { public static void Run() ...
set ANSI_NULLS ON set QUOTED_IDENTIFIER ON go CREATE PROC [dbo].[USER_FilterUsers] @chvUserName VARCHAR(50) = NULL, @intLimitPage INT = NULL, @intLimitSize INT = NULL AS SET NOCOUNT ON DECLARE @intStartRow INT, @intWhereToStart INT, @intWhereToEnd INT, ...
import { storiesOf } from '@storybook/react'; import * as React from 'react'; import { useKeyPress } from '../src'; import { CenterStory } from './util/CenterStory'; import ShowDocs from './util/ShowDocs'; const keys = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '0']; const Demo = () => { const states = []; for...
require 'spec_helper' describe Filter::Base do let(:filter_class) do Class.new(described_class) end let(:attributes) { { my: :attributes, deep: { nested: :attributes }, empty: '', none: nil } } subject { filter_class.new(attributes: attributes, relation: 'Record') } describe '#initialize' do it 'se...
# adjustable_blinking_REST_api REST API for controlling Linux kernel driver for blinking a LED on a Raspberry Pi ## Installation ### Setup node.js on Raspberry Pi https://www.instructables.com/id/Install-Nodejs-and-Npm-on-Raspberry-Pi/ ### Clone this repository git clone https://github.com/timoutriainen/adjustable_b...
package tms.component import japgolly.scalajs.react.component.Scala.BackendScope import japgolly.scalajs.react.Callback import japgolly.scalajs.react.vdom.VdomElement import japgolly.scalajs.react.vdom.html_<^._ import tms.model.LocalizableJson /** * Created by markotron on 19/03/2017. */ case class MainState(his...
package cmd import ( "io/ioutil" "log" "github.com/gsxhnd/owl" "github.com/urfave/cli/v2" ) var putCmd = &cli.Command{ Name: "put", Usage: "read file then put value to etcd", UsageText: "owl put [key] [file_path]", Description: "example: owl put /conf/test.yaml ../mock/test.yaml", Action: fun...
module.exports = { e: 'autumn-tree', f: 'fire', g: 'grave', l: 'link-one-arm-up', '🎅': 'link-one-arm-up-xmas', '💍': 'link-one-arm-up-blue-ring', '⭕️': 'link-one-arm-up-red-ring', M: 'moblin', w: 'oldwoman', F: 'fairy', r: 'grave-tree', t: 'green-tree', L: 'link-both-arms-up', '🎄': 'link-b...
# docker-derby Dockerfile Please visit the tutorial https://javatoybox.blogspot.com/2018/10/docker-eclipse-docker-image.html
Rails.application.routes.draw do devise_for :users resources :users, only: [:index, :edit, :update, :destroy] resources :teams do resources :memberships, only: [:create, :destroy] get :autocomplete_users, on: :member end resources :services do resources :plans, controller: :service_plans resou...
/* ==================================================================== 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 ...
/* * Copyright 2010-2021 Australian Signals Directorate * * 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 appl...
import os import glob import h5py import random import PIL.ImageOps import torch import torch.utils.data as data import numpy as np import skimage.io as skio import skimage.transform as sktrans import torchvision.transforms as transforms from PIL import Image from utils import normalize def random_crop(img_size, s):...
#!/bin/bash -eux pushd dp-search-data-importer make test-component popd
// Copyright (c) 2014 the V8 project authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. /*--- esid: sec-array.prototype.concat es6id: 22.1.3.1_3 description: Array.prototype.concat Symbol.isConcatSpreadable sparse object includes: [com...
/* eslint-disable @typescript-eslint/ban-types */ import type { Schema } from '@main/schema'; import type { TtsProviderMethods, TtsProviderConfig } from '@main/providers/TtsProvider'; import type { BaseProviderOptions, Methods } from '@main/providers/BaseProvider'; import WebSpeechSynthesisApi from './WebSpeechSynthesi...
package com.lionparcel.commonandroid.walkthrough.widget.indicator import android.view.LayoutInflater import android.view.View import android.view.ViewGroup import android.widget.ImageView import android.widget.Space import androidx.core.view.isVisible import androidx.recyclerview.widget.RecyclerView import com.lionpar...
#!/bin/sh #/bin/busybox find /databunker if [ ! -f /databunker/data/databunker.db ]; then OPTION="-init" if [ "$1" == "demo" ]; then OPTION="-demoinit" fi echo "-------------INIT------------" #/bin/busybox mkdir -p /tmp RESULT=`/databunker/bin/databunker $OPTION -db /databunker/data/databunker.db -con...
# frozen_string_literal: true class BackgroundMigrationWorker include ApplicationWorker feature_category_not_owned! # The minimum amount of time between processing two jobs of the same migration # class. # # This interval is set to 2 or 5 minutes so autovacuuming and other # maintenance related tasks h...
#include <QApplication> #include <QWebEngineView> #include <QWebChannel> #include "gui/control_ai_from_gui.h" #include <thread> #include <sys/sysinfo.h> #include <sys/stat.h> #include "artificial_intelligence.h" void ArtificialIntelligenceThread(int & enabled){ ArtificialIntelligence ai; ai.MainLoop(enable...
#! /bin/bash BASEDIR=$(dirname $0) $BASEDIR/latest/chrome --user-data-dir="$BASEDIR/user-data-dir" $* &> /dev/null &