text stringlengths 27 775k |
|---|
class AddPositionToMapElements < ActiveRecord::Migration
def self.up
add_column :map_standards, :position, :integer, default: 0
add_column :map_resources, :position, :integer, default: 0
add_column :map_objectives, :position, :integer, default: 0
add_column :map_assessments, :position, :integer, defau... |
import mongoose from 'mongoose'
import { isEmail, isURL, isMobilePhone } from 'validator'
import { schemaComposer } from 'graphql-compose'
import { composeWithMongoose } from 'graphql-compose-mongoose/node8'
import {
modifyResolver,
setGlobalResolvers,
grantAccessAdmin as admin,
grantAccessAdminOrOwner as admin... |
package nodes
import (
"net/http"
"strconv"
"time"
"github.com/BlooperDB/API/api"
"github.com/BlooperDB/API/db"
"github.com/BlooperDB/API/utils"
"github.com/gorilla/mux"
"github.com/wuman/firebase-server-sdk-go"
)
type PrivateUserResponse struct {
Id uint `json:"id"`
Email st... |
-module(sm_gcm_api).
-export([push/3]).
-define(BASEURL, "https://gcm-http.googleapis.com/gcm/send").
-type header() :: {string(), string()}.
-type headers() :: [header(),...].
-type regids() :: [binary(),...].
-type message() :: [tuple(),...].
-type result() :: {number(), non_neg_integer(), non_neg_integer(), non... |
# frozen_string_literal: true
class MockObserver < Observer
def initialize
super()
@is_updated = false
end
def update(_board)
@is_updated = true
end
attr_reader :is_updated
end
|
use luminance_front::context::GraphicsContext as _;
use luminance_front::tess::TessError;
use luminance_glfw::GlfwSurface;
use luminance_windowing::WindowOpt;
pub fn fixture() {
let mut surface = GlfwSurface::new_gl33("Tess no data", WindowOpt::default()).unwrap();
let tess = surface.new_tess().build();
assert!... |
module Telegraphist
class Model::User < Model
attr_accessor :id, :first_name, :last_name, :username, :type
def to_s
[id, username, [first_name, last_name].compact.join(' ')].join(' :: ')
end
end
end
|
/// @file unarch.h
/// @author Nick Pershin
#pragma once
#ifndef UNARCH_H_20150506_122227
#define UNARCH_H_20150506_122227
#ifdef __cplusplus
extern "C" {
#endif
// typedef char* (*TYPE_unarch)(const char*);
// extern "C" char* Reverse(const char*);
typedef char* (*TYPE_unarch)(void);
const char* SaySomething();
... |
Calculate the Hofstadter Q-sequence, using a big array rather than recursion.
INTEGER ENUFF
PARAMETER (ENUFF = 100000)
INTEGER Q(ENUFF) !Lots of memory these days.
Q(1) = 1 !Initial values as per the definition.
Q(2) = 1
Q(3:) = -123456789!This will surely cause trouble!
DO I... |
<?php
namespace App\Http\Controllers;
use App\Post;
use App\Comment;
use App\Project;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
class CommentsController extends Controller
{
//
public function index()
{
$test = 1;
return view('comments.index', compact('test'));
... |
# frozen_string_literal: true
require 'rails_helper'
RSpec.describe UtilityHookup, type: :model do
it { is_expected.to validate_presence_of(:utility_slug) }
describe '.new' do
it 'accepts nested attributes for the utility' do
uh = UtilityHookup.new(utility_slug: :jitsi, utility_attributes: { meet_domai... |
package com.octo.workerdecorator.processor
import com.octo.workerdecorator.processor.entity.Configuration
import com.octo.workerdecorator.processor.entity.HelperConfiguration
import com.octo.workerdecorator.processor.entity.Implementation.EXECUTOR
import com.octo.workerdecorator.processor.entity.Language.JAVA
import c... |
require 'asciidoctor'
require 'naturally'
require 'awestruct/ibeams/errors'
module Awestruct
module IBeams
module AsciidocSections
# sections_from() will take the given
#
# @param [String] relative or absolute path to a directory containing
# asciidoc files (`.ad`, `.adoc`)
# @ret... |
<?php
namespace CSC\Model\Traits;
/**
* Trait SoftDeleteTrait
*/
trait SoftDeleteTrait
{
/**
* @var bool
*/
protected $isDeleted = false;
/**
* @return $this
*/
public function delete()
{
$this->isDeleted = true;
return $this;
}
/**
* @return $... |
using RabbitMQ.Client;
namespace Mercury.Messaging.Abstractions
{
public interface IStructureInitializer
{
void Initialize(IModel channel);
}
} |
module TDP.Synth.EventHandler where
import Control.Concurrent.STM.TVar (TVar)
import Graphics.Gloss.Interface.IO.Interact (Event (..), Key (..),
KeyState (..))
import TDP.Note
import TDP.Synth.Input
import ... |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace StarbuzzCoffee.ThirdDesignDecorator
{
public class Soy : CondimentDecorator
{
readonly Beverage beverage;
public Soy(Beverage beverage)
{
this.bever... |
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;
[CustomEditor(typeof(EnemyLookAt))]
[CanEditMultipleObjects]
public class EnemyLookAtEditor : Editor
{
public void OnSceneGUI()
{
var lookAt = (target as EnemyLookAt);
var handlePos = lookAt.trans... |
@using OJS.Web.Areas.Administration.Controllers
@using OJS.Web.Areas.Contests.Controllers
@using Resource = Resources.Areas.Contests.Views.ListIndex
@{
ViewBag.Title = Resource.Title;
}
@section Styles{
@Styles.Render("~/Content/contests/list/index")
}
<ol class="breadcrumb">
<li><a href="/">@Resource.... |
#!/bin/bash
g++ my.cpp -o my
g++ std.cpp -o std
g++ data.cpp -o data
while true; do
./data > data.in
./std <data.in >std.out
./my <data.in >my.out
if diff std.out my.out; then
printf "AC\n"
else
cat data.in
printf "Wa\n"
exit 0
fi
done
|
class Campaign{
final String campaignName;
final String campaignAffiliation;
final Location location;
Campaign({this.campaignName,this.campaignAffiliation, this.location});
}
class Location{
final double latitude;
final double longitude;
Location({this.latitude, this.longitude});
}
List<Campaign> ... |
# frozen_string_literal: true
class Player
attr_accessor :name, :bank, :cards, :score
def initialize(name)
@name = name
@bank = 100
@cards = []
@score = 0
end
def place_bet
@bank -= 10
end
def count_score
score = 0
cards.map do |card|
Cards::DECK.select do |k, v|
... |
package runner
import (
"bytes"
"encoding/json"
"fmt"
"log"
"strings"
"unicode/utf8"
)
type Provider interface {
Execute(*Job) error
}
type EventProvider interface {
Register(func() *Job)
}
type Task struct {
Title string
Properties json.RawMessage
Provider Provider
}
func (t Task) String() strin... |
/*
Code generators for custom blocks.
*/
// ================ MOVE BLOCK ================ //
Blockly.Blocks['move'] = {
init: function() {
this.jsonInit(miniblocks.move);
}
};
Blockly.Python['move'] = function(block) {
// from blockly
var dropdown_direction = block.getFieldValue('direction');
var number_s... |
// GENERATED CODE - DO NOT MODIFY BY HAND
// ignore_for_file: implicit_dynamic_parameter
part of 'localize.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
Localize _$Locali... |
package com.at4wireless.spring.model.dto;
import java.sql.Timestamp;
import com.at4wireless.spring.model.GoldenUnit;
public class GoldenUnitDT
{
public GoldenUnitDT(GoldenUnit gu, String category)
{
this.id = gu.getIdGolden().intValue();
this.name = gu.getName();
this.created = gu.getCreatedDate(... |
import React from 'react';
import ClassNames from 'classnames';
import ReactFireMixin from 'reactfire';
import L10nSpan from '../shared/l10n-span';
import CommentForm from './comment/comment-form';
import CommentList from './comment/comment-list';
import Constants from '../../../modules/Constants';
import Firebase from... |
module SpamEngine
module Filter
@@filters = []
@@default_filters = []
class << self
def register_default(klass)
@@default_filters << klass.name unless @@default_filters.include?(klass.name)
end
def register(klass)
@@filters << klass.name unless @@filters.include?(klass.... |
export default function(value: any) {
if (value === 'NULL::character varying') { return null }
return value
}
|
import { IConsigneeInfo } from '../IConsigneeInfo';
import { IReceiverInfo } from '../IReceiverInfo';
import { IDropoffCoordinates } from '../IDropoffCoordinates';
export interface IDropoffLoad {
receiverInfo: IReceiverInfo;
dropoffStartDate: string;
dropoffLocation: string;
dropoffStartTime: string;
... |
<?php
namespace Xenon\LaravelBDSms\Helper;
class Helper
{
/**
* Mobile Number Validation
* @param $number
* @return bool
* @since v1.0.12
* @version v1.0.12
*/
public static function numberValidation($number): bool
{
$validCheckPattern = "/^(?:\+88|01)?(?:\d{11}|\d{13... |
import * as ResBodies from "bodies/response-bodies"
import * as ReqBodies from "bodies/request-bodies"
import * as BaseService from "./base-service"
export function signIn(
nickname: string
): Promise<ResBodies.PlayerResponseBody> {
const body: ReqBodies.SignInRequestBody = { nickname }
return BaseService.post("/s... |
import 'package:flutter/material.dart';
import '../animation.dart';
@immutable
class InvalidInputAnimatedWidget extends StatelessWidget {
final AnimationUIConfig config;
final VoidCallback onAnimationEnded;
final Widget child;
const InvalidInputAnimatedWidget({
Key key,
this.config = const AnimationU... |
const TRACE = haskey(ENV, "TRACE")
"Display a trace message. Only results in actual printing if the TRACE environment variable
is set."
@inline function trace(io::IO, msg...; prefix="TRACE: ", line=true)
@static if TRACE
Base.print_with_color(:cyan, io, prefix, chomp(string(msg...)))
if line
... |
package com.example.composebasics.model
import androidx.annotation.DrawableRes
import com.example.composebasics.R
data class Author(val name: String, @DrawableRes val picture: Int) {
companion object {
val pierre = Author(name = "Pierre Vieira", picture = R.drawable.pierre_vieira_profile)
val andr... |
import { startNucleus} from "../Nucleus" ;
import { IApi } from "../Plugin" ;
declare var _nucleus_api: IApi;
export async function start(){
const dataPath = (document.currentScript as HTMLScriptElement).getAttribute("data-path") || "";
// Start the core api expose it
await startNucleus();
try {
... |
require File.dirname(__FILE__) + '/utils'
require File.dirname(__FILE__) + '/recurring_billing'
require File.dirname(__FILE__) + '/am_extensions'
Dir[File.dirname(__FILE__) + '/gateways/*.rb'].each{|g| require g}
|
#!/bin/sh
export PATH=$PATH:/home/pi/.local/bin:/opt/rez/bin/rez:
export LD_LIBRARY_PATH=/usr/local/lib
|
// import App from 'next/app'
import '../static/css/prism.css'
import GlobalStyle from '../src/styles/global';
import styled from 'styled-components';
import { Head } from 'next/document';
const Toolbar = styled.div`
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
border-bo... |
module.exports = {
extends: ['kirinus'], // This is an open source eslint definition.
parserOptions: {
project: ['./tsconfig.eslint.json', './packages/*/*/tsconfig.json'],
tsconfigRootDir: __dirname,
},
settings: {
jest: {
version: 'latest',
},
react: {
version: 'latest',
},
... |
import * as React from 'react'
type card = {
heading: string
paragraph: string
imgUrl: string
projectLink: string
}
const Card: React.FC<card> = ({
heading,
paragraph,
imgUrl,
projectLink,
}): JSX.Element => {
return (
<div
className='card'
style={{
backgroundImage:
... |
package de.m7w3.signal.store.model
import slick.jdbc.H2Profile.api._
object Schema {
val schema = Addresses.addresses.schema ++
LocalIdentity.query.schema ++
PreKeys.preKeys.schema ++
PreKeys.idSequence.schema ++
Sessions.sessions.schema ++
... |
<?php
/**
* Combyna
* Copyright (c) the Combyna project and contributors
* https://github.com/combyna/combyna
*
* Released under the MIT license
* https://github.com/combyna/combyna/raw/master/MIT-LICENSE.txt
*/
namespace Combyna\Component\Program\Validation\Validator;
use Combyna\Component\App\Config\Act\App... |
module Utils where
-- | Get all adjacent elements paired up
pairs :: [a] -> [(a, a)]
pairs xs = zip xs (drop 1 xs)
-- | Returns whether the list is in non-descending order
inOrder :: Ord a => [a] -> Bool
inOrder = all (uncurry (<=)) . pairs
-- | Returns whether the value meets all given predicates
meetsAll :: Foldab... |
context("pool checks")
file.list=list( system.file("extdata", "test1.myCpG.txt", package = "methylKit"),
system.file("extdata", "test2.myCpG.txt", package = "methylKit"),
system.file("extdata", "control1.myCpG.txt", package = "methylKit"),
system.file("extdata", "control... |
FactoryGirl.define do
factory :checklist do
association :user, strategy: :create
title "Title"
factory :checklist_with_items do
transient do
items_count 5
end
after(:create) do |checklist, evaluator|
create_list(:checklist_item, evaluator.items_count,
... |
import React from 'react';
import { render, screen } from '@testing-library/react';
import PriceBadge from './PriceBadge';
import PriceBadgeProps from './PriceBadge.types';
// renders a PriceBadge component
test('renders a PriceBadge component', () => {
const props: PriceBadgeProps = {
price: 10,
c... |
<?php
namespace Ornament;
use StdClass;
use ReflectionProperty;
/**
* A container is a simple internal object representation of (part of) a model.
*/
class Container
{
/** @var Private Adapter storage. */
private $adapter;
/** @var Private store for last check of model's state. */
private $lastChec... |
<div class="tasks__item">
<div class="tasks__item-header">
<span class="tasks__item-status">{!! __('task-status.' . $task->status) !!}</span>
@if ($task->trashed())
<span class="tasks__item-status deleted">
{!! __('Удалена') !!}
</span>
@endif
... |
# Changelog
## 1.0.0
Released: 03/16/2022
Initial stable version as showed in [Examples.jpynb](examples/Examples_1_0_0.ipynb)
|
package com.vendas.model.dto.cliente;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.Data;
@JsonIgnoreProperties(ignoreUnknown = true)
@Data
public class ClienteUpdatePasswordDTO {
private Long idCliente;
private String senha;
} |
using UnityEngine;
using Vectors.CustomProperty.Attribute;
namespace Vectors._2D
{
public abstract class _2D_Base : MonoBehaviour
{
[SerializeField]
protected bool _debugLines = true;
protected GameObject _player;
protected Vector2 _playerPosition;
[Header("... |
module Text.Help.GetOpt
( OptDescr(..)
, ArgDescr(..)
, ArgOrder(..)
, getOpt
) where
import Text.Help.Markup
import System.Console.GetOpt (ArgOrder(..), ArgDescr(..))
import qualified System.Console.GetOpt as G
data OptDescr a = Option [Char] [String] (ArgDescr a) Text
getOpt :: ArgOrder a -> [... |
require 'simplecov'
SimpleCov.start do
add_filter 'spec/dummy'
add_group 'Controllers', 'app/controllers'
add_group 'Helpers', 'app/helpers'
add_group 'Mailers', 'app/mailers'
add_group 'Models', 'app/models'
add_group 'Views', 'app/views'
add_group 'Libraries', 'lib'
end
$LOAD_PATH.unshift File.expand_... |
export interface ExtConfig {
isTimerEnabled: boolean;
useAutoReset: boolean;
timeBlockSitesOnly: boolean;
useBreaks: boolean;
useLogging: boolean;
useBlockSitesAsLogSites: boolean;
blockSiteList: Site[];
logSiteList: Site[];
}
export interface Site {
url: string;
videoSiteData: VideoSiteData;
}
ex... |
import 'package:flutter/material.dart';
import 'package:intl/intl.dart';
import 'package:qrcodereader/localization/AppLocalizations.dart';
import 'package:qrcodereader/models/EventObject.dart';
import 'package:qrcodereader/models/Info.dart';
import 'package:qrcodereader/pages/detail.dart';
import 'package:qrcodereader/... |
#!/usr/bin/env sh
#
# 基于 Ubuntu18 64位
# 检查是否安装iptables
pkgName="iptables"
checkRes=`dpkg --get-selections | grep iptables | awk -F : "END{print NR}"`
if [ ${checkRes} -lt 1 ]
then
echo "没有安装${pkgName}\n"
sudo apt -y install iptables
mkdir -p /etc/iptables
touch /etc/iptables/rules.conf
cat rules.con... |
module RestrictedController
def self.included(clazz)
clazz.class_eval {
protected
def admin_only
require_roles('admin')
end
def require_roles(*roles)
redirect_home unless (current_user != nil && current_user.has_role?(*roles))
end
def redirect_hom... |
#!/bin/bash
project_dir=$(pwd)
mkdir -p build
cd build
cmake $project_dir
cd $project_dir
|
from typing import Dict, Any, Tuple, Callable
from datetime import timedelta
from spacy.util import registry
from spacy.errors import Errors
from wasabi import msg
@registry.loggers("spacy-ray.ConsoleLogger.v1")
def ray_console_logger():
def setup_printer(
nlp: "Language",
) -> Tuple[Callable[[Dict[st... |
//! defines a common interface for an implementation of tokenized vaults that may or may not compound
use anchor_lang::{prelude::*, solana_program::account_info::AccountInfo};
use anchor_spl::token::Mint;
pub trait TokenizedShares {
/// used to check if a withdraw attempt is locked. whether or
/// not a vault... |
import styled from "styled-components";
import { mainColors } from "../../constants/colors";
export const Container = styled.nav`
background-color: ${mainColors.primary};
color: white;
`;
export const ListContainer = styled.ul`
list-style-type: none;
margin: 0;
padding: 30px;
`;
export const ListItem = sty... |
//
// WHTextField.h
// whisper
//
// Created by Bill Mers on 9/7/13.
// Copyright (c) 2013 7x7 Labs. All rights reserved.
//
@interface WHTextField : UITextField
@end
|
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using NuGet.Shared;
namespace NuGet.Packaging.Core
{
/**
* It is important that this type remains immutable due to the cloning o... |
using UnityEngine;
using UnityEditor;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
public class SplatMapShaderGUI : ShaderGUI
{
void DrawLayer(MaterialEditor editor, int i, MaterialProperty[] props, string[] keyWords, Workflow workflow,
bool hasGloss, bool hasSpec, bool i... |
#include "rclcpp/rclcpp.hpp"
#include "example_interfaces/srv/add_two_ints.hpp"
#pragma once
#ifndef ADD_TWO_INTS_SERVER_HPP
#define ADD_TWO_INTS_SERVER_HPP
namespace ISrv = example_interfaces::srv;
class AddTwoIntsServerNode : public rclcpp::Node
{
private:
rclcpp::Service<ISrv::AddTwoInts>::SharedPtr ser... |
package io.tintoy.ebt.tests
import akka.actor.{Actor, ActorSystem}
import akka.testkit._
import com.typesafe.config.ConfigFactory
import io.tintoy.ebt.{Envelope, HierarchicalEventBus}
import org.scalatest.{BeforeAndAfterEach, WordSpecLike, Matchers, BeforeAndAfterAll}
import scala.concurrent.duration.DurationInt
/**
... |
// RUN: %ocheck 0 %s
extern _Noreturn void abort(void);
int g(int a, int b)
{
if(b)
abort();
if(a != 5)
abort();
return 72;
}
dup(int x)
{
return x + 1;
}
f(int a, int b)
{
// bug here - register saving between jumps (?:)
return g(a, b ? dup(b) : 0);
}
main()
{
#include "../ocheck-init.c"
f(5, 0);
}
/... |
using GalacticOptimJL, GalacticOptimJL.Optim, GalacticOptim, ForwardDiff, Zygote, Random, ModelingToolkit
using Test
@testset "GalacticOptimJL.jl" begin
rosenbrock(x, p) = (p[1] - x[1])^2 + p[2] * (x[2] - x[1]^2)^2
x0 = zeros(2)
_p = [1.0, 100.0]
l1 = rosenbrock(x0, _p)
f = OptimizationFunction(ros... |
/*---------------------------------------------------------------------------------------------
* Copyright (c) 2008-2017 doLittle. All rights reserved.
* Licensed under the MIT License. See LICENSE in the project root for license information.
*---------------------------------------------------------------------... |
namespace Acklann.Mockaroo
{
/// <summary>
/// Represents a Mockaroo data-type.
/// </summary>
public enum DataType
{
/// <summary>
/// Animal Common Name
/// </summary>
AnimalCommonName,
/// <summary>
/// Animal Scientific Name
/// </summary>
AnimalScientificName,
/// <summary>
/// App Bun... |
import type { QueryType, Context } from 'gecs';
import type { ContextType } from '../../circles';
import { intersection } from '../utils';
export function IntersectionSystem(ctx: Context<ContextType>) {
let index = 1;
const entities = Array.from(ctx.$.circle.query.circles);
for (const entity of entities) {
... |
# frozen_string_literal: true
module FactoryTrace
module MonkeyPatches
module DefinitionProxy
def factory(name, options = {}, &block)
@child_factories << [name, Helpers::Caller.location, options, block]
end
def trait(name, &block)
@definition.define_trait(FactoryBot::Trait.new(... |
package io.gitlab.arturbosch.detekt.api.internal
import io.gitlab.arturbosch.detekt.api.Notification
data class SimpleNotification(override val message: String) : Notification
|
<?php
/**
* Project: PHP Light Framework
*
* @author Michal Szewczyk <ms@msworks.pl>
* @copyright Michal Szewczyk
* @license MIT
*/
declare(strict_types=1);
namespace MS\LightFramework\Validator\Specific;
/**
* Class Alnum
*
* @package MS\LightFramework\Validator\Specific
*/
final class Alnum ex... |
package com.example.kotlin.network
import com.example.kotlin.model.LoginResponse
import com.example.kotlin.model.RegisterResponse
import com.example.kotlin.model.TokenResponse
import com.example.kotlin.util.Constants
import okhttp3.ResponseBody
import retrofit2.http.Body
import retrofit2.http.Field
import retrofit2.ht... |
namespace Ridics.Authentication.Service.Configuration
{
// Maybe find better (more dynamically configurable) solution for password requirements
public class PasswordRequirements
{
// When updating these values, it is also required to update password requirements specified on client app
pub... |
# frozen_string_literal: true
# Copyright 2019 Google LLC
#
# 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... |
import { Component, EventEmitter, OnDestroy, OnInit, Output } from '@angular/core';
import { Subscription } from 'rxjs';
import { MytipService } from 'projects/sys/src-web/app/service/mytip.service';
import { I18nService } from 'projects/sys/src-web/app/service/i18n.service';
import { AxiosService, HttpService } from '... |
# openocd -f ~/Documents/dev/STM32_dev/openocd-0.10.0/tcl/board/st_nucleo_f4.cfg
openocd -f semihosting.cfg
|
#include "stralloc.h"
unsigned int
stralloc_copy(stralloc *to, const stralloc *from)
{
return stralloc_copyb(to, from->len, from->s);
}
|
using System.Collections.Generic;
namespace Nohwnd.Meteo.Core
{
public interface IWeatherService
{
Weather GetWeatherInCity(string city);
IReadOnlyCollection<Weather> GetWeatherEverywhere();
}
} |
## 2015年1月26日4点
# 梦
梦里
我去你的学校找你
我们见了面
却跟未见面一样
我坐在教室里听一堂数学课
似乎我很喜欢这场面
两三个学生
意外地制造着混乱
课堂上
始终没有看到你
于是我醒了
于是我笑了
## 4 o 'clock on January 26, 2015
In the dream
I went to your school and looked for you
We met but just like I haven't seen you
I sat in the classr... |
package io.realm.conference.data.entity
import io.realm.RealmModel
import io.realm.RealmObject
import io.realm.annotations.Ignore
import io.realm.annotations.RealmClass
import io.realm.annotations.Required
import io.realm.conference.util.format
import java.util.*
@RealmClass
open class EventData : RealmModel {
v... |
using System;
using System.ComponentModel.DataAnnotations;
using FDEV.Rules.Demo.Core.Utility;
namespace FDEV.Rules.Demo.Domain.Common
{
/// <summary>
/// Interface with the properties needed to setup persistence.
/// Note that some values have default implementation on the interface.
/// </summary>
... |
'use strict';
const customer = require('./customer');
const detail = require('./detail');
const product = require('./product');
module.exports = {
customer,
detail,
product
}; |
# this will require all my files, bundle them up and send them to the bin so they can communicate
require_relative "./cats_cli/version"
#this will load my gemfile, otherwise it will not know about my gems
require 'bundler'
Bundler.require
require_relative "./cats_cli/cli"
require_relative "./cats_cli/api"
require_rel... |
using System.Collections.Generic;
using VMS.TPS.Common.Model.API;
namespace DVHEvaluator_Main
{
/// <summary>
/// Class to hold the DVH Evaluator results for a specific plan.
/// </summary>
public class PlanResult
{
// Properties
public Patient Patient { get; set; }
... |
<?php
namespace App\Http\Controllers;
use App\Models\Animal;
use Illuminate\Http\Request;
use Carbon\Carbon;
use Illuminate\Support\Arr;
class AnimalController extends Controller
{
public function index()
{
$animales=Animal::all();
//return view("animales.index",["animales"=>$animales]);
... |
#!/bin/bash
# ACPC agent launching script.
# This script is used to play game of poker with this agent through ACPC poker infrastructure.
#
# This general random agent launching script. It's 1st argument is full path to
# random agent script for specific game.
SCRIPT_DIR="$( cd "$(dirname "$1")" ; pwd -P )"
SCRIPT_NAM... |
package org.mightyfrog.android.twitterapponlyauthsample.data.search
import com.google.gson.annotations.SerializedName
data class Metadata(@SerializedName("iso_language_code")
var isoLanguageCode: String?,
@SerializedName("result_type")
var resultType: String... |
package io.burkard.cdk.services.iotwireless
@SuppressWarnings(Array("org.wartremover.warts.DefaultArguments", "org.wartremover.warts.Null", "DisableSyntax.null"))
object OtaaV11Property {
def apply(
appKey: String,
nwkKey: String,
joinEui: String
): software.amazon.awscdk.services.iotwireless.CfnWirel... |
import { Vue } from '../vue';
import { NAME_CARD } from '../constants/components';
import { PROP_TYPE_STRING } from '../constants/props';
import { makeProp, makePropsConfigurable } from '../utils/props'; // --- Props ---
export var props = makePropsConfigurable({
bgVariant: makeProp(PROP_TYPE_STRING),
borderVarian... |
// Original bug: KT-25315
interface Publisher {
fun getMessage(): String
}
inline class DefaultPublisher(private val messageToPublish: String) : Publisher {
override fun getMessage() = messageToPublish
}
class SomethingThatPublishes : Publisher by DefaultPublisher("Hello")
|
# ms_datasheet
mass spec injection datasheet plotting tool
required libraries:
* Gooey
* Numpy
* Pandas
* Matplotlib
* Comtypes
* pyextractMS (jhdavislab)
* MSFileReader from thermo
|
package com.eye.eye.ui.notification.push
import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.Transformations
import androidx.lifecycle.ViewModel
import androidx.lifecycle.liveData
import com.eye.eye.logic.MainPageRepository
import com.eye.eye.logic.model.PushMessage
import com.eye.eye.logic.network.api... |
/*
* Copyright 2014 Google 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 law or agreed to in w... |
#!/bin/bash
module load clustal_omega/1.2.4
clustalo -i /mnt/beegfs/home/aubcls65/final_project/Group_Kcd_7180/longest_peptide.fasta\
-o /mnt/beegfs/home/aubcls65/final_project/Group_Kcd_7180/orf_translate.aln --outfmt=clu --force
clustalo -i /mnt/beegfs/home/aubcls65/final_project/Group_Kcd_7180/example_sequence.fast... |
include PostsHelper
include AwsHelper
class PostsController < ApplicationController
prepend_before_filter :authenticate_admin!, :except => [:index, :show, :feed]
before_filter :redirect_old_blog_url, :only => :index
before_filter :redirect_published_posts, :only => :show
def index
@body_class = :split
... |
from .queue import Queue
import random
import unittest
class QueueTests(unittest.TestCase):
def test_enqueue_one(self):
q = Queue()
q.enqueue(1)
self.assertTrue(q._first.value == 1 and q._last.value == 1)
def test_enqueue_two(self):
q = Queue()
q.enqueue(1)
q.en... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.