text
stringlengths
27
775k
"use strict"; import * as assert from "assert"; import {isMsg, MsgExt} from "msg-interface"; import {createDecoder} from "../"; const msgpack = createDecoder(); const TITLE = __filename.split("/").pop(); describe(TITLE, () => { const D4 = "d4-10-11"; it(D4, () => { const ext = msgpack.decode(hexToBi...
insert into users (email, encrypted_password) values ('danielnagore@marbella.es', 'NADA'); insert into users (email, encrypted_password) values ('raulsierra@marbella.es', 'NADA'); insert into users (email, encrypted_password) values ('azaldivar@marbella.es', 'NADA'); insert into grupos (descripcion) values ('(3) Cuer...
# frozen_string_literal:true RSpec.describe Hyrax::Migrator::Services::FacetReporterService do class Facet attr_accessor :solr_name, :label end let(:service) { described_class.new('batch123', 'coll123') } let(:location_service) { instance_double('Hyrax::Migrator::Services::BagFileLocationService') } let(...
import {Component, OnInit, OnDestroy} from '@angular/core'; import {FormBuilder, FormGroup, Validators} from '@angular/forms'; import {ActivatedRoute, Router} from '@angular/router'; import {AuthenticationService} from '../../service/authentication.service'; import {first} from 'rxjs/operators'; @Component({ selecto...
--- authorName: syntonica canDelete: false contentTrasformed: false from: '"syntonica" <syntonica@...>' headers.inReplyToHeader: .nan headers.messageIdInHeader: PGR0MTNmMituMmp2QGVHcm91cHMuY29tPg== headers.referencesHeader: .nan layout: email msgId: 675 msgSnippet: Wow! Need some air after diving in so...
<?php if(!defined('BASEPATH')) exit('No direct script access allowed'); class User_model extends CI_Model { public function __construct(){ //$this->load->database(); } /** * This function used to check the login credentials of the user * @param string $email : This is email of the user * @param...
from collections import namedtuple from tempfile import NamedTemporaryFile import numpy as np import pytest import pandas as pd from ananse.network import Network from ananse.commands import network @pytest.fixture def binding_fname(): return "tests/example_data/binding2.tsv" @pytest.fixture def network_obj()...
export default root => { const header = window.document.createElement('header'); const nav = window.document.createElement('nav'); const mobileNavigation = window.document.createElement('div'); mobileNavigation.className = 'nav-wrapper container'; nav.appendChild(mobileNavigation); const logoLink = window.d...
#ifndef _DAM_H_ #define _DAM_H_ //includes #include <ACS712.h> #include <ACS712_AC.h> #include <AccelStepper.h> #include <HX711.h> #include <ros.h> #include <prismm_msgs/dam_data.h> #include <prismm_msgs/getBool.h> #include <MovingAverageFilter.h> #include <Servo.h> // #define STP_Y_ACCEL 2000 #define STP_X_ACCEL 80...
# Project ### 꼭 개인 Branch에서 작업해주세요!! ``` // 작업 전 수행 git checkout 브랜치 이름 git pull origin 브랜치 이름 // 작업 후 수행 git add . git commit -m "커밋 메시지" git push origin 브랜치 이름 ```
# `Matlab`向量 向量是数字的一维数组。在`MATLAB`中,允许创建两种类型的向量: - 行向量 - 列向量   ## 1. 行向量     行向量是通过用方括号中的元素集合来创建的,使用`空格`或`逗号`分隔元素。 ```matlab r = [1 18 19 21 41] ``` ## 2. 列向量 列向量是通过用方括号中的元素集合来创建的,`分号`用于分隔元素。 ```matlab c = [17; 28; 39; 60; 81] ``` ## 3. 引用向量的元素 3.1 可以通过多种方式来引用一个或多个向量的元素。向量`v...
$ cat groceries Item Quantity Price Apples 5 0.50 Cereal 1 3.40 Soda 2 1.10
package transmission import ( "strconv" "strings" "time" "github.com/pkg/errors" ) // Time is a wrapper around time.Time with custom JSON serialization logic. type Time struct { time.Time } func (t *Time) MarshalJSON() ([]byte, error) { return []byte(strconv.FormatInt(t.Time.Unix(), 10)), nil } func (t *Time...
package scalatest.guide.ch02styles // Because it gives absolute freedom (and no guidance) on how specification text // should be written, FreeSpec is a good choice for teams experienced with BDD // and able to agree on how to structure the specification text. import org.scalatest._ class Ex05SetSpec extends freespec...
import "math" func maximalSquare(matrix [][]byte) int { mx := 0 areas := make([][]int, len(matrix)) for i := range areas { areas[i] = make([]int, len(matrix[0])) } for i := range matrix { for j := range matrix[0] { if matrix[i][j] == '1' { areas[i][j] = 1 if i > 0 && j > 0 { if int(areas[i-1][...
$(document).ready(function(){ var redStart = 0; var redEnd = 255; var greenStart = 0; var greenEnd = 255; var blueStart = 0; var blueEnd = 255; $( '#automateChangeBackground' ).change(function(){ var agreed = $(this).is( ':checked' ); if(agreed === true) { var rateOfChanges = $( '#rateOfChanges' ).val...
package com.explore.playground.utils import com.google.firebase.messaging.FirebaseMessagingService import com.google.firebase.messaging.RemoteMessage class FireBaseUtil : FirebaseMessagingService() { override fun onDeletedMessages() { super.onDeletedMessages() //Called when the FCM server deletes ...
# frozen_string_literal: true module Codebreaker RSpec.describe Cli do subject(:cli) { Codebreaker::Cli.new(game) } let(:game) { Game.new } let(:code) { '1234' } let(:name) { 'Alex' } it 'output hello to console' do allow(STDIN).to receive(:gets).and_return('exit') expect { cli.run ...
# DataStructure-And-Algorithm > 算法和数据结构学习(Typescript 实现)
using LazyProductions.GridManager; using UnityEngine; using Grid = LazyProductions.GridManager.Grid; using Random = System.Random; namespace Tests.TestScenes.BasicVoxelTest { public class MarchingCubesTestRandom : MonoBehaviour { // Start is called before the first frame update public void Star...
package com.oreodroid.codingchallenge.ui import android.os.Bundle import android.view.View import android.widget.ProgressBar import androidx.appcompat.app.AppCompatActivity import androidx.fragment.app.Fragment import androidx.fragment.app.FragmentManager import androidx.fragment.app.FragmentTransaction import android...
import FriendListItem from "../friends/FriendListItem"; import PropTypes from 'prop-types'; function FriendList({ items }) { return ( <FriendListItem avatar={items.avatar} name={items.name} status={items.isOnline} /> )} FriendList.propTypes = { ...
; Copyright 2016 David O'Meara ; ; Licensed under the Apache License, Version 2.0 (the "License"); ; you may not use this file except in compliance with the License. ; You may obtain a copy of the License at ; ; http://www.apache.org/licenses/LICENSE-2.0 ; ; Unless required by applicable law or agreed to in writing, so...
class Token attr_accessor :type, :text, :position def initialize(type, text, position) @type = type @text = text @position = position end end
package DDG::Spice::Maps::Maps; # ABSTRACT: Map of current cocation use strict; use Text::Trim; use DDG::Spice; use Data::Dumper; spice to => 'http://api.mapbox.com/v4/geocode/mapbox.places/$1.json?access_token={{ENV{DDG_SPICE_MAPBOX_KEY}}}'; spice is_cached => 0; spice proxy_cache_valid => "418 1d"; spice wrap_jsonp...
const Eleventy = require('@11ty/eleventy'); const config = require('../../config'); const eleventy = new Eleventy(); module.exports = async function templates() { await eleventy.init(); if (config.get('watch')) { await eleventy.watch(); } else { await eleventy.write(); } };
package com.arpadfodor.stolenvehicledetector.android.app.view import android.content.Intent import android.os.Bundle import androidx.core.view.GravityCompat import androidx.drawerlayout.widget.DrawerLayout import androidx.lifecycle.Observer import androidx.lifecycle.ViewModelProvider import com.arpadfodor.stolenvehicl...
#!/bin/bash function usage() { echo "Usage: "$0" <domain> <subdomain_file> [<dns_server>]" if [ -n "$1" ] ; then echo "Error: "$1"!" fi exit } if [ $# -lt 2 ] || [ $# -gt 3 ] ; then usage fi domain=$1 file=$2 dnsserver="" n=0 if [ $# -eq 3 ] ; then dnsserver=$3 fi if ! [ -f $file ] ; then...
<?php /** * Created by PhpStorm. * User: kpicaza * Date: 23/08/16 * Time: 21:55 */ namespace App\Action; use App\Entity\User; use Doctrine\ORM\EntityManagerInterface; use Psr\Http\Message\ResponseInterface; use Psr\Http\Message\ServerRequestInterface; use Zend\Diactoros\Response\JsonResponse; class PostUserActi...
import { Injectable } from '@nestjs/common'; import { InjectRepository } from '@nestjs/typeorm'; import { Mensaje } from 'src/mensaje/Entities/mensaje.entity'; import { Repository, DeleteResult } from 'typeorm'; import { CreateMensajeDto } from 'src/mensaje/dto/create-mensaje-dto'; @Injectable() export class MensajeSe...
# Check if Parenthesis are balanced in an expression: Given a n length of expression which consist of parenthesis ('()','{}','[]') in it. This algorithm checks if the parenthesis are balanced in the expression that means the pairs and orders of "{","}","(",")","[","]" are correct. ### Algorithm - Initialize a stack...
#!/bin/bash echo "nameserver 127.0.0.1" > /etc/resolv.conf #
use std::cell::UnsafeCell; use std::marker::PhantomData; use std::rc::Rc; use futures::{Async, Future, Poll}; use error::Error; use handler::{ AsyncHandler, AsyncResult, AsyncResultItem, FromRequest, Handler, Responder, RouteHandler, WrapHandler, }; use http::StatusCode; use httprequest::HttpRequest; use http...
package org.nakedobjects.examples.orders.fixture; import java.util.ArrayList; import java.util.List; import org.nakedobjects.applib.fixtures.CompositeFixture; public class AllFixtures implements CompositeFixture { public List<Object> getFixtures() { List<Object> list = new ArrayList<Object>(...
{-# LANGUAGE TemplateHaskell #-} module Core.Move (Location(..), X(..), Y(..), Direction(..), run, Shipper(..), Id(..)) where import Control.Lens newtype Id = Id {_id :: String} newtype X = X {_x :: Int} deriving (Show, Eq) makeLenses ''X newtype Y = Y {_y :: Int} deriving (Show, Eq) makeLenses ''Y data D...
import { Meteor } from 'meteor/meteor'; import { Tiles } from '../lib/collections'; // Publish collections for consuming client-side Meteor.publish( 'tiles', ( ) => { const selector = {}; const sort = { sort: { relTimestamp: 1 } }; const entries = Tiles.find( selector, sort ); if ( entries ) { return e...
require 'rails_helper' RSpec.describe User, type: :model do it "nickname,email,avatar,password,password_confirmation,avatarが存在すれば登録出来ること" do user = build(:user) expect(user).to be_valid end it "nicknameがない場合は登録出来ないこと" do user = build(:user,nickname: nil) user.valid? expect(user.errors[:nick...
<?php require 'config.php'; require 'utils.php'; $conn = connect_db($dbhost, $dbuser, $dbpass, $dbname); if (exist_user($conn, $_GET["username"], $_GET["type"])) die(encode_result(1, "Registration failed: username already exists.")); if (new_user($conn, $_GET["username"], $_GET["password"], $_GET["type"], $_GET...
import os from typing import Tuple import numpy as np from numpy.core.fromnumeric import var MIN_REGION = -50 MAX_REGION = 50 REGION_SIZE = MAX_REGION - MIN_REGION + 1 COORD_OFFSET = -1 * MIN_REGION cur_dir = os.path.dirname(os.path.abspath(__file__)) reactor = np.zeros((REGION_SIZE, REGION_SIZE, REGION_SIZE), dt...
package u_time import ( "fmt" "math" "time" ) func DurationMillis(from int64, to int64) time.Duration { delta := int64(math.Abs(float64(to - from))) return time.Duration(delta * int64(time.Millisecond)) } func DurationToNow(millis int64) time.Duration { return DurationMillis(millis, CurrentMillis()) } func Du...
// // CMLChameleonCacheItem.h // // Created by Chameleon-Team on 2018/6/6. // #import "JSONModel.h" typedef NS_ENUM(NSUInteger, CMLChameleonCacheKind) { CMLChameleonCacheUnknown = 0, CMLChameleonCachePrefetch, CMLChameleonCacheRuntime, }; @interface CMLCacheItem : JSONModel @property (nonatomic, stron...
/** ******************************************************* * ロードデータ一覧. ******************************************************* */ #include "LoadDataList.h" /** * コンストラクタ. */ LoadDataList::LoadDataList() { _dataName = {0}; _error = true; } /** * デストラクタ. */ LoadDataList::~LoadDataList() { }...
hs33 = AmplModel(joinpath(@__DIR__, "hs033.nl")) result = madnlp(hs33;print_level=MadNLP.ERROR) @test result.status == :first_order @test solcmp(result.solution,[0.0,1.4142135570650927,1.4142135585382265]) @test solcmp(result.multipliers,[0.17677669589725922,-0.17677669527079812]) @test solcmp(result.multipliers_L,[11...
# How To To generate OpenApi.json and Swagger.json 1. run the server on `localhost:8080` 2. run from this directory the script `generate-openapi-and-swagger.sh`
package com.mina_mikhail.base_mvvm.data.general.repository import com.mina_mikhail.base_mvvm.data.general.data_source.remote.GeneralRemoteDataSource import com.mina_mikhail.base_mvvm.data.local.preferences.AppPreferences import com.mina_mikhail.base_mvvm.domain.general.repository.GeneralRepository import javax.inject....
/* * << * Davinci * == * Copyright (C) 2016 - 2017 EDP * == * 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 b...
// // Hippo // (C) 2021 Brave Monday // extern crate proc_macro; mod codegen; mod meta; use proc_macro as pm1; use proc_macro2 as pm2; use proc_macro_error::{abort_call_site, proc_macro_error}; use hippo_shared::{Configuration, OutputFormat}; use codegen::{emit, Container}; use meta::Meta; /// Preprocess and em...
import winston from 'winston'; import { name, version } from '../../package.json'; import { LOG_LEVEL } from '../config'; export const logger = winston.createLogger({ level: LOG_LEVEL, format: winston.format.json(), transports: [new winston.transports.Console()], defaultMeta: { package: { ...
import Link from 'next/link' import styles from '@styles/table.module.css' import { PAGE_LINKS } from '@utils/settings' import { useRouter } from 'next/router' const LinksTable = () => { const { pathname } = useRouter() return ( <table className={styles.table}> <thead> <tr className={styles.heade...
package tftp import ( "bytes" "io" "io/ioutil" "net" "testing" "time" ) func TestServer(t *testing.T) { t.Parallel() p1, err := ioutil.ReadFile("./tftp/payload.svg") if err != nil { t.Fatal(err) } conn, err := net.ListenPacket("udp", "127.0.0.1:") if err != nil { t.Fatal(err) } done := make(chan ...
#![cfg(test)] use log::trace; //fn bytes_from_hex_string(hex_str: &str) -> &[u8] { pub fn bytes_from_hex_string(hex_str: &str) -> Vec<u8> { trace!(target: "util::bytes_from_hex_string", "hex_str: {}", hex_str); let result = hex_str .split_whitespace() .map(|hex_digit| u8::from_str_radix(hex_dig...
#!/bin/bash # This small shell script initializes the I2C bus on a Raspberry Pi # and activates an installed real time clock module. # Afterwards the system time is synced to the hardware clock. echo ds1307 0x68 > /sys/class/i2c-adapter/i2c-1/new_device hwclock -s
using System; namespace KnowledgeMinutes.Models { public abstract class Animal { public override string ToString() { return this.GetType().Name; } public abstract float Weight { get; set; } public abstract AnimalType Type { get; set; } public void ...
package main import ( "bufio" "fmt" "os" "os/signal" "strings" "rdfs/cryp" "rdfs/geth" "rdfs/ipfs" "rdfs/jrpc" "rdfs/util" "github.com/ethereum/go-ethereum/accounts/keystore" "github.com/ipfs/go-ipfs-api" ) var ( geth_pid int = -1 ipfs_pid int = -1 geth_client *geth.GethRPC geth_keys []*keys...
/** * Copyright 2020 HCL Technologies Ltd. * 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 agre...
-- create a database with name employee_data CREATE DATABASE IF NOT EXISTS `employee_data`; use `employee_data`; -- create a table with name employee CREATE TABLE IF NOT EXISTS `employee` ( id INT UNSIGNED NOT NULL AUTO_INCREMENT, email VARCHAR(100) NOT NULL DEFAULT '', name ...
import { renderStack } from '../../../render/const'; import { activeHu } from '../const'; import injectionPrivateToInstance from '../util/injectionPrivateToInstance'; export default (isCustomElement, target, root, targetProxy) => { let $root = targetProxy; let $parent; if (isCustomElement) { const length =...
<h1>Add new order for @Model.VendorName</h1><br><br> <form action="/vendors/@Model.Id/orders" method="post"> <input id="vendorId" name ="vendorId" type="hidden" value="@Model.Id"><br> <input id="orderName" name ="orderName" type="text" placeholder="Name of the order" required><br> <input id="breadCount" name ="b...
<?php namespace Enkatsu\PhpOscParser\Tests; use Enkatsu\PhpOscParser\Reader; class ReaderTest extends \PHPUnit_Framework_TestCase { public function testStringRead() { $hello = 'Hello'; $hex = \join(\array_map(dechex, \array_map(ord, \str_split($hello)))); $buf = \collect(\array_chunk(\...
# Cloud Foundry Java Buildpack # Copyright 2013-2017 the original author or 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 # # Un...
#!/usr/bin/env bash cpuname=$(uname -p) docker build -t crank-agent --build-arg CPUNAME=$cpuname -f Dockerfile ../../
import iqtrade.api as iq qt = iq.QuestradeIQ("secrets.json") msft = qt.get_tickers("MSFT") msft_call = qt.get_tickers("MSFT15Oct21C300.00") variants = [ iq.StrategyVariantRequest( 1, iq.StrategyType.CoveredCall, legs=[ iq.StrategyLeg(msft[0].symbol_id, iq.OrderAction.Buy, 200)...
Describe "New-AWSVaultAlias" { Import-Module -Force .\posh-awsvault.psd1 $TestCases = @{ "When called with only an alias name" = @( "somecommand" ) "When called with an alias name and a command name" = @( "somealias", "somecommand" ) } foreach($Case in $TestCases.Keys) { Context $Case { $Tes...
package cromwell.engine.workflow.lifecycle.execution.callcaching import cats.data.Validated._ import cats.syntax.apply._ import cats.syntax.validated._ import cromwell.core.WorkflowId import cromwell.engine.workflow.lifecycle.execution.callcaching.CallCacheDiffQueryParameter.CallCacheDiffQueryCall import common.valida...
#include <bits/stdc++.h> using namespace std; long long readInt(long long l,long long r,char endd){ long long x=0; int cnt=0; int fi=-1; bool is_neg=false; while(true){ char g=getchar(); if(g=='-'){ assert(fi==-1); is_neg=true; continue; } if('0'<=g && g<='9'){ x*=10; x+...
#' QR #' #' QR factorization. #' #' @param x #' An fmlmat matrix. #' @param qr #' A compact QR factorization, specifically of class \code{qr_fml} - the return #' of the \code{qr()} function on \code{fmlmat} data. #' @param complete,Dvec,... #' Ignored. #' #' @aliases qr.Q qr.R #' #' @name qr #' @rdname qr NULL s...
export default class Campus { constructor(campus) { Object.keys(campus).forEach((prop) => { this[prop] = campus[prop]; }); } }
package main import ( "encoding/json" "flag" "fmt" "io" "log" "os" "regexp" "sort" "strings" "github.com/santhosh-tekuri/jsonschema/v5" ) var punctuationRegexp = regexp.MustCompile(`[^\w\- ]`) // ref: https://github.com/gjtorikian/html-pipeline/blob/main/lib/html/pipeline/toc_filter.rb func gfmHeaderAncho...
<?php if (!UNAME) { header('location:index.php'); exit(); } $view->header(); $users = $db->getUsers(); $view->listUsers($users); $view->footer();
// Mocks generated by Mockito 5.1.0 from annotations // in friends_secrets/test/app/modules/login/domain/usecases/get_logged_user_test.dart. // Do not manually edit this file. import 'dart:async' as _i5; import 'package:dartz/dartz.dart' as _i3; import 'package:friends_secrets/app/modules/login/domain/entities/logged...
package notifier import ( "fmt" "github.com/PagerDuty/go-pagerduty" "github.com/elsevier-core-engineering/replicator/logging" ) // PagerDutyProvider contains the required configuration to send PagerDuty // notifications. type PagerDutyProvider struct { config map[string]string } // Name returns the name of the ...
package testitemrendering.items; import testitemrendering.TestItemRenderingMod; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.Item; // The Lampshade demonstrates how an Item can be rendered in 3D using a custom renderer implementin...
#!/bin/sh for i in {1..660} do fatcat dump -L $i 2>/dev/null | grep '^f' >> files done
;; ;; 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 may ...
package me.starchaser.SQLMamager; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.util.logging.Level; import me.starchaser.KPManager; import me.starchaser.karenprotect; public abstract class Database { karenprotect plugin; C...
package leveldb import ( "io/ioutil" "os" "path/filepath" "github.com/motif-foundation/lachesis-base/kvdb" ) type Producer struct { datadir string getCache func(string) int } // NewProducer of level db. func NewProducer(datadir string, getCache func(string) int) kvdb.IterableDBProducer { return &Producer{ ...
// <copyright file="ICommunicationExceptionHandler.cs" company="Dark Bond, Inc."> // Copyright © 2016-2017 - Dark Bond, Inc. All Rights Reserved. // </copyright> // <author>Donald Roy Airey</author> namespace DarkBond { using System; /// <summary> /// Provides a handler for communication exceptions. ...
#pragma once namespace cgb { /** @brief Shader source information and shader loading options * * This information is important especially for shader hot reloading. */ enum struct shader_source_info : uint32_t { nothing = 0x0000, /** Shader source is loaded from a file */ from_file = 0x0001, /** Sha...
module T13417 where -- Amazingly this crashed GHC 8.0.2 data T a = E7 cons7 :: T a -> T b cons7 E7 = E7
#:title: Divine deployment: primer-ssh #:author: Grove Pyree #:email: grayarea@protonmail.ch #:revdate: 2020.03.16 #:revremark: Update SSH primer description #:created_at: 2019.06.30 D_DPL_NAME='primer-ssh' D_DPL_DESC='[Install-only] Collection of SSH tasks for initial set-up' D_DPL_PRIOR...
/* * Copyright (c) 2016. Sunghyouk Bae <sunghyouk.bae@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...
create or replace FUNCTION f (n INTEGER) RETURN INTEGER IS BEGIN RETURN n *n; END;
#ifndef NMOS_SCHEMAS_API_H #define NMOS_SCHEMAS_API_H #include "cpprest/api_router.h" namespace slog { class base_gate; } // This is an experimental extension to expose the embedded JSON Schemas for the NMOS specifications namespace nmos { namespace experimental { web::http::experimental::listene...
/** * @param {{property: string}} object * @param {string} objectProperty property of the object * @returns {[string]} an array with the values from the requested property */ export function getProperty(object, objectProperty) { let array = [] if (!object) { throw new Error(`object is ${object}`) } else ...
<?php namespace Jetimob\Juno\Lib\Http\Document; use Jetimob\Juno\Lib\Http\Response; /** * Class DocumentFileUploadResponse * @package Jetimob\Juno\Lib\Http\Document * @see https://dev.juno.com.br/api/v2#operation/uploadDocument */ class DocumentFileUploadResponse extends Response { /** @var string $id <Objec...
# Updating routes? Please update the readme as well. Rails.application.routes.draw do get 'static_pages/home', :as => 'about' resources :categories, only: [:show] resources :items, except: [:destroy] do resources :item_comments member do post :toggle put "like", to: "items#upvote" put ...
import { axiosInstance } from './api' import { Health } from '../types/api' document.getElementById('ping')!.addEventListener('click', () => { axiosInstance.get<Health>('/ping').then(({ data }) => { const counter = document.getElementById('count')! counter.innerHTML = `${data.count}` }) }) // webpack-hot-...
// <copyright file="TemplateDirectiveTest.cs" company="Oleg Sych"> // Copyright © Oleg Sych. All Rights Reserved. // </copyright> namespace T4Toolbox.TemplateAnalysis { using System; using System.ComponentModel; using System.Linq; using Microsoft.VisualStudio.Text; using NSubstitute; ...
<?php declare(strict_types=1); namespace TheImp\Exception\Http; use Exception as PhpException; use Throwable; /** 302 Found (Previously "Moved temporarily") */ class FoundException extends PhpException { /** * @var int */ protected $code = 302; protected string $url; /**...
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Gandalan.Client.Contracts.UIServices; namespace Gandalan.Client.Contracts.AppServices { /// <summary> /// Check for application updates /// </summary> public interface IApplicatio...
#pragma once #include <stdint.h> #include <sys/time.h> #include <sys/event.h> #ifndef MAP_TYPE #define MAP_TYPE 0x0f #endif typedef struct SceKernelModuleSegmentInfo { void *address; uint32_t size; int32_t prot; } SceKernelModuleSegmentInfo; typedef struct SceKernelModuleInfo { size_t size; char na...
#!/bin/bash ## ## ============================================================================================= ## IBM Confidential ## © Copyright IBM Corp. 2021- ## The source code for this program is not published or otherwise divested of its trade secrets, ## irrespective of what has been deposited with the U.S. Cop...
use Test::More; plan skip_all => 'set TEST_ONLINE to enable this test' unless $ENV{TEST_ONLINE}; use Rethinkdb; # setup r->connect->repl; r->db('test')->drop->run; r->db('test')->create->run; r->db('test')->table('marvel')->create( primary_key => 'superhero' )->run; # get an empty set my $res = r->db('test')->tab...
#!/bin/bash xhost + source env_for_project.sh $1 docker-compose run li3ds-prototype_tmux # docker-compose up xhost -
/*************************************************************************** cmdlineoptions.h - description ------------------- begin : Sun Oct 13 2007 copyright : (C) 2007 by Andre Simon email : andre.simon1@g...
package org.odk.collect.projects import androidx.test.ext.junit.runners.AndroidJUnit4 import com.google.gson.Gson import org.junit.runner.RunWith import org.odk.collect.shared.Settings import org.odk.collect.shared.UUIDGenerator @RunWith(AndroidJUnit4::class) class SharedPreferencesProjectsRepositoryTest : ProjectsRe...
package filter import ( "testing" "github.com/bio-routing/bio-rd/net" "github.com/stretchr/testify/assert" ) func TestInRange(t *testing.T) { tests := []struct { name string prefix net.Prefix pattern net.Prefix begin uint8 end uint8 expected bool }{ { name: "matches and in ra...
import { run } from 'testring'; run(async (api) => { await api.application.url('http://localhost:8080/cookie.html'); const cookieValue = await api.application.getCookie('test'); await api.application.assert.equal(cookieValue, 'TestData'); await api.application.deleteCookie('test'); await api.appli...
package drewcarlson.coingecko.models.global import kotlinx.serialization.Serializable @Serializable data class Global( val data: GlobalData )
import { Injectable } from '@nestjs/common'; import { InjectRepository } from '@nestjs/typeorm'; import { v4 as uuid } from 'uuid'; import { Repository } from 'typeorm'; import { Student } from './student.entity'; import { CreateStudentInput } from './student.input'; @Injectable() export class StudentService { const...