text
stringlengths
27
775k
var util = require('util'); var Stream = require('stream'); // Use node 0.10's setImmediate for asynchronous operations, otherwise for // older versions of node use process.nextTick. var async = (typeof setImmediate === 'function') ? setImmediate : process.nextTick; module.exports = BufferedStream; /** * A readable...
## Implementation `live edit`的时候. 貌似最好实现一套`raw -> processed markdown html`的机制, 当然最后导出的时候还是从store中导出raw的内容. 为什么要自己实现`raw -> processed markdown html`呢~? 这样可以更好的保持对`.tc-line`中内容展现的控制. 控制好之后, dom结构应该是这样的: <div class="tc-line heading-2">some header</div> <div class="tc-line p">some paragrapha</div> <div cla...
package com.setapi.sparkDemo.spark_sql_demo import com.mongodb.spark.MongoSpark import com.stratio.datasource.mongodb._ import com.stratio.datasource.mongodb.config.MongodbConfig._ import com.stratio.datasource.mongodb.config.MongodbConfigBuilder import org.apache.log4j.{Level, Logger} import org.apache.spark.sql.Spar...
<?php namespace Gf\Auth; //use Crossjoin\Browscap\Browscap; use Fuel\Core\Session; use Gf\Exception\AppException; use Gf\Platform; use Gf\Utils; /** * Makes a record of the current users login! * When using multiple logins and cookie based sessions, we lose control of the users login. because the session is * sto...
#!/usr/bin/env bash conda env update -n py36zl -f environment.yml conda info --envs
{-# LANGUAGE OverloadedStrings, BangPatterns #-} module Network.Wai.Handler.Warp.PackInt where import Foreign.Ptr (Ptr, plusPtr) import Foreign.Storable (poke) import qualified Network.HTTP.Types as H import qualified Data.ByteString as B (cons, empty, unfoldr, reverse) import Network.Wai.Handler.Warp.Imports --...
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 OR MIT mod harness; mod vtable; pub use harness::*; pub use vtable::*; use serde::{Deserialize, Serialize}; /// The structure of `.kani-metadata.json` files, which are emitted for each crate #[derive(Seriali...
package org.neutrinocms.core.controller; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.neutrinocms.core.exception.ControllerException; import org.neutrinocms.core.exception.ResourceNotFoundException; import org.neutrinocms.core.exception.UtilException; import ...
unit Prototype.Cloneable; interface uses System.Classes; type TCloneable = class strict private FData: TStream; FIsBar: boolean; FName: string; public constructor Create; constructor CreateFrom(baseObj: TCloneable); destructor Destroy; override; procedure Assign(baseObj: TCloneabl...
# encoding: utf-8 require 'test_helper' class TokenManagerTest < Minitest::Test def test_eof token = Koara::TokenManager.new(Koara::CharStream.new(Koara::Io::StringReader.new('')))::get_next_token assert_equal(Koara::TokenManager::EOF, token.kind) end def test_asterisk token = Koara::TokenManager.new...
<?php require('toc.php'); $pdf = new PDF_TOC(); $pdf->SetFont('Times', '', 12); $pdf->AddPage(); $pdf->Cell(0, 5, 'Cover', 0, 1, 'C'); $pdf->AddPage(); $pdf->startPageNums(); $pdf->Cell(0, 5, 'TOC1', 0, 1, 'L'); $pdf->TOC_Entry('TOC1', 0); $pdf->Cell(0, 5, 'TOC1.1', 0, 1, 'L'); $pdf->TOC_Entry('TOC1.1', ...
default['cockpit_install']['action'] = 'install' default['cockpit_install']['machines'] = {} default['cockpit_install']['auto_discover'] = false default['cockpit_install']['auto_discover_filter'] = nil
require 'test_helper' require 'rake' class DSLTest < Minitest::Test include RakeRemoteFile::DSL def setup ENV['AWS_REGION'] = 'us-east-1' ENV['AWS_ACCESS_KEY_ID'] = 'key' ENV['AWS_SECRET_ACCESS_KEY'] = 'secret' end def test_remote_file_task url = "https://s3.amazonaws.com/my_bucket/a/file/pat...
/* * 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 ...
class ProviderModel { const ProviderModel({this.copyable = false}); final bool copyable; } class ProviderModelProp { const ProviderModelProp({this.nullable = true}); final bool nullable; }
package net.gtaun.shoebill.common import net.gtaun.shoebill.Shoebill import net.gtaun.util.event.EventManager /** * Created by marvin on 14.11.16 in project shoebill-common. * Copyright (c) 2016 Marvin Haschker. All rights reserved. */ @AllOpen abstract class LifecycleObject @JvmOverloads constructor(eventManager...
--- id: 382ee147 title: Planned Maintenance description: We detected a networking problem that caused temporary issues for our API and origin servers. date: 2020-03-15T21:33:18.362Z modified: 2020-03-15T23:33:18.362Z severity: under-maintenance resolved: true affectedsystems: - api --- We detected a networking probl...
<?php namespace AppBundle\Entity; use Doctrine\ORM\Mapping as ORM; use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity; /** * @ORM\Entity * @ORM\Table( * name="user", * uniqueConstraints={ * @ORM\UniqueConstraint(columns={"name"}), * @ORM\UniqueConstraint(columns={"email"}) ...
package org.monarchinitiative.hpo_case_annotator.core.publication; public enum PublicationDataFormat { EUTILS, PUBMED_SUMMARY }
import React from 'react'; // @ts-ignore: library file import import * as pc from 'playcanvas/build/playcanvas.prf.js'; // @ts-ignore: library file import import * as pcx from 'playcanvas/build/playcanvas-extras.js'; import Example from '../../app/example'; import { AssetLoader } from '../../app/helpers/loader'; class...
set -e GITLAB_DB_USER=${GITLAB_DB_USER:-git} GITLAB_DB_NAME=${GITLAB_DB_NAME:-gitlabhq_production} psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" -d template1 <<-EOSQL CREATE EXTENSION IF NOT EXISTS pg_trgm; CREATE USER "$GITLAB_DB_USER" CREATEDB; CREATE DATABASE "$GITLAB_DB_NAME" OWNER "$GITLAB_DB_U...
#!/bin/bash # Script helping users run a go docker image to encapsulate the runtime. # # This script helps to remove the need for maintaining your own local go environment and runtime. # Through the use of a golang:1.11.4 docker image, as well as local bind mounts, the container # is able to access your files i...
#!/usr/bin/env python import csv import pathlib CURRENT_DIR = pathlib.Path(__file__).parent.absolute() class Country(): def __init__(self, row): self.name, self.code, _, _, lat, long = row self.lat = float(lat) self.long = float(long) self.loc = self.name self.elos = [] ...
@{ ViewData["Title"] = "Home Page"; } <h2> This is a ASP .NET web application deployed on Azure App Service </h2>
///--------------------------------------------------------------------------------------------------------------------- /// <copyright company="Microsoft"> /// Copyright (c) Microsoft Corporation. All rights reserved. /// </copyright> ///----------------------------------------------------------------------------...
# -*- coding: utf-8 -*- # Licensed under the MIT license # http://opensource.org/licenses/mit-license.php # based on: http://code.activestate.com/recipes/573463/ # Modified by Philippe Normand # Copyright 2008, Frank Scholz <coherence@beebits.net> from coherence.extern.et import ET as ElementTree, indent, parse_xml...
/* * * Created by mahmoud on 12/27/21, 11:33 PM * Copyright (c) 2021 . All rights reserved. * Last modified 12/22/21, 10:24 AM */ package com.mahmoud.dfont.extensions import android.util.Log import android.view.View import androidx.core.content.res.ResourcesCompat import com.mahmoud.dfont.services.ChangeableType...
using System; using Fivet.ZeroIce.model; using Ice; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; namespace Fivet.ZeroIce { /// <summary> /// The Implementation of TheSystem interface /// </summary> public class TheSystemImpl : TheSystemDisp_ { /// <sum...
angular.module('LearnversationApp') .controller('userProfileCtrl', ['usersFactory', 'usersLanguagesFactory', 'languagesFactory', 'levelsFactory', 'userProfileImagesFactory', 'commentsFactory', '$route', '$location', '$scope', '$routeParams', function(usersFactory, usersLanguagesFactory, languagesFactory, levelsF...
use super::Request; use crate::common::{OrderEvent, OrderType, SendOrderStatus, Side, Symbol, TriggerSignal}; use chrono::{DateTime, Utc}; use http::Method; use serde::{Deserialize, Serialize}; use uuid::Uuid; #[derive(Serialize, Debug, Clone)] #[serde(rename_all = "camelCase")] pub struct SendOrderRequest { pub o...
class Valvat module Checksum class MT < Base check_digit_length 2 def check_digit multipliers = [9, 8, 7, 6, 4, 3] sum = sum_figures_by { |digit, index| digit * multipliers[index] } supposed_checksum = 37 - (sum % 37) supposed_checksum.zero? ? 37 : supposed_checksum ...
import * as monaco from 'monaco-editor'; export type Monaco = typeof monaco; export type EmitOutput = monaco.languages.typescript.EmitOutput; export type OutputFile = monaco.languages.typescript.OutputFile; export type ICodeEditor = monaco.editor.IStandaloneCodeEditor; export type TypeScriptWorker = monaco.languages.t...
using System.Collections; using System.Collections.Generic; using UnityEngine; public class BrightnessChanger : MonoBehaviour { MeshRenderer mr; // Use this for initialization void Awake () { mr = gameObject.GetComponent<MeshRenderer>(); mr.material.SetFloat("_Brightness", (Mathf.Sin(Time....
using System; using System.Collections.Generic; using System.Text; using System.Linq; using System.Reflection; public class Controller { private List<IWeapon> weapons; public Controller() { this.weapons = new List<IWeapon>(); } public void InsertGemToWeapon(string weaponName, IGem gem, ...
import React, { useState } from 'react' import { Link, useParams } from 'react-router-dom' export default function HomePage() { const [resp,setresp] = useState(); const [error,seterror] = useState(); const history = useParams() useEffect(() => { fetch(`/bill/${history.n}`, { // configuration...
import { defineClientAppEnhance } from '@vuepress/client' export default defineClientAppEnhance(({ app, router, siteData }) => { // ... })
Put your markdown files (Hexo/Jekyll) in this directory then start Solo, these files will be imported as posts. 把 Markdown 文件(Hexo/Jekyll)放到本目录后启动 Solo,这些 MD 文件将会被自动导入作为文章。
import React from 'react' import { observable, action, computed } from 'mobx' import { Modal, Spin, notification } from 'antd' import { tree as getTree, add, edit, del, detail, IAdd } from '../../../api/account/admin/privilege' import { Curd, Form, Tree, EditForm, ItemMapPlus as itemMapPlus } from 'fullbase-components'...
```python import requests r = requests.get("https://www.ing.nl") cookies = r.cookies.get_dict() with open("cookies.txt","w") as fp: for i, k in enumerate(cookies): fp.write("Cookie name: {} value {}\n".format(k,cookies.get(k))) ```
pluginManagement { repositories { google() jcenter() gradlePluginPortal() mavenCentral() } resolutionStrategy { eachPlugin { if (requested.id.namespace == "com.android") { useModule("com.android.tools.build:gradle:${requested.version}") ...
import path from 'path'; /** * Reverse function of path.join * * @param filePath a path joined via path.join * @param prefix the prefixed path * @returns the file path without the prefix */ export function pathUnjoin(filePath: string, prefix: string): string { if (prefix === '') { return filePath; } c...
#!/usr/bin/perl # # Copyright (c) 2009-2012 Brown Deer Technology, LLC. All Rights Reserved. # # This software was developed by Brown Deer Technology, LLC. # For more information contact info@browndeertechnology.com # # This program is free software: you can redistribute it and/or modify it # under the terms of the G...
# iOS-Parallax-Demo This source code is demonstration for post http://codentrick.com/parallax-effect-for-ios-with-swift/. Images used belongs to Samsung Mobile Twitter.
package modern.challenge; import java.io.File; import java.io.IOException; import java.nio.file.FileSystems; import java.nio.file.Files; import java.nio.file.Path; public class Main { public static void main(String[] args) { Path customBaseDir = FileSystems.getDefault().getPath("D:/tmp"); String...
import React from "react" import featured from "../components/featured.css" const Featured = props => ( <div className="featured-container"> <div className="featured-group"> <div className="media-container"> <img src="https://cl.ly/9f5d219dc441/download/Kapture%2525202020-05-26%252520at%2525209.18....
use super::*; use num::complex::Complex; pub enum Side { Left, Right } pub fn dirichlet(_: Side, _: &Vec<Phasor>) -> Phasor { return *phasor::zero(); } pub fn transparent(s: Side, es: &Vec<Phasor>) -> Phasor { // forma mais simples que considera que a frente de onda é transversal ao eixo z. ...
#!/usr/bin/env node import meow from 'meow'; import Conf from 'conf'; import add from './commands/add'; import open from './commands/open'; import setConfig from './commands/set'; async function main() { const { input, flags } = meow(` Usage: $ w-project [command] Commands: add Add a...
const request = require('request-promise'); const { RateLimiter } = require('limiter'); const log = require('./log'); const limiter = new RateLimiter(2, 'second'); function getComment(id) { log(id, 'added'); return new Promise((resolve, reject) => { limiter.removeTokens(1, (err, remainingRequests) => { ...
export enum RGConnectionType { INHERITANCE = 0, COMPOSITION = 1, ACTION = 2, REPLACE = 3, REMOVE = 4, CONDITION = 5 }
// // UIColor+HFFoundation.h // HFFoundation // // Created by HeHongling on 10/9/16. // Copyright © 2016 HeHongling. All rights reserved. // #import <UIKit/UIKit.h> NS_ASSUME_NONNULL_BEGIN @interface UIColor (HFFoundation) + (UIColor *)hf_randomColor; + (nullable UIColor *)hf_colorWithHexString:(NSString *)hexSt...
ALTER TABLE seasons ADD `type` integer unsigned AFTER `status`; UPDATE seasons SET type = 0;
/*if not async then phantomjs fails to run the webserver and the test concurrently*/ var less = {async: true, strictMath: true}; /* record log messages for testing */ var logMessages = [], realConsoleLog = console.log; console.log = function (msg) { logMessages.push(msg); realConsoleLog.call(console, msg);...
using FluentValidation; namespace Core.Application.Models { public class BudgetJarDto : EntityDto<Guid> { public Guid UserId { get; set; } public string Name { get; set; } = string.Empty; public float Percentage { get; set; } public Guid IconId { get; set; } public De...
import os def pathsplit(p, rest=[]): (h, t) = os.path.split(p) if len(h) < 1: return [t]+rest if len(t) < 1: return [h]+rest return pathsplit(h, [t]+rest) def commonpath(l1, l2, common=[]): if len(l1) < 1: return (common, l1, l2) if len(l2) < 1: return (common...
package games.game2048 import board.Cell import board.SquareBoard import org.junit.Assert import org.junit.Test class TestMoveValuesInRowOrColumn : AbstractTestGameWithSmallNumbers() { private val defaultInput = """-2-4 2--- ---- 4---""" @Test fun testRow() = testMoveInRowOrColumn({ it.getRow(1, 1..4) },...
package nz.co.chrisdrake.tv import dagger.Component import dagger.android.AndroidInjectionModule import dagger.android.AndroidInjector import nz.co.chrisdrake.tv.data.DataModule import javax.inject.Singleton @Component(modules = arrayOf( ApplicationModule::class, ActivityBindingModule::class, AndroidInjec...
import 'package:equatable/equatable.dart'; import 'package:flutter/material.dart'; import 'package:tmdb/models/watchlist_model.dart'; class WatchListState extends Equatable { const WatchListState(); @override List<Object> get props => []; } class WatchListLoading extends WatchListState {} class WatchListLoade...
package org.ossiaustria.amigo.platform.rest import org.ossiaustria.amigo.platform.domain.models.Account import org.ossiaustria.amigo.platform.domain.services.PersonProfileService import org.ossiaustria.amigo.platform.domain.services.auth.AuthService import org.ossiaustria.amigo.platform.domain.services.auth.TokenUserD...
from gym.envs.registration import register import gym import os import sys dirpath = os.path.dirname(os.path.dirname(__file__)) sys.path.append(dirpath) env_specs = gym.envs.registry.env_specs if 'HumanoidSafe-v2' not in env_specs: register( id='HumanoidSafe-v2', entry_point='mujoco_safety_gym.en...
using Eaf.Authorization; using Eaf.Logging; using Eaf.Runtime.Validation; using Eaf.UI; using Shouldly; using Xunit; namespace Eaf.Tests.Logging { public class LogSeverity_Tests : TestBaseWithLocalIocManager { [Fact] public void AuthorizationException_Default_Log_Severity_Change_Test() ...
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. import * as http from "http"; import * as os from "os"; import * as path from "path"; import { resolve as pathResolve } from "path"; import { ParsedUrlQuery } fro...
#!/bin/bash # Loosely based on the Linux From Scratch build process # Setup set -e umask 022 jobs=-j8 export LC_ALL=POSIX export SRC=$ROOT/src export DEPS=$SRC/deps export PATCHDIR=$SRC/patches for script in $SRC/steps/prerequisites/* do mkdir $ROOT/work cd $ROOT/work echo Running $script . $script cd $ROOT...
import React from "react" import styled from "styled-components" const Footer = ({ children }) => ( <FooterGroup> <Title> There are many paths to mastery, and if you are persistent you will certainly find one that suits you. @angelVU </Title> <Button href="https://twitter.com/intent/twe...
import 'dart:ui'; import 'package:flutter/material.dart'; import 'package:horizontal_calendar_widget/date_helper.dart'; import 'package:horizontal_calendar_widget/horizontal_calendar.dart'; import 'package:intl/intl.dart'; import 'components/components.dart'; void main() => runApp(MyApp()); int daysCount(DateTime f...
module Narrative class RoleDefinition attr_reader :name def initialize(name, partners, &responsibilities) @name = name @partners = partners @responsibilities = responsibilities end def cast!(actors) role = Module.new(&@responsibilities) acquaint! role, actors.slice(*@pa...
import { PipeTransform } from '@angular/core'; import { getRandomNumber } from '../test-util/functions.util'; import { BooleanPipe } from './boolean.pipe'; describe('BooleanPipe', () => { let pipe: PipeTransform; beforeEach(() => { pipe = new BooleanPipe(); }); it('create an instance', () => { expec...
# threaditjs-react A React/Redux implementation of ThreadItJS. [Demo](http://react.threaditjs.benpaulhanna.com/)
package environment.element import scoututil.Util._ import environment.layer._ import environment.element._ import environment.element.seed._ import scala.collection.mutable.{ArrayBuffer => AB} class WaterDepth(var value: Option[Double]) extends Element { val name = "Water Depth" val unit = "ft" val constant ...
##################### # BXEngine # # room.py # # Copyright 2021 # # Michael D. Reiley # ##################### # ********** # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Softwa...
require 'spec_helper_acceptance' test_name 'simp_gitlab class' describe 'simp_gitlab class' do let(:server) {only_host_with_role( hosts, 'server' )} let(:permitted_client) {only_host_with_role( hosts, 'permittedclient' )} let(:denied_client) {only_host_with_role( hosts, 'unknownclient' )} let(:manifest) do ...
function javaversion(callback) { var spawn = require('child_process').spawn('java', ['-version']); spawn.on('error', function(err){ return callback(err, null); }) spawn.stderr.on('data', function(data) { data = data.toString().split('\n')[0]; var javaVersion = new RegExp('version...
#!/bin/sh dwm_date () { Date=$(date +'%Y-%m-%d %a %H:%M') printf "📆 ‧ $Date" } dwm_date
import {argsert} from './argsert.js'; import {isPromise} from './utils/is-promise.js'; import {YargsInstance, Arguments} from './yargs-factory.js'; export class GlobalMiddleware { globalMiddleware: Middleware[] = []; yargs: YargsInstance; frozens: Array<Middleware[]> = []; constructor(yargs: YargsInstance) { ...
(in-package #:ndjinn) (defun initialize-audio () (sdl2-mixer:init :flac :ogg) (sdl2-mixer:open-audio 44100 :s16sys 2 1024) (sdl2-mixer:allocate-channels 16)) (defun deinitialize-audio () (sdl2-mixer:halt-channel -1) (sdl2-mixer:close-audio) (sdl2-mixer:quit))
/******************************Module*Header*******************************\ * Module Name: efloat.hxx * * * * Contains internal floating point objects and methods. * * ...
using OpenTK.Mathematics; namespace Engine.Animations { public struct KeyPosition { public Vector3 Position; public float TimeStamp; } public struct KeyRotation { public Quaternion Orientation; public float TimeStamp; } public struct KeyScale { p...
--- title: "Workshop on Blockchain Technologies" collection: talks type: "Workshop" permalink: /talks/2020-01-20-21_Blockchain_Technologies_Workshop venue: "NSS College of Engineering, Palakkad" date: 2020-01-20 & 2020-01-21 location: "Coimbatore, India" ---
module UsersHelper def check_user return unless current_user?(@user) content_tag(:a, link_to("Delete #{@user.name}", @user, method: :delete, data: { confirm: 'You sure?' }, class: 'ba...
import 'package:atlas/atlas.dart'; class DeviceLocation { final LatLng target; final double? accuracy; final double altitude; const DeviceLocation({ required this.target, this.accuracy = 0.0, this.altitude = 0.0, }); @override bool operator ==(Object other) { if (identical(this, other))...
<?php namespace MarsRover\Repository; class RoverRepository { public $redis; public function __construct($redis) { $this->redis = $redis; } public function getAllRovers() { return $this->redis->hGetAll(REDIS_ROVER_LIST); } public function getSingleRover(int $plateau...
program append_h5 use, intrinsic :: iso_fortran_env use hdf5 implicit none integer, parameter :: sp = REAL32 integer, parameter :: pos_space_rank = 3, pos_rank = 2, nr_pos = 10 character(len=3) :: dset_name = "pos" character(len=1024) :: file_name logical :: file_exists integer :: st...
import 'dart:convert'; import 'package:online_school/model/document_model.dart'; import 'package:online_school/model/live_courseware_model.dart'; import 'package:online_school/model/material_list_model.dart'; import 'package:online_school/model/material_model.dart'; import 'package:online_school/common/const/api_const...
#!/bin/bash for i in {1..5}; do find "/home/camera/cam$i" -type f -mtime +7 -delete done
package eu.kanade.tachiyomi.ui.browse.animesource.globalsearch import eu.davidea.flexibleadapter.FlexibleAdapter import eu.kanade.tachiyomi.data.database.models.Anime /** * Adapter that holds the anime items from search results. * * @param controller instance of [GlobalSearchController]. */ class GlobalAnimeSearc...
-- | Where I put the monolithic run function, which solves the -- general problem of: -- > if C[E] = E' -- > then C = Inventor.run E E' -- The first term argument @E@ should always be -- a fixpoint with all arguments applied. module Elea.Inventor ( run ) where import Elea.Prelude import Elea.Term import Elea.Cont...
# regular try/except # anything in try block is executed until any Exception occurs # then that exception will be catched in one of the except blocks try: a = input('Enter a number: ') b = input('Enter a number: ') c = int(int(a) / int(b)) print(f'{a}/{b}={c}') except ZeroDivisionError as ex: ...
require 'spec_helper' describe Ingredient do before do @ingredient = FactoryGirl.build(:ingredient) end subject { @ingredient } it { is_expected.to respond_to(:name) } it { is_expected.to respond_to(:recipes) } describe "when name is not present" do before { @ingredient.name = " " } it { is_...
(function(){ var element = document.getElementById('header'), content = new Array(), joined, first = 'This is a first item', second = 'This is a second item', another = 'And another one!', last = '...and a last one'; content.push('<ul>'); content.push('<li>'); content.push(first); ...
# ssdump.py # Catalogues items in a SyncSketch.com account # Requires ss_username and ss_api_key to be exported in env var # Requires keywords from account-specific items in config.yaml # pip3 install yaml confuse syncsketch from syncsketch import SyncSketchAPI import yaml import confuse from os import environ import...
<?php use FluidEdgeNamespace\Modules\Header\Lib; if(!function_exists('fluid_edge_set_header_object')) { function fluid_edge_set_header_object() { $header_type = fluid_edge_get_meta_field_intersect('header_type', fluid_edge_get_page_id()); $object = Lib\HeaderFactory::getInstance()->build($header_t...
<?php // Copyright 2004-present Facebook. 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. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required b...
package flowar // Edge represents an edge of a directed graph. type Edge struct { Tail int Head int Length int } // PathMap represents the length of a path from a vertex to another. type PathMap map[int]map[int]int // Get gets the path length from a to b. func (pm PathMap) Get(a, b int) (length int, ok bool) ...
package freetds import ( "strconv" "strings" ) type credentials struct { user, pwd, host, database, mirrorHost, compatibility string maxPoolSize, lockTimeout int } // NewCredentials fills credentials stusct from connection string func NewCredentials(connStr string) *credentials { par...
Rails.application.routes.draw do scope module: :web do root 'tasks#index' resources :tasks, only: [:index] namespace :dashboard do root 'tasks#index', as: :root resources :tasks do member do get :download_attachment put :change_state end end end...
<?php /** * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ namespace Magento\Framework\App\Test\Unit\ResourceConnection; use Magento\Framework\DB\Adapter\DdlCache; class ConnectionFactoryTest extends \PHPUnit_Framework_TestCase { /** * @var \Magento\Framework\Test...
import classNames from 'clsx' import type * as React from 'react' import Select from '../../../../../core/components/baseItems/Select' import classes from './styles.module.css' interface Props extends React.ComponentProps<typeof Select> { choices: Array<string> } export default function SelectString({ choices, ...
package parser import ( "fmt" "go/ast" "regexp" "strings" ) var ( re1 = regexp.MustCompile(`^[a-z]`) re2 = regexp.MustCompile(`^[A-Z]+$`) re3 = regexp.MustCompile(`^[A-Z][0-9a-z_]`) re4 = regexp.MustCompile(`^([A-Z]+)[A-Z][0-9a-z_]`) ) // IsExported determines whether or not a given name is exported. func Is...
var FS = require("fs"); var Path = require("path"); var expect = require("chai").expect; var Parser = require("../lib/jsg.js"); var Schema = require("../lib/json-grammar.js"); var Testdir = Path.relative("", __dirname); describe ("", function () { [["ShExJ.jsg", "ShExJ_all.json", true], ["ShExJ.jsg", "empty.jso...
--- layout: post title:Esto es la caña y va ser la po*** --- Este es seguro al 0.0000000000012% el mejor blog jamas visto en github ![_config.yml]({{ site.baseurl }}/images/vanidoso.jpg) Y aun puede mejorar mucho mas, estoy va a ser increible.
# frozen_string_literal: true require 'kruger/version' require 'httparty' require 'kruger/client' module Kruger class Error < StandardError; end end