text
stringlengths
27
775k
myMinimumBy:: (a -> a -> Ordering) -> [a] -> a myMinimumBy f list = foldr1 (\ a b -> if (f a b == LT) then a else b) list
package agg import ( "math" "math/rand" "sort" ) type datum struct { id int64 t []float64 } func (d *datum) ID() interface{} { return d.id } func (d *datum) Fields() []float64 { return d.t } func (d *datum) clone() *datum { t := make([]float64, len(d.t)) copy(t, d.t) tmp := *d tmp.t = t return &tmp } ...
class Article < ApplicationRecord has_rich_text :content has_many :comments, dependent: :destroy has_many :has_categories, dependent: :destroy has_many :categories, through: :has_categories belongs_to :user validates :title, presence: true validates :content, presence: true, length: { minimu...
#!/bin/bash # Result file export SYSTEMTEST_RESULT_FILE=/tmp/test_testexoticaLWR.res # Launch roscore roscore & # If core is already running, this will fail silently. pidcore=$! sleep 1 # Launch Drake Designer. echo "0" > $SYSTEMTEST_RESULT_FILE bot-procman-sheriff -l -n $DRC_BASE/../tests/systemtests/src/exoticaLWR/k...
(load "13_1.lisp") (defun forget-meeting (x y) (subprop x y 'has-met) (subprop y x 'has-met) t)
CREATE OR REPLACE FUNCTION public.initialise_balance () RETURNS trigger AS $BODY$ DECLARE initial_balance NUMERIC; pil_accounts_id VARCHAR; master_accounts_id VARCHAR; transfer_id VARCHAR; transactions_id VARCHAR; BEGIN SELECT bm_accounts_id INTO master_accounts_id FROM tue4_bm_accounts...
package kottage.core /** * @author Michael Vaughan */ data class Request(val params: Map<String, String>, val body: Body)
package flank.junit.internal import flank.junit.JUnit import flank.junit.mapper.mapToTestResults import flank.junit.mapper.parseJUnitReport import java.io.File internal val parseJUnitTestResults = JUnit.TestResult.Parse { path -> val file = File(path) when { file.isFile -> sequenceOf(file) fil...
@php $custom = $custom1=[]; if(!empty($marks)){ foreach ($marks as $data){ $custom[$data->c_name] = $data->marks; $custom1[$data->c_name] = $data->id; } } @endphp <div class="modal-dialog" role="document"> <div class="modal-content"> <div class="modal-header"> <h5 cl...
import Member from './member'; import { Column, Entity, JoinColumn, ManyToOne, PrimaryGeneratedColumn } from 'typeorm'; @Entity() export default class MemberNotification { @PrimaryGeneratedColumn({ name: 'id', type: 'bigint', unsigned: true }) id: number; @Column('tinyint', { name: 'is_read', default: 0...
import 'dart:math' as Math; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:wanandroid_flutter/entity/article_type_entity.dart'; import 'package:wanandroid_flutter/entity/project_entity.dart'; import 'package:wanandroid_flutter/page/account/login_wanandroid_page...
<?php namespace App\Policies; use Illuminate\Auth\Access\Response; use App\User; use Illuminate\Auth\Access\HandlesAuthorization; class UserPolicy { use HandlesAuthorization; /** * * @param \App\User $user * @return bool */ public function index(User $user) { return true; } public function sho...
The `anymouse.sty` Package ========================== If pdfLaTeX is used, this package sets up the necessary fonts using an 8-bit encoding as the primary text output encoding. Currently that encoding is the T1 encoding but I do hope to add support for T4 and T5 encodings (basically the Latin scripts the TeX Gyre font...
# first line: 94 @memory.cache def pca_faces(X_train, X_test): # copy and pasted from nmf. refactor? # Build NMF models with 10, 50, 100, 500 components # this list will hold the back-transformd test-data reduced_images = [] for n_components in [10, 50, 100, 500]: # build the NMF model ...
package io.cutebot.telegram.tgmodel import com.fasterxml.jackson.annotation.JsonIgnoreProperties import com.fasterxml.jackson.annotation.JsonProperty import io.cutebot.telegram.tgmodel.inline.TgInlineQuery @JsonIgnoreProperties(ignoreUnknown = true) data class TgUpdate ( @field: JsonProperty("update_id") ...
x = int(input("Please enter the first digit")) y = int(input("Please enter the second digit")) output_list = [] while len(output_list) < x - 1: for i in range(0, x): list_2d = [] output_list.append(list_2d) for j in range(0 ,y): number = i * j output_list[i].append...
@extends('../layouts.app') @section('content') <div id="login-container" class="container-fluid" style="background-color: lightgray;"> <div class="row"> <div class="col-md-12 mt-1 mb-1 text-center"> <h1>The page you are looking for is not available!</h1> <a href=...
import React from 'react'; import ReactDOM from 'react-dom'; import PropTypes from 'prop-types'; import TripHeader from './TripHeader'; import getTripSorterTheme from '../../../../common/theme'; import {wrapWithContext} from '../../../../../tests/lib/utils'; const context = {muiTheme: getTripSorterTheme()}; const con...
<?php namespace Neoan3\Component\Review; use PHPUnit\Framework\TestCase; /** * Class PostTest * Generated by neoan3-cli * @package Neoan3\Component\Review */ class ReviewTest extends TestCase { private ReviewController $instance; function setUp(): void { $this->instance = new ReviewController...
package torrent import ( "io/ioutil" "log" "os" "testing" ) // A top-level temp dir that lasts for the duration of the package tests, and // is removed at completion. var pkgTempDir string func init() { log.SetFlags(log.LstdFlags | log.Lshortfile) var err error pkgTempDir, err = ioutil.TempDir("", "torrent.te...
package usecase.usecases.logo import domain.LogoNotFoundException import domain.entity.ResourceType import domain.repository.ResourceRepository import usecase.model.DefaultResponse import usecase.model.DeleteLogoRequest import usecase.usecases.AuthUsecase import usecase.usecases.common.deleteFile import usecase.usecas...
// Copyright 2020 Self Group Ltd. All Rights Reserved. var binding = require('node-gyp-build')(__dirname) module.exports = binding
// Copyright (C) 2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) // 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/. #ifndef VSOMEIP_TRACE_HPP_ #define VSOMEIP_...
package com.rogertalk.roger.models.json import java.io.Serializable class StreamsResponse(val cursor: String?, val data: List<Stream>) : Serializable
# frozen_string_literal: true module Gitlab module Metrics module Samplers class DatabaseSampler < BaseSampler DEFAULT_SAMPLING_INTERVAL_SECONDS = 5 METRIC_PREFIX = 'gitlab_database_connection_pool_' METRIC_DESCRIPTIONS = { size: 'Total connection pool capacity', ...
package bmfcommon import ( "testing" "time" ) func TestNewStandard32TimeSupport(t *testing.T) { creationEpoch := uint64(1) modificationEpoch := uint64(2) scaledDuration := uint64(3) timeScale := uint64(4) sts := NewStandard32TimeSupport(creationEpoch, modificationEpoch, scaledDuration, timeScale) if sts.cre...
class SiteImageUploader < BaseUploader include CarrierWave::MiniMagick storage :fog def extension_whitelist image_extension_whitelist end version :large_square do process resize_to_fill: [500, 500] def store_dir "#{Rails.env}/#{site_basket_dir}/site-images/#{model.id}" end end ...
import * as React from "react"; export const foo = (x: { person: { readonly name: string; readonly age: number }; }) => x.person.name; type Props = { readonly person: { readonly name: string; readonly age: number }; readonly children: React.ReactNode; readonly renderMe: React.ComponentType<{ randomString:...
using System.Collections.Generic; using System.Linq; using Itm.DailyWorkRecords.Models; using Microsoft.EntityFrameworkCore; namespace Itm.DailyWorkRecords.Repository { public class ProjectRepository : IProjectRepository { private readonly DailyWorkRecordContext _db; public ProjectRepository(...
package eventhandler import ( "os" "testing" "time" "github.com/go-kit/log" "github.com/stretchr/testify/require" ) func TestCacheLoad(t *testing.T) { l := log.NewNopLogger() testTime, _ := time.Parse(time.RFC3339, "2022-01-26T13:39:40-05:00") expectedEvents := &ShippedEvents{ Timestamp: testTime, RvMap:...
## Installation Download the source code: ``` git clone https://github.com/SurPathHub/Dayong.git ```
package com.dxc.ssi.agent.exceptions.indy actual class WalletItemNotFoundException: IndyException() { }
<?php class Galeria extends Controller { public function __construct($controller, $action) { parent::__construct($controller, $action); } public function indexAction() { // Set layout $this->view->setLayout('_shared'); // Set view title ...
package com.virtuslab.gitmachete.backend.api; import io.vavr.collection.Set; import io.vavr.control.Option; import com.virtuslab.branchlayout.api.IBranchLayout; public interface IGitMacheteRepository { IGitMacheteRepositorySnapshot createSnapshotForLayout(IBranchLayout branchLayout) throws GitMacheteException; ...
<?php declare(strict_types=1); namespace Lmh\Cpcn\Test; use Lmh\Cpcn\Request\TrdT3001Request; use Lmh\Cpcn\Response\TrdT3001Response; use Lmh\Cpcn\Constant\ResponseCode; use Lmh\Cpcn\TrdClient; use PHPUnit\Framework\TestCase; class T3001Test extends TestCase { public function test() { $config = [ ...
#coding: utf-8 require 'spec_helper' describe Kusabana::Rule do let(:method) { 'GET' } let(:pattern) { /^\/hoge\/.+$/ } let(:expired) { 10 } let(:rule) { Kusabana::Rule.new(method, pattern, expired) } describe '#add_modifier' do let(:modifier) { Kusabana::QueryModifier.new(/hoge/) {|query| query} } ...
package main import ( "fmt" ) type treeNode struct { Val int left *treeNode right *treeNode } func hasPathSum(root *treeNode, sum int) bool { if root != nil { for _, p := range pathSum(root) { if sum == p { return true } } } return false } func pathSum(node *treeNode) []int { if node == nil...
// @flow import fs from 'fs'; import path from 'path'; import { SourceMapConsumer } from 'source-map'; import isCallSiteSourceCodeLocationResolvable from './isCallSiteSourceCodeLocationResolvable'; import isReadableFile from './isReadableFile'; import type { CallSiteType, SourceCodeLocationType } from './types';...
<?php namespace Scoop\Validation; class Equals extends Rule { protected $fail; private $hasInputs; private $values; private $inputs; /** * Validar si un campo contiene la misma información que otros campos o un valor dado: * ->equals('input', ['input2']) * ->equals('input', 'hello')...
/*$ { fixture: 'should-trigger-over-ternary-expr', expected: true } $*/ function test() { return true ? 1 : 0; /*# { pos: 17 } #*/ } /*$ { fixture: 'should-trigger-over-anything-inside-ternary', expected: true } $*/ function test() { return true ? 1 : 0; /*# { pos: 14 } #*/ } /*$ { fixture: 'should-trigger-...
#!/bin/bash set -e pushd ${TRAVIS_BUILD_DIR} pre-commit install if ! pre-commit run -a ; then ls -lh git diff --exit-code exit 1 fi popd
# Ornament/Observer Observer pattern for Ornament ORM ## Installation ### Composer (recommended) ```sh $ composer require ornament/observer ``` ### Manual 1. Download or clone the repo; 2. Add `/path/to/observer/src` for namespace `Ornament\Observer` to your PSR-4 autoloader. ## Usage For each Model that needs t...
# encoding: UTF-8 require "cgi" class User < ActiveRecord::Base def self.create_with_omniauth(auth) create! do |user| puts "creating new user" user.provider = CGI::escapeHTML(auth["provider"].force_encoding(Encoding::UTF_8)) user.uid = auth["uid"] user.name = CGI::escapeHTML(auth["info"]["name"].force_en...
<?php namespace Amostajo\LaravelImageHandler\Classes; /** * Image Handler provides methods for easy image handling. * * @author Alejandro Mostajo * @license MIT * @package Amostajo\LaravelImageHandler */ use File; use Eventviva\ImageResize; use Illuminate\Support\Facades\Cache; use Illuminate\Support\Facades\...
# {{name}} Template Use this file to describe what is available in your template and how to use it. Output from the default.json model {{=<% %>=}} | Token | Value | | ---------------- | ----------- | | camelcase | {{camelcase}} | | lcase | {{lcase}} | | ucase | {{ucase}} | | underscorelcase | {{underscorelcase}} | |...
// Testing that we can drop the || in for/do exprs fn f(f: fn@() -> bool) { } fn d(f: fn@()) { } fn main() { for f { } do d { } }
2020年12月21日16时数据 Status: 200 1.宋茜连眉毛都在踩点跳舞 微博热度:2163638 2.朴槿惠所在拘留所发生疫情 微博热度:1854860 3.周冬雨陈立农暖暖屋开业 微博热度:1665391 4.刘雨欣称自己被设计利用了 微博热度:1611951 5.伦敦 微博热度:1576898 6.具荷拉母亲继承女儿4成遗产 微博热度:1516021 7.央视调查催吐管公开售卖 微博热度:958942 8.多国确认出现变异新冠病毒确诊病例 微博热度:718529 9.曾春亮故意杀人案择期宣判 微博热度:671442 10.劳荣枝拒绝认罪 微博热度:670256 11.杨紫 ...
# -*- coding: utf-8 -*- """ @create: 2017-10-26 14:13:49. @author: name @desc: sys_client_api_config_handler """ import json from restkit import rest from restkit.rest import http_app from restkit.handlers.http_mrg_conns.http_base import HttpBaseHandler from restkit.tools.field_checker import FeildOption from restkit...
import Game from "../Game"; export default interface GameEventHandler { // Called when added to the game onAdd?(game: Game): void; // Called right after being added to the game afterAdded?(game: Game): void; // Called after physics afterPhysics?(): void; // Called before the tick happens beforeTick?():...
package jbomberman.game; public enum DirectionType { LEFT, RIGHT, UP, DOWN, NO_DIRECTION }
import { CreateIssueDto } from './create-issue.dto' import { UpdateIssueDto } from './update-issue.dto' export { CreateIssueDto, UpdateIssueDto }
bindkey -d # Home [[ -n "${terminfo[khome]}" ]] && bindkey "${terminfo[khome]}" beginning-of-line bindkey "^[[H" beginning-of-line # End [[ -n "${terminfo[kend]}" ]] && bindkey "${terminfo[kend]}" end-of-line bindkey "^[[F" end-of-line # Insert [[ -n "${terminfo[kich1]}" ]] && bindkey "${terminfo[kich1]}" overwrite-...
import * as vscode from 'vscode'; import * as toolchain from "./toolchain"; // This ends up as the `type` key in tasks.json. RLS also uses `cargo` and // our configuration should be compatible with it so use the same key. const TASK_TYPE = 'cargo'; interface CargoTaskDefinition extends vscode.TaskDefinition { com...
package okta import ( "bytes" "encoding/json" "errors" "fmt" "io/ioutil" "net/http" "strings" "time" ) type Factor struct { ID string `json:"id"` FactorType string `json:"factorType"` Provider string `json:"provider"` VendorName string `json:"vendorName"` Profile struct { CredentialID stri...
<?php namespace App\Http\Controllers\API\V1; use App\Http\Controllers\Controller; use App\Http\Requests\BulkDeleteRequest; use App\Http\Requests\RoleRequest; use App\Http\Resources\RoleResource; use App\Models\Role; use App\Services\Models\RoleService; use Exception; use Illuminate\Http\JsonResponse; use Illuminate\H...
/* * 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 may n...
import java.util.NoSuchElementException; /** An implementation of a stack as a sequence of nodes. */ public class LinkedListStack { private Node first; /** Constructs an empty stack. */ public LinkedListStack() { first = null; } /** Adds an element to...
package course.kotlin fun main(args: Array<String>) { println("Hello World!: ${args.contentToString()}") // println("What's your name?") // val name = readLine() // println("Hello, $name!") // val sum = {a: Int, b:Int -> a + b} // lambda // val sum = fun(a: Int, b:Int) = a + b // anonymous function...
<?php namespace Kambo\Database\Protocolx\Client\Result; /** * Metadata result from the operation * * @package Kambo\Database\Protocolx\Collection * @author Bohuslav Simek <bohuslav@simek.si> * @license MIT */ class Metadata { private $state; /** * Create metadata result from the operation. * ...
#include "CBMPLoader.h" glm::vec2 CBMPLoader::GetImageSize() { if (file) return glm::vec2(bitmapInfoHeader.biWidth, bitmapInfoHeader.biHeight); return glm::vec2(); } BYTE* CBMPLoader::GetAllImageData() { if (file) { ULONG bitSize = bitmapInfoHeader.biBitCount == 32 ? 4 : 3; ULONG...
CREATE TABLE IF NOT EXISTS `show_order` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `show_id` int(10) unsigned NOT NULL, `staging_id` int(10) unsigned NOT NULL, `order` tinyint(3) unsigned NOT NULL, PRIMARY KEY (`id`), KEY `show_id` (`show_id`), KEY `staging_id` (`staging_id`) ) ENGINE=InnoDB DEFAUL...
# Relatively prime natural numbers ```agda {-# OPTIONS --without-K --exact-split --allow-unsolved-metas #-} module elementary-number-theory.relatively-prime-natural-numbers where open import elementary-number-theory.equality-natural-numbers using ( is-decidable-is-one-ℕ; is-set-ℕ) open import elementary-number-the...
python ../ddqn_run.py --env simple_tag_1v1 --model_path ./save/simple_1v1_final/ --render --load_model --testing
/** * Utility functions for: * * https://developer.mozilla.org/en-US/docs/Web/API/WebGLProgram * https://developer.mozilla.org/en-US/docs/Web/API/WebGLShader * **/ // Define the MDN global if it doesn't already exist var MDN = window.MDN || {}; MDN.createShader = function (gl, source, type) { // Compiles eith...
import 'package:flutter/material.dart'; import 'package:flutterstreamprovider/logic/model/user_model.dart'; import 'package:flutterstreamprovider/logic/services/firebase_services.dart'; import 'package:provider/provider.dart'; void main() { runApp(MyApp()); } class MyApp extends StatelessWidget { @override Widg...
RSpec.shared_examples "base container" do describe "#name" do it "should access the @name" do context.name "fubar" expect(context.name).to eql("fubar") end end describe "#image" do it "should access the @image" do context.image "blah" expect(context.image).to eql("blah") e...
(SELECT home as team FROM matches) UNION ALL (SELECT away as team FROM matches) ORDER BY team;
<?php /** * Define error handling and display levels for development mode */ ini_set('display_errors', 1); ini_set('display_startup_errors', 1); error_reporting(E_ALL); /** * Define a basic helper variable with the current URI for routing and other things */ $uri = urldecode(parse_url($_SERVER['REQUES...
require 'lisp' lisp = Object.new lisp.extend(Lisp) lisp.extend(Lisp::StandardFunctions) require 'open-uri' require 'fix_proxy.rb' open("http://www.lisperati.com/code.html") { |f| input = f.readlines.join.gsub(/<[^>]*>/, "") #puts input lisp.lisp(input) } commands = [ ["(pickup whiskey-bottle)", "(YOU ARE NOW CA...
### DescribeTablev2.go This example lists the following properties of a DynamoDB table. - Number of items - Size, in bytes - Status, such as Active `go run DescribeTablev2.go -t TABLE` - _TABLE_ is the name of the table. The unit test accepts a similar value in _config.json_.
// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See License.txt in the repository root. package com.microsoft.tfs.core.util; import java.nio.charset.Charset; import java.text.MessageFormat; import java.util.Locale; import org.apache.commons.logging.Log; import org.apache.commons.l...
use std::fmt::{self, Display}; use std::marker::PhantomData; use serde::{Serialize, Serializer}; use serde::ser::SerializeMap; use rigging::resource::ResourceEndpoint; pub struct Relationships<'a, T> { id: &'a str, _marker: PhantomData<T>, } impl<'a, T> Relationships<'a, T> { pub fn new(id: &'a str) -> ...
<?php $listeners = array( 'after_default_pages_load' => array() ); function create_event($name) { global $listeners; $listeners[$event] = array(); } function add_event($event_name, $callback) { global $listeners; array_push($listeners[$event_name], $callback); } function trigger_event($event_name...
#!/bin/swipl -fq :- use_module(library(readutil)). :- initialization main. main :- open('input', read, Fd, []), read_string(Fd, _, Str), split_string(Str, "\n", "", LinesRaw), exclude(is_empty, LinesRaw, Lines), length(Lines, Count), maplist(string_chars, Lines, Chars), maplist(maplist(char_to_digit), ...
#!/usr/bin/env bash # Setup vim and packages debug=${1:-false} # Load help lib if not already loaded. if [ -z ${libloaded+x} ]; then source ./lib.sh fi; # Set dotfilesdir var if it doesn't exist. if [ -z ${dotfilesdir+x} ]; then dotfilesdir="$(dirname "$(pwd)")" fi; # Check if vim is installed. if vim n 2>/dev/...
import { decode225, encode225, Point } from '../rule' import { canonicalBitboard, inverseVariantId, pointsVariants, pointVariant, toBitboardVariants, } from './symmetry' export type GameRecord = { moves: Point[] blackWon?: boolean | null whiteWon?: boolean | null } export type GamesStat = { all: num...
{-| Module : FaceDataServer Description : Implementation of FDS Protocol Copyright : (c) Cj.bc_sd a.k.a Cj-bc, 2020 Maintainer : cj.bc-sd@outlook.jp Stability : experimental See: https://github.com/Cj-bc/FDS-proto Current protocol version: 1.0.0 -} module FaceDataServer ( FaceData , defaultGroupAddr , defau...
import System.Exit (ExitCode (ExitFailure, ExitSuccess)) import qualified System.Process.Typed as P import Test.Hspec import Test.QuickCheck (NonZero (getNonZero), property) main :: IO () main = hspec $ do describe "exitWith" $ it "exit with the given exit code" . pro...
import BN from 'bn.js'; import { JsonProperty, Serializable } from 'typescript-json-serializer'; import { BaseEntity } from '../../BaseEntity'; import { BNConverter } from '../../serialize'; import { StringPublicKey } from '../../../utils'; @Serializable() export class BidderMetadata extends BaseEntity { // Relation...
#!/usr/bin/env bash set -o xtrace ME=$(readlink -f "$0") DIR=$( cd "$( dirname "$ME" )" && pwd ) export SWM_LIB=${DIR}/../../_build/default/lib/swm/ebin echo "SWM_LIB=${SWM_LIB}" # Re-run the script by user which username passed to arguments: if [ "$UID" == "0" ]; then if [ $# != 1 ]; then echo "Wrong number o...
using System.Windows.Forms; namespace StockManager.Src.Views.Components { public static class Spinner { /// <summary> /// Init the loading spinner /// </summary> public static void InitSpinner() { Cursor.Current = Cursors.WaitCursor; } /// <summary> ...
package frc.team2412.robot.util import com.swervedrivespecialties.swervelib.Mk4SwerveModuleHelper import com.swervedrivespecialties.swervelib.SwerveModule // kotlin is very fun data class Mk4Configuration( val ratio: Mk4SwerveModuleHelper.GearRatio, val drive: Int, val angle: Int, val encoder: Int, ...
CREATE TABLE BOB ( id INTEGER GENERATED ALWAYS AS IDENTITY NOT NULL PRIMARY KEY, name VARCHAR );
// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using Microsoft.AspNetCore.Http; namespace Microsoft.AspNetCore.Routing { /// <summary> /// A context for virtual path generation operations. ...
#!/bin/bash git pull upstream master && \cp -fr dist/* ../promotion-backstage/public/ui/dist/ && echo 'Update app successed.'
package ru.buylist.utils import androidx.savedstate.SavedStateRegistryOwner import ru.buylist.BuyListApp import ru.buylist.data.repositories.buyList.BuyListsDataSource import ru.buylist.data.repositories.buyList.BuyListsRepository import ru.buylist.data.repositories.items.GlobalItemsDataSource import ru.buylist.data.r...
import jwt from 'jsonwebtoken'; import config from 'config'; import log from './logger'; export function signJWT( object: Object, keyName: 'accessTokenPrivateKey' | 'refreshTokenPrivateKey', options?: jwt.SignOptions | undefined, ) { const expiresIn = keyName === 'accessTokenPrivateKey' ? config.get<...
// Copyright (C) 2017 Google Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed t...
module PonyExpress class PonyExpressController < ActionController::Base protect_from_forgery end end
# Chapter 5: Transaction Processing Monitors: An Overview ## Main Presentation - Presenter: 안미진 - [Slides](slides/ch5-transaction-processing-monitors-an-overview.pdf) ## Short Presentation - Presenter 1: 박종혁 - Performance Monitoring System: Percona PMM and Intel PCM - [Slides](slides/ch5-monitoring-system.pd...
/* * Copyright 2020 ConsenSys AG. * * 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 wr...
# My Website This is a really awesome website Update made on master on Github rebase ## Repository Purpose This file is jst a readme file on how to use GIT ##Getting start To get started with this project, just `clone` this repository
using System; using System.Collections.Generic; using System.IO.Pipes; using System.Linq; using System.Text; using System.Threading.Tasks; namespace NEHSubprocess.Misc { //DISCLAIMER: This is my first ever usage of named pipes, please don't blame wrong usage. public class PipeClient { private Nam...
--- pid: '5545' object_pid: '3350' label: Madonna and Child in a Flower Garland with Putti (Munich) artist: janbrueghel provenance_date: Early 18th century provenance_location: Düsseldorf provenance_text: Galerie Düsseldorf collection: provenance order: '0805' ---
fn main() { let protoc_bin_path = protoc_bin_vendored::protoc_bin_path().unwrap(); let protos = ["proto/notification.proto"]; protobuf_codegen::Codegen::new() .protoc_path(&protoc_bin_path) .include("proto") .inputs(&protos) .out_dir("src/generated") .run_from_scrip...
package message import ( "encoding/json" "log" ) type Type string const ( Chat Type = "chat" Online Type = "online" Ping Type = "ping" Pong Type = "pong" Auth Type = "auth" Kick Type = "kick" Ret Type = "ret" ) type Message struct { Id string `json:"id,omitempty"` Type Typ...
<?php /** * Created by PhpStorm. * User: MYTHEME * Date: 11/02/17 * Time: 19:58 */ function MYTHEME_mce_buttons_2($buttons) { array_unshift($buttons, 'styleselect'); return $buttons; } add_filter('mce_buttons_2', __NAMESPACE__.'\\MYTHEME_mce_buttons_2'); /* * Callback function to filter the MCE settings */...
'use strict'; let doggoBreedImage = document.getElementById('doggo-breed'); let doggoPics = document.getElementById('doggo-pics'); function getDogBreed() { let breed = document.getElementById('breed').value; if(breed.includes(' ')) { breed = (breed.split(' ').reverse().join('/')) } fetch(`...
/****************************************************************************** * * Copyright(c) 2007 - 2017 Realtek Corporation. * * This program is free software; you can redistribute it and/or modify it * under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundat...
class NdlStatAccess < ActiveRecord::Base belongs_to :ndl_statistic validates_presence_of :log_type, :internal end