text stringlengths 27 775k |
|---|
package fr.philr.medimail.pop3access;
import java.net.Socket;
public interface POP3ServerFactory {
public void handleConnection(Socket clientSocket);
}
|
using System;
namespace ngWithJwt.Models
{
public class User
{
public string UserName { get; set; }
public string Password { get; set; }
public string ConfirmedPassword { get; set; }
public string GivenName { get; set; }
public string FamilyName { get; set; }
pu... |
<?php
namespace backend\modules\test\models;
use Yii;
/**
* This is the model class for table "test_multichoice".
*
* @property integer $id
* @property integer $alone
* @property string $content
* @property string $options
* @property string $answer
* @property string $note
* @property integer $chapter
* ... |
#Mask
[Try it here](http://www.stagexl.org/samples/mask/ "StageXL Mask Sample")
---
This is a simple demo showing some flowers and the effect when different masks
are applied. A mask hides the area of a DisplayObject which is outside of the
bounds of the mask. Only the pixels inside of the mask are visible.
The Mas... |
/* eslint-disable react/no-array-index-key */
import React from 'react'
import {
Box,
Link as MaterialLink,
Table,
TableBody,
TableCell,
TableContainer,
TableHead,
TableRow,
} from '@material-ui/core'
import { Link } from 'react-router-dom'
import styled from 'styled-components/macro'
import { flatten, ... |
## Obtaining Wikipedia as a Python dictionary
We adapt the Wikipedia extractor available in https://github.com/attardi/wikiextractor (all code is available in the arwiki folder).
From Wikipedia dumps we will turn it to a Python dictionary to be able to access it as:
```
wikipedia['لبنان'] = ["
لبنان أو (رسمياً... |
1. 模式匹配
1. 变量匹配
val v42 = 42
Some(3) match {
case Some(`v42`) => println("42") //不用反引号,理解为变量,一直输出42 引用前面定义的变量
case _ => println("Not 42") //输出
}
2. 变量绑定匹配
val person = Person("Tony",18)
person match {
// 使用 @ 将匹配的对象绑定到变量名上
case p @ Person(_,age) => println(s"${p.... |
require_relative 'spec_helper'
describe "Changes to ActionController" do
let(:controller) { InstanceMethodDummy.new }
describe "is_tablet_device?" do
let(:user_agent) { Object.new }
let(:expected_result) { Object.new }
it "should return the result from the tablet module" do
controller.us... |
//-----------------------------------------------------------------------------
// Copyright : (c) Chris Moore, 2020
// License : MIT
//-----------------------------------------------------------------------------
namespace Z0
{
using System;
using System.Runtime.CompilerServices;
using static Root... |
# CONFLICTS
This document explains why certain conflicts were added to `composer.json` and
refereneces related issues.
- `doctrine/inflector:^1.4`:
Inflector 1.4 changes pluralization of `taxon` from `taxons` (used in Sylius) to `taxa`.
References: https://github.com/doctrine/inflector/issues/147
-... |
// Copyright 2013 Beego Web 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 agreed ... |
% The "BlinkLED" program.
% The for structure repeats the program ten times.
for count : 1 .. 10
% Turns the LED on.
parallelput (1)
% Keeps the LED on for 500 milliseconds.
delay (500)
% Turns the LED off.
parallelput (0)
% Keeps the LED off for 300 milliseconds.
delay (300)
% Ends ... |
const fs = require('fs')
const _ = require('./helper')
module.exports = (filedir, bridge) => {
let filepaths = bridge.dirs[filedir]
let content = ''
// 合并文件
filepaths.forEach((path) => {
content += fs.readFileSync(path, {encoding: 'utf8'})
})
// 替换include
content = _.includeReplace(bridge.folder ... |
import React from 'react';
import PropTypes from 'prop-types';
import { NavigationContainer } from '@react-navigation/native';
import { createBottomTabNavigator } from '@react-navigation/bottom-tabs';
import { Appbar, withTheme } from 'react-native-paper';
import Icon from 'react-native-vector-icons/MaterialCommunityIc... |
{{ config(materialized='view') }}
-- stg_snowdepth_data
with source as (
select
*
from {{ source('snowdepth', 'V_snowdepth_intensive_data') }}
),
stg_snowdepth_data as (
select
sn_region,
sn_locality,
sn_section,
sn_site,
sn_plot::int,
t_date::date... |
/**
* @file Runnable_Demo.cpp
*
* @author Modified by David Zemon
*/
#include <PropWare/concurrent/runnable.h>
#include <PropWare/PropWare.h>
#include <PropWare/hmi/output/synchronousprinter.h>
#include <PropWare/gpio/pin.h>
using PropWare::Runnable;
using PropWare::Pin;
class TalkingThread: public Runnable ... |
##
# Copyright (c) 2012-2015 Apple Inc. 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
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... |
/*
* @Description: 基本形状 参考:
* 官网:http://wiki.ros.org/action/fullsearch/rviz/Tutorials/Markers%3A%20Basic%20Shapes?action=fullsearch&context=180&value=linkto%3A%22rviz%2FTutorials%2FMarkers%3A+Basic+Shapes%22
* 中文博客: https://www.cnblogs.com/wxt11/p/6561283.html
* @Author: HCQ
* @Company(School): UCAS
* @Email: 17... |
require_relative "scraper.rb"
require_relative "sports.rb"
require 'nokogiri'
require 'colorize'
class TempPostgame::CLI
BASE_PATH = "http://www.thepostgame.com/tag/nfl"
def call
puts "Welcome to temp Postgame"
menu
make_sports_menu
add_attributes_to_stories
display_stories
end
... |
<?php
namespace App\Services;
use App\Imports\ExcelImport;
use Illuminate\Support\Collection;
use Excel;
class UploadsExcel{
protected $file;
public function __construct($file)
{
$this -> file = $file;
}
/**
* excel解析之后,会包含sheet分页和所有的列,这儿取出第一页
*
* @return array excel解析的多维数... |
using UnityEngine;
using System.Collections;
public enum AN_CameraCaptureType {
Thumbnail = 0,
FullSizePhoto = 1
}
|
---
title: 2020-09-28_19.36.28
pos: -174.063 33.00000 -414.98
world: minecraft:the_nether
cover: /images/2020-09-28_19.36.28.png
---

|
#!/bin/sh
# Don't ask ssh password all the time
#if [ "$(uname -s)" = "Darwin" ]; then
# git config --global credential.helper osxkeychain
#else
# git config --global credential.helper cache
#fi
# better diffs
if command -v diff-so-fancy >/dev/null 2>&1; then
git config --global core.pager "diff-so-fancy | less --ta... |
'use strict';
/**
* Module dependencies
*/
var path = require('path'),
mongoose = require('mongoose'),
FRTest = mongoose.model('FRTest'),
errorHandler = require(path.resolve('./modules/core/server/controllers/errors.server.controller'));
/**
* Create an Facial Recognition Test
*/
exports.create... |
# Exercises
## Use partial or bind
You can often use more general functions to define more specific functions.
- Define function `power()` which is an alias to `Math.pow()`.
- Implement function `square()` which returns a number to the power of two.
- `bind()` function `power(base, power)` to obtain function `cube(n... |
import React from "react";
import Login from "../components/authentication/Login";
import LoggedOutLayout from "../components/common/LoggedOutLayout";
function login() {
return (
<LoggedOutLayout>
<Login />
</LoggedOutLayout>
);
}
export default login;
|
import {
injectable,
createContainer,
createStore,
action,
state,
createState,
ReactantAction,
} from '../..';
test('base `@state`', () => {
@injectable()
class Counter {
@state
count1 = 0;
@state
others = {
list: [] as number[],
};
@state
count = createState<numbe... |
(comment
re-core, Copyright 2012 Ronen Narkis, narkisr.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 required by applicable law... |
package org.hildan.fxlog.view;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.function.Consumer;
import java.util.function.Function;
import javafx.beans.binding.Bindings;
import javafx.beans.binding.BooleanBinding;
import javafx.beans.binding.IntegerExpression;
i... |
import { inject, injectable } from 'inversify';
import { HTMLInputProvider, InputKey, InputProvider } from '@uni.js/html-input';
import { ClientSideManager } from '@uni.js/client';
import * as Events from '../../event/internal';
@injectable()
export class PickDropManager extends ClientSideManager {
constructor(@injec... |
---
author: person
layout: post-full
title: FastKat 2
featimg: https://www.omiod.com/gfx/fastkat/fastkat-2-logo.png
tags: [text]
embed: https://www.omiod.com/games/FK2/
category: [standard]
---
Avoid hitting the particles by moving with your mouse. Try to stay alive and earn as many points as possible.
|
#!/usr/bin/env bats
load test_helpers/utilities
setup_file() {
echo "# 🚧" >&3
docker-compose up --detach collector app-sdk
wait_for_ready_app 'app-sdk'
curl --silent "http://localhost:5001"
wait_for_traces
}
teardown_file() {
cp collector/data.json collector/data-results/data-sdk.json
docker-compose stop ... |
---
uid: System.Web.UI.Design.Directives.SchemaElementNameAttribute
ms.author: "riande"
---
---
uid: System.Web.UI.Design.Directives.SchemaElementNameAttribute.Value
ms.author: "riande"
---
---
uid: System.Web.UI.Design.Directives.SchemaElementNameAttribute.#ctor(System.String)
ms.author: "riande"
---
|
module Profitwell
class Plans
include Request
def all
request(
"get",
resource_path("plans")
)
end
def find(plan_id)
request(
"get",
resource_path("plans/#{plan_id}")
)
end
def create(params = {})
request(
"post",
... |
import { BigNumber } from '@0x/utils';
import { Web3Wrapper } from '@0x/web3-wrapper';
// HACK (xianny): copied from asset-swapper, which will replace this package
const ONE_AMOUNT = new BigNumber(1);
const ETHER_TOKEN_DECIMALS = 18;
export const numberPercentageToEtherTokenAmountPercentage = (percentage: number): Big... |
#!/usr/bin/env bash
sed -i.bak "s/\( *\)s\.version\( *\)=\( *\)\".*\"/\1s\.version\2=\3\"${LD_RELEASE_VERSION}\"/" ios/LaunchdarklyReactNativeClient.podspec
rm -f ios/LaunchdarklyReactNativeClient.podspec.bak
sed -i.bak "s/\( *\)\"version\"\( *\):\( *\)\".*\"/\1\"version\"\2:\3\"${LD_RELEASE_VERSION}\"/" package.js... |
import { QuestionsType } from "./conf";
import { OpenTDBResponse } from "./providers/openTrivia";
import { ProviderList } from "./providers/providers";
export class Question {
answers: Answer[];
type: QuestionsType;
category: string;
text: string;
number: number;
getCorrectAnswer() {
r... |
package pl.wicherska.songs;
import pl.wicherska.songs.handlers.UserAction;
import pl.wicherska.songs.interfaces.UserActionHandler;
import pl.wicherska.songs.util.ScannerWrapper;
import java.util.Map;
public class ApplicationRunner implements Runnable {
private final Map<UserAction, UserActionHandler> handlers;
... |
#!/bin/sh
echo "running init.sh script"
export SERVICEUSER_USERNAME=$(cat /secret/serviceuser/username)
export SERVICEUSER_PASSWORD=$(cat /secret/serviceuser/password) |
# API Backends
Examples in this directory are intended to provide basic working backend CSRF-protected APIs,
compatible with the JavaScript frontend examples available in the
[`examples/javascript-frontends`](../javascript-frontends).
In addition to CSRF protection, these backends provide the CORS configuration requi... |
;;;; -*- Mode: LISP; Syntax: ANSI-Common-Lisp; Base: 10 -*-
;;;; *************************************************************************
;;;; FILE IDENTIFICATION
;;;;
;;;; Name: test-connection.lisp
;;;; Purpose: Tests for CLSQL database connections
;;;; Authors: Marcus Pearce and Kevin M. Rosenberg
;;;; Create... |
<?php
namespace Tests\Feature;
use Tests\TestCase;
use App\Report;
use Illuminate\Foundation\Testing\WithFaker;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Illuminate\Foundation\Testing\DatabaseMigrations;
class ReportTest extends TestCase
{
public static function setUpBeforeClass() : void
{
... |
#!/bin/bash
domain="$1"
#python ./scripts/prep_hdf5.py \
# --w2v ./w2v/glove.6B.300d.txt \
# --name ./data/preprocessed/"$domain"_MATE \
# --data ./data/set_dataset/"$domain".trn \
# --lemmatize
python ./scripts/prep_hdf5_inference.py \
--data ./data/set_dataset/"$domain".trn \
--name ./data/prep... |
---
title: Views
page_title: Views | Telerik UI FileManager HtmlHelper for ASP.NET Core
description: "Get familiar with Grid and Thumbs Views in Telerik UI FileManager for ASP.NET Core."
slug: htmlhelpers_filemanager_aspnetcore_views
position: 4
---
# Views Overview
|
import java.io.IOException;
import java.net.URL;
import java.util.Iterator;
import javax.imageio.ImageIO;
import javax.imageio.ImageReader;
import javax.imageio.stream.ImageInputStream;
/**
* Extracts the size from an image. The image is identified by an URI.
* Does not read the entire image, just the headers.
* ... |
require 'rails_helper'
describe SurveyResponseValidation, type: :service do
describe '#call' do
let(:test_collection) { create(:test_collection, :completed) }
let(:survey_response) { create(:survey_response, test_collection: test_collection) }
subject { SurveyResponseValidation.new(survey_response) }
... |
FactoryBot.define do
factory :authentication_token do
user { create(:support_user) }
hashed_token { SecureRandom.uuid }
end
end
|
// "Change type to 'CharSequence'" "true"
interface A {
val x: CharSequence
}
class B(override val x: Any<caret>) : A
|
<?php
/**
* This file is part of the Phalcon Framework.
*
* (c) Phalcon Team <team@phalcon.io>
*
* For the full copyright and license information, please view the LICENSE.txt
* file that was distributed with this source code.
*/
declare(strict_types=1);
namespace Phalcon\Test\Unit\Tag;
use Phalcon\Tag;
use P... |
/*
* Copyright (c) 2018-present, aliminabc@gmail.com.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#include "../include/BaseDrawer.h"
#include "log.h"
BaseDrawer::BaseDrawer() {
}
BaseDrawer::~BaseDrawer() {
glDeleteBuffers(1... |
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* This file is part of the HiGHS linear optimization suite */
/* */
/* Written an... |
module LogManager
class LogsController < ApplicationController
layout 'log_layout'
def index
@app_name = Rails.application.class.parent_name.underscore.humanize
@environment = Rails.env
log_file_path = "#{Rails.root}/log/#{@environment}.log"
@file_size = File.size(log_file_path)
... |
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
// RUN: %hermes --target=HBC -O %s | %FileCheck %s --match-full-lines
// RUN: %hermes --target=HBC -O -dump-ra %s | %FileCheck %... |
# frozen_string_literal: true
# 二代健保:公司代扣總額
module HealthInsuranceService
class CompanyWithhold
include Callable
attr_reader :year, :month
def initialize(year, month)
@year = year
@month = month
end
def call
premium
end
private
def premium
PayrollDetail.mon... |
---
layout: external-link
title: Analyzing Socrata data in Microsoft Excel® via OData
external_url: https://support.socrata.com/hc/en-us/articles/202950718
---
|
namespace hugobelman.wkhtmltopdf
{
public class WkHtmlToPdfHeaderFooter
{
private string center;
private string left;
private string right;
private string htmlUrl;
private string fontName;
private float fontSize = 12.0F;
private float spacing = 0.0F;
... |
---
title: "博客的由来"
layout: post
date: 2020-02-19 20:16
image: /assets/images/markdown.jpg
headerImage: false
tag:
- essay
- preface
star: false
category: blog
author: Zbh
description: 在标题下面显示的内容
---
虽然是colone的但是我想试试,自己也不会弄所以拿别人的样式改一改,原创是谁我也不太清楚,我clone的人他也是clone的。
|
module FilterParameters
PREVIOUS_PARAMETER_PREFIX = 'prev_'.freeze
def filter_params
parameters.reject do |param|
param.in? %w[utf8 authenticity_token page]
end
end
def filter_params_without_previous_parameters
remove_previous_parameters(filter_params)
end
def merge_previous_parameters(... |
package com.kylecorry.trail_sense.shared
import android.content.res.ColorStateList
import android.graphics.Color
import android.widget.ImageButton
import android.widget.SeekBar
import androidx.fragment.app.Fragment
import com.google.android.material.bottomnavigation.BottomNavigationView
import com.kylecorry.andromeda.... |
import {Request, Response, NextFunction} from "express"
import * as uuid from "uuid"
// TESTING PATCH RELEASE
export const userMiddleware = (req: Request, res: Response, next: NextFunction) => {
const uwuid = req.cookies.uwuid
if (!uwuid) {
const id = uuid.v1()
res.cookie("uwuid", id)
}
next()
}
expo... |
using Test
using HDF5
using DSGE
path = dirname(@__FILE__)
m = AnSchorfheide()
Γ0, Γ1, C, Ψ, Π = eqcond(m)
stake = 1 + 1e-6
#G1, C, impact, fmat, fwt, ywt, gev, eu, loose = gensys(Γ0, Γ1, C, Ψ, Π, stake)
G1, C, impact, eu = gensys(Γ0, Γ1, C, Ψ, Π, stake)
file = "$path/../reference/gensys.h5"
G1_exp = h5read(file, "G... |
// https://www.codechef.com/problems/PALL01
#include <iostream>
using namespace std;
bool is_palindrome()
{
string number;
cin >> number;
int delimiter = number.size() - 1;
for (int i = 0; i < number.size() / 2; i++)
{
if (number[i] != number[delimiter])
return false;
delimiter--;
}
retur... |
---
title: Links
---
[My personal Site](http://thomaskoefod.com) ← more links in here if you want
[Some notes about and around programming that I have done in the past](http://koefod.us/wp/)
[list of different editors I have used](http://koefod.us/wp/editors/)
[The Modern JavaScript Tutorial](https://javascript.in... |
/*
* Copyright (c) 2017. Yuriy Stul
*/
package com.stulsoft.aws.test2
import java.io.{ByteArrayInputStream, ByteArrayOutputStream}
import org.scalatest.{FlatSpec, Matchers}
/**
* @author Yuriy Stul
*/
class MainTest extends FlatSpec with Matchers {
behavior of "Main"
"greeting" should "return text" in {
... |
# AlwaysBaseball
Date : 2020 / 09 / 11
# Motivation & Purpose
Side Project - Baseball Ecosystem
1. Timeline Wall
2. Like & Comment
3. Live Game Watching
4. Game Recording
5. Team Management
6. Profile Setting
7. MVVM Design Pattern
8. Localization
# App Store
[Always Baseball - Reviewing](https://apps.apple.com/tw/)... |
require_relative '../excel'
require_relative '../util/not_supported_exception'
class AstCopyFormula
attr_accessor :rows_to_move
attr_accessor :columns_to_move
def initialize
self.rows_to_move = 0
self.columns_to_move = 0
end
DO_NOT_MAP = {:number => true, :string => true, :blank => true, :null ... |
import { connect, MapDispatchToProps, MapStateToProps } from "react-redux";
import { addCategory, updateCategory } from "./CategoryModal.actions";
import CategoryModalComponent from "./CategoryModal.component";
import {
AddCategoryFailureAction,
ADD_CATEGORY,
UpdateCategoryFailureAction,
UPDATE_CATEGORY,
} from... |
if [ -e ".git/hooks/pre-push" ]; then
#get version string
cd PHPFramework
sh makeDocumentation.sh
# ok
else
echo 'Creating pre-push git hook...'
echo '#!/bin/sh' > .git/hooks/pre-push
echo 'if [ -x ./_pre_push.sh ]; then' >> .git/hooks/pre-push
echo ' source ./_pre_push.sh' >> .git/hooks/pre-push
echo 'else' >... |
---
title: shuffle_order_engine 类 | Microsoft Docs
ms.custom: ''
ms.date: 11/04/2016
ms.technology:
- cpp-standard-libraries
ms.topic: reference
f1_keywords:
- random/std::shuffle_order_engine
- random/std::shuffle_order_engine::base
- random/std::shuffle_order_engine::discard
- random/std::shuffle_order_engine::operat... |
package no.skatteetaten.aurora.gobo.graphql.certificate
import com.expediagroup.graphql.server.operations.Query
import graphql.schema.DataFetchingEnvironment
import no.skatteetaten.aurora.gobo.integration.skap.CertificateService
import no.skatteetaten.aurora.gobo.security.checkValidUserToken
import org.springframework... |
<?php
use Illuminate\Database\Seeder;
class DatabaseSeeder extends Seeder
{
/**
* Seed the application's database.
*
* @return void
*/
public function run()
{
$this->call(UsersSeeder::class);
$this->call(QuestionsTableSeeder::class);
$this->call(JobsTypesTableSe... |
<?php namespace Nickwest\EloquentForms\Test\view\defaults\fields;
use Sunra\PhpSimple\HtmlDomParser;
use Nickwest\EloquentForms\Field;
use Nickwest\EloquentForms\Test\FieldViewTestCase;
use Nickwest\EloquentForms\Test\ThemeTestInterfaces\fileFieldTestInterface;
class fileFieldTest extends FieldViewTestCase implement... |
Before submitting a new issue, please search on the issue tracker first (https://github.com/neveldo/jQuery-Mapael/issues)
## Description
<!--- Describe what you want to achieve -->
<!--- Provide a working example if possible (e.g. using JSFiddle https://jsfiddle.net/) -->
## Expected Behavior
<!--- If you're descri... |
---
pid: '5037'
object_pid: '3110'
label: Feast of the Gods with Marriage of Peleus and Thetis
artist: janbrueghel
provenance_date: '1827'
provenance_location: Copenhagen
provenance_text: 'Inventory of the Royal Cabinet of Curiosity, inv. #1023'
collection: provenance
order: '0437'
---
|
package coop.rchain.casper.helper
import cats.syntax.all._
import cats.effect.Sync
import coop.rchain.rspace.state.{RSpaceExporter, RSpaceImporter, RSpaceStateManager}
final case class RSpaceStateManagerTestImpl[F[_]: Sync]() extends RSpaceStateManager[F] {
override def exporter: RSpaceExporter[F] = ???
override... |
package com.ascn.richlife.model.role;
/**
* 角色模型信息
*/
public class RoleModelInfo {
/**
* 头像信息
*/
private String headImgInfo;
/**
* 人物信息
*/
private String personImgInfo;
/**
* 模型
*/
private int modelId;
/**
* 模型路径
*/
private String modelPath;... |
module Emojidex
module Data
# collects and condenses UTF moji codes within a collection
module CollectionMojiData
attr_reader :moji_code_string, :moji_code_index
def condense_moji_code_data
@moji_code_string = ''
@moji_code_index = {}
@emoji.values.each do |moji|
... |
package core
// Code generated by github.com/tinylib/msgp DO NOT EDIT.
import (
"bytes"
"testing"
"github.com/tinylib/msgp/msgp"
)
func TestMarshalUnmarshalControlMsg(t *testing.T) {
v := ControlMsg{}
bts, err := v.MarshalMsg(nil)
if err != nil {
t.Fatal(err)
}
left, err := v.UnmarshalMsg(bts)
if err != ... |
package no.nav.syfo.testutil.generator
import no.nav.syfo.oversikthendelse.domain.OversikthendelseType
import no.nav.syfo.oversikthendelse.retry.KOversikthendelseRetry
import no.nav.syfo.testutil.UserConstants.ARBEIDSTAKER_FNR
import java.time.LocalDateTime
import java.util.*
val generateKOversikthendelseRetry =
... |
#!/bin/sh
# Copyright (c) 2021-2022 Apptainer a Series of LF Projects LLC
# For website terms of use, trademark policy, privacy policy and other
# project policies see https://lfprojects.org/policies
# Copyright (c) 2018-2021, Sylabs Inc. All rights reserved.
# This software is licensed under a 3-clause BSD license... |
# frozen_string_literal: true
require 'spec_helper'
RSpec.describe 'admin/application_settings/general.html.haml' do
let_it_be(:user) { create(:admin) }
let_it_be(:app_settings) { build(:application_setting) }
before do
assign(:application_setting, app_settings)
allow(view).to receive(:current_user).an... |
import {
beforeEach,
describe,
it,
} from '@bigtest/mocha';
import {
visit
} from '@bigtest/react';
import { expect } from 'chai';
import translations from '../../../translations/ui-users/en';
import setupApplication from '../helpers/setup-application';
import ChargeFeeFineInteractor from '../interactors/charg... |
use crate::{
key::{BeaconChainKey, DBPathKey, LocalMetricsKey, MetricsRegistryKey},
map_persistent_err_to_500,
};
use beacon_chain::{BeaconChain, BeaconChainTypes};
use iron::prelude::*;
use iron::{status::Status, Handler, IronResult, Request, Response};
use persistent::Read;
use prometheus::{Encoder, Registry,... |
module V2
class EditionsController < ApplicationController
def index
query = Queries::KeysetPagination.new(
Queries::KeysetPagination::GetEditions.new(edition_params),
pagination_params,
)
render json: Presenters::KeysetPaginationPresenter.new(
query, request.original_ur... |
#!/bin/bash
go run main.go temp 100
go run main.go length 100
go run main.go weight 100 |
plugins {
kotlin("jvm")
id("org.openapi.generator")
}
group = rootProject.group
version = rootProject.version
repositories {
mavenCentral()
}
//зависимости у каждого модуля - свои
dependencies {
val kotestVersion: String by project
val openapiVersion: String by project
val kotlinVersion: Stri... |
using System.Windows.Controls;
namespace TrialManager.Views
{
/// <summary>
/// Interaction logic for DataImportView.xaml
/// </summary>
public partial class EventSeparationView : UserControl
{
public EventSeparationView()
{
InitializeComponent();
}
}
}
|
using SmartSql.Data;
using System;
using System.Collections.Generic;
using System.Data;
using System.Text;
namespace SmartSql.TypeHandlers
{
public class NullableSByteTypeHandler : AbstractNullableTypeHandler<SByte?, AnyFieldType>
{
protected override SByte? GetValueWhenNotNull(DataReaderWrapper dataR... |
#! /usr/bin/env perl
# Copyright 2019-2021 The OpenSSL Project Authors. All Rights Reserved.
#
# Licensed under the Apache License 2.0 (the "License"). You may not use
# this file except in compliance with the License. You can obtain a copy
# in the file LICENSE in the source distribution or at
# https://www.openssl.... |
module SimplelogicaTheGame
class Bullet
include Sprite
SPEED = 400 # pixels / second
def initialize(x, y)
self.initialize_sprite
@image = $game.images[:bullet]
@radius = 10
@x = x
@y = y
@z = 1
end
def update
# move upwards
@y -= SPEED * $game.del... |
package rout
import (
"fmt"
"net/http"
ht "net/http/httptest"
"net/url"
"regexp"
"testing"
)
var (
stringNop = func(string) {}
stringsNop = func([]string) {}
errorNop = func(error) {}
boolNop = func(bool) {}
)
func BenchmarkRoute(b *testing.B) {
rew := ht.NewRecorder()
req := tReqSpecific()
b.Res... |
import { html, css} from "lit-element";
import { PageViewElement } from "./page-view-element.js";
import { connect } from "pwa-helpers/connect-mixin.js";
// This element is connected to the Redux store.
import { store } from "../store.js";
import {
loadData,
nextIndex,
prevIndex,
} from "../actions/data.js";
impo... |
/**
* \file obj-chest.c
* \brief Encapsulation of chest-related functions
*
* Copyright (c) 1997 Ben Harrison, James E. Wilson, Robert A. Koeneke
* Copyright (c) 2012 Peter Denison
*
* This work is free software; you can redistribute it and/or modify it
* under the terms of either:
*
* a) the GNU General Publ... |
# API namespaces methods
module VK::Namespaces
module ClassMethods
private
def create_default_namespaces!
default_namespaces.each do |namespace|
define_method namespace do
instance_variable_get("@#{ namespace }") ||
instance_variable_set("@#{ namespace }", VK::Methods.new(... |
import 'dart:ui';
import 'package:flutter/material.dart' hide Image, Texture;
import 'package:vector_math/vector_math_64.dart';
import 'clip_coordinates.dart';
import 'textures.dart';
import 'painters.dart';
import 'camera_body.dart';
import 'extensions.dart';
class Mesh extends StatelessWidget {
final Widget chil... |
package com.alexvanyo.composelife.algorithm
import androidx.annotation.IntRange
import androidx.compose.ui.unit.IntOffset
import com.alexvanyo.composelife.model.CellState
import kotlinx.coroutines.CoroutineDispatcher
import kotlinx.coroutines.withContext
import kotlin.math.ceil
import kotlin.math.log2
@Suppress("TooM... |
class AssignmentsController < ApplicationController
def index
@assignments = authorize Assignment.all
@user = current_user
@participants = Participant.all
@participants_list = []
@participants.each do |p|
if p.personal_questionnaire.nil?
PersonalQuest... |
export { default as DeleteManager } from './DeleteManager.js'
export { default as InsertManager } from './InsertManager.js'
export { default as SelectManager } from './SelectManager.js'
export { default as TreeManager } from './TreeManager.js'
export { default as UpdateManager } from './UpdateManager.js'
|
#!/usr/bin/env bash
NEW_TAG=$(date +'%Y.%m.%d')
TAG_REPLACEMENT=".version=\"${NEW_TAG}\""
cat package.json | jq -r "${TAG_REPLACEMENT}" > package.json.tmp
rm -f package.json
mv package.json.tmp package.json
git add package.json
git commit -m "v${NEW_TAG}"
git tag "${NEW_TAG}" -m "v${NEW_TAG}" || exit 1
|
package com.github.gmazzo.gradle.plugins.generators
import com.squareup.kotlinpoet.FileSpec
import com.squareup.kotlinpoet.PropertySpec
object BuildConfigKotlinFileGenerator : BuildConfigKotlinGenerator() {
override fun FileSpec.Builder.addFields(fields: List<PropertySpec>) =
fields.fold(this) { acc, it ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.