text stringlengths 27 775k |
|---|
---
layout: page
title: Γραφεία
---
{% assign cities = site.data.settings.offices.gr %}
{% include locations.html %}
|
module Abrizer
class PackageDashShaka
include FilepathHelpers
def initialize(filename, output_dir=nil)
@filename = filename
@adaptations = Abrizer::AdaptationFinder.new(filepath: @filename).adaptations
end
def package
make_directory
Dir.chdir output_directory
`#{shaka_... |
module ActiveSync
module ModelsHelper
def self.model_descriptions
Rails.application.eager_load! unless Rails.application.config.cache_classes
ActiveRecord::Base.subclasses[1].descendants.map do |model|
{
name: model.name,
associations: model.reflect_on_all_associations.map ... |
use std::rc::Rc;
use crate::object::{
Object, FnResult, Function, VARIADIC
};
use crate::vm::Env;
use crate::iterable::new_iterator;
use crate::range::Range;
use crate::class::Class;
fn orbit(env: &mut Env, pself: &Object, argv: &[Object]) -> FnResult {
match argv.len() {
1 => {}, n => return env.arg... |
<!-- YAML
added: v10.6.0
-->
* `hostname` {string}
使用DNS协议解析`主机名`的基于正则表达式的记录(`NAPTR`记录)。 成功后,将使用具有以下属性的对象数组来解决 `Promise` :
* `flags`
* `service`
* `regexp`
* `replacement`
* `order`
* `preference`
<!-- eslint-skip -->
```js
{
flags: 's',
service: 'SIP+D2U',
regexp: '',
replacement: '_sip._udp.example.com',
... |
(* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (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.mozilla.org/MPL/
*
* Software distr... |
/*
* Copyright 2013 The Polymer Authors. All rights reserved.
* Use of this source code is governed by a BSD-style
* license that can be found in the LICENSE file.
*/
suite('Pointer Capture', function() {
var set = function(el) {
el.setPointerCapture(1);
};
var release = function(el) {
el.releasePoin... |
namespace JusticeFramework.Logic {
public static class EngineSettings {
// Game tag declarations
public const string TagItemTypeArmor = "ItemTypeArmor";
public const string TagItemTypeWeapon = "ItemTypeWeapon";
public const string TagItemTypeCodex = "ItemTypeCodex";
public c... |
---
layout: post
title: Sketches
---

<p> Here are some rough sketches of some possible ideas to develop. -TP</p> |
/*
* 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 ... |
git add .
git commit -a
cd ./Services/LoremIpsum-Service
git add .
git commit -a
cd ..
cd ..
cd ./LoremIpsum
git add .
git commit -a |
// Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
use super::super::VmmAction;
use crate::parsed_request::{Error, ParsedRequest};
use crate::request::Body;
#[cfg(target_arch = "x86_64")]
use crate::request::{Method, StatusCode};
#[cfg(target_arch = "x86_6... |
; RUN: opt < %s -disable-output -passes='no-op-module' -print-before=bleh 2>&1 | FileCheck %s --check-prefix=NONE --allow-empty
; RUN: opt < %s -disable-output -passes='no-op-module' -print-after=bleh 2>&1 | FileCheck %s --check-prefix=NONE --allow-empty
; RUN: opt < %s -disable-output -passes='no-op-module' -print-bef... |
package cn.springcloud.gray.server.resources.rest;
import cn.springcloud.gray.api.ApiRes;
import cn.springcloud.gray.server.constant.AuthorityConstants;
import cn.springcloud.gray.server.module.domain.OperationAuthrity;
import cn.springcloud.gray.server.module.user.AuthorityModule;
import cn.springcloud.gray.server.mo... |
package moe.yukinoneko.inputvalidator.interfaces
import android.widget.EditText
import moe.yukinoneko.inputvalidator.model.Rule
import moe.yukinoneko.inputvalidator.model.ValidationError
/**
* Created by SamuelGjk on 2019/12/4.
*/
interface Validatable {
fun getEditText(): EditText
fun addRule(rule: Rule):... |
# SyntaxExtensions\.BracesSpan Method
[Home](../../../../README.md)
**Containing Type**: [SyntaxExtensions](../README.md)
**Assembly**: Roslynator\.CSharp\.dll
## Overloads
| Method | Summary |
| ------ | ------- |
| [BracesSpan(ClassDeclarationSyntax)](#Roslynator_CSharp_SyntaxExtensions_BracesSpan_Microsoft_Code... |
/// Java: io.ably.lib.http.HttpAuth.Type
enum HttpAuthType {
/// indicates basic authentication
basic,
/// digest authentication
digest,
/// Token auth
xAblyToken,
}
|
#!/bin/sh
# Check pthread library presence:
#
echo "#include <pthread.h>" >__tmp.c && \
echo "void *f (void *a) {} void main (void) {pthread_t t1;pthread_create (&t1, NULL, &f, NULL);}" >>__tmp.c && \
cc -w __tmp.c -lpthread -o __tmp.out
ok=$?
rm -f __tmp.c __tmp.out
if test $ok; then echo ok; else echo fail; fi
e... |
"use strict";
/**
* @name decimal
* @description Test if `value` represents a decimal number, such as 0.1, .3, 1.1, 1.00003, 4.0, etc..
*
* @since 0.0.1
* @param {*} value `value` to test
* @param {Object} options `options` is an object which defaults to
* `{force_decimal: false, decimal_digits: '1,', locale: '... |
<?php
/**
* RemoveLicenceStatusRulesForLicence.php
*
* @author Josh Curtis <josh.curtis@valtech.co.uk>
*/
namespace Dvsa\Olcs\Api\Domain\Command\LicenceStatusRule;
use \Dvsa\Olcs\Transfer\Command\AbstractCommand;
/**
* @author Josh Curtis <josh.curtis@valtech.co.uk>
*/
final class RemoveLicenceStatusRulesForLi... |
# Team Management
When a pull-request is created GitHub evaulates which files have been changed [as per these rules](https://github.com/reactiveui/ReactiveUI/blob/main/.github/CODEOWNERS
). For more information about the `CODEOWNERS` convention [refer to this page on GitHub](https://help.github.com/articles/about-code... |
/*global require, module*/
module.exports = function (app, passport) {
'use strict';
require('./default')(app);
require('./auth')(app, passport);
require('./player')(app);
require('./invitation')(app);
}; |
require_relative '../environment'
class DbTest < ActiveSupport::TestCase
def test_does_not_load_database
c = Class.new(ActiveRecord::Base) do
def self.connection
raise "Oh No - tried to connect to database"
end
end
c.send(:has_ancestry)
end
end
|
// Based on http://geezhawk.github.io/using-react-with-django-rest-framework
//require our dependencies
var path = require('path');
var webpack = require('webpack');
var glob = require('glob');
var BundleTrackerPlugin = require('webpack-bundle-tracker');
var CleanWebpackPlugin = require('clean-webpack-plugin');
var E... |
/* IBM_PROLOG_BEGIN_TAG */
/* This is an automatically generated prolog. */
/* */
/* $Source: ffs/test/test_libffs.c $ */
/* ... |
# ciaoo
Its an food app to provide services to the customer. Changes have been made.
|
import { ctx } from '../../../__mocks__/apolloServerContext'
import { createProfile } from '../createProfile'
const args = {
profile: {
name: 'Lasse Kongo',
email: 'lassekongo@example.com',
telephone: '0123456789',
},
}
test('save input in mydata', async () => {
await createProfile({} as any, args, ... |
#include "std.h"
#include "bbsys.h"
//how many strings allocated
static int stringCnt;
//how many objects new'd but not deleted
static int objCnt;
//how many objects deleted but not released
static int unrelObjCnt;
//how many objects to alloc per block
static const int OBJ_NEW_INC=512;
//how many strings to alloc... |
// -*- coding: us-ascii-unix -*-
// Copyright 2012 Lukas Kemmer
//
// 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 a... |
package es.juandavidvega.ticketrestaurantlog.lib
@Suppress("unused")
sealed class OperationResult<out L, out R>
data class Left<out T>(val value: T) : OperationResult<T, Nothing>()
data class Right<out T>(val value: T) : OperationResult<Nothing, T>()
inline fun <L, R, T> OperationResult<L, R>.fold(left: (L) -> T, ri... |
require "security_release_practice/version"
module SecurityReleasePractice
def super_secure_calculation(input)
input.to_i + 6
end
def another_new_calculation(input)
input.to_s + ", lol."
end
end
|
---
layout: post
title: "道教文化(一)— 道教神学"
subtitle: "整理关于佛教文化知识点"
author: "Egbert"
date: 2020-01-28
tags:
- 文化
---
#### 大纲
>
> <p>1.道教神学
> <p>2.道教伦理
> <p>3.道教哲学
> <p>4.道教金丹术
> <p>5.道教医学、文艺
>
#### 1.道教神学
##### 1.1 佛教创立之前的古印度
|
module Asteroids.UILogic
( module Asteroids.UILogic.AspectRatio
, module Asteroids.UILogic.Bindings
, module Asteroids.UILogic.Display
, module Asteroids.UILogic.Drawable
, module Asteroids.UILogic.KeyBindings )
where
import Asteroids.UILogic.AspectRatio
import Asteroids.UILogic.Bindings
import Asteroids.UIL... |
import PropTypes from 'prop-types';
import React from 'react';
import { map, isEmpty } from 'lodash';
import InfiniteScroll from 'react-infinite-scroller';
import responsiveContainerStyles from 'components/common/responsive-container.sass';
import CrawlerRow from './crawler-row';
import styles from './crawlers-table.s... |
ALTER TABLE overstyring
ADD COLUMN hendelse_id UUID NOT NULL DEFAULT '0d7388cc-e8d2-4adf-a571-da443d68e774'::uuid;
ALTER TABLE overstyring
ALTER COLUMN hendelse_id DROP DEFAULT
|
class CollaborationSerializer < ActiveModel::Serializer
attributes :id
has_one :user, embed: :id, include: true
has_one :paper, embed: :id
def id
object.id
end
end
|
TERMUX_PKG_HOMEPAGE=https://packages.debian.org/en/stretch/mime-support
TERMUX_PKG_DESCRIPTION="MIME type associations for file types"
TERMUX_PKG_LICENSE="custom"
TERMUX_PKG_VERSION=3.61
TERMUX_PKG_SHA256=027fa5b709b3dabfb8dcdf68ab8c59e1f534a37eb1d1b5160ee1fd788103131d
TERMUX_PKG_SRCURL=http://http.debian.net/debian/po... |
#include "TcpServer.h"
#include <sys/stat.h>
#include <fcntl.h>
#include <dirent.h>
#include "md5.h"
#include <string.h>
std::string g_downfileName = "./File/";
void readFileList(const Reactor::TcpConnectionPtr& conn, const char *basePath)
{
DIR *dir;
struct dirent *ptr;
if ((dir=opendir(basePath)) == NULL... |
using System;
using System.Collections.Generic;
using System.Linq;
namespace Examples.Examples_Av7.Articles
{
public static class Utilities
{
public static int FindIndexOfFirstLarger<T>(List<T> data, T value) where T : IComparable<T>
{
for (int i = 0; i < data.Count; i++)
... |
package com.example.spring.boot.web.config
import com.example.spring.boot.web.annotation.IgnoreSwaggerDocument
import com.example.spring.boot.web.controller.spring.fox.example.ignore.IgnorePackageController
import com.fasterxml.classmate.TypeResolver
import com.google.common.base.Predicates.not
import com.google.commo... |
#include <map>
#include <unordered_map>
#include <string>
#include <gtest/gtest.h>
#include "RadixTree.h"
using namespace std;
TEST(RadixTree, Create)
{
RadixTree trie;
trie.dump();
}
TEST(RadixTree, PutGet)
{
RadixTree trie;
trie.put("test", 1);
trie.dump();
EXPECT_EQ(1, trie.get("test"));
// Test overlap... |
// Copyright 2020 Eurac Research. All rights reserved.
// Use of this source code is governed by the Apache 2.0
// license that can be found in the LICENSE file.
package oauth2
import (
"context"
"crypto/rand"
"errors"
"fmt"
"net/http"
"time"
"github.com/dgrijalva/jwt-go"
"github.com/euracresearch/browser"
... |
/** @format */
import * as mongoose from 'mongoose';
import 'reflect-metadata';
import {
constructors,
hooks,
methods,
models,
plugins,
schema,
schemaOptions as classSchemaOptions,
virtuals,
} from './data';
export * from './method';
export * from './prop';
export * from './hooks';
export * from './p... |
import { Argument } from "./Argument";
import { FlowBase } from "./Flow/FlowBase";
import { FlowLevel } from "./Flow/FlowLevel";
import { Identifier } from "./Identifier";
import { ParsedObject } from "./Object";
import { Story } from "./Story";
export class Knot extends FlowBase {
get flowLevel(): FlowLevel {
r... |
package main
import (
"fmt"
"os"
"text/tabwriter"
)
var (
Version = "0.9"
GitHash = ""
BuildDate = ""
)
// print the version
func printVersion(verbose bool) {
tw := tabwriter.NewWriter(os.Stdout, 1, 2, 2, ' ', 0)
fmt.Fprintln(tw, "diceware:\t"+Version)
if verbose {
if GitHash != "" {
fmt.Fprintln... |
# Halvors Eventyr - Post 2

Målet ditt er å føre Halvor trygt til det gule flagget. Dette kan du gjøre ved hjelp av tre funksjoner:
## ```walkForward()```
Halvor vil bevege seg fremover i den retningen han peker mot.
## ```turnLeft()```
Halvor vil snu seg til venstre.
## ```turnRight()```
Halvor ... |
#!/bin/sh
run() {
CONFIGMAP_LIST=$(kubectl -n kube-system get configmap |awk '{print $1}'|cut -f1 -d.|sort|uniq|grep -v 'NAME');
for i in $CONFIGMAP_LIST;
do echo "$i";
for j in $(kubectl -n kube-system get configmap | grep "$i" | awk '{print $1}'|cut -d. -f2|cut -dv -f2| sort -n | head -n -2); do echo "$i".v"$... |
/*
* Copyright 2016 The Cartographer Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law... |
import json
import base64
def read_amuselabs_data(s):
"""
Read in an amuselabs string, return a dictionary of data
"""
# Data might be base64'd or not
try:
data = json.loads(s)
except json.JSONDecodeError:
s1 = base64.b64decode(s)
data = json.loads(s1)
ret = {}
... |
package eu.kevin.accounts.countryselection.managers
import eu.kevin.accounts.networking.KevinAccountsClient
class KevinCountriesManager(
private val kevinAccountsClient: KevinAccountsClient
) : CountriesManagerInterface {
override suspend fun getSupportedCountries(authState: String): List<String> {
r... |
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
import { expect } from "chai";
import "mocha";
import { Inspection, Task } from "..";
import { ResultUtils } from "../common";
import { Lexer, LexerSnapshot, TriedLexerSnapshot } from "../lexer";
import { IParserState, IParserUtils, ParseError,... |
import { Injectable } from '@nestjs/common';
import { createHash } from 'crypto';
@Injectable()
export class CryptoUtil {
/**
* 加密登录密码
*
* @param password 登录密码
*/
encryptPassword(password: string): string {
return createHash('sha256')
.update(password)
.digest('hex');
}
/**
* 检查... |
from matplotlib import pyplot as plt
from datetime import time
import csv
gameSentiment = []
with open("sentiment.csv", newline="") as sentimentFile:
reader = csv.DictReader(sentimentFile, dialect='excel')
for row in reader:
time24 = lambda x: x if int(row["time"].split(':')[0]) <= 12 else int(row["time... |
---
title: The Caine Mutiny Court Martial
season: In House
period: Spring
playwright: Herman Wouk
season_sort: 120
venue: Cripps Hall Library
venue_sort: Cripps Hall
date_start: 1960-03-09
date_end: 1960-03-12
cast:
- role: Lt Stephen Maryk
name: Bill Mackenzie
- role: Lt Barney Greenwald
name: Peter Fisher
- role... |
import { combineReducers, Reducer } from 'redux';
import { ActionType, getType } from 'typesafe-actions';
import * as actions from './actions';
import { RegionLocaleState } from './types';
export type ClientAction = ActionType<typeof actions>;
const initialSummonerState: RegionLocaleState = {
status: 'idle',
data... |
import { css, SerializedStyles } from '@emotion/react'
import SystemTypes from '@stage-ui/system/types'
export type StyleTypes = {
container: SerializedStyles
scrollView: SerializedStyles
scrollContainer: SerializedStyles
item: (selected: boolean) => SerializedStyles
tag: SerializedStyles
}
const ... |
module Admin
class ResourceFileTypesController < AdminController
load_and_authorize_resource
def index
@resource_file_types = @resource_file_types.order(:position)
end
def show
end
def new
end
def edit
end
def create
if @resource_file_type.save
redirect... |
#!/bin/sh
rm service-worker.js
echo """
//Adapted from https://serviceworke.rs/strategy-cache-and-update_service-worker_doc.html
var CACHE = '`date +%Y-%m-%d`';
self.addEventListener('install', function(evt) {
evt.waitUntil(precache());
});
self.addEventListener('fetch', function(evt) {
evt.respondWith(fromCach... |
# CHANGELOG
## 1.0.0 - 2015-11-22
* Initial release |
# -*- coding: utf-8 -*-
from .base import *
from .util import get_env_setting
TEST_EMAIL_HOST = get_env_setting('PROJMAN_TEST_EMAIL_HOST')
TEST_EMAIL_ACCOUNT = get_env_setting('PROJMAN_TEST_EMAIL_ACCOUNT')
TEST_EMAIL_PASSWORD = get_env_setting('PROJMAN_TEST_EMAIL_PASSWORD')
|
# frozen_string_literal: true
require 'spec_helper'
require 'rubocop_rules/cli'
RSpec.describe RubocopRules::CLI do
describe '$ rubocop-rules' do
it 'prints help text' do
output = capture_stdout { RubocopRules::CLI::Commands.start([]) }
expect(output).to include 'help [COMMAND] # Describe available... |
<?php
namespace Cobonto\Listeners\UserRegistered;
use Cobonto\Events\UserRegistered;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Queue\InteractsWithQueue;
/**
* Created by PhpStorm.
* User: fara
* Date: 5/20/2017
* Time: 8:39 PM
*/
class WelcomeEmail implements ShouldQueue
{
use InteractsWithQ... |
// David Eberly, Geometric Tools, Redmond WA 98052
// Copyright (c) 1998-2016
// Distributed under the Boost Software License, Version 1.0.
// http://www.boost.org/LICENSE_1_0.txt
// http://www.geometrictools.com/License/Boost/LICENSE_1_0.txt
// File Version: 3.0.0 (2016/06/19)
#pragma once
#include <LowLevel/GteLogg... |
'use strict';
module.exports = {
'LAUNCH': function() {
this.toStateIntent('FirstState', 'HelloWorldIntent');
},
'Unhandled': function() {
this.toIntent('LAUNCH');
},
};
|
use adventlib::grid::{Point, SparseGrid};
pub fn solve() {
println!("Day 24");
let input_lines = adventlib::read_input_lines("day24input.txt");
let mut grid: SparseGrid<char> = SparseGrid::new();
for line in &input_lines {
let mut chars: Vec<_> = line.chars().collect();
let mut curr... |
<?php
namespace App\Http\Controllers\Frontend;
use App\Http\Controllers\Controller;
use App\Models\Order;
use App\Repositories\OrderRepository;
use App\Repositories\dashbordRepository;
use Illuminate\Support\Facades\DB;
use App\Responses\ResponsesFacade;
use App\Repositories\ProductRepositories;
class OrderControlle... |
package gfapi
import (
"os"
"path/filepath"
"reflect"
"runtime"
"sort"
"testing"
)
/* The testcases assume that it is being run on a peer in a gluster cluster,
* and that the cluster has a volume named "test"
*/
var (
vol *Volume
file *File
)
func TestInit(t *testing.T) {
vol = new(Volume)
if vol == ... |
// Copyright (c) 2015 fjz13. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
#include "MedusaCorePreCompiled.h"
#include "DeprecationManager.h"
#include "Core/String/HeapString.h"
#include "Core/String/StackString.h"
#include "Core/String/Stri... |
<?php
namespace app\index\controller;
use think\Controller;
use think\facade\Request;
use think\Db;
use think\facade\Session;
class Particulars extends Base
{
public function index()
{
//搜索
$this->search();
//购物车物品数量
$msql = Session::get('msql');
$u_id = $msql['id'];
... |
# Licensed under a 3-clause BSD style license - see LICENSE.rst
# -*- coding: utf-8 -*-
from asdf import yamlutil
from asdf.versioning import AsdfSpec
from ..types import AstronomyDataModelType
from ..fixed_location import FixedLocation
class FixedLocationType(AstronomyDataModelType):
name = 'datamodel/fixed_loca... |
#!/bin/bash
git status -s | awk '{print substr($2, 1)}' | xargs -I{} git diff "{}"
|
curl -L https://github.com/denoland/deno/releases/download/v1.7.5/deno-x86_64-unknown-linux-gnu.zip --output deno.zip
unzip -o deno.zip
rm deno.zip
chmod +x deno
|
# Coverage reports for importers (convert ONNX to framework)
| Converter | ONNX Version | Framework Version | Detailed Report |
| -------------- |:------------------:|:------------------:|:------------:|
|onnx-tf 1.5.0|1.5.0|Tensorflow 1.14|https://github.com/onnx/onnx-tensorflow/blob/master/doc/support_status.md|... |
// Copyright 2020 The Regents of the University of California
// released under BSD 3-Clause License
// author: Kevin Laeufer <laeufer@cs.berkeley.edu>
package maltese.smt
package object solvers {
val QF_BV = SMTFeature.QuantifierFree + SMTFeature.BitVector
val QF_ABV = SMTFeature.QuantifierFree + SMTFeature.Arra... |
#![allow(dead_code)]
use glium;
use std;
pub struct GliumDisplayWinitWrapper(pub glium::backend::glutin::Display);
impl conrod_winit::WinitWindow for GliumDisplayWinitWrapper {
fn get_inner_size(&self) -> Option<(u32, u32)> {
self.0.gl_window().get_inner_size().map(Into::into)
}
fn hidpi_factor(&self) -> f32 {
... |
#!/bin/sh
export ex_code=1
rm -rf node_modules/ && npm i && npm run build && export ex_code=0
exit $ex_code
|
#!/usr/bin/python
import grizzly.numpy_weld as npw
import numpy as np
import unittest
class NumPyWeldTestMethods(unittest.TestCase):
# TODO: Add more tests here
def test_div(self):
input = npw.NumpyArrayWeld(
np.array([3, 6, 12, 15, 14], dtype=np.int32), npw.WeldInt())
self.asser... |
--- !ruby/object:Gem::Specification
name: effective_datatables
version: !ruby/object:Gem::Version
version: 2.6.14
platform: ruby
authors:
- Code and Effect
autorequire:
bindir: bin
cert_chain: []
date: 2016-10-07 00:00:00.000000000 Z
dependencies:
- !ruby/object:Gem::Dependency
name: rails
requirement: !ruby/obj... |
#!/usr/bin/env python
# Non-Motorized Toolkit
# Copyright (c) 2014 Open Technology Group Inc. (A North Carolina Corporation)
# Developed under Federal Highway Administration (FHWA) Contracts:
# DTFH61-12-P-00147 and DTFH61-14-P-00108
#
# Redistribution and use in source and binary forms, with or without modification,
#... |
package com.vc.medium;
class L209 {
public int minSubArrayLen(int s, int[] arr) {
if(arr == null || arr.length == 0) return 0;
int end = 0, start = 0, n = arr.length;
int runningSum = 0, min = Integer.MAX_VALUE;
while(end < n) {
runningSum += arr[end++];
whi... |
/**
* The start data for a Mezzurite component contains the information necessary
* to register a component instance with Mezzurite. This is meant
* to be called with the 'mezzurite/componentStart' CustomEvent
* as follows:
* @example
* window.dispatchEvent(new CustomEvent('mezzurite/componentStart', {
* detail... |
/**
* @param {string} S
* @param {number[]} indexes
* @param {string[]} sources
* @param {string[]} targets
* @return {string}
*/
// 按照题目说的直接做就好了
var findReplaceString = function (S, indexes, sources, targets) {
const replaceIndexs = [];
const indexSourceLengthMap = [];
const indexTargetMap = [];
... |
import json
import numpy as np
import argparse
parser = argparse.ArgumentParser(description='merge datasets.')
parser.add_argument('input', type=str,help='Path to json file.')
args = parser.parse_args()
def main(args):
with open (args.input,'r')as f:
file=json.load(f)
for i in file['images']:
... |
// This file is part of ViViA, and is distributed under the
// OSI-approved BSD 3-Clause License. See top-level LICENSE file or
// https://github.com/Kitware/vivia/blob/master/LICENSE for details.
#include <cstdio>
// VTK includes.
#include <vtkCommand.h>
#include <vtkProp.h>
#include <vtkRenderer.h>
#include <vtkRen... |
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
using CommandLine;
namespace CookieCode.DotNetTools.Commands
{
[Verb("doc", HelpText = "Document an assembly")]
public class DocCommand : ICommand
... |
export class Starred {
id : string;
ownerId: string;
starredAccountId: string;
constructor(){}
}
|
using Strive.Core.Services.Poll.Types.TagCloud;
using Xunit;
namespace Strive.Core.Tests.Services.Poll.Types.TagCloud
{
public class TagCloudAnswerValidatorTests
{
private readonly TagCloudAnswerValidator _validator = new();
[Fact]
public void Validate_EmptyAnswers_ReturnError()
... |
package str
import "sort"
func IsAscSorted(s sort.StringSlice) bool {
for i := 0; i < len(s)-1; i++ {
if s[i] > s[i+1] {
return false
}
}
return true
}
func IsDescSorted(s sort.StringSlice) bool {
for i := 0; i < len(s)-1; i++ {
if s[i] < s[i+1] {
return false
}
}
return true
}
|
// Copyright (c) Jupyter Development Team.
// Distributed under the terms of the Modified BSD License.
import expect = require('expect.js');
import {
uuid
} from '@jupyter-widgets/base';
import {
arrayToJSON, JSONToArray, IReceivedSerializedArray,
isDataWriteBack
} from 'jupyter-dataserializers'
import {
ND... |
/**********************************************************************
// @@@ START COPYRIGHT @@@
//
// 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. ... |
package react.dom
import kotlinext.js.js
import kotlinx.html.INPUT
import kotlinx.html.TEXTAREA
import kotlinx.html.Tag
import kotlin.collections.set
import kotlin.reflect.KProperty
private val events = listOf(
"onCopy",
"onCut",
"onPaste",
"onCompositionEnd",
"onCompositionStart",
"onComposit... |
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "content/browser/renderer_host/p2p/socket_dispatcher_host.h"
#include <stddef.h>
#include <algorithm>
#include "base/bind.h"
#include "bas... |
app.config(function($stateProvider, $urlRouterProvider) {
$urlRouterProvider.otherwise('/Login');
$stateProvider
.state('Login', {
url: '/Login',
templateUrl: 'Login/Login.html',
controller: 'LoginController'
})
.state('Dashboard', {
... |
# select lines from the middle of a file
# Usage: middle.sh filename -end_line -number_of_lines
head $2 $1 | tail $3
|
# frozen_string_literal: true
module GreatGuardian
# Collection of attributes.
module Attribute
end
end
Dir[File.join File.dirname(__FILE__), "attribute", "*.rb"].each do |fname|
require_relative fname
end
|
package com.superychen.monitor.jobs;
import com.superychen.monitor.service.CollectService;
import lombok.extern.slf4j.Slf4j;
import org.quartz.DisallowConcurrentExecution;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
@Slf4j
//等待前一次任务执行完成再去执行下一次的
@DisallowConcurrentExecution
public class CollectJob im... |
use std::cmp;
use std::collections::HashSet;
use std::mem;
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct Meeting {
start: i32,
end: i32,
}
impl Meeting {
pub fn new(start: i32, end: i32) -> Self {
assert!(start <= end);
Self { start, end }
}
}
pub fn merge_meetings(mut meetings: Ve... |
<?php
namespace App\Repository\Category;
use App\Repository\RepositoryInterface;
interface CategoryRepositoryInterface extends RepositoryInterface
{
}
|
export namespace Database {
export type Movie = {
movie_id: number,
title: string,
overview: string,
poster_url: string | null,
release_date: string,
average_rating: number
};
export type Genre = {
genre_id: number,
name: string
};
export type GenreLink = {
genre_id: number... |
package spotlight.train
import java.util.concurrent.ExecutorService
import scala.concurrent.ExecutionContext
import scalaz._, Scalaz._
import scalaz.concurrent.Task
import com.typesafe.scalalogging.Logger
import org.apache.commons.math3.linear.MatrixUtils
import org.apache.commons.math3.stat.descriptive.DescriptiveSta... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.