text stringlengths 27 775k |
|---|
#!/bin/bash
set -e
echo "Clone repo and get gh-pages branch"
git clone https://github.com/AndriusKv/veery.git gh-pages
cd ./gh-pages
git checkout gh-pages
cd ..
echo "Copy build to gh-pages"
# Remove old build files
rm -rf ./gh-pages/*
cp -r ./dist/. ./gh-pages
cd ./gh-pages
git config --global user.name "Travis CI... |
#!/bin/sh
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
#
# Script that can be used to register native messaging hosts in the GN output
# directory.
set -e
# 'readlink' works differently on macOS, so 'p... |
#!/bin/bash
./configure --prefix=$PREFIX
make
# Ignore this test
cat > test/suites/api/check-exports <<EOF
#!/bin/sh
exit 0
EOF
chmod +x test/suites/api/check-exports
make check || { cat "${SRC_DIR}/test/test-suite.log"; exit 1; }
make install
|
module Raven
# TODO: a constant isn't appropriate here, refactor
INTERFACES = {} # rubocop:disable Style/MutableConstant
class Interface
def initialize(attributes = nil)
attributes.each do |attr, value|
public_send "#{attr}=", value
end if attributes
yield self if block_given?
... |
part of ssh_key_bin;
//################################################################
/// The "Subject Public Key Info" is defined by ASN.1 as a part
/// of X.509. It consists of an algorithm (identified by an OID
/// with optional parameters) and a bit string.
///
/// This is one of the formats that can be used by ... |
using System;
using System.Data.SqlClient;
using System.IO;
using AutoMapper;
using FastFood.Data;
using FastFood.DataProcessor;
using Microsoft.EntityFrameworkCore;
using Newtonsoft.Json;
namespace FastFood.App
{
public class Startup
{
public static void Main(string[] args)
{
var context = new FastFoodDbCon... |
import { Version } from "../common/Version";
import { RecordTypes } from "../services/RecordTypes";
export interface IFile {
path: string;
buffer: Buffer | null;
}
export interface ILazyLoadingEntry<t = any> {
instance: t | null;
factory: (options?: any) => t;
}
export interface IRowObject {
[type: string]: any... |
#![feature(step_by)]
macro_rules! timeit {
($func:expr) => ({
let t1 = std::time::Instant::now();
println!("{:?}", $func);
let t2 = std::time::Instant::now().duration_since(t1);
println!("{}", t2.as_secs() as f64 + t2.subsec_nanos() as f64 / 1000000000.00);
})
}
fn main() {
... |
"""
Copyright 2017 Timothy Laskoski
test_lexer.py tests the lexer
"""
import soa.lexer
import soa.token
def test_set_lexing():
"Tests if the lexer properly lexes a set"
code = "set R0 0"
output = soa.lexer.lex_soa(code)
expected = [
{"Pos": 3, "Typ": soa.token.SET, "Val": "set"},
{"... |
package main
import (
"bufio"
"fmt"
"os"
"path"
"sort"
)
// buffer ...
type buffer struct {
head int
tail int
buf []byte
spills int
spillDir string
}
// Len ...
func (b *buffer) Len() int {
return b.head / 32
}
// Swap ...
func (b *buffer) Swap(i, j int) {
swap(b.buf, i, j)
}
// Less ...... |
#
# Cookbook:: prometheus
# Resource:: prometheus_collector
#
# Copyright:: 2020, OpenStreetMap Foundation
#
# 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
#
# https://www.apache.org/licen... |
<?php
/**
* This file is part of Fabrica.
*
* (c) Alexandre Salomé <alexandre.salome@gmail.com>
* (c) Julien DIDIER <genzo.wm@gmail.com>
*
* This source file is subject to the GPL license that is bundled
* with this source code in the file LICENSE.
*/
namespace Fabrica\Bundle\CoreBundle\DependencyInjection\Co... |
#!/usr/bin/env bash
# Array of system packages for use in 2-setup.sh
SPKGS=(
'alsa-plugins' # Audio plugins
'alsa-utils' # Audio utils
'ark' # Archiving Tool
'awesome' # AwesomeWM
'awesome-terminal-fonts'
'bash-completion'
'bind'
'binutils'
'bison'
'bluez' # Bluetooth daemon
'bluez-libs'
'bluez-utils'
'bridge-utils' #... |
# Structure and Interpretation of Computer Programs
This is the directory for all of my work done thoughout reading Structure and
Interpretation of Computer Programs. It is an absolutely mind blowing experience
so far, and I'm looking forward to learning more languages like Scheme and Lisp
in the future. I started read... |
<?php
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\DB;
function getLoginName() {
return Auth::user()->name;
}
function loginUserBadge() {
return substr(Auth::user()->name, 0, 1);
}
function indent($html = null) {
$indenter = new \Gajus\Dindent\Indenter();
return $indenter->inde... |
# Bot-relógio
Um simples bot que conta o horário da sua região.
<h2> Como instalar:</h2>
<h5> npm i discord.js</h5>
<h5> npm i moment</h5>
<h5> npm i chalk</h5>
<h5> npm i moment-timezone</h5>
<br>
<h1>Eu que fiz, espero que gostem.</h1>
|
using System;
using System.Threading;
using System.Windows.Forms;
using Juniper.VeldridIntegration.WinFormsSupport;
namespace Juniper
{
public partial class MainWindow : Form
{
private readonly SynchronizationContext sync;
private readonly string baseTitle;
public event EventHandler R... |
-- |
-- Module: $Header$
-- Description: Run Command Wrapper subcommands written as Shake rules.
-- Copyright: (c) 2020 Peter Trško
-- License: BSD3
--
-- Maintainer: peter.trsko@gmail.com
-- Stability: experimental
-- Portability: GHC specific language extensions; POSIX.
--
-- Run Command Wrapper subcomm... |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Shade.Client
{
public class GameControllerServiceImpl : GameControllerService
{
private IShadeClient client;
private ClientLevelService clientLevelService;
public Game... |
module Opalgems
class Gem
@@initializers = {}
attr_accessor :name, :source, :ref
def initialize(name, source, ref=nil, **kwargs, &block)
@name, @source, @ref = name, source, ref || "master"
@@initializers.each do |k,v|
self.instance_variable_set(:"@#{k}", v.dup)
end
Builder... |
use crate::{command::package::install::{self,
InstallHookMode,
InstallMode,
LocalPackageUsage},
error::{Error,
Result},
ui,
PROGRAM_NAME};
use h... |
export interface IAuthContext {
userID: string | null;
type: string | null;
token: string | null;
tokenExpiration: number;
login: (userID: string, type: string, token: string, tokenExpiration: number) => void;
logout: () => void;
}
|
package xc.lib.host.parser.ext;
public class XmlResourceMapHeader extends ChunkHeader {
public XmlResourceMapHeader(int chunkType, int headerSize, long chunkSize) {
super(chunkType, headerSize, chunkSize);
}
}
|
use app_dirs::AppInfo;
use crate::cpu::constants::*;
use sdl2;
use sdl2::pixels::*;
pub const RB_SCREEN_WIDTH: u32 = 1400;
pub const RB_SCREEN_HEIGHT: u32 = 900;
pub const SCALE: f32 = 5.0;
// pub const MEM_DISP_WIDTH: i32 = SCREEN_WIDTH as i32 / (X_SCALE as i32);
// Looks nicer when evenly divides mem regions
pub c... |
#!/usr/bin/env bash
# Copyright 2020 Crunchy Data Solutions, Inc.
# 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 applicab... |
declare var __webpack_public_path__: any;
const CONFIG_DIV = document.getElementById('scriptedforms-config-data');
if (CONFIG_DIV) {
const config = JSON.parse(CONFIG_DIV.textContent);
__webpack_public_path__ = config.publicPath;
}
|
import 'package:dart_style/dart_style.dart';
import 'package:dartx/dartx.dart';
import 'package:yaml/yaml.dart';
import '../settings/flutter.dart';
import '../utils/cast.dart';
import '../utils/string.dart';
import 'generator_helper.dart';
String generateFonts(DartFormatter formatter, FlutterFonts fonts) {
assert(f... |
namespace P09.Linked_List_Traversal
{
using System.Collections;
using System.Collections.Generic;
public class LinkedList<T> : IEnumerable<T>
{
private List<T> collection;
public int Count => collection.Count;
public LinkedList()
{
collection = new List<T>(... |
///////////////////////////////////////////////////////////////////////////
// Copyright © 2014 - 2018 Esri. All Rights Reserved.
//
// Licensed under the Apache License Version 2.0 (the 'License');
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// h... |
/**
* Implemented by objects used as configuration for a {@link View}
*/
export interface Configuration {
/**
* An arbitrary set of key/value pairs used as {@link View} configuration
*/
// eslint-disable-next-line @typescript-eslint/no-explicit-any
[key: string]: any;
}
|
{-# LANGUAGE LiberalTypeSynonyms #-}
{-# LANGUAGE RankNTypes #-}
module ShouldCompile where
type Generic i o = forall x. i x -> o x
type Id x = x
foo :: Generic Id Id
foo = error "urk"
-- The point here is that we instantiate "i" and "o"
-- with a partially applied type synonym. This is
-- OK in GHC because we che... |
/*
* $Id$
*
* $Log$
* Revision 1.5 2012/12/12 16:01:31 mmaloney
* Several updates for 5.2
*
* Revision 1.4 2009/11/11 19:31:50 shweta
* LRIT update
*
* Revision 1.3 2009/10/16 12:39:00 mjmaloney
* LRIT updates
*
* Revision 1.2 2009/10/09 14:52:26 mjmaloney
* Added flag bytes and carrier times to LRIT ... |
import http from '@/http.js'
import { queryBuilder } from '@/helper.js'
export const fetchMe = () =>
http.get('me')
.then(({ data }) => data)
export const fetchUser = (userId) =>
http.get(`user_profiles/${userId}/`)
.then(({ data }) => data)
export const updateUser = (userId, { nickname, picture, sexual,... |
import 'dart:async';
import 'package:algorand_node_companion_app/node/menu/node_menu_component.dart';
import 'package:algorand_node_companion_app/shared/shared.dart';
import 'package:algorand_node_companion_app/themes/themes.dart';
import 'package:algorand_node_companion_app/ui/components/buttons/button.dart';
import ... |
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Text;
namespace SuaveKeys.SnapReader.Uwp.Models
{
public class TokenResponse
{
[JsonProperty("access_token")]
public string AccessToken { get; set; }
[JsonProperty("refresh_token")]
public strin... |
BEGIN;
CREATE VIEW binance_klines_view AS
SELECT symbol,
source,
TO_TIMESTAMP(open_time / 1000) AS open_time,
TO_TIMESTAMP((close_time + 1) / 1000) - TO_TIMESTAMP(open_time / 1000) AS interval,
open::NUMERIC,
high::NUMERIC,
low::NUMERIC,
close::NUMERIC,
... |
###Trip Tracker
This is an Android app I threw together in a few hours to do periodic GPS
location tracking on a phone and send the GPS coordinates to an HTTP server.
Enter a URL that accepts POST requests, choose a poll interval, and tap "Enable
Tracking". The Android location manager will return a GPS location eve... |
# Depends on git being installed
git clone https://github.com/mattgwagner/dotfiles.git "$Home/.dotfiles"
& "$Home/.dotfiles/Install-Profile.ps1" |
import { Service } from 'typedi'
import { ConsulService } from './consulService'
export type AqicnorgIaqiValue = {
v: number
}
export type AqicnorgForecastValue = {
avg: number
day: string
max: number
min: number
}
export interface IAirvisualAPIResponse {
status: string
data: {
city: string
stat... |
# Get started sending and receiving messages from ServiceBus queues using QueueClient
In order to run the sample in this directory, replace the following bracketed values in the `Program.cs` file.
```csharp
// Connection String for the namespace can be obtained from the Azure portal under the
// `Shared Access polic... |
@file:Suppress("DEPRECATION")
package uk.nhs.nhsx.covid19.android.app.exposure
import com.google.android.gms.nearby.exposurenotification.ExposureConfiguration
import com.squareup.moshi.JsonClass
@JsonClass(generateAdapter = true)
data class FieldTestConfiguration(
val minimumRiskScore: Int = 4,
val attenuatio... |
/**
* Created by frasse on 2017-07-18.
*/
public class Category {
private String categoryNumber;
private String category;
public Category(String categoryNumber, String category){
this. categoryNumber = categoryNumber;
this.category = category;
}
public String getCategoryNumber()... |
import { Input, InputGroup, InputGroupProps } from "@chakra-ui/input"
import { Button, InputRightAddon } from "@chakra-ui/react"
import React from "react"
import PropTypes from "prop-types"
interface FilePickerProps {
onFileChange: (fileList: Array<File>) => void
placeholder: string
clearButtonLabel?: stri... |
import { Hook } from './Hook';
import { HookException } from './HookException';
class PreReceiveHookException extends HookException {
constructor(message?: string) {
super('pre-receive', message);
}
}
export default class PreReceiveHook extends Hook {
private static readonly VALID = [
/^re... |
#!/usr/bin/env bash
assert_empty "${JUNK_FILES}"
__add_junk_file "$( __extract_value 'TEST_SUBSYSTEM_TEMPDIR' )/xyz123"
assert_empty "${JUNK_FILES}"
sample_test_file="$( __extract_value 'TEST_SUBSYSTEM_TEMPDIR' )/xyz"
schedule_for_demolition "${sample_test_file}"
\touch "${sample_test_file}"
__add_junk_file "${samp... |
package com.imagelab.util;
import com.imagelab.component.OperatorUIElement;
import javafx.embed.swing.SwingFXUtils;
import javafx.scene.control.Alert;
import javafx.scene.control.ButtonType;
import javafx.scene.image.WritableImage;
import org.opencv.core.Mat;
import org.opencv.core.MatOfByte;
import javax.imageio.Ima... |
package com.onegravity.bloc.sample.traffic
import com.arkivanov.essenty.lifecycle.doOnCreate
import com.onegravity.bloc.context.BlocContext
class Traffic(val context: BlocContext) {
val street1 = Street(context, 100)
val street2 = Street(context, 200)
val street3 = Street(context, 300)
val tl1 = Tra... |
<!-- YAML
added: v0.9.1
-->
* `immediate` {Immediate} [`setImmediate()`] 返回的 `Immediate` 对象。
取消由 [`setImmediate()`] 创建的 `Immediate` 对象。
|
class Todoly
class Filter
def self.list(rest_if)
rest_if.filters.map do |f|
self.new(rest_if, f)
end
end
def initialize(rest_if, obj)
@rest_if = rest_if
@raw = obj
@id = obj["Id"]
@name = obj["Content"]
end
attr_reader :raw, :id, :name
def [](key... |
package ru.surfstudio.android.mvp.dialog.sample.ui.screen.dialogs.simple
import androidx.fragment.app.DialogFragment
import ru.surfstudio.android.mvp.dialog.navigation.route.DialogRoute
class SimpleDialogRoute : DialogRoute() {
override fun getFragmentClass(): Class<out DialogFragment> = SimpleDialogFragment::cla... |
// https://doc.rust-lang.org/book/ch12-00-an-io-project.html
use std::env; //for args
// Usage: cargo run searchstring example-filename.txt
fn main() {
//main_read_args();
//main_save_args();
//main_read_file();
//main_extract_arg_parser();
//main_group_config_vals();
//main_group_config_const... |
export const config = {
topNav: {
gitHubURL: 'https://github.com/thomas-gale/bits-to-atoms',
},
information: {
gitHubAPILatestReleaseEndPoint:
'https://api.github.com/repos/thomas-gale/bits-to-atoms/releases/latest',
},
market: {
simpleMarketSaga: {
partNames: [
'widget',
... |
using Windows.UI.Xaml.Controls;
namespace MoneyFox.Uwp.Views.Controls
{
public sealed partial class CategorySelectionControl : UserControl
{
public CategorySelectionControl()
{
InitializeComponent();
}
}
}
|
#include "../lib/insertion.h"
#include <stdio.h>
#define LENGTH 14
void test_insertion_sort() {
unsigned long vec[] = {15, 45, 18, 80, 182, 84, 32,
23, 12, 3, 7, 8, 19, 1999};
printf("Vetor pré Ordenação: ");
for (int i = 0; i < LENGTH; i++) {
printf(" %lu ", vec[i]);
}
pr... |
%% @doc: Elli HTTP request implementation
%%
%% An elli_http process blocks in gen_tcp:accept/2 until a client
%% connects. It then handles requests on that connection until it's
%% closed either by the client timing out or explicitly by the user.
-module(elli_http).
-include("elli.hrl").
-export([start_link/3, accept... |
module Collection
def self.included(cls)
cls.include Enumerable
cls.extend Generic
end
attr_reader :type_parameter
def initialize(type_parameter)
@type_parameter = type_parameter
end
def add(val)
if not val.is_a?(type_parameter)
raise ArgumentError, "#{val.inspect} must be a #{type_... |
// Copyright 2018 Workiva Inc.
//
// 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 agreed to in... |
// Copyright (c) The Libra Core Contributors
// SPDX-License-Identifier: Apache-2.0
#[allow(unused_imports)]
use log::{debug, info, warn};
use codespan::{ByteIndex, Span};
use itertools::Itertools;
use num::BigUint;
use once_cell::sync::Lazy;
use regex::Regex;
use serde::{Deserialize, Serialize};
use spec_lang::{
... |
package com.devil.library.camera.listener;
/**
* 预览回调数据
*/
public interface PreviewCallback {
void onPreviewFrame(byte[] data);
}
|
package com.github.quillraven.gdxaiexample.ecs.system
import com.badlogic.ashley.core.Entity
import com.badlogic.ashley.systems.IteratingSystem
import com.github.quillraven.gdxaiexample.ecs.component.MoveComponent
import com.github.quillraven.gdxaiexample.ecs.component.MoveDirection
import com.github.quillraven.gdxaie... |
package com.osacky.flank.gradle
import org.gradle.api.Project
import org.gradle.api.file.Directory
import org.gradle.api.provider.Provider
internal val Project.fladleDir: Provider<Directory>
get() = layout.buildDirectory.dir("fladle")
|
// метаданные для создания компонента
import { Component, OnInit} from '@angular/core';
// сервисы
import {DataService} from './data.service';
import {LogService} from './log.service';
import {Phone} from './phone';
// selector - название нового компонента (html тега)
// templateUrl - содержимое разметки нашего нового ... |
#!/usr/bin/env bash
set -e
cover_dir=".cover"
profile="$cover_dir/cover.out"
mode=count
timeout=${TIMEOUT:=1m}
generate_cover_data() {
rm -rf "$cover_dir"
mkdir "$cover_dir"
go test -timeout "$timeout" -covermode="$mode" -coverprofile="$profile" ./...
}
show_cover_report() {
go tool cover -${1}="$pro... |
package com.github.jomof.kane.impl.functions
import com.github.jomof.kane.ScalarExpr
import com.github.jomof.kane.div
import com.github.jomof.kane.impl.StreamingSamples
import com.github.jomof.kane.impl.SummaryOp
import com.github.jomof.kane.mean
import com.github.jomof.kane.stdev
private val CV by SummaryOp()
class... |
CODE SEGMENT PUBLIC 'CODE'
ASSUME CS:CODE
START:
ORG 100H
JMP begin
ARRAY DB 3,6,9,2,8,4,5,7,1,3
begin:
MOV CX, 9
MOV BX, 0
next:
MOV AL, ARRAY[BX]
TEST AL, 1
JNE n_xch
PUSH AX
MOV AL, ARRAY[BX+1]
TEST AL, 1
JZ n_xch
MOV ARRAY[BX], AL
POP AX
... |
require "jekyll/quickstart/version"
require "jekyll"
require "jekyll-assets"
module Jekyll
module Quickstart
def self.boot
Dir[File.expand_path("../quickstart/*.rb", __FILE__)].each { |path| require path }
end
end
end
|
package com.viewpagerindicator
interface IconPagerAdapter {
// From PagerAdapter
val count: Int
/**
* Get icon representing the page at `index` in the adapter.
*/
fun getIconResId(index: Int): Int
}
|
import styled from 'styled-components';
import {
typography,
color,
space,
border,
TypographyProps,
ColorProps,
SpaceProps,
BorderProps,
layout,
} from 'styled-system';
export const StyledHeading = styled.h1<
TypographyProps & ColorProps & SpaceProps
>`
${typography}
${color}
${space}
... |
package zmaster587.advancedRocketry.tile.cables;
public class TileWaterPipe extends TilePipe {
}
|
; ModuleID = '/home/david/src/c-semantics/tests/gcc-torture/20021120-1.c'
target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
@gd = common global [32 x double] ... |
package utils
import io.gatling.app.Gatling
import io.gatling.core.config.GatlingPropertiesBuilder
import org.clapper.classutil.ClassFinder
import scala.io.Source.fromFile
object GatlingDebugger {
private val scalaSourcePath = "./simulations"
private val scalaBinPath = "./out/production/classes"
private val sim... |
#!/bin/sh
#PBS -N n32.analysis.cdf.tools.job
#PBS -d /home/acmp148/logs
#PBS -l walltime=2:00:00
#PBS -l nodes=1:ppn=1
#PBS -m ae
#PBS -M acmp148@city.ac.uk
# Usage:
# qsub -v EXP=baseline,N=200 job.sh
# qsub -v EXP=daily-attacks,N=200 job.sh
export GOPATH=/Users/klaudiaantczak/nordic32-master
HPSDIR=/Users/klaud... |
import { TakeAttendanceModule } from './take-attendance.module';
describe('TakeAttendanceModule', () => {
let takeAttendanceModule: TakeAttendanceModule;
beforeEach(() => {
takeAttendanceModule = new TakeAttendanceModule();
});
it('should create an instance', () => {
expect(takeAttendanceModule).toBe... |
import Vue from 'vue'
import VueApollo from 'vue-apollo'
import { createApolloClient } from 'vue-cli-plugin-apollo/graphql-client'
// Install the vue plugin
Vue.use(VueApollo)
// Name of the localStorage item
export const APP_NAME = process.env.VUE_APP_SPECKLE_NAME
export const AUTH_TOKEN = `${APP_NAME}.AuthToken`
e... |
import 'package:live/viewobject/model/otp/ResponseOtp.dart';
abstract class OtpState{}
class InitialOtpState extends OtpState{}
class OtpErrorState extends OtpState{
final String errorMessage;
OtpErrorState(this.errorMessage);
}
class OtpProgressState extends OtpState{}
class OtpSuccessState extends OtpState{... |
package com.avojak.mojo.aws.p2.maven.plugin.s3.exception;
import org.junit.Test;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull;
/**
* Test class for {@link ObjectRequestCreationException}.
*/
public class ObjectRequestCreationExceptionTest {
/**
* Tests {@link ObjectReq... |
// Copyright Siemens AG, 2019
import { IMindConnectConfiguration, MindConnectAgent } from "@mindconnect/mindconnect-nodejs";
import * as chai from "chai";
import * as fs from "fs";
import { it } from "mocha";
import * as path from "path";
import mcnode = require("../src/mindconnect.js");
import helper = require("node-... |
// Copyright (c). All rights reserved.
//
// Licensed under the MIT license.
using Shouldly;
using Xunit;
using Xunit.Abstractions;
namespace Microsoft.Dism.Tests
{
public class GetDriversTest : DismInstallWimTestBase
{
public GetDriversTest(TestWimTemplate template, ITestOutputHelper testOutput)
... |
import { Component } from '.';
import { serializable, Serializable } from '../core';
import { Renderer } from '../graphics';
import * as Math from '../math';
import World from './world';
@serializable
export default class Entity extends Serializable
{
private _id: string;
public name: string;
public tag: ... |
// Original test: ./eharris/hw4/problem6/jal_3.asm
// Author: eharris
// Test source code follows
//Unaligned jump. According to the first ISA this should be valid and work
jal 1
lbi r2, 0x00
halt
//Halted before something bad happened due to unaligned access
|
const currency = require('../../features/currency');
module.exports = {
name: 'transfer',
description: 'Transfers currency to mentioned user',
usage: ' currency @member',
category: 'Currency',
cooldown: 10,
guildOnly: true,
async execute(message, args) {
const currentAmount = await currency.getCoins(... |
## Room
|Name|Type|Primary key|Foreign key|Unique|Integrity constraints|Null/not null|
|:----|:----:|:-----------:|:-----------:|:------:|:----------------------:|:------:|
|id_room|int|+| | + | |not null|
|floor|int| | | | | not null|
|coat_of_living|int| | | | | not null|
|room_type|varchar| | | | 20| not null| |
package process;
public class PcbData {
private long tExpected = 0;
private long timeFirstAdded;
public long getTimeFirstAdded() {
return timeFirstAdded;
}
public void setTimeFirstAdded(long timeFirstAdded) {
this.timeFirstAdded = timeFirstAdded;
}
public long getTotalBur... |
#include<stdio.h>
#include<stdlib.h>
struct node
{
int data;
struct node* link;
struct node* prev;
}node;
struct node* start = NULL;
static int count = 0;
void insert_beginning(int);
void insert_after(int, int);
void delete_end();
void display();
int main(void)
{
... |
using System;
using UITesting.Framework.Helpers;
using UITesting.ProviderPortal.Pages.Course_Management;
using UITesting.ProviderPortal.Pages;
using UITesting.ProviderPortal.TestSupport;
using OpenQA.Selenium;
using TechTalk.SpecFlow;
namespace UITesting.ProviderPortal.StepDefinitions.Course_Management
{
[Binding... |
import cats.implicits._
import cats.effect._
import fs2._
import scala.concurrent.duration._
import fs2.Chunk.ByteBuffer
import scodec.bits.ByteVector
import fs2.Chunk.ByteVectorChunk
import java.nio.charset.StandardCharsets
import jnr.unixsocket.UnixSocketAddress
import java.nio.file.Paths
import _root_.io.chrisdaven... |
#team11
### TODO
Updated: 05/23/2018
**Backend**
- [x] image upload functionality
- [x] fixed DB search
- [x] implement lazy registration
- [x] link dropdown options to DB
**Frontend**
- [x] implement map view
|
class Admin::PackListsController < AdminController
before_action :require_admin_or_market_manager
def show
dt = params[:deliver_on].to_date
if params[:market_id].nil?
market_id = current_market.id
else
market_id = params[:market_id]
end
if current_user.buyer_only? || current_user.... |
##ABCEmu##
### Description: ###
A very primitive emulator of an abstract ARM-based processor. It was created as a student work for university.
It's not entirely completed, but hope it can be usefull in some way or another to somebody.
|
# frozen_string_literal: true
class Consumer < ApplicationRecord
has_many :users
scope :with_internal_users, -> { where('id IN (SELECT DISTINCT consumer_id FROM internal_users)') }
scope :with_external_users, -> { where('id IN (SELECT DISTINCT consumer_id FROM external_users)') }
scope :with_study_groups, -> ... |
import { Module } from '@nestjs/common';
import { TypeOrmModule } from '@nestjs/typeorm';
import { TeaEntity } from './tea.entity';
import { TeasResolver } from './teas.resolver';
import { TeasService } from './teas.service';
@Module({
imports: [TypeOrmModule.forFeature([TeaEntity])],
providers: [TeasService, Teas... |
using Newtonsoft.Json;
namespace Synology.DownloadStation.Task.Results
{
/// <summary>
/// Task transfer result.
/// </summary>
internal class TaskTransferResult : ITaskTransferResult
{
/// <summary>
/// Gets or sets the size downloaded.
/// </summary>
/// <value>The size... |
<?php
// **********************************************************************
//
// Copyright (c) 2003-2013 ZeroC, Inc. All rights reserved.
//
// This copy of Ice is licensed to you under the terms described in the
// ICE_LICENSE file included in this distribution.
//
// *********************************************... |
class Line(subject: String, verb: String) {
private lazy val current = s"This is the $subject"
private lazy val past = s"that $verb the $subject"
def output(index: Int, count: Int) = {
val line = if (index == count) current else past
if (index == 0) line + "." else line
}
}
object House {
private va... |
mod add_components;
mod add_entity;
mod delete_components;
mod delete_entity;
mod get;
mod hierarchy;
mod iterators;
#[cfg(feature = "thread_local")]
mod non_send_sync;
#[cfg(feature = "parallel")]
mod parallelism;
mod remove_components;
mod run;
mod sparse_set;
mod syntactic_peculiarities;
mod systems;
mod uniques;
mo... |
function AddDependencies {
try {
$Nebula.Dependencies | Copy-Item -Destination "$Destination" -ErrorAction Stop > $null
}
catch {
Write-Error $_
$Result.Errors++
}
} |
import React from 'react';
import RGL from "react-grid-layout";
import 'react-grid-layout/css/styles.css';
import 'react-resizable/css/styles.css';
import './Board.css';
export default function BoardPreview (props:any) {
const staticLayout = [
{i: 'empty-top', x: 0, y: 0, w: 17, h: 1, static: true},
{i: '... |
/**
* CoverTypes enum
* Identifier for basic type.
* - Function (0)
* - Block (1)
* - Expression (2)
*/
export const enum CoverType {
Function,
Block,
Expression,
}
/**
* Tells the Cover that there is an expected cover at (file:line:col)
* @param file - File name
* @param id - Id hash
* ... |
import {
FETCH_STAFFS,
FETCH_STAFFS_FAILED,
FETCH_STAFFS_LOADING,
FETCH_STAFF,
FETCH_STAFF_LOADING,
FETCH_STAFF_FAILED,
ERROR_STAFF,
MODIFY_STAFF_SUCCESS,
MODIFY_STAFF_FAILED
} from "../actions/Types";
const initialState = {
staffs: [],
getStaffsLoading:false,
getStaffsFailed: false,
staff: {... |
# require_relative 'al_alliance'
# require_relative 'al_house'
# require_relative 'al_bet'
# require_relative 'assert'
# require_relative 'al_enemy'
#
# require_relative 'alliances_engine/g_alliances_bet_engine'
# require_relative 'alliances_engine/g_enemies_core_engine'
# require_relative 'alliances_engine/g_alliance_... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.