text stringlengths 27 775k |
|---|
// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
import 'dart:async';
import 'package:dds/dds.dart';
import 'package:json_rpc_2/json_rpc_2.dart' as jso... |
%criptoaritmetica
consulta(plutils.pl).
sum(X, 0,0,X,0).
sum(R, X, Y, Z, R2):-
residu(R), digit(X), digit(Y),
T is R+X+Y, R2 is T // 10,
Z is T mod 10.
|
/*
The loadtest package implements running performance benchmarking against the apiserver. It can be used to benchmark upload and download performance.
Benchmarking can be run as:
- a one-time test issuing user directed upload/download volume to the apiserver
- a continuous test repeatedly issuing user direct upload... |
package edu.sjsu.android.eclinic.ui.appointment
import android.os.Bundle
import android.util.Log
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.fragment.app.Fragment
import androidx.fragment.app.activityViewModels
import com.google.firebase.firestore.Query
imp... |
;; Copyright © 2016-2018, JUXT LTD.
(ns tick.alpha.calendar
(:require
[tick.protocols :as p]
[tick.core :as t]
[tick.alpha.ical :as ical]
[tick.alpha.interval :as ival]
[clojure.java.io :as io])
(:import
[java.time DayOfWeek]))
;; Now individual calendar sources
(defn select-by-year
"Given t... |
package com.garnercorp.swdvm
import RandomVariation.always
case class Task(description: String, estimate: Double) {
def workRequired(factor: Double = 1.0, variation: RandomVariation = always(1.0)) =
estimate * factor * variation.next
}
object Task {
val empty = apply(0.0)
def apply(estimate: Double): Task ... |
import type { VNode } from 'preact'
import type { PrerenderResult, PrerenderOptions } from 'preact-iso/prerender'
import hydrate from 'preact-iso/hydrate'
import type { Configuration } from 'twind'
import type { TwindPreactConfiguration } from '@twind/preact'
import { setup } from '@twind/preact'
export interface Wit... |
const Sequelize = require('sequelize');
const db = require('../config/database')
//creating an order model to store order history for each user in database
const order = db.define('order', {
// attributes
orderId: {
type: Sequelize.INTEGER,
allowNull: false,
primaryKey: true,
au... |
#!/usr/bin/perl
use strict;
my (@key_a, @key_b, %hash );
@key_a = ( 1, 2, 3 );
$hash{ @key_a } = 1;
print "Hash entry for @key_a " . $hash{ @key_b } . "\n";
print "Alter the key_a \n";
push( @key_a, 2 );
@key_b = (1, 2, 3 );
print "Find entry with copy of original key_a " . $hash{ @key_b } . "\n";
print "When v... |
module.exports = function() {
lib.stat()
}
|
#ifndef SEMANTICS_H
#define SEMANTICS_H
#include "ast.h"
Type *coerce_type(int op, Type **left, Type **right, MemPool *pool);
void resolve_names(AST *ast);
void resolve_types(AST *ast);
void check_returns(AST *ast);
#endif
|
/*=====================================================================
**
** Source: CopyFileA.c
**
** Purpose: Tests the PAL implementation of the CopyFileA function
**
**
** Copyright (c) 2006 Microsoft Corporation. All rights reserved.
**
** The use and distribution terms for this software are contained in th... |
#include <eosio/se-helpers/se-helpers.hpp>
#include <fc/fwd_impl.hpp>
#include <fc/scoped_exit.hpp>
namespace eosio::secure_enclave {
static std::string string_for_cferror(CFErrorRef error) {
CFStringRef errorString = CFCopyDescription(error);
auto release_errorString = fc::make_scoped_exit([&errorString](){CF... |
---
title: "Brian Lin"
date: 2013-12-30 06:12:58 00:00
permalink: /brianisme
twitter: "brianisme"
likes: [2100,1997,1672,786,1112,1023,2441,834,2548]
id: 2115
gravatar: "http://www.gravatar.com/avatar/7c0c9059b9421e550875febc269860a1"
--- |
package xi
import (
"math"
"github.com/zephyrtronium/xirho"
)
// LazySusan transforms points by different affine transforms depending on
// whether the input is inside a selection sphere.
type LazySusan struct {
Inside xirho.Affine `xirho:"inside"`
Outside xirho.Affine `xirho:"outside"`
Center xirho.Vec3 `x... |
import * as React from 'react';
export const Header = (): React.ReactElement<HTMLDivElement> => (
<div>
<h1>React-Responsive-Select</h1>
<h2 className="subh1">
A customisable, touchable, <b>React select</b> / <b>multi-select</b> form component.
<br />Built with keyboard and ... |
import java.util.*;
public class MyClass {
public static void main(String args[]) {
Scanner sc=new Scanner(System.in);
String name=sc.nextLine();
int case_option=sc.nextInt();
printResult(name,case_option);
}
static String reverseRetainingPosCase(String w){
StringBuffer rev=new StringBuffer(w);
rev.reverse()... |
extern crate pureconfig;
use pureconfig::Config;
#[test]
fn root_level_three_properties() {
let config: Config = "hostname = \"dynamo\"\nport = \"5153\"\npath = \"/foo/bar\""
.parse()
.unwrap();
assert_eq!(config.get("path"), Some("/foo/bar"));
}
#[test]
#[ignore]
fn simple_multiline() {
... |
<?php
class PigLatin
{
function convert ($word)
{
$firstLetter = substr($word, 0, 1);
$newWord = substr($word, 1);
$newWord .= $firstLetter . 'ay';
return $newWord;
}
} |
+++
title = "Cards Against Humanity"
weight = 20
[asset]
icon = "fas fa-users"
+++
An irreverent card game for parties |
# Represents a normal item i.e. one that does not have specific behaviours
class NormalItem
def update(item)
item.sell_in -= 1
return if item.quality.zero?
item.quality -= 1
item.quality -= 1 if item.sell_in <= 0
end
end
|
# Class Website Template Repo
This is a simple template for NSS students to use to create their class website.
1. Clone repo
1. Update `data/cohort.json` with student information
1. Update images with your class's photos
1. Update `data/tech.json` with your cohort's tech stack
1. Change anything else with styling you... |
package githttpxfer
import "fmt"
type URLNotFoundError struct {
Method string
Path string
}
func (e *URLNotFoundError) Error() string {
return fmt.Sprintf("Url Not Found: Method %s, Path %s", e.Method, e.Path)
}
type MethodNotAllowedError struct {
Method string
Path string
}
func (e *MethodNotAllowedError... |
import {
forwardRef,
useContext,
useEffect,
MouseEvent,
ReactElement,
} from "react"
import { motion } from "framer-motion"
import { DownIcon } from "@illa-design/icon"
import { applySubMenuListCss, applySubMenuHeaderCss } from "../style"
import { MenuContext } from "../menu-context"
import { Indent } from ".... |
require 'library'
require_relative './helpers/helpers'
RSpec.configure do |config|
config.fuubar_progress_bar_options = { :format => 'My Fuubar! <%B> %p%% %a' }
config.include Helpers
end |
export const LANG_HI_NAME='hi';
export const LANG_HI_TRANS={
'hello world':'नमस्ते',
'localCurrency':'JPY'
} |
package config
import (
"io/ioutil"
"os"
"time"
"gopkg.in/yaml.v3"
)
const (
defaultListenAddr = ":8080"
defaultDataFile = "/etc/mysql-tarantool-replicator/state.info"
defaultHealthSBM = 10
defaultLogLevel = "debug"
defaultSysLogEnabled = false
defaultFileLoggingEn... |
import { join, normalize, relative } from '../utils/path';
import { parse as parseToml, convert as convertToToml } from '../utils/toml';
import { pathExists, readFile, writeFile } from '../utils/fs';
import { manifestNotFound } from '../errors';
import { Version } from './version';
import { Source, parseSrc } from './s... |
#!/bin/sh
# Name of job
#SBATCH -J %OUTPUTFILEBASE
# Walltime limit (hours:mins:secs)
#SBATCH -t %WALLTIME:00:00
# Nodes and procs
#SBATCH -n %PROCS
# Standard error and out files
#SBATCH -o outs/%OUTPUTFILEBASE.o
#SBATCH -e outs/%OUTPUTFILEBASE.e
module unload gcc
module load gcc/6.2.0
echo "Starting job $SLURM_... |
# frozen_string_literal: true
require "shellwords"
require "dip/cli"
require "dip/commands/console"
describe Dip::Commands::Console do
let(:cli) { Dip::CLI }
describe Dip::Commands::Console::Start do
context "when execute without start" do
subject { cli.start "console".shellsplit }
it { expect {... |
<?php
declare(strict_types=1);
namespace IA\Auth\User;
use IA\Auth\Exception\UserNotFoundException;
interface UserProviderInterface
{
/**
* Loads the user for the given value (username or email).
*
* This method must throw UserNotFoundException if the user is not
* found.
*
* @para... |
"""
gmtspatial(cmd0::String="", arg1=nothing, kwargs...)
Geospatial operations on points, lines and polygons.
Full option list at [`gmtspatial`]($(GMTdoc)gmtspatial.html)
Parameters
----------
- **A** | **nn** | **nearest_neighbor** :: [Type => Str] `Arg = [amin_dist][unit]`
Perform spatial nearest neighb... |
/*
* Copyright (C) 2016 The yuhaiyang Android Source Project
*
* 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... |
package app.presenter.overviewPresenter;
import app.presenter.MainAppPresenter;
public class SwitchPresenter {
protected MainAppPresenter appPresenter;
public void setAppPresenter(MainAppPresenter presenter){
this.appPresenter = presenter;
}
}
|
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
import { Component, Element, h, JSX, Prop, Watch } from '@stencil/core';
import { EmbedOptions, VisualizationSpec } from 'vega-embed';
import { trackComponent } from '../../../usage-tracking';
import { logError } from '../../../utils/error/log-error';
... |
package br.com.guiabolso.tracing.engine.datadog
import br.com.guiabolso.tracing.context.ThreadContextManager
import br.com.guiabolso.tracing.engine.TracerEngine
import br.com.guiabolso.tracing.utils.DatadogUtils
import datadog.trace.api.DDTags.RESOURCE_NAME
import datadog.trace.api.interceptor.MutableSpan
import io.op... |
package controllers;
import com.avaje.ebean.Ebean;
import com.avaje.ebean.EbeanServer;
import com.avaje.ebean.Expr;
import com.avaje.ebean.Page;
import com.fasterxml.jackson.databind.node.ArrayNode;
import com.fasterxml.jackson.databind.node.ObjectNode;
import models.Auth.Realm;
import models.Characters.Character;
im... |
package io.vincent.learning.stack.nio
import java.util.concurrent.Executors
/**
*
* @author Asion.
* @since 2018/6/19.
*/
object TimeClient {
@JvmStatic
fun main(args: Array<String>) {
var port = 8080
if (args.isNotEmpty()) {
port = Integer.valueOf(args[0])
}
va... |
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.42000
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
namespace K... |
package repomanager
import (
"fmt"
goget "github.com/hashicorp/go-getter"
"github.com/pkg/errors"
"os"
)
type Manager interface {
GetRepos() []*Repository
Exists(repo *Repository) bool
AddRepo(repo *Repository) error
RemoveRepo(repo *Repository) error
UpdateAll() error
}
type manager struct {
opts *Manager... |
<div class="form-group">
{{Form::label('papertype', 'Type of Paper', ['class'=>' col-form-label font2'])}}
{{Form::select(
'papertype',
['Accounting Problem'=>'Accounting Problem',
'Mathematical Problem'=>'Mathematical problem',
'Statisti... |
// "Change function signature to 'fun f(a: Int): Int'" "true"
// ERROR: Type mismatch: inferred type is kotlin.String but kotlin.Int was expected
open class A {
open fun f(a: Int): Int = 0
}
class B : A(){
// Note that when parameter types match, RETURN_TYPE_MISMATCH_ON_OVERRIDE error is reported
// and "C... |
# [Volume of a cup](https://www.codewars.com/kata/volume-of-a-cup/)
|
namespace WebOptimizationProject.Helpers
{
public enum ProcessOutputLineType
{
Error,
Log
}
}
|
/*
* string.c
* Manage the various forms of strings, Utf8 and Unicode.
*
* Copyright (c) 1996 Cygnus Support
* Copyright (c) 1996,97 T. J. Wilkinson & Associates, London, UK.
*
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
... |
package com.raizlabs.android.dbflow.sql.language
import com.raizlabs.android.dbflow.BaseUnitTest
import com.raizlabs.android.dbflow.models.SimpleModel
import com.raizlabs.android.dbflow.models.SimpleModel_Table.name
import com.raizlabs.android.dbflow.models.TwoColumnModel_Table.id
import com.raizlabs.android.dbflow.as... |
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class TrashbagScript : MonoBehaviour
{
public GameObject closedGO;
public GameObject openGO;
public Player1MovementScript player1Script;
public Player2MovementScript player2Script;
public float slowDuration;
... |
{- |
Module : Xcode.FileType
License : MIT
Maintainer : shea@shealevy.com
Stability : unstable
Portability : portable
An Xcode file type
-}
module Xcode.FileType ( FileType( .. ) ) where
-- | An Xcode file type
-- File types will be added as they are encountered
data FileType
= Text
| M... |
(ns cheshire.test.generative
(:use [cheshire.core]
[clojure.test.generative]
[clojure.test :only [deftest is]]))
;; determines whether generative stuff is printed to stdout
(def verbose true)
(defn encode-equality [x]
[x (decode (encode x))])
(defn encode-equality-keys [x]
[x (decode (encode x)... |
import asyncio
import re
from pathlib import Path
from typing import Optional
from cleo import Command # type: ignore
from yaspin import yaspin # type: ignore
from ..utils import read_file_lines, parse_telegram_post_url
from ..view import TeleboostViewer
__all__ = ("ViewCommand",)
PROXY_FILES = re.compile(r"proxie... |
# renovate-config-goy
Renovate config for GoyFE team
## Usage
Config in `.github/renovate.json` :
```json
{
"extends": ["goy"]
}
```
## Links
- [Configuration Options](https://renovatebot.com/docs/configuration-options/)
- [Renovatebot Presets](https://github.com/renovatebot/presets/tree/master/packages)
|
module Monad where
import Prelude hiding (Monad, (>>=), (>>), return, Left, Right)
class Applicative m => Monad m where
return :: a -> m a
return = pure
(>>=) :: m a -> (a -> m b) -> m b
(>>) :: m a -> m b -> m b
x >> y = x >>= const y
-- Nope a
data Nope a = NopeDotJpg
instance Functor Nope where
fm... |
(function() {
var Builder, NodeXls, exporter;
exporter = require("excel-export");
Builder = require("./Builder");
NodeXls = (function() {
function NodeXls() {
this.builder = new Builder();
}
NodeXls.prototype.json2xls = function(data, opt) {
var conf;
conf = this.builder.build(... |
/*
* Copyright 2014-2021 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license.
*/
@file:Suppress("UNUSED_PARAMETER", "DeprecatedCallableAddReplaceWith")
package io.ktor.utils.io.concurrent
import kotlin.properties.*
/**
* Allows creating mutate property with frozen value.... |
package pw.binom.builder.web
import org.w3c.dom.HTMLElement
import pw.binom.URL
import kotlin.browser.window
object PageNavigator {
private lateinit var page: Page
private lateinit var root: Page
private fun update() {
val addr = window.location.href.removePrefix(window.location.protocol)
... |
# frozen_string_literal: true
class UserSerializer < ActiveModel::Serializer
attributes :id, :username, :role_id, :auth_token, :role
def auth_token
JsonWebToken.encode(user_id: object.id)
end
delegate :role, to: :object
end
|
describe('flatten array', function () {
it('should flatten an array', function () {
var arr = [1, 2, [1, 2, [3, 4, 5, [1]]], 2, [2]],
expected = [1, 1, 1, 2, 2, 2, 2, 3, 4, 5];
var flatten = function(arr) {
var self = arguments.callee;
expected = [];
arr.forEach(function(item) {
Array.prot... |
using Bridge;
namespace System.Collections
{
[Ignore]
[Namespace("Bridge")]
public interface IEnumerator : IBridgeClass
{
object Current
{
get;
}
bool MoveNext();
void Reset();
}
}
|
package com.angcyo.dialog
import android.view.View
import com.angcyo.dialog.dslitem.DslDialogTextItem
import com.angcyo.dsladapter.*
import com.angcyo.dsladapter.filter.RemoveItemDecorationFilterAfterInterceptor
import com.angcyo.library.ex._color
import com.angcyo.library.ex._dimen
import com.angcyo.widget.DslViewHol... |
package com.jetbrains.rider.plugins.fsharp.logs
import com.jetbrains.rd.platform.diagnostics.LogTraceScenario
object FSharpLogTraceScenarios {
object FcsReactorMonitor : LogTraceScenario("JetBrains.ReSharper.Plugins.FSharp.FcsReactorMonitor")
object FcsProjectProvider : LogTraceScenario("JetBrains.ReSharper.P... |
/*
This C++ file contains unit tests for the authentication server.
*/
#include <algorithm>
#include <exception>
#include <iostream>
#include <string>
#include <utility>
#include <vector>
#include <cpprest/http_client.h>
#include <cpprest/json.h>
#include <pplx/pplxtasks.h>
#include <UnitTest++/UnitTest++.h>
#in... |
<?php
class Dokumen_model extends CI_Model {
public function delete($id)
{
if ( ! $dokumen = $this->db->where('id', $id)->get('dokumen')->row())
{
return false;
}
// Hapus file dokumen
unlink(FCPATH . $dokumen->path);
// Hapus dokumen di database
$this->db->delete('dokumen', compact('id'));
... |
package com.software5000.ma.dto;
import com.software5000.base.entity.BaseEntity;
import com.software5000.ma.entity.Car;
import com.software5000.ma.entity.MemberLvl;
import com.software5000.ma.entity.User;
import java.util.List;
/**
* 商家所有会员信息
* Created by wujin on 2016/12/30.
*/
public class MemberLvlRecordInfo e... |
# NGINX ldap authentication proxy
Simple NGINX proxy to leverage LDAP authentication with user credentials binding
through HTTP Basic Authentication.
## Usage:
Required environment variables:
* **LDAP_PROXY_URI**: URI for the ldap endpoint to use for the bind.
* **LDAP_PROXY_USERDN_TMPL**: Template to use for the ... |
require 'stash/harvester/source_config'
module Stash
module Harvester
module Resync
# The configuration of a ResourceSync data source.
class ResyncSourceConfig < SourceConfig
protocol 'Resync'
# Constructs a new {ResyncSourceConfig} for resources described by
# the specifie... |
part of '../users.dart';
@JsonSerializable()
class UserIds {
@JsonKey(name: 'userIds')
List<String> userIds;
@JsonKey(name: 'next')
String next;
UserIds({this.userIds, this.next});
factory UserIds.fromJson(Map<String, dynamic> json) =>
_$UserIdsFromJson(json);
Map<String, dynamic> toJson() => _$... |
if [ "$controller_host_name" == "" ]
then
echo "Controller Host Name Environment variable is blank. Checking command line argument."
if [ "$1" == "" ]
then
echo "Controller Host Name Command line argument is blank. Using default name for Controller."
final_controller_host_name="controller"
else
final_controll... |
<!DOCTYPE html>
<html>
<head>
<title>edit</title>
</head>
<body>
<!-- kode nama_mk semester sks nilai_minimal_lulus-->
<?php
foreach ($matakuliah as $d) {
echo form_open('dashboard/aksi_edit');
/*$att_hidden = array('type'=>'hidden','name'=>'id' );
echo form_input($att_hidden,$d->id);*/
$att_hidden = array('t... |
<?php
namespace Oro\Bundle\WorkflowBundle\Tests\Unit\Validator\Constraints;
use Doctrine\Common\Collections\Collection;
use Oro\Bundle\WorkflowBundle\Entity\WorkflowItem;
use Oro\Bundle\WorkflowBundle\Entity\WorkflowStep;
use Oro\Bundle\WorkflowBundle\Exception\InvalidTransitionException;
use Oro\Bundle\WorkflowBundl... |
# frozen_string_literal: true
require 'eac_ruby_utils/speaker/receiver'
module EacRubyUtils
module Rspec
class StubSpeaker
include ::EacRubyUtils::Speaker::Receiver
def error(_string); end
def fatal_error(string)
error(string)
raise('Fatal error')
end
# @see EacR... |
package com.macro.mall.oms.mapper;
import com.macro.mall.oms.dto.OmsOrderReturnApplyResult;
import com.macro.mall.oms.model.OmsOrderReturnApply;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
/**
* <p>
* 订单退货申请 Mapper 接口
* </p>
*
* @author dongjb
* @since 202... |
class Organization::DisciplinesGovBodies < ApplicationRecord
belongs_to :gov_body
belongs_to :discipline
end
|
using System;
using System.Collections.Generic;
public class StackDeque<T>
{
private readonly Stack<T> stack = new Stack<T>();
public void Push(T value)
{
stack.Push(value);
}
public T Pop()
{
return stack.Pop();
}
} |
var searchData=
[
['iend',['iend',['../namespacempi__subdomain.html#abbd7d35107c53bcfd2b2b52771f4aa67',1,'mpi_subdomain']]],
['ierr',['ierr',['../namespacempi__subdomain.html#acd16f258caed20a7d8d38cd28ae64688',1,'mpi_subdomain']]],
['ista',['ista',['../namespacempi__subdomain.html#ab8925faaa6f45326c1d11efa37e0356... |
#!/bin/sh -eu
# These should be supplied by Docker
: "${SHARED_GO_AREA:?}" # /opt/gotools
: "${GOLANG_VERSION:?}" "${GOLANG_SRC_SHASUM:?}"
# shellcheck source=tools/lib.sh disable=SC2034
. "$(dirname "$0")/lib.sh" "$0" "$@"
startdir=/tmp
cd "$startdir"
user_bin_go() {
info "go $*"
(
cat <<EOGOGET
export GOPA... |
# frozen_string_literal: true
module FactoryTrace
module Helpers
module Converter
module_function
# @param [FactoryBot::Trait] trait
#
# @return [FactoryTrace::Structures::Trait]
def trait(trait)
FactoryTrace::Structures::Trait.new(
trait.name.to_s,
decl... |
class PatientsController < ApplicationController
before_filter :load_patient
def show
end
private
def load_patient
authorize! :view, Patient
begin
@patient = Patient.includes(:demographics).includes(:letters).where(id: params[:id]).first!
rescue ActiveRecord::RecordNotFound
head :n... |
from django.shortcuts import make_toast
from django.test import SimpleTestCase
class MakeToastTests(SimpleTestCase):
def test_make_toast(self):
self.assertEqual(make_toast(), 'toast') |
# SuperViewPage
该控件是JerryViewPager升级版,实现了上下左右四个方向的手势切换

|
<?php
/**
* This file is part of the Nextras community extensions of Nette Framework
*
* @license New BSD License
* @link https://github.com/nextras/migrations
*/
namespace Nextras\Migrations\Bridges\SymfonyConsole;
use Nette;
use Nette\Utils\Strings;
use Nextras;
use Nextras\Migrations\Extensions;
use... |
#!/bin/sh
# ----------------------------------------------------
# Build CSS
# ----------------------------------------------------
# Concat
concatFiles=(
"./src/assets/css/variable.css"
"./src/assets/css/theme-light.css"
"./src/assets/css/theme-dark.css"
"./src/assets/css/reset.css"
"./src/assets/css/html... |
# Create Roadway
roadway_opts = MergingRoadwayOptions(lane_width=0.26)
roadway = build_roadway(roadway_opts)
# Create Players
players = Vector{Player{T}}(undef, p)
player_opts = HighwayPlayerOptions{model.ni[1],model.mi[1],T}()
players[1] = Player(model, roadway.lane[5])
players[2] = Player(model, roadway.lane[3])
#... |
/*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* 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 appl... |
import org.gradle.api.DefaultTask;
import org.gradle.api.file.RegularFileProperty;
import org.gradle.api.provider.Property;
import org.gradle.api.tasks.Input;
import org.gradle.api.tasks.OutputFile;
import org.gradle.api.tasks.TaskAction;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.Outp... |
#ifndef _3DEJ_IMAGE_H_
#define _3DEJ_IMAGE_H_
//___________________________________________________________________________
#include "grinline.h"
#include "filemem.h"
//___________________________________________________________________________
// Error codes
#define NO_CODE -1
#define GOOD_READ 0
#define GO... |
import React, {useState, useEffect} from "react";
import {
View,
Text,
TextInput,
SafeAreaView
} from "react-native";
import styles from './styles.js';
import { GooglePlacesAutocomplete } from 'react-native-google-places-autocomplete';
// Import config keys
import config from '../../../config.js';
const Des... |
# frozen_string_literal: true
Sequel.migration do
up do
extension :pg_enum
create_enum(
SC::Billing.registration_source.enum_name,
%w[]
)
alter_table SC::Billing.user_model.table_name do
add_column SC::Billing.registration_source.field_name, SC::Billing.registration_source.enum_na... |
# Middleware
The middleware provides a structured pipeline for controlling and customizing the data flow for a
message.
Middleware is managed by the
[XVIZServerMiddlewareStack](/docs/api-reference/server/xviz-server-middleware-stack.md) and called
in order unless a handler chooses to stop further subsequent flow.
##... |
require 'forwardable'
module MultipleMan
class Runner
class ShutDown < Error; end
extend Forwardable
MODES = [:general, :seed].freeze
def initialize(options = {})
@mode = options.fetch(:mode, :general)
raise ArgumentError, "undefined mode: #{mode}" unless MODES.include?(mode)
end
... |
using OpenQA.Selenium;
using Tellurium.MvcPages.SeleniumUtils;
using Tellurium.MvcPages.SeleniumUtils.ChromeRemoteInterface;
using Tellurium.MvcPages.SeleniumUtils.FileUploading;
namespace Tellurium.MvcPages.WebPages.WebForms.DefaultInputAdapters
{
public class FileFormInputAdapter:IFormInputAdapter
{
... |
// This file is part of MLDB. Copyright 2015 mldb.ai inc. All rights reserved.
/* asio_timer.h -*- C++ -*-
Jeremy Barnes, 1 June 2014
Copyright (c) 2014 mldb.ai inc. All rights reserved.
*/
#pragma once
#include "mldb/watch/watch.h"
#include "mldb/types/date... |
import { expect } from 'chai';
import { shallow, mount, render } from 'enzyme';
import * as sinon from 'sinon';
import CategorySelect from '../../src/components/category/CategorySelect';
import Cons from '../../src/constants/ActivityConstants';
import {Modal} from 'react-bootstrap';
let props = {
id: 'test',
... |
import 'whatwg-fetch';
import { createFetch } from '../../src/core/fetch';
import { IYabFetchContext } from '../../src/types';
test('resolve: json', async () => {
window.fetch = jest.fn(() =>
Promise.resolve(new Response('{"data":"data"}'))
);
const fetcher = createFetch({
resolveData: async (context: ... |
# encoding: UTF-8
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper.rb')
require 'tmpdir'
require 'zlib'
class Dummy2
def to_json
"{\"hawtness\":true}"
end
end
class TheMindKiller
def to_json
nil
end
end
class TheMindKillerDuce
def to_s
nil
end
end
describe "Yajl JSON encode... |
package ghissue
import (
"context"
"net/http"
"golang.org/x/oauth2"
)
type GitHub struct {
httpclient *http.Client
ctx context.Context
owner string
repo string
token string
issues []Issue
}
type Option func(*GitHub)
func New(ctx context.Context, owner string, repo string, token ... |
; Loads DE into DE
; Modifies C register
; There is a routine similar to this one
; at ROM address L2AEE
__LOAD_DE_DE:
ex de, hl
ld c, (hl)
inc hl
ld h, (hl)
ld l, c
ex de, hl
ret
|
package io.kjaer.scalajs.webpack
import coursier.cache.CacheLogger
case class LoaderLogger(private val logger: WebpackLogger) extends CacheLogger {
override def downloadingArtifact(url: String): Unit =
logger.info("Downloading artifact " + url)
override def downloadedArtifact(url: String, success: Boolean): ... |
<p align="center">
<a href="https://nothingleftproject.github.io/ProjectDocs">
<img alt="NothingLeftProject" src="./image/NothingLeftLogo2.jpg">
</a>
</p>
<p align="center">
<b>NothingLeft</b>
</p>
<p align="center">
A time management system based on GTD.
</p>
<p align="center">
<img sr... |
n= str(input("Digite seu nome completo: ")).strip()
print("Analisando seu nome... ")
print("Seu nome em maiscula é {}".format(n.upper()))
print("Seu nome em minuscula é {}".format(n.lower()))
print("Seu nome tem ao todo {} letras".format(len(n)-n.count(' ')))
#print("Seu primeiro nome tem {} letras".format(n.find(" ")... |
#!/bin/sh
lxc launch ubuntu: amulet
container_up_check.sh amulet
lxc file push amulet_build.sh amulet/home/ubuntu/
lxc exec amulet -- sudo -u ubuntu sh -c /home/ubuntu/amulet_build.sh
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.