text
stringlengths
27
775k
import * as React from 'react'; import * as Styled from './style'; interface IProject { project: { frontmatter: { title: string; slug: string; meta_desc: string; }; }; } const Project: React.FunctionComponent<IProject> = ({ project }) => ( <Styled.Card> <Styled.Heading>{project.fr...
<?php class Message extends \Eloquent { // Add your validation rules here public static $rules = [ 'body'=>'required|min:2', 'dest_id'=>'required|exists:users,id' ]; protected $guarded = ['id']; public function sender() { return $this->belongsTo('User', 'sender_id', 'id');; } public function recever(...
<?php $username="hackathon"; $password="yt20150705"; $database="hackathon"; $pass=$_POST['pass']; $title=$_POST['title']; $content=$_POST['content']; $wdate=$_POST['wdate']; @ $connection = mysql_connect('localhost', 'hackathon', 'yt20150705'); if (!$connection) { die('Not connected : ' . mysql_error(...
package org.firstinspires.ftc.teamcode.subsystems; import com.qualcomm.robotcore.eventloop.opmode.LinearOpMode; import org.firstinspires.ftc.teamcode.framework.Robot; import org.firstinspires.ftc.teamcode.hardware.LEDRiver; public class FreightFrenzyRobot extends Robot { public final Drivetrain drive; public...
package crdeventhandler import ( "go.uber.org/zap" v1 "github.com/ibm-cloud-security/app-identity-and-access-adapter/adapter/pkg/apis/policies/v1" "github.com/ibm-cloud-security/app-identity-and-access-adapter/adapter/policy" storepolicy "github.com/ibm-cloud-security/app-identity-and-access-adapter/adapter/polic...
#import <UIKit/UIKit.h> FOUNDATION_EXPORT double ASPickerViewVersionNumber; FOUNDATION_EXPORT const unsigned char ASPickerViewVersionString[];
# install Sphinx https://www.sphinx-doc.org an theme pip install -r requirements-docs.txt # Compile documentation make html -C doc/
package pgnio.adba; import jdk.incubator.sql2.AdbaConnectionProperty; import jdk.incubator.sql2.Operation; import jdk.incubator.sql2.OperationGroup; import org.checkerframework.checker.nullness.qual.Nullable; import java.lang.invoke.MethodHandle; import java.lang.invoke.MethodHandles; import java.lang.invoke.MethodTy...
package io.apiwiz.astrum.api.controller; import io.apiwiz.astrum.api.service.RuleService; import io.apiwiz.astrum.rule.model.AssertionRule; import io.apiwiz.astrum.rule.model.Rule; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mockito; import org.springframework....
use crate::math::*; use crate::noise::Perlin; use crate::{Color, Texture}; use std::convert::TryInto; #[derive(Debug, Clone)] pub struct NoiseNormal(Perlin, Perlin, FloatType, FloatType); impl NoiseNormal { pub fn new(scale: FloatType, depth: FloatType) -> Self { Self(Perlin::new(), Perlin::new(), scale, ...
package co.com.flypass.flypassNative.data.model import com.google.gson.annotations.SerializedName data class Principal( val userId: Long, val secUserId: Long, val personId: Long, val sessionId: Long, val name: String, val device: String, val ipAddress: String, @SerializedName("sesionSt...
<?php namespace PressToJamCore; class ResultsRow implements \JsonSerializable { protected $cells = []; protected $children = []; protected $history = []; protected $data_row; function __construct($data_row, $row) { $this->data_row = $data_row; foreach($data_row->fields as $slug=...
require_relative '../../../db/seeds/data/skills_and_categories' module Skills class GenerateFromSeeds def initialize generate end def self.call new "#{Skill.count} skills was modificated." end private def generate skill_seeds.each do |skill_representation| ...
<?php if (isset($_POST['gameName'])) { require_once('class/Api.class.php'); $api = new Api(); $gameId = $api->gameCreate(array( 'name' => $_POST['gameName'], )); header('Location: /game/'.$gameId); } ?> <div class = "container"> <center> <a href = "/"> <img src = "/resources/others/warhammer.png" class ...
import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:persian_range_date_picker/utils/consts.dart'; import 'package:persian_range_date_picker/widget/render_table.dart'; import 'package:shamsi_date/shamsi_date.dart'; class DatePicker extends StatefulWidget { final bool isRan...
use std::mem; use sdl2::render::Renderer; use interface::text; use common::Rect; use font::{Font, draw_text}; use border::BorderRenderer; struct Message { user_name: Vec<u8>, data: Vec<u8>, } pub struct ChatBox<'a> { pub message_ready: bool, pub message_buffer: String, messages: Vec<Message>, ...
#ifndef DOCTYPE_LEXER_H #define DOCTYPE_LEXER_H #include "HtmlCursor.h" #include "HtmlToken.h" class DoctypeLexer { public: DoctypeLexer(HtmlCursor *htmlCursor); HtmlToken *getToken(); int getInitialPosition(); bool isSuccess(); private: HtmlCursor *htmlCursor; int initalPosition; bool su...
var exports = module.exports = {}; const cheerio = require('cheerio'); class CifraClubSCraper { getCapo($){ var capo = $("#cifra_capo").children().contents().text(); if(capo.length > 0){ capo = parseInt(capo.split('ª')[0]); }else{ capo = 0; } return capo; } getTabs($){ let t...
//! Defines texture helper structures for the library //! //! Used for file formats which embed their textures into the model file. //! Supported are both normal textures, which are stored as uncompressed //! pixels, and "compressed" textures, which are stored in a file format //! such as PNG or TGA. use libc::{c_ucha...
## Architecture The proof decentralized exchange is a hybrid decentralized exchange that aims at bringing together the ease of use of centralized exchanges along with the security and privacy features of decentralized exchanges. Orders are matched through the proof orderbook. After orders are matched, the decentrali...
<?php use Modules\Base\Facades\DashboardMenuFacade; use Modules\Base\Facades\PageTitleFacade; use Modules\Base\Supports\Editor; use Modules\Base\Supports\PageTitle; use Illuminate\Support\Facades\DB; if (!function_exists('table_actions')) { /** * @param $edit * @param $delete * @param $item * ...
#!/usr/bin/env bash # Use this to randomly kill Flink processes on GCE nodes, you can change # the pkill command below to also kill YARN JobManagers NUM_WORKERS=5 CLUSTER_PREFIX="aljoscha-yarn" # Seed random generator RANDOM=$$$(date +%s) while [ 1 ] do index=$(($RANDOM % $NUM_WORKERS)) selected_worker="$CL...
<?php defined('BASEPATH') OR exit('No direct script access allowed'); class Pelicula extends CI_Controller { public function __construct() { parent::__construct(); $this->load->database();// podria hacerlo desde el autoload $this->load->library('grocery_CRUD'); $this->load->helpe...
const index = require('../../src/request-handlers'); const { expect } = require('chai'); const Base = require('../../src/request-handlers/base'); const Head = require('../../src/request-handlers/head'); const Get = require('../../src/request-handlers/get'); const Post = require('../../src/request-handlers/post'); desc...
# Release Notes ### 2.0.1 (2021-11-25) * Library * Fix inaccuracy of the `Utils#isLayoutDirectionResolved` method on SDKs 17 & 18. * Fix a NPE crash issue (null `mShownDrawer` accessed in `addFocusables()`) occurred on platform versions prior to `JELLY_BEAN_MR2` (18) where the `addFocusables()` method ...
# README # ### Invoice API PHP client ### Version: 1.0.1 ### Dependencies ### Please check out this list: * PHP 5.6+ * https://getcomposer.org ### Examples ### Check `examples` and `tests` directories for code. ### Contribution guidelines ### * If you want to write tests, run `composer update` at the root of r...
/* * Copyright 2018 TWO SIGMA OPEN SOURCE, LLC * * 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 applicabl...
using System; using System.Collections; using System.Collections.Generic; using UnityEngine; public class ToggleMetronome : MonoBehaviour, RaycastHitHandler { bool on = false; public AudioSource MusicSource; public AudioClip MusicClip; public Material enableMat; public Material originalMat; pu...
export enum ResponseType { JSON = 1, Text = 2, Binary = 3 } export enum BodyType { Form = 1, File = 2, Auto = 3 } export type Body = object | string | BinaryType export type HttpVerb = 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS' | 'CONNECT' | 'TRACE' export interface HttpOptions { ...
declare namespace java { namespace awt { interface LayoutManager { addLayoutComponent(arg0: java.lang.String | string, arg1: java.awt.Component): void removeLayoutComponent(arg0: java.awt.Component): void preferredLayoutSize(arg0: java.awt.Container): java.awt.Dimension minimumLayoutSize(...
--- uid: Microsoft.Quantum.Synthesis.SquareMatrixFact title: SquareMatrixFact – funkce ms.date: 1/23/2021 12:00:00 AM ms.topic: article qsharp.kind: function qsharp.namespace: Microsoft.Quantum.Synthesis qsharp.name: SquareMatrixFact qsharp.summary: Checks that given array represents a square matrix. ms.openlocfilehash...
/* * Utility functions to scan for the Black Magic Probe on a system, and return * the (virtual) serial ports that it is assigned to. Under Microsoft Windows, * it scans the registry for the Black Magic Probe device, under Linux, it * browses through sysfs. * * Copyright 2019-2020 CompuPhase * * License...
use std::sync::{mpsc, Arc}; use std::collections::HashMap; use hal::{Device as Device_, Limits, MemoryTypeId}; use hal::memory::Requirements; use memory::{self, Allocator, Memory, ReleaseFn, Provider, Dependency}; use {buffer, image}; use {Backend, Device}; /// Retrieve the complete memory requirements for this buffe...
package consistence import ( "errors" "strconv" ) var ( ErrLeaderSessionAlreadyExist = errors.New("leader session already exist") ErrLeaderSessionNotExist = errors.New("session not exist") ErrKeyAlreadyExist = errors.New("Key already exist") ErrKeyNotFound = errors.New("Key not found...
class TicklesController < ApplicationController before_filter :ensure_user_is_logged_in def index only_admin { @tickles = Tickle.order("id DESC") } end def show only_admin { @tickle = Tickle.find(params[:id]) } end def create params[:tickle].merge!( :sender => User.current ) if User.current...
require 'mt-libuv' describe MTLibuv::Idle do before :each do @log = [] @general_failure = [] @reactor = MTLibuv::Reactor.default @reactor.notifier do |error, context| begin @general_failure << "Log called: #{context}\n#{error.message}\n#{error.backtrace.join("\n") if error.backtrace}\n" rescue Exc...
//----------------------------------------------------------------------- // <copyright file="ImageAttachmentSelectorControl.cs" company="Sphere 10 Software"> // // Copyright (c) Sphere 10 Software. All rights reserved. (http://www.sphere10.com) // // Distributed under the MIT software license, see the accompanying fil...
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals import re from datetime import datetime from dateutil import tz from arrow import locales try: from functools import lru_cache except ImportError: # pragma: no cover from backports.functools_lru_cache import lru_cache # pragm...
<?php namespace App\Models\Factory; use App\Helpers\UserAgent; use App\Helpers\Utils; use App\Models\AbsModelFactory; use App\Models\Orm\DataProductApplyGonggeLog; use App\Models\Orm\DataProductApplyLog; use App\Models\Orm\DeliveryCount; use App\Models\Orm\DeliveryLog; use App\Helpers\Logger\SLogger; use App\Models\O...
export * from './entityFetchers'; export * from './userDataFetchers'; export * from './priceFetcher'; export * from './merkleDistributorFetcher';
#!/bin/bash set -ex ncu -u (cd ./packages/vtw-core && ncu -u) (cd ./packages/vtw-bootstrap && ncu -u) (cd ./packages/vtw-host-app && ncu -u) (cd ./packages/vtw-mobx-app && ncu -u)
from rest_framework import viewsets from rest_framework import status from rest_framework.generics import get_object_or_404 from rest_framework.response import Response from classes.models import Classes, Semester from classes.serializers import ClassesSerializer, SemesterSerializer class ClassesViewSet(viewsets.Mod...
package packet import ( "github.com/sandertv/gophertunnel/minecraft/nbt" "github.com/sandertv/gophertunnel/minecraft/protocol" ) // AddVolumeEntity sends a volume entity's definition and metadata from server to client. type AddVolumeEntity struct { // EntityRuntimeID is the runtime ID of the volume. The runtime ID...
package us.testfor.web.manage import org.hamcrest.MatcherAssert.assertThat import org.hamcrest.Matchers.equalTo import org.hamcrest.Matchers.greaterThan import org.junit.jupiter.api.Test import org.springframework.beans.factory.annotation.Autowired import org.springframework.boot.test.context.SpringBootTest import org...
using System.Collections.Generic; using System.IO; using DocMaker; using DocMaker.Domain; namespace DocMakerConsole { class Program { static void Main(string[] args) { var path = "1.docx"; var maker = new WordBuilder(); var template = maker.CreateTemplate()...
import { Face } from '../enums'; import { Cell } from './cell'; export interface CastResult { x: number; // The X coordinate of the Cell. y: number; // The Y coordinate of the Cell. cell: Cell; // The Cell that was hit. face: Face; // The specific side of the cell the ray hit. wall: number; // The specific c...
SELECT FIRST 176 "PanCreactomy2_2"."PROVIDER_TYPE" AS "PROVIDER_TYPE" FROM "PanCreactomy2_2" GROUP BY 1;
# (c) Copyright 2017 Ribose Inc. # require "spec_helper" RSpec.describe UriFormatValidator::Constraints do subject { described_class.new(validation_options) } describe ":host option" do let(:http_uri) { "http://example.com/relative/path" } let(:https_uri) { "https://example.com/different/path" } let(...
"use strict"; exports.__esModule = true; exports.Ephem = exports.GM = void 0; var METERS_IN_AU = 149597870700; var SECONDS_IN_DAY = 86400; // TODO(ian): Allow multiple valid attrs for a single quantity and map them // internally to a single canonical attribute. var EPHEM_VALID_ATTRS = new Set([ 'a', 'e', 'i...
package com.impact.recipe.json; import net.minecraft.item.ItemStack; import java.util.Arrays; import java.util.Objects; public class RecipeJsonCrafting { public ItemStack[] inputItem; public ItemStack outputItem; public RecipeJsonCrafting(ItemStack[] aInputs, ItemStack aOutputs) { this.inputItem = aInputs...
// ## 原型&原型链 function Fn(){ var a = 12 this.getName = function(){ console.log('private getName') } } Fn.prototype.getName = function (){ console.log('public getName') } var fn = new Fn() var fn1 = new Fn() // 1,2 console.log(fn.a) console.log(fn.getName()) // 3,4,5 console.log(fn.getName === fn1.get...
import Text.Regex.Posix authors = "Linda Fairstein (born 1947)\n\ \Anthony Faramus (1920-1990)\n\ \John Fante (1909-1983)\n\ \Nuruddin Farah (born 1945)\n\ \Nancy Farmer (born 1941)\n\ \Penelope Farmer (born 1939)\n\ \Philip Jose Farmer (born 1918)\n\ \Howard Fast (1914-2003)\n\ \Tarek Fatah (born 1949)\n\ \W...
// Copyright (c) Microsoft Corporation. // Licensed under the MIT License. using Xunit; using Xunit.Abstractions; namespace Microsoft.Coyote.Actors.SystematicTesting.Tests { public class GotoStateTransitionTests : BaseActorSystematicTest { public GotoStateTransitionTests(ITestOutputHelper output) ...
/** * * Strict version of Exclude. * @example * ```ts * type Foo = 'a' | 'b' | 'c' * // Expect: 'b' | 'c' * type Bar = StrictExclude<Foo, 'a'> * ``` */ export type StrictExclude<T, U extends T> = Exclude<T, U>
using System; using UnityEngine; public class SpawnManager : Project.Behaviour { public delegate void SpawnEventHandler(SpawnEventArgs e); //[Serializable] public class SpawnEventArgs { public enum Unit { Worker, Archer, Soldier } p...
""" Data models. These models allow for validation of inputs to a BioCantor model, acting as a JSON schema for serializing and deserializing the models. """ from typing import List, Optional, ClassVar, Type, Dict, Union from uuid import UUID from inscripta.biocantor.gene.biotype import Biotype from inscripta.biocantor...
package main import ( "testing" "github.com/polygonledger/node/block" chain "github.com/polygonledger/node/chain" ) func TestLoad(t *testing.T) { mgr := chain.CreateManager() if mgr.BlockHeight() != 0 { t.Error("BlockHeight") } b := block.Block{} mgr.AppendBlock(b) //after appending block height incre...
require 'helper' describe WorldBank::Client do context 'get' do it 'returns the response from the specified path' do stub_get('sources/all?format=json'). to_return(:status => 200, :body => fixture('sources.json')) client = WorldBank::Client.new( { :dirs => ['sources', 'all'], ...
package com.example.koinandroidexample import io.reactivex.Single import retrofit2.http.FieldMap import retrofit2.http.GET import retrofit2.http.POST interface BasicApiService { @GET("users") fun getAllUsers() : Single<List<Users>> }
DROP TABLE IF EXISTS default.test_csv; create table default.test_csv (id int,name varchar(255),rank int) Engine = CSV location = 'tests/data/sample.csv'; select avg(rank), max(id), name from default.test_csv group by name order by name desc; DROP TABLE IF EXISTS default.test_csv;
<?php defined('BASEPATH') OR exit('No direct script access allowed'); class Batch extends My_Controller { function __construct() { parent::__construct(); } function process(){ $this->load->model('batch_model'); $queues = $this->batch_model->gets(); foreach ($queues as $job) { ...
#!/bin/bash #Add pwm channel to config.txt #[all] #dtoverlay=pwm,pin=18,func=2 if ! grep -q "dtoverlay=pwm" "/boot/config.txt" then echo "dtoverlay=pwm,pin=18,func=2" >> "/boot/config.txt" echo "Device tree overlay was added to /boot/config.txt." echo -e "\033[0;33m[WARNING] You need to reboot your Raspber...
import React from "react"; // reactstrap components import { Container, Row, Col } from "reactstrap"; // core components function SectionTypography() { return ( <> <Container className="tim-container"> <div id="images"> <Container> <div className="title"> <h3>P...
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace RLib.WatchLog { internal class LogEntity { public string ProjectName { get; set; } public long GroupID { get; set; } public long InnerGroupID { get; set; } public int LogType { get; ...
package com.koala.spring.bean; import org.springframework.beans.factory.FactoryBean; import org.springframework.stereotype.Component; /** * day10: * 工厂bean * 普通bean * 区别: * 1、Person=普通bean,注册的组件对象就是Person对象,类型就是Person * 2、工厂bean=实现了FactoryBean接口的组件。注册的不是HelloFactory, * 而是HelloFactory这个工厂调用了getObject()返回的对...
import MoreIcon from 'material-ui/svg-icons/navigation/more-vert'; import IconButton from 'material-ui/IconButton'; import IconMenu from 'material-ui/IconMenu'; import MenuItem from 'material-ui/MenuItem'; import AppBar from 'material-ui/AppBar'; import React, {Component} from 'react'; const Menu = props => { const ...
package com.company; /** * Created by Marti on 14/01/16. */ public class Question2 { public static void main(String[] args) { new Question2().showFile(); } private String getFileName() { Input in = new Input(); while (true) { System.out.print("Please enter a file na...
<!DOCTYPE html> <html> <head> @include('layouts._meta') @include('layouts._assets') @yield('styles') </head> <body> <div id="app"> <header class="header"> <nav class="navbar navbar-static-top" role="navigation"> <a href="{{ url('/') }}" class="logo"> <img src="{{ asset('uploads/site...
<?php echo json_encode(compact(['totalacts','stepclaimcount','requiredacts','steppercent']));
package v1.controllers trait Tictactoe { //todo Array size of 3,3 def intiBoard() : Array[String]; def populateBoard() : Unit; def findHorizontalMatch(): Unit; def rotateThroughBoardColumns():Unit; def findVerticalMatch():Unit; def findifExistsUnmatched():Unit; def findLeftRigtDiagonalMatch():Unit; d...
export const UPDATE_UNIVERSE = "UPDATE_UNIVERSE"; export const updateUniverse = updatedUniverse => ({ type: UPDATE_UNIVERSE, data: { updatedUniverse } });
import 'dart:typed_data'; import 'package:quiver/core.dart' as quiver; import 'package:flutter/widgets.dart'; import 'package:flutter_svg/flutter_svg.dart'; class ParallaxBackgroundSettings { const ParallaxBackgroundSettings({ this.deepEffectMatrix, this.shadowSigma = 0.0, this.shadowColor = const Color...
import { never } from './utils'; export type TokenKind = 'subcommand' | 'argument_name' | 'argument_value' | 'comment'; export interface Token { kind: TokenKind; offset: number; length: number; text: string; } export interface Argument { name?: Token; value?: Token; } export interface Comman...
#!/bin/bash #args: text file with each host on a new line while read line do ip=$(dig +short $line) if [ "$ip" != "" ] then echo "$line:" echo $ip fi done < $1
unit TargaImage; // ========================================================== // // This file is part of FreeImage 3 // // COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY // OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES // THAT THE COVERE...
{-| Stash database. On-memory database, memory efficient. * Persistence: /volatile/ * Algorithm: /red black tree/ * Complexity: /O(log n)/ * Sequence: /lexical order/ * Lock unit: /record (rwlock)/ -} module Database.KyotoCabinet.DB.Stash ( Stash , StashOptions (..) , defaultStashOptions ...
var cv = require('opencv'); import Images from './../models/image'; import each from 'async/each'; /** * Image similarity * @param filepath, path of the file to match * @param matchFilepath, file path to be matched with * @param cb, callback function to be called * @returns Number, Dissimilarity */ export funct...
import { Injectable } from '@angular/core'; import { Subject } from 'rxjs/Subject'; import { Observable } from 'rxjs/Observable'; @Injectable() export class SharedService { private subject = new Subject<any>(); constructor() { } emitMsg(msg:any){ this.subject.next(msg); } getMsg():Obser...
#pragma once #include "IRC.h" #include "Client.h" #include "messageHandler.h" class Client; class IRC; class acceptorHandle { private: std::vector<Client*> clientPtrList; std::atomic_bool* endIndicator; IRC* parentIRC; boost::asio::ip::tcp::acceptor* acceptorPtr; public: acceptorHandle( std::vector<Client*> p...
class ServiceInstanceAccessVerifier class << self def can_manage_instance?(instance_guid, cc_client) response_body = cc_client.get("/v2/service_instances/#{instance_guid}/permissions") !response_body.nil? && response_body['manage'] end end end
# aoc20 CAH's approaches to Advent of Code 2020 ## Learning points ### Everyday File handling, type conversion ### Day 1 Lists / contains / Orders of growth in time and space ### Day 2 String indexing (/ Regular expressions) ### Day 3 Mod ### Day 4 Regular expressions / Case statements ### Day 5 ...
// source: https://www.youtube.com/watch?v=LqQisRVhgPE int settime = 1000; float Kp=0.7, Ki=1, Kd=0.2; float Pout, Iout, Dout; float actPWD; // syngal wyjsciowy regulatora float error, lastError; float target_speed = 50; // target speed float errorSum; // suma bledow dla czesci calkujacej float Derror; // error roznic...
// using UnrealBuildTool; public class SurvivalGame : ModuleRules { public SurvivalGame(ReadOnlyTargetRules Target) : base(Target) { /* AIModule is not assigned by default, must be added when dealing with AI in your project */ PublicDependencyModuleNames.AddRange(new string[] { "Core...
/** * Copyright (c) 2015-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * * @flow */...
# U24HelperScripts Scripts for data conversion and preparation ## python * convertPreclincalData.py - convert from raw/bin files into nifti files\ usage: python convertPreclinicalData.py /input/dir /output/dir subjectID
//******************************************************************************* // COPYRIGHT NOTES // --------------- // This is a part of the BCGControlBar Library // Copyright (C) 1998-2006 BCGSoft Ltd. // All rights reserved. // // This source code can be used, distributed or modified // only under terms and condi...
<?php $all_files = glob("posts/*.*"); for ($i=0; $i<count($all_files); $i++) { $image_name = $all_files[$i]; $supported_format = array('jpg','jpeg'); $ext = strtolower(pathinfo($image_name, PATHINFO_EXTENSION)); if (in_array($ext, $supported_format)) { echo '<img src="'.$ima...
require 'fog/core' require 'fog/json' require 'fog/xml' module Fog module Radosgw autoload :Provisioning, File.expand_path('../radosgw/provisioning', __FILE__) autoload :Usage, File.expand_path('../radosgw/usage', __FILE__) autoload :MultipartUtils, File.expand_path('../radosgw/multipart_utils', __FILE__...
require "timecop" describe PerformancePlatform::Presenter::Volumetrics do before do Timecop.freeze(Date.parse("04-04-2018")) end after do Timecop.return end let(:stats) do { period: "day", metric_name: "volumetrics", period_before: 0, cumulative: 0, sms_period_befo...
#!/usr/bin/env bash # 这里的\转义了一个换行符(变成续行符), # 效果就是variable=echo "$variable" # \不能单独赋值 variable=\ echo "$variable" variable=\ 23skidoo echo "$variable" variable=\ # 转义一个空格 echo "$variable" variable=\\ echo "$variable" # 第一个\转义第二个,但第3个\又变成裸体了 variable=\\\ echo "$variable" # 又恢复正常了 variable=\\\\ echo "$variable...
# Jupyter Notebook for *Literate Computing for Reproducible Infrastructure* *Literate Computing for Reproducible Infrastructure(LC4RI)* 実践のためのJupyter Notebook環境です。 https://literate-computing.github.io - [01_About NII Extensions - NII謹製の機能拡張について](01_About%20NII%20Extensions%20-%20NII謹製の機能拡張について.ipynb) - このNotebook環...
use 5.014; use strict; use warnings; use Test::More; =name Data::Object::Utility =abstract Data-Object Utility Functions =synopsis use Data::Object::Utility; my $array = Data::Object::Utility::Deduce []; # Data::Object::Array my $value = Data::Object::Utility::Detract $array; # [,...] =libraries Data::...
use std::cell::RefCell; use crate::issue::{ContentProvider, Description, ContentLog}; pub struct FsContentProvider; impl ContentProvider for FsContentProvider { fn description(&self) -> Option<Description> { unimplemented!() } fn log(&self) -> ContentLog { unimplemented!() } } pub st...
<?php namespace App\Http\Controllers\workshop; use App\AutomobileWorkShop; use App\Http\Controllers\Controller; use Illuminate\Foundation\Auth\RegistersUsers; use Illuminate\Http\Request; use Intervention\Image\Facades\Image; class RegisterController extends Controller { // use RegistersUsers; public fun...
var terraform = require('../../../common/terraform'); module.exports = { copy: function (fs, answers, configFile = 'terraform.tfvars.json') { var config = { APP: answers.name, CREATOR: "cloudcommons", KUBERNETES_CLUSTER_NAME: answers.name, LOCATION: answers....
--- layout: post title: "Hello World" date: 2019-04-03 excerpt: "Hello, world!" tag: - Miscellaneous comments: true --- ### Hello, world! 这是一篇从2018年咕到现在的博客(~~其实我还能再咕~~ 今后应该会周更?(谁知道呢, 到时候再咕吧 嘻嘻QAQ 内容以一周内学习总结为主(确信
import { UserServicesController } from './user-services-controller'; import { CategoriesController } from './categories-controller'; import { CalendarsController } from './calendars-controller'; import { EventsController } from './events-controller'; import { ArticlesController } from './articles-controller'; import { ...
import Form from './Form'; import {Values} from './FormStorage'; import {resolvePromise} from './helpers/helpers'; import DebouncedCall from './helpers/DebouncedCall'; type Handler = (values: Values) => Promise<void> | void; export default class SaveControl { private readonly form: Form; private readonly deboun...
#!/usr/bin/env bash # # Deploys server cert and key to a local Connectware instance. # # Usage: # - Start this script # - Restart the connectware_connectware_1 container # - Wait for 20-40 seconds # # CERT_PATH=${1:-certificate.crt} KEY_PATH=${2:-privateKey.key} CERT_DEPLOYMENT_CONTAINER=${3:-connectware_connectware_1...
@TestOn('vm') import 'dart:typed_data'; import 'package:hive/src/io/synced_file.dart'; import 'package:mockito/mockito.dart'; import 'package:test/test.dart'; import 'common.dart'; void main() { group('SyncedFile', () { test('open', () {}); test('.readAt()', () async { var readFile = RAFMock(); ...