text
stringlengths
27
775k
using System; using NSaga; using NSaga.AzureTables; using NSaga.SimpleInjector; using SimpleInjector; namespace Samples { public class AzureTableStorageSample { private ISagaMediator sagaMediator; public void Run() { try { // You need Azure Stor...
def caesar_cipher(string) alphabet = Array('a'..'z') encrypter = Hash[alphabet.zip(alphabet.rotate(1))] string.chars.map { |c| encrypter.fetch(c, " ") } end p 'Enter the word you want to be encrypted:' p caesar_cipher(gets.chomp).join
class RegularEventUpdateJob < ApplicationJob queue_as :default def perform(*args) RegularEvents::Daily1UpdateJob.perform_now RegularEvents::Daily2UpdateJob.perform_now RegularEvents::Weekly1UpdateJob.perform_now RegularEvents::Weekly2UpdateJob.perform_now RegularEvents::MonthlyUpdateJob.perform...
# minikube [![asciicast](minikube-setup.gif)](https://asciinema.org/a/7JhlsED9rIJaZaE5wvOxSbpY9?autoplay=1)
-- CREATE VIEW create table tab1 (i1 integer, i2 integer); create view v1 as select i1 from tab1; create or replace view v1 as select i2 from tab1; drop view v1; drop table tab1;
namespace CatenaX.NetworkServices.Registration.Service.CDQ.Model { public class FetchBusinessPartnerDto { public string cdqId { get; set; } public string dataSource { get; set; } public Businesspartner businessPartner { get; set; } } public class Businesspartner { ...
// // based on: https://github.com/KhronosGroup/glTF-Sample-Viewer/blob/master/src/shaders/punctual.glsl#L20 // export enum LightType { Directional = 0, Point = 1, Spot = 2, }
package opennlp.scalabha.ccg /** A lexical entry: a word and category associated with it. */ case class LexicalEntry (word: String, cat: Cat) /** * A helper object that constructs a Map from words to the sets of * categories associated with them, based on a flat input lexicon. */ object Lexicon { lazy val catPa...
package shadows.click.block.gui; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.inventory.Container; import net.minecraft.inventory.Slot; import net.minecraft.item.ItemStack; import net.minecraftforge.items.SlotItemHandler; import shadows.click....
package com.ctrlaccess.moviebuff.ui import androidx.test.ext.junit.rules.ActivityScenarioRule import dagger.hilt.android.testing.HiltAndroidRule import dagger.hilt.android.testing.HiltAndroidTest import dagger.hilt.android.testing.HiltTestApplication import org.junit.After import org.junit.Before import org.junit.Rule...
<?php namespace frontend\models; use Yii; use yii\base\Model; use common\models\User; use frontend\models\WenetApp; class AuthorisationForm extends Model { public $appId; public $publicScope = []; public $readScope = []; public $writeScope = []; public $userId; public $allowedPublicScope; ...
{-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE OverloadedStrings #-} module Hassistant.Header where import qualified GHC import qualified Exception import qualified DynFlags import qualified Util import qualified Outputable import qualified GHC.Paths import Control.Applicative import qualified Data.Text as T imp...
package goalg_test import ( "testing" "github.com/ericpai/goalg" "github.com/stretchr/testify/assert" ) func TestHeap(t *testing.T) { h := goalg.NewHeap([]interface{}{5, 4, 3, 2, 1}, func(i, j interface{}) bool { return i.(int) < j.(int) }) assert.Equal(t, 5, h.Len()) assert.Equal(t, 1, h.Top()) assert.Equ...
# persist.py # # Implement limited persistence. # # Simple interface: # persist.save() save __main__ module on file (overwrite) # persist.load() load __main__ module from file (merge) # # These use the filename persist.defaultfile, initialized to 'wsrestore.py'. # # A raw interface also exists: # persist.writedict(di...
exports.up = function(knex) { return knex.schema.createTable('users', tbl => { tbl.increments("id"); tbl.string('username', 128).notNullable().unique(); tbl.string('password', 128).notNullable(); tbl.string('firstName', 128).notNullable(); tbl.string('lastName', 128).notNull...
module Chouette class LineNotice < Chouette::ActiveRecord before_validation :define_line_referential, on: :create has_metadata include LineReferentialSupport include ObjectidSupport belongs_to :line_provider, required: true # We will protect the notices that are used by vehicle_journeys ...
// // main.cpp // basicCube // // Created by George Papagiannakis on 23/10/12. // Copyright (c) 2012 University Of Crete & FORTH. All rights reserved. // // basic STL streams #include <iostream> // GLEW lib // http://glew.sourceforge.net/basic.html #include <GL/glew.h> //Simple DirectMedia Layer...
from django.test import Client, TestCase from django.urls import reverse from ..models import MoviePanel, MovieGenre, Movie class MoviePanelView(TestCase): def setUp(self): self.client = Client() self.moviepanel = MoviePanel.objects.create(name='test panel') self.moviegenre = MovieGenre.o...
/** ****************************************************************************** * @file ADPD105.c * @brief Source file for ADPD105 photometric front end. * @version V0.1 * @author ADI * @date April 2017 * @par Revision History: * - V0.1, April 2017: initial version. * *********************...
exports.config = { environment: 'development', common: { database: { name: process.env.DB_NAME_DEV }, session: { secret: process.env.SESSION_SECRET, expTimeSeconds: parseInt(process.env.SESSION_EXP_TIME_SECONDS) }, jsonPlaceHolderApi: { baseUrl: process.env.JSON_PLACE_HOL...
# # $Id: file.pm,v 1.19 1999/04/23 17:54:02 gisle Exp $ package LWP::Protocol::file; require LWP::Protocol; @ISA = qw(LWP::Protocol); use strict; require LWP::MediaTypes; require HTTP::Request; require HTTP::Response; require HTTP::Status; require HTTP::Date; require URI::Escape; require HTML::Ent...
CREATE TABLE newsletter_issues ( newsletter_issue_id uuid NOT NULL, title TEXT NOT NULL, text_content TEXT NOT NULL, html_content TEXT NOT NULL, published_at TEXT NOT NULL, PRIMARY KEY(newsletter_issue_id) );
CREATE OR REPLACE FUNCTION create_jwt(p_user_id uuid) RETURNS TEXT AS $$ DECLARE v_payload jsonb; v_token text; BEGIN SELECT jsonb_build_object( 'email', email, 'exp', extract(epoch from now())::int + app.get_setting_text('jwt_lifetime')::int, 'role', 'apiuser' -- apiuser is the PG rol...
export const defaultTheme = { boxplot: { sortIndicator: 'red', stroke: 'black', dotSize: 5, box: 'grey', outlier: 'black', }, }; export type Theme = typeof defaultTheme;
! ! CRTM_GeometryInfo_Define ! ! Module defining the CRTM GeometryInfo container object. ! ! ! ! CREATION HISTORY: ! Written by: Paul van Delst, 19-May-2004 ! paul.vandelst@noaa.gov ! MODULE CRTM_GeometryInfo_Define ! ------------------ ! Environment set up ! ------------------ ...
<?php namespace app\backend\model; use think\Model; class ItemAttrKey extends Model { public function vals() { return $this->hasMany('ItemAttrVal','attr_key_id'); } }
# investment 1. 技术分析 短期交易策略 1. 基础分析 1. 公司金融 corporate finance 1. investment 七个问题 1. 如何配置财富 1. 什么是好的股票 risk/benefit 1. 股票定价是否合理 capm & apt模型 1. 什么样的基金经理 1. 主动 无效的市场中寻找被错误定价的资产 1. 被动 有效的市场 1. 如何评估一个基金的表现 portfolio performance evaluation ? 1. 股票和债券的取表 stock pricing/ bond pricing, YTM and term structure. 1....
/* * By-Health Front-end Team (https://www.by-health.com/) * * Copyright © 2016-present By-Health Co Ltd. All rights reserved. */ import { Options } from 'http-proxy-middleware'; declare interface ProxyOptions extends Options { context: string | string[]; } // Configure proxy middleware // https://github.com/ch...
# Haraka Haraka is a secure and efficient hash function, designed specifically to process short inputs and be very fast on modern platforms which support AES-NI. One of the main applications for such a design is the use in hash-based signature schemes like XMSS and SPHINCS. ## Features - Supports AES-NI - Low Latenc...
<?php declare(strict_types=1); namespace MsgPhp\Domain\Entity\Features; use MsgPhp\Domain\Entity\Fields\EnabledField; use MsgPhp\Domain\Event\{DisableEvent, EnableEvent}; /** * @author Roland Franssen <franssen.roland@gmail.com> */ trait CanBeEnabled { use EnabledField; public function enable(): void ...
#include <iostream> #include <cstring> // evolucao da string.h e diferente da string using namespace std; int main (int argc, char** argv){ /* funcoes: - strcpy(origem, destino); - strncpy(origem, destino, quantidade de char que quero copiar) - strcmp(str1, str2); // retorna 0 se forem iguais - strncmp(str...
#if defined(Hiro_HorizontalLayout) struct mHorizontalLayout : mLayout { using type = mHorizontalLayout; using mLayout::append; using mLayout::remove; auto append(sSizable sizable, Size size, signed spacing = 5) -> type&; auto minimumSize() const -> Size override; auto modify(sSizable sizable, Size size, s...
//! ## FTP transfer //! //! `ftp_transfer` is the module which provides the implementation for the FTP/FTPS file transfer /** * MIT License * * termscp - Copyright (c) 2021 Christian Visintin * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated docume...
/* URLify: Write a method to replace all spaces in a string with'%20'. You may assume that the string has sufficient space at the end of the string to hold the additional characters, and that you are given the "true" length of the string. (Note: Please use a character array so that you can perform this operation in ...
namespace Octokit.Webhooks.Events.DiscussionComment { using JetBrains.Annotations; [PublicAPI] public sealed record DiscussionCommentAction : WebhookEventAction { public static readonly DiscussionCommentAction Created = new(DiscussionCommentActionValue.Created); public static readonly ...
import 'package:payouts/src/pivot.dart' as pivot; import 'constants.dart'; typedef _EntryComparator = int Function(Map<String, dynamic> a, Map<String, dynamic> b); int _compareInvoiceNumber(Map<String, dynamic> a, Map<String, dynamic> b) { final String aVal = a[Keys.invoiceNumber]; final String bVal = b[Keys.inv...
module Nessus # This class represents each of the /NessusClientData_v2/Report/ReportHost/ReportItem # elements in the Nessus XML document. # # It provides a convenient way to access the information scattered all over # the XML in attributes and nested tags. # # Instead of providing separate methods for ea...
# This file is automatically required when twenv.rb starts. # Add and require other code you'd like to use here. # require_relative '../lib/foobar/foobar.rb' # require_relative 'foobar.rb' # etc..
# Define a bare test case to use with Capybara class ActiveSupport::IntegrationCase < ActiveSupport::TestCase include Capybara::DSL include Rails.application.routes.url_helpers end
# overeact (IN DEVELOPMENT - NOT READY FOR USE) Component library meant for improving React Native development speed.
package com.linecorp.kotlinjdsl.spring.data.reactive import com.linecorp.kotlinjdsl.query.clause.select.SingleSelectClause import com.linecorp.kotlinjdsl.query.creator.SubqueryCreatorImpl import com.linecorp.kotlinjdsl.querydsl.expression.col import com.linecorp.kotlinjdsl.querydsl.expression.column import com.linecor...
using System; using System.Collections.Generic; namespace PierresPatisserie.Bread { public class BreadOrder { public int BreadQuantity { get; set; } public int BreadPrice { get; set; } public int BreadCost { get; set; } public BreadOrder(int breadQuantity, int breadPrice) { BreadQuan...
# ============================================================================== # Copyright 2018-2020 Intel Corporation # # 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://ww...
import { Injectable } from '@nestjs/common'; import { students } from 'src/db'; import { FindStudentsResponseDto } from './dto/student.dto'; @Injectable() export class StudentService { students = students; getStudents(): FindStudentsResponseDto[] { return this.students; } getStudentById(id) { return t...
# frozen_string_literal: true require 'spec_helper' RSpec.describe PhisherPhinder::Mail do let(:base_headers) do { original_email: '', original_headers: '', original_body: '', headers: {}, tracing_headers: [], authentication_headers: [], body: '' } end describe ...
# Monitoring ### Open Source NetData #### Réseau : :round_pushpin: `SolarWinds Network Performance Monitor (NPM)` Paessler PRTG Network Monitor WhatsUp Gold `Nagios` #### [SIEM](https://en.wikipedia.org/wiki/Security_information_and_event_management): :round_pushpin: `Dell EMC RSA Netwit...
#!/bin/bash GIT_ROOT=$(git rev-parse --show-toplevel) cd $GIT_ROOT # The first line of the tests are # always empty if there are no linting errors has_errors=0 echo "Running flake8 on bentoml module.." output=$( flake8 --config=.flake8 bentoml ) firstline=`echo "${output}" | head -1` echo "$output" if ! [ -z "$fi...
package com.example import java.util.Date import akka.actor.{Actor, ActorLogging, Props} import scala.concurrent.ExecutionContext.Implicits.global import scala.concurrent.duration._ /** * Created by anand on 1/14/16. */ class ScheduleActor extends Actor with ActorLogging { import ScheduleActor._ def receiv...
import { Story, Meta } from '@storybook/react/types-6-0'; import TagsGrid, { TagsGridProps } from '.'; export default { component: TagsGrid, title: 'Containers/TagsGrid', argTypes: {}, } as Meta; const Template: Story<TagsGridProps> = ({ ...rest }: TagsGridProps) => <TagsGrid {...rest} />; export const Defaul...
#! /bin/bash -e # Check that valid parameters have been specified. if [ $# -ne 2 ] || ([ "$1" != "11" ] && [ "$1" != "12" ] && [ "$1" != "14" ] && [ "$1" != "15" ]) || ([ "$2" != "Debug" ] && [ "$2" != "Release" ]) then echo "Usage: build-win.sh {11|12|14|15} {Debug|Release}" exit fi # Check that msbuild is on th...
../../train -q -s 0 -c 50 -e 0.000001 ../ML_HW4_train_ZSpace.txt ../../predict ../ML_HW4_test_ZSpace.txt ./ML_HW4_train_ZSpace.txt.model ../P19/P19.txt
#!/usr/bin/perl use strict; my $num_pairs = 30; print <<EOS; //##### This file is generated by $0 ##### EOS ## JSON_VALUE* ## print <<EOS; #define JSON_VALUE_2(Name_1_, Type_1_, Name_2_, Type_2_) \\ JSON_VALUE(Name_1_, BCL_JOIN(Type_1_)) \\ JSON_VALUE(Name_2_, BCL_JOIN(Type_2_)) EOS my $a1 = 'Name_1_, Type_1_, ...
--- title: 'Web Pick 6 - 3 rapid prototyping exercises to improve your UX skills' embedly_card_title: '3 rapid prototyping exercises to improve your UX skills' embedly_card_alignment: left embedly_card_url: 'https://uxdesign.cc/3-rapid-prototyping-exercises-to-improve-your-skills-in-ux-design-f2c8b2d690b3' published: t...
using System.Collections; using System.Collections.Generic; using UnityEngine; public class LightFlicker : MonoBehaviour { Light myLight; Material mat; [SerializeField] float flickerThreshold = 0.6f; [SerializeField] float noiseSpeed = 0.01f; float noiseTime = 0f; float noiseOffset; [Se...
import { IDependency } from './IDependency'; export interface IDependencyChain extends IDependency { chain: string; }
import scala.language.experimental.macros import scala.reflect.macros.blackbox.Context object Macros { def impl(c: Context) = { import c.universe._ def test(tree: Tree, mode: c.TypecheckMode): String = { try c.typecheck(tree, mode, silent = false).tpe.toString catch { case c.TypecheckException(_...
#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR) #pragma warning disable using System; using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1; using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509; namespace BestHTTP.SecureProtocol.Org.BouncyCastle.X509 { /** * A holding class for co...
# 1. react-ssr-docs + 这个仓库是关于 react 服务端渲染的使用介绍,从 webpack 的基础配置到最后项目成型,都有非常完整详细的介绍,并附带有源代码 + 目前这只是一个 react 服务端渲染的学习文档,后期会加上一个简单的项目,用来实际体验 react 服务端渲染 + 注: 这个项目只是用来学习 react 的服务端渲染,而非安利大家一定要使用服务端渲染,因为 react 和 vue 的服务端渲染和普通的服务端渲染有很多的不一样,所以可以学习一下,提高一下自己的水平 # 2. 技术栈 + 基本上是完全使用了 react 全家桶,后端采用的是 Express + 关于版本,具体可以查看 package...
package mybatis.demo.phase03.test; import java.io.InputStream; import java.util.List; import com.github.pagehelper.PageInfo; import mybatis.demo.phase03.mapper.UserMapper; import mybatis.demo.phase03.po.User; import mybatis.demo.phase03.po.UserExample; import org.apache.ibatis.io.Resources; import org.apache.ibatis.s...
# react-broadcast [![Travis][build-badge]][build] [![npm package][npm-badge]][npm] [build-badge]: https://img.shields.io/travis/ReactTraining/react-broadcast/master.svg?style=flat-square [build]: https://travis-ci.org/ReactTraining/react-broadcast [npm-badge]: https://img.shields.io/npm/v/react-broadcast.svg?style=fla...
#include "Terrain.h" #include "../Physics/Ray.h" #include "ChunkIndex.h" #include "../SaveError.h" #include <iostream> #include <fstream> #include <sys/stat.h> using namespace std; const int RENDER_DIST = 5; Terrain::Terrain(Player* player) : Entity("Terrain") , player(player) , raycast_listener(ID, [t...
require "ablerc/version" require "active_support" require "active_support/core_ext" require "rainbow" module Ablerc autoload :Option, 'ablerc/option' autoload :DSL, 'ablerc/dsl' autoload :Context, 'ablerc/context' autoload :Configuration, 'ablerc/configuration' autoload :St...
<?php declare (strict_types=1); namespace App\NewsReview\Domain\Routing\Model; interface RouteInterface { public function hostname(): string; public function toArray(): array; }
// Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may...
--- layout: post title: VolgaCTF 2017 Teaser の write-up categories: [ctf] date: 2017-02-26 05:51:00 +0900 --- チーム Harekaze で [VolgaCTF 2017 Teaser](https://teaser.2017.volgactf.ru/) に参加しました。 最終的にチームで 110 点を獲得し、順位は 34 位 (得点 80 チーム中) でした。うち、私は 1 問を解いて 100 点を入れました。 以下、解いた問題の write-up です。 ## [Stegano 100] Universal Tex...
# install these packages library(tidyverse) library(reshape2) library(here) library(ggthemes) library(knitr) source("functions.r") # sourcing all functions ######################################################################## #### Read in data ------------------------------------------------------ ################...
#include "DQMServices/Core/interface/DQMStore.h" #include "DQMServices/Core/interface/MonitorElement.h" #include "FWCore/Framework/interface/ESHandle.h" #include "FWCore/Framework/interface/Event.h" #include "FWCore/Framework/interface/Frameworkfwd.h" #include "FWCore/ServiceRegistry/interface/Service.h" #include "Vali...
<? $MESS["SONET_LOG_COMMENT_EMPTY"] = "The message text is empty."; $MESS["SONET_LOG_COMMENT_NO_PERMISSIONS"] = "You don't have permission to add comments."; $MESS["SONET_LOG_CREATED_BY_ANONYMOUS"] = "Unauthorized Visitor"; ?>
<?php /** * Criado por: Rafael Dourado * Data: 28/10/2020 * Hora: 10 : 44 */ declare(strict_types=1); namespace Mercatus\PaymentApi\Domain\Repositories\Getnet; use Mercatus\PaymentApi\Domain\OrderInterface; use Mercatus\PaymentApi\Domain\PaymentMethods\CreditCardInterface; use Mercatus\PaymentApi\Domain\Payment...
# Tutorial - How to Build a Connector !!! note "Important changes by release" This [page](https://www.notion.so/hummingbot/a26c8bcf30284535b0e5689d45a4fe88?v=869e73f78f0b426288476a2abda20f2c) lists all relevant updates to Hummingbot codebase aimed to help connector developers in making the requisite changes to the...
import scala.reflect.{ClassTag, classTag} object Test extends App { println(implicitly[ClassTag[Byte]] eq ClassTag.Byte) println(implicitly[ClassTag[Byte]]) println(implicitly[ClassTag[Short]] eq ClassTag.Short) println(implicitly[ClassTag[Short]]) println(implicitly[ClassTag[Char]] eq ClassTag.Char) print...
#!/usr/bin/env ruby require 'uri' ARGF.each_line do |line| begin print URI.parse(URI.escape(line.strip)) rescue print "## invalid URI: '#{line.strip}' ##" end unless ARGF.eof? print "\n" end end
<?php namespace common\models; use Yii; use yii\behaviors\SluggableBehavior; use yii\behaviors\TimestampBehavior; use yii\behaviors\BlameableBehavior; use \common\models\base\FlatPageLang as BaseFlatPageLang; /** * This is the model class for table "flat_page_lang". */ class FlatPageLang extends BaseFlatPageLang {...
class Promethee::StructureUpgraderService BASE_COMPONENTS = { aside: Promethee::StructureUpgrader::Components::Aside, blockquote: Promethee::StructureUpgrader::Components::Blockquote, collection: Promethee::StructureUpgrader::Components::Collection, collection_item: Promethee::StructureUpgrader::Compo...
# frozen_string_literal: true module BunnyMock module Exchanges class Topic < BunnyMock::Exchange # @private # @return [String] Multiple subdomain wildcard MULTI_WILDCARD = '#'.freeze # @private # @return [String] Single subdomain wildcard SINGLE_WILDCARD = '*'.freeze #...
// Copyright 2021 Code Intelligence GmbH // // 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 a...
package hm.binkley.labs.skratch.math.matrix import java.util.Objects.hash interface HasA<N, Norm : GeneralNumber<Norm, Norm>, M> where N : GeneralNumber<N, Norm>, M : SquareMatrix<N, Norm, M> { val a: N } abstract class Matrix1x1<N, Norm : GeneralNumber<Norm, Norm>, M>( a: N, ) : Sq...
extension DateWeekExtensions on DateTime { /// The ISO 8601 week of year [1..53]. /// /// Algorithm from https://en.wikipedia.org/wiki/ISO_week_date#Algorithms int get weekOfYear { // Add 3 to always compare with January 4th, which is always in week 1 // Add 7 to index weeks starting with 1 instead of 0...
--- title: Test date: 2019-07-06T20:13:19.000+00:00 background_color: "#B4CEC8" contact_info: twitter_handle: forestryio github_handle: forestryio email: les.turner@me.com twitter_url: https://twitter.com/forestryio github_url: https://github.com/forestryio type: '' --- ## This is a test
require 'nokogiri' require 'fileutils' require 'csv' require 'net/http' module SitemapGen IGNORE_DIRS_REGEX = /img|cgi-bin|images|css|js/i autoload :CSV, 'sitemap_gen/csv' autoload :Fixer, 'sitemap_gen/fixer' autoload :XMLCrawler, 'sitemap_gen/xml_crawler' def self.generate(dir_path, base_url, save_path = ...
import { Record, Set } from 'immutable'; import { Dmca } from './dmca/dmca'; import { Cp } from './cp'; export class Takedown extends Record( { id: undefined, reporterId: undefined, involvedIds: [], // We must send usernames becasue of T168571 // @link https://phabricator.wikimedia.org/T168571 involvedNames: [],...
require "spec_helper" RSpec.describe Array do let(:empty_array) {["","","","","","",""]} let(:test_connected_four) {["RED","RED","RED","RED","YELLOW","YELLOW","YELLOW"]} let(:test_unconnected_four) {["RED", "YELLOW", "RED", "RED", "RED", "", "YELLOW"]} describe "#all_empty?" do context "checks for empty elemen...
import 'package:cartesian_graph/coordinates.dart'; import 'package:cartesian_graph/graph_bounds.dart'; import 'package:flutter_test/flutter_test.dart'; void main() { group('Input validation', () { test('should mandate larger max x than min x', () { expect(() => GraphBounds(2, 1, -2, 2), throwsAssertionErro...
#include "FileReader.h" namespace FileReader { std::string readFileAsString(std::string filePath) { std::ifstream t(filePath); std::stringstream buffer; buffer << t.rdbuf(); return buffer.str(); } } // namespace FileReader
package software.orpington.rozkladmpk.routeDetails import software.orpington.rozkladmpk.BaseView import software.orpington.rozkladmpk.data.model.RouteDirections import software.orpington.rozkladmpk.data.model.RouteInfo import software.orpington.rozkladmpk.data.model.Timeline import software.orpington.rozkladmpk.data.s...
import { TemplateRef } from '@angular/core'; import { Observable, Subscription } from 'rxjs'; import { ESCAPE } from '@angular/cdk/keycodes'; import { HorizontalConnectionPos, VerticalConnectionPos } from '@angular/cdk/overlay'; export type LuPopoverScrollStrategy = 'reposition' | 'block' | 'close'; export declare in...
import React from 'react'; import List from 'grommet/components/List'; import PageTypeListItem from './listItem'; export default function PageTypeList({ pageTypes, onMenuItemClick }) { if (!pageTypes || pageTypes && !pageTypes.length) { return null; } return ( <List style={{ maxWidth: '100vw' }}> {...
/*=== extensible: true extensible: false extensible: false undefined bar ===*/ function basicTest() { function printObj(o) { print('extensible: ' + Object.isExtensible(o)); } var proto = {}; var obj = Object.create(proto); printObj(obj); Object.preventExtensions(obj); printObj(obj...
package fr.eisti.recuit; /** * Users: Lucie Anglade, Cécile Riquart * Date: 12/5/14 * Time: 3:29 PM * To change this template use File | Settings | File Templates. */ public class AffichageMatriceCarreeDouble { /** * afficherMatriceDouble : affiche une matrice de double * @param matriceAffiche : la ...
'use strict'; var fs = require('fs'); var path = require('path'); var rimraf = require('rimraf'); exports.getCacheDir = getCacheDir; function getCacheDir(index, name) { name = name || 'api'; var tmpPath = path.resolve(__dirname, '../../../tmp', name); try { fs.mkdirSync(tmpPath); } catch (err) {} var...
# Basic API for node and mongodb ### Prerequisites ``` - node js ^8.x.x - mongodb ``` ### Installing Clona el repositoio ``` git clone https://github.com/josuedor/api-node-basic.git ``` Instalas las dependencias ``` npm install ``` Configura las variables de entorno de la aplicación, crea tu archivo .env en la...
sub data_do_nothing { } __DATA__ sub data_another_fn { } =head1 CAPTURE ME in DATA =cut
{- "Devuelve True/False si un elemento está dentro de una lista" Nota: Un string es una lista de caracteres "ABC" == ['A', 'B', 'C'] > elem 3 [1,2,3,4] True > elem 3 [1,2,4] False > elem 'a' "abc" True > elem 'a' "bc" False -}
package util import ( "os" "github.com/Cray-HPE/yapl/model" "gopkg.in/yaml.v2" ) func getCacheDir() string { res := "/etc/cray/yapl/.cache" if mp := os.Getenv("CACHE_DIR"); mp != "" { res = mp } return res } func PushToCache(genericYAML model.GenericYAML) error { if err := os.MkdirAll(getCacheDir(), os.Mo...
// Copyright (c) Johnny Z. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. namespace DotNetty.NetUV.Tests.Handles { using System; using DotNetty.NetUV.Handles; using DotNetty.NetUV.Native; using Xunit; public sealed class ...
FecMall用户取消订单 ============== > 订单创建后,用户进行订单取消的操作 ### 订单取消操作 用户可以在`账户中心`, 订单管理功能页面,点击`取消`按钮 ![xx](images/order-4.png) 1.`订单直接取消`:对于`未订单审核`,`未发货`的订单,当用户进行`订单取消`操作 , 提交后,`订单直接取消`,不需要经销商审核,如果订单已经支付,那么会发生 订单`退款`,需要在`平台商`进行`订单取消`退款(目前退款为`线下退款`,也就是通过支付渠道退款,然后在商城中更改状态) 2.`订单取消需要审核` 如果订单`用户`支付后,`经销商`审核订单操作通过后,如果这个时候...
../sratool*/bin/prefetch SRR11445486 ../sratool*/bin/prefetch SRR11445485 ../sratool*/bin/prefetch SRR11547279
import random import pygame import math from dataclasses import dataclass SIZE = (400, 400) MAX_LINE_LENGTH = 80 SPEED_MU = 20 MAX_SIZE = 3 WHITE = (255, 255, 255, 255) @dataclass class Star: pos: pygame.Vector2 speed: pygame.Vector2 size: int def update(self, screen, elapsed): pygame.draw....
import { Pipe, PipeTransform } from '@angular/core'; import { IMqttMessage } from 'ngx-mqtt'; @Pipe({ name: 'toVal', pure: false }) export class ToVal implements PipeTransform { transform(message: IMqttMessage): number { try { let payload: any = JSON.parse(message.payload.toString()); return payloa...
package com.geecommerce.mediaassets.converter; import java.util.Iterator; import org.apache.poi.ss.usermodel.Cell; import org.apache.poi.ss.usermodel.Row; import com.itextpdf.text.Phrase; import com.itextpdf.text.pdf.PdfPCell; import com.itextpdf.text.pdf.PdfPTable; public class SpreadShitToPdfConverter { prote...