text
stringlengths
27
775k
package org.kopi.socket.ctype.tcp.sync.itf; public interface Sender { byte[] send(byte[] data); }
#!/bin/bash NAME=craftslab/androiddocker TAG=latest docker build --no-cache -f Dockerfile -t $NAME:$TAG . #sudo docker inspect $NAME:$TAG > Dockerobjects
--- id: mercury title: Mercury description: Blood Mercury levels status: draft unit: μg/L range: < 10.0 ---
-module(elli_metrics_middleware). -export([init/2, preprocess/2, handle/2, postprocess/3, handle_event/3]). -behaviour(elli_handler). %% %% ELLI %% init(_Req, _Args) -> ignore. preprocess(Req, _Args) -> Req. handle(_Req, _Args) -> ignore. postprocess(_Req, Res, _Args) -> Res. %% %% ELLI EVENT CA...
package com.wavetogether.appConfig.core.domain import com.wavetogether.core.domain.user.UserRepository import com.wavetogether.infrastructure.domain.user.MemoryUserRepositoryImpl import org.springframework.context.annotation.Bean import org.springframework.context.annotation.Configuration @Configuration class UserBea...
import 'package:flutter/material.dart'; import 'package:get/get.dart'; import 'package:pocketrecipe_client/controllers/home_ctrl.dart'; import 'package:pocketrecipe_client/ui/pages/menu/menu_page.dart'; import 'package:pocketrecipe_client/ui/pages/menu/recipe_post_page.dart'; import 'package:pocketrecipe_client/ui/page...
package money import ( "testing" ) func TestBank_Reduce(t *testing.T) { t.Run("reduce sum", func(t *testing.T) { sum := Dollar(3).Plus(Dollar(4)) bank := NewBank() reduced := bank.Reduce(sum, "USD") assertMoney(t, Dollar(7), reduced) }) t.Run("reduce money", func(t *testing.T) { bank := NewBank() re...
package main import ( "flag" "github.com/abhishekkr/gol/gollog" "./helpers" ) var ( logfile = flag.String("log-file", "gol.log", "to dump run-logs to") ) func main(){ flag.Parse() gollog.LogFile = *logfile gollog.Log_it("sample logging") gollog_example.PassAndLog(gollog.Log_it) }
// Copyright 2018 The Chubao Authors. // // 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 agree...
module Handcuffs module Extensions attr_reader :handcuffs_phase def phase(phase) @handcuffs_phase = phase end end end
<?php namespace SilverStripe\Snapshots; use SilverStripe\Core\ClassInfo; use SilverStripe\ORM\DataObject; /** * Implements hashing functionality for versioned snapshots */ trait SnapshotHasher { /** * Generates a hash for versioned snapshots * * @param $class * @param $id * @return str...
"use strict"; define( [ 'underscore', 'backbone', 'marionette', 'view/scenic/pages/base/table/SourceView', 'view/scenic/pages/sip/SIPSourceView' ], function ( _, Backbone, Marionette, SourceView, SIPSourceView ) { /** * Source Collection * * @constructor * @augments module:...
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you ...
import Workflow from "./Workflow" import { uuid } from "../util" import { JobInfo, WorkflowInfo } from "./WorkflowInfo" import { JOB_STATE } from "./JobStates" import WorkflowError from "./WorkflowError" import { createPluginContext } from "../GridWorkflowApi" import { Plugin } from "../PluginSystem/Plugin" import { fl...
#!/bin/bash ## Install Keystone | Identity service function install_keystone() { echocolor "Create Database for Keystone" cat << EOF | mysql -uroot -p$MYSQL_PASS DROP DATABASE IF EXISTS keystone; CREATE DATABASE keystone default character set utf8; GRANT ALL PRIVILEGES ON keystone.* TO 'keystone'@'localhost' IDE...
package game import scala.scalajs.js object JsApp extends js.JSApp { @scala.scalajs.js.annotation.JSExport override def main(): Unit = {} }
// Copyright (c) Microsoft Corporation. // Licensed under the MIT license. import { assert } from "chai"; import { createHttpHeaders } from "../src/httpHeaders"; describe("HttpHeaders", () => { it("toJSON() should use normalized header names", () => { const rawHeaders = { lowercase: "lower case value", ...
// (c) Copyright 2020 Trent Hauck // All Rights Reserved use std::fs; use std::io::Result; use std::str; use std::sync::Arc; use bio::io::fasta; use bio::io::fastq; use itertools::Itertools; use arrow::array::*; use arrow::datatypes::*; use arrow::record_batch::RecordBatch; use parquet::arrow::arrow_writer::ArrowWr...
package com.example.rxplayground.step import io.reactivex.Completable interface Step { fun run(): Completable }
-- CreateEnum CREATE TYPE "LabelType" AS ENUM ('Classification', 'Polygon', 'Box'); -- CreateEnum CREATE TYPE "UserRole" AS ENUM ('Owner', 'Admin', 'Member'); -- CreateEnum CREATE TYPE "WorkspacePlan" AS ENUM ('Community', 'Starter', 'Pro', 'Enterprise'); -- CreateTable CREATE TABLE "Image" ( "id" UUID NOT NULL,...
#include "backend/linear-regalloc.hh" #include "backend/regalloc.hh" #include "utils/random.hh" #include "utils/timer.hh" #include "backend/dataflow.hh" #include <sstream> #include <fstream> #define LOG_LINEAR_REGALLOC 0 #if LOG_LINEAR_REGALLOC #define LINEAR_LOG(...) fmt::print(__VA_ARGS__) #else #define LINEAR_LOG(...
namespace KitsorLab.WebApp.WebPushAdmin.Models.Subscriptions { using KitsorLab.WebApp.WebPushAdmin.Infrastructure.ApiClient.Models; using KitsorLab.WebApp.WebPushAdmin.Models.Pagination; public class SubscriptionsResponse { public PaginatedList<Subscription> Subscriptions { get; set; } } }
package supervision import config.JobConfig import config.JobDuplicateEntryPolicy data class TaskConfig( val name: String, val pathToExe: String, val args: List<String>?, val resultWaitTimeoutMillis: Long, val tags: List<String>?, val jobDuplicateEntryPolicy: JobDuplicateEntryPolicy? ) fun Jo...
#ifndef __INCLUDE_ERR_HPP__ #define __INCLUDE_ERR_HPP__ namespace kafarr { /** * kafarr exception class. the only exception class thrown here */ class err : std::exception { private: const std::string _msg; public: err(const std::string& m1, const std::string& m2):_msg(std::string().append(m1).a...
<?php namespace MongoDB\Tests\Model; /** * This class is used by the BSONArray and BSONDocument clone tests. */ class UncloneableObject { private function __clone() { } }
import express from 'express'; import clinicalDataReport from './clinical-data'; import familyClinicalDataReport from './family-clinical-data'; import biospecimenDataReport from './biospecimen-data'; export default (esHost: string) => { const router = express.Router(); // declare a route for each report router...
use std::prelude::v1::*; use serde::de::value::{self, MapAccessDeserializer}; use serde::de::{IntoDeserializer, MapAccess, Visitor}; use serde::{Deserialize, Deserializer}; use serde_test::{assert_de_tokens, Token}; use std::fmt; fn test_u32_to_enum() { #[derive(Deserialize, Debug, PartialEq)] enum E { ...
module CUDAint using ..CUDA import ..Flux: Flux import Zygote using Zygote: @adjoint import NNlib, NNlibCUDA include("cudnn.jl") end
class ReviewsController < ApplicationController before_action :get_hotel before_action :get_review, except: [:new, :create] before_action :require_login, only: [:new, :create] def new @review = @hotel.reviews.build end def create @review = @hotel.reviews.build(review_params) ...
import numpy as np import networkx as nx import pickle from enm.Enm import * from enm.utils import * pickle_file = snakemake.input[0] with open(pickle_file,'rb') as f: enm = pickle.load(f) print('rewiring') #Don't run with n>10, takes long enm.simulate_rewire(output_name='tmp',save=False, normalized=False,sim_num=...
# LAB - Application State ### Author: Tia Rose ### Links and Resources * [codesandbox.io - app-state](https://codesandbox.io/s/starter-code-app-state-hw98l?fontsize=14) * [codesandbox.io - reducers](https://codesandbox.io/s/starter-code-app-state-reducers-lk8jp?fontsize=14) #### UML ![UML-Diagram](./assets/UML-31.J...
package utils import ( "crypto/rand" "fmt" "log" "math/big" "math/bits" "reflect" ) func HammingDistance(b1, b2 []byte) int { dist := 0 for i := range b1 { dist += bits.OnesCount8(uint8(b1[i] ^ b2[i])) } return dist } func ShiftBytesLeft(b1 []byte, idx int) []byte { length := len(b1) return append(b1[i...
# Bertrand Nash example # Generates random equilibrium data using Distributions indxID(ID) = (ID == :1) ? (1, 2) : (2, 1) function bestResponsePrice(thetas, prices, error, pmax, ID) me, you = indxID(ID) b = thetas[you]*prices[you] + thetas[3]*error + thetas[4] p = (-b - sqrt(b^2 - 8 * thetas[me]))/ 4. / thetas[me]...
# Pre-scan Monitor Many products need to be environmentally-stressed during performance testing. This is accomplished by placing the device in a chamber where the temperature can be set and controlled and soaking the DUT at the required set-point conditions. Temperature changes are not instantaneous so there is some ...
<?php function findFirstNonRepeatingCharacter($inputString) { $stringParts = str_split($inputString); foreach ($stringParts as $index => $part) { $foundMatches = array_filter($stringParts, function ($element) use ($part) { return $element === $part; }); if (count($foundMat...
#[cfg(feature = "read")] use alloc::boxed::Box; #[cfg(feature = "read")] use alloc::vec::Vec; use core::fmt; use core::mem::MaybeUninit; use core::ops; use core::ptr; use core::slice; mod sealed { // SAFETY: Implementer must not modify the content in storage. pub unsafe trait Sealed { type Storage; ...
import AuthenticationError from '../errors/authError'; import ForbiddenError from '../errors/forbiddenError'; import NotFoundError from '../errors/notFoundError'; export default (log = false) => ({ AuthenticationError, ForbiddenError, NotFoundError, defaultLogger: log ? () => ({ L: { debug: console....
package com.dfl.xkdc import com.dfl.xkdc.di.injectors.InjectorImpl import org.mockito.Mockito.mock class RobolectricXkcdApplication : XkcdApplication() { override val injector: InjectorImpl = mock(InjectorImpl::class.java) }
<?php namespace App\Http\Controllers; use Illuminate\Http\Request; use App\Libraries\GeoTracker; class AdminController extends Controller { /** * Create a new controller instance. * * @return void */ function __construct() { $this->middleware('auth'); } /** * Sho...
from typing import Dict, Tuple, Callable import numpy as np import torch from torch import nn class CNN(nn.Module): def __init__(self, network_params: Dict, activation: bool = True): super().__init__() input_size = network_params["input_size"] output_size = network_params["output_size"]...
<?php namespace app\index\controller; use app\common\controller\Common; use app\common\model\Users; use think\Request; class Test extends Common { public function __construct() { parent::__construct(); } public function index(Request $request) { $request->get('uuid'); if(...
import 'package:dde_gesture_manager/constants/constants.dart'; import 'package:dde_gesture_manager/constants/sp_keys.dart'; import 'package:dde_gesture_manager/constants/supported_locales.dart'; import 'package:dde_gesture_manager/extensions.dart'; import 'package:dde_gesture_manager/generated/codegen_loader.g.dart'; i...
#requires -Modules ExchangeAnalyzer #This function tests each Exchange server to verify if SSL 3.0 is disabled Function Run-CAS003() { [CmdletBinding()] param() $TestID = "CAS003" Write-Verbose "----- Starting test $TestID" $PassedList = @() $FailedList = @() $WarningList = @() $Info...
# The underlying messaging protocol, funl, keeps track of a unique id per # message. This id is awailable in the transaction object, but only after # commit has succeeded. We can get the id from the transaction object and # use it as a globally unique id. # # Another source of unique ids is the client id, which is uniq...
@{ Layout = "_Layout"; } @model List<HairSalon.Models.Client> @using HairSalon.Models <h1>Clients:</h1> <br> @if (Model.Count == 0 && ViewBag.Stylist == 1) { <p>No Clients have been added</p> } @if (Model.Count == 0 && ViewBag.Stylist == 0) { <p>You cannot add a client until a stylist has been added</p> } <ul> ...
class DeleteCustomizableAreaFromCustomizations < ActiveRecord::Migration[6.1] def change remove_column(:customizations, :customizable_area_id) end def down add_reference(:customizations, :customizable_area, null:true, foreign_key: true) end end
--- title: Cockpit 221 author: mvo date: 2020-06-10 tags: cockpit linux slug: cockpit-221 category: release summary: Cockpit with improved information protection and deprecated patternfly CSS API comments: 'true' --- Cockpit is the [modern Linux admin interface](https://cockpit-project.org/). We release regularly. Her...
class ReviewsController < ApplicationController before_action :set_review, only: [:destroy] # GET /reviews def index begin @user = Review.find_user(params[:user_id]) @reviews = Review.find_reviews(@user.driver_id) rescue ActiveRecord::RecordNotFound render :file => "#{Rails.root}/public...
# rust_pigpio Rust wrapper to the PiGPIO C library http://abyz.co.uk/rpi/pigpio/cif.html https://github.com/joan2937/pigpio Feel free to add more functionality and send me a pull request. # Installation ## Get pigpio Has not been tested for version '<64' Go here to download the latest version: http://abyz.co.uk/r...
/** * @param {character[][]} matrix * @return {number} */ const maximalSquare = function (matrix) { const rows = matrix.length; const cols = rows > 0 ? matrix[0].length : 0; const dp = Array.from(new Array(rows + 1), (el) => new Array(cols + 1).fill(0) ); let maxLen = 0; for (let i = 1; i <= rows; i+...
//! Abstractions over the Tegra X1 Clock and Reset Controller functionality. //! //! See Chapter 5 in the Tegra X1 Technical Reference Manual for details. //! //! # Description //! //! The Clock and Reset (CAR) block contains all the logic needed to control //! most of the clocks and resets to the Tegra X1 device. It t...
import {combineReducers} from 'redux'; import { connectRouter } from 'connected-react-router'; import collections from './collectionsReducer'; import filters from './filtersReducer'; import urlParams from './urlParamsReducer'; import search from './searchReducer'; import resource from './resourceReducer'; import metric...
package org.sheepy.lily.vulkan.core.device.capabilities; import static org.lwjgl.vulkan.KHRSurface.vkGetPhysicalDeviceSurfacePresentModesKHR; import org.lwjgl.vulkan.VkPhysicalDevice; import org.sheepy.lily.vulkan.core.util.Logger; import org.sheepy.lily.vulkan.core.window.VkSurface; public final class PresentModes ...
import React from 'react'; import { useSubstrate } from '@/substrate-lib'; import { TimeIcon } from '@chakra-ui/icons'; import { Box, Stat, StatLabel, StatNumber, StatHelpText, Flex, } from '@chakra-ui/react'; interface BlockNumberType { finalized: boolean; } const Main = (props: BlockNumberType): JSX....
<?php /** * State Decoded Command Line Task Runner. * * You can create your own tasks by adding them to includes/tasks/ * * PHP version 5 * * @license http://www.gnu.org/licenses/gpl.html GPL 3 * @version 0.9 * @link http://www.statedecoded.com/ * @since 0.9 * * Usage: * ./statedecoded {command} * ...
#if defined(__APPLE__) #define EXPORT(s) s #else #define EXPORT(s) _##s #endif
--- title: Add volume shipping costs calculation issue: NEXT-14873 author_github: @Dominik28111 --- # Core * Added method `Shopware\Core\Checkout\Cart\Delivery\Struct\DeliveryPositionCollection::getVolume()` to get the volume of the line items. * Added const `Shopware\Core\Checkout\Cart\Delivery\DeliveryCalculator::CAL...
<?php namespace App\Data\Models; class Party extends Institution { protected $orderBy = ['name' => 'asc']; }
# morph morph is a re-implementation of the standard C++ type traits (for learning purposes)
module Authlogic module CryptoProviders autoload :MD5, "authlogic/crypto_providers/md5" autoload :Sha1, "authlogic/crypto_providers/sha1" autoload :Sha256, "authlogic/crypto_providers/sha256" autoload :Sha512, "authlogic/crypto_providers/sha512" autoload :BCrypt, "authlogic/crypto_providers/b...
INSERT INTO company (name) VALUES ('NHN'), ('NHN Payco'), ('NHN Pixelcube'); INSERT INTO team (name, company_id) VALUES ('회원개발팀', 1), ('서버기술개발팀', 1), ('게임웹서비스개발팀', 1), ('게임플랫폼서버팀', 1), ('클라우드서비스개발팀', 1), ('셀팀', 3), ('광고플랫폼개발팀', 2), ('커머스A개발팀', 1), ('커머스P개발팀', 1),...
// IGNORE_BACKEND: JVM_IR @Deprecated("") class MyClass() { } // TESTED_OBJECT_KIND: class // TESTED_OBJECTS: MyClass // FLAGS: ACC_DEPRECATED, ACC_PUBLIC, ACC_FINAL, ACC_SUPER
#!/usr/bin/env perl # # Perl script to generate the Arduino IDE keywords.txt file # from the output of a Doxygen Tag File (GENERATE_TAGFILE) # # Copyright (c) 2018, Nicholas Humfrey # License: The 3-Clause BSD License # use XML::XPath; use XML::XPath::XMLParser; my $inputfile = $ARGV[0] || die "Usage: generate-keywor...
import Conf from "conf"; import chalk from "chalk"; import { BinaryLike, createHash, randomBytes } from "crypto"; import { postPayload } from "./post-payload.js"; import { getRawProjectId } from "./project-id.js"; import { getEnvironmentData } from "./environment.js"; const TELEMETRY_API = "https://telemetry.serverles...
#!/bin/bash -eu # Joseph Harriott. jeu. 25 déc. 2014 # Blue-Dog-Archolite's fix for gx https://github.com/tpope/vim-fugitive/issues/536 # chmod 755 $HOME/.vim/xdg-open-bda.sh # LM17Xfce64: ln -s $HOME/.vim/xdg-open-bda.sh $HOME/bin/xdg-open-bda # Arch Xfce: sudo ln -s $HOME/.vim/xdg-open-bda.sh /usr/local/bin/xdg-ope...
package pp.controllers.cdsops class CdsControllerQueuingAndPollingDisabledSpec extends CdsControllerSpec { "the CdsController" when { "polling is enabled and queuing is disabled" should { behave like aSynchronousEndpointWhenTheCdsPaymentUpdateSucceeds() behave like aSynchronousEndpointWhenTheCdsPaym...
/* * SPDX-License-Identifier: Apache-2.0 * * The OpenSearch Contributors require contributions made to * this file be licensed under the Apache-2.0 license or a * compatible open source license. */ /* * Licensed to Elasticsearch B.V. under one or more contributor * license agreements. See the NOTICE file distr...
<div class="row"> <div class="col-sm-6 offset-sm-3"> <div class="form-group"> <label for="first_name">FirstName </label> <input type="text" value="{{$patient->first_name ?? old('first_name')}}" class="form-control @error('first_name') is-invalid ...
library arguments; import 'package:redstone/redstone.dart'; import 'dart:async'; import 'package:shelf/shelf.dart' as shelf; @Route("/args/:arg1/:arg2/:arg3") Map pathArgs(String arg1, int arg2, [double arg3, String arg4, String arg5 = "arg5"]) => {"arg1": arg1, "arg2": arg2, "arg3": arg3, "arg4": arg4, "...
package nz.co.bottech.scala2plantuml.examples.static object StaticMethod { def method: String = "foo" }
package kv import ( "context" "time" "github.com/patrickmn/go-cache" ) type inmemkv struct { c *cache.Cache } func (i *inmemkv) Get(ctx context.Context, key string) ([]byte, error) { if v, has := i.c.Get(key); has { return v.([]byte), nil } return nil, nil } func (i *inmemkv) Set(ctx context.Context, key ...
package repo import ( // Stdlib "bytes" "errors" "fmt" "io" "os" "time" // Internal "github.com/salsaflow/salsaflow/config" "github.com/salsaflow/salsaflow/prompt" // Vendor "github.com/fatih/color" "github.com/shiena/ansicolor" ) type Config struct { SalsaFlowEnabledTimestamp time.Time } func LoadCo...
#include <cstdio> #define INF 1000000000 #define VERTEX_COUNT 210 #define EDGE_COUNT 410 using namespace std; struct vertex { int first, dis; }V[VERTEX_COUNT]; struct edge { int endp, next, lower, upper, flow; }E[EDGE_COUNT]; int ivc, iec, ec = 2, gap[VERTEX_COUNT], src, sink; inline int min(int x, int y) { re...
<?php namespace silverscreen\plugins\photo_credit; /** * Implements the singleton pattern. * * @author Per Egil Roksvaag * @copyright Silverscreen Tours GmbH * @license MIT */ trait Singleton { /** * @var object The class singleton. */ protected static $_instance; /** * @return object The class singleto...
package goservicing_test import ( _ "github.com/bool64/dev" // Include CI/Dev scripts to project. )
import React from "react" import PropTypes from "prop-types" import { NoDataView } from "../common/NoDataView" import { useHistory } from "react-router-dom" import { useGetTransactions } from "../hooks/useGetTransactions" const TransactionList = ({ match }) => { let history = useHistory() const accountId = match....
import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:spagreen/src/style/theme.dart'; //this widget is used for google , fb and phone icon Widget googleFbPhoneButton(String iconPath){ return Padding( padding: const EdgeInsets.symmetric(horizontal: 14), child: Conta...
import { Key, PID, GenericTypedEntity } from '../catalog'; import { RuleConfig } from './interfaces'; /** * Given a two modifiers, are they mutually exlusive with each other? */ export interface MutualExclusionZone { (modOne: Key): number; } export interface ExclusionTensor { // NOTE: Weird how I can't use ...
#!/usr/bin/perl use warnings; use strict; ## this a random string my $str_random = "Hello, world\n"; #print $str_random; my $random_num = "3"; #print $random_num/5, "\n"; #print $random_num*5, "\n"; #print $random_num-5, "\n"; #print $random_num+5, "\n"; #print $random_num**5, "\n"; #print log($random_num)/log(2), "\...
-define(m(M, K), maps:get(K, M)). -define(line(Opts), elixir_utils:get_line(Opts)). -record(elixir_scope, { context=nil, %% can be match, guards or nil extra=nil, %% extra information about the context, like fn_match and map_key noname=false, %% when true, don't add new names...
// Copyright 2020 The Oppia Authors. 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 required by ap...
import _random from 'lodash/random' import _sample from 'lodash/sample' import _inRange from 'lodash/inRange' import _sumBy from 'lodash/sumBy' import _sortBy from 'lodash/sortBy' import _last from 'lodash/last' class GridModel { constructor(TileModel, TILES_PER_ROW) { this.TILES_PER_ROW = TILES_PER_ROW ...
import express from "express" import Order from "../models/OrderModel.js" export const addOrderItems = async (req, res) => { const { orderItems, shippingAddress, paymentMethod, itemsPrice, taxPrice, totalPrice, } = req.body try { if (orderItems && orderItems.length === 0) { res...
package main import ( "net/http" "time" "github.com/equinor/radix-cicd-canary/scenarios/deployonly" "github.com/equinor/radix-cicd-canary/scenarios/happypath" "github.com/equinor/radix-cicd-canary/scenarios/nsp" "github.com/equinor/radix-cicd-canary/scenarios/test" "github.com/equinor/radix-cicd-canary/scenar...
import React from 'react' import PropTypes from 'prop-types' import styled from 'styled-components' import Link from './Link' const Wrapper = styled.div` text-align: -webkit-center; .button { appearance: none; transition: ${props => props.theme.bcTransition}; background-color: transparent; border-r...
# frozen_string_literal: true require 'securerandom' class TestHosts class << self def each_os(opts = {}, &block) %w[debian ubuntu fedora centos rhel opensuse sles].each do |os_name| next unless test?(os_name) next if opts[:only] && !only?(opts, os_name) host_json = TestHosts.host...
using System; using System.ComponentModel; using System.Diagnostics; using System.Globalization; using System.ServiceProcess; using System.Threading; using Microsoft.Win32.SafeHandles; namespace SeobiseuService { internal static class ServiceThread { private static Thread Thread; priv...
package org.example.hellostream.impl import akka.NotUsed import akka.stream.scaladsl.Source import com.lightbend.lagom.scaladsl.api.ServiceCall import org.example.hellostream.api.HelloStreamService import org.example.hello.api.HelloService import scala.concurrent.Future class HelloStreamServiceImpl(helloService: Hel...
#!/usr/bin/env sh REALPATH="$(realpath $0)" BASEDIR="$(dirname ${REALPATH})" EDITOR_BASEDIR="${BASEDIR}/editors" UID=$(id -u ${USER}) GID=$(id -g ${USER}) . "${BASEDIR}/config.cfg" if [ $# -eq 0 ] || [ ! -d "${EDITOR_BASEDIR}/$1" ] ; then echo -n "Run script with option " >&2 for editor in $(ls "${EDITOR_BASEDIR...
package org.reploop.plugin.intellij.services import org.reploop.plugin.intellij.MyBundle class MyApplicationService { init { println(MyBundle.message("applicationService")) } }
/* eslint-disable no-undef */ /* eslint-disable no-unused-vars */ import * as axios from 'axios' declare module 'axios' { interface AxiosInstance { (config: AxiosRequestConfig): Promise<any> } }
require 'spec_helper' describe Sidekiq::Status do let!(:job_id) { SecureRandom.hex(12) } describe '.status' do it 'bypasses redis with inlining enabled' do Process.fork { require 'sidekiq-status/testing/inline' expect(Sidekiq::Status.status(job_id)).to eq :complete } end end e...
import 'package:cloud_firestore/cloud_firestore.dart'; import 'package:RasPiFinder/models/rasps.dart'; import 'package:RasPiFinder/models/user.dart'; class DatabaseService { final String uid; DatabaseService({this.uid}); //collection reference final CollectionReference piCollection = FirebaseFirestore.i...
using System; using System.Collections.Generic; using System.Linq; using System.Threading; using System.Threading.Tasks; using Zeus.Storage.Models.Alerts; using Zeus.Storage.Stores.Abstractions; namespace Zeus.Stores.Default { public class InMemoryChannelStore : IChannelStore { private readonly HashSe...
import LinkedList from '../linked-list/LinkedList'; export default class Queue { constructor() { this.data = [] } /** * @return {boolean} */ isEmpty() { return this.data.length===0; } /** * Read the element at the front of the queue without removing it. * @return {*} */ peek() { ...
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2021, Alexei Znamensky <russoz@gmail.com> # # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type DOCUMENTATION = ''' module: mdepfail author: "A...
#!/usr/bin/env bash python3 -m Pyro4.naming & python3 order_server.py & python3 frontend.py localhost 3001 & python3 client.py localhost 3001
// // TFY_PhotoVideoCell.h // TFY_PhotoBrowser // // Created by 田风有 on 2022/2/6. // #import <UIKit/UIKit.h> #import "TFY_PhotoAVPlayerHeader.h" #import "TFY_ActionSheetHeader.h" @protocol PhotoVideoCellDelegate <NSObject> - (void)photoVideoAVPlayerDismiss; - (void)photoVideoAVPlayerLongPress:(UILongPressGestureR...
-- file:timestamptz.sql ln:26 expect:true INSERT INTO TIMESTAMPTZ_TBL VALUES ('tomorrow zulu')
#!/bin/bash # Query A Single Pixel in all images #------------------------------------------------------------ # Arguments: bash queryRSAll.sh $1 $2 $3 $4 #------------------------------------------------------------ # $1 : Source directory (with many Raster images i.e. ~/RSDATA/) # $2 : Longitude coordinate of the Ra...