text stringlengths 27 775k |
|---|
package strategies;
import navigation.Grid;
public interface IRoutingStrategy {
public void route(Grid grid);
}
|
module TrackerApi
module Resources
class Comment
include Shared::Base
attribute :client
attribute :project_id, Integer
attribute :story_id, Integer
attribute :epic_id, Integer
attribute :text, String
attribute :person_id, Integer
attribute :person, Person
at... |
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TupleSections #-}
{-# LANGUAGE... |
package org.azbuilder.api.plugin.security.audit;
import org.azbuilder.api.plugin.security.audit.azure.AzureAuditorAwareImpl;
import org.azbuilder.api.plugin.security.audit.local.LocalAuditorAwareImpl;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import ... |
import os
from math import pi
import xml.etree.ElementTree as ET
import platform_paths as pp
import manipulator as ma
# load parameter file
TREE = ET.parse('../XML/parameter3D.xml')
ROOT = TREE.getroot()
ma.set_parameter(ROOT, 'withoutput', 1)
npx = 8
npy = 2
npz = 2
ma.set_parameter(ROOT, 'npx', npx)
ma.set_parame... |
# Jiphyeonjeon season2
Jiphyeonjeon Season 2
- [Beginners Group](beginner)
- [Intermediate Group](intermediate)
- [Advanced Group](advanced)
<br><br>
## Maintainers
[Hyunwoong Ko](https://github.com/hyunwoongko)
|
# zeroconf
`zeroconf` is a cross-platform library that wraps underlying [ZeroConf/mDNS] implementations
such as [Bonjour] or [Avahi], providing an easy and idiomatic way to both register and
browse services.
## Prerequisites
On Linux:
```bash
$ sudo apt install xorg-dev libxcb-shape0-dev libxcb-xfixes0-dev clang
``... |
import { createAsyncThunk, createSlice } from '@reduxjs/toolkit';
import { useSelector } from 'react-redux';
import {
getImages,
Image,
removeImage,
storeImages,
} from '../data/ChromeStorage';
import { AppDispatch, RootState } from './index';
type State = { images: Image[] };
const initialState: State = { ima... |
import 'package:deliciousfood/ui/pages/home/home_category_item.dart';
import 'package:flutter/material.dart';
import 'package:deliciousfood/core/model/category_model.dart';
import 'package:deliciousfood/core/service/json_parse.dart';
import 'package:deliciousfood/core/extension/int_extentsion.dart';
class LDHomeConte... |
/**
* Created by carapai on 24/03/2017.
*/
let meeting = {
2: [
{dataElement: "CcFZl5WUuhc", categoryOptionCombo: "INgVh9IjrCz", e_col: "B", b_col: "B", c_col: "B"},
{dataElement: "KDXgL4GaFa0", categoryOptionCombo: "INgVh9IjrCz", e_col: "C", b_col: "C", c_col: "C"},
{dataElement: "WIj6Pr... |
export class PulsanteLuce {
private _mqttClient: any;
private _message: string = '';
private _topic: string = '';
constructor(mqttClient: any) {
this._mqttClient = mqttClient;
}
get message(): string {
return this._message;
}
get topic(): string {
return this._topic;
}
... |
using System.Threading;
using System.Threading.Tasks;
using EfSpatialSample.Models;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
namespace EfSpatialSample
{
public interface IDataContext
{
DbSet<PointOfInterest> PointsOfInterest { get; set; }
int Sav... |
/*
Copyright 2018 The Jetstack cert-manager contributors.
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... |
import {
Column,
CreateDateColumn,
Entity,
JoinColumn,
ManyToOne,
PrimaryGeneratedColumn,
UpdateDateColumn,
} from 'typeorm';
import Clinic from './Clinic';
import User from './User';
@Entity('incomes')
class Income {
@PrimaryGeneratedColumn('uuid')
id: string;
@Column()
description: string;
... |
<?php
namespace App\Http\Controllers;
use App\Country;
use App\Subscription;
use App\TransactionCurrency;
use App\TransactionReason;
use App\User;
use Auth;
use Illuminate\Http\Request;
use View;
class SettingsController extends Controller
{
/**
* The payment service url.
*
* @var string
*/
... |
# frozen_string_literal: true
require "rails_helper"
RSpec.describe AsyncFileProcessing do
include ActiveJob::TestHelper
class TestClass
include ActiveModel::Model
include ActiveRecord::AttributeAssignment
include GlobalID::Identification
include AsyncFileProcessing
attr_accessor :status, :p... |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE LambdaCase #-}
module OGRGeometrySpec (spec) where
import Data.Either (isRight)
import Data.Maybe (isNothing)
import TestUtils
import OSR
import OGR
spec :: Spec
spec = do
describe "Geometry" $ do
describe "geomFromWkt / geomToWkt" $ do
itIO "succeeds i... |
module Region
( Region
( Shape
, Translate
, Scale
, Complement
, Union
, Intersect
, Empty
)
, Coordinate
, containsS
, containsR
, module Shape
) where
import Shape
data Region
= Shape Shape
| Translate Vector Region
| Scale Vector Region
| Complem... |
#!/usr/bin/env bash
mkdir dist
mkdir biyi.popclipext
cp Config.plist biyi.popclipext/
cp icon.png biyi.popclipext/
zip -r biyi.popclipextz biyi.popclipext/
rm -rf biyi.popclipext/
mv biyi.popclipextz dist/ |
# F# and Fable (Python) support for Jupyter
Fable Python is an F# kernel for Jupyter based on [Fable](https://fable.io) and
[IPythonKernel](https://github.com/ipython/ipykernel). Fable is a transpiler
that converts [F#](https://fsharp.org) to Python (and JavaScript).
This work is work-in-progress and related to
- ht... |
export type ClamFormFieldContentType =
| 'string'
| 'number'
| 'boolean'
| 'Object'
| 'Array'
| null
interface IBaseClamFormField {
name: string
component?: string
label?: string
contentType: ClamFormFieldContentType
description?: string
placeholder?: string
showIf?: (data: any) => boolean
... |
;;;-*-Mode:LISP; Package: PCL; Base:10; Syntax:Common-lisp -*-
;;;
;;; *************************************************************************
;;; Copyright (c) 1985, 1986, 1987, 1988, 1989, 1990 Xerox Corporation.
;;; All rights reserved.
;;;
;;; Use and copying of this software and preparation of derivative works
;... |
<details>
<summary>
Sun Jun 13 2021 18:35:15 GMT+0800 (China Standard Time) @Xheldon
</summary>
view:
M src/decoration.js
website:
M markdown/ref_intro.md
?? package-lock.json
</details>
<details>
<summary>
Sun Jun 13 2021 17:46:33 GMT+0800 (China Standard Time) @Xheldon
</summary>
model:
M CHANGELOG.md
M p... |
export var ApiConfig = {
// HOST: "http://192.168.1.167:3000",
HOST: `http://211.83.104.244:3000`
}
export const LazyLoadConfig: any = {
loading: require('@/assets/img/default.png'), //加载时的图片
lazyComponent: true,
}
|
<?php
declare(strict_types=1);
namespace App\Models\StarCitizen\Starmap\Starsystem;
use App\Models\System\Translation\AbstractTranslation as Translation;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
/**
* Star System Translation Model
*/
class StarsystemTranslation extends Translation
{
protected $fi... |
/*
* @Author: Hata
* @Date: 2020-05-25 19:47:08
* @LastEditors: Hata
* @LastEditTime: 2020-05-25 19:55:35
* @FilePath: \LeetCode\1295.cpp
* @Description: https://leetcode-cn.com/problems/find-numbers-with-even-number-of-digits/
*/
#include <bits/stdc++.h>
class Solution
{
public:
int findNumbers(std::vector... |
<?php
namespace Stigma\HTMLElements;
use Stigma\HTMLElements\HTMLElement;
/**
* Represents the Html Article
*
* @author Leandro Antonello <lantonello@gmail.com>
* @version 1.0
* @copyright (c) 2017, HTMLElements
*/
class Article extends HTMLElement
{
// HTML ELEMENT ATTRIBUTES ==============================... |
package com.kafka.content.ui.library
import com.airbnb.epoxy.Carousel
import com.airbnb.epoxy.TypedEpoxyController
import com.kafka.content.*
import com.kafka.data.entities.Item
import com.kafka.ui_common.ui.gridCarousel
import com.kafka.ui_common.ui.withModelsFrom
import kotlinx.coroutines.channels.Channel
class Lib... |
module Main where
import Graphics.Gloss
import System.Random
import Game
import Logic
import Rendering
window :: Display
window = InWindow "Simon" (screenWidth, screenHeight) (screenOffset, screenOffset)
main :: IO ()
main = do
gen <- newStdGen
let rndColorSeq = genColorSeq gen maxSeqLen
play window b... |
// OsmSharp - OpenStreetMap (OSM) SDK
// Copyright (C) 2013 Abelshausen Ben
//
// This file is part of OsmSharp.
//
// OsmSharp is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 2 of the Lice... |
import React from "react";
function User({ key, isAdmin, name }) {
return (
<p key={key}>
{name}
{isAdmin && " 👑"}
</p>
);
}
export default User;
|
-----------------------------------------------------
------ Check that Filter Push Down is working -------
-----------------------------------------------------
-- Check that the filter is being pushed down. We create an external table
-- that returns the filter being sent from the C-side
CREATE FOREIGN DATA WRAPPE... |
package webint.woodpecker.common.kafka
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.beans.factory.annotation.Value
import org.springframework.kafka.core.KafkaTemplate
import org.springframework.kafka.support.SendResult
import org.springframework.stereotype.Component
import o... |
part of '../views.dart';
class HomePerpustakaan extends StatefulWidget {
@override
_HomePerpustakaanState createState() => _HomePerpustakaanState();
}
class _HomePerpustakaanState extends State<HomePerpustakaan> {
@override
Widget build(BuildContext context) {
return GeneralPage(
title: 'Perpustakaa... |
import { NestFactory } from '@nestjs/core';
import {
FastifyAdapter,
NestFastifyApplication,
} from '@nestjs/platform-fastify';
import fastifyMultipart from 'fastify-multipart';
import { AppModule } from './app.module';
async function bootstrap() {
const fastifyAdapter = new FastifyAdapter();
fastifyAdapter.re... |
# nlp-python-udemy
Personal GitHub repository for the NLP - Natural Language Processing with Python Udemy course
|
require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
describe NinjsFramework do
before :each do
@fw = NinjsFramework.new
end
it 'should have the correct defaults' do
@fw.defaults.should == {
name: 'application',
framework: 'ninjs',
src_dir: 'modules',
dest_dir: 'app... |
# Test database
To test your tables go to http://localhost:8080/api/todoapp/h2-console and set the following credentials
```yaml
username: sa
password: SuperSecret
url: jdbc:h2:mem:todoappdb
```
http://localhost:8080/api/todoapp/h2-console
http://localhost:8080/api/todoapp/h2-console/login.jsp |
pub mod choice;
pub mod date;
pub mod time;
pub mod number;
pub mod text;
pub mod toggle; |
package error
//Struct that represents an Error Object for json response of API
type GeneralError struct {
Message string
}
func (e *GeneralError) Error() string {
m := "Unknwon error"
if e.Message != "" {
m = e.Message
}
return m
}
|
/**
* Copyright (c) 2016 - 2018 Syncleus, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable la... |
package com.xfastgames.witness.screens.solver
import com.google.common.graph.Graph
import com.google.common.graph.MutableGraph
import com.xfastgames.witness.items.data.Node
import com.xfastgames.witness.items.data.Panel
import com.xfastgames.witness.utils.guava.mutableGraph
import kotlinx.coroutines.ExperimentalCorout... |
#include <iostream>
#include "thread-pool.h"
class MyThread : public ECThread
{
private:
int _n;
public:
MyThread(int n): _n(n)
{
std::cout << "[" << __func__ << "]" << std::endl;
}
~MyThread()
{
std::cout << "[" << __func__ << "]" << std::endl;
}
void run(void *param)
{
std::cout << "[1] thread id: " ... |
/**
* Copyright (C) 2012-2013 Steven Barth <steven@midlink.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License v2 as published by
* the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
*... |
<!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<?php wp_head(); ?>
</head>
<body <?php body_class(); ?>>
<?php wp_body_open() ?>
<div class="outer" id="top">
<?php do_action( 'antreas_before_wrapper' ); ?>
<div class="wrapper">
<div id="topbar" class="topbar">
<div class="container">
<?php ... |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using COVIDScreeningApi.Models;
namespace COVIDScreeningApi.Data
{
public class PortOfEntry
{
public Guid Id { get; set; }
public string Label { get; set; }
public double Longit... |
extern crate criterion;
extern crate tract_linalg;
use criterion::*;
pub fn vec(len: usize, align: usize) -> *mut f32 {
let layout =
std::alloc::Layout::from_size_align(len * std::mem::size_of::<f32>(), align).unwrap();
unsafe { std::alloc::alloc_zeroed(layout) as *mut f32 }
}
fn mat_vec_mul(c: &mut C... |
总 裁 办 电 子 邮 件
电邮讲话【2018】127号 签发人:任正非
寂寞的英雄是伟大的英雄,我们要鼓励新旧循环
——任总在西安研究所业务汇报会上的讲话
2018年11月7日
西安在产品的生命后周期管理有贡献,也要选拔“单板王”。更重要的是要让部分优秀员工大循环起来,把生命后周期管理的经验从新产品立项开始输入,例如5G、网络安全等新产品,让它们一开始就引用生命后周期管理的经验,使我们的新产品更健康。通过人员的流动循环,将经验带入新产品。生命后周期的专家,也要短期走上服务战场,对事故多发点调研,增加场景化的认识。
内地研究所的通病是你们不受季风冲击,容易惰怠,我们... |
module Jekyll
module NoTranslate
# `text` is in HTML
def no_translate(text, words)
escaped_words = words.map { |word| Regexp.escape(word) }
text = text.gsub(
/(\b#{escaped_words.join("|")}\b)(?![^<]*?>)/i,
"<span class=\"notranslate\">\\1</span>"
)
text
end
end
en... |
const request = require('request-promise');
const braveNewCoinApiConfig = require('../../config').common.braveNewCoinApi;
const errors = require('../errors');
const logger = require('../logger');
const { CryptoCoin } = require('../models');
exports.getCoin = queryParams => {
const options = {
method: 'GET',
... |
set -e
echo "🔽 Downloading helm installer."
curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3
echo "🔽 Installing."
chmod 700 get_helm.sh
./get_helm.sh
echo "🎉🎉🎉"
echo "Helm installed." |
(in-package :xcb)
(cffi:define-foreign-library libxcb
(:unix "libxcb.so"))
(cffi:use-foreign-library libxcb)
(cffi:define-foreign-library libxcb-render
(:unix "libxcb-render.so"))
(cffi:use-foreign-library libxcb-render)
(cffi:define-foreign-library libxcb-render-util
(:unix "libxcb-render-util.so"))
(cf... |
import { Component, OnInit, AfterViewInit } from '@angular/core';
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
import { ActivatedRoute, Router } from '@angular/router';
import { Observable, of, zip, from as fromPromise } from 'rxjs';
import { delay, map, flatMap } from 'rxjs/operators';
import ... |
import { User } from '../users/user.interface';
import { Comment } from './comment.interface';
import { Tag } from './tag.interface';
export interface Post {
id?: number;
key?: string;
user_id: number;
title: string;
content: string;
views_count?: number;
comments_count?: number;
created_at?: string;
... |
<?php
namespace Procash\AdministrationBundle\Entity;
use Doctrine\ORM\EntityRepository;
/**
* GestionVersionRepository
*
* This class was generated by the Doctrine ORM. Add your own custom
* repository methods below.
*/
class GestionVersionRepository extends EntityRepository
{
public function getGestionVers... |
package Test::WriteVariants::Context;
use strict;
use warnings;
=head1 NAME
Test::WriteVariants::Context - representation of test context
=head1 DESCRIPTION
Contexts are used to abstract eg. ambience or relations between
opportunities and and their application.
=head1 METHODS
=head2 new
A Context is an ordered ... |
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Spawner : MonoBehaviour {
public GameObject respawnObj;
public float interval = 3.0f;
public int max_items = 3;
public int spawnedItems = 0;
public bool resetTimerOnDestroy = true;
public bool permanentObject = false;
... |
/**
* @module "@kloudlib/rook-ceph"
* @packageDocumentation
* @example
* ```typescript
* import { RookCeph } from '@kloudlib/rook-ceph';
*
* new RookCeph('rook-ceph', {
* // ...
* });
* ```
*/
import * as pulumi from '@pulumi/pulumi';
import * as k8s from '@pulumi/kubernetes';
import * as abstractions fro... |
class Transfer::Worker
BUF_SIZE = 1000
attr_reader :config
# Transfer::Worker.new(config)
# config - instance of Transfer::Config
def initialize(*args)
@options = args.extract_options!
@config = args[0]
end
def table_names
@table_names ||= source_db.tables - config.exclude_tables
end
d... |
package cn.zybwz.audio.utils
fun ms2Format(ms: Long): String {
val l = ms % 100
val s = (ms / 100) % 60
val m = ms / 60 / 100
return String.format("%02d:%02d:%02d", m, s, l)
}
fun ms2FFFormat(ms: Long): String {
val l = ms % 100
val s = (ms / 100) % 60
val m = ms / 60 / 100
return S... |
"""
This script runs the flask_controller application using a development server.
"""
import click
from flask import Flask
from .pages_config import ALL_PAGES, NUM_ROWS
from .routes import blueprint
from .users import login_manager
from .sockets import socketio
from .static_optimizer import cache_buster, compress
# to... |
from mantid.simpleapi import Rebin, SumSpectra
SumSpectra(InputWorkspace=input, OutputWorkspace=output)
Rebin(InputWorkspace=output, OutputWorkspace=output, Params='300,20,17000')
|
<?php
namespace Wdpro\Form\Elements\Ckeditor;
class CkeditorSmall extends Ckeditor {
/**
* @param array $params Параметры
*/
public function __construct( array $params ) {
$params = wdpro_extend([
'config'=>'small',
], $params);
parent::__construct( $params );
}
} |
# CMS Frame
Описание проекта на сайте https://cmsframe.ru/
|
#!/bin/bash
BUILD_DATE="$(date --rfc-3339=seconds)"
GIT_HASH=$(git rev-parse --short HEAD)
docker build -t ss2pl --build-arg BUILD_DATE="$BUILD_DATE" --build-arg GIT_HASH="$GIT_HASH" "$(dirname "${0}")"
|
import { is_function } from './is_function';
import { is_null } from './is_null';
import { is_undefined } from './is_undefined';
/**
* @description returns `true` for object that has a **length** property.returns false for `function`.
* @category Function
* @example
* ```typescript
* F.is_array_like("pranshu") //... |
// Configure URL paths and the AngularJS views / components they correspond to.
angular.module('betterReadsApp').config([
'$routeProvider',
function config($routeProvider) {
$routeProvider.when('/book-list', {template: '<book-list></book-list>'})
.when(
'/book-detail/:bookIsbn', {template: '... |
package shortener
// RedirectService interface describes base
// functions of business logic.
type RedirectService interface {
Find(code string) (*Redirect, error)
Store(redirect *Redirect) error
}
|
/**
* @file mip-hs-showmore 组件
* @author
*/
define(function (require) {
'use strict';
var $ = require('zepto');
var viewport = require('viewport');
var customElement = require('customElement').create();
/**
* 第一次进入可视区回调,只会执行一次
*/
customElement.prototype.firstInviewCallback = function (... |
package com.terorie.nimiq.consensus
import com.terorie.nimiq.consensus.account.Account
import com.terorie.nimiq.consensus.account.Address
import com.terorie.nimiq.consensus.block.BlockHeader
import com.terorie.nimiq.consensus.primitive.HashLight
import com.terorie.nimiq.consensus.transaction.Transaction
import com.ter... |
name 'rabbitmq-cluster'
maintainer 'Sunggun Yu'
maintainer_email 'sunggun.dev@gmail.com'
license 'Apache 2.0'
description 'Configures rabbitmq cluster'
long_description 'This cookbook configures rabbitmq cluster by executing rabbitmqctl command.'
version '0.2.0'
depends 'rabbit... |
use libc::{c_int, c_void, size_t, ssize_t, c_long, SYS_write};
#[direct_asm::assemble]
unsafe extern "C"
fn sys_write(fd: c_int, ptr: *const c_void, len: size_t, wcall: c_long)
-> ssize_t
{
"mov %rax, %rcx"; // Move sys call number to rax as required
// Other arguments are already in correct register
... |
import { QCRuleStatus } from 'src/algorithms/QC/QCRuleStatus'
import { QCResultMissingData, QCRulesConfigMissingData } from 'src/algorithms/QC/ruleMissingData'
import { QCResultMixedSites, QCRulesConfigMixedSites } from 'src/algorithms/QC/ruleMixedSites'
import { QCResultPrivateMutations, QCRulesConfigPrivateMutations ... |
module SaxStream
module Types
class Integer
def self.parse(value)
if value
value = value.gsub(/[^\-\.0-9]/, '')
return nil if value == ''
Float(value).to_i
end
end
end
end
end |
// ignore_for_file: one_member_abstracts
import 'package:flutter/widgets.dart';
import 'package:flutter_hooks/flutter_hooks.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:mockito/mockito.dart';
export 'package:flutter_test/flutter_test.dart'
hide Func0, Func1, Func2, Func3, Func4, Func5, ... |
# frozen_string_literal: true
require 'rails_helper'
RSpec.describe ConnectorMapper do
include described_class
let(:mooc_provider) { FactoryBot.create(:mooc_provider) }
it 'returns no connector for unknown mooc_provider' do
expect(get_connector_by_mooc_provider(mooc_provider)).to eq nil
end
it 'retur... |
# This file should contain all the record creation needed to seed the database with its default values.
# The data can then be loaded with the rake db:seed (or created alongside the db with db:setup).
#
# Examples:
#
# cities = City.create([{ name: 'Chicago' }, { name: 'Copenhagen' }])
# Mayor.create(name: 'Emanuel... |
/*
Copyright 2011-2020 David Robillard <d@drobilla.net>
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THIS SOFTWARE IS PROVIDED "AS IS" AND THE ... |
<?php
class PurchaseProduct extends ODataSchemeEntity{
function __construct() {
parent::__construct(__CLASS__);
$this->addAssociation(new ODataSchemeEntityAssociation(
"Product",
"Product",
ODataSchemeEntityAssociation::SINGLE,
... |
package botkop.nn.optimizers
import botkop.numsca
import botkop.numsca.Tensor
import com.typesafe.scalalogging.LazyLogging
import play.api.libs.json.{Format, Json}
import scala.language.postfixOps
case class AdamOptimizer(var learningRate: Double,
beta1: Double = 0.9,
... |
<?php
namespace App\View\Helper;
use Cake\Core\Exception\Exception;
use Cake\View\Helper;
/**
* Modal helper
* @property Helper\HtmlHelper $Html
* @property Helper\FormHelper $Form
*/
class ModalHelper extends Helper
{
protected $helpers = ['Form'];
/**
* Default configuration.
*
* @var a... |
# Defines forum Post resource.
class Post < ApplicationRecord
belongs_to :user
belongs_to :topic
has_many :post_votes, dependent: :destroy
# Newest posts are displayed on the bottom of the last page in topic show.
default_scope -> { order(created_at: :asc) }
# Every change to post is treated as a new acti... |
using System.Threading.Tasks;
namespace Abp.AppFactory.Interfaces
{
public interface IEmailService
{
Task<IEmailResponse> SendAsync(IEmail email);
}
} |
package md
import (
"io"
"regexp"
"strings"
"unicode/utf8"
"golang.org/x/xerrors"
)
func Parse(r io.Reader) ([]Element, error) {
return parse(NewLineReader(r))
}
func parse(r *lineReader) ([]Element, error) {
var (
result []Element
)
for {
line, err := r.PeekLine()
if err != nil {
if xerrors.Is(er... |
<?php
namespace App\Http\Controllers;
class FormsController extends BaseController{
public function postAddTextfield() {
if (Helper::isBusinessOwner(Input::get('business_id'), Helper::userId())) { // PAG added permission checking
Forms::createField(array(
'business_id' => Input::get('business_id'),... |
delete from users where user_id > 1000
DBCC CHECKIDENT ('[users]', RESEED, 1000)
delete from session where session_id > 1000
DBCC CHECKIDENT ('[session]', RESEED, 1000)
delete from message where 1 = 1
DBCC CHECKIDENT ('[message]', RESEED, 0) |
! { dg-do compile }
module binding_label_tests_6
use, intrinsic :: iso_c_binding
integer(c_int), bind(c, name='my_int') :: my_f90_int_1 ! { dg-error "collides" }
integer(c_int), bind(c, name='my_int') :: my_f90_int_2 ! { dg-error "collides" }
end module binding_label_tests_6
|
# autoload colors; colors
# LS_COLORS="di=34:ln=35:so=32:pi=33:ex=31:bd=46;34:cd=43;34:su=41;30:sg=46;30:tw=42;30:ow=43;30"
# export LS_COLORS
if [[ -f ~/.dircolors ]]; then
if type dircolors > /dev/null 2>&1; then
eval $(dircolors ~/.dircolors)
elif type gdircolors > /dev/null 2>&1; then
eval ... |
#!/usr/bin/env python
"""
HanoiInitial
Note: Make sure Hanoi.py is in the same directory as this program.
"""
import Hanoi
def main():
Hanoi.gv.configuration = 1
Hanoi.hanoi()
if __name__ == '__main__':
main()
|
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'image_stats.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
ImageStats _$ImageStatsFromJson(Map<String, dynamic> json) => ... |
<?php
/**
* eCommerce Core
*
* Copyright (c) 2014 David Persson - All rights reserved.
* Copyright (c) 2016 Atelier Disko - All rights reserved.
*
* Use of this source code is governed by a BSD-style
* license that can be found in the LICENSE file.
*/
namespace ecommerce_core\models;
class PaymentMethods exte... |
package grpc
import (
"context"
"net"
"github.com/TheCount/amqp-stream/stream"
"google.golang.org/grpc"
)
// WithContextDialer returns a gRPC dial option which causes a gRPC client
// connection to connect to an AMQP stream server at the specified URL.
//
// The actual grpc.Dial call should use an empty target, ... |
require 'uri'
require 'json'
require 'yaml'
require 'base64'
require 'openssl'
require 'net/http'
require 'btcturk/version'
module BTCTurk
BASE_URL = 'https://www.btcturk.com/api/'
def self.ticker
get 'ticker'
end
def self.orderbook
get 'orderbook'
end
def self.trades
get 'trades'
end
... |
package ch.poole.osm.josmfilterparser;
import java.util.Map;
import org.jetbrains.annotations.NotNull;
public class HasRole implements Condition {
final String role;
/**
* Create a Condition that checks if a relation has a member with the specified rols
*
* @param role the role t... |
using System.Collections.Generic;
using Newtonsoft.Json;
namespace Cedar.Foundation.WeChat.Entities.WeChat
{
/// <summary>
/// 卡券
/// </summary>
public class CardModel
{
/// <summary>
/// 微信帐号
/// </summary>
[JsonProperty("account")]
public string Ac... |
require File.dirname(__FILE__) + '/../../spec_helper'
require File.dirname(__FILE__) + '/fixtures/classes'
describe "BreakpointTracker#wait_for_breakpoint" do
before :each do
end
end |
import { readFileSync, existsSync, writeFileSync, unlinkSync } from 'fs'
import { join, dirname } from 'path'
import mkdirp from 'mkdirp'
import { dtmiToPath, checkIds, checkDependencies } from '../repo-convention.js'
const createInterfaceFromFile = async file => {
const jsonDtdl = JSON.parse(readFileSync(file, 'utf... |
from typecasts import Typecasts, identity
class MyType:
"""My little brave class."""
def test_identity():
"""Request to cast from a type to itself is an identity function."""
assert Typecasts()[float, float] == identity
assert Typecasts()[MyType, MyType] == identity
def test_set_item():
"""Set... |
package org.mytests.uiobjects.example.site.rozetkaPages;
import org.openqa.selenium.Keys;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.FindBy;
public class MainPageRozetka extends BasePage{
@FindBy(xpath = "//input[contains(@class,'search-form')]... |
<?php
use Mbcraft\Form\FormHelper;
class TimeZoneTest extends TestCase {
function testTimeZones() {
$result = FormHelper::timeZones();
$this->assertFalse(empty($result),"Le time zones non sono state generate!");
}
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.