text stringlengths 27 775k |
|---|
package com.programmableproduction.kafka.kotlin.testing
import java.net.InetAddress
import java.net.ServerSocket
object PortProvider {
fun appy(count: Int): Array<Int>{
return Array<Int>(count) { _ ->
val serverSocket =ServerSocket(0, 0, InetAddress.getLocalHost())
val port = ser... |
# hr()
#
# Usage:
# hr
#
# Description:
# Print a horizontal line with a length matching the width of the terminal.
hr() {
printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' -
}
|
package ch.hsr.ifs.gcs.mission.need.parameter
import ch.hsr.ifs.gcs.support.geo.GPSPosition
/**
* This [Parameter] implementation is used to define a region in which a need has to take place.
*
* @since 1.0.0
* @author IFS Institute for Software
*/
class Region : Parameter<List<GPSPosition>> {
override val ... |
import 'package:args/command_runner.dart';
import 'package:theta/theta.dart';
class CheckForIdle extends Command {
@override
final name = 'checkForIdle';
@override
final description =
'wait for camera to be idle after startCapture or self timer for next command';
@override
void run() async {
St... |
package io.grpc.routeguide
import java.util.logging.Logger
import akka.actor.ActorSystem
import akka.stream.ActorMaterializer
import io.grpc.{Server, ServerBuilder}
class RouteGuideServer(server: Server) {
val logger: Logger = Logger.getLogger(classOf[RouteGuideServer].getName)
def start(): Unit = {
server... |
using System;
using System.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;
using Moq;
using NPoco;
using Umbraco.Cms.Core.Cache;
using Umbraco.Cms.Core.Configuration;
using Umbraco.Cms.Core.Configuration.Models;
using Umbraco.Cms.Cor... |
/* This file is part of Into.
* Copyright (C) Intopii 2013.
* All rights reserved.
*
* Licensees holding a commercial Into license may use this file in
* accordance with the commercial license agreement. Please see
* LICENSE.commercial for commercial licensing terms.
*
* Alternatively, this file may be used und... |
#include <catch.hpp>
#include <rapidcheck/catch.h>
#include <sstream>
#include "util/Generators.h"
#include "util/TemplateProps.h"
#include "util/Serialization.h"
using namespace rc;
using namespace rc::test;
using namespace rc::detail;
namespace {
template <typename T>
bool messageContains(const T &msg, const std... |
# Requirements
- Java SDK (8)
- Scala Build Tool (sbt)
- http://www.scala-sbt.org/1.0/docs/Setup.html
- Spark (2.2.1)
- https://spark.apache.org/downloads.html
- local mode
Developed on an Ubuntu 16.04 linux system, using Oracle Java 8.
# Usage
This project uses the Scala Build Tool (sbt). To run examples, ... |
package Aula07
class Atleta(var nome: String, var nivel: Int, var energia: Int) {
}
|
/*
* Copyright (C) 2015 - 2020 Lightbend Inc. <https://www.lightbend.com>
*/
package com.typesafe.sslconfig.ssl
import java.security.KeyStore
import javax.net.ssl._
object FakeSSLTools {
/**
* NOT FOR PRODUCTION USE. Builds a "TLS" `SSLContext` and `X509TrustManager` initializing both with the keys and
* ... |
export const getHistory = state => state.history;
export const getId = state => state.history.id;
export const getAnnotationId = state => state.history.annotationstartId;
export const getAnnotationEntry = state => state.history.annotationstartEntry;
export const getAllAnnotations = state => state.history.annotations;
|
{
So does anyone have any good read-write routines that
will read/write words of bit legnths 9-13?
}
function add_code : integer;
const Input_bit_count : integer = 0;
Inbuf : longint =0;
var i : longint;
begin
while input_bit_count <= 24 do
begin
i := getnextbyte; { shftL/... |
Snd_DDZ2_Header:
smpsHeaderStartSong 3, 1
smpsHeaderVoice Snd_DDZ2_Voices
smpsHeaderChan $06, $03
smpsHeaderTempo $01, $1D
smpsHeaderDAC Snd_DDZ2_DAC
smpsHeaderFM Snd_DDZ2_FM1, $00, $0E
smpsHeaderFM Snd_DDZ2_FM2, $0C, $0E
smpsHeaderFM Snd_DDZ2_FM3, $00, $1B
smpsHeaderFM... |
module Rel8.Query.Null
( catNull
)
where
-- base
import Prelude
-- rel8
import Rel8.Expr ( Expr )
import Rel8.Expr.Null ( isNonNull, unsafeUnnullify )
import Rel8.Query ( Query )
import Rel8.Query.Filter ( where_ )
-- | Filter a 'Query' that might return @null@ to a 'Query' without any
-- @null@s.
--
-- Corresp... |
#include "sketch/mod.h"
#include <iostream>
using namespace sketch;
int main() {
modsketch_t<hash::WangHash, uint64_t,
policy::SizeDivPolicy<uint64_t>,
std::allocator<uint64_t>
> mod(16);
std::cerr << "div: " << mod.mod_.nelem() << '\n';
assert(mod.add(1 << 1... |
class Order < ApplicationRecord
belongs_to :food, optional: true
belongs_to :user
def self.unique_id
(Faker::Number.number(4) + Time.now.utc.to_i.to_s)
end
end
|
package org.miage.Entity;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.*;
import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
@Entity
@Table( name = "users",
uniqueConstraints = {
@UniqueConstraint(columnN... |
using FluentValidation;
using Paxstore.OpenApi.Model;
namespace Paxstore.OpenApi.Validator.MerchantCategory
{
public class MerchantCategoryCreateValidator: AbstractValidator<MerchantCategoryCreateRequest>
{
public MerchantCategoryCreateValidator(){
RuleFor(x => x.Name).NotEmpty().MaximumLen... |
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateAttendanceImportsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
/* Date Employee Code Employee Name
Company ... |
#include <boost/asio.hpp>
#include <functional>
#include <libdialler/listener.h>
#include <libdialler/listener_client.h>
#include <string>
using namespace boost::asio;
using namespace boost::asio::ip;
using namespace dialler;
listener_client::listener_client(uint64_t id_, async_io_ptr async_io, listener *s)
: id... |
// Package ntp provides ntp synchronized time
package ntp
import (
"context"
gotime "time"
"github.com/beevik/ntp"
"github.com/TarsCloud/TarsGo/tars/sync/time"
)
type ntpTime struct {
server string
}
type ntpServerKey struct{}
func (n *ntpTime) Now() (gotime.Time, error) {
return ntp.Time(n.server)
}
// New... |
using TMPro;
using UnityEngine;
using UnityEngine.UI;
namespace Knockback.Structs
{
}
|
package com.badoo.reaktive.coroutinesinterop
import com.badoo.reaktive.test.base.assertError
import com.badoo.reaktive.test.completable.assertComplete
import com.badoo.reaktive.test.completable.test
import kotlin.test.Test
class CompletableFromCoroutineTest {
@Test
fun completes_WHEN_coroutine_finished() {
... |
/*
* Licensed Materials - Property of IBM
*
* trousers - An open source TCG Software Stack
*
* (C) Copyright International Business Machines Corp. 2004, 2005
*
*/
#ifndef _TDDL_H_
#define _TDDL_H_
#include <threads.h>
#include "tcsd_wrap.h"
#include "tcsd.h"
struct tpm_device_node {
char *path;
#define TDD... |
#!/bin/sh
# Copyright (C) 2008 Red Hat, Inc. All rights reserved.
#
# This copyrighted material is made available to anyone wishing to use,
# modify, copy, or redistribute it subject to the terms and conditions
# of the GNU General Public License v.2.
#
# You should have received a copy of the GNU General Public Licens... |
require "bloc_works/version"
require "bloc_works/controller"
require "bloc_works/dependencies"
require "bloc_works/router"
require "bloc_works/utility"
module BlocWorks
class Application
def call(env)
# [status code, {header}, [body]]
# if the request is for a favicon
# return the 404 format ... |
package sake.command.builtin
import org.specs._
import scala.util.matching.Regex
import sake.util._
import sake.environment._
import java.io.{PrintStream, ByteArrayOutputStream}
object JVMCommandSpec extends Specification {
val savedDryRun = Environment.environment.dryRun
val savedLog = Log.log
var by... |
# Quickstart
Here is a template that will help you quickstart your project:
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Hello, world!</title>
<link rel="stylesheet" href="https:/... |
package sqs
import (
"fmt"
"github.com/pjmyburg/virago/config"
)
// SQS represents an instance of the SQS mock
type SQS struct {
queues map[string]queue
}
type queue struct {
url string
in chan message
inFlight chan message
}
type message struct {
body string
}
// New creates a new SQS instance a... |
const getScriptReadyState = () => {
return 'return document.readyState'
}
const getScriptClickCheckbox = (el) => {
return `document.getElementById('${el}').click(); return;`
}
const getScriptSelectDifficulty = (difficulty) => {
return `
let diffList = document.getElementById('difSelect').options;
for (let item... |
//! Response codes
use super::{Error, ErrorKind};
use crate::command;
use anomaly::{fail, format_err};
use serde::{de, ser, Deserialize, Serialize};
/// Codes associated with HSM responses
#[derive(Copy, Clone, Debug, Eq, PartialEq)]
pub enum Code {
/// Successful response for the given command type
Success(c... |
require "rspec/expectations"
RSpec::Matchers.define :be_a_file do
match do |path|
File.exists?(path)
end
end
RSpec::Matchers.define :be_a_directory do
match do |path|
Dir.exists?(path)
end
end
RSpec::Matchers.define :be_a_symlink do
match do |path|
File.symlink?(File.expand_path(path))
end
en... |
course_review_page = Proc.new do
menu parent: "Models"
permit_params :overall_rating, :challenge_rating, :inclusivity_rating, :comments, :course_id, :work_per_week
end
ActiveAdmin.register CourseReview, :namespace => :admin, &course_review_page |
class CommentsController < ApplicationController
def create
recipe = Recipe.find(params[:recipe_id])
if current_user != nil
@comment = recipe.comments.create(comment: params[:comment])
respond_to do |format|
format.json { render json: @comment }
end
else
redirect_to recipe,... |
// -----------------------------------------------------------------------
// <copyright file="ISenderContext.cs" company="Asynkron HB">
// Copyright (C) 2015-2018 Asynkron HB All rights reserved
// </copyright>
// -----------------------------------------------------------------------
using System;
using Sy... |
export { middlewareBuilder } from './middleware';
export { simplifyBuilder } from './builder';
export { httpMethod, ReduxServerAction } from './types';
|
#ifndef SIMPLE_SOURCE_INCLUDE_SIMPLE_SOURCE_H
#define SIMPLE_SOURCE_INCLUDE_SIMPLE_SOURCE_H
#include <cstdint>
int MyHeaderFunction();
inline int MyHeaderFunction()
{
return 5;
}
std::uint8_t Function();
int Foo();
inline int Foo()
{
std::uint8_t const a = 0U;
return a;
}
#endif // SIMPLE_SOURCE_INCLUD... |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
namespace Dapper.SimpleSave.Impl
{
public static class MemberInfoExtensions
{
public static IDictionary<Type, Attribute> GetAttributesDict(this MemberInfo member)
{
var target = n... |
import React from 'react';
import { Map } from 'reaviz';
import { feature } from 'topojson-client';
import geojson from 'world-atlas/countries-110m.json';
const worldData = feature(geojson, geojson.objects.countries);
export default () => (
<div style={{ margin: '55px', textAlign: 'center' }}>
<Map
data={... |
# frozen_string_literal: true
require 'rails_helper'
RSpec.describe NintendoPricesClient, type: :clients do
describe 'Configurations' do
it 'has default base_uri' do
expect(described_class.base_uri).to eq 'https://ec.nintendo.com/api'
end
end
describe '#fetch' do
subject(:result) { described_... |
// Copyright (c) The Libra Core Contributors
// SPDX-License-Identifier: Apache-2.0
use crate::transaction::Script;
use std::fmt;
#[test]
fn test_code_fmt() {
let expect_output = r#"Script {
code: "6d6f7665",
args: [],
}"#;
let script = Script::new(b"move".to_vec(), vec![], vec![]);
let mut output... |
import pytest
import gen.internals
from gen.exceptions import ValidationError
from gen.internals import Scope, Source, Target
def sample_fn_small():
pass
def sample_fn_normal(foo):
pass
def sample_fn_big(foo, bar, baz, ping=None, pong="magic"):
pass
def test_get_function_parameters():
get_funct... |
import PanelSlider from '../../src/index'
const slider = PanelSlider({
element: document.querySelector('.panel-set') as HTMLElement,
numPanels: 3
})
// Display live results from callbacks
function $e (id: string) {
return document.getElementById(id) as HTMLElement
}
const elId = $e('panelId')
const elPos = $e('p... |
/*
* 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 ... |
from unittest import TestCase
import os
import consul
import uuid
import time
from consul_lock import defaults
from consul_lock import EphemeralLock
def get_consul_client():
host = os.environ.get('CONSUL_LOCK_CONSUL_HOST')
port = os.environ.get('CONSUL_LOCK_CONSUL_PORT')
assert host, 'CONSUL_LOCK_CONSUL_H... |
program Calc32;
{$IFDEF FPC}
{$MODE Delphi}
{$ENDIF}
uses
{$IFnDEF FPC}
{$ELSE}
Interfaces,
{$ENDIF}
Forms, SysUtils,
Frm_CALC in '..\source\CALC32\Frm_CALC.PAS' {CalcForm},
Frm_CalcABOUT in '..\source\CALC32\Frm_CalcABOUT.PAS' {AboutForm};
{$IFNDEF FPC}
{$E EXE}
{$ENDIF}
{$R *.res}
func... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const util_base64_node_1 = require("@aws-sdk/util-base64-node");
const util_hex_encoding_1 = require("@aws-sdk/util-hex-encoding");
const _1 = require("./");
const hashVectors = require("hash-test-vectors");
describe("Md5", () => {
let idx... |
import 'dart:ui';
import 'package:cloud_firestore/cloud_firestore.dart';
import 'package:flutter/foundation.dart';
import 'package:intl/intl.dart';
import 'package:flutter_keep_notes/services.dart' show NoteQuery;
/// Data model of a note.
class Note extends ChangeNotifier {
final String id;
String title;
Stri... |
var _ = require('lodash');
function titleIsCool(isCool, title) {
if (isCool) {
var words = _.compact(title.split(/\W/));
return words.every(isCool);
}
else {
return true;
}
}
module.exports = titleIsCool;
|
<?php
/**
* @author Tharanga Kothalawala <tharanga.kothalawala@tsk-webdevelopment.com>
* @date 15-02-2021
*/
namespace TSK\SSO\ThirdParty\Stripe;
use TSK\SSO\ThirdParty\VendorConnection;
use TSK\SSO\ThirdParty\VendorConnectionFactory;
/**
* @package TSK\SSO\ThirdParty\Spotify
*/
class StripeConnectionFactory ... |
$ModulePath = Split-Path -Parent $MyInvocation.MyCommand.Path;
$ModulePath = Resolve-Path "$ModulePath\..\DeployCube\DeployCube.psd1";
import-Module -Name $ModulePath;
Describe "Find-AnalysisServicesDeploymentExeLocations" {
It "Finds some version" {
( Find-AnalysisServicesDeploymentExeLocations ) | Shou... |
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:little_tree_stronger_flutter/widgets/community/CommunityRoute.dart';
import 'package:little_tree_stronger_flutter/widgets/diet/DietRoute.dart';
import 'package:little_tree_stronger_flutter/widgets/exercise/Exercis... |
module Rubydora
class Datastream
def entity_size(response)
if content_length = response["content-length"]
content_length.to_i
else
response.body.length
end
end
end
end
|
package com.github.lany192.arch.fragment
import android.content.res.Configuration
import android.os.Bundle
import androidx.annotation.CallSuper
import androidx.fragment.app.Fragment
import androidx.lifecycle.LifecycleObserver
import androidx.lifecycle.ViewModel
import androidx.lifecycle.ViewModelProvider
import androi... |
// TARGET_BACKEND: JVM
// FIR_IDENTICAL
// FILE: Some.java
public class Some {
public static final String HELLO = "HELLO";
}
// FILE: AnnotationInAnnotation.kt
annotation class Storage(val value: String)
annotation class State(val name: String, val storages: Array<Storage>)
@State(
name = "1",
storages... |
import { promises as fs } from 'fs';
import { resolve } from 'path';
import execa from 'execa';
import { build } from '../src/cmds/build';
import { SnapsCliGlobals } from '../src/types/package';
// mock the snaps global
declare global {
// eslint-disable-next-line @typescript-eslint/no-namespace
namespace NodeJS ... |
require_relative 'helpers/title'
title("Classes")
# What if we could teach a little robot to do this
# whenever we turned it on and pressed a button?
# A class is like a factory that builds little robots
# that are called "instances"
class FizzBuzz
# when you turn it on, it needs input...
def initialize(number)
... |
import { HomeComponent } from './../home.component';
import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material';
import { Component, OnInit, Inject } from '@angular/core';
declare let Swiper: any;
@Component({
selector: 'app-modal',
templateUrl: './modal.component.html',
styleUrls: ['./modal.component.cs... |
################################################################################
# (C) Copyright 2016-2017 Hewlett Packard Enterprise Development LP
#
# 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 Licen... |
@model EventFinder.Models.Entity.User
<div class="partial-profile">
<section class="create-form">
<h3>Редактировать профиль</h3>
<form asp-controller="Profile" asp-action="EditProfile" method="post">
<div class="form-main">
<input type="hidden" asp-for="Id" required>
... |
/**
* GIBS Web Examples
*
* Copyright 2013 - 2018 United States Government as represented by the
* Administrator of the National Aeronautics and Space Administration.
* All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the 'License');
* you may not use this file except in compliance with ... |
#!/usr/bin/env bash
set -e
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
cd $DIR/..
# Bundle Kafka Lag Exporter Helm Chart into a tarball artifact. The `helm package` command will output the artifact
# in the CWD it is executed from.
echo Package helm chart
rm -f ./kafka-lag-exporter-*.tgz
hel... |
use crate::records;
use chrono::prelude::*;
use std::collections::HashMap;
pub struct Person {
pub firstname: String,
pub lastname: String,
pub birthday: String,
}
#[allow(dead_code)]
pub fn get_month_date(md: &String) -> (u32, u32) {
let month_str = md[0..2].to_string();
let date_str = md[2..].t... |
# require 'resque_web'
Rails.application.routes.draw do
# For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html
root to: 'about#about'
get '/search/:id', to: 'search#search', as: :search
get '/suggest/:id', to: 'suggest#suggest', as: :suggest
get '/about', to: '... |
import '@polymer/polymer/polymer-legacy.js';
import 'd2l-localize-behavior/d2l-localize-behavior.js';
import './namespace.js';
import './lang/all.js';
/* @polymerBehavior */
D2L.PolymerBehaviors.AnalyticsDashboards.LocalizeBehaviorImpl = {
properties: {
resources: {
value: function() {
return window.D2L.Polym... |
from PySide2.QtCore import *
from PySide2.QtWidgets import *
from PySide2.QtGui import *
from ..BindFilter import *
class ColorGrid(QFrame):
sigPicked = Signal(object)
def __init__(self, _gridX, _gridY, _gridSize):
QFrame.__init__(self)
self.setWindowFlags(Qt.Popup)
cLayout = QGridLayout(self)
cLayo... |
// Copyright 2019 The Operator-SDK 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
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or ... |
import { Dispatcher } from '../dispatcher/Dispatcher'
import { ActionTypes } from './ActionTypes'
import { AbstractActionCreator } from './AbstractActionCreator'
import { Keyword } from 'pluto-rd';
class ActionCreator extends AbstractActionCreator {
public clickKeyword(handle:string): void {
this.dispatch(... |
package com.example.demo.dao;
import com.example.demo.Entity.relation;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import java.util.List;
import java.util.Map;
public inter... |
const express = require("express");
const bodyParser = require("body-parser");
const cors = require("cors");
const morgan = require("morgan");
const { sequelize } = require("./models");
const config = require("./config/config");
const app = express();
require("dotenv").config();
// Used for logging
app.use(morgan("c... |
subroutine sq_snom
!! ~ ~ ~ PURPOSE ~ ~ ~
!! this subroutine predicts daily snom melt when the average air
!! temperature exceeds 0 degrees Celcius
!! ~ ~ ~ INCOMING VARIABLES ~ ~ ~
!! name |units |definition
!! ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ... |
CREATE SCHEMA test AUTHORIZATION test;
CREATE TABLE IF NOT EXISTS test.user
(
id integer NOT NULL,
count_pong NUMERIC,
PRIMARY KEY (id)
)
WITH (
OIDS = FALSE
);
ALTER TABLE test.user
OWNER to test;
-- CREATE OR REPLACE FUNCTION test.insrease_count(id_ INT) RETURNS VOID AS
-- $$
-- BEGIN
-- LOOP
-- UPDA... |
-- database: presto; groups: ml_functions
--!
SELECT classify(features(1, 2 + random(1)), model)
FROM (
SELECT learn_classifier(labels, features) AS model
FROM (VALUES (1, features(1, 2))) t (labels, features)
) t2
--!
|
using DragonSpark.Sources.Parameterized;
using System;
namespace DragonSpark.Sources
{
public sealed class CachedFactoryBuilder<T> : AlterationBase<Func<T>>
{
public static IParameterizedSource<Func<T>, Func<T>> Default { get; } = new CachedFactoryBuilder<T>();
CachedFactoryBuilder() {}
public override Func<T... |
# create-express-backend
Generator to scaffold Express backend projects using `npm init express-backend`
![node][node]
[![npm version][npm-badge]][npm]
[![dependencies Status][dependencies-badge]][dependencies]
[![devDependencies Status][dev-dependencies-badge]][dev-dependencies]
[![PRs Welcome][prs-badge]][prs]
[!... |
docker rm -f ch_sts_testserver &>/dev/null && echo 'Removed old container'
docker run --rm -d \
--name ch_sts_testserver \
--network=host \
--volume=$(pwd)/conf.d:/etc/clickhouse-server/conf.d \
--volume=$(pwd)/users.d:/etc/clickhouse-server/users.d \
--volume=$(pwd)/ssl/server.crt:/etc/clickhouse-server... |
require 'singleton'
require 'yaml'
require 'tree'
require 'redcarpet'
require 'pygments'
require 'rugged'
require_relative 'i-write-docs/diff_to_html'
require_relative 'i-write-docs/docs_tree'
require_relative 'i-write-docs/markdown_render'
require_relative 'i-write-docs/generator'
require_relative 'i-write-docs/doc_f... |
package fortos.configurations
import com.fasterxml.jackson.databind.ObjectMapper
import com.fasterxml.jackson.dataformat.yaml.YAMLFactory
import com.fasterxml.jackson.module.kotlin.registerKotlinModule
class ObjectMapperConfiguration {
fun loadObjectMapper(): ObjectMapper = ObjectMapper(YAMLFactory()).registerKo... |
use crate::{publish::Publisher, ValidatedMessage};
use futures_util::stream::Stream;
use std::{pin::Pin, task};
/// A blackhole publisher that doesn't publish messages anywhere.
///
/// Great for conditionally disabling publishing.
///
/// # Examples
///
/// ```
/// use hedwig::publish::NullPublisher;
/// let publishe... |
import 'package:formz/formz.dart';
enum PasswordValidationError { invalid }
class Password extends FormzInput<String, PasswordValidationError> {
const Password.pure() : super.pure('');
const Password.dirty([String value = '']) : super.dirty(value);
@override
PasswordValidationError validator(String value) {
... |
---
sidebar_position: 4
---
# Frontmatter Module
_TODO:ShowHowToUseIndenpendantlyOfTemplating_
|
---
layout: posts_by_category
categories: raspberry-pi
title: Raspberry-Pi
permalink: /category/raspberry-pi
---
|
unit rtf2html;
(*
--------------------------------------------------------------------------------
Revision history:
Nb. Date: Author What was done.
004 01-Oct-1999 CMS MAJOR work done--
--Inserted end tags where necessary
--Fixed bug... |
import { Component, OnInit } from '@angular/core';
import { EventService } from 'app/services/enterprise-services/event.service';
import { Participation } from 'app/services/enterprise-services/models/participation';
import { User } from 'app/services/user-services/models/user';
import { Event } from 'app/services/ent... |
<?php
if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
class CustomCurrentUserMobileApi extends CurrentUserMobileApi
{
/**
* Register api endpoints
* @return array
*/
public function registerApiRest()
{
//in case we want to add additional endpoints
... |
import styled from '@emotion/styled'
export const Container = styled.section`
padding: 1rem 0;
`
export const Grid = styled.div`
display: grid;
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
gap: 1rem;
`
|
Spree::Core::Engine.add_routes do
# Add your extension routes here
post '/webpay/webpay_final_url', :to => 'webpay#webpay_final_url', :as => :webpay_result
post '/webpay/webpay_return_url', :to => 'webpay#webpay_return_url', :as => :webpay_return_url
get 'webpay/success', :to => 'webpay#webpay_success', :as => ... |
namespace Store.Messages.Events
{
using NServiceBus;
public class HaveOrderAccepted :
IEvent, IHaveCustomerInfo, IHaveOrderNumber
{
public int OrderNumber { get; set; }
public string[] ProductIds { get; set; }
public string ClientId { get; set; }
}
} |
package main
import (
"flag"
"fmt"
"os"
"strings"
"golang.org/x/net/html"
)
func main() {
fileFlag := flag.String("file", "example.html", "The HTML file to be parsed.")
flag.Parse()
file, err := os.Open(*fileFlag)
checkError(err)
tree, err := html.Parse(file)
checkError(err)
links := make([]link, 0)
... |
import React, { FC, useState, useEffect, ChangeEvent, KeyboardEvent } from 'react'
import {
Grid,
Button,
Table,
TableContainer,
TableHead,
TableRow,
TableCell,
TableBody,
TextField,
Paper
} from '@mui/material'
import Axios from 'axios'
import capitalize from 'capitalize'
import './editor.scss'
import { ... |
module Takeaway.Data.Acid.ID
( module Takeaway.Data.Acid.ID_v0
) where
import Takeaway.Data.Acid.ID_v0
|
% Keeps a map of url prefix -> module/handler
% so plugins can register to handle certain web requests.
-module(playdar_http_registry).
-behaviour(gen_server).
%% API
-export([start_link/0, get_handler/1, register_handler/2, register_handler/3,
register_handler/4, get_all/0]).
%% gen_server callbacks
-expo... |
{-# LANGUAGE BangPatterns #-}
module ZIO.Interpreter where
import ZIO.Prelude
import Control.Exception (throwIO)
import qualified Data.Map as Map
import qualified ZIO.Language as L
import qualified ZIO.Runtime as R
import qualified ZIO.Types as T
import qualified ZIO.Effects.Effect.Interpreter as R
i... |
CREATE TABLE hr.instructor (
idinstructor INT NOT NULL,
iNombre VARCHAR(45) NOT NULL,
iPaterno VARCHAR(45) NULL,
iMaterno VARCHAR(45) NULL,
Carrera VARCHAR(45) NULL,
Especialidad VARCHAR(45) NULL,
iEmail VARCHAR(45) NULL,
iTelefono VARCHAR(45) NULL,
iDireccion VARCHAR(45) NULL,
PRIMARY KEY (idinstru... |
package org.bitcoins.crypto
import org.bitcoin.Secp256k1Context
sealed trait CryptoContext
object CryptoContext {
case object LibSecp256k1 extends CryptoContext
case object BouncyCastle extends CryptoContext
def default: CryptoContext = {
val secpDisabled = System.getenv("DISABLE_SECP256K1")
if (
... |
package example
object SquareShaderSource extends ShaderSource {
val vertexShader: String =
"""
attribute vec4 aVertexPosition;
attribute vec4 aVertexColour;
uniform mat4 uModelViewMatrix;
uniform mat4 uProjectionMatrix;
varying lowp vec4 vColour;
void main() {
gl_Position... |
package com.easykotlin.learn.study1
/**
* 常量
*/
object SdkConst {
const val ERROR_CODE_1 = 10086
const val ERROR_CODE_2 = 10087
const val ERROR_CODE_3 = 10088
const val ERROR_CODE_4 = -1000
} |
import qualified Data.Set as S
import Control.Applicative ((<$>), Applicative(..),
Alternative((<|>)))
import Data.Char (isDigit)
import Data.Functor (($>))
import Text.ParserCombinators.ReadP
data State = On | Off
deriving (Show, Eq)
data Instruction = Instruction State (Int, Int) (In... |
package com.github.datalking.common.convert.editor;
import java.beans.PropertyEditorSupport;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.util.Map;
import java.util.Properties;
/**
*/
public class PropertiesEditor extends PropertyEditorSupport {
@Override
public void setAsText(Stri... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.