text stringlengths 27 775k |
|---|
# Change Log
## 0.5.1
Refresh to keep a darker top bar, and added a nice li'll icon.
## 0.5.0
Initial release! |
package com.ddu.sdk.network.retrofit;
import java.util.Map;
import retrofit2.Call;
import retrofit2.http.GET;
import retrofit2.http.QueryMap;
/**
* Created by yzbzz on 2017/12/22.
*/
public interface DemoService {
@GET("user/book")
Call<String> getBooks(@QueryMap Map<String, String> options);
}
|
module Dotproduct where
import Data.Primitive
import Data.Operations
-- vectorised form
dotVec :: [Float] -> [Float] -> Float
dotVec xs ys =
fold (\x y -> x + y :: FloatX4) (\x y -> x + y :: Float) 0 $
zipVec
(\x y -> x * y :: FloatX4)
(\x y -> x * y :: Float)
(toVecList xs)
(toVecList ys)
dotVec... |
import { Transliterator } from '../transliterator';
import { ReplacerRegEx } from '../replacer';
import { POLISH_TO_CYRILLIC_1865 } from '../lang';
describe('Transliterator class', () => {
describe('transliterate()', () => {
it('should transliterate text from latin to cyrillic', () => {
const replacer = ne... |
/*
* Our preprocessing.
* read in backbone, reads and .sam file and
* output our format file
*/
#include <cstdio>
#include <fstream>
#include <iostream>
#include <map>
#include <stdlib.h>
#include <string>
#include <vector>
using namespace std;
//struct Read {
//string name;
//string read;
//string directio... |
def factorial(i:int) -> int:
if i == 0:
return 1
return i * factorial(i-1)
let i : int
i := read
print(factorial(i)) |
// IMvxStartNavigation.cs
// (c) Copyright Cirrious Ltd. http://www.cirrious.com
// MvvmCross is licensed using Microsoft Public License (Ms-PL)
// Contributions and inspirations noted in readme.md and license.txt
//
// Project Lead - Stuart Lodge, @slodge, me@slodge.com
namespace Cirrious.MvvmCross.Interfaces.ViewM... |
package dx.util
import java.io.EOFException
import scala.io.StdIn
import dx.util.InteractiveConsole._
case class InteractiveConsole(promptColor: String = "",
separator: String = ": ",
afterEntry: Option[String] = None) {
def println(text: String, style: S... |
#!/usr/bin/env bash
# From https://github.com/scala-native/scala-native/blob/master/scripts/travis_setup.sh + install curl
# Enable strict mode and fail the script on non-zero exit code,
# unresolved variable or pipe failure.
set -euo pipefail
IFS=$'\n\t'
if [ "$(uname)" == "Darwin" ]; then
brew update
brew... |
################################################################################
# Script to deploy the node.js Security Operations Console. To occur once all #
# automated acceptance tests have been completed. #
# ... |
// ==LICENSE-BEGIN==
// Copyright 2017 European Digital Reading Lab. All rights reserved.
// Licensed to the Readium Foundation under one or more contributor license agreements.
// Use of this source code is governed by a BSD-style license
// that can be found in the LICENSE file exposed on Github (readium) in the proj... |
# VectorLogger is a Logging destintation that's an im-memory vector.
module VectorLogging
include("vector_logger.jl")
end
|
package io.hotaka.formacion.scummbistro.api.domain.repositories
import io.hotaka.formacion.scummbistro.api.domain.entities.Dish
import org.springframework.data.jpa.repository.JpaRepository
import org.springframework.stereotype.Repository
@Repository
interface IDishRepository : JpaRepository<Dish, Long> {
} |
<?php
use App\Http\Controllers\auth\RegisterController;
use App\Http\Controllers\LoginController;
use App\Http\Controllers\PostController;
use App\Models\User;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Gate;
use Illuminate\Support\Facades\Route;
/*
|------------------------------------------... |
first step
run this in a terminal
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_221.jdk/Contents/Home
export PATH=$PATH:/Library/Java/JavaVirtualMachines/jdk1.8.0_221.jdk/bin
export CLASSPATH=/Users/lila/Desktop/tomcat/lib/servlet-api.jar
export ANT_HOME=/Users/lila/Desktop/tomcat
export TOMCAT_HOME=... |
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Security.Claims;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Authentication;
using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Mvc;
using Microsoft.CodeAnalysis.Operations;
using NaverLo... |
#!/usr/bin/env bash
set -e
GEM_HOME=${GEM_HOME:-lib/ruby/gems/shared}
ruby -X+T -I$GEM_HOME/gems/execjs-2.6.0/lib test/truffle/gems/execjs/checkruntime.rb
ruby -X+T -I$GEM_HOME/gems/execjs-2.6.0/lib test/truffle/gems/execjs/simple.rb
ruby -X+T -I$GEM_HOME/gems/execjs-2.6.0/lib test/truffle/gems/execjs/coffeescript.r... |
package com.exasol.dbbuilder.dialects.postgres;
import java.sql.Connection;
import com.exasol.dbbuilder.dialects.*;
/**
* PostgreSQL {@link DatabaseObjectFactory}.
*/
public class PostgreSqlObjectFactory extends AbstractObjectFactory {
private final PostgreSqlImmediateDatabaseObjectWriter writer;
/**
... |
import 'package:firebase_auth/firebase_auth.dart';
import 'package:firebase_database/firebase_database.dart';
import 'package:flutter/material.dart';
import '../model/tag.dart';
import 'tags_data_source.dart';
class TagsDataSourceImpl implements TagsDataSource {
TagsDataSourceImpl(
this._firebaseAuth,
this._... |
function extendStatusPage() {
Utils.loadCSS('css/status.css');
Utils.loadScript('js/status-rte.js');
// pre-update to rows
const titles = document.querySelectorAll('a[href].problem_title');
titles.forEach((e) => {
if (e.getAttribute('data-original-id') == undefined) {
e.setAttribute('data-original-... |
using Microsoft.Extensions.Logging;
using PnP.Core.Auth.Services.Builder.Configuration;
using PnP.Core.Services;
using System;
using System.Net.Http;
using System.Threading.Tasks;
namespace PnP.Core.Auth
{
/// <summary>
/// Base authentication provider class
/// </summary>
public abstract class OAuthA... |
// Copyright 2019-2020 the Deno authors. All rights reserved. MIT license.
use rusty_v8 as v8;
pub fn main() {
let mut locker = v8::Locker::new(mock());
let mut root_hs = v8::HandleScope::new(locker.enter());
let root_hs = root_hs.enter();
{
let mut hs = v8::EscapableHandleScope::new(root_hs);
let hs ... |
using System;
using System.Collections.Generic;
namespace Atata
{
/// <summary>
/// Represents the pair of type and property name.
/// Can be used to identify a property within a class.
/// </summary>
public struct TypePropertyNamePair : IEquatable<TypePropertyNamePair>
{
/// <summary>... |
#!/data/apps/bin/perl -pi
# migrate models and autosaves
if (/^\s*<(select)/i) {
my ($formname) = m/ng-model="\w+.properties.(\w+)"/;
s/autosave=.(\w+)./\@change="$1\.save('$formname')"/;
s/\sng-model=/ v-model=/;
}
if (/^\s*<(input|textarea)/i) {
s/\sautosave=/ v-autosave=/;
s/\sng-model=/ v-model... |
package cfg
import (
"encoding/json"
"github.com/davecgh/go-spew/spew"
goconfig "github.com/iglin/go-config"
"io/ioutil"
"log"
"os"
)
var ChainConfig *goconfig.Config
func init() {
var c ChainCfg
config := c.Init()
err := WriteConfig(ConfigPath, config)
if err != nil {
log.Println(err)
}
ChainConfig =... |
package typingsSlinky.diff2html
import typingsSlinky.diff2html.renderUtilsMod.CSSLineClass
import typingsSlinky.diff2html.typesMod.DiffStyleType
import typingsSlinky.diff2html.typesMod.LineMatchingType
import typingsSlinky.diff2html.typesMod.OutputFormatType
import org.scalablytyped.runtime.StObject
import scala.scala... |
export 'src/util/routines/a_ldmk.dart';
export 'src/util/routines/b_ldmk.dart';
export 'src/util/routines/condilio_ldmk.dart';
export 'src/util/routines/ena_ldmk.dart';
export 'src/util/routines/enp_ldmk.dart';
export 'src/util/routines/fissura_pterigo_maxilar_ldmk.dart';
export 'src/util/routines/gnatio_ldmk.dart';
ex... |
#!/bin/sh
curl -i http://localhost:8080/quotes/quote-1 -X PUT -H "Content-Type: application/json" -d @quote2.json
echo ""
echo ""
|
Rayon-core represents the "core, stable" APIs of Rayon: join, scope, and so forth, as well as the ability to create custom thread-pools with ThreadPool.
Maybe worth mentioning: users are not necessarily intended to directly access rayon-core; all its APIs are mirror in the rayon crate. To that end, the examples in the... |
package br.com.zup.chave.consulta
import br.com.zup.IdPixConsulta
import io.micronaut.core.annotation.Introspected
import java.lang.IllegalArgumentException
@Introspected
data class NovaConsultaChave(
val idPixConsulta: IdPixConsulta,
val chave: String
) {
var tipoBusca : TipoBusca
init {
//Ve... |
//
// Search.cpp
// 1-string
//
// Created by FlyElephant on 2019/1/11.
// Copyright © 2019年 FlyElephant. All rights reserved.
//
#include <iostream>
#include <map>
using namespace std;
class Search {
public:
int findNumber(char *str, int position) {
char val = *(str+position);
return val... |
package test
import org.dariushmoshiri.intchararray.IntCharArray
import org.testng.Assert
import org.testng.annotations.Test
/**
* Created by MillenniumBug on 01/07/2017.
*/
class IntCharArrayTest {
@Test
fun testSize() {
val array: IntCharArray = IntCharArray(10)
Assert.assertEquals(array.... |
# TiDB 中文用户文档
<!-- markdownlint-disable MD007 -->
<!-- markdownlint-disable MD032 -->
## 目录
+ 关于 TiDB
- [TiDB 简介](/overview.md)
+ Benchmark 测试
- [如何用 Sysbench 测试 TiDB](/benchmark/how-to-run-sysbench.md)
- [如何对 TiDB 进行 TPC-C 测试](/benchmark/how-to-run-tpcc.md)
- [Sysbench 性能对比 - v3.0 对比 v2.1](/benchmar... |
package br.com.astrosoft.entradaNF.model.finder
import br.com.astrosoft.entradaNF.model.Volume
import br.com.astrosoft.entradaNF.model.query.QVolume
import io.ebean.Finder
open class VolumeFinder : Finder<Long, Volume>(Volume::class.java) {
val alias = QVolume._alias
/**
* Start a new typed query.
*/
fu... |
"""
Revision ID: c6250555a36c
Revises: d7c2f99cd14d
Create Date: 2020-04-06 09:34:50.929724
"""
import enum
import logging
from datetime import datetime, timezone
from json import loads
from os import getenv
from celery.backends.database import Task
from redis import Redis
from typing import TYPE_CHECKING, Union, Lis... |
# Untitled object in Arrays Schema
```txt
https://example.com/schemas/arrays#/properties/objectlist/items
```
| Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Access Restrictions | Defined In ... |
use crate::day2;
use crate::utils;
use std::io::{self};
pub fn part_1() -> io::Result<usize> {
let _input_data = utils::parse(
day2::parse_input("./input/input-day-5.txt").unwrap(),
vec![1],
);
Ok(5)
}
pub fn part_2() -> io::Result<usize> {
Ok(utils::parse(
day2::parse_input("./... |
package com.claudiodegio.timenavigator.compose
import androidx.compose.foundation.ExperimentalFoundationApi
import androidx.compose.foundation.background
import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.*
import androidx.compose.foundation.lazy.LazyColumn
import androidx.compose.f... |
part of lib;
class Injector {
Binder _binder;
Injector(Binder binder) {
this._binder = binder;
}
T get<T>(dynamic key) {
return _binder.get<T>(key);
}
static InjectorBuilder builder() => InjectorBuilder();
}
class InjectorBuilder {
Binder _binder;
final List<Module> _modules = <Module>[];
... |
from helpers import assert_equality
def plot():
# Example from
# <http://matplotlib.org/examples/pylab_examples/line_collection2.html>
import matplotlib.pyplot as plt
import numpy as np
from matplotlib.collections import LineCollection
fig = plt.figure()
# In order to efficiently plot ma... |
package javapersianutils.core.number;
import java.util.List;
public class NumberWord {
/**
* Digit's group
*/
public DigitGroup Group;
/**
* Number to word language
*/
public Language Language;
/**
* Equivalent names
*/
public List<String> Names;
public Nu... |
package net.arctics.clonk.c4script.ast;
import net.arctics.clonk.Core;
import net.arctics.clonk.ast.ASTNodePrinter;
public class IntegerLiteral extends NumberLiteral {
private static final long serialVersionUID = Core.SERIAL_VERSION_UID;
/**
* A NumberLiteral representing '0'
*/
public static final IntegerL... |
import { Meteor } from 'meteor/meteor'
import { Mongo } from 'meteor/mongo'
import { Tinytest } from 'meteor/tinytest'
import { InsecureLogin } from './insecure_login'
if (Meteor.isServer) {
const collection1 = new Mongo.Collection('test_insert_collection1')
Tinytest.addAsync('insert - collection1 document should... |
# pysc2-replay-data-extraction
extract state data from `.SC2Replay` files for machine learning training.
## Usage
extract data:
```bash
python main.py --replays path-to-replays/ --agent agent.ObserverAgent (on Linux)
```
generate replays:
```bash
python -m pysc2.bin.agent --map Simple64 --save_replay True --max_e... |
module Rudash
module Default
def identity(first_arg, *_rest_args)
first_arg
end
end
end
|
package org.usfirst.frc.team294.robot.triggers;
import edu.wpi.first.wpilibj.DigitalInput;
import edu.wpi.first.wpilibj.buttons.Trigger;
/**
*
*/
public class LimitSwitchTrigger extends Trigger {
private final DigitalInput m_in;
public LimitSwitchTrigger(DigitalInput in) {
m_in = in;
}
public bool... |
package com.muzi.weshop.view.fragment;
import android.content.Intent;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.DiffUtil;
import androidx.recyclerview.widget.GridLayoutManager;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
imp... |
require 'slosilo/adapters/abstract_adapter'
module Slosilo
module Adapters
class FileAdapter < AbstractAdapter
attr_reader :dir
def initialize(dir)
@dir = dir
@keys = {}
@fingerprints = {}
Dir[File.join(@dir, "*.key")].each do |f|
key = Slosilo::Encryp... |
require "spec_helper"
RSpec.describe Blurb::Report do
include_context "shared setup"
describe "#create" do
context "given a keywords recordType" do
Blurb.test_env = false
it "returns a keywords report" do
payload_response = Blurb::Report.create({
"recordType" => Blurb::Report::K... |
# frozen_string_literal: true
require 'spec_helpers/client'
RSpec.describe FinApps::REST::Portfolios do
include SpecHelpers::Client
subject { described_class.new(client) }
describe '#list' do
let(:list) { subject.list(params) }
let(:results) { list[RESULTS] }
let(:errors) { list[ERROR_MESSAGES] }
... |
BEGIN;
ALTER TABLE "study_requests" DROP COLUMN "lastEditedAt";
ALTER TABLE "study_requests" DROP COLUMN "lastEditorId";
UPDATE "APP_META"."DB_UPDATE" SET "currentVersion" = 8;
COMMIT;
|
//-----------------------------------------------------------------------
// <copyright file="OutputStreamSinkSpec.cs" company="Akka.NET Project">
// Copyright (C) 2009-2021 Lightbend Inc. <http://www.lightbend.com>
// Copyright (C) 2013-2021 .NET Foundation <https://github.com/akkadotnet/akka.net>
// </copyri... |
package com.lnpdit.woofarm.page.activity.farmingmanagement;
import android.content.Context;
import android.graphics.Color;
import android.util.AttributeSet;
import android.view.View;
import android.widget.EditText;
import android.widget.NumberPicker;
/**
* Created by Administrator on 2018\11\24 0024.
*/
... |
<?php
// Solved in about 2h
$inRuleSection = true;
$messages = [];
$rules = [];
foreach (file(__DIR__.'/input.txt', FILE_IGNORE_NEW_LINES) as $line) {
if(!strlen($line)) {
$inRuleSection = false;
continue;
}
if ($inRuleSection) {
list($ruleNumber, $rule) = explode(': ', $line);
... |
@extends('layouts.private.perfil.dashboard')
@section('titulo')
<div class="col-sm-6">
<h1 class="m-0 text-dark"> {{ __('En construcción...') }}</h1>
</div>
@endsection
@section('contenido')
<title>@section('title', 'Recordatorios')</title>
@include('enConstruccion')
@endsection |
using Microsoft.VisualStudio.TestTools.UnitTesting;
using SimpleBase;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
namespace Makaretu.Dns
{
[TestClass]
public class DSRecordTest
{
[TestMethod]
public void Roundtrip()
{
var a = ne... |
using System;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Collections.Generic;
using Xunit;
using Assert = Xunit.Assert;
using Advent.Solutions.Utility;
using Advent.Solutions.Days;
namespace Advent.Tests.DailyTests
{
public class Day12 : Interfaces.IDailyTe... |
import React, { useRef } from 'react';
import { useDispatch } from 'react-redux';
import { useOutsideClick } from '../../hooks/useOutsideClick';
import { dropMenuItems } from '../../constants';
import { ActionCreator as ActionCreatorApp } from '../../reducers/app/app';
import { AppDispatch } from '../../reducers/store'... |
// Copyright © 2013 Galvanized Logic Inc.
// Use is governed by a FreeBSD license found in the LICENSE file.
package data
import (
"fmt"
"testing"
)
// Check that a material file can be imported.
func TestLoadMtl(t *testing.T) {
load := &loader{}
m, err := load.mtl("../eg/models", "cube.mtl")
if m == nil || err... |
export { default as gql } from "./graphql-tag/index.ts"
// @ts-nocheck
export {
GraphQLEnumType,
isSchema,
getOperationAST,
isSpecifiedScalarType,
isEnumType,
isUnionType,
isInterfaceType,
getNamedType,
parse,
defaultFieldResolver,
GraphQLInterfaceType,
GraphQLUnionType,
isAbstractType,
gra... |
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Carbon\Carbon;
class AktivaJenisItem extends Model
{
//
protected $table = 'acc.aktivajenisitem';
const UPDATED_AT = 'lastupdatedon';
const CREATED_AT = 'createdon';
protected $hidden = ['lastupdatedon','createdon'];
public function ... |
#!/bin/sh
################################################################################
# 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 li... |
package events
type (
// Group тип наименования группы таблиц.
Group string
// Name тип названия таблицы.
Name string
)
// ID идентификатор таблицы.
//
// Таблицы разделены на группы с похожим типом информации и имеют имя в рамках группы. Если группа содержит одну
// таблицу, то ее имя обычно совпадает с название... |
package org.edu.nju.serviceImpl;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.Date;
import java.util.List;
import java.util.Map;
import org.edu.nju.dao.*;
import org.edu.nju.dao.CommodityDao;
import org.edu.nju.model.Comment;
import org.edu.nju.model.Commodit... |
using Microsoft.WindowsAzure.ActiveDirectory.Authentication;
using System;
using System.Net.Http;
using System.Text;
using System.Windows;
using Thinktecture.Samples;
namespace WpfWebViewWithAalAcs
{
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow... |
import 'package:alchemy/src/bloc/game_bloc/bloc.dart';
import 'package:cached_network_image/cached_network_image.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:alchemy/src/services/wizard.dart';
class Requ... |
var level = require('level');
var path = require('path');
// lg 是ignore leveldb表
var lg = level(path.join(__dirname, '../IgnoreDB'), {
valueEncoding: "json"
});
let iput = (k, v) => {
return new Promise(function (resolve, reject) {
lg.put(k, v, function (err) {
// if (err) resolve (false)
resolve(... |
此工具仅能dnslog漏洞测试,不可用于非法用途
```
java -jar ncpoc.jar http://target.com
java -jar ncpoc.jar http://target.com Servlet xxx.dnslog.cn
```
|
using System;
namespace Renci.SshNet.Security.Chaos.NaCl.Internal.Ed25519Ref10
{
internal static partial class FieldOperations
{
internal static void fe_0(out FieldElement h)
{
h = default(FieldElement);
}
}
} |
# A wanna be turn-based game
A yet to be turn-based game.
## Install
`npm install` & `grunt` or open the build/index.html in your browser
### Thanks to
* [Kenney.nl](http://www.kenney.nl) - assets
* [Tatermand](http://opengameart.org/users/tatermand) - Space assets
* Shy Fonts - menu font
* [Alexandr Zhelanov](https:... |
def test_database_creation_request(client):
out = client.post(
"/api/v1/database/request",
json={
"superuser_fullname": "Charlie Brown",
"superuser_email": "test@firstuser.com",
"superuser_password": "asdf",
"database_name": "test_database_endpoints",
... |
---
title: "A study of open-heavy-flavor, heavy-jet, and correlations using the LIDO transport model"
collection: talks
type: "Talk"
permalink: /talks/2020-2
venue: "the 10th International Conference on Hard and Electromagnetic Probes of High-Energy Nuclear Collisions"
date: 2020-06-01
location: "Austin, United States ... |
// Copyright (c) 2017 TPDT
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distri... |
package com.example.cuisine.activity.activity
import android.content.Intent
import android.support.v7.app.AppCompatActivity
import android.os.Bundle
import com.example.cuisine.R
import kotlinx.android.synthetic.main.activity_main.*
import kotlinx.android.synthetic.main.list_row.*
class MainActivity : AppCompatActivit... |
# frozen_string_literal: true
class Player
attr_reader :mark_type
attr_accessor :name
@@number_of_players = 0
def initialize(name="New Player")
case @@number_of_players
when 0
@mark_type = :x
when 1
@mark_type = :o
else
raise StandardError, 'Cannot have more than 2 players'
... |
/*
* Copyright 2013 Commonwealth Computer Research, 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 applica... |
<?php
namespace Kerox\Messenger\Test\TestCase\Model\Message;
use Kerox\Messenger\Model\Message\QuickReply;
use Kerox\Messenger\Test\TestCase\AbstractTestCase;
class QuickReplyTest extends AbstractTestCase
{
public function testQuickReplyWithInvalidContentType()
{
$this->expectException(\InvalidArgume... |
// --------------------------------------------------------------------------------------------------------------------
// <copyright file="IndexQuote.cs" company="KriaSoft LLC">
// Copyright © 2013 Konstantin Tarkus, KriaSoft LLC. See LICENSE.txt
// </copyright>
// --------------------------------------------------... |
# frozen_string_literal: true
module FactoryBotHelpers
def self.generate_access_id_from_name(given_name, surname, sequence_number)
alphabet = ('a'..'z').to_a
initials = [
given_name || alphabet.sample,
_middle_name = alphabet.sample,
surname || alphabet.sample
].map(&:first).join('')
... |
-module(kache_ev_fifo).
-behaviour(kache_eviction).
-record(impl,
{ queue :: ets:tab()
, next :: integer()
}).
-type impl() :: #impl{}.
-type id() :: integer().
-export([ new/0
, delete/1
, add/2
, remove/2
, touch/2
, evict/2
, purge/1
... |
#[macro_use] extern crate nickel;
use nickel::{Nickel, HttpRouter, StaticFilesHandler};
fn main() {
let mut server = Nickel::new();
let mut router = Nickel::router();
router.get("/api/ping", middleware!("pong"));
server.utilize(StaticFilesHandler::new("../../client"));
server.utilize(router);
... |
package wstxtest.sax;
import java.io.StringReader;
import javax.xml.XMLConstants;
import javax.xml.parsers.SAXParser;
import org.xml.sax.InputSource;
import com.ctc.wstx.sax.WstxSAXParserFactory;
import wstxtest.BaseWstxTest;
import wstxtest.sax.TestBasicSax.MyHandler;
public class TestSaxProperties extends BaseW... |
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "nsIServiceManager.h"
#in... |
1. VALID PHONE NUMBERS:
# Description - https://leetcode.com/problems/valid-phone-numbers/
# Discussion - https://leetcode.com/problems/valid-phone-numbers/discuss/?currentPage=1&orderBy=most_votes&query=
# Bash Script Overview - https://ryanstutorials.net/bash-scripting-tutorial/bash-script.php
# RegEx Referen... |
import OperisGroupsRoute from "ember-app/routes/operis-groups";
var GroupsRoute = OperisGroupsRoute.extend({});
export default GroupsRoute; |
---
uid: System.Runtime.Remoting.Contexts.IContextProperty
manager: "ghogen"
---
---
uid: System.Runtime.Remoting.Contexts.IContextProperty.Freeze(System.Runtime.Remoting.Contexts.Context)
manager: "ghogen"
---
---
uid: System.Runtime.Remoting.Contexts.IContextProperty.IsNewContextOK(System.Runtime.Remoting.Contexts.... |
using SimpleScriptRunnerBto;
namespace SampleDb
{
class Program
{
static void Main(string[] args)
{
Options options = new Options();
options.UseTransactions = true;
options.ServerName = "localhost";
options.DatabaseName = "simple_script_runner_sa... |
Releasing RE2/J to Maven Central
================================
This document describes the process for releasing RE2/J binary artifacts to
Maven Central and to the RE2/J GitHub site.
# Prerequisites
The following are one-time setup steps. You must have:
* git
* an account on OSSRH, see the [initial setup sectio... |
import * as R from 'ramda';
import { Reducer } from 'redux';
import { IDatasetVersion } from 'shared/models/DatasetVersion';
import { substractPaginationTotalCount } from 'shared/models/Pagination';
import { updateById, upsert } from 'shared/utils/collection';
import {
IDatasetVersionsState,
FeatureAction,
load... |
/*
* Dandelion Admin v1.0 - Typography Demo JS
*
* This file is part of Dandelion Admin, an Admin template build for sale at ThemeForest.
* For questions, suggestions or support request, please mail me at maimairel@yahoo.com
*
* Development Started:
* March 25, 2012
*
*/
(function($) {
$(document).ready(func... |
#!/bin/bash
cwd="$(dirname "$0")"
source $cwd/helper.sh
backupDir=$BACKUP_DIR
host=$RESTORE_MDB_HOST
port=$RESTORE_MDB_PORT
user=$RESTORE_MDB_USER
pass=$RESTORE_MDB_PASS
restoreToDatabase=$RESTORE_MDB_DATABASE
backupLatest=$backupDir/backup.latest
if [ $# -eq 0 ]; then
backup=$backupLatest
elif [ $# -eq 1 ]; then... |
import en from './en'
import es from './es'
export default { en, es }
|
import isEmpty from 'lodash/isEmpty';
import Validator from 'validator';
import axios from 'axios';
export function validateInput(data){
let errors={};
if(Validator.isNull(data.email)){
errors.email='Email is required';
}
if(Validator.isEmail(data.email)){
errors.email='Email Taken'
... |
package com.hirath.explik.mapping;
public interface Radar {
void routed(String description, Object value);
}
|
/*
* Copyright 2013 The Android Open Source Project
*
* 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 applica... |
#! /usr/local/bin/ruby -w
require 'RMagick'
imgl = Magick::ImageList.new
imgl.new_image(500, 300, Magick::HatchFill.new('white','lightcyan2'))
gc = Magick::Draw.new
# Draw path with quadratic bezier commands
gc.fill_opacity 0
gc.stroke 'red'
gc.stroke_width 3
gc.path "M20,150 Q120,25 220,150 T420,150"
# Annotate
# ... |
package JVM.classload.classloader;
/**
* Created by Defias on 2016/4/27.
*
*/
public class ClassLoaderTest2 {
public static void main(String[] args) {
ClassLoader cl = ClassLoader.getSystemClassLoader();
while (cl != null) {
System.out.println(cl.toString());
cl = cl.getParent();
... |
from .kernelMatricesStore import IndPointsLocsKMS, IndPointsLocsAndAllTimesKMS,\
IndPointsLocsAndAssocTimesKMS
from .svPosteriorOnIndPoints import SVPosteriorOnIndPoints
from .svPosteriorOnLatents import SVPosteriorOnLatentsAllTimes,\
SVPosteriorOnLatent... |
package com.pg85.otg.util.gen;
import com.pg85.otg.constants.Constants;
import com.pg85.otg.interfaces.IBiome;
import com.pg85.otg.interfaces.ICachedBiomeProvider;
import com.pg85.otg.interfaces.IBiomeConfig;
import com.pg85.otg.util.ChunkCoordinate;
public class DecorationBiomeCache
{
private final int startX;
pri... |
@file:JvmName("FileUtils")
package com.tiamosu.fly.utils
import com.blankj.utilcode.util.FileUtils
import com.blankj.utilcode.util.Utils
import java.io.File
/**
* 根据文件目录和文件名创建文件
*/
fun createFile(fileDirName: String?, fileName: String): File {
return File(createDir(fileDirName), fileName)
}
/**
* 创建未存在的文件夹
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.