text stringlengths 27 775k |
|---|
part of dslink.utils;
class TimerFunctions extends LinkedListEntry<TimerFunctions> {
/// for better performance, use a low accuracy timer, ts50 is the floor of ts/50
final int ts50;
List<Function> _functions = new List<Function>();
TimerFunctions(this.ts50);
void add(Function foo) {
if (!_functions.con... |
# frozen_string_literal: true
module Ci
# This class loops through all builds with exposed artifacts and returns
# basic information about exposed artifacts for given jobs for the frontend
# to display them as custom links in the merge request.
#
# This service must be used with care.
# Looking for exposed... |
package koks.module.visual;
import koks.api.event.Event;
import koks.api.registry.module.Module;
import koks.api.utils.Resolution;
import koks.event.Render2DEvent;
import koks.event.Render3DEvent;
import net.minecraft.entity.Entity;
import net.minecraft.entity.item.EntityTNTPrimed;
import net.minecraft.util.MathHelper... |
#!/bin/bash
# Create dummy test files for each row in input file.
## INPUTS ##
LIST_SAMPLES="$1"
############
## SCRIPT ##
# Create dummy test files.
lnum=0
while read -r line || [[ -n "$line" ]]; do
lnum=$((lnum+1))
FILE_NAME="dummy_""$line"".txt"
echo "# Dummy data for sample ID: ""$line" > "$FILE_NAME"
ec... |
package algorithm.leetcode;
import java.util.ArrayList;
import java.util.Collections;
import java.util.LinkedList;
import java.util.List;
/**
* @author: mayuan
* @desc: 二叉树的层次遍历 II
* @date: 2019/03/07
*/
public class Solution107 {
public List<List<Integer>> levelOrderBottom(TreeNode root) {
List<List... |
package net.fitken.base.widget
import android.annotation.TargetApi
import android.content.Context
import android.os.Build
import android.util.AttributeSet
import android.view.WindowInsets
import android.widget.FrameLayout
/**
* A FrameLayout subclass that dispatches WindowInsets to its children instead of adjusting ... |
module.exports = [
require('./access.js').default,
require('./alias.js').default,
require('./author.js').default,
require('./content.js').default,
require('./deprecated.js').default,
require('./example.js').default,
require('./group.js').default,
require('./groupDescription.js').default,
require('./ig... |
package org.cirruslabs.anka.sdk.exceptions
class AnkaException(message: String, e: Throwable? = null) : Exception(message, e) {
constructor(e: Throwable) : this(e.message ?: "", e)
}
|
// Setup all environment variables
/* eslint-disable import/first*/
process.env.NODE_ENV = 'test';
import chai, { expect } from 'chai';
import chaiString from 'chai-string';
import sinon from 'sinon';
import database from '../src/services/database';
export const sandbox = sinon.createSandbox();
before(() => {
chai... |
namespace Haapanen.GrimUtil.Ui.Data
{
public static class FileNameConstants
{
public const string Settings = "settings.json";
}
}
|
#!/bin/sh
if [ "$1" = "ebms" ]; then
sh loopback-ebms.sh
elif [ "$1" = "as2" ]; then
sh loopback-as2.sh
else
echo "Usage: sh loopback.sh ( protocols ... )"
echo "protocols:"
echo " ebms Loop back test for ebMS protocol"
echo " as2 Loop back test for AS2 protocol"
f... |
$node = Get-ClusterNode | Select-Object Name | Out-GridView -Title "Select one or more Nodes to drain" -PassThru
Suspend-ClusterNode -Name $node.Name -Drain
#restart $node.Name
Resume-ClusterNode -Name $node.Name -Failback Immediate |
#!/usr/bin/perl
#
# Test setting color aliases via the environment.
#
# Copyright 2012 Stephen Thirlwall
# Copyright 2012, 2014 Russ Allbery <rra@cpan.org>
#
# This program is free software; you may redistribute it and/or modify it
# under the same terms as Perl itself.
use 5.006;
use strict;
use warnings;
use lib 't... |
{-# LANGUAGE DeriveGeneric #-}
module Conjure.Language.Lexer
( Lexeme(..)
, LexemePos(..)
, runLexer
, textToLexeme
, lexemeText
, lexemeFace
) where
import Conjure.Prelude
import Data.Char ( isAlpha, isAlphaNum )
import qualified Data.HashMap.Strict as M
import qualified Data.Text as T
i... |
-- migrate:up
INSERT INTO specialisms (id, name) VALUES
(1, 'CIRUJANO DENTISTA'),
(2, 'PACIENTES ESPECIALES'),
(4, 'PERIODONCIA'),
(6, 'PATOLOGIA ORAL'),
(7, 'ENDODONCIA'),
(8, 'CIRUJANO DENTISTA/ REHABILITACIÓN ORAL'),
(9, 'IMPLANTOLOGIA ORAL INTEGRAL'),
(12, 'CIRUGÍA BUCAL Y MAXILO FACIAL'),
(13, ... |
import {BaseMutation} from '../base-mutation';
import {CssKey, CssValue, DEFAULT_CSS_VALUES} from './default-css-values';
import {CssStyle} from './css-style';
import {styleEquals} from '../../utils/style-equals';
export abstract class SetStyle extends BaseMutation {
changes: {new: CssStyle; old: CssStyle};
co... |
from typing import List
def two_sum(lis: List[int], target: int):
dici = {}
for i, value in enumerate(lis):
objetive = target - value
if objetive in dici:
return [dici[objetive], i]
dici[value] = i
return []
print(two_sum([1, 2, 3, 4, 5, 6], 7))
|
# Сборка, содержащая реализацию посредника для выполнения операций сервисов
### Основные сущности
Основной класс - **Mediator**. Представляет собой посредник, позволяющий связывать различные виды сообщений и их обработчики.
**EventCollector** позволяет обеспечить отложенную отправку через посредник.
#### Инструкци... |
package in.apra.apraclock.tasks;
/**
* RandomMathTask represents a single randomly generated arithmatic problem
* with 2 operands and one of the 3 operators: +/-/x
* Created by apra on 9/26/2016.
*/
public class RandomMathTask {
// following 3 variables represents the state of this class
int firstOp;
... |
require 'redcarpet'
module FML
class Field
attr_reader :name, :type, :label, :prompt, :required, :options,
:conditional_on, :validations, :helptext, :disabled, :attrs
attr_accessor :value, :errors, :conditional_on_runner
def initialize(params)
@name = params[:name]
@type = params[:typ... |
<?php
/**
* Main Phone Class
*
* @package blobfolio/phone
* @author Blobfolio, LLC <hello@blobfolio.com>
*/
namespace blobfolio\phone;
use blobfolio\common\constants;
use blobfolio\common\data as c_data;
use blobfolio\common\ref\cast as r_cast;
use blobfolio\common\ref\sanitize as r_sanitize;
class phone {
co... |
using System.Collections;
using System.ComponentModel.Design;
using System.Runtime.InteropServices;
namespace System.Drawing.Design
{
//[ComImport]
public interface IToolboxService
{
CategoryNameCollection CategoryNames
{
get;
}
string SelectedCategory
{
get;
set;
}
void AddCreator(ToolboxI... |
@extends('customer.layout.main')
@section('title','Messages')
@section('content')
<div class="site-content">
<div class="content-area py-1">
<div class="container-fluid">
<div class="row">
<div class="col-sm-12 col-md-12">
<div class="card mb-0">
<ul class="nav nav-tabs nav-tabs-2 profile-tabs" role="t... |
---
title: Vietnam
---
Last visited 8th August until 8th October 2014
|
module ThreeScaleToolbox
module Commands
module PolicyRegistryCommand
module Copy
class CopySubcommand < Cri::CommandRunner
include ThreeScaleToolbox::Command
def self.command
Cri::Command.define do
name 'copy'
usage 'copy [op... |
using System;
using System.Windows;
using System.Windows.Threading;
namespace WpfMovieSystem.Helpers
{
public class ShowMessage
{
private static MessageBoxButton okBtn = MessageBoxButton.OK;
private static MessageBoxImage errIcon = MessageBoxImage.Error;
private static MessageBoxButton... |
<?php
namespace Joppli\Route\Validator;
use Joppli\Config\Config;
class PathValidator extends AbstractRequestValidator
{
public function validate(Config $options)
{
if(strcmp($this->request->getPath(), $options->path) != 0)
throw new Exception\ValidatorException(
'input->path MUST match request... |
msg = gets.to_s.strip
index = 0
result = 0
while index < msg.length do
result += 1 if msg[index] != 'S'
result += 1 if msg[index + 1] != 'O'
result += 1 if msg[index + 2] != 'S'
index += 3
end
puts result |
#[cfg(not(feature = "std"))]
use alloc::string::String;
#[cfg(not(feature = "std"))]
use alloc::vec::Vec;
/// A vector which records current position.
///
/// This type is a wrapper of `Vec<T>`, holds its position for parsing.
///
/// > Note that the position is a point that parser should read **next** time.
pub struc... |
using System;
using System.Collections;
using System.Diagnostics;
using UnityEngine;
public class ParticleLoop : MonoBehaviour
{
public float loopTime;
private void Start()
{
base.StartCoroutine(this.StartLoop());
}
[DebuggerHidden]
private IEnumerator StartLoop()
{
ParticleLoop.<StartLoop>c__Iterator1 <S... |
(defproject jp.ne.tir/lein-koshiro "0.1.7-SNAPSHOT"
:min-lein-version "2.8.1"
:description "Yet another lein-ancient"
:url "https://github.com/ayamada/lein-koshiro"
:license {:name "MIT License"
:url "http://opensource.org/licenses/MIT"
:year 2016
:key "mit"}
;; for test :... |
"""
WebSockets
This module implements the WebSockets protocol. It relies on the package HTTP.jl.
Websocket|server relies on a client initiating the connection.
Websocket|client initiate the connection.
The client side of the connection is most typically a browser with
scripts enabled. Browsers are always the init... |
<!-- Style css -->
<link href="{{ asset('superadmin/assets/css/style.css') }}" rel="stylesheet" />
<link href="{{ asset('superadmin/assets/css/dark.css') }}" rel="stylesheet" />
<link href="{{ asset('superadmin/assets/css/skin-modes.css') }}" rel="stylesheet" /> |
import React from 'react';
import { useDispatch, useSelector } from 'react-redux';
import { Trans, t } from '@lingui/macro';
import { Button } from '../../components/button';
import { get } from '../../services/blocks/actions';
import { begin } from '../../services/fetch-status/actions';
import { getFetchStatus } from... |
chmod -R 777 storage/
composer install
cp .env.dist .env
# edit database config
php artisan migrate
php artisan db:seed
# add swap memory
# https://www.digitalocean.com/community/tutorials/how-to-add-swap-on-centos-7 |
// Copyright 2018-2020 Drexel University
// Author: Geoffrey Mainland <mainland@drexel.edu>
#ifndef UTIL_EXEC_HH_
#define UTIL_EXEC_HH_
#include <string>
#include <vector>
/** @brief Exec a command. */
int exec(const std::vector<std::string>&);
#endif /* UTIL_EXEC_HH_ */
|
# HashPeak Releases
## Version 1.0.1 - 5th May 2014
* Fixed crash on sgminer 4.1.0 due to API field "Diff1 Work" type incompatibility.
## Version 1.0 - 29th April 2014
* Initial release. |
using System;
using Tests.Framework.Integration;
namespace Benchmarking
{
public class BenchmarkingCluster : ClusterBase
{
}
} |
package com.example.ahao9.socialevent.utils
import android.util.Log
/**
* @ Author :Hao Zhang.
* @ Date :Created in 17:10 2018/10/21
* @ Description:Build for Metropolia project
*/
object LogUtils {
var isDebug = true
private val TAG = "hero"
fun i(msg: String) {
if (isDebug)
... |
import React from "react"
import ExperiencesPage from "./images/experiences"
import InnovationPage from "./images/innovation"
import ArrowRightLongIcon from "../../shared/ArrowRightLongIcon"
import { Link } from "gatsby"
const TravelPages = () => (
<section className="travel__pages has-background-white">
<... |
package langd
import (
"bytes"
"fmt"
"math/rand"
"testing"
"github.com/OneOfOne/xxhash"
"github.com/object88/langd/collections"
)
func Test_CalculateHash(t *testing.T) {
source := make([]byte, 2056)
rand.Read(source)
r := bytes.NewReader(source)
actual := uint64(calculateHash(r))
hash := xxhash.New64()
... |
package gitbucket.core.ssh
import gitbucket.core.service.SystemSettingsService.SshAddress
import org.apache.sshd.server.channel.ChannelSession
import org.apache.sshd.server.{Environment, ExitCallback}
import org.apache.sshd.server.command.Command
import org.apache.sshd.server.shell.ShellFactory
import java.io.{InputS... |
# Dispatch users
class UsersController < ApplicationController
before_action :set_user, only: %i[show update destroy]
before_action :require_auth, only: %i[index show update destroy]
before_action :set_default_request_format
before_action :forbid_public_user, except: %i[show]
# GET /users
# GET /users.json... |
/* Copyright 2020-2021 Kinglet B.V.
*
* 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 i... |
// Test :: Dot Nav
/* globals describe: true, it: true */
'use strict';
var barista = require('seed-barista');
var expect = require('chai').expect;
describe('seed-dot-nav: component: dot-nav', function() {
var style = `
@import "./_index";
`;
var output = barista({ content: style });
var $o = output.$('.c... |
// 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 ... |
require 'CSV'
def getlanguage(data, name)
return data.select { |x| x[:language] == name }[0]
end
def getLOCCount(lang)
csv = CSV.new(File.read("statistics/cloc.csv"), :headers => true, :header_converters => :symbol, :converters => :all)
data = csv.to_a.map {|row| row.to_hash }
getlanguage(data, lang)[:code]
e... |
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Threading.Tasks;
namespace bundleSVC.DTO
{
public class BundleAddDTO
{
[Required]
[MaxLength(100)]
public string B_name { get; set; }
[Required]
... |
#!/usr/bin/env bash
# We need root access, but also appropriate envvar values. Require scripts to
# run with sudo as a normal user
ensure_env() {
RC=false
[ $EUID -eq 0 ] && [ -n "$SUDO_USER" ] && [ "$SUDO_USER" != "root" ] && RC=true
if $RC; then
export SETUP_USER="$SUDO_USER"
export SETUP_HOME="$HOME"
... |
<?php
namespace App\Http\Controllers\api;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use App\Models\Contrato;
use App\Models\ContratoArquivo;
use Illuminate\Support\Facades\Storage;
class ContratosApi extends Controller
{
public function index()
{
return response()->json(C... |
using System;
using UnityEngine;
using Random = UnityEngine.Random;
[Serializable]
public class GridTile : MonoBehaviour
{
public Material[] tileMaterials;
private MeshRenderer gridMat;
private int matIndex;
public int MatIndex
{
get => matIndex;
set => matIndex = value;
}
... |
""" Quantitative Signal Node for STL formulas """
from .formulanode import FormulaNode
from ....signals import Signal, BooleanSignal, SignalList
class QuantitativeSignalNode(FormulaNode):
""" Node in STL ASTs representing quantitative Signal. """
def booleanValidate(self, signals: SignalList, plot: bool) -> Boolea... |
package ast
import (
"fmt"
"io"
"math"
"strconv"
"strings"
"github.com/goccy/go-yaml/token"
"golang.org/x/xerrors"
)
var (
ErrInvalidTokenType = xerrors.New("invalid token type")
ErrInvalidAnchorName = xerrors.New("invalid anchor name")
ErrInvalidAliasName = xerrors.New("invalid alias name")
)
// NodeTy... |
import React from "react";
import styled, { css } from "styled-components";
import Logo from "Root/components/global/Logo";
import Avatar from "Root/components/global/Avatar";
import Navbar from "Root/components/mobile/Navbar";
import { AuthContext } from "Root/contexts/auth";
import avatar from "Root/public/img/avatar... |
#!/bin/bash
# consumer
/bin/bash ./dubbo-consumer-zookeeper/run-stop.sh
# provider
/bin/bash ./dubbo-provider-zookeeper/run-stop.sh
# zookeeper
/bin/bash ./run-admin-and-zookeeper-stop.sh
|
const responses = require("../responses");
const logger = require("../logger");
const dbParamsQuerySedersIndex = require("./dbParamsQuerySedersIndex");
const awsSdk = require("aws-sdk");
const runQuery = require("./runQuery");
const sedersResponse = require("./sedersResponse");
const seders = [ ... |
%%
%% %CopyrightBegin%
%%
%% Copyright Ericsson AB 2004-2018. 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
%... |
use crate::{error::DeterminismLevel, module::IntoTrap};
use graph::blockchain::DataSource;
use graph::blockchain::{Blockchain, DataSourceTemplate as _};
use graph::components::store::EntityKey;
use graph::components::store::EntityType;
use graph::components::subgraph::{CausalityRegion, ProofOfIndexingEvent, SharedProof... |
package leetcode
import java.util.*
/**
* 46. 全排列
* https://leetcode-cn.com/problems/permutations/
* 给定一个没有重复数字的序列,返回其所有可能的全排列。
示例:
输入: [1,2,3]
输出:
[
[1,2,3],
[1,3,2],
[2,1,3],
[2,3,1],
[3,1,2],
[3,2,1]
]
来源:力扣(LeetCode)
链接:https://leetcode-cn.com/problems/permutations
著作权归领扣网络所有。商业转载请联系官方授权,非商业转载请注明出处。
*/
ob... |
<?php
/**
* Plugin interface.
*
* @author John P. Bloch
* @author Brady Vercher
* @author Pereira Pulido Nuno Ricardo <r.pereira@madeinitalyslc.it>
*
* @see https://github.com/johnpbloch/wordpress-dev
*
* @copyright Copyright (c) 2015 Cedaro, LLC
* @copyright 2019 Made In Italy SLC
*/
namespace WPMit\Contr... |
class KthLargestNumberInStream:
def __init__(self, input=[], k=0):
self.heap = []
self.size = 0
self.k = k
for num in input:
self.add(num)
def heap_push(self, num):
self.heap.append(num)
self.size += 1
curr = self.size-1
while curr > 0 and self.he... |
package org.aertslab.grnboost.lab
import breeze.linalg._
import org.scalatest.{FlatSpec, Matchers}
import org.aertslab.grnboost.Expression
/**
* @author Thomas Moerman
*/
class BreezeLab extends FlatSpec with Matchers {
"get a column from a CSC Matrix" should "work" in {
val b1 = new CSCMatrix.Builder[Int]... |
import fs from 'fs-extra'
import path from 'path'
import util from 'util'
import R from 'ramda'
import sh from 'shelljs'
import split from 'split-string'
import byline from 'byline'
import XLSX from 'xlsx'
import parseCsv from 'csv-parse/lib/sync.js'
import B from 'bufx'
// Set true to print a stack trace in vlog
expo... |
<?php
namespace ZnBundle\User\Domain\Entities;
use DateTime;
use Symfony\Component\Validator\Constraints as Assert;
use Symfony\Component\Validator\Mapping\ClassMetadata;
use ZnCore\Domain\Interfaces\Entity\EntityIdInterface;
use ZnCore\Domain\Interfaces\Entity\UniqueInterface;
use ZnCore\Domain\Interfaces\Entity\Val... |
<?php
class keranjang_model extends CI_Model{
public function getItem(){
$query = $this->db->get('keranjang');
return $query->result_array();
}
public function getItemByIdUser($id_user){
$this->db->select('*');
$this->db->from('keranjang');
$this->db->where('id_user',$id_user);
return $this->db->get()... |
package org.team5419.fault.hardware.ctre
import com.ctre.phoenix.sensors.PigeonIMU
import org.team5419.fault.math.geometry.Rotation2d
import org.team5419.fault.math.units.derived.degrees
import org.team5419.fault.util.Source
fun PigeonIMU.asSource(): Source<Rotation2d> = { Rotation2d(fusedHeading.degrees) }
|
package dev.thecodewarrior.hooked.hooks
import com.teamwizardry.librarianlib.core.util.sided.clientOnly
import com.teamwizardry.librarianlib.core.util.vec
import com.teamwizardry.librarianlib.math.cross
import dev.thecodewarrior.hooked.hook.Hook
import dev.thecodewarrior.hooked.hook.HookControllerDelegate
import dev.t... |
require 'seismograph'
module Circuitry
module Middleware
class Seismograph
attr_reader :namespace, :stat
def initialize(options = {})
self.namespace = options.fetch(:namespace, 'circuitry')
self.stat = options.fetch(:stat)
end
def call(topic, _message, &block)
ta... |
package se.bylenny.flickrimages
interface FlickrView {
fun setImageSrc(src: String, aspect: Float)
fun setCaption(caption: String?)
fun setAuthor(author: String?)
fun removeImage()
} |
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateStudentTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('student', funct... |
<?php
/* @var $model fronted\models\Employee */
use yii\helpers\Html;
use yii\widgets\ActiveForm;
if ($model->hasErrors()) {
echo '<pre>';
print_r($model->getErrors());
echo '<pre>';
}
?>
<h1>Welcome to our company!</h1>
<?php $form = ActiveForm::begin(); ?>
<?php echo $form->field($model, 'firstNa... |
package typingsSlinky.jqueryJsonrpcclient
import org.scalablytyped.runtime.Instantiable0
import org.scalablytyped.runtime.Instantiable1
import org.scalablytyped.runtime.StObject
import scala.scalajs.js
import scala.scalajs.js.`|`
import scala.scalajs.js.annotation.{JSGlobalScope, JSGlobal, JSImport, JSName, JSBracketA... |
{-# LANGUAGE QuasiQuotes #-}
module Conjure.Rules.Vertical.Sequence.ExplicitBounded where
import Conjure.Rules.Import
rule_Comprehension :: Rule
rule_Comprehension = "sequence-comprehension{ExplicitBounded}" `namedRule` theRule where
theRule (Comprehension body gensOrConds) = do
(gocBefore, (pat, sequ),... |
# ST\_Y<a name="ST_Y-function"></a>
ST\_Y returns the second coordinate of an input point\.
## Syntax<a name="ST_Y-function-syntax"></a>
```
ST_Y(point)
```
## Arguments<a name="ST_Y-function-arguments"></a>
*point*
A `POINT` value of data type `GEOMETRY`\.
## Return type<a name="ST_Y-function-return"></a>
... |
using System.IO;
using BddHabitat.IntegrationTests.Pages.Components;
using OpenQA.Selenium;
namespace BddHabitat.IntegrationTests.Pages
{
/// <summary>
/// The more info page.
/// </summary>
/// <seealso cref="BddHabitat.IntegrationTests.Pages.PageBase" />
public class MoreInfo : PageBase
{
... |
import Vue from 'vue'
import VueRouter from 'vue-router'
import App from './popup.vue'
import Register from './register.vue'
import Storage from './storage.vue'
Vue.use(VueRouter);
const routes = [
{ path: '/', redirect: '/register' },
{ path: '/register', component: Register },
{ path: '/storage', compon... |
using BepInEx.Logging;
using H3MP.Networking.Listeners;
using H3MP.Utils;
using LiteNetLib.Utils;
using System;
using System.Collections.Generic;
using System.Net;
namespace H3MP.Networking
{
public abstract class Server<TServer> : IUpdatable, IDisposable where TServer : Server<TServer>
{
private readonly SelfPeer... |
/// <reference types="../../slickgrid/slick.autotooltips" />
var tgrid = new Slick.Grid("#myGrid", [], [], {});
tgrid.registerPlugin(new Slick.AutoTooltips({
enableForCells: true,
enableForHeaderCells: true,
maxToolTipLength: 100
}));
|
package kpy.struct
import com.google.common.truth.Truth.assertThat
import org.junit.jupiter.api.Test
class ResultKtTest {
@Test
fun resultState() {
val fooError = Result.Error(Exception())
val fooSuccess = Result.Success(Foo("foo"))
val fooLoading = Result.Loading
assertThat(... |
<?php
/**
* 前台页面加载事件
*/
Event::register('YB_HOME_ONLOAD',function($data){
$view = $data['control']->view;
$articleModel = new ArticleModel;
$view->rightNewest = $articleModel->homeSelect()
->orderByNew()
->limit(10)
->select();
$commentModel = new CommentModel;
$vi... |
/*
Some good-to-follow rules when naming varaibles are:
1. Use human-readable names like firstName.
2. Stay away from abbreviations or short names like a, b, c.
3. Make names maximally descriptive and concise. Examples of bad names are data and value.
Such names say nothing. It’s only okay to use them if the context of... |
import requestV0 from '../v0/request.ts'
/**
* EndTxn Request (Version: 1) => transactional_id producer_id producer_epoch transaction_result
* transactional_id => STRING
* producer_id => INT64
* producer_epoch => INT16
* transaction_result => BOOLEAN
*/
export default ({
transactionalId,
producerId,... |
package co.edu.unal.arqsoft.messenger.rest;
import co.edu.unal.arqsoft.messenger.businesslogic.MessageBL;
import co.edu.unal.arqsoft.messenger.dto.MessageDTO;
import co.edu.unal.arqsoft.messenger.dto.UserDTO;
import co.edu.unal.arqsoft.messenger.model.Message;
import co.edu.unal.arqsoft.messenger.model.User;
import co... |
using System;
namespace ChessClock
{
public class ClockSettings
{
public enum DelayType
{
None,
Fischer,
Bronstein,
Normal
}
public readonly TimeSpan GameTime;
public readonly TimeSpan DelayTime;
public readonly D... |
namespace Sport.ViewModels.User
{
using System;
public class UserDrawViewModel
{
public string Id { get; set; }
public DateTime? DateOfBirth { get; set; }
public string FirstName { get; set; }
public string LastName { get; set; }
public ... |
package com.gongshw.playground.image.decoder;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
import javax.imageio.ImageIO;
import javax.imageio.ImageReader;
import javax.imageio.metadata.IIOMetadata;
import javax.imageio.stream.Ima... |
// Copyright 2017-2020, Square, Inc.
package entity
import (
"context"
"time"
"go.mongodb.org/mongo-driver/bson"
"go.mongodb.org/mongo-driver/bson/primitive"
"go.mongodb.org/mongo-driver/mongo"
"go.mongodb.org/mongo-driver/mongo/options"
"github.com/square/etre"
"github.com/square/etre/cdc"
"github.com/squ... |
# To open access to your node's public data, you need to prepare the node.
## Basic requirements:
1. Availability of a dedicated public IPv4 address
2. Open ports 37070, 38081 and 8087
3. If your node gets access to the global Internet, port forwarding through your router is required
4. Valid node settings to allow acc... |
package org.koil.dev
import org.koil.org.OrganizationRepository
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.web.bind.annotation.*
@RestController
@RequestMapping("/dev")
class OrganizationDevController(@Autowired private val organizationRepository: OrganizationRepository) ... |
package de.rki.coronawarnapp.presencetracing.storage.repo
import de.rki.coronawarnapp.presencetracing.checkins.qrcode.TraceLocation
import de.rki.coronawarnapp.presencetracing.storage.TraceLocationDatabase
import de.rki.coronawarnapp.presencetracing.storage.dao.TraceLocationDao
import de.rki.coronawarnapp.presencetrac... |
class Cms::AboutsController < BackOfficeController
before_filter :set_about
empty_methods :show
def update
@about.attributes = params[:about]
@about.image = params[:image]
@about.logo = params[:logo]
if @about.save
flash[:notice] = "Your changes were saved."
redirect_to :action => "... |
<!-- Nav Start -->
<div class="classynav">
<ul>
<li><a href="{{route('blog-index')}}">Home</a></li>
<li><a href="{{route('blog-blog')}}">Blog</a>
<ul class="dropdown">
@foreach($categories as $category)
<li><a href="{{ route('blog.blog-by-category', $c... |
angular
.module('pages.footer')
.controller('footerController', footerController);
footerController.$inject = [
'$scope',
'challengeService'
];
function footerController($scope, challenges) {
}
|
package com.qubit.android.sdk.internal.placement.repository
import com.google.gson.JsonObject
interface PlacementAttributesRepository {
fun save(key: String, value: JsonObject)
fun load(): MutableMap<String, JsonObject>
}
|
export const GA_TRACKING_ID = 'UA-204337324-1'
export const PAGE_TAGS = {
BLOGS: 'BLOGS'
}
export const CLICK_EVENT_TAG_NAMES = {
MENU: 'MENU_CLICK',
E_LINK: 'EXTERNAL_LINK',
TOC_LINK: 'EXTERNAL_LINK',
} |
package com.suleymankayabasi.springboot.controller;
import com.fasterxml.jackson.databind.ser.impl.SimpleBeanPropertyFilter;
import com.fasterxml.jackson.databind.ser.impl.SimpleFilterProvider;
import com.suleymankayabasi.springboot.converter.UserConverter;
import com.suleymankayabasi.springboot.dto.UserDto;
import co... |
import { mockLoggerService } from '../../../../utils/test-utils';
import TagServiceImpl from '../TagServiceImpl';
describe('TagServiceImpl', () => {
describe('getUserTags', () => {
it('should get tags', async () => {
const mockGetTags = jest.fn().mockResolvedValue([{ id: 1, name: 'foo' }]);
const se... |
package util
import org.scalatestplus.play.PlaySpec
import play.api.libs.json.Json
class EmptyPreservingReadsSpec extends PlaySpec {
"EmptyPreservingArrayReads" should {
implicit val emptyPreservingReads = EmptyPreservingReads.readsStringSeq
"correctly parse standard string arrays" in {
val json = J... |
#include <stdio.h>
#include "gtest/gtest.h"
#include "Core/Context.h"
#include "Core/Object.h"
#include "Container/Vector.h"
#include "Container/Str.h"
#include "Core/Variant.h"
#include "IO/File.h"
#include "IO/FileSystem.h"
#include "Dxf/DxfReader.h"
#include "Dxf/DxfWriter.h"
using namespace Urho3D;
//commmon el... |
---
layout: watch
title: TLP1 - 18/02/2019 - M20190218_033330_TLP_1T.jpg
date: 2019-02-18 03:33:30
permalink: /2019/02/18/watch/M20190218_033330_TLP_1
capture: TLP1/2019/201902/20190217/M20190218_033330_TLP_1T.jpg
---
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.