text stringlengths 27 775k |
|---|
# frozen_string_literal: true
require "hcl/version"
require "hcl/wrapper"
module Hcl
module_function
def parse(hcl_io)
Wrapper.hcl_parse(hcl_io.read)
end
end
|
// Declare a delegate
delegate void Del(int i, double j);
class MathClass
{
static void Main()
{
MathClass m = new MathClass();
// Delegate instantiation using "MultiplyNumbers"
Del d = m.MultiplyNumbers;
// Invoke the delegate object.
... |
class AddLogoAndLineQrCodeToCompany < ActiveRecord::Migration[6.0]
def change
add_column :companies, :logo, :string, after: :enabled
add_column :companies, :line_qr_code, :string, after: :logo
end
end
|
# Bootcamp_HAB - Rubén Pérez
Ejercicios como programador Full-Stack en el bootcamp de HackaBoss
## Módulos
[1. HTML](https://github.com/rubii9/Bootcamp_HAB/tree/master/HTML)
[2. CSS](https://github.com/rubii9/Bootcamp_HAB/tree/master/CSS)
[3. JS](https://github.com/rubii9/Bootcamp_HAB/tree/master/JS)
[4. SQL](http... |
<?php
class Controller_Base_Site extends Controller_Base_Tpl
{
public $template = 'base';
public function after($response)
{
$response = parent::after($response);
$this->post($this->template->content->tplname());
return $response;
}
protected function is_login()
{
return !empty(Model_Db_User::by_sessi... |
<div style="width:600px;">
<p>Publish date: <?= date('j/n/Y', strtotime($theEntry['online_from'])) ?> by <?= $theEntry['author']['name'] ?></p>
<p>Link to read and comment: https://my.amicatravel.com/blog/posts/r/<?= $theEntry['id'] ?></p>
<p>----------------</p>
<?= $theEntry['body'] ?>
<p>----------------</p>
<... |
package de.eternalwings.bukkit.sync.zookeeper
import org.apache.curator.framework.CuratorFramework
import org.apache.curator.framework.recipes.cache.PathChildrenCache
import org.apache.curator.framework.recipes.cache.PathChildrenCacheEvent.Type
import org.apache.curator.framework.recipes.cache.PathChildrenCacheListene... |
package com.murilops.kotlin.blu.services
import com.murilops.kotlin.blu.models.AccountModel
import java.io.FileWriter
private const val CSV_HEADER = "Conta,Depósitos,Total de Bônus,Valor Final"
fun saveToCsv(accounts: ArrayList<AccountModel>, bonusCalc: ArrayList<Double>, depositCalc: ArrayList<Double>,
... |
package dev.eduayuso.kolibs.konet
import io.ktor.client.HttpClient
import kotlinx.serialization.json.Json
/**
* @property url: API base URL
* @property http: Ktor HTTP client
*/
interface IKoApiClient {
val json: Json
val baseUrl: String
val httpClient: HttpClient
fun getHeaders(): Map<String, Str... |
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using FastGeo;
using MathHelper;
using static MathHelper.XMathFunc;
namespace SDFUtility
{
public class SDFShape
{
public virtual float GetRadiusInDir(Vector3 dir)
{
return 0;
}
};
public... |
<?php
declare(strict_types=1);
namespace App\Http\Controllers\Auth;
use App\Http\Controllers\Controller;
use App\Service\AuthContract;
use Illuminate\Foundation\Auth\RedirectsUsers;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Cookie;
class LoginController extends Controller
{
const COOKIE_EXPIRAT... |
require 'httpx/adapters/faraday'
require 'faraday-http-cache'
require 'json'
require 'retriable'
module EVEKillReport
class Pipeline
module Sources
class ZKillboard
include Enumerable
def initialize(options = {})
@user_agent = options[:user_agent]
@past_seconds = option... |
module SharedExampleHelper
extend ActiveSupport::Concern
shared_context :json do
header 'Accept', 'application/json'
let(:json) { JSON.parse(response_body) }
end
end
|
package com.foryouandme.core.arch.error
import android.content.Context
import com.foryouandme.R
import com.foryouandme.domain.error.ForYouAndMeException
import com.foryouandme.entity.configuration.Configuration
import dagger.hilt.android.qualifiers.ApplicationContext
import javax.inject.Inject
class ErrorMessenger @I... |
#!/bin/bash
wait-for-it.sh zookeeper:2181 -t 40
rc=$?
if [ $rc -ne 0 ]; then
echo -e "\n---------------------------------------"
echo -e " Apache ZooKeeper not ready! Exiting..."
echo -e "---------------------------------------"
exit $rc
fi
wait-for-it.sh hadoop:8020 -t 180
rc=$?
if [ $rc -ne 0 ]; the... |
name 'etcd'
source_url 'https://github.com/chef-cookbooks/etcd'
issues_url 'https://github.com/chef-cookbooks/etcd/issues'
maintainer 'Sean OMeara'
maintainer_email 'sean@chef.io'
license 'Apache 2.0'
version '3.2.5'
depends 'compat_resource', '>= 12.5.23'
depends 'docker'
depends 'puneets-confd-cookbook'
supports '... |
#!/bin/bash
appledoc ../common/ ../iOS\ Library/View\ Controllers/*.h
|
import os
from pathlib import Path
from strictdoc.backend.dsl.models.document import Document
from strictdoc.core.document_tree import DocumentTree
from strictdoc.export.rst.writer import RSTWriter
def get_path_components(folder_path):
path = os.path.normpath(folder_path)
return path.split(os.sep)
class Do... |
fun main()
{
var rainbowColor = "Purple"
// rainbowColor is not nullable
// rainbowColor = null
var greenColor = null
var blueColor : String? = null
} |
using System;
namespace Joke.Joke.Tree
{
public interface IVisitor
{
void Visit(IType type) => throw new NotImplementedException();
void Visit(IntersectionType type);
void Visit(UnionType type);
void Visit(TupleType type);
void Visit(NominalType type);
... |
#!/bin/bash
docker build . -t andylippitt/daud:$1
docker push andylippitt/daud:$1
|
SELECT COUNT(*) FROM [BAMAlertsApplication].[dbo].[MarkLog]
SELECT COUNT(*) FROM [BAMAlertsNSMain].[dbo].[MarkLog]
SELECT COUNT(*) FROM [BAMArchive].[dbo].[MarkLog]
SELECT COUNT(*) FROM [BAMPrimaryImport].[dbo].[MarkLog]
SELECT COUNT(*) FROM [BizTalkDTADb].[dbo].[MarkLog]
SELECT COUNT(*) FROM [BizTalkEDIDb].[dbo].[Mark... |
Given /^There are (\d+) images owned by others$/ do |num|
# create num images owned by a different user
someone_else = FactoryGirl.create(:user)
FactoryGirl.create_list(:image, num.to_i, :user => someone_else)
end
When /^I visit the user images page$/ do
visit images_user_path
end
|
package rm
import (
"fmt"
"github.com/gf2crypto/blincodes-go/lincode"
"github.com/gf2crypto/blincodes-go/vector"
"testing"
)
func TestGeneration(t *testing.T) {
tests := []struct {
r, m uint
want struct {
n, k, d uint
basis []*vector.Vector
}
}{
{0, 0, struct {
n, k, d uint
basis []*vect... |
package com.jetbrains.rd.generator.nova
import com.jetbrains.rd.generator.nova.Member.Field
import com.jetbrains.rd.generator.nova.Member.Reactive.Signal
import com.jetbrains.rd.generator.nova.Member.Reactive.Stateful.*
import com.jetbrains.rd.generator.nova.Member.Reactive.Stateful.List
import com.jetbrains.rd.gener... |
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
use Validator;
use Auth;
class CustomLoginController extends Controller
{
function index()
{
return view('login');
}
function checklogin(Request $request)
{
$this->validate($reque... |
const marked = require('marked');
const renderer = require('./markedRenderer');
describe('markedRenderer', () => {
test('formats code for a given language', () => {
expect(
marked(`\`\`\`js\nconst foo = 'test'.split('');\`\`\``, { renderer })
).toBe(
`<!--emdaer-code-fence-start\n\`\`\`js\nconst ... |
package datex
import "time"
func WeekMondaySt(t time.Time) (dates []string) {
if t.Weekday() != time.Monday {
for i := 0; i < 6; i++ {
t = t.Add(time.Hour * -24)
if t.Weekday() == time.Monday {
break
}
}
}
dates = append(dates, t.Format("2006-01-02"))
for i := 0; i < 6; i++ {
t = t.Add(time.Hou... |
use strict;
use warnings;
package Test::RxSpec;
use autodie;
use Data::Rx;
use File::Find::Rule;
use JSON::XS ();
use Test::More;
my $JSON = JSON::XS->new;
sub decode_json { $JSON->decode($_[0]) }
sub slurp_json {
my ($fn) = shift || $_;
$fn = "spec/$fn.json";
my $json = do { local $/; open my $fh, '<', $fn; <... |
#!/bin/bash
# Problem Statement: https://www.hackerrank.com/challenges/bash-tutorials---arithmetic-operations/problem
read exp
printf "%0.3f" "$(echo $exp | bc -l)" |
const plugin = require('fastify-helmet');
const options = require('../config/helmet');
/**
* Helmet does not support 'true' as a middleware option, so we remove the
* properties that value 'true' in the options.
*/
Object.keys(options).forEach((key) => {
if (options[key] === true || options[key] === 'true') {
... |
#!/bin/bash
readonly BASH_PROFILE=~/.bash_profile
readonly BASHRC=~/.bashrc
# Homebrew
# --------------------------------------------------
if ! type brew > /dev/null 2>&1; then
CI=true /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
test -d /home/linuxbrew/.linuxb... |
import 'package:advanced_calculation/advanced_calculator.dart';
import 'package:cartesian_graph/coordinates.dart';
import 'package:cartesian_graph/segment_bounds.dart';
import 'package:cartesian_graph/src/coordinates_calculator.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:mockito/mockito.dart... |
package pool
import java.util.concurrent.locks.ReentrantLock
import scala.collection.mutable
/**
* A simplistic thread pool implementation
*/
class ThreadPool(private val n: Int) {
// A queue of pending tasks to be implemented
private val taskQueue = new mutable.Queue[Unit => Unit]()
// An array of worker... |
//@flow
import * as React from 'react';
import { Component } from 'react-simplified';
import AdminTeamForm from "./AdminTeamForm";
import AdminTeamList from './AdminTeamList';
/**
* Component for managing employees in regions.
*/
class AdminTeamView extends Component {
/**
* Generates HTML code
* @returns {*... |
package com.example.wanandroid.main.home
import org.junit.Before
import org.junit.Test
import org.junit.runner.RunWith
import org.robolectric.RobolectricTestRunner
@RunWith(RobolectricTestRunner::class)
class HomeFragmentTest {
@Before
fun setup() {
}
@Test
fun dataLoading_showLoadingLayout() {
... |
import { Action } from "./action";
import { PageInfoNormal, State } from "./state";
export type Reducer<S, A> = (state: S, action: A) => S;
export function createReducer(
minIndex: number,
maxIndex: number
): Reducer<State, Action> {
function range(index: number) {
return Math.min(Math.max(minIndex, index), ... |
from itertools import product
from unittest.mock import call
from unittest.mock import patch, MagicMock
from datetime import datetime
import numpy as np
from sm.engine.sm_daemons import DatasetManager
from sm.engine.db import DB
from sm.engine.es_export import ESExporter
from sm.engine.queue import QueuePublisher
fro... |
import { Injectable } from '@angular/core';
import { ResponseParsingService } from '../data/parsing.service';
import { RawRestResponse } from '../dspace-rest/raw-rest-response.model';
import { BaseResponseParsingService } from '../data/base-response-parsing.service';
import { ObjectCacheService } from '../cache/objec... |
from utils.model_utils import predict
import streamlit as st
import requests
from utils.io_utils import load_config
config = load_config()
st.title("Clothing Classifier")
url = st.text_input("Image url")
if url:
response = requests.get(config["api"]["prediction_url"], params={"url": url})
# st.wri... |
#ifndef NTDB_PRIVATE_H
#define NTDB_PRIVATE_H
/*
Trivial Database 2: private types and prototypes
Copyright (C) Rusty Russell 2010
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; eit... |
package com.qohash.cabaneio2021.model.post
data class Retweet(
override val id: PublicationId,
val tweet: Tweet,
) : Publication
|
module Puppetserver
module Ca
module Utils
module Config
def self.running_as_root?
!Gem.win_platform? && Process::UID.eid == 0
end
def self.munge_alt_names(names)
raw_names = names.split(/\s*,\s*/).map(&:strip)
munged_names = raw_names.map do |name|
... |
---
num: "lect20"
lecture_date: 2019-06-06
desc:
ready: false
pdfurl:
---
|
'use strict';
class NotFoundError extends Error {
constructor({ modelClass, data = {}, statusCode = 404, ...rest } = {}) {
super(rest.message || 'NotFoundError');
this.type = 'NotFound';
this.name = this.constructor.name;
this.data = { ...rest, ...data };
this.statusCode = statusCode;
// Ad... |
// Guo Wanqi 2019
#include "TankAIController.h"
#include "GameFramework/PlayerController.h"
#include "TankAimingComponent.h"
#include "Engine/World.h"
void ATankAIController::BeginPlay() {
Super::BeginPlay();
aimComponent = GetPawn()->FindComponentByClass<UTankAimingComponent>();
if (!ensure(aimComponent)) return;... |
package insts
import (
"debug/elf"
"fmt"
"log"
"strings"
)
// ExeUnit defines which execution unit should execute the instruction
type ExeUnit int
// Defines all possible execution units
const (
ExeUnitVALU ExeUnit = iota
ExeUnitScalar
ExeUnitVMem
ExeUnitBranch
ExeUnitLDS
ExeUnitGDS
ExeUnitSpecial
)
// A... |
<?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
class PostRequest extends FormRequest
{
public function authorize()
{
return true;
}
public function rules()
{
return [
'title' => 'required',
'text' => 'required',
... |
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
#include "input.h"
namespace vespalib {
/**
* Thin wrapper presenting a single chunk of Memory as an Input.
**/
class MemoryInput : public Input
{
private:
Memory _data;
size... |
class AssignmentQuestionnaire < ActiveRecord::Base
belongs_to :assignment
belongs_to :questionnaire
has_paper_trail
end
|
import 'package:source_gen/source_gen.dart';
class Config {
final String langDir;
final bool shouldSearchRecursively;
const Config(this.langDir, this.shouldSearchRecursively);
factory Config.fromAnnotation(ConstantReader annotation) {
final dir = annotation.peek('langDir').stringValue;
final shouldSe... |
# frozen_string_literal: true
require_relative '../filter'
module OctocatalogDiff
module CatalogDiff
class Filter
# Filter out changes in parameters where the elements of an array are the
# same values but different data types. For example, this would filter out
# the following diffs:
# ... |
set -o errexit
set -o pipefail
set -o xtrace
curl-fail() {
# Source: <https://superuser.com/a/1641410>.
outfile="$(mktemp)"
local code
code="$(curl --insecure --silent --show-error --output "$outfile" --write-out "%{http_code}" "$@")"
if [[ $code -lt 200 || $code -gt 302 ]] ; then
cat "$outfile" >&2
# Need be... |
import read from 'readline-sync';
import chalk from 'chalk';
import mates from './modulo-05-01-Ablanco'
//variables
let lado : number;
let superficie: number;
let perimetro: number;
// Inicio
//pedir dato de lado
lado=read.questionInt("dime tu lado ")
// calcular superficie
superficie=mates.superficieCuadrado(l... |
module SeniorProjectAssignments
import GLPK
using JuMP
using DataFrames
using Random: shuffle
using DataStructures: PriorityQueue, dequeue!
export
StudentData,
ProjectData,
IndexModel,
match,
process_survey,
process_projects
struct StudentData
id::String
roles::NamedTuple
pm::Bool... |
<?php
namespace Bitrix\Timeman\Repository;
use Bitrix\Timeman\Helper\ConfigurationHelper;
use CIBlockSection;
class DepartmentRepository
{
public function findDepartmentsChain($depId)
{
if (!\Bitrix\Main\Loader::includeModule('iblock'))
{
return [];
};
$parents = [];
$sectionChain = CIBlockSection::ge... |
import 'package:flutter_test/flutter_test.dart';
import 'dart:io';
void main() {
test("NetworkInterface index test", () async {
var list = await NetworkInterface.list(includeLinkLocal: true, includeLoopback: true);
list.forEach((element) {
print(element.name);
print(element.addresses);
pri... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Mon Feb 22 07:04:00 2021
@author: Kim Miikki
"""
import os
from pathlib import Path
from rpi.inputs2 import *
start_mtime=0
first_mtime=0
header="# timecode format v2"
pts_default="extracted"
pts_name=""
times=[]
start_time=0
min_start=0 # unit ... |
namespace AJut.Storage
{
using System;
public class ChildInsertedEventArgs : EventArgs
{
public ChildInsertedEventArgs (int index, IObservableTreeNode node)
{
this.InsertIndex = index;
this.Node = node;
}
public int InsertIndex { get; }
publ... |
is-little-endian
================
Checks if your system is little endian or not. Basically a short cut for:
((new Uint32Array((new Uint8Array([1,2,3,4])).buffer))[0] === 0x04030201)
Usage
=====
Install using npm:
npm install is-little-endian
And then just use it like this:
if(require("is-littl... |
export default {
server_zones: {
status: 'ok',
ready: false
},
upstreams: {
status: 'ok',
ready: false
},
caches: {
status: 'ok',
ready: false
},
tcp_upstreams: {
status: 'ok',
ready: false
},
tcp_zones: {
status: 'ok',
ready: false
},
shared_zones: {
ready: false
},
location_zones: {... |
package typingsSlinky.jqueryFancytree
import org.scalablytyped.runtime.StObject
import scala.scalajs.js
import scala.scalajs.js.`|`
import scala.scalajs.js.annotation.{JSGlobalScope, JSGlobal, JSImport, JSName, JSBracketAccess}
object jqueryFancytreeStrings {
@js.native
sealed trait dimm extends StObject
@sc... |
using System;
using JetBrains.Annotations;
namespace Reusable.Extensions
{
public static class FunctionalExtensions
{
[CanBeNull, ContractAnnotation("obj: null => null; obj: notnull => notnull")]
public static T Next<T>([CanBeNull] this T obj, [NotNull] Action<T> next)
{
if... |
from collections import OrderedDict
import torch
import torch.nn as nn
from matplotlib import pyplot as plt
torch.set_printoptions(edgeitems=2, linewidth=75)
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
t_c = [0.5, 14.0, 15.0, 28.0, 11.0, 8.0, 3.0, -4.0, 6.0, 13.0, 21.0]
t_u = [35.7, 55.9, 5... |
/*
* Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0/
*
* or in the "licen... |
/**
* kisso app 端 api 相关解析类
*/
package com.baomidou.kisso.common.parser.api; |
import {Directive, DirectiveBinding} from '@vue/runtime-core'
import {isEnabled, onFeaturesChanged} from './service'
type FeatureFlippingEl<T = HTMLElement> = T & {
unWatch?: ReturnType<typeof onFeaturesChanged>
}
export const featureFlippingDirective: Directive<FeatureFlippingEl> = {
mounted: (el, binding) =... |
#! /bin/sh
# Copyright (C) 2011-2017 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This program ... |
import * as React from 'react'
import { StyleSheet, css } from 'aphrodite/no-important'
import palette from '../util/palette'
import { GreyColor } from '../util/palette'
interface Props {
id?: string
label?: string | JSX.Element
isOpen?: boolean
parentBgColor?: GreyColor
}
interface State {
isOpen: boolean
... |
#!/bin/bash
# cd into the correct directory
# Update the posts from FurryNetwork
node main.js -s furry_network -c minimal "$1"
# Clear the database of images that didnt download last time
PGPASSWORD=PASSWORD psql \
-U USERNAME \
-h localhost \
-d furry \
-c "update fn.files set status = null where status = '500';... |
<table class="management">
<thead>
</thead>
<tbody>
<?php
$fields = array(
'order_id' => array(
'label' => 'Order Id'
),
'order_source' => array(
'label' => 'Order Source'
),
'gateway' => array(
'label' => 'Transaction Processing Gateway'
),
'total_reven... |
from typing import Union
from aiogram import types, Dispatcher
from aiogram.dispatcher.filters import BoundFilter
from aiogram.dispatcher.handler import CancelHandler
from app.config import SUPERUSER_ID
def _is_superuser(user_id: int) -> bool:
return user_id == SUPERUSER_ID
class SuperUserFilter(BoundFilter):... |
import { useEffect, useState } from 'react';
import {
Box,
Button,
Flex,
Heading,
HStack,
Spinner,
Tab,
Table,
TabList,
TabPanel,
TabPanels,
Tabs,
Tag,
Tbody,
Td,
Text,
Tooltip,
Tr,
useClipboard,
useColorMode,
useColorModeValue,
VStack,
} from '@chakra-ui/react';
import { GoC... |
# BOJ 10971
import sys
si = sys.stdin.readline
"""
필요한 것
visited 배열
최솟값을 저장할 수 있는 배열
자기 자신으로 돌아오는 길이 0이 아니라면, values 배열에 추가하기
"""
def dfs(start, v, value, k):
ret = 10000000
if k == n and graph[v][start] > 0:
return min(ret, value + graph[v][start])
for i in range(n):
if not visited[i] ... |
Stratus Examples
---
This will show you how to create a service quickly with stratus.
In one shell you can start the service
```bash
$ nodemon -e py --exec "python -m examples.service localhost"
```
I use nodemon here so that you can change the methods in the the service
class without manually restarting your client ... |
package com.example.http4s.blaze
import org.http4s._
import org.http4s.dsl._
import org.http4s.server.websocket._
import org.http4s.server.blaze.BlazeBuilder
import org.http4s.util.StreamApp
import org.http4s.websocket.WebsocketBits._
import scala.concurrent.duration._
import fs2.{Pipe, Scheduler, Sink, Strategy, St... |
# iamzero-python-example
An example script to test IAM Zero.
[Get started by reading our documentation here](https://iamzero.dev).
|
// Copyright 2022 PingCAP, Inc. Licensed under Apache-2.0.
// This file contains high level encapsulations over base PD APIs.
package pdclient
import (
"context"
"sort"
"strings"
)
// HLGetStores returns all stores in PD in order.
// You must specify the base URL by calling SetDefaultBaseURL() before using this ... |
package edu.iastate.geol.meteor.swat.bug.DAO;
import edu.iastate.geol.meteor.swat.bug.bean.Bug;
public interface BugDAO {
public void setDataSource();
public boolean insertBug(Bug bug);
}
|
(ns day_21
(:require [utils :refer [open-resource parse-int]]))
(def input-file "day_21.txt")
(def data (-> input-file
open-resource))
(defn prepare-data
[[player-1-raw player-2-raw]]
(let [extract-position (fn [in] (let [[_ position] (re-find #"position: (\d+)" in)]
... |
package lab3.method;
import java.util.Arrays;
import java.util.Random;
/**
* 2. Exercises on Method
*
* <p>2.8. copyOf()
*/
public class ArrayCopier {
public static void main(String[] args) {
Random rd = new Random();
int numElements = rd.nextInt(9) + 2;
int[] array = new int[numElements];
for... |
(ns chem.paths)
(def biocreative-root "/nfsvol/nlsaux16/II_Group_WorkArea/Lan/projects/BioCreative/2013")
(def biocreative-root "/nfsvol/nlsaux16/II_Group_WorkArea/Lan/projects/BioCreative/2013")
(def training-dir (str biocreative-root "/CHEMDNER_TRAIN_V01"))
(def training-text (str training-dir "/chemdner_abs_train... |
import { NextApiRequest, NextApiResponse } from 'next';
import jwt from 'jsonwebtoken';
export default async function loginHandler(
request: NextApiRequest,
response: NextApiResponse,
) {
if (request.method === 'POST') {
const token = jwt.sign(
{ user: request.body.githubUser },
process.env.JWT_... |
<blockquote><p>创新是人类前进的永恒动力<br>创新是实现中华民族伟大复兴的必由之路</p></blockquote>
hi,我是 **超小弟** ,一名秃头运维,现在北京工作。
工作、学习之余,我还是一个健身爱好者,同时也非常喜欢相声。
这是我的利用 [GitHub Pages](https://pages.github.com/) 与 [Jekyll](http://jekyll.com.cn/) 搭建的个人博客。
在这里对平时工作、学习的过程进行总结与记录。
我在GitHub主页👉[GitHub·CXD](https://github.com/chaoxiaodi)
我在知乎主页👉[老骥不伏枥]... |
<?php
/**
* @package framework
* @subpackage tests
*/
class CheckboxFieldTest extends SapphireTest {
protected $usesDatabase = true;
protected $extraDataObjects = array(
'CheckboxFieldTest_Article',
);
public function testFieldValueTrue() {
/* Create the field, and set the value as boolean true */
$fiel... |
import { createServer } from 'net';
import mongoose from 'mongoose';
import { dataBase } from './database';
import { startBroker } from './broker';
import { scheduleJob } from './bree';
async function main(): Promise<void> {
const port = 1883;
const mongo = dataBase();
mongo.on('error', console.error.bind(conso... |
package com.rmakiyama.sealion.ui.addedittask
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.fillMaxHeight
import androidx.compose.foun... |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE DeriveDataTypeable #-}
module Main where
import Edit.Types
import Edit.Parser
import Edit.Printer
import Hackage
import System.Environment
import Data.Typeable
import Data.Data
import Data.Either (rights)
import Control.Exception
import ... |
# Copyright 2018 Square 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 ... |
use crate::connection_options::ConnectionOptions;
pub use postgres::Client;
use postgres::{NoTls, SimpleQueryMessage, SimpleQueryRow, Statement};
use postgres_types::Type;
#[derive(Debug)]
struct ResultColumn {
name: String,
max_size: usize,
type_: Type,
}
impl ResultColumn {
pub fn new() -> ResultCol... |
'use strict';
/*
* o2.js JavaScript Framework (http://o2js.com - info@o2js.com)
*
* This program is distributed under the terms of the MIT license.
* Please see the LICENSE.md file for details.
*/
var validation = require('../../validation/core'),
functional = require('../../functional/core'),
handle = ... |
import Vue from 'vue'
import VueRouter, { RouteConfig, RouterOptions } from 'vue-router'
import {CacheRouteConfig} from '@corets/type'
import dict from '@custom/dict'
import utils from '@corets/utils'
import NProgress from 'nprogress'
import 'nprogress/nprogress.css'
NProgress.configure({ showSpinner: false })
const N... |
package spork.android.test.bindresource.domain;
import android.graphics.drawable.Drawable;
import spork.Spork;
import spork.android.BindResource;
import spork.android.test.R;
public class TestDrawablePojo {
@BindResource(R.drawable.spork_test_drawable)
private Drawable test;
public TestDrawablePojo() {... |
<!-- SPDX-License-Identifier: CC-BY-4.0 -->
<!-- Copyright Contributors to the ODPi Egeria project. -->
# Running Egeria natively
These technologies are what Egeria itself uses to operate. They are included when using the
self-contained environments, but they can also be installed and run natively (directly)
on your ... |
mov eax, 0x100
mov esp, eax
mov ebp, 0xe4ff6060
mov esi, 0x6060e046
mov edi, 0x0f60fc83
pusha
jmp esp |
package com.workday.kotlinredux
import com.workday.redux.Reducer
class MainReducer : Reducer<MainState, CounterAction> {
override fun invoke(currentState: MainState, newAction: CounterAction): MainState {
return currentState.copy(count = countReducer(currentState, newAction))
}
private fun countR... |
#!/bin/sh
#parameters: version
$SZG_ROOT/make-clean.sh
ssh-agent $SZG_ROOT/szg-release/make-release-update.sh
$SZG_ROOT/szg-release/make-release-build.sh
ssh-agent $SZG_ROOT/szg-release/make-release-source.sh $1
$SZG_ROOT/szg-release/make-release.sh linux $1
|
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class PartyMemberUI : MonoBehaviour
{
[SerializeField] Text nameText;
[SerializeField] Text levelText;
[SerializeField] HPBar hpBar;
[SerializeField] Text messageText;
Pokemon _pokemon;
... |
function Get-Workbook {
<#
.SYNOPSIS
Return a Workbook from an ExcelPackage
.DESCRIPTION
Return a Workbook from an ExcelPackage
.PARAMETER Excel
ExcelPackage to extract workbook from
.EXAMPLE
$Excel = New-Excel -Path "C:\Excel.xlsx"
$WorkBook = Get-Wor... |
let theWheel = new Winwheel({
'canvasId': 'roleta',
'numSegments': 8,
'fillStyle': '#3f3f3f',
'textAlignment': 'center',
'textMargin': 20,
'lineWidth': 0.1,
'outerRadius': 200,
'segments': [{
'fillStyle': 'red',
'text': ' Desconto 10%'
}, {
'fillSt... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.