text stringlengths 27 775k |
|---|
import {
IENApplicantStatusRO,
IENHaPcnRO,
IENJobLocationRO,
IENJobTitleRO,
IENStatusReasonRO,
IENUserRO,
} from './ien.ro';
export interface ApplicantRO {
id: string;
name: string;
applicant_id?: number;
email_address?: string;
phone_number?: string;
registration_date?: Date;
assigned_to?: J... |
require 'test_helper'
class DocumentListExportWorkerTest < ActiveSupport::TestCase
setup do
@user = create(:user)
@worker = DocumentListExportWorker.new
end
test 'instantiates an EditionFilter with passed options converted to symbols' do
Admin::EditionFilter.expects(:new).with(Edition, @user, {state... |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Kesco.Persons.ObjectModel;
using Kesco.Persons.BusinessLogic;
using System.ComponentModel.DataAnnotations;
using Newtonsoft.Json;
using Kesco.ComponentModel.Json;
namespace Kesco.Persons.Web.Models.Card
{
public class DataMode... |
package com.udacity.course3.reviews.entity
import java.sql.Timestamp
import javax.persistence.*
@Entity
@Table(name = "review")
class Review(
@Id val id: Int? = 0,
val title: String? = null,
val review_text: String? = null,
val created_ts: Timestamp? = null,
val recommended: Int? = 0,
@ManyT... |
#include "../../math/reinterpret.h"
#include <stdint.h>
long double __floatunditf(uint64_t a)
{
if (!a)
return 0;
int space = __builtin_clzll(a);
unsigned __int128 significand = (unsigned __int128)(a << space & INT64_MAX) << 49;
unsigned __int128 exp = 0x3FFF + 63 - space;
return reinterp... |
package com.huang;
import com.alibaba.fastjson.serializer.SerializerFeature;
import com.alibaba.fastjson.support.config.FastJsonConfig;
import com.alibaba.fastjson.support.spring.FastJsonHttpMessageConverter;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApp... |
<div class="col-md-6" data-aos="flip-left" >
<div class="product-card d-flex flex-row align-items-center">
<div class="text-center"> <img src="@yield('prodLink')" width="200"> </div>
<div class="text-prod">
<h3 class="mb-1">@yield('prodName')</h3> <span style="color: #EF6603"> @yield('pr... |
## Mosquitto MQTT broker image
### Expose
tcp/1883 MQTT port
tcp/9001 websocket
### Container Quickstart
Run for MQTT only:
`docker run -d -p 1883:1883 --name=mosquitto sourceperl/mosquitto`
Run for MQTT + websocket:
`docker run -d -p 1883:1883 -p 9001:9001 --name=mosquitto sourceperl/mosquitto`
Link to m... |
package top.easelink.lcg.ui.main.articles.viewmodel
import androidx.annotation.MainThread
import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.ViewModel
import kotlinx.coroutines.GlobalScope
import kotlinx.coroutines.launch
import timber.log.Timber
import top.easelink.framework.threadpool.IOPool
import ... |
"use strict";
var log = require( './log.js' );
// Syslog log levels
var levels = [
'emerg',
'alert',
'crit',
'err',
'warning',
'notice',
'info',
'debug'
];
// Class for journald stuff
function Journald( defaultFields ) {
// Keep the default fields in an instance
if( typeof defaultFields != 'object' ) def... |
import {IS_MAC} from '../../utils';
import {KeyboardEvent} from 'react';
import {StencylEditor} from '../../types';
import {leafKeyBindings} from '../leaf/keybinding';
import {listsKeyBindings} from '../lists/keybinding';
export type KeyBinding = (editor: StencylEditor, e: KeyboardEvent) => void;
export type KeyBindi... |
package com.prolificdev.grahamscan
import com.google.inject.AbstractModule
import com.prolificdev.grahamscan.model.calculateComponent.calculateBasicImpl.Calculate
import com.prolificdev.grahamscan.model.calculateComponent.CalculateInterface
import com.prolificdev.grahamscan.model.fileIoComponent.fileIoJsonImpl.FileIO
... |
# Docker: Presto/Trino
This repository contains content to create Presto/Trino images and containers.
This project is inspired by the Docker repository of Trino.
|
<?php
/*
* This file is part of PHP CS Fixer.
* (c) kcloze <pei.greet@qq.com>
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/
namespace Kcloze\Bot;
class Console
{
public $logger = null;
private $config = [];
public function __constru... |
package live.lingting.virtual.currency.core;
import cn.hutool.core.util.ArrayUtil;
import com.google.common.base.Splitter;
import java.nio.charset.StandardCharsets;
import java.security.SecureRandom;
import java.util.List;
import lombok.Getter;
import lombok.SneakyThrows;
import org.bitcoinj.crypto.DeterministicKey;
i... |
# GIT MR(1)——检查本地合并请求
## 简介
`git-mr` \<数> [<遥远的>]<br>
`git-mr` \<网址><br>
`git-mr clean`
## 描述
以其编号或URL获取合并请求头,并在合并请求号命名的分支中检查它.
## 选项
\<遥远的>
要从中获取的远程名称.默认为`origin`.
\<网址>
GITLAB合并请求URL格式`https://gitlab.tld/owner/repository/merge_requests/453`.
## 实例
这检查合并请求.`!51`从遥远`origin`支流`mr/51`.
```
$ git mr... |
#include <iostream>
#include "../../network/network.h"
#include "../../network/util.h"
int main(int argc, char *argv[])
{
bool re;
const int trainingDataNum = 4;
const int dataDim = 2;
float *trainingData[trainingDataNum];
float *labelData[trainingDataNum];
/* Load training data and label from file */
for(i... |
We currently use a three-step build process:
1. Component parsing: A `.zap` file is parsed into nodes defined in `lib/src/ast`.
We focus on having accurate source spans for each components to enable good
error reporting later.
The result of this is called a `PrepareResult`.
We also generate an artificial D... |
pub mod data;
use crate::data::{
PixAudioChannel, ADCPM_INDEX_TABLE, ADCPM_STEP_TABLE, ASCII_HEX_DECODER, FONT8X8, PALETTE,
PIX_NUMBER_OF_AUDIO_CHANNELS,
};
use rmp_serde::{Deserializer, Serializer};
use sdl2::audio::{AudioCallback, AudioDevice, AudioSpecDesired};
use sdl2::clipboard::ClipboardUtil;
use sdl2::even... |
function setCity(city){
// to do
}
function login(email, password){
// to do
}
function addProducts(id, name, price, quantity){
// to do
}
function listProducts(id, name, price, quantity){
// to do
}
function listSellers(){
// to do
} |
# -*- coding: utf-8 -*-
import json
import logging
from urllib import urlencode
from functools import partial
import requests
class FlipkartAPI(object):
"""
Flipkart Marketplace Seller API Client.
This client provides access to flipkart objects (orders, skus) in a generic
way.
You can read more... |
import argparse
import glob
import os
import pandas as pd
from matplotlib import pyplot as plt
parser = argparse.ArgumentParser(description='Display a graph of temperature data')
parser.add_argument('path', help='path to the folder containing the csv files')
parser.add_argument('--date', help='if specified, only disp... |
import _typeof from 'babel-runtime/helpers/typeof';
function formatIt(date, form) {
var pad = function pad(n) {
return n < 10 ? '0' + n : n;
};
var dateStr = date.getFullYear() + '-' + pad(date.getMonth() + 1) + '-' + pad(date.getDate());
var timeStr = pad(date.getHours()) + ':' + pad(date.getMi... |
{{-- \resources\views\users\index.blade.php --}}
@extends('layouts.backend.master_layout')
@section('title', '| Users')
@section('content')
<div class="row">
<div class="col-xs-12 ">
<h1><i class="fa fa-users"></i> User Administration</h1>
</div>
</div>
<hr class="hr-6">
<div class="row">
<div clas... |
#!/usr/bin/env perl
use strict;
use warnings;
while (<STDIN>) {
chomp;
s/[^ #]//g;
tr/ #/01/;
next unless $_;
$_ .= '0' while length($_) % 7 != 0;
my @a = m/(.......)/g;
print ' .byte ' . join(',', map { "PX(\%$_)" } @a) . "\n";
}
|
'use strict';
const prettyjson = require('prettyjson');
const pageOne = require('./configPages/pageOne');
const pageTwo = require('./configPages/pageTwo');
const pageThree = require('./configPages/pageThree');
/**
* Creates application info for the installed smartApp
* and tells the application what page to start o... |
package com.maxipago;
import javax.xml.bind.annotation.XmlElement;
public class PaymentInfo {
@XmlElement
public CardInfo cardInfo;
public CardInfo cardInfo(Double chargeTotal) {
cardInfo = new CardInfo();
return cardInfo;
}
public PaymentInfo setCardInfo(CardInfo cardInfo) {
... |
package com.ctrip.xpipe.redis.core.protocal.protocal;
import com.ctrip.xpipe.redis.core.protocal.RedisClientProtocol;
import io.netty.buffer.Unpooled;
import org.junit.Test;
/**
* @author chen.zhu
* <p>
* Apr 09, 2018
*/
public class LongParserTest {
private LongParser longParser = new LongParser();
@Te... |
## 常见问题
### TogetherAd有没有Java版本?Java项目是否可以调用?
没有Java版本,但是Java、Kotlin可以互相调用,Java项目完全可以使用。
### 为什么要接入TogetherAd ?
TogetherAd简洁的Api设计让接入广告更简单,避免项目中穿插大量的广告代码,尤其是项目中接入多家广告平台时,地狱般的回调大大降低了项目的可读性。TogetherAd由此而生
### 接入TogetherAd后会不会被扣量?
不会,该项目是开源项目,可以看到项目的所有源代码,没有任何的扣量逻辑
### 不断完善中。。。 |
module Paperclip
class StringioAdapter
def initialize(target)
@target = target
@tempfile = copy_to_tempfile(@target)
end
attr_writer :original_filename, :content_type
def original_filename
@original_filename ||= @target.original_filename if @target.respond_to?(:original_filename)
... |
#ifndef ShaderTypes_h
#define ShaderTypes_h
#include <simd/simd.h>
struct Uniforms
{
unsigned int width;
unsigned int height;
unsigned int blocksWide;
};
// Represents a three dimensional ray which will be intersected with the scene. The ray type
// is customized using properties of the MPSRayIntersector... |
class CustomTimeSeriesSplitter:
def __init__(self, n_splits=5, train_days=80, test_days=20, day_col="d", pred_days=28):
self.n_splits = n_splits
self.train_days = train_days
self.test_days = test_days
self.day_col = day_col
self.pred_days = pred_days
def split(self, X, y... |
package pixi.loaders
import pixi.core.interaction.EventEmitter
/**
* A Class that loads a bunch of images / sprite sheet / bitmap font files. Once the
* assets have been loaded they are added to the PIXI Texture cache and can be accessed
* easily through PIXI.Texture.fromImage() and PIXI.Sprite.fromImage()
* Whe... |
// (c) 2020 Manabu Tonosaki
// Licensed under the MIT license.
using Tono;
using Tono.Gui;
namespace JitStreamDesigner
{
public class DistanceRect
{
public Distance L { get; set; }
public Distance T { get; set; }
public Distance R { get; set; }
public Distance B { get; set; }
... |
# piperun - Run ELF binary code read from standard input.
**piperun** is a simple C program than allows you to
execute a compiled ELF binary read from standard input.
## Usage
```sh
gcc -c t/hello.c -o /dev/stdout | ./piperun
```
or
```sh
make check
```
Simply run `make` then pipe a compiled ELF binary to `./pipe... |
module Gitsh
module Commands
class ErrorHandler
def initialize(command)
@command = command
end
def execute(env)
command.execute(env)
rescue Gitsh::Error => error
env.puts_error("gitsh: #{error.message}")
false
end
private
attr_reader :co... |
package com.eftimoff.mapreduce.summarization.numerical.medianstddev;
import java.io.DataInput;
import java.io.DataOutput;
import java.io.IOException;
import org.apache.hadoop.io.Writable;
public class MedianStdDevTuple implements Writable {
private float median;
private float stdDev;
public float getMedian() {
... |
package sample.model
// Generally speaking I wouldnt import the whole namespace,
// but as it happens with mapper models you are pretty much using
// most of the types, and it becomes rather verbose to import
// more than 10 or 15 types.
import net.liftweb.mapper._
import net.liftweb.common.Full
object Book extends ... |
<?php
declare(strict_types=1);
namespace App\Jobs\StarCitizenUnpacked\Import;
use App\Models\StarCitizenUnpacked\CharArmor\CharArmorAttachment;
use App\Models\StarCitizenUnpacked\Item;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Filesystem\FileNotFoundException;
use Illuminate\Contracts\Queue\ShouldQueue;... |
#!/usr/local/bin/perl -w
if ($#ARGV != 0)
{
print "runLPall.pl <pdb>\n" ;
exit ;
}
my $pdb = $ARGV[0];
use FindBin;
my $home="$FindBin::Bin";
print "File: $pdb\n";
$inputFileName = $pdb.".dat";
$outputFileName = $pdb.".sol";
#system ("$lpscripts/solve_cks_lp $inputFileName > $outputFileName");
... |
package io.shiftleft.bctrace.runtime.listener.direct;
/**
* This accessory interface is needed for testing purposes only. The agent will generate it on
* CallbackTransformer.class at runtime
*/
public interface $io_shiftleft_bctrace_direct_method_DirectMethodReturnTest$DirectListenerVoid {
public void onFinish(C... |
using System.ComponentModel.DataAnnotations;
using System.Net;
using MithrilShards.Core.Shards.Validation.ValidationAttributes;
namespace MithrilShards.Core.Network.Server
{
/// <summary>
/// Client Peer endpoint the node would like to be connected to.
/// </summary>
public class ClientPeerBinding
{
... |
// Copyright (c) 2019, the R8 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.
package com.android.tools.r8;
import com.android.tools.r8.errors.CompilationError;
import com.android.tool... |
/*
* Copyright (C) 2017, David PHAM-VAN <dev.nfet.net@gmail.com>
*
* 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 require... |
import redis from '../../../service/utils/RedisProvider';
describe('RedisProvider', () => {
it('creates a redis provider', () => {
const client = redis();
expect(client.options.keyPrefix).toBe('kaiju:test:');
expect(client.options.db).toBe(0);
expect(client.options.host).toBe('localhost');
expect... |
import { Prop, Schema, SchemaFactory } from '@nestjs/mongoose';
import * as mongoose from 'mongoose';
import { Shop } from 'src/shop/schemas/shop.schema';
import { clothAndShoeProductCategory } from '../../utils/productCategory.enum';
export type ClothAndShoeDocument = ClothAndShoe & mongoose.Document;
@Schema({
... |
import {AlphaBlendMode} from "./AlphaBlendMode";
import {AnimationHandlerParam} from "./AnimationHandlerParams";
import {CellValue} from "./AnimeParams";
import {Attachment} from "./Attachment";
import {AttrId} from "./AttrId";
import {FinalizedCell} from "./FinalizedCell";
import * as vfx from "./vfx";
// 動的ボーン
// Bo... |
// Copyright 2017-2021 Closed Sum Games, LLC. All Rights Reserved.
#include "CsPrjEditor.h"
IMPLEMENT_GAME_MODULE(FDefaultGameModuleImpl, CsPrjEditor);
DEFINE_LOG_CATEGORY(LogCsPrjEditor); |
// Copyright 2020 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
use {
crate::{ConfigLevel, ConfigQuery},
anyhow::{anyhow, bail, Result},
config_macros::include_default,
serde_json::{Map, Value},
std:... |
package gq.kirmanak.mealient.test
import androidx.test.ext.junit.runners.AndroidJUnit4
import dagger.hilt.android.testing.HiltAndroidRule
import dagger.hilt.android.testing.HiltTestApplication
import org.junit.Before
import org.junit.BeforeClass
import org.junit.Rule
import org.junit.runner.RunWith
import org.robolect... |
class SocketClient {
id;
connectedAt;
address;
socket_id;
_socket;
constructor(socket) {
this.id = socket.handshake.query.id;
this._socket = socket;
this.socket_id = socket.id;
this.connectedAt = new Date();
this.address = `${socket.request.connection.re... |
using System;
using NUnit.Framework;
using iTrellis.TripCalculator.Models;
namespace iTrellis.TripCalculator.Tests
{
class SplitTests
{
Split Split;
[SetUp]
public void Init()
{
Split = new Split { Creditor = "David", Debitor = "Louis", Payment = 16.47m };
}... |
;;;; Manual tests for LZ77
;;; Decoder
(defparameter *lz77-decoder* (lz77:make-lz77-decoder))
;; Data to decode
(defparameter *literals* #(0 5 48 34 32 32 7))
(defparameter *length-distance-position*
#(#(3 4 1) #(4 1 7)))
(defparameter *valid-decoded*
#(0 0 0 0 5 48 34 34 34 34 34 32 32 7))
(defparameter *decode... |
const React = await import('react')
export default function Button(){
return React.createElement('button')
} |
../../../../recipe-07/cxx-example/src/evolution/evolution.hpp |
#!/usr/bin/env python3
import unittest
import torch
from gpytorch.lazy import KroneckerProductLazyTensor, RootLazyTensor
from gpytorch.likelihoods import MultitaskGaussianLikelihood
from gpytorch.distributions import MultitaskMultivariateNormal
from gpytorch.test.base_likelihood_test_case import BaseLikelihoodTestCase... |
def saludo(palabra)
puts palabra
end
def displaystring(*args)
args.each{|string|puts string}
end
def multiply(val1, val2)
result = val1 * val2
return result
end
# Permite crear un duplicado de una función
alias docalc multiply
# rangos
# Rango de 1 a 10 inclusive
(1..10).to_a
#Rango de 1 a 9
(1...10)... |
<?php
namespace App\Mesas;
use Illuminate\Database\Eloquent\Model;
class AperturaAPedido extends Model
{
protected $connection = 'mysql';
protected $table = 'apertura_a_pedido';
protected $primaryKey = 'id_apertura_a_pedido';
protected $visible = array('id_apertura_a_pedido','id_mesa_de_panio','fecha_inicio'... |
import { Entity, OneToOne, PrimaryKey, Property } from '@mikro-orm/core';
import { CustomerRepository } from '../customer.repository';
import { Post } from './post.entity';
import { Comment } from './comment.entity';
import { Product } from './product.entity';
@Entity({ tableName: 'customers', customRepository: () => ... |
export async function intConditionalExpression(condition: int) {
"use speedyjs";
condition ? true : false;
condition ? 1 : 2;
condition ? 1.0 : 2.0;
}
|
package com.suntion.core.config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.EnableScheduling;
import com.suntion.core.quartz.AutowiredSpringBeanJobFactory;
/**
* @author Suntion
*/
@Configuration
@... |
#include <iostream>
#include <algorithm>
#include <cstdlib>
#include <cstdio>
#include <ctime>
using namespace std;
int main(int argc, char *argv[])
{
srand((unsigned)time(NULL));
int ans = 1 + rand() % 999;
int guess = -1;
while (guess != ans)
{
cin >> guess;
//cout << guess << en... |
package lib
import com.gu.mediaservice.lib.aws.UpdateMessage
import com.gu.mediaservice.model.Edits
import com.gu.mediaservice.syntax.MessageSubjects
import play.api.libs.json.JsObject
trait Edit extends MessageSubjects {
def config: EditsConfig
def editsStore: EditsStore
def notifications: Notifications
de... |
/*
* Copyright 2010-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
* that can be found in the LICENSE file.
*/
package kotlin.collections
import kotlin.native.internal.InlineConstructor
import kotlin.collections.*
import kotlin.internal.PureReifiable
import kotlin.util.sortArra... |
package inc::SMBus;
use Moose;
extends 'Dist::Zilla::Plugin::MakeMaker::Awesome';
override _build_WriteMakefile_args => sub {
my ($self) = @_;
my $template = super();
our @DIR = qw(.);
our @LIBS = qw();
return +{
%{ $template },
LIBS => [join(' ', map { "-l$_" } @LIBS) . '... |
#!/bin/bash
# Args: benchmark exe, number of federates per node, starting index, output folder
# Passthrough at end of arg handling: broker, coretype, msg_size, msg_count, max_index (update max_index script to multiply SLURM_JOB_NUM_NODES by feds per node)
helics_bm_fed_exe=$1
shift
# next argument is positional; out... |
#!/bin/bash
if [ -n "$1" -a -n "$2" ]
then
sqlite3 db "select writefile('$2',state) from game_state where game_id = $1"
elif [ -n "$1" ]
then
sqlite3 db "select state from game_state where game_id = $1"
else
echo "usage: bash tools/readgame.sh GAME [ state.json ]"
fi
|
import 'package:flutter/widgets.dart';
import 'package:front/model/category.model.dart';
import 'package:front/model/user.model.dart';
class LendModel {
final String id;
final String title;
final CategoryModel category;
final String description;
final String endDate;
final String startDate;
final UserMod... |
<!-- Container Fluid-->
<div class="container-fluid" id="container-wrapper">
<div class="d-sm-flex align-items-center justify-content-between mb-4">
<h1 class="h3 mb-0 text-gray-800">Blank Page</h1>
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="./">Home</a></li>
... |
control 'state_file' do
desc 'Verifies that the Terraform state file can be used in InSpec controls'
tfstate = command('find $(pwd) -name "terraform.tfstate"').stdout.delete("\n")
describe json(tfstate).terraform_version do
it { should match(/\d+\.\d+\.\d+/) }
end
end
|
#!/usr/bin/env bash
set -Eeuo pipefail
git init "$SRC_DIR/i2b2-core-server"
pushd "$SRC_DIR/i2b2-core-server"
git remote add origin https://github.com/i2b2/i2b2-core-server.git
git pull --depth=1 origin "$I2B2_VERSION"
popd
git init "$SRC_DIR/i2b2-data"
pushd "$SRC_DIR/i2b2-data"
git remote add origin https://github.... |
package com.helesto.dto;
import com.helesto.model.OrderEntity;
import com.helesto.util.FixValues;
import org.eclipse.microprofile.openapi.annotations.media.Schema;
public class OrderDto {
public OrderDto() {
}
public OrderDto(OrderEntity order) {
this.clOrdID = order.getClOrdID();
setS... |
package main
import (
"crypto/md5"
"fmt"
"strconv"
"strings"
)
func main() {
fmt.Println("2015/day-4")
s := "yzbqklnj"
part_1(s)
part_2(s)
}
func part_1(s string) {
fmt.Println(calcAdventCoin(s, isAdventCoin5))
}
func part_2(s string) {
fmt.Println(calcAdventCoin(s, isAdventCoin6))
}
func calcMD5(s str... |
import DateField from 'uniforms-unstyled/DateField';
import React from 'react';
import { mount } from 'enzyme';
import createContext from './_createContext';
test('<DateField> - renders an input', () => {
const element = <DateField name="x" />;
const wrapper = mount(element, createContext({ x: { type: Date } }));... |
program Demo;
{$APPTYPE CONSOLE}
{$R *.res}
uses
System.SysUtils,
MojoUnity.Json in 'MojoUnity.Json.pas';
const
json: string = '{ "ID": "id1", "Name": "John", "Age": 18, "Sex": true }';
json_array: string =
'[ ' +
'{ "ID": "id1", "Name": "John", "Age": 18, "Sex": true }, '+
'{ "ID": "id2", "Name... |
# WhatsAppCamera
Camera features same as Whatsapp application,
Demo code for the same camera as Whatsapp android application have.
Feature:
- Tap for capture in full screen including status bar
- Capture landscape and portrait both (Orientation maintain with device sensors)
- Hold for recording video with high quality
... |
package seedu.address.logic.commands;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;
import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;
import static seedu.address.logi... |
class SchnorrException implements Exception {
late String message;
SchnorrException(this.message);
@override
String toString() {
Object? message = this.message;
return 'SchnorrException: $message';
}
@override
int get hashCode => message.hashCode;
@override
bool operator ==(dynamic other) ... |
package logging
import kotlin.js.JsName
class Logger(vararg appenders: Appender) : Appender {
private val appenders = appenders.toList()
private val extra = mutableMapOf<String, Any?>()
@JsName("__withExtraPair")
fun with(vararg data: Pair<String, Any?>): Logger = Logger(*appenders.toTypedArray()).a... |
module Game
class Scene
class Pause < Menu
def prepare
title("Ruby Sync Racing")
label("Paused", size: 50)
button("Return to Game") do
$window.show_cursor = false
pop_state
end
button("Main Menu") do
push_state(MainMenu)
end
... |
class Day < ApplicationRecord
has_many :cards
has_many :users, through: :cards
# accepts_nested_attributes_for :cards
def day_number
"Day number #{self.id}!"
end
def self.search(search)
if search
day_number = Day.find_by(id: search)
else
@d... |
package com.vaibhav.notesappcompose.data.models.entity
import androidx.room.Entity
import androidx.room.PrimaryKey
import java.io.Serializable
@Entity(tableName = "note_table")
data class Note(
val text: String = "",
val isImportant: Boolean = false,
val timeStamp: String = System.currentTimeMillis().toS... |
#define UNSIGNED 1
#define INEXACT 0
#define FUNC __ufromfp
#include <s_fromfp_main.c>
libm_alias_double (__ufromfp, ufromfp)
|
更新履歴
====
v1.0.1 (2019/02/18)
- 結果が1レコードのときに表が2つ表示される問題を修正しました
v1.0.0 (2019/02/12)
- 新規作成 |
# Albert xkcd Plugin
<a href="https://www.codacy.com/app/bergercookie/xkcd-albert-plugin">
<img src="https://api.codacy.com/project/badge/Grade/126122966e844bed8e61e7cfbf7023c3"/></a>
<a href=https://github.com/bergercookie/xkcd-albert-plugin/blob/master/LICENSE" alt="LICENCE">
<img src="https://img.shields.io/github/... |
var mongoose = require('mongoose'),
Schema = mongoose.Schema,
CommentSchema = require('./comment').schema;
var TextPostSchema = new Schema({
title: String,
content: String,
thumbnail_image_url: String,
votes: Number,
comments: [CommentSchema]
}, {timestamps: true});
var TextPost = mongoose... |
drop schema if exists symfony;
create schema symfony default character set utf8 collate utf8_polish_ci;
grant all on symfony.* to symfony@localhost identified by 'symfony';
flush privileges; |
package ch.stephgit.windescalator.alert.service
import android.content.Context
import android.media.MediaPlayer
import android.os.Vibrator
import androidx.core.content.ContextCompat.getSystemService
import ch.stephgit.windescalator.R
import ch.stephgit.windescalator.di.Injector
import javax.inject.Inject
class Noise... |
namespace Zyborg.VMBot.CWEvents.EC2AutoScale
{
public interface IEC2AutoScaleDetail
{ }
}
|
require 'spec_helper'
describe 'tar_test::default' do
it 'actually has the tar bin available' do
expect(package 'tar').to be_installed
end
it 'sets up the test dir structure' do
expect(file '/tmp/src_dir').to be_directory
expect(file '/tmp/dest_dir_simple').to be_directory
expect(file '/tmp/des... |
import 'dart:math';
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import '../../lib/screens/dashboard.dart';
import '../matchers/macthers.dart';
void main() {
// teste de widgets
testWidgets(
'Deve apresentar a imagem principal quando o dashboard esta aberto',
... |
import { Component, OnInit } from '@angular/core';
import { ActivatedRoute, Router} from '@angular/router';
import { switchMap } from 'rxjs/operators';
import PageBase from '../../../base/PageBase'
import ViewModelBase from '../../../base/ViewModelBase'
import MfaController from './MfaController'
import MfaViewMo... |
UPDATE events e
JOIN hats h
ON e.anonymous_submitter_id = h.id
JOIN users u ON u.id = e.created_by_id
JOIN people p ON u.person_id = p.id
SET e.submitter_id = p.id,
e.anonymous_submitter_id = NULL
WHERE h.name = "Magistrates"
AND e.submitter_id IS NULL
AND e.comments REGEXP '([[:<:]]|^)mag\.?(i?s(trates?)?)? *cal(enda... |
// Copyright 2018-2020 Drexel University
// Author: Geoffrey Mainland <mainland@drexel.edu>
#ifndef UTIL_NET_HH_
#define UTIL_NET_HH_
#include <sys/types.h>
#include <string.h>
#include "Packet.hh"
/** @brief Compute broadcast address from address and netmask */
inline uint32_t mkBroadcastAddress(uint32_t addr, ui... |
# MIT License
# Copyright (c) 2018 shotariya
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merg... |
<?php
class Membership_model extends CI_Model {
public function __construct()
{
$this->load->database();
}
/*用户中心 - 登录*/
public function userLogin($data)
{
$query = $this->db->get_where('swan_membership', $data);
return $query->row_array();
}
/*用户中心 - 注册*/
... |
package com.salihozdemir.model.entity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
imp... |
package pack
class KtClass {
fun foo(){}
class object {
fun staticFoo(){}
}
} |
import { it } from 'app-decorators-simple-it';
import { transform } from 'babel-core';
import syntaxDecorator from 'babel-plugin-syntax-decorators';
import syntaxFuncBind from 'babel-plugin-syntax-function-bind';
import appDecoratorStylePrecompiler from '../lib/index';
import 'should';
let clean = value => value.repl... |
package assertions
import (
"fmt"
"github.com/smartystreets/assertions/internal/go-diff/diffmatchpatch"
)
func composePrettyDiff(expected, actual string) string {
diff := diffmatchpatch.New()
diffs := diff.DiffMain(expected, actual, false)
if prettyDiffIsLikelyToBeHelpful(diffs) {
return fmt.Sprintf("\nDiff: ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.