text stringlengths 27 775k |
|---|
module Docwatch
class Session
def initialize(socket, logger)
@socket = socket
@logger = logger
logger.log(first_request_line)
end
def close
@socket.close
end
def path
if first_request_line.nil? || first_request_li... |
<?php
session_start();
include('control/global.php');
include('control/function.php');
if(!isset($_REQUEST['submit'])){
if(!isset($_REQUEST['page'])){
if(!isset($_REQUEST['main'])){
include('frame/login.php');
session_destroy();
exit(0);
}else{
include... |
import {
Context, createApp, dependency, Get, HttpResponseOK, Post, ServiceManager, Session, SessionStore, TokenRequired
} from '@foal/core';
import { strictEqual } from 'assert';
import * as request from 'supertest';
describe('The session store', () => {
let serviceManager: ServiceManager;
beforeEach(() => {... |
# Generate https://chef.github.io/chef-rfc/ , using metadata from
# individual RFCs to build an index.
require 'metadown'
require 'pygments'
require 'erubis'
class HTMLwithPygments < Metadown::Renderer
def block_code(code, language)
Pygments.highlight(code, lexer: language)
rescue Exception
Pygments.highl... |
// Just some Unicode Terminal color stuff
const unicodeColor = (code: number) => `\u001B[${code}m`;
const rawColors = {
black: 30,
red: 31,
green: 32,
yellow: 33,
blue: 34,
magenta: 35,
cyan: 36,
white: 37,
};
const colors = {} as {
[key in keyof typeof rawColors]: (c: string) => string;
};
Object.... |
<?php
use yii\db\Migration;
class m190808_073712_alter_borang extends Migration
{
public function up()
{
$this->addColumn('borang', 'nama_ayah', $this->string(50)->notNull());
$this->addColumn('borang', 'nama_ibu', $this->string(50)->notNull());
$this->addColumn('borang', 'pekerjaan_ay... |
package component
import (
"github.com/ovrclk/gestalt"
"github.com/ovrclk/gestalt/vars"
)
type Ensure interface {
gestalt.Component
First(gestalt.Component) Ensure
Run(gestalt.Component) Ensure
Finally(gestalt.Component) Ensure
}
type ensure struct {
cmp gestalt.Component
pre gestalt.Component
childre... |
package intacct
import (
"encoding/xml"
"testing"
"time"
)
func TestDate(t *testing.T) {
jan1 := NewDate(2012, 1, 1)
if jan1.String() != "1/1/2012" {
t.Errorf("Unexpected date string: %s != 1/1/2012", jan1)
}
dec12 := NewDate(2006, 12, 12)
if dec12.String() != "12/12/2006" {
t.Errorf("Unexpected date stri... |
alter table ref_site_coeflu
add
constraint ref_site_coeflu_fk1
foreign key (site_id)
references hdb_site(site_id);
alter table ref_site_coeflu
add
constraint ref_site_coeflu_fk2
foreign key (attr_id)
references hdb_attr(attr_id);
alter table ref_site_coeflu
add
constraint ref_sit... |
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <string.h>
#include "string_builder.h"
#include "rxvm_err.h"
#define DEFAULT_BLOCK_SIZE 10
static int enlarge_buf (strb_t *cfg, int blocks)
{
char *temp;
int size;
size = cfg->block_size * blocks;
if ((temp = realloc(cfg->buf, cf... |
2020年12月03日23时数据
Status: 200
1.黄子韬劝被出轨的粉丝分手
微博热度:4442077
2.澳总理微信发文被删
微博热度:2936497
3.奚梦瑶发长文谈产后抑郁
微博热度:1977426
4.丁真收到鸡腿抱枕后的表情
微博热度:1538225
5.邓亚萍告诉PDD不能怕输
微博热度:912077
6.离婚证必须双方同时领取
微博热度:811474
7.当我妈妈必须先当硕士
微博热度:708286
8.明年1月1日起办理离婚将设冷静期
微博热度:612276
9.九尾狐传大结局
微博热度:596187
10.美发布限制中共党员及家属赴美旅行新规
微博热度:58851... |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace Blazor.Payments.Data
{
public enum SupportedTypesType
{
Credit,
Debit,
Prepaid
}
}
|
{-
(c) The University of Glasgow 2006
(c) The GRASP/AQUA Project, Glasgow University, 1992-1998
Bag: an unordered collection with duplicates
-}
{-# LANGUAGE ScopedTypeVariables #-}
module GHC.Data.Bag (
Bag, -- abstract type
foldBag, isEmptyBag, isSingletonBag, consBag, snocBag,
listToBag, ... |
# frozen_string_literal: true
require_relative '../converter'
module TTY
class ProgressBar
# Used by {Pipeline} to format :elapsed token
#
# @api private
class ElapsedFormatter
MATCHER = /:elapsed/.freeze
def initialize(progress)
@progress = progress
end
# Determin... |
module VaqueroIo
# comment
class Provider
attr_accessor :provider
attr_accessor :definition
# rubocop:disable all
def initialize(use_provider)
@provider = resolve_provider(use_provider)
@definition = YAML.load_file(PROVIDERS_PATH + @provider + '/' + PROVIDERFILE).fetch('provider')
... |
/*
When upgrading from 2.0 to 2.1, the status and revision of retention schedule execution isn't migrated, correct them here.
As v2.2.0 isn't usable because of several serious bugs, we won't support upgrade from 2.1.4 to 2.2.0 anymore. After we add the
sql file here, users will get error when upgrading from 2.1.4 to 2.... |
package org.easycloud.las.analyzer.recommender;
import java.io.Serializable;
import java.util.Comparator;
/**
* Created with IntelliJ IDEA.
* User: ibntab
* Date: 13-7-30
* Time: 上午10:30
*/
public class ByValueRecommendedItemComparator implements Comparator<RecommendedItem>, Serializable {
private static fi... |
<?php namespace Models\Validator;
use Models\Brokers\AccountBroker;
use Zephyrus\Application\Form;
use Zephyrus\Utilities\Validation;
class UserMailValidator extends Validation
{
public function validateCredentials(Form $form): bool
{
$broker = new AccountBroker();
if ($this->isUserValid($for... |
<?php
/**
* @link https://github.com/TTSimple/TT_Jobs
*/
namespace Core\Swoole\Pipe;
use Core\Component\Di;
use Core\Component\SysConst;
class Dispatcher
{
private $commandList;
private static $instance;
public function __construct()
{
$this->commandList = new CommandList();
$regist... |
var pkry = $('.packery-container').packery({
itemSelector: '.home-item',
gutter: 10,
isOriginLeft: false,
// initLayout: false,
});
var searchForm = document.querySelector('#search-form');
searchForm.addEventListener('submit', function(event) {
event.preventDefault();
var searchText = "*";
if (document.q... |
import Data.List
sumup [] = []
sumup x@(a:[]) = x
sumup x@(a:xs) =
let l = length $ takeWhile (== a) x
l'= l `div` 2
y = dropWhile (== a) x
in
if (l `mod` 2) == 0
then sumup ( (replicate l' (a+1)) ++ y )
else a:sumup ( (replicate l' (a+1)) ++ y )
ans i =
let s = sort $ map (\ (a:b:_) ... |
export interface Phonetic {
text: string;
}
export interface Translation {
language: string;
translations: Array<string>;
}
export interface Phrase {
phonetics: Phonetic;
translations: Array<Translation>;
}
export interface Word {
_id: string;
phrase: Phrase;
}
export interface Result {
error: string;
resA... |
import React, { ChangeEvent, ComponentType, useRef, useState } from 'react';
import { ClickAwayListener, makeStyles, Portal } from '@material-ui/core';
import clsx from 'clsx';
import DefaultInput from './components/DefaultInput';
import DefaultList from './components/DefaultList';
import DefaultListItem from './compon... |
import 'package:dio/dio.dart';
import 'package:flutter/material.dart';
import 'package:http/http.dart' as http;
import 'package:pub_semver/pub_semver.dart';
import '../../modules/common/utils/open_link.dart';
import '../../version.dart';
import '../common/constants.dart';
import 'updater.dto.dart';
import 'updater.uti... |
#!/usr/bin/env bash
# This script will start a single "disposable" instance and connect the caller to it.
# The instance will link to all infrastructure, including the service containers (if it exists)
IMAGE_NAME="nest_task_web_app"
# Unfortunately, because we are mapping our current source code over the docker image... |
%% Copyright 2016-2017 TensorHub, Inc.
%%
%% Licensed under the Apache License, Version 2.0 (the "License");
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% http://www.apache.org/licenses/LICENSE-2.0
%%
%% Unless required by applicable law or agreed t... |
using System;
namespace Levenshtein
{
public static class EditDistance
{
/// <summary>
/// Returns true if strA is at least [threshold]% in common with strB.
/// </summary>
/// <param name="strA"></param>
/// <param name="strB"></param>
/// <param name="threshold... |
(function() {
'use strict';
angular.module('petron.core.config', []);
angular.module('petron.core.config').config(['$translateProvider',
'$translatePartialLoaderProvider', 'tmhDynamicLocaleProvider',
function(
$translateProvider, $translatePartialLoaderProvider,
tmhDynamicLocaleProvider) {
... |
# frozen_string_literal: true
class SitemapIndexer
attr_reader :domain,
:scheme,
:searchgov_domain,
:uri
def initialize(sitemap_url:)
@uri = URI(sitemap_url)
@domain = uri.host
@scheme = uri.scheme
@searchgov_domain = SearchgovDomain.find_by(domain: domain... |
package com.julive.adapter.filter
import android.util.SparseArray
import androidx.lifecycle.Lifecycle
import androidx.lifecycle.LifecycleOwner
import androidx.recyclerview.widget.RecyclerView
import com.julive.adapter.core.LifecycleAdapter
inline fun <reified Adapter : RecyclerView.Adapter<*>> RecyclerView.Adapter<*>... |
# TODO: Figure out a better way to patch this
module RSpec
module Core
class Example
def run(example_group_instance, reporter)
@example_group_instance = example_group_instance
@reporter = reporter
RSpec.configuration.configure_example(self, hooks)
RSpec.current_example = self... |
use thiserror::Error;
use std::collections::HashSet;
use std::fmt;
use crate::tiling::Direction;
use crate::tiling::Orientation;
use crate::tiling::Pip;
use crate::tiling::Tile;
use crate::tiling::PurityBias;
use crate::tiling::SideEffects;
use crate::tiling::DominoPile;
use crate::tiling::TileRef;
#[derive(Error... |
API风格
=======
基于 APIBox 创建的 API 应用,会有一致的风格。
基本的请求与响应格式如下:
### 请求格式
http://api.example.com/?api_action=Action.Name&api_debug=1&Param1=...
说明:
- 支持通过 HTTP GET 或 HTTP POST 来传递API参数
- 每个以 `api_` 开始的参数,为全局参数
- 非全局参数(业务参数)的参数名称均以大写字母开头
### 响应格式
成功结果示例(json):
{
"ACTION": "Action.Name",
"COD... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
using System.Xml.Serialization;
namespace Microsoft.Bot.Builder.Adapters.WeChat.Schema.Requests.Events
{
/// <summary>
/// Click.
/// </summary>
[XmlRoot("xml")]
public class ClickEvent : RequestEventW... |
import {all} from 'when/keys';
export default (state) => {
return all(state.routes.filter((route) => {
return route.handler.fetchData;
}).reduce((promises, route) => {
promises[route.name] = route.handler.fetchData(state);
return promises;
}, {}));
};
|
package ls
import (
"encoding/binary"
"encoding/json"
"fmt"
"github.com/golang/glog"
"github.com/sbezverk/gobmp/pkg/base"
"github.com/sbezverk/gobmp/pkg/internal"
"github.com/sbezverk/gobmp/pkg/srv6"
)
// NLRI71 defines Link State NLRI object for SAFI 71
// https://tools.ietf.org/html/rfc7752#section-3.2
type... |
<?php
namespace Ingenico\Connect\OroCommerce\Normalizer;
use Oro\Bundle\CurrencyBundle\Rounding\RoundingServiceInterface;
/**
* Normalize float amount to the amount in cents
*/
class AmountNormalizer
{
/**
* @var RoundingServiceInterface
*/
private $roundingService;
/**
* @param Roundin... |
---
title: Proofs of Real Traffic
details: Koii uses a scalable, distributed proof of work system to ensure traffic can be recorded reliably.
link: /proofs-of-real-traffic.pdf
number: 3
layout: koii101
---
|
<?php
/*$nip = rand().rand().rand() ;
echo $act->enc("dumb") ;
$nomor = "08".rand().rand() ;
echo "<br>" ;
if(!empty($_POST)){
extract($_POST) ;
if(empty($lembaga) || empty($alamat) || empty($cat)){
echo "ERROR! DATA HARUS TERISI LENGKAP" ;
}else{
$ins = $act->insert("lembaga", "'$lembaga', ... |
// Package strtwist implements additional functions UTF-8 encoded strings.
package strtwist
import (
"strings"
)
func subRune(r rune) rune {
switch r {
case 'a', 'A':
return '@'
case 'e', 'E':
return '3'
case 'i', 'I':
return '!'
case 'o', 'O':
return '0'
case 's', 'S':
return '$'
default:
return ... |
#!/usr/bin/expect -f
## Never type your SSH password again!
## (This is obviously insecure, so be a smart person.)
spawn ssh -o StrictHostKeyChecking=no $argv -l username
expect "assword:"
send "Awesomep4ssw0rd!\n"
interact
|
using System.Runtime.InteropServices;
using UnityEngine;
namespace ARWT.WebXR{
public abstract class WebXRImageTrackignProvider : MonoBehaviour{
public GameObject child;
#if UNITY_WEBGL && !UNITY_EDITOR
[DllImport("__Internal")]
private static extern void setImageTracking... |
import React from "react";
import { Router, RouteComponentProps } from "@reach/router";
import Collection from "./Collection";
import CreateERC721 from "./CreateERC721";
// eslint-disable-next-line
const Index = (_props: RouteComponentProps): JSX.Element => {
return (
<Router>
<Collection path="/" />
<CreateE... |
package org.boofcv.android.recognition;
import android.os.Bundle;
import java.util.List;
import boofcv.abst.fiducial.FiducialDetector;
import boofcv.abst.fiducial.SquareImage_to_FiducialDetector;
import boofcv.alg.filter.binary.BinaryImageOps;
import boofcv.alg.misc.PixelMath;
import boofcv.factory.fiducial.ConfigFi... |
import * as React from 'react';
import {WixComponentClickOutsideEventHandler} from '../common';
import WixComponent, {WixComponentProps} from '../BaseComponents/WixComponent';
export interface DropdownLayoutProps extends WixComponentProps {
dropDirectionUp?: boolean;
focusOnSelectedOption?: boolean;
onClose?: ()... |
<?php
class rtbslive_settings
{
public $api_key;
public $supplier_key;
public $tour_keys;
public $url_success;
public $is_show_promocode;
public $is_include_bootstrap;
public $is_show_remaining;
public $is_show_comments;
public $is_test_mode;
public $text_page_titles;
public... |
/////////////////////////////////////////////////////////////////////////////
// Name: advprops.cpp
// Purpose: wxPropertyGrid Advanced Properties (font, colour, etc.)
// Author: Jaakko Salli
// Modified by:
// Created: Sep-25-2004
// RCS-ID: $Id:
// Copyright: (c) Jaakko Salli
// Licence: ... |
const path = require('path')
const findUp = require('find-up')
const os = require('os')
// Finds cwd's parent root directory
function findProjectRoot(cwd) {
if (!cwd) return process.cwd()
const rootIndicators = ['.netlify', 'netlify.toml', '.git']
const rootIndicator = findUp.sync(rootIndicators, { cwd: cwd })
... |
import React, { Component } from 'react';
import Navigation from "../Navigation";
import '../../stylesheets/navigation.css';
import axios from 'axios';
import AdminsTable from './AdminsTable';
import { Redirect } from "react-router-dom";
class Admins extends Component {
constructor(props) {
super(props);
... |
@extends('layouts.app')
@section('content')
<div class="container">
<div class="row">
<div class="col-md-8 offset-md-2">
<div class="h2">
Ver categoria
</div>
<div class="bg-white p-3">
<p><strong>Nome</strong> {{ $category->name }}</p>
... |
import Client from "./struct/SporkVoiceClient";
import config from './config.js';
const client = new Client();
try {
client.login(config.token);
} catch (e) {
client.logger.stacktrace(e)
}
export default client; |
def solution(a, b, k)
if a % k == 0
# first is a, then a+k, then a+2k then a+3k... up to b
# in other words, (B-A)/K + 1
return (b-a)/k + 1
else
# first is the multiple of K right before A, and so on.
# so (B - (A - A%K)) / 2
return (b-(a-a%k))/k
end
end
|
# frozen_string_literal: true
### Count duplicated keys across different projects
require 'time'
require 'benchmark'
require 'phraseapp-rest'
Phraseapp::Rest.configure do |config|
config.token = ENV['PHRASEAPP_API_KEY']
end
api = Phraseapp::Rest::Factory.api
counter = {}
benchmark = Benchmark.measure do
Phrasea... |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}
module CoinbasePro.Authenticated.Conversion
( ConversionId
, StablecoinConversionRequest (..)
, StablecoinConversionResponse (..)
) where
import Data.Aeson (FromJSON, parseJSON,
... |
package org.kyojo.schemaorg.m3n4.doma.core.clazz;
import org.seasar.doma.ExternalDomain;
import org.seasar.doma.jdbc.domain.DomainConverter;
import org.kyojo.schemaorg.m3n4.core.impl.GOVERNMENT_SERVICE;
import org.kyojo.schemaorg.m3n4.core.Clazz.GovernmentService;
@ExternalDomain
public class GovernmentServiceConver... |
// Copyright 2018 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... |
object AplusB {
def main(args: Array[String]) {
val input = scala.io.StdIn.readLine().split(" ")
if (input.size == 1 || input.size>3) {
println("Abnormal size, exitting")
System.exit(0)
}
println(input.map(x=>x.toInt).reduceLeft(_ + _))
}
}
|
# -*- coding: utf-8 -*-
require 'helper'
require 'write_xlsx'
require 'stringio'
class TestTable09 < Minitest::Test
def setup
workbook = WriteXLSX.new(StringIO.new)
@worksheet = workbook.add_worksheet
end
def test_table09
# Set the table properties.
@worksheet.add_table(
... |
package configure
import (
"fmt"
"sort"
"github.com/44smkn/s3select/pkg/cli"
"github.com/44smkn/s3select/pkg/config"
awssdk "github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/service/s3"
"github.com/spf13/cobra"
"golang.org/x/xerrors"
)
var (
awsRegions = []string{
"us-east-2",
"us-east-1",
"u... |
package com.infinum.dbinspector.ui
import androidx.core.content.FileProvider
internal class DbInspectorFileProvider : FileProvider()
|
# The profile will log here
New-Item -ItemType Directory -Path "$home\Documents\PowerShell\log" -ErrorAction SilentlyContinue | Out-Null
# Point Console and ISE to the main profile.ps1 for pwsh7
$content = Get-Content -Path .\Microsoft.PowerShell_profile.ps1
# Find the path where profiles are stored
$profilePath... |
#!/usr/bin/env bash
set -o errexit -o nounset
ABLETON_HOME="/Applications/Ableton Live 10 Lite.app"
if [ -e "$ABLETON_HOME" ]
then
echo "..."
else
echo "$ABLETON_HOME does not exist."
exit
fi
ABLETON_MRS="$ABLETON_HOME/Contents/App-Resources/MIDI Remote Scripts"
if [ -e "$ABLETON_MRS" ]
then
rm -rf "$ABLET... |
%%
%% %CopyrightBegin%
%%
%% Copyright Ericsson AB 1997-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
%% compliance with the License. You should have received a copy of the
%% Erlang Public Licens... |
package il.org.spartan.java;
import static il.org.spartan.utils.___.*;
import org.jetbrains.annotations.*;
import il.org.spatan.iteration.*;
public abstract class TokenProcessor {
@SuppressWarnings("static-method") protected void after() {
nothing();
}
@SuppressWarnings("static-method") protected void be... |
#include <elf/function_patch.h>
#include <memory/heap.h>
#include <utils/string.h>
using namespace elf;
patch_t* elf::patch(char* name, uint64_t new_func) {
uint64_t old_func = resolve_symbol(name);
patch_t* patch = (patch_t*) memory::malloc(sizeof(patch_t));
if(old_func != (uint64_t) NULL) {
memcpy(patch->old... |
import unittest
from .wyze_provider_tests import *
from os.path import join, dirname
from dotenv import load_dotenv
# Create .env file path.
dotenv_path = join(dirname(__file__), '.env')
# Load file from the path.
load_dotenv(dotenv_path)
if __name__ == '__main__':
unittest.main()
|
/*
* Copyright 2010-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
* that can be found in the license/LICENSE.txt file.
*/
package sample.watchos
import kotlinx.cinterop.*
import platform.Foundation.*
import platform.WatchKit.*
import platform.darwin.NSObject
// Standard entry po... |
namespace GroupDocs.Viewer.WebForms.Products.Common.Entity.Web
{
/// <summary>
/// DTO-class, represents uploaded document by its absolute path.
/// </summary>
public class UploadedDocumentEntity
{
/// <summary>
/// Absolute path to the uploaded document.
/// </summary>
... |
# frozen_string_literal: true
module DiscoveryService
# Provides capabilities for logging audit data for reporting purposes
module Auditing
def record_request(request, params)
data = base_data(request, params)
SecureRandom.urlsafe_base64.tap do |id|
record_entry(data.merge(phase: 'request'... |
Dockerfiles
===========
The subdirectories fo this directory contains the dockerfiles to build the test environments for
Candas.
* `env-clang`: An environment with clang as the selected compiler.
* `env-clang-libcxx`: An environment with Clang as the compiler, where libc++ is available as
the standard library.... |
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System;
using System.Threading;
using osu.Framework;
using osu.Framework.Allocation;
using osu.Framework.GameModes;
using osu.Framework.Graphics;
using osu.Framewor... |
package channel
import (
"context"
"github.com/kukgini/hlf-sdk-go-2/client/chaincode/system"
"github.com/kukgini/hlf-sdk-go-2/util"
"github.com/golang/protobuf/proto"
"github.com/hyperledger/fabric-protos-go/common"
"github.com/hyperledger/fabric-protos-go/orderer"
"github.com/pkg/errors"
)
func (c *Core) Joi... |
# -*- coding: utf-8 -*-
import datetime
import os
import numpy as np
import util.utils as utils
from net_model.extract_cnn_vgg16 import VGG16_MODIFIED
'''
ap = argparse.ArgumentParser()
ap.add_argument("-database", required = True,
help = "Path to database which contains images to be indexed")
ap.add_argument("-in... |
/**
* @fileoverview The database adapter.
*
* Defines all CRUD operations needed in order to run the server.
*/
const mysql = require('mysql2');
const {
DB_HOST = 'mysql',
DB_PORT = 3306,
DB_USER = 'dev',
DB_PASSWORD = 'dev',
DB_DATABASE = 'dev'
} = process.env;
let connection;
/**
* Initializes the ... |
require_relative 'AppleCloudKitRecord'
##
# This class represents an Apple Notes Account.
# Generally this is just a local and an iCloud account.
# This class has an Array of the AppleNote objects that
# belong to this account.
class AppleNotesAccount < AppleCloudKitRecord
attr_accessor :primary_key,
... |
#include <stdio.h>
#include <string.h>
void swap(char *x, char *y){
char temp;
temp = *x;
*x = *y;
*y = temp;
}
void permute(char *str, int l, int r){
int i;
if(l==r){
printf("%s\n", str);
}else{
for(i=l;i<=r;i++){
swap(str+l, str+i);
permute(str, l+1, r);
swap(str+l, str+i);
}
}
}
int main(){... |
require "helper"
class Topaz::TempoCalculatorTest < Minitest::Test
context "TempoCalculator" do
setup do
@calc = Topaz::TempoCalculator.new
end
context "#calculate" do
should "wait for two timestamps to start calculation" do
@calc.timestamps << 1
assert_nil @calc.calculate... |
<?php
namespace App\Models\Service;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Foundation\Auth\User;
class Service extends User
{
protected $guarded='admin';
protected $fillable=['service'];
}
|
//
// RMCast_Resend_Worker.cpp,v 1.1 2000/10/11 00:57:08 coryan Exp
//
#include "RMCast_Resend_Worker.h"
#include "RMCast_Module.h"
#if !defined (__ACE_INLINE__)
# include "RMCast_Resend_Worker.i"
#endif /* ! __ACE_INLINE__ */
ACE_RCSID(ace, RMCast_Resend_Worker, "RMCast_Resend_Worker.cpp,v 1.1 2000/10/11... |
import { SsmValue, SsmValueType, ISsmParameter } from "./types";
import { IDictionary } from "common-types";
export function coerceValueToString(value: SsmValue): string {
if (typeof value === "object") {
return JSON.stringify(value);
}
if (typeof value === "number") {
return `NUMBER(${value})`;
}
... |
import 'package:url_launcher/url_launcher.dart';
import 'constants.dart';
String decoding(String text) {
Map<String, String> changes = {
'â': '\'',
'â': '\'',
'â': '\"',
'â': '\"',
};
return changes.entries
.fold(text, (previousValue, element) => previousValue.replaceAll(element.key, e... |
package br.com.si.ufrrj
import android.content.Intent
import android.graphics.Color
import android.os.Bundle
import android.view.View
import android.widget.TextView
import android.widget.Toast
import com.google.android.material.snackbar.Snackbar
import androidx.appcompat.app.AppCompatActivity
import androidx.recyclerv... |
using System;
using System.Collections.Generic;
using System.Diagnostics;
namespace System
{
public static class TimeUtils
{
/// <summary>
/// Multiplies a time period by a number
/// </summary>
/// <param name="duration"></param>
/// <param name="modifier"></param>
/// <returns></returns>
public stati... |
//////////////////////////////////////////////////////////////////////////////
//
// (C) Copyright Ion Gaztanaga 2015-2015. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/contain... |
# OpenMLS
Attempting to scrape MLS listings and being able to provide the assessed value for data research purposes
|
import { test, GenericTestContext } from 'ava'
import { Blockchain, Network } from '../constants'
import { Client } from '.'
test('switcheo.config for TestNet', (t: GenericTestContext<any>) => {
const switcheo: Client = new Client()
t.is(switcheo.config.net, 'TestNet')
t.is(switcheo.config.getContractHash(Block... |
//
// CaptchaBrowser.h
// HLBJGJJ
//
// Created by Hongli li on 16/1/31.
// Copyright © 2017年 honglili. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
typedef void(^CaptchaResult) (BOOL success, NSString* captchaText, NSString *imageUrl);
@interface CaptchaBrowser : NSObject
-... |
<?php
declare(strict_types=1);
namespace Riot\DTO;
use Riot\Collection\LeagueItemDTOCollection;
final class LeagueListDTO implements DTOInterface
{
private string $leagueId;
/** @var LeagueItemDTOCollection<LeagueItemDTO> */
private LeagueItemDTOCollection $entries;
private string $tier;
priv... |
---
template: SinglePost
title: טסט פוסט
status: Published
date: 2020-12-01
excerpt: טסט
meta:
noindex: true
---
מה קורה נשמה
test test test
צריך להוסיף קלאס של rtl |
package com.eason.common.repository;
/**
* Created by Eason on 2018/3/22.
*/
public class Repository extends BaseRepository<UserRemote,UserLocal> {
public Repository(UserRemote userRemote, UserLocal userLocal) {
super(userRemote, userLocal);
}
}
|
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public partial class SevenSegmentCodings {
public string possibleValues;
public bool[,] segmentStates;
public SevenSegmentCodings()
{
possibleValues = "0123456789abcdefhjlnopruy-"; // The list of possible values that can be made in ... |
/*
* Copyright 2014-2019 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license.
*/
package io.ktor.scheduler
import kotlinx.coroutines.*
import java.lang.Runnable
import java.time.*
import kotlin.coroutines.*
@InternalCoroutinesApi
class TestTimeProvidingCoroutineContext(p... |
package snapshot
import (
"encoding/gob"
"io"
"github.com/flynn/flynn/pkg/syslog/rfc5424"
)
// WriteTo writes a snapshot of the buffers to the writer. The partitioning of
// messages is not retained. The writer is left open.
func WriteTo(buffers [][]*rfc5424.Message, w io.Writer) error {
enc := gob.NewEncoder(w)... |
'use strict';
const { HttpProvider } = require('../../providers');
const baseUrl = process.env.MS_SUPPORT_BASE_URL;
module.exports = {
// Create Message
createMessage: async (root, {message}) => {
return await HttpProvider.post(`${baseUrl}/messages/new`, message);
},
}; |
import CounterStore from './counter';
// root store
const rootStore = {
"counter": new CounterStore()
};
export default rootStore;
|
import React, { FC } from 'react'
import styles from './hero.module.css'
export type HeroProps = {
heading?: string
}
export const Hero: FC<HeroProps> = ({ heading, children }) => (
<div className={styles.hero}>
{heading && <h1 className={styles.heroHeading}>{heading}</h1>}
<div className={styles.ctas}>{... |
import React, { useEffect, useState } from 'react'
import { Linking } from 'react-native'
import { CommonActions, useNavigation } from '@react-navigation/native'
import {
createNativeStackNavigator,
NativeStackNavigationOptions,
} from '@react-navigation/native-stack'
import mapValues from 'lodash/mapValues'
import {... |
class Admin::Apply::PhasesController < Admin::ApplyController
skip_before_filter :fetch_apps, :fetch_confirmers
def index
@phases = @offering.phases
end
def show
@phase = @offering.phases.find params[:id]
session[:breadcrumbs].add @phase.name
redirect_to admin_apply_phase_tasks_path(@offe... |
require "rubocop/stylecheck/version"
module Rubocop
module Stylecheck
class << self
attr_accessor :config_path
def project_config_path
File.join(Dir.pwd, ".rubocop.yml")
end
end
end
end
require "rubocop/stylecheck/cli"
require "rubocop/stylecheck/railtie" if defined?(Rails)
|
package com.nacid.web.model.applications;
import com.nacid.bl.applications.AppDocflowStatusHistory;
import com.nacid.data.DataConverter;
public class AppDocflowStatusHistoryWebModel {
private String statusName;
private String dateAssigned;
public AppDocflowStatusHistoryWebModel(AppDocflowStatusHistory a... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.