text stringlengths 27 775k |
|---|
/*!
Types for parsing/deserializing unit values.
```
let time = Time::from_str("10 min").unwrap();
assert_eq!(time, Time::new(10, TimePrefix::Min));
assert_eq!(
time.convert(TimePrefix::Sec).unwrap(),
Time::from_str("600 sec").unwrap()
);
```
*/
use std::convert::TryInto;
use std::fmt::{self, Debug, Display}... |
import { NetworkType, BlockInfo } from '@bitaccess/coinlib-common'
import { Logger, assertType, DelegateLogger } from '@faast/ts-common'
import * as Stellar from 'stellar-sdk'
import { BaseStellarConfig, StellarRawLedger, StellarRawTransaction, StellarLedger } from './types'
import { DEFAULT_NETWORK, PACKAGE_NAME } f... |
"use strict";
module.exports = {
getAllAsPvjson: function(gpmlElement, callback) {
var publicationXrefs, jsonPublicationXref, tagName = gpmlElement[0][0].tagName;
var biopaxRefs = gpmlElement.selectAll(tagName + ' > BiopaxRef');
if (biopaxRefs[0].length > 0) {
publicationXrefs = [];
biopaxRef... |
package backend
import (
"context"
"testing"
"github.com/sourcegraph/sourcegraph/internal/actor"
"github.com/sourcegraph/sourcegraph/internal/database"
"github.com/sourcegraph/sourcegraph/internal/types"
)
func TestCheckExternalServiceAccess(t *testing.T) {
ctx := testContext()
nonAuthContext := actor.WithAct... |
({
init: function(cmp, event, helper) {
var key = $A.lockerService.getKeyForNamespace("apiviewer");
var secureWindow = $A.lockerService.getEnv(key);
var report = helper.utils.tester.testObject(window, secureWindow);
helper.utils.tester.sortReport(report);
cmp.set("v.report", report);
window.... |
Title: Pushl
Redirect-To: https://github.com/PlaidWeb/Pushl/
Entry-Type: link
Date: 2020-07-23 15:02:22-07:00
Entry-ID: 1
UUID: 31ab8da3-49a4-5766-bb09-ca2e60ab9c5f
Tool for automatically sending push updates (Webmention, WebSub)
|
/*
* 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 ... |
# smrtlink-system-stats
SMRT Link System Stats (Unsupported)
Install Package using Packrat
```R
packrat::install()
```
|
import math
from typing import Tuple
import numpy as np
import scipy.special
from numpy.polynomial import hermite
from spexxy.data.spectrum import Spectrum
class LOSVD:
"""Simple class for handling LOSVD convolution of a spectrum."""
def __init__(self, params: Tuple):
"""Inits new LOSVD.
Ar... |
import { Dispatch, SetStateAction } from "react"
import { useLocation, useNavigate, useParams } from "react-router"
import AssetTypeEnum from "../models/assets/AssetTypeEnum"
import { IAsset } from "../models/assets/IAsset"
import { Project } from "../models/Project"
import { EMPTY_GUID } from "../Utils/constants"
impo... |
#!/usr/bin/env perl
use strict;
use warnings;
use List::MoreUtils qw(uniq);
my %wanted = ();
my @files = @ARGV;
my $site_list = shift @files;
my $data_ref;
open my $SITES, '<', $site_list or die "Can't open wanted site list $site_list: $!";
while (my $input = <$SITES>) {
chomp $input;
if ( $input =~ /\A ... |
/**
* Copyright Byte Technology 2020. All rights reserved.
*/
import * as jf from 'joiful';
export class EditTestEntityParams {
@(jf.string().required())
id!: string;
@(jf.string().required())
aKey!: string;
@(jf.string().required())
aValue!: string;
}
export class EditTestEntityResponse {
@(jf.bool... |
const events = require('events');
const eventEmitter = new events.EventEmitter();
eventEmitter.on('hello', () => {
console.log(`Hi, hello events`);
});
eventEmitter.emit('hello');
|
#pragma strict
function PlayBlockParticleEffect(atPosition : Vector3) {
GetComponent.<ParticleSystem>().Stop();
transform.position = atPosition + Vector3.up*2;
GetComponent.<ParticleSystem>().Play();
} |
/**
* Converts a value to string and pads it
*
* @param input string to pad
* @param length length of the padded string
* @param padString what to pad with
*/
export default function pad(
input: any,
length: number,
padString: string
): string {
const val = input.toString()
return val.padStart(length,... |
/*
Copyright (c) 2004-2011, The Dojo Foundation All Rights Reserved.
Available via Academic Free License >= 2.1 OR the modified BSD license.
see: http://dojotoolkit.org/license for details
*/
//>>built
define("dojo/_base/connect",["./kernel","../on","../topic","../aspect","./event","../mouse","./sniff","./lang","..... |
package edu.gemini.itc.web.json
import argonaut._, Argonaut._
import _root_.squants.motion.Velocity
import _root_.squants.radio.{ Irradiance, SpectralIrradiance }
trait SquantsCodec {
import edu.gemini.json.keyed._
implicit val VelocityCodec: CodecJson[Velocity] =
keyedCodec[Velocity, String](_.toString, (s:... |
package demo
fun main(args: Array<String>) {
var nullVal: String? = null
fun returnNull(): String? {
return null
}
val nullVal2 = returnNull()
if (nullVal2 != null) {
println("nullVal2.length")
}
var nullVal3 = nullVal2!!.length
var nullVal4: String = returnNull() ?: "... |
---
layout: post
title: "[Effective Python] WAY 32. 지연 속성에는 __getattr__, __getattribute__, setattr__을 사용하자"
date: 2018-10-17 13:08:31
tagline: "이펙티브 파이썬 코딩의 기술 책 스터디 정리"
categories:
- Development Study
tags:
- python
image: /thumbnail-mobile.png
author: "Hyungcheol Noh"
permalink: /2018-10-17-effective-python-way32
---... |
#include "mover.hpp"
#include "seeplusia.hpp"
const int xJump=200, yJump=160;
SDL_Rect bg={0,0,800,600};
SDL_Rect bgSrc={21,367,757,586};
SDL_Rect warriorSrc={340, 120, 240, 220};
SDL_Rect warriorMover={430, 150, 100, 100};
//Screen dimension constants
const int SCREEN_WIDTH = 800;
const int SCREEN_HEIGHT = 600;
vo... |
package com.axmor.ipc_sample.tracking.ipc
import android.os.*
import com.axmor.ipc.IPCObservableClientProxy
import com.axmor.ipc.IPCObservableWrapper
import com.axmor.ipc_sample.tracking.TrackingService
/**
* Created by akolodyazhnyy on 11/10/2017.
*/
abstract class TrackingServiceStub
/**
* @param looper looper ... |
from typing import List, Optional, Tuple
from bs4 import BeautifulSoup
from dash import ClientsideFunction, Dash, Input, Output, State, callback, html
from dash.development.base_component import Component
from envinorma.io.parse_html import extract_text_elements
from envinorma.models.text_elements import Title
from b... |
<?php
namespace Tests\Unit\TransactionFactories;
use DarkGhostHunter\Fluid\Fluid;
use DarkGhostHunter\TransbankApi\Adapters\OnepayAdapter;
use DarkGhostHunter\TransbankApi\Onepay;
use DarkGhostHunter\TransbankApi\Responses\OnepayResponse;
use DarkGhostHunter\TransbankApi\Transactions\OnepayNullifyTransaction;
use Dar... |
#include <bits/stdc++.h>
using namespace std;
vector<int> bellmanFord(int n,int source, vector<pair<int, int> > G[]) {
int INF = (int) 1e9;
vector<int> D(n, INF);
D[source]=0;
for(int i=0; i<n-1; i++) {
for(int u=0; u<n; u++) {
for(auto edge: G[u]) {
int v = ed... |
package me.alex.pet.apps.zhishi.presentation.section
import android.annotation.SuppressLint
import android.view.LayoutInflater
import android.view.ViewGroup
import androidx.recyclerview.widget.RecyclerView
import me.alex.pet.apps.zhishi.R
import me.alex.pet.apps.zhishi.databinding.ItemGenericIndentedSubtitleBinding
im... |
package com.funi.muyq.demo.study.springsource.beanwiring;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.ToString;
import java.util.List;
/**
* @Author: [muyuanqiang]
* @CreateDate: [2018/6/11 10:07]
*/
@Data
@ToString(exclude = "opus")
@AllArgsConstructor()
public class Composer {
privat... |
---
layout: page
title: Webtools
permalink: /webtools/
---
< Area Under Construction >
<!--
## Network Simulation
## Network Administration
-->
<!-- \[Redacted\] Save File Deobfuscator -->
<!-- Put tarsum in here via web assembly ?--> |
import { nspawn as spawn, getCLIPath } from '..';
import { EOL } from 'os';
const defaultSettings = {
name: EOL,
envName: 'integtest',
editor: EOL,
appType: EOL,
framework: EOL,
srcDir: EOL,
distDir: EOL,
buildCmd: EOL,
startCmd: EOL,
useProfile: EOL,
profileName: EOL,
appId: '',
};
export fun... |
---
sidebarDepth: 2
---
# 使用
> 直接引入组件及样式即可
```
<template>
<div id="app">
<GButton></Gbutton>
</div>
</template>
<script>
import {GButton} from 'zhq-vue-wheel'
import zhq-vue-wheel/dist/myWheel.css
export default{
components:{GButton}
name:'app'
}
</script>
``` |
package astminer.parse.spoon
import astminer.common.model.Parser
import astminer.parse.ParsingException
import mu.KotlinLogging
import org.apache.commons.io.FileUtils.copyInputStreamToFile
import spoon.Launcher
import spoon.SpoonException
import java.io.File
import java.io.InputStream
import kotlin.io.path.createTempD... |
; RUN: llc -O0 -mtriple=hexagon-- -relocation-model=static < %s | FileCheck %s
@dst_le = dso_local thread_local global i32 0, align 4
@src_le = dso_local thread_local global i32 0, align 4
; CHECK-LABEL: test_local_exec
; CHECK-DAG: ##src_le@TPREL
; CHECK-DAG: ##dst_le@TPREL
define dso_local i32 @test_local_exec(... |
package agora_rtc_sdk.raw
import scala.scalajs.js
/**
* @see https://docs.agora.io/en/Voice/API%20Reference/web/v2.6.1/interfaces/agorartc.networkstats.html
*/
@native
trait NetworkStats extends js.Object {
val NetworkType: compat.NetworkType
}
|
use objc::{
msg_send,
runtime::{Object, Sel, NO, YES},
sel, sel_impl,
};
use objc_foundation::{INSArray, INSString, NSArray, NSObject, NSString};
use super::{
constants::POWERED_ON_IVAR,
ffi::{CBATTError, CBManagerState},
into_bool::IntoBool,
};
// TODO: Implement event stream for all below ca... |
#include <filemanager.h>
std::vector<std::string> fm::get_ram(const std::string& filename) {
json data = json::parse(read_from_file(filename));
std::vector<std::string> ram;
for (size_t i = 0; i < 256; ++i) {
ram.push_back(data[i].get<std::string>());
}
return ram;
}
void fm::save_ram(cons... |
<?php
/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| ... |
---
permalink: /1.33/logging/
---
# logging
* [v1beta1](v1beta1/index.md) |
using System;
using System.Collections.Generic;
namespace FluentTc.Locators
{
public interface IQueueHavingBuilder
{
IQueueHavingBuilder BuildConfiguration(Action<IBuildConfigurationHavingBuilder> havingBuildConfig);
IQueueHavingBuilder Project(Action<IBuildProjectHavingBuilder> projectHavingBu... |
package me.coley.recaf.parse.bytecode.ast;
import java.util.ArrayList;
import java.util.List;
/**
* Common base for definition AST objects.
*
* @author Matt
*/
public abstract class DefinitionAST extends AST {
protected final List<DefinitionModifierAST> modifiers = new ArrayList<>();
protected final NameAST nam... |
/*
* @file
* @copyright defined in aergo/LICENSE.txt
*/
package p2p
import (
"github.com/aergoio/aergo-lib/log"
"github.com/aergoio/aergo/config"
"github.com/aergoio/aergo/message"
"github.com/aergoio/aergo/p2p/p2pkey"
"github.com/aergoio/aergo/pkg/component"
"github.com/aergoio/aergo/types"
"testing"
)
c... |
import { createStore, applyMiddleware, compose, combineReducers } from "redux";
import { persistStore, persistReducer } from 'redux-persist'
import storage from 'redux-persist/lib/storage' // defaults to localStorage for web
import prataComunitarios from "../reducers/prataComunitariosReducer";
import comunitarios fro... |
package config
import (
"os"
"runtime"
)
func Jenkins() bool {
return os.Getenv("JENKINS_URL") != ""
}
func SSHAgentSocket() string {
return os.Getenv("SSH_AUTH_SOCK")
}
func Linux() bool {
return runtime.GOOS == "linux"
}
func Home() string {
return os.Getenv("HOME")
}
func Development() bool {
return Ver... |
#!/bin/bash
eval "mkdir $1"
eval "cd $1"
i=0
for i in 0 1 2 3 4
do
eval "touch file$i.txt"
eval "mkdir file$i"
eval "ln -s file$i.txt file$i"
done
|
---
Title: Verordnung über die Gewährung von Steuerbefreiungen für die European Transsonic
Windtunnel GmbH
jurabk: ETWStBefrV
layout: default
origslug: etwstbefrv
slug: etwstbefrv
---
# Verordnung über die Gewährung von Steuerbefreiungen für die European Transsonic Windtunnel GmbH (ETWStBefrV)
Ausfertigungsdatum
:... |
<?php
namespace App\SocialLogin;
use App\SocialKey;
use Illuminate\Support\Facades\DB;
class Facebook implements Oauth
{
private $channel_id;
private $secret;
private $providerName;
private $authorize_base_url = 'https://www.facebook.com/v8.0/dialog/oauth';
private $get_token_url = 'https://grap... |
struct Solution;
use std::collections::VecDeque;
use std::fmt;
enum Match {
Team(i32),
Pair(Box<Match>, Box<Match>),
}
impl Match {
fn new(n: i32) -> Self {
let mut matches: VecDeque<Match> = VecDeque::new();
for i in 1..=n {
matches.push_back(Match::team(i));
}
... |
<?php
namespace App\CustomClasses;
class Postcard
{
public static function resolveFacade( $name )
{
return app()[ $name ];
}
public static function __callStatic($method, $attributes)
{
return ( self::resolveFacade( 'PostcardSendingService' ) )
->$method( ...$attributes );
}
} |
import 'widgets.dart';
void testFunc() {
// case-1: 禁止调用原生API
showDatePicker();
// ignore: avoid_using_show_date_picker
showDatePicker();
} |
package net.silentchaos512.tokenenchanter.setup;
import net.minecraft.block.Block;
import net.minecraft.item.Item;
import net.minecraft.tags.BlockTags;
import net.minecraft.tags.ITag;
import net.minecraft.tags.ItemTags;
import net.minecraft.util.ResourceLocation;
import net.silentchaos512.tokenenchanter.TokenMod;
pub... |
<h1 id="cair_maze">cair_maze</h1>
cair_maze
<h1 id="cair_maze.maze">cair_maze.maze</h1>
<h2 id="cair_maze.maze.ActionSpace">ActionSpace</h2>
```python
ActionSpace(self, seed)
```
ActionSpace Class
__Arguments__
- __seed (long)__: The seed used in the random action sampler
<h2 id="cair_maze.maze.Maze">Maze</h2... |
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>To Get Here Hotel</title>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script type="text/javascript" src="dist/pickmeup.min.js"></script>
<script type="text/javascript" src... |
# 2.3 통계 기반 기법
# 통계 기반 기법에서는 말뭉치(corpus)를 사용한다
# 말뭉치란 조건하에 수집괸 텍스트 데이터를 의미한다
# 통계 기반 기법의 목표는 말뭉치에서 자동으로, 그리고 효율적으로 그 핵심을 추출하는 것이다
# 2.3.1 파이썬으로 말뭉치 처리하기
# 전처리(preprocessing): 텍스트 데이터를 단어로 분할하고 그 분할된 단어들을 단어 ID 목록으로 변환하는 것
text = 'You say goodbye and I say hello.'
text = text.lower() # lower(): ... |
package org.lpw.clivia.group;
import com.alibaba.fastjson.JSONObject;
public interface GroupService {
String VALIDATOR_EXISTS = GroupModel.NAME + ".exists";
JSONObject get(String id);
JSONObject friends();
JSONObject find(String idUidCode);
GroupModel friend(String[] users);
void cleanFri... |
import { mocked } from 'ts-jest/utils';
import createMockInstance from 'jest-create-mock-instance';
import { ClientReadableStream } from '@grpc/grpc-js/build/src/call';
import * as Services from '../grpc/keyboard_grpc_pb';
import * as Messages from '../grpc/keyboard_pb';
import { ConnInfo } from '../grpc/broker_pb';
im... |
<?php
/**
* test case
*/
require_once 'Storage/FileTest.php';
require_once 'Storage/ApcTest.php';
require_once 'Storage/MemcacheTest.php';
require_once 'Storage/MemoryTest.php';
/**
* Static test suite.
*/
class WURFL_StorageTestSuite extends PHPUnit_Framework_TestSuite {
/**
* Constructs the test suite handle... |
from .callback import Callback
from .callback_debug_processes import CallbackDebugProcesses
from .callback_epoch_summary import CallbackEpochSummary
from .callback_explain_decision import CallbackExplainDecision, ExplainableAlgorithm
from .callback_export_classification_report import CallbackExportClassificationReport
... |
const initialState = {
viewStack: [{ name: 'MainView', props: {} }],
};
const viewReducer = (state = initialState, action) => {
switch (action.type) {
case 'PUSH_VIEW':
return {
...state,
viewStack: [...state.viewStack, action.view],
}
case 'POP_VIEW':
... |
# frozen_string_literal: true
class PerformancesController < ApplicationController
resource :performance
def show
respond_with @performance
end
end
|
import { WorkspaceExt } from '../workspace';
import { Environments } from '../environments';
import { Workspace } from '../workspace';
import { CLIExtension } from '../cli';
import { CompileCmd } from './compiler.cmd';
import { WorkspaceCompiler } from './workspace-compiler';
import { CompilerTask } from './compiler.ta... |
/**
* jQuery.spinners.js (UTF-8)
* Copyright (c) 2017 Sami Holck <sami.holck@gmail.com>.
*
* Requires <a href="http://jquery.com/">jQuery (1.8.2)+</a>
*
*/
(function ($) {
'use strict';
/**
* Sets the loader element (an animated gif image) to the given {@link jQuery.fn}.
*
* @author Sami Holck <sa... |
using System;
using System.Collections.Generic;
using System.Diagnostics.Contracts;
namespace Frontenac.Blueprints.Util.Wrappers.Partition
{
public class PartitionIndexableGraph : PartitionGraph, IIndexableGraph
{
protected IIndexableGraph BaseIndexableGraph;
public PartitionIndexableGraph(II... |
using EBookLibrary.Models;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
namespace EBookLibrary.DataAccess.EntityConfigurations
{
public class EntityConfigurationForRatings : IEntityTypeConfiguration<Rating>
{
public void Configure(EntityTypeBuilder<Ratin... |
export declare const LOGGER_KEY = "logger";
export declare const OPTIONS_PROVIDER_TOKEN = "pino-options";
|
import React from 'react';
import { Formik } from 'formik';
import { render } from '@testing-library/react';
import { noop } from 'lodash';
import { CheckProps, Check } from './Check';
describe('Check component tests', () => {
const renderCheck = (props: CheckProps, initialValues: any = { test: '' }) => (
<Formi... |
package com.dbrsn.sjsrn.component
import com.dbrsn.sjsrn.{ ReactEvent, XYValueLiteral }
import com.github.ghik.silencer.silent
import japgolly.scalajs.react.component.Js.{ RawMounted, UnmountedWithRawType }
import japgolly.scalajs.react.raw.React
import japgolly.scalajs.react.{ Children, CtorType, JsComponent }
impor... |
package org.pmvp
import kotlinx.coroutines.flow.Flow
interface SingularStorage<T>: SingularImmutable<T>, SingularMutable<T>
interface SingularImmutable<T> {
fun get(): Flow<T?>
}
interface SingularMutable<T> {
fun update(model: T?): Flow<T?>
}
|
module GamesHelper
def game_title(id)
a = Game.find_by_id(id)
a.name
end
end
|
package gov.nasa.jpl.aerie.contrib.serialization.mappers;
import gov.nasa.jpl.aerie.merlin.framework.Result;
import gov.nasa.jpl.aerie.merlin.framework.ValueMapper;
import gov.nasa.jpl.aerie.merlin.protocol.types.SerializedValue;
import gov.nasa.jpl.aerie.merlin.protocol.types.ValueSchema;
import java.util.function.F... |
-- ingestion
CREATE TABLE fieldkit.ingestion (
id serial PRIMARY KEY,
time timestamp NOT NULL,
upload_id varchar(64) NOT NULL,
user_id integer NOT NULL,
device_id bytea NOT NULL,
generation bytea NOT NULL,
type varchar NOT NULL,
size integer NOT NULL,
url varchar NOT NULL,
blocks int8range NOT NULL... |
import {copy, remove} from '@drizm/utils';
describe('Objects', () => {
let someArr: { name: string }[];
let someObj: {
id: number;
user: {
username: string;
}
};
let someOtherObj: {
username: string;
};
beforeEach(() => {
someArr = [
{name: 'hkjhjkhjk'},
{name: 'jhjh'... |
use crate::constants::*;
use crate::crypto::ed25519;
use crate::errors::*;
use crate::helpers::*;
use crate::keynum::*;
use crate::public_key::*;
use crate::secret_key::*;
use getrandom::getrandom;
use sha3::Digest;
use std::io::{self, Write};
use std::u64;
extern crate bs58;
extern crate data_encoding;
use data_encodi... |
#!/bin/sh
# Set publisher executable and ID:
export PUB_EXEC=dds2466_pub
export PUB_ID=$1
export ANOTHER_PUB_ID=$2
# Path to the publisher executable:
export PATH=`dirname $PUB_EXEC`:$PATH
# Run subscriber:
$PUB_EXEC -ORBListenEndpoints iiop://$HOSTNAME:$PUB_PORT -ORBInitRef $PUB_EXEC$ANOTHER_PUB_ID=corbaloc:iiop:$A... |
# MaxMtrParser
Max/MSP MTR (Multi-Track Recorder) Protocol Parser for Arduino
## Usage
See `parser` example for the details.
```C++
// include file system library before MTR Parser
#include <SD.h>
#define fs SD
// #define MAXMTRPARSER_DEBUGLOG_ENABLE
#include <MaxMtrParser.h>
File file;
String path = "/single.txt... |
import React from 'react'
import classNames from 'classnames'
import LockIcon from 'mdi-react/LockOutlineIcon'
import styles from './LockedChart.module.scss'
export const LockedChart: React.FunctionComponent<React.PropsWithChildren<{ className?: string }>> = ({
className,
}) => (
<section className={classNam... |
// -*- mode:c++;tab-width:2;indent-tabs-mode:t;show-trailing-whitespace:t;rm-trailing-spaces:t -*-
// vi: set ts=2 noet:
//
// Copyright (c) 2016 Sergey Lyskov <sergey.lyskov@jhu.edu>
//
// All rights reserved. Use of this source code is governed by a
// MIT license that can be found in the LICENSE file.
/// @file b... |
// DigitalRune Engine - Copyright (C) DigitalRune GmbH
// This file is subject to the terms and conditions defined in
// file 'LICENSE.TXT', which is part of this source code package.
using System;
using System.Diagnostics;
using Microsoft.Xna.Framework.Graphics;
namespace DigitalRune.Graphics.Effects
{
/// <summ... |
/* Copyright 2018 Mo McRoberts.
*
* 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... |
test_name "Install Puppet from PuppetLabs repositories"
script = %q"#!/bin/bash
# This script is intended to be used with the install action
# of puppet-cloudpack
set -u
set -e
function fedora_repo() {
cat >/etc/yum.repos.d/puppet.repo <<'EOFYUMREPO'
[puppetlabs]
name = Puppetlabs
baseurl = http://yum.puppetlabs.c... |
---
title: 通过设定解析线路让百度收录Github Pages
tags: Git Github HTML HTTP 网络 搜索引擎
---
利用Github Pages创建博客的国内作者一定有这样的麻烦:
Github对Baidu Spider的用户代理都会返回403状态码,因而百度无法收录博客内容。
为解决此问题,小编在2016年01月21日在Gitcafe Pages(今Coding.net)创建镜像,
并设置域名解析百度线路来的harttle.land到该镜像。
如今百度已经可以正常收录harttle.land的文章了,撰文在此希望能帮到别人。
* *一个域名*:百度收录、Google收录、用户访问的域名是相同... |
<?php
namespace Adtechpotok\Bundle\EnqueueMessengerAdapterBundle\Exception;
use Exception;
class MessageLocked extends Exception
{
/**
* @var string
*/
protected $key = '';
/**
* @param string $key
*
* @return self
*/
public function setRedisKey(string $key): self
{... |
CREATE TABLE `express-crud`.`users` (
`id` BIGINT NOT NULL AUTO_INCREMENT,
`name` VARCHAR(255) NOT NULL,
`email` VARCHAR(255) NOT NULL,
`password` VARCHAR(255) NOT NULL,
`created_at` TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP,
`updated_at` TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY ... |
package constant_test
import (
"basics/constant"
"fmt"
)
func ExampleStuck() {
fmt.Println(constant.Stuck)
// Output:
// This variable can never be reassigned.
}
func ExampleHeartEyes() {
// We can convert constant just like variables
fmt.Println(string(constant.HeartEyes))
// Output:
// 😍
}
func ExampleA... |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DeconTools.Backend.Runs;
using NUnit.Framework;
namespace DeconTools.Testing.ProblemCases
{
public class OMCS_0335_MaxisFiletypeProblem
{
[Test]
public void tryCreateRun()
{
... |
package helper
import reactivemongo.api.MongoConnection
import scala.concurrent.duration._
import scala.concurrent.Await
import scala.concurrent.ExecutionContext.Implicits.global
trait TestDBProvider {
val database: String = "test-stock-data-management"
val servers: Seq[String] = List("localhost:27017")
val dri... |
require File.dirname(__FILE__) + '/../spec_helper'
require 'mspec/expectations/expectations'
require 'mspec/matchers/base'
require 'time'
describe PositiveOperatorMatcher, "== operator" do
it "raises an ExpectationNotMetError when expected == actual returns false" do
lambda {
PositiveOperatorMatcher.new(1)... |
from itty import *
@get('/get/(?P<name>\w+)')
def test_get(request, name=', world'):
return 'Hello %s!' % name
@post('/post')
def test_post(request):
return "'foo' is: %s" % request.POST.get('foo', 'not specified')
@put('/put')
def test_put(request):
return "'foo' is: %s" % request.PUT.get('foo', 'not sp... |
/*
* Copyright 2002-2019 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by a... |
using AutoMapper;
using System;
using VeracodeMessageQueue.Models;
using VeracodeService.Models;
namespace VeraData.Profiles
{
public class FlawProfile : Profile
{
public FlawProfile()
{
CreateMap<FlawType, Flaw>()
.ForMember(dest => dest.Id, opt => opt.MapFrom(src => P... |
package org.wikiedufoundation.wikiedudashboard.ui.courselist.provider
import org.wikiedufoundation.wikiedudashboard.util.PresenterCallback
interface CourseListProvider {
fun requestCourseList(cookies: String, presenterCallback: PresenterCallback<*>)
}
|
# XML Query Test Driver
Driver for official XML Query test suite (https://dev.w3.org/2011/QT3-test-suite/). Includes full catalog.
## Usage
Include this package locally to the implementation project.
A simple usage example:
import 'package:xml_query_test_driver/xml_query_test_driver.dart';
main() async {
... |
# Tinier • [TodoMVC](http://todomvc.com)
> Tinier is a library for building tiny reactive components in
> JavaScript. Designed with D3.js in mind.
## TODO
https://github.com/tastejs/todomvc/blob/master/app-spec.md
- Add routing
- Add local storage
## Resources
- [Website](https://github.com/zakandrewking/tinier)
... |
package com.perficient.aem.datalayer.core.filters;
import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.Matchers.any;
import static org.mockito.Matchers.eq;
import static org.mockito.Mockito.atLeastOnce;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.never;
imp... |
# The TiddlyWiki Loader
This is a small collection of things to help with public TiddlyWikis. The idea
is to prevent so much re-downloading of the whole wiki and to show progress to
the reader---rather than just having the browser sit there while it loads.
## Using the Loader (index.html)
So the first piece is the i... |
using System;
using System.Collections.Generic;
using UdpNetworking.Packet.HighLevel;
using UdpNetworking.Packet.LowLevel;
namespace UdpNetworking.Packet
{
public class PacketFactory : IPacketFactory
{
private readonly Dictionary<byte, Func<IPacket>> _packets = new Dictionary<byte, Func<IPacket>>();
... |
package gonbt
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestJson(t *testing.T) {
type jsonTestCase struct {
name string
nbt Tag
want map[string]*string
}
cases := []jsonTestCase{}
for _, v := range NBTValidTestCases {
c := jsonTestCase{
name: v.name,
nbt: v.nbt,
want: ... |
select
resource_type resource_type_uuid,
name,
actions,
details,
created,
updated
from recommendation_resource_types
where deleted = false |
#include "CommandLineApplication.h"
#include <Logger/Logger.h>
#include <Engine/Engine.h>
#include <FileSystem/FileSystem.h>
#include <FileSystem/FileList.h>
#include <sqlite_modern_cpp.h>
static bool DoSelftest(DAVA::String pathToCurrentBinary);
CommandLineApplication::CommandLineApplication(DAVA::String name)
... |
class Cls {
public static void main(String[] args) {
try {
System.out.println("Hello");
} catch (IllegalArgumentException e) {
System.out.println("Woopsie!");
System.out.println("My bad!");
} finally {
System.out.println("Bye bye!");
}
... |
// Copyright (c) FIRST and other WPILib contributors.
// Open Source Software; you can modify and/or share it under the terms of
// the WPILib BSD license file in the root directory of this project.
package frc.robot;
import com.ctre.phoenix.motorcontrol.ControlMode;
import com.ctre.phoenix.motorcontrol.can.WPI_Talon... |
use crate::{MissingNulError, UCStr, UChar, UStr, UString, WideChar};
use alloc::borrow::{Cow, ToOwned};
use alloc::boxed::Box;
use alloc::vec::Vec;
use core::borrow::Borrow;
use core::ops::{Deref, Index, RangeFull};
use core::{mem, ptr, slice};
/// An owned, mutable C-style "wide" string for FFI that is nul-aware and ... |
using System;
using Grasshopper.Kernel;
namespace RhinoInside.Revit.GH.Parameters
{
public class ElementFilter : Param<Types.ElementFilter>
{
public override Guid ComponentGuid => new Guid("BFCFC49C-747E-40D9-AAEE-93CE06EAAF2B");
public override GH_Exposure Exposure => GH_Exposure.hidden;
protected ove... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.