text stringlengths 27 775k |
|---|
module PryIb
module Command
module Tick
def self.build(commands)
commands.create_command "tick" do
description "Get Tick quote"
group 'pry-ib'
def options(opt)
opt.on :num=, 'Number of ticks. (Default: 2)'
end
def process
ra... |
interface SomeInterface {
propFromIntf: number[];
};
class SomeClass implements SomeInterface {
propFromIntf: number[];
someProp: string;
}
class CompositionClass {
someClass: SomeClass;
}
const constFunc = function(test: string) {
console.log(test);
};
function normalFunc() {
console.log(un... |
@extends('base')
@section('content')
<!-- Main Section -->
<section class="main-section">
<!-- Add Your Content Inside -->
<div class="content">
<!-- Remove This Before You Start -->
<h1>Test Laravel Skills</h1>
<strong><p>Apa saja yang akan kamu pelajari ?</p... |
package zero.ext
package object option {
val none = None
def fromNullable[A](x: A): Option[A] = Option(x)
implicit class AnyOptionExt[A](x: A) {
def some: Some[A] = Some(x)
}
implicit class OptionExt[A](x: Option[A]) {
def map_[U](f: A => U): Unit = x.foreach(f)
def cata[B](f: A => B, b: => B)... |
package waybill
// CainiaoWaybillPrivacySellerOrderGetModule
type CainiaoWaybillPrivacySellerOrderGetModule struct {
// 商家ID
SellerId string `json:"seller_id,omitempty" xml:"seller_id,omitempty"`
// 隐私次数
PrivacyCount int64 `json:"privacy_count,omitempty" xml:"privacy_count,omitemp... |
import { Controller, Get, Post, Put, Body, Param } from '@nestjs/common';
import { PedidoService } from './pedido.service';
import { PedidoDTO } from '../pedido/dto/pedido.dto'
@Controller('pedido')
export class PedidoController {
constructor(private serv: PedidoService) { }
@Get('')
public async getAll() {
... |
package com.github.hotm.client
import com.github.hotm.HotMConstants
import com.github.hotm.client.blockmodel.UnbakedModel
import com.github.hotm.client.blockmodel.UnbakedModelLayer
import com.github.hotm.client.blockmodel.connector.ModelConnector
import com.mojang.serialization.Codec
import com.mojang.serialization.Li... |
'use strict'
const glob = require('glob')
const {app} = require('electron').remote
const exec = require('child_process').exec
const execSync = require('child_process').execSync
const { clipboard } = require('electron')
const Sys = {
}
document.addEventListener('DOMContentLoaded', function(event) {
A... |
from textwrap import fill
class HuffmanTree(object):
def __init__(self, left=None, right=None):
self.left = left
self.right = right
def children(self):
return (self.left, self.right)
def nodes(self):
return (self.left, self.right)
def __str__(self):
return "%s... |
import React, { useState } from 'react';
import StatusBarSafeLayout from './StatusBarSafeLayout';
import { FlatList, RefreshControl } from 'react-native';
import Logistic from '../Components/Logistic';
import Loader from '../Components/Loader';
import { wait } from '../utils';
import useWuhan2020 from '../hooks/useWuha... |
require "test_helper"
class LinkCheckReportFinderTest < ActiveSupport::TestCase
def link_check_report
@link_check_report ||= FactoryBot.create(
:edition,
:with_link_check_report,
link_uris: ["https://www.gov.uk"],
).latest_link_check_report
end
context ".call" do
should "find the l... |
class BuffaloEvents::CLI
def call
puts "Welcome to Buffalo, New York!"
end
end
|
SparkPostRails.configure do |c|
c.api_key = ENV['SPARKPOST_API_KEY']
c.sandbox = true
end
|
<?php
namespace common\models;
use Yii;
/**
* This is the model class for table "click_clients".
*
* @property integer $id
* @property string $nombre
* @property integer $idCliente
*/
class Calendar extends \yii\db\ActiveRecord
{
const LANGUAGE_ENGLISH = '';
const LANGUAGE_SPANISH = 'es-ES';
const... |
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
import chai from "chai";
import chaiAsPromised from "chai-as-promised";
chai.use(chaiAsPromised);
const expect = chai.expect;
import { it } from "mocha";
import { TeamsAppSolution } from " ../../../src/plugins/solution";
import {
ConfigMap,
... |
google-drive-to-webdav
===
Performs the following actions:
- Reads files from a google drive source,
- then uploads them to a webdav destination,
- them trashes them in the google drive source (they will be deleted by google
after 30 days)
requirements
===
- This requires a Google API token (thus a Google account... |
import { Field, InputType } from "@nestjs/graphql"
import {MinLength} from "class-validator"
@InputType()
export class UserInput{
@MinLength(1)
@Field()
name: string
@Field()
LastName: string
@Field()
Email: string
@Field()
phoneNumber: string
} |
class GeckoStatus
attr_accessor :label, :color, :message
attr_reader :name
def initialize(name)
@name = name
@label = 'n/a'
@color = 'red'
@message = 'unitialized'
end
def warn(message)
@label = 'WARNING'
@color = 'yellow'
@message = message
end
def error(messag... |
Rails.application.routes.draw do
# For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html
get 'players/for_user', to: 'players#for_user', as: :players_for_user
get 'players/for_game', to: 'players#for_game', as: :players_for_game
post 'contacts', to: 'contacts#contact... |
package com.github.shur.drip.trade.yaml
import com.github.shur.drip.trade.AbstractTradeRegistry
import com.github.shur.drip.yaml.Yaml
class YamlTradeRegistry(
private val yaml: Yaml
) : AbstractTradeRegistry() {
override fun load() {
trades.clear()
yaml.getKeys(false).forEach {
v... |
class RenameProyectosUsersToProjectsUsers < ActiveRecord::Migration
def change
rename_table :proyectos_users, :projects_users
change_table :projects_users do |t|
t.rename :id_proyecto, :project_id
t.rename :id_user, :user_id
end
end
end
|
using FCGagarin.BLL.Services.Interfaces;
namespace FCGagarin.BLL.Services
{
public class ExternalService : IExternalService
{
public void CheckSiteWorks(string url)
{
throw new System.NotImplementedException();
}
}
} |
export * from "./api.subscribe";
export * from "./api.contact";
export * from "./api.error";
export * from "./api.mailchimp";
|
#!/bin/bash
now=`date +'%Y.%m.%d.%H%M'`
mkdir -p ../logs
echo '===== LIST ====='
pipenv run scrapy crawl list591 -L INFO
mv scrapy.log ../logs/$now.list.log
echo '===== DETAIL ====='
pipenv run scrapy crawl detail591 -L INFO
mv scrapy.log ../logs/$now.detail.log
echo '===== STATEFUL UPDATE ====='
pipenv run python ... |
---
name: Shubham Singla
email: shubhamsingla369@gmail.com
github: https://github.com/shubham-333
linkedin: https://www.linkedin.com/in/shubham-singla-25a857192/
facebook: https://www.facebook.com/shubhamsingla369
quote:
picture: assets/img/members/Shubham Singla.jpg
--- |
import './Playlist.scss';
import { Fragment, useEffect, useState } from 'react';
import PathSelector from '../others/PathSelector';
import {
extractSlideItemThumbSelected,
getPlaylistDataByFilePath,
savePlaylist,
} from '../helper/helpers';
import { toastEventListener } from '../event/ToastEventListener';
... |
<?
$name=(isset($_REQUEST['name']))?$_REQUEST['name']:"";
$email=(isset($_REQUEST['email']))?$_REQUEST['email']:"";
$message=(isset($_REQUEST['message']))?$_REQUEST['message']:"";
// --------------------------------------
// BEGIN EDITABLE AREA
// --------------------------------------
$to="cwinke@mmiemail.com";
/... |
class Bouncy {
int Bouncys = 0;
int No = 99;
int x;
Bouncy() {
for (int i = 100; (Bouncys / (No + Bouncys)) < 0.99; i++) {
if (isBouncy(i)) {
Bouncys += 1;
}else{
No += 1;
}
x = i;
}
print(x);
}
bool isBouncy(int Num) {
List<int> Ar = [];
Num.toS... |
## To run the project you need:
- [NodeJS](https://nodejs.org/en/download/)
- [Yarn](https://classic.yarnpkg.com/en/docs/install)
## To launch the project run:
- `yarn install` - installing dependencies
- `yarn start:dev` - to start development mode locally on localhost:3000
- `yarn build & yarn start` - t... |
ALTER TABLE `avm_outputs` ADD COLUMN `group_id` bigint unsigned default 0;
ALTER TABLE `avm_outputs` ADD COLUMN `payload` varbinary(4096);
|
package me.lazy_assedninja.util.di
import androidx.lifecycle.ViewModel
import dagger.MapKey
import kotlin.reflect.KClass
/**
* Applies to a class containing an injectable constructor and governs how the injector reuses
* instances of the type.
*/
@MustBeDocumented
@Target(
AnnotationTarget.FUNCTION,
Annota... |
#!/bin/bash
source_dir=/java_projects/source/front
project_name=mldong-vue
nfs_project_dir=/mnt/
profile=test
k8s_yaml=/java_projects/$project_name/k8s-$profile.yaml
registry_url=https://registry.npm.taobao.org
if [ -d "$source_dir" ]; then
echo "源码存放根目录${source_dir}已存在"
else
echo "源码存放根目录不存在,创建${source_dir}"
cp ... |
import React from "react";
import axios from "axios";
class ProductDetail extends React.Component {
constructor(props) {
super(props);
this.state = {
productInfo: {}
};
this.addThisItem = this.addThisItem.bind(this);
}
addThisItem = event => {
event.preventDefault();
this.props.ad... |
import React from 'react';
import Typography from '@material-ui/core/Typography';
import { Prec, LinkTo } from './../vignette-commons';
import { CatalogueIcon } from 'js/components/commons/icons';
export default {
description: () => {
//document.getElementById('onglets-accueil-services').style.zIndex = 99999... |
module Zaikio
module Procurement
class OrderConditionsInquiry < Base
uri "order_conditions_inquiries(/:id)"
include_root_in_json :order_conditions_inquiry
# Attributes
attributes :contract_id, :currency, :created_at, :updated_at,
:desired_delivery_date, :verified_at, :exp... |
/*
* Copyright 2017 The Euklid 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 agre... |
namespace XactikaCP.Cards;
public class XactikaDeckCount : IDeckCount
{
public int GetDeckCount()
{
return 81;
}
} |
#include <polyvec/io/vtk_curve_writer.hpp> // Optional
#include <polyvec/misc.hpp>
#include <polyvec/api.hpp>
#include <polyvec/curve_objectives.hpp>
#include <polyvec/curve_bezier.hpp>
#include <polyvec/curve_solver.hpp>
#include <polyvec/geom.hpp>
#include <polyvec/utils/deriv_test.hpp>
using namespace polyvec;
// ... |
/**
* The Index Models
*/
var buildURL = require('./utils/buildURLs');
var vndJSON = require('./utils/requestVndApiJson');
var index = {};
index.controller = function() {
index.vm.init();
};
// Set the view model for the index
index.vm = (function(){
var vm = {};
vm.init = function(){
// Whatever we nee... |
part of dominion_core;
abstract class CardSource {
/// return true if card removed, false otherwise
bool remove(Card card);
/// moves a given card from this to the given target
bool moveTo(Card card, CardTarget target) {
if (remove(card)) {
target.receive(card);
return true;
}
return f... |
from pystache.template import Template
from pystache.view import View
from pystache.loader import Loader
def render(template, context=None, **kwargs):
context = context and context.copy() or {}
context.update(kwargs)
return Template(template, context).render()
|
package input
import (
"github.com/go-rod/rod/lib/proto"
"github.com/ysmood/gson"
)
// Modifier values
const (
ModifierAlt = 1
ModifierControl = 2
ModifierMeta = 4
ModifierShift = 8
)
// Key symbol
type Key rune
// keyMap for key description
var keyMap = map[Key]KeyInfo{}
// keyMapShifted for shifte... |
---
title: 'Blog created by GatsbyJs'
date: '2017-08-21'
description: 'Blog created by GatsbyJs'
---
This blog is built by Jian Wei using GatsbyJs.
#What is GatsbyJs?
Gatsby is a React-based, GraphQL powered, static site generator.
|
main = return $ 1 + 2
-- putStrLn "Hello, world!"
a1 x = let y = 1
in x + y |
@extends('layouts.app')
@section('content')
<div class="container" style="color:white">
<div class="row justify-content-center" style="margin-bottom: 10px;">
<h1>{{ $movieDetails->title }}</h1>
</div>
<div class="row justify-content-center" style="margin-bottom: 10px;">
... |
#!/bin/bash
mkdir -p res
yarn run genfontgl Lato/Lato-Regular.ttf ./res
yarn run genfontgl Lato/Lato-Italic.ttf ./res
yarn run genfontgl Lato/Lato-Bold.ttf ./res
yarn run genfontgl Lato/Lato-BoldItalic.ttf ./res |
package com.team.dream.cantus.cross.dto.mapper
import com.team.dream.cantus.cross.dto.ApiAlbumResponse
import com.team.dream.cantus.cross.model.DeezerAlbum
class ApiAlbumResponseMapper {
fun map(albumResponse: ApiAlbumResponse): List<DeezerAlbum> {
val albums = albumResponse.data
return albums.ma... |
/*
* interface для объекта с массивом меню и string
* */
export interface AbdullakhLatestWorks {
id: string;
subtitle: string;
title: string;
latestWorksBlock: any;
}
|
// Package discoveryssdp provides means to discover devices from Axis Communications on the network using SSDP.
package discoveryssdp
import "fmt"
// Placeholder is just that, a placeholder...
func Placeholder() {
fmt.Println("Hello world")
}
|
import numpy as np
import tensorflow as tf
from sklearn.metrics.pairwise import cosine_similarity
from compostela.tree_structure import Tree_structure
from compostela.tree_op import Tree_op
from compostela.auxiliar import Auxiliar_func
from compostela.tree_optimization.kruskal import Kruskal
from termcolor import cprin... |
# Code for Sebastin's Portfolio and Blog
visit the website at [https://seba003.github.io](https://seba003.github.io)
|
---
id: 5f3313e74582ad9d063e3a38
title: ステップ 2
challengeType: 0
dashedName: step-2
---
# --description--
`html` 要素内に `head` 要素を追加して、そこに `title` 要素を追加してください。 `title` 要素のテキストは `Cafe Menu` としてください。
# --hints--
`<head>` の開始タグが 1 つ必要です。
```js
assert(code.match(/<head>/i));
```
`</head>` の終了タグが 1 つ必要です。
```js
assert(c... |
<?php
declare(strict_types=1);
namespace Edde\Http;
use Edde\Rest\Reflection\Endpoint;
interface IHttpIndex {
public function register(string $endpoint): void;
/** @return Endpoint[] */
public function endpoints(callable $onRebuild = null): array;
public function endpoint(string $name): Endpoint;
}
|
/* { dg-do compile } */
/* { dg-options "-mfp16-format=ieee" } */
/* Encoding taken from: http://en.wikipedia.org/wiki/Half_precision */
/* This is the minimum normalized value. */
/* 0x0400 = 1024 */
__fp16 xx = 6.10352E-5;
/* { dg-final { scan-assembler "\t.size\txx, 2" } } */
/* { dg-final { scan-assembler "\t.s... |
/*------------------------------------------------------------------------------
tabTitle.js
------------------------------------------------------------------------------*/
// updates tab title
function updateTabTitle() {
// but only if a doc is actually selected
if ( $('#doc-dropdown .text.overflow').html() != 'Do... |
(ns octo.github.push
"push local backup remotely by using zbackup and rclone"
(:require
[octo.common.push :as cp]
[clojure.core.strint :refer (<<)]
[taoensso.timbre :as timbre]))
(timbre/refer-timbre)
(defn parent
([workspace]
(<< "~{workspace}/push"))
([workspace repo]
(<< "~(parent workspace... |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Wallace.IDE.Framework;
using Wallace.IDE.SalesForce.Document;
namespace Wallace.IDE.SalesForce.Function
{
/// <summary>
/// Remove a comment.
/// </summary>
public cla... |
public async Task<List<Gizmo>> GetGizmosAsync(string uri,
CancellationToken cancelToken = default(CancellationToken))
{
using (HttpClient httpClient = new HttpClient())
{
var response = await httpClient.GetAsync(uri, cancelToken);
return (await response.Content.ReadAsAsync<List<Gizmo>>());
}
} |
package com.JingyuYao.ClassicTanks.objects;
import com.JingyuYao.ClassicTanks.level.Level;
/**
* Created by Jingyu_Yao on 1/23/2015.
*/
public class Base extends GhostObj {
public Base(Level level, float x, float y, float width, float height) {
super(level, null, x, y, width, height);
gameObjTy... |
#!/bin/bash
for f in vendor/*.zip; do
unzip -juLL $f '*.svd'
done
|
import { Body, Controller, Post, ValidationPipe } from '@nestjs/common';
import { ApiTags } from '@nestjs/swagger';
import { RoleService } from '../services/role.service';
import { RoleDto } from '../../../package/dto/role.dto';
@ApiTags('Role')
@Controller('role')
export class RoleController {
constructor(private... |
<?php
namespace Htmlacademy\Enums;
class Actions
{
const ACCEPT = 'accept';
const DECLINE = 'decline';
const DONE = 'done';
const REMOVE = 'remove';
const APPLY = 'apply';
}
|
package day01;
/**
* 观察这接口
*/
public interface Observer {
void update(String name,String message);
}
|
use super::{Handle, UIPointType};
use skulpin::skia_safe::{
Canvas, ContourMeasureIter, Font, FontMgr, FontStyle, Matrix, Paint, PaintStyle, Path, Point,
Rect, TextBlob, Typeface, Vector,
};
pub mod calc;
use self::calc::*;
use super::constants::*;
use super::selbox;
use crate::glifparser;
use crate::state::{H... |
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using DG.Tweening;
public class IndexOutOfRange02 : BrainBase
{
public Transform[] targets;
IEnumerator Start()
{
DOTween.Init (true, false, LogBehaviour.ErrorsOnly).SetCapacity (1000, 100);
DOTween.defaultAutoPlay = AutoPlay.None;... |
<?php
if (class_exists('Simple_Slack')) {
return;
}
class Simple_Slack
{
private $url = false;
protected $post = array();
public function __construct($post)
{
if (! $post) {
return $this;
}
$this->post = $post;
}
public function __get($key)
{
... |
# chess-problems
A set of chess problems meant for young students who just began playing chess.
Currently the notation is in Romanian.
### TODO
* Add a script to change the launguage of the notation
* Use symbols
|
$(document).ready(function() {
$(document).on("change",".p_imagen",function(){
//cargar archivo
alert();
var file = this.files;
//crear imagen
var img = document.getElementById("img_temp");
img.src = window.URL.createObjectURL(file);
var ctx = canvas.getContext("2d");
ctx.drawImage(img, 0, 0,250,250);
... |
CREATE TABLE USER(
id int primary key not null,
name varchar(45) not null
);
INSERT INTO USER(id,name) values(1,'admin'); |
#!/usr/bin/perl
#
# Check flock() feature
#
# This isn't a real test; it just checks to make sure we can call the method.
# It doesn't even check to make sure that the default behavior
# (LOCK_EX) is occurring. This is because I don't know how to write a good
# portable test for flocking. I checked the Perl core dist... |
import React, { useState} from 'react';
import PICTURES from './data/pictures';
import {useDynamicTransition} from "./hooks";
const SECONDS = 1000;
const minimumDelay = 1;
const minimumIncrement = 1;
function Gallery() {
const [delay, setDelay] = useState(3 * SECONDS);
const [increment, setIncrement] = useState(... |
import { get } from './apiHelper';
const getNumberOfMonths = (startDate, endDate) => {
const startDateYear = startDate.getFullYear();
const endDateYear = endDate.getFullYear();
const startDateMonth = startDate.getMonth();
const endDateMonth = endDate.getMonth();
const numberOfMonths = endDateMonth + 12 * en... |
// Copyright (c) 2004-present Facebook All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Code generated by entc, DO NOT EDIT.
package ent
import (
"github.com/facebook/ent"
"github.com/facebook/ent/dialect"
)
// Option function to confi... |
---
order: 4
title: 节点可拖拽
---
```jsx
import React from 'react'
import ReactDOM from 'react-dom'
import { Tree } from '@kdcloudjs/kdesign'
function Demo() {
const [expandedKeys, setExpandedKeys] = React.useState(['0-1', '0', '1'])
const [checkedKeys, setCheckedKeys] = React.useState(['1-1'])
const [selectedKeys... |
package dhis2.org.analytics.charts.providers
import java.util.Locale
import org.hisp.dhis.android.core.period.Period
import org.hisp.dhis.android.core.period.PeriodType
interface PeriodStepProvider {
fun periodStep(periodType: PeriodType?): Long
fun periodUIString(
locale: Locale,
period: Peri... |
# slack-tools
## 入門
### インストール
`go get -u github.com/grncbg/slack-tools`
もし`$GOPATH/bin`がPATHに含まれていないのであれば、追加することで使いやすくなります。
以下、PATHが設定されている前提で記載します。
### 設定
Viperでサポートされるフォーマットが利用可能です。
`$HOME/.slack-tools.(yaml|toml|json|env)`等にSlackのtokenを設定してください。
#### 例
~/.slack-tools.toml
```TOML
token = "SLACK_TOKEN"
... |
require 'rubygems'
require 'ramaze'
# you can access it now with http://localhost:7000/
# This should output
# Hello, World!
# in your browser
class MainController < Ramaze::Controller
def index
"Hello, World!"
end
end
Ramaze.start
|
using System;
namespace Constellation.Foundation.ModelMapping.MappingAttributes
{
/// <inheritdoc />
/// <summary>
/// If a Model property is marked with this attribute, the ModelMapper will not try to populate the property.
/// </summary>
[AttributeUsage(AttributeTargets.Property)]
public class DoNotM... |
include_attribute 'nodejs'
default['amqp_executor']['AMQP_URL'] = "amqp://localhost:5672"
default['amqp_executor']['AWS_ACCESS_KEY_ID'] = "defaultXXXXXXXXXXX"
default['amqp_executor']['AWS_SECRET_ACCESS_KEY'] = "defaultYYYYYYYYYYYYYYYYYYY"
default['paasage_services']['enable'] = true
|
// #autoindex:named
//#region autoindexed files
// indexed at: 5th May, 2020, 09:52 PM ( GMT-7 )
export * from "./addedLocally";
export * from "./mutations";
export * from "./reset";
export * from "./serverConfirms";
export * from "./serverEvents";
export * from "./serverRollbacks";
export * from "./watchEvents";
//#e... |
/*---------------------------------------------------------------------------*\
Copyright held by the original author
------------------------------------------------------------------------------
License
This file is part of cfMesh.
cfMesh is free software; you can redistribute it and/or modify it
unde... |
//
// logicalDevice.cpp
// VulkanHpp
//
// Created by Christian aan de Wiel on 17/01/2021.
//
#include "logicalDevice.hpp"
namespace pvk::device::logical {
auto create(const vk::PhysicalDevice &physicalDevice,
const QueueFamilyIndices &indices,
const std::vector<const char *> &d... |
#![recursion_limit = "512"]
use asn1rs::prelude::*;
#[derive(ProtobufEq)]
pub struct SimpleStruct {
maybe_some_number: Option<u64>,
}
#[test]
pub fn test_none_is_eq_to_zero() {
assert!(SimpleStruct {
maybe_some_number: None,
}
.protobuf_eq(&SimpleStruct {
maybe_some_number: Some(0),
... |
---
layout: issue
title: "Hostname validation for valid local hostname with ALLOW_ALL returns error on getErrors"
id: ZF-12329
---
ZF-12329: Hostname validation for valid local hostname with ALLOW\_ALL returns error on getErrors
------------------------------------------------------------------------------------------... |
# -*- encoding:utf-8; warn-indent:false -*-
#
# DO NOT MODIFY!!!!
# This file is automatically generated by Racc 1.4.9
# from Racc grammer file "".
#
require 'racc/parser.rb'
require 'parser'
module Parser
class Ruby18 < Parser::Base
module_eval(<<'...end ruby18.y/module_eval...', 'ruby18.y', 1910)
def versio... |
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;
using System.Security.Cryptography;
using System.Text;
#nullable disable
namespace Foodilizer_Group35.Models
{
[Table("user")]
[... |
/* ****************************************************
Script : Setup.sql
Purpose : Installation script for setting up words
Date Created : 10 January 2022
Description : Popular word game called Wordle in T-SQL
for Microsoft SQL Server 2017+
Based on https://powerlanguage.co.uk/wordle/
Autho... |
using NUnit.Framework;
using Qart.Core.Validation;
using System;
namespace Qart.Core.Tests.Validation
{
class RequireTests
{
[Test]
public void NotNullFailsWithNull()
{
Assert.Throws<ArgumentException>(() => Require.NotNull((string)null, "message"));
}
[Tes... |
from flask import Response
from app.model.point.status import PointStatusModel, message
from test import TCBase, check_status_code
from test.request import InfoRequest
class TestGetBasicInfo(TCBase, InfoRequest):
def setUp(self):
super(TestGetBasicInfo, self).setUp()
@check_status_code(200)
def ... |
var companyContainer = document.getElementById('companies'),
text = document.getElementById('brand-name'),
initialText = text.innerHTML,
hex = document.getElementById('hex'),
initialHex = hex.innerHTML,
search = document.getElementById('search'),
body = document.body,
isSafari = navigator.v... |
//
// Created by Oleksandr Semeniuta on 2019-01-02.
//
#ifndef PLOTSIM_H
#define PLOTSIM_H
#include "Eigen-3.3/Eigen/Core"
#include "MPC.h"
struct History {
std::vector<double> x;
std::vector<double> y;
std::vector<double> psi;
std::vector<double> v;
std::vector<double> cte;
std::vector<double> epsi;
... |
import React from 'react';
const education = props => (
<div className="education">
<h3 className="education__qualification">
<i className="fas fa-user-graduate" />
{props.education.qualification}
</h3>
<small className="education__year">
<b>Completed in:</b> <span>{props.education.yearCompleted}</span... |
class Api::ApiBaseController < ApplicationController
skip_before_filter :verify_authenticity_token
rescue_from CanCan::AccessDenied do |exception|
logger.warn "WARNING: Invalid access attempt: #{exception.message}"
head 403
end
end |
# Copyright (c) 2009-2012 VMware, Inc.
module Bosh::Agent
class Heartbeat
# Mostly for tests so we can override these without touching Config
attr_accessor :logger, :nats, :agent_id, :state
def initialize
@logger = Config.logger
@nats = Config.nats
@agent_id = Config.agent_id
... |
from arm.logicnode.arm_nodes import *
class CanvasGetScaleNode(ArmLogicTreeNode):
"""Returns the scale of the given UI element."""
bl_idname = 'LNCanvasGetScaleNode'
bl_label = 'Get Canvas Scale'
arm_version = 1
def arm_init(self, context):
self.add_input('ArmNodeSocketAction', 'In')
... |
#include <iostream>
#include <cstdlib>
#include <string>
#include <cstring>
#include <ctime>
#include "Event.h"
using namespace std;
// Event default constructor sets event_icon to empty event by default
Event::Event() { this->event_icon = " "; }
// setter function which will set a room to a new event
void Event::set... |
#pragma once
#include"Purpose.h"
//落下や矩形判定
class Rigit {
public:
bool check_foot(const Rect& rect_);//足元判定
void check_move(Vector2& vec_, Rect& rect_, bool& hit_flag);//マップにめり込まないようにする
void fall(Vector2& ,float);//落下処理
}; |
package com.mreigar.presentation.mapper
import com.mreigar.domain.model.User
import com.mreigar.presentation.model.UserViewModel
class UserViewModelMapper : Mapper<User, UserViewModel> {
override fun mapToView(domainEntity: User): UserViewModel = with(domainEntity) {
UserViewModel(name, username, email, a... |
#script to log network bandwidth periodically
import subprocess
import time
import sys
def FileSizeTooLarge():
"function to check if the network "
subprocess.call('ls -alh /mnt/CPU_stats.txt > out.txt',shell=True)
f = open('out.txt','r')
lines = f.readlines()
if len(lines) != 0... |
using UnityEngine;
namespace smash_bros
{
[RequireComponent(typeof(Manager))]
public class Movement : MonoBehaviour
{
protected Manager manager ;
protected Vector2 velocity ;
// Start is called before the first frame update
protected virtual void Awake... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.