text stringlengths 27 775k |
|---|
# Editing Unity Versionen im VR Labor
Wir verwenden die folgenden Versionen im VR-Labor:
* 2018.4.4f1 LTS
* 2019.3.0f6
## Installierte Module
Bei der Installation der Unity-Versionen installieren wir mindestens die folgenden Module:
* Windows Build Support
* Android Build Support
* WebGL Build Support
* Documentation... |
# frozen_string_literal: true
require 'gosu'
# Sprite
class Sprite
attr_reader :x, :y, :radius
def initialize; end
def collides_with?(sprite)
distance = Gosu.distance(x, y, sprite.x, sprite.y)
distance < @radius + sprite.radius
end
end
|
library extensions;
export 'package:xayn_readability/src/process_html/extensions/element_extensions.dart';
export 'package:xayn_readability/src/process_html/extensions/node_extensions.dart';
export 'package:xayn_readability/src/process_html/extensions/string_extensions.dart';
|
<?php
namespace App\Entity;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use App\Repository\ShowRepository;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
/**
* @ORM\Entity(repositoryClass=ShowRepository::class)
* @OR... |
exit_unclean = object()
exit_clean = object()
class Step(object):
provides = []
def __init__(self, logger):
self.logger = logger
def run(self, step_index, state):
"""Base class for state-creating steps.
When a Step is run() the current state is checked to see
if the stat... |
export const AuthMode: Readonly<Record<string, AuthModeType>> = {
/**
* If auth credentials should be in query parameters.
*/
WithinQueryParameters: 0,
/**
* If auth credentials should be in headers.
*/
WithinHeaders: 1,
};
export type AuthModeType = 0 | 1;
|
using System;
using Autofac;
using FluentValidation;
namespace Crawl.WebAPI.Handlers.Command
{
public class FluentValidatorFactory : ValidatorFactoryBase
{
private readonly IComponentContext context;
public FluentValidatorFactory(IComponentContext context)
{
this.context = context;
}
public override ... |
<?php
namespace App;
use Auth;
use Illuminate\Database\Eloquent\Model;
class Dream extends Model
{
/**
* Added attribute
*
* @var array
*/
protected $appends = ['is_owner'];
/**
* The attributes excluded from the model's JSON form.
*
* @var array
*/
protected... |
# Copyright (c) 2016 DeKrijger Engineering
#
# 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, merge, p... |
package table
import (
"github.com/jroimartin/gocui"
"github.com/nii236/kk/pkg/kk"
"github.com/olekukonko/tablewriter"
)
// Renderer contains the generic (!) methods needed
type Renderer interface {
Lines(*k.State) [][]string
Cursor(*k.State) int
Headers(*k.State) []string
Origin(*k.State, *gocui.View) (int, i... |
module Program (processSudoku) where
import Error
import Input (parseSudokuInput)
import Output (formatSudoku)
import Sudoku (Sudoku, solveSudoku, isSudokuValid)
validateSudoku :: Either Error Sudoku -> Either Error Sudoku
validateSudoku (Left error) = Left error
validateSudoku (Right sudoku)
| isSudokuValid sudo... |
(defproject statement-hoarder "1.0.0-SNAPSHOT"
:description "Statement Hoarder"
:dependencies [[org.clojure/clojure "1.4.0"]
[clj-yaml "0.3.1"]
[clj-webdriver "0.6.0"]]
:main statement-hoarder.core)
|
use std::fmt;
use std::cmp::Ordering;
//use super::TRes;
// TODO: add sanity checks that Seed > 0 from user input
const INVALID: i32 = -1;
const PLACEHOLDER: i32 = 0;
pub type Seed = i32;
pub type Score = u32;
/// A unique representation of a match in the tournament
#[derive(Eq, PartialEq, Ord, PartialOrd, Seriali... |
<?php
class Icon extends _Icon {
private $icon_name;
private $icon_type;
public function __construct($icon_name,$size=16,$icon_type=null){
$this->icon_name = $icon_name;
$this->size = $size;
$this->icon_type = $icon_type===null ? Oxygen::GetDefaultIconType() : $icon_type;
}
public function Render() {
$siz... |
---
title: "CodeWars 여든 아홉 번째 문제"
excerpt: "Permutations"
classes: wide
categories:
- CodeWars
tags:
- CodeWars
- 4kyu
last_modified_at: 2020-05-26
---
#### [Permutations](https://www.codewars.com/kata/5254ca2719453dcc0b00027d)
```java
public static List<String> singlePermutations(String s) {
HashSet<Strin... |
'use strict'
let gloArr = [];
// let quantSum = 0;
function Order(food, quantity) {
this.orderName = food;
this.quant = quantity;
gloArr.push(this);
}
let foodInbut = document.getElementById('food');
let foodQuantity = document.getElementById('quantity');
let form = document.getElementById('form')
form.add... |
package mpprocfd
import "testing"
func TestGraphDefinition(t *testing.T) {
var fd ProcfdPlugin
graph := fd.GraphDefinition()
if actual := len(graph); actual != 1 {
t.Errorf("GraphDefinition(): %d should be 1", actual)
}
}
type TestOpenFd struct{}
func (o TestOpenFd) getNumOpenFileDesc() (map[string]uint64, e... |
using System;
using Core.Enumerations;
namespace Core
{
public class LedgerLine : TradeOrder
{
public LedgerLine()
{
}
public LedgerLine(string id, TradeOrderType tradeOrderType, double amount, CurrencyPair mainCurrencyPair,
DateTime whenTransaction) : base(tradeOrderType, amount, mainCurre... |
<?php
namespace App\Http\Controllers\API;
use App\HealthCareWorker;
use App\User;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
class ActionsController extends Controller
{
public function complete_profiles(Request $request)
{
$request->validate([
'msisdns' => 'require... |
namespace DistIL.AsmIO;
public struct ILInstruction
{
public ILCode OpCode { get; set; }
public int Offset { get; set; }
/// <summary> Operand value, one of `null, int, long, float, double, EntityDef, or int[]`. </summary>
public object? Operand { get; set; }
//We could probably use an extra long f... |
package semester.service.chatwork.domain.model.account
import semester.foundation.domain.model.Identity
case class AccountId(value: BigInt)
extends Identity[BigInt]
|
#include "ramdisk_fat16.h"
#include "../drivers/ramdisk/ramdisk.h"
#include "../config/config.h"
#include "../libc/stdlib.h"
#include "../libc/string.h"
/* Structure for a FAT16 entry */
struct ramdisk_fat16_entry {
/* Name is 8 characters, extension is 3 characters */
uint8_t entry_name[11];
/*
... |
# sergey's dotfiles
Dotfiles. Run `python setup.py` to create the links.
(Warning: links will overrite existing links or files)
## Credits
Ideas, code and inspiration came from -
* [Mathias Bynens](https://github.com/mathiasbynens/dotfiles)
* [Zach Holman](https://github.com/holman/dotfiles)
* [Ryan Bates](https://... |
import {fixtures} from "../../test-fixtures";
import {BinaryWriter, ReflectionBinaryWriter} from "../src";
import {binaryWriteOptions} from "../src";
describe('ReflectionBinaryWriter', () => {
beforeEach(function () {
jasmine.addCustomEqualityTester((a, b) =>
(a instanceof Uint8Array && b inst... |
// Copyright (c) 2014, 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.
// @dart = 2.10
library dart2js.stress;
import 'package:compiler/src/dart2js.dart' as dart2js;
import... |
import { supportTouch } from '@ui5/webcomponents-base/dist/Device';
import '@ui5/webcomponents-react-base/third-party/modernizr';
declare const Modernizr: {
pointerevents: boolean;
matchmedia: boolean;
deviceorientation: boolean;
websockets: boolean;
placeholder: boolean;
};
export class Support {
public ... |
<?php
namespace App\Http\Requests\JobExperience;
use Illuminate\Foundation\Http\FormRequest;
class CreateRequest extends FormRequest
{
public function authorize()
{
return true;
}
public function attributes()
{
return [
"jobTitle" => "仕事タイトル",
"busines... |
package com.whty.eschoolbag.softkeyboard.keyboard;
/**
* KeyboardType 键盘类型
*
*
*/
public enum KeyboardType {
/**
* 中文
*/
INPUT_ZH(-1,"中文"),
/**
* 数字键盘
*/
NUMBER_ONLY(0, "数字"),
/**
* 字母键盘
*/
LETTER_ONLY(1, "字母"),
/**
* 综合_字母
*/
MULTI_LETT... |
use alloc::string::{String, ToString};
use core::fmt::{self, Write};
use core::ops::{Deref, DerefMut};
use gc::{Gc, Trace};
use super::{new_kind, new_object, scope_get_with_kind, scope_set, Kind, Map, Object, Scope};
#[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct Keyword(String);
impl Trace for K... |
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System;
using System.Collections.Generic;
using Iot.Device.GrovePiDevice.Models;
namespace Iot.Device.GrovePiDevice.Sensors
{
/// <summary>
/// The led bar orientation... |
Pod::Spec.new do |s|
s.name = "PDMVVM"
s.version = "0.3.2"
s.platform = :ios
s.swift_versions = "5.0"
s.ios.deployment_target = '9.0'
s.summary = "Template for implementation MVVM Pattern"
s.homepage = "https://github.com/sindanar/PDMVVM"
s.license = { :type => "MIT", :fi... |
# Licensed to Elasticsearch B.V. under one or more contributor
# license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright
# ownership. Elasticsearch B.V. licenses this file to you under
# the Apache License, Version 2.0 (the "License"); you may
# not use this f... |
require "edools_desafio/version"
require "edools_desafio/configurattion"
module EdoolsDesafio
def self.all
Unirest.get(Configurattion::URL_BASE)#.body.map { |learn| Learn.new(learn) }
end
end
|
#!/usr/bin/env perl
use warnings;
use strict;
use 5.010;
use Data::Dumper;
use Carp;
# uncomment to use authed calls
###############################
# confess('$COMUNIO_USERNAME missing!') unless $ENV{'COMUNIO_USERNAME'};
# confess('$COMUNIO_PASSWORD missing!') unless $ENV{'COMUNIO_PASSWORD'};
# sub SOAP::Transport::H... |
module Day7 (day7_1, day7_2)
where
import Control.Arrow
import Data.List.Split
import Data.List
day7_1 :: [String] -> IO ()
day7_1 = print . uncurry computeFuel . (median &&& id) . parseInput . head
day7_2 :: [String] -> IO ()
day7_2 = print . uncurry findMin . (median &&& id) . parseInput . head
findMin :: Int ->... |
require 'spec_helper'
describe StartupUser do
it "belongs to a user" do
described_class.new.association(:user).should be_a(ActiveRecord::Associations::BelongsToAssociation)
end
it "belongs to a startup" do
described_class.new.association(:startup).should be_a(ActiveRecord::Associations::BelongsToAssocia... |
//Guomin Huang @11/10/2021
//
package com.azure.aziothubdigitaltwinsconnector.webapp;
import org.springframework.lang.Nullable;
import org.springframework.web.servlet.HandlerInterceptor;
import org.springframework.web.servlet.ModelAndView;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSe... |
package br.com.gointerop.hapi.fhir.controller.patient;
import java.util.HashMap;
import java.util.List;
import org.hl7.fhir.dstu2016may.model.Patient;
import org.hl7.fhir.r4.model.Address;
import org.hl7.fhir.r4.model.Bundle;
import org.hl7.fhir.r4.model.Bundle.BundleEntryRequestComponent;
import org.hl7.fhir.r4.mode... |
require 'rails_helper'
RSpec.describe 'Appointments API' do
let(:user) { create(:user) }
let!(:tutor) { create(:tutor, rate: '$145/hr', experience: '5 years', img: 'http://image.com') }
let!(:appointment) do
create_list(:appointment, 5,
tutor_id: tutor.id,
user_id: user.id,
... |
using DamageBoy.Core.State;
using System.IO;
namespace DamageBoy.Core
{
class VRAM : IState
{
public byte[] VRam { get; }
public byte[] Oam { get; }
public const ushort VRAM_START_ADDRESS = 0x8000;
public const ushort VRAM_END_ADDRESS = 0xA000;
public const ushort VRAM... |
<?php session_start();
include("../db.php");
$class_id = trim($_POST["class_id"]);
$branch_id = $_SESSION['LOGIN_BRANCH'];;
$str = "SELECT subject_code,subject_name FROM std_subject_config WHERE class_id=$class_id AND branch_id=$branch_id";
$sql = mysql_query($str);
while($res = mysql_fet... |
from tweepy import StreamListener
from tweepy import OAuthHandler
from tweepy import Stream
from tweepy import API
from tweepy import Cursor
#Custom stream listener class to collect relevant details
class StreamListener(StreamListener):
def on_status(self, status):
if hasattr(status, 'retweeted_status'):
... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package org.aiotrade.lib.io
import java.io.File
import java.io.FileInputStream
import java.io.FileOutputStream
import java.io.IOException
object FileCopier {
@throws(classOf[IOException])
def copyOne(src: File,... |
// Copyright 2016 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.
import 'dart:ui' show lerpDouble;
import 'package:armadillo/common.dart';
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';... |
{-|
Module: Test.Controller.ParamSpec
Copyright: (c) digitally induced GmbH, 2020
-}
module Test.Controller.SessionSpec where
import Data.Either (isLeft)
import GHC.Generics
import IHP.Controller.Session
import IHP.ModelSupport
import IHP.Prelude
import Test.Hspec
import qualified Data.Aeson as Aeson
tests = do
d... |
package com.tyzoid.java.midi;
public class QueueElem {
private QueueElem next;
private MusicElem music;
private long timestamp;
public QueueElem(MusicElem music, long timestamp){
this.music = music;
this.timestamp = timestamp;
next = null;
}
public QueueElem getNext(){
return this.next;
}
public ... |
---
name: coral-supplementary-figure-17
layout: vistory
title: Coral Paper Figure
hidden: true
description: Coral is an analysis tool for interactively creating cohorts.
vistory: coral.caleydoapp.org/#clue_graph=coralPaperCaseStudy2I56So&clue_state=16
redirect_from: /coral-supplementary-figure-17.html
--- |
//InOrder,PreOrder and PostOrder Traversal of a BT
#include<iostream>
#include<cstdio>
#include<cstdlib>
using namespace std;
struct node
{
int data;
struct node* left;
struct node* right;
};
struct node* newnode(int data)
{
struct node* node=(struct node*)(malloc(sizeof(struct node)));
node->data=data;
... |
require "test_helper"
class ThProvince::ProvinceTest < Minitest::Test
def test_province_data
assert ThProvince::Province.data.count > 0
end
def test_province_find
x = ThProvince::Province.find(1)
assert !x.nil?
assert x.is_a?(ThProvince::Province)
end
def test_province_find
assert ThProvi... |
export type MapFunction<T, K> = (value: T, index?: number, array?: ReadonlyArray<T>) => K;
|
#!/bin/bash
php-fpm -D
/usr/bin/caddy run -config /etc/caddy/Caddyfile --adapter caddyfile |
<?php
/**
* Command class for deleting handling
*/
namespace Lists\OrganizationBundle\Command;
use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Doctrine\DBAL\Connection;
/**
* Class Pars... |
package chat.sphinx.chat_common.ui.viewstate.selected
import chat.sphinx.chat_common.ui.viewstate.messageholder.MessageHolderViewState
import chat.sphinx.wrapper_view.*
import io.matthewnelson.concept_views.viewstate.ViewState
internal sealed class SelectedMessageViewState: ViewState<SelectedMessageViewState>() {
... |
package edu.frescoplus.module;
import edu.frescoplus.core.FPContext;
import edu.frescoplus.core.FP_LibFloodlight;
import edu.frescoplus.core.TCPSession;
import edu.frescoplus.module.core.AFP_Module;
import edu.frescoplus.module.core.ModuleParameters;
import java.util.HashMap;
import java.util.Objects;
import net.flo... |
import 'dart:developer';
import 'package:flutter/material.dart';
import 'package:spaceCraft/widget/explosion.dart';
import 'package:spaceCraft/widget/models/particle.dart';
import 'package:spaceCraft/widget/rives/rive_explosion1.dart';
import 'package:spaceCraft/widget/rives/rive_explosion2.dart';
enum DamageOnCollis... |
const psFile = require("./ps-file")
const psComponent = require("./ps-component")
const { cssRouter, beforeLoadJsRouter, jsRouter, mainRouter, componentsRouter } = require("../../src/router")
const css = psFile("css", [...cssRouter])
const js = psFile("js", [...jsRouter])
const beforeLoadJs = psFile("js", [...beforeL... |
// Copyright (c) 2012 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.
cr.exportPath('print_preview');
/**
* Enumeration of field names for serialized app state.
* @enum {string}
*/
print_preview.AppStateField = {
V... |
export clip_by_global_norm!, global_norm
using Zygote
Zygote.@adjoint argmax(xs; dims = :) = argmax(xs; dims = dims), _ -> nothing
global_norm(gs::Zygote.Grads, ps::Zygote.Params) =
sqrt(sum(mapreduce(x -> x^2, +, gs[p]) for p in ps))
function clip_by_global_norm!(gs::Zygote.Grads, ps::Zygote.Params, clip_norm:... |
# SOAP Server
## Install
`go get github.com/francistm/soap-server`
## Example
Details see [calculator example](./sample/calc/main.go)
When SOAP port & action defined, WSDL definition XML will be served in the endpoint by GET request.
|
/// <reference path="UserControl.ts" />
module Fayde.Controls {
export class Page extends UserControl {
static TitleProperty = DependencyProperty.Register("Title", () => String, Page);
Title: string;
constructor() {
super();
this.DefaultStyleKey = Page;
... |
<?php
namespace App\Http\Controllers;
use App\Http\Traits\CategoryTrait;
use App\Models\Category;
use Illuminate\Http\Request;
class CategoriesController extends Controller
{
use CategoryTrait;
private $catModel;
public function __construct(Category $cat)
{
$this->catModel = $cat;
}
... |
from django.contrib.auth import login
from django.contrib.auth.forms import UserCreationForm
from django.urls import reverse_lazy
from django.views.generic import FormView
class Register(FormView):
form_class = UserCreationForm
success_url = reverse_lazy('mortgages:list')
template_name = "registration/reg... |
using System;
using System.Linq;
using NUnit.Framework;
namespace Agoda.Frameworks.DB.Test
{
public class SpParameterTest
{
[Test]
public void CreateCacheKey_Types()
{
var safeTypes = new[]
{
typeof(int),
typeof(string),
... |
#!/bin/sh -e
# vim: set et sw=2 ts=2:
cd utPLSQL/source
$ORACLE_HOME/bin/sqlplus / as sysdba @install_headless.sql $UTPLSQL_OWNER $UTPLSQL_PASSWORD $UTPLSQL_TABLESPACE
|
#ifdef ALLOW_CFC
cCADJ STORE AtmosCFC11 = tapelev4, key = ilev_4
cCADJ STORE AtmosCFC12 = tapelev4, key = ilev_4
CADJ STORE Atmosp = tapelev4, key = ilev_4
CADJ STORE pisvel = tapelev4, key = ilev_4
CADJ STORE fice = tapelev4, key = ilev_4
CADJ STORE wind0 = tapelev4, key = ilev_4
CADJ ST... |
# NFLSimulatoR 0.3.0
* Rename sample_drives_until_score to sample_drives
# NFLSimulatoR 0.2.1
* Bug fix on down_distance_updater.R (Dec 8, 2020)
* Update prep_pbp_data.R function by defining NULLs (Dec 8, 2020)
# NFLSimulatoR 0.2
* Support for downloading data from nflfastR data site (Dec 1, 2020)
# NFLSimulatoR ... |
# JMeter
1. 编写你的脚本
2. 使用JMeter进行本地测试
3. BlazeMeter沙箱测试
4. 使用一个控制台和一个引擎设置Users-per-Engine的数量
5. 设置并测试你的集合 (1个控制台和10-14 引擎)
6. 使用 Master / Slave 特性来达成你的最大CC目标
### 步骤1 : 编写你的脚本
|
package com.paytomat.eth;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
/**
* created by Alex Ivanov on 3/25/19.
*/
class FileUtil {
static String readFile(Class clazz, String fileName) throws IOException {
InputStream input = c... |
import axios from 'axios';
import { BACKEND_URL } from '../../dummy/env';
import {
AddPostFormData,
AddCommentFormData,
UpdatePostFormData,
UpdateCommentFormData,
DeleteCommentFormData,
} from './type';
export const loadPostsAPI = async (
subjectId: number,
categoryId: number,
page: number,
amount: n... |
package com.badoo.automation.deviceserver.ios.simulator.video
import com.badoo.automation.deviceserver.LogMarkers
import com.badoo.automation.deviceserver.data.DeviceInfo
import com.badoo.automation.deviceserver.data.DeviceRef
import com.badoo.automation.deviceserver.data.UDID
import com.badoo.automation.deviceserver.... |
import {
FETCH_BANNERS,
RECEIVE_BANNERS
} from '../constants/actionTypes'
import {
receiveProgressLinear,
forceFinished
} from './progressLinearActions'
import api from '../lib/api'
const fetchBanners = (value = true) => [
value ? receiveProgressLinear() : forceFinished(),
{
type: FETCH_BANNERS,
pa... |
package joe
// Error is the error type used by Joe. This allows joe errors to be defined as
// constants following https://dave.cheney.net/2016/04/07/constant-errors.
type Error string
// Error implements the "error" interface of the standard library.
func (err Error) Error() string {
return string(err)
}
|
package rescuecore2.config;
import java.util.Set;
/**
Interface for specifying constraints on a Config.
*/
public interface ConfigConstraint {
/**
Check if this constraint has been violated.
@param config The Config object.
@return True iff the constraint has been violated.
*/
bool... |
using Microsoft.VisualStudio.TestTools.UnitTesting;
using YiJingFramework.References.Zhouyi.Zhuan;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.IO;
namespace YiJingFramework.References.Zhouyi.Zhuan.Tests
{
[TestClass()]
public... |
import os
MY_DIR = os.path.dirname(__file__)
KOUGO_PATH = os.path.join(MY_DIR, 'kougo', 'kougo.txt.gz')
WEB_VERSES = os.path.join(MY_DIR, 'web', 't_web.csv.gz')
WEB_BOOKS = os.path.join(MY_DIR, 'web', 'key_english.csv.gz')
WEB_ABBRS = os.path.join(MY_DIR, 'web', 'key_abbreviations_english.csv.gz')
WEB_GENRES = os.path... |
# Automate the boring Stuff folder
Based on a book:
[Automate The Boring Stuff With Python](https://automatetheboringstuff.com/)
Just for training purposes, thanks to **Al Sweigart** for this great book and for the help on twitter.
Some of the codes were changed to serve in my own reality, and are not _revised_ or _... |
namespace KorneiDontsov.Sql {
using System;
public sealed class WithoutDbMigrationAttribute: Attribute, IDbMigrationEndpointMetadata {
public static WithoutDbMigrationAttribute shared { get; } =
new WithoutDbMigrationAttribute();
/// <inheritdoc />
public Boolean isRequired => false;
}
}
|
#!/bin/bash
##############################################################################
# Name: gone.sh (grep oneliners)
#
# Summary: grep $HOME/code/misccode/oneliners, highlight the search word and
# display context surrounding each hit. Optionally allow searching
# only specific section... |
namespace EnvironmentAssessment.Common.VimApi
{
public class VAppPropertyFault : VmConfigFault
{
protected string _id;
protected string _category;
protected string _label;
protected string _type;
protected string _value;
public string Id
{
get
{
return this._id;
}
set
{
this._id =... |
import { verify } from "jsonwebtoken";
import { Response, NextFunction } from "express";
import AdminModel from "../models/admin.model";
const { JWT_SECRET } = process.env;
export default function authMiddleware(
req: any,
res: Response,
next: NextFunction
) {
const header = req.headers.authorization;
if (... |
<?php declare(strict_types=1);
/**
* @author Darvin Studio <info@darvin-studio.ru>
* @copyright Copyright (c) 2018-2020, Darvin Studio
* @link https://www.darvin-studio.ru
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
na... |
# frozen_string_literal: true
require 'elastic_apm/subscriber'
require 'elastic_apm/normalizers/grape'
module ElasticAPM
# Module for starting the ElasticAPM agent and hooking into Grape.
module Grape
extend self
# rubocop:disable Metrics/MethodLength, Metrics/AbcSize
# Start the ElasticAPM agent and... |
using System.Collections.ObjectModel;
using System.Collections.Specialized;
using System.Xml.Serialization;
using QSF.ViewModels;
namespace QSF.Examples.TreeViewControl.FirstLookExample
{
[XmlRoot("Folder")]
public class FolderViewModel : BindableBase
{
private FolderViewModel parent;
priv... |
"""Define constants to be used throughout the repository."""
from pathlib import Path
# Main directories
PROJECT_DIR = Path(__file__).parent.parent
DATA_DIR = Path("/deep/group")
# Datasets
CHEXPERT = "chexpert"
CUSTOM = "custom"
CHEXPERT_SINGLE = "chexpert_single_special"
CXR14 = "cxr14"
SHENZHEN = "shenzhen_special... |
# ActivitiPublicRestApi.AboutApi
All URIs are relative to *https://localhost:8080/activiti-app*
Method | HTTP request | Description
------------- | ------------- | -------------
[**getAppVersion**](AboutApi.md#getAppVersion) | **GET** /api/enterprise/app-version | Server Information
<a name="getAppVersion"></a>
# *... |
using System.Collections.Generic;
namespace Storm.Mvvm.Bindings
{
public class BindingObject
{
public object TargetObject { get; set; }
public List<BindingExpression> Expressions { get; private set; }
public BindingObject()
{
Expressions = new List<BindingExpression>();
}
public BindingObject(obje... |
CREATE TABLE orders (
id BIGINT UNSIGNED NOT NULL PRIMARY KEY,
order_type TINYINT NOT NULL COMMENT '0:buy 1:sell 2:market_buy 3:market_sell',
pair VARCHAR(15) NOT NULL,
amount DECIMAL(15,4) NOT NULL,
rate DECIMAL(15,4),
stop_loss_rate DECIMAL(15,10),
status TINYINT NOT NULL DEFAULT 0 COMMENT '0:open 1:clo... |
using System;
using System.Collections.Generic;
using System.Text;
namespace Zooyard.Atomic
{
/// <summary>
/// 计数器,从0开始,保证正数。
/// </summary>
public class PositiveAtomicCounter
{
private const int MASK = 0x7FFFFFFF;
private readonly AtomicInteger atom;
public PositiveAtomi... |
// https://open.kattis.com/problems/grandpabernie
#include<bits/stdc++.h>
using namespace std;
using vi=vector<int>;
using msvi=unordered_map<string,vi>;
int main(){
int n,q,y;
string s;
msvi m;
cin>>n;
for(int i=0;i<n;i++){
cin>>s>>y;
m[s].push_back(y);
}
for (auto it=m.begin();it!=m.end();it++)
... |
namespace Zaabee.ZeroMQ.Abstractions.Socket.RequestReply;
public interface IClientSocket
{
void ClientSend<T>(T message);
Task ClientSendAsync<T>(T message);
T? ClientReceive<T>();
Task<T?> ClientReceiveAsync<T>();
} |
def permutations?(string1, string2)
if string1 == "" && string2 == ""
return true
elsif string1.length != string2.length
return false
end
char_count_hash = {}
string1.each_char do |char|
if char_count_hash.has_key?(char)
char_count_hash[char] = char_count_hash[char] + 1
else
cha... |
import React from 'react';
import PropTypes from 'prop-types';
const propTypes = {
text: PropTypes.string.isRequired,
keyword: PropTypes.string.isRequired,
};
/**
* Component to hight text's first occurrence of keyword
*/
const Highlighter = ({ text, keyword }) => {
const index = text.toLowerCase().indexOf(ke... |
@if(isset($etudiant))
{!! Form::model($etudiant, ['route' => ['updateEtudiant', $etudiant->id], 'method' => 'put']) !!}
@else
{!! Form::open(['route' => 'addEtudiant']) !!}
@endif
@php($nom = trans('etudiant.nom'))
@php($prenom = trans('etudiant.prenom'))
@php($bouton = trans('commun.enregistrer'))
<div class... |
using DocFunctions.Markdown.Transformers;
using docsFunctions.Shared.Models;
using Newtonsoft.Json.Linq;
using System;
using Xunit;
namespace DocFunctions.Markdown.Unit.Transformers
{
public class CodeTrasnformerTests
{
[Fact]
public void Correctly_Convert_Code_Tag()
{
var ... |
---
layout: watch
title: TLP4 - 09/02/2021 - M20210209_042326_TLP_4T.jpg
date: 2021-02-09 04:23:26
permalink: /2021/02/09/watch/M20210209_042326_TLP_4
capture: TLP4/2021/202102/20210208/M20210209_042326_TLP_4T.jpg
---
|
use serde::{Deserialize, Serialize};
use crate::models::Id;
/// A server category.
#[derive(Debug, Clone, PartialEq, Deserialize, Serialize)]
pub struct Category {
/// Category id.
pub id: Id,
/// Category title.
pub title: String,
/// Category channels ids.
pub channels: Vec<Id>,
}
impl Cate... |
<?php
// Exit if accessed directly
if ( !defined( 'ABSPATH' ) ) {
exit;
}
/**
* Site Front Page
*
* Note: You can overwrite front-page.php as well as any other Template in Child Theme.
* Create the same file (name) include in /responsive-child-theme/ and you're all set to go!
* @see http:... |
<?php
namespace AppBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;
/**
* Devis
*
* @ORM\Table(name="devis")
* @ORM\Entity(repositoryClass="AppBundle\Repository\DevisRepository")
*/
class Devis
{
/**
* @var int
*
* @ORM\Column(name="id", t... |
# encoding: UTF-8
module MongoMapper
module Plugins
module Persistence
extend ActiveSupport::Concern
module ClassMethods
def inherited(subclass)
unless subclass.embeddable?
subclass.connection(connection)
subclass.set_database_name(database_name)
... |
/*
* Vector2D.h
* OpenGLEditor
*
* Created by Filip Kunc on 6/21/09.
* For license see LICENSE.TXT
*
*/
#pragma once
#include "MathForwardDeclaration.h"
class Vector2D
{
public:
float x, y;
Vector2D();
Vector2D(const float * v);
Vector2D(const Vector2D & v);
Vector2D(float x, float y);
operator fl... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.