text stringlengths 27 775k |
|---|
@extends('layout.master')
@section('content')
<h1 class="text-red text-center text-bold">
Anda Tidak memiliki Wewenang Untuk memasuki halaman ini!!
</h1>
@stop |
<?php
namespace AppBundle\Controller\Site;
use AppBundle\Controller\Site\Base\SiteEntityController;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use AppBundle\Entity\User;
use AppBundle\Entity\Filter\UserFilter;
use AppBundle\Repository\GroupRepository;
use AppBundle\Entity\Group;
use AppBundle\Form\User... |
using OpenMacroBoard.SDK;
using static StreamDeckSharp.UsbConstants;
namespace StreamDeckSharp.Internals
{
internal sealed class StreamDeckRev2HardwareInfo
: StreamDeckJpgHardwareBase
{
public StreamDeckRev2HardwareInfo()
: base(new GridKeyPositionCollection(5, 3, 72, 25))
... |
require 'parser/current'
class Walker < AST::Processor
attr_accessor :found_nodes, :namespace_type
def initialize(resource, path, api_version)
@resource = resource
@file = File.open(path, 'r+')
@content = @file.read
@ast = Parser::CurrentRuby.parse(@content)
@api_version = api_version
@fou... |
class Check < ApplicationRecord
# checktype_name and metadata are virtual attributes, not persisted in the model.
attr_accessor :checktype_name
attr_accessor :metadata
include Filterable
include AASM
after_commit :sns_publish
before_update :verify_state_machine
# In case the transaction is rolled back... |
define("sap_viz_ext_sunburstsequence-src/js/render", [], function() {
/************DEFINE OTHER CHART ELEMENTS*************/
var sequenceDiv;
var legendDiv;
var legendItems;
/************BEGIN MAIN RENDER FUNCTION*************/
var render = function(data, container) {
// Sequence
sequenceDiv = container.appe... |
package com.easy.kotlin.dsl
import java.io.*
fun main(args: Array<String>) {
val lines =
"src/main/resources/data.txt"
.stream()
.buffered()
.reader("utf-8")
.readLines()
lines.forEach(::println)
}
fun String.stream() = FileInputStream(this)
fun FileIn... |
import { decrypt, encrypt } from "../../src/aes";
import { hexToBytes, toHex } from "../../src/utils";
import { deepStrictEqual, rejects } from "./assert";
// Test vectors taken from https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-38a.pdf
const TEST_VECTORS = [
{
mode: "aes-128-ctr",
key... |
"""Inflines."""
import numpy as np
import pytest
from napari_plot.layers.infline import InfLine
def test_empty_infline():
layer = InfLine(None)
assert layer.ndim == 2
def test_default_infline():
# add multiple regions
data = [25, 50]
layer = InfLine(data)
assert layer.n_inflines == len(data... |
package ca.bc.gov.hlth.hnweb.model.rest.eligibility;
import java.util.ArrayList;
import java.util.List;
public class InquirePhnRequest {
private List<String> phns = new ArrayList<>();
public List<String> getPhns() {
return phns;
}
public void setPhns(List<String> phns) {
this.phns = phns;
}
@Override
pu... |
class User < ApplicationRecord
has_many :songs, dependent: :destroy
has_many :setlist_permissions, dependent: :destroy
has_many :setlists, through: :setlist_permissions, dependent: :destroy
validates :display_name, presence: true
validates :email, presence: true
has_secure_password
end
|
export * from './beforeUnloadTracker';
export * from './cookies';
export * from './customCss';
export * from './customFont';
export * from './email';
export * from './encoders';
export * from './errors';
export * from './getClerkQueryParam';
export * from './getClerkQueryParam';
export * from './hex';
export * from './... |
// Code generated by go-swagger; DO NOT EDIT.
package user
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"net/http"
"github.com/go-openapi/runtime"
"github.com/gmarcha/ent-goswagger-app/internal/ent"
"github.com/gma... |
puppet-role_storage_analytics
==================
storage_analytics role manifest for puppet in a foreman environment.
Deployment of software and scripts supporting https://github.com/naturalis/storage-analytics
Parameters
-------------
All parameters are read from defaults in init.pp and can be overwritten by hiera o... |
// SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause)
#include <linux/ethtool.h>
#include <linux/linkmode.h>
#include <linux/netdevice.h>
#include <linux/nvme.h>
#include <linux/io.h>
#include <linux/io-64-nonatomic-lo-hi.h>
#include <linux/pci.h>
#include <linux/rtnetlink.h>
#include "funeth.h"
#include "fun_por... |
cd checkpoints
# Download Trancos checkpoint
curl -L https://www.dropbox.com/sh/rms4dg5autwtpnf/AADQBOr1ruFsptbqG_uPt_zCa?dl=0 > trancos_ResFCN.zip
mkdir trancos_ResFCN
unzip trancos_ResFCN.zip -d trancos_ResFCN
# Download Pascal checkpoint
curl -L https://www.dropbox.com/sh/pwmoej499sfqb08/AABY13YraHYF51yw62Zc1w0-a... |
using Sogeti.Academy.Application.Topics.Models;
namespace Sogeti.Academy.Application.Topics.Factories
{
public interface IVoteFactory
{
Vote Create(string email);
}
public class VoteFactory : IVoteFactory
{
public Vote Create(string email)
{
return new Vote
{
Email = em... |
exports.add = function(a, b) {
logOp(a, b, "+");
return a+b;
}
exports.sub = function(a, b) {
logOp(a, b, "-");
return a-b;
}
exports.mult = function(a, b) {
logOp(a, b, "*");
return a*b;
}
exports.modulo = function(a, b) {
logOp(a, b, "%");
return a%b;
}
function logOp(a, b, op) {
... |
#ifndef __JUNKBOXMSF_BUTTON_H
#define __JUNKBOXMSF_BUTTON_H
#include "JunkBoxMsf.h"
typedef UpdateStatus (*ButtonState)(void);
typedef void (*ButtonPressCallback)(void);
extern void buttonInitialise(void);
extern ButtonState buttonUpdate;
extern void buttonOnShortPress(ButtonPressCallback callback);
extern void butto... |
package area
import (
"server"
. "server/data/datatype"
"server/libs/log"
)
type Scene struct {
server.Callee
}
func (s *Scene) OnAfterAdd(self Entity, sender Entity, index int) int {
log.LogMessage("scene add obj", sender.ObjectId(), index)
self.FindExtraData("cell").(*cell).AddObject(sender)
return 1
}
fun... |
import 'package:intl/intl.dart';
class CarwingsStatsDaily {
late DateTime dateTime;
late String mileagePerKWh;
late String KWhPerMileage;
late String mileageLevel;
late String accelerationWh;
late String accelerationLevel;
late String regenerativeWh;
late String regenerativeLevel;
late String auxWh;
... |
package com.kongzue.dialogx.interfaces;
/**
* @author: Kongzue
* @github: https://github.com/kongzue/
* @homepage: http://kongzue.com/
* @mail: myzcxhh@live.cn
* @createTime: 2020/9/22 14:09
*/
public abstract class DialogLifecycleCallback<T extends BaseDialog> {
public void onShow(T dialog){
}... |
package com.tuonbondol.testkeyboardutil
import android.os.Bundle
import android.support.v7.app.AppCompatActivity
import com.tuonbondol.keyboardutil.hideSoftKeyboard
import com.tuonbondol.keyboardutil.showSoftKeyboard
import kotlinx.android.synthetic.main.activity_main.*
/****
*
* @author TUON BONDOL Date: 10/9/17.
... |
#Setup
- npm install
#Commands
- npm run build: webpack build
- npm run start: Serves webserver on localhost:8080
|
using System;
using System.Runtime.InteropServices;
namespace ParquetSharp.IO
{
/// <summary>
/// Wrapper around arrow::io::InputStream.
/// </summary>
public abstract class InputStream : IDisposable
{
internal InputStream(IntPtr handle)
{
Handle = new ParquetHandle(han... |
import 'babel-polyfill';
import logger from 'debug';
logger.enable('react-editor-component:*');
import React from 'react';
import ReactDOM from 'react-dom';
import Editor from 'Editor';
import {REGIONS} from 'Toolbar';
import Format from 'FormatButton';
ReactDOM.render(
React.createElement(Editor, {},
React.creat... |
#import <Foundation/Foundation.h>
#pragma mark Class forward
@class PubNub;
NS_ASSUME_NONNULL_BEGIN
/**
@brief Current client state cache manager.
@discussion When client use \b state API which allow to pull and push client state, this manager stores all
information locally. Locally cached da... |
<?php
$username = "root";
$password = "";
$sunucu = "localhost";
$database = "personalblog";
$connection = mysqli_connect($sunucu, $username, $password);
$connection->query("SET NAMES UTF8");
if(!$connection){
echo "Bağlantı hatası.";
exit();
}
$db = $connection->select_db($database);
if(!$db){
echo ... |
[![][pypi-img]][pypi-url] [![][travis-img]][travis-url]
# trane
Python Boilerplate contains all the boilerplate you need to create a Python package.
- Free software: MIT license
- Documentation: https://DAI-Lab.github.io/trane
[travis-img]: https://travis-ci.org/DAI-Lab/trane.svg?branch=master
[travis-url]: https:... |
inherited Frame_ArcCtrls: TFrame_ArcCtrls
Height = 383
object sLabel5: TsLabel [0]
Left = 395
Top = 308
Width = 56
Height = 13
Alignment = taRightJustify
Caption = 'Base angle:'
Enabled = False
end
object sLabel6: TsLabel [1]
Left = 454
Top = 308
Width = 16
Height = 1... |
import { ButtonOptions } from './ButtonOptions';
import { Child } from '../Child';
import { Element } from '../Element';
export class Button extends Element{
protected get TagName(): string { return `button`; }
protected Root: HTMLButtonElement;
public get Enabled(): boolean {
return !this.Root.disabled;
}
pu... |
use crate::test_utils::TestRandom;
use crate::*;
use bls::{PublicKeyBytes, SignatureBytes};
use std::convert::From;
use serde_derive::{Deserialize, Serialize};
use ssz_derive::{Decode, Encode};
use test_random_derive::TestRandom;
use tree_hash::{SignedRoot, TreeHash};
use tree_hash_derive::{SignedRoot, TreeHash};
///... |
# Aggregation
Objective aggregation builder represents all available [Elasticsearch aggregations][1].
To form an aggregation you have to create `Search` object. See below an example of min aggregation usage.
```php
$search = new Search();
$minAggregation = new MinAggregation('min_agg');
$minAggregation->setField('p... |
(cl:in-package #:clicl-reader)
(defun convert-according-to-readtable-case (token token-escapes)
(ecase (readtable-case *readtable*)
(:upcase
(loop for escape across token-escapes
for i from 0
do (when (null escape)
(setf (aref token i)
(char-upcase (aref token i))))))
(:downcase
(... |
package beer.data.absolute
import java.io.File
import scala.io.Source
import scala.collection.mutable.{Map => MutableMap}
/**
* @author milos
*/
class WMT13absolute (absoluteJudgmentsDir:String, dataDir:String) {
val references_dir = dataDir+"/wmt13-baselines/wmt13-data/plain/references" // newstest2013-ref.$lan... |
import styled from 'styled-components';
export const AcceptButton = styled.button`
background: white;
border: 2px solid #0084b5;
border-radius: 4px;
color: #0084b5;
cursor: pointer;
font-weight: bold;
font-size: 1.1em;
padding: 0.3em 0.4em;
margin: 15px;
:hover {
background-color: #0084b5;
... |
/**
* Created by Ruud on 17-3-2015.
*/
// fix phpstorm error.
var jQuery = jQuery;
class Modal{
constructor(){
jQuery(".modal").draggable();
jQuery(".modal-options > .modal-close").on("click", function(){
jQuery(this).closest(".modal").hide();
});
this.... |
---
layout: doc_de
title: Problemlösungen
previous: Rubinius ausführen
previous_url: getting-started/running-rubinius
next: Mitmachen
next_url: contributing
---
Im Folgenden werden Fehler beschrieben, die während des Kompilierens
oder der Installation auftreten können sowie mögliche Ansätze zur Fehlerbehebung.
Sollte... |
module.exports = (message, options) => {
var err = new Error(message)
if (options && typeof options === 'object') {
for (const key in options) {
err[key] = options[key]
}
}
return err
}
|
require_relative '../config'
require_relative 'coordinate'
class Food
TILE_SIZE = Config::TILE_SIZE
def initialize(x, y)
@image = Gosu::Image.new("./media/food.png")
@sound = Gosu::Sample.new("./media/food.mp3")
@x = x
@y = y
end
def self.popup
x = rand(0...TILE_SIZE) * TILE_SIZE
y =... |
<?php
namespace raoul2000\workflow\base;
use raoul2000\workflow\base\Status;
use yii\db\BaseActiveRecord;
/**
* Interface for status accessor component.
*/
interface IStatusAccessor
{
/**
* This method is invoked each time a status value must be read.
*
* @param BaseActiveRecord $model
* @return string the... |
using System.Collections.Generic;
using System.Threading.Tasks;
namespace Qooba.Framework.Bot.Abstractions
{
public interface IReplyAction<T> : IReplyAction
{
Task<T> CreateReplyMessage(IConversationContext conversationContext, IDictionary<string, string> parameters);
}
public interface IRepl... |
# Challenge - Improve the Process
## Goals
1. flat map each line to words, cast to lower (case) before strip and split
1. clean out non-letters
1. clean out stopwords
1. map to intermediate key-value pairs (word, 1)
1. reduce by key (sum)
1. map again - reverse so count is first
1. take the top 20 words by key (firs... |
import 'package:muffin/core/muffin_interface.dart';
///instead of MuffinNavigator.of()
class _Muffin extends MuffinInterface {}
// ignore: non_constant_identifier_names
final Muffin = _Muffin();
|
using System.Collections;
using System.Collections.Generic;
using Bolt;
using Cinemachine;
using UnityEngine;
public class PlayerMovementController : Bolt.EntityBehaviour<IPlayerState>
{
[Header("Movement Properties")] public float maxWalkSpeed = 0.1f;
public float maxRunSpeed = 0.2f;
public float acceler... |
import 'dart:async';
import 'package:connectivity_plus/connectivity_plus.dart';
import 'package:flutter_offline/src/utils.dart' as transformers;
import 'package:flutter_test/flutter_test.dart';
void main() {
final stream = () => StreamController<ConnectivityResult>();
late StreamController<ConnectivityResult> va... |
module PrettyMacroExpand
using MacroTools: prettify
using JuliaFormatter: format_text
using Markdown: Markdown
export @prettyexpand
export @prettyexpand1
export @prettyexpand_md
export @prettyexpand1_md
const alias = Ref(true)
const margin = Ref(80)
macro prettyexpand(exp)
quote
print($(prettyexpand(exp... |
// Copyright 2019 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.
#ifndef CHROME_BROWSER_AVAILABILITY_AVAILABILITY_PROBER_H_
#define CHROME_BROWSER_AVAILABILITY_AVAILABILITY_PROBER_H_
#include <stdint.h>
#include <memo... |
package de.enricopilz.constraints.solver;
import de.enricopilz.constraints.api.Problem;
import de.enricopilz.constraints.api.Solution;
import de.enricopilz.constraints.api.Solver;
import org.junit.Test;
import java.util.List;
import static org.assertj.core.api.Assertions.assertThat;
public class DeepFirstSearchSolv... |
# frozen_string_literal: true
require 'colorize'
require_relative 'utils'
RSpec.describe :log do
it 'can log a message' do
dotty_run_script '((:debug "hello world friend"))' do |_dotty, _sin, _sout, serr, _proc|
expect(serr.read.uncolorize).to match(/DBG hello world friend/)
end
end
it 'can log a... |
package com.karasiq.bootstrap.dropdown
import com.karasiq.bootstrap.context.RenderingContext
trait Dropdowns { self: RenderingContext ⇒
import scalaTags.all._
type Dropdown <: AbstractDropdown
val Dropdown: DropdownFactory
trait AbstractDropdown extends BootstrapHtmlComponent {
def dropdownId: String
... |
!> This module provides factory procedures for creating interactions.
module m_interaction_factory
use iso_fortran_env
use m_point, only: pair_interaction, single_interaction
use m_gb_interaction, only: gb_interaction
use m_lj_interaction, only: lj_interaction
use m_gblj_interaction, only: gblj_interaction
... |
using System;
using System.IO;
using System.Threading.Tasks;
using ApiView;
namespace APIViewWeb
{
public abstract class LanguageService
{
public abstract string Name { get; }
public abstract string Extension { get; }
public virtual bool IsSupportedFile(string name) => name.EndsWith(Ex... |
module PostsHelper
def set_latest_post(micropost, post)
if post.present?
session["micropost-#{micropost.id}-latest-post"] = post.id
end
end
def get_later_posts(micropost)
later_posts = micropost.posts.where("id > ?", session["micropost-#{micropost.id}-latest-post"]).order("id DESC")
if !later_posts.e... |
# *****************************************************************************
# *****************************************************************************
#
# lmsInstallScript.bash
#
# *****************************************************************************
#
# @author Jay Wheeler.
# @version 0.0.1
# @copyr... |
CORE=2
nohup java -Dcore=$CORE -cp loafer.jar loafer4vm/StartLoafer >console.txt 2>&1 &
|
using System.Collections.Generic;
using Microsoft.AspNet.Identity.EntityFramework;
using TimeTracker.Model;
namespace TimeTracker.Service.ViewModels
{
public class UserRole
{
public ApplicationUser User { get; set; }
public List<IdentityRole> Roles { get; set; }
}
public class RoleUse... |
/*
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this f... |
package io.github.drumber.kitsune.constants
import io.github.drumber.kitsune.data.model.MediaSelector
import io.github.drumber.kitsune.data.model.MediaType
import io.github.drumber.kitsune.data.model.SearchParams
import io.github.drumber.kitsune.data.service.Filter
object Defaults {
val DEFAULT_FILTER get() = Fi... |
; Listing generated by Microsoft (R) Optimizing Compiler Version 18.00.40629.0
TITLE C:\Users\cex123\Desktop\FYP\develop\spartan\source\Kernel\Monitor\SysCall.c
.686P
.XMM
include listing.inc
.model flat
INCLUDELIB OLDNAMES
EXTRN _int386:PROC
PUBLIC _DoSysCall
PUBLIC _SysCall
PUBLIC _EnableSysCall... |
import {getMousePositionFromEvent} from './util/browser-util.js';
import {near, distanceBetween} from './math/vector-math';
import {canvas} from './canvas';
import player from './player';
import colors from './misc/colors';
import {updatePrimaryRays} from './shoot-rays'
import Line from './geometry/Line'
import Circle ... |
<?php
namespace Application\Model;
class Picture
{
private $id;
private $authorName;
private $title;
private $description;
private $filename;
private $instagramUrl;
public function setId($id)
{
$this->id = $id;
}
public function setAuthorName($authorName)
{
... |
/*
* This GrowERP software is in the public domain under CC0 1.0 Universal plus a
* Grant of Patent License.
*
* To the extent possible under law, the author(s) have dedicated all
* copyright and related and neighboring rights to this software to the
* public domain worldwide. This software is distributed withou... |
#!/bin/bash
curl -o /dev/null --silent --head --write-out '%{http_code}\n' $1 |
import { TenantPayload } from './TenantPayload';
export class ServiceMessage {
tenant: TenantPayload;
}
|
package com.erikriosetiawan.cinemamovies
import android.os.Bundle
import android.util.Log
import android.widget.ImageView
import android.widget.TextView
import androidx.appcompat.app.AppCompatActivity
import com.erikriosetiawan.cinemamovies.db.FavoriteMovieDbHelper
import com.erikriosetiawan.cinemamovies.db.FavoriteTv... |
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System;
using System.Collections.Generic;
using System.Text;
namespace ConsoleApplication1
{
internal struct TheStruct
{
public string fieldinStr... |
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Netlink sockets and messages
package syscall
import "unsafe"
// Round the length of a netlink message up to align it properly.
func nlmAlignOf(msglen int)... |
/*
*Daniel Cancelmo
*Lab 8
*CSC 172 - Professor Pawlicki
*Lab: Mon. & Wed. 12:30-1:45
*I did not collaborate with anyone on this assignment.
*/
@SuppressWarnings({ "rawtypes", "unchecked" })
public class BinaryTree implements BST {
private MyTreeNode root;
public BinaryTree() {
}
//Inserts entry into B... |
<?php
namespace Database\Factories;
use App\Models\Category;
use App\Models\Office;
use App\Models\Scholarship;
use App\Models\Semester;
use App\Models\Student;
use Illuminate\Database\Eloquent\Factories\Factory;
class ScholarshipFactory extends Factory
{
/**
* Define the model's default state.
*
... |
<?php
/**
* @filesource URLTest.php
* @created 26.12.2016
* @package chillerlan\TinyCurlTest
* @author Smiley <smiley@chillerlan.net>
* @copyright 2016 Smiley
* @license MIT
*/
namespace chillerlan\TinyCurlTest;
use chillerlan\TinyCurl\URL;
use PHPUnit\Framework\TestCase;
class URLTe... |
import { combineReducers } from 'redux';
export const FETCH_EVENT_REQUEST = 'event/FETCH_REQUEST';
export const FETCH_EVENT_SUCCESS = 'event/FETCH_SUCCESS';
export const FETCH_EVENT_FAILURE = 'event/FETCH_FAILURE';
const data = (state = null, action) => {
switch (action.type) {
case FETCH_EVENT_SUCCESS:
r... |
namespace Dibix.Sdk.CodeGeneration
{
public abstract class ValueReference<TType> : ValueReference where TType : TypeReference
{
public new TType Type => (TType)base.Type;
protected ValueReference(TType type, string source, int line, int column) : base(type, source, line, column)
{
... |
/**
* @file Module containing utilities.
*/
import * as Compressor from "./compressor";
import * as Dom from "./dom";
import * as History from "./history";
import * as Parser from "./parser";
import * as Sequencer from "./sequencer";
import * as Vector from "./vector";
export * from "./misc";
export { Compressor, D... |
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub fn serialize_operation_crate_operation_assign_instance(
input: &crate::input::AssignInstanceInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::SerializationError> {
let mut out = String::new();
l... |
package ai.preferred.venom.socks;
import org.apache.http.HttpHost;
import org.apache.http.conn.routing.HttpRoute;
import org.apache.http.nio.conn.SchemeIOSessionStrategy;
import org.apache.http.nio.conn.ssl.SSLIOSessionStrategy;
import org.apache.http.nio.reactor.IOSession;
import org.apache.http.nio.reactor.ssl.SSLIO... |
require 'spec_helper'
feature 'Abuse reports', feature: true do
let(:another_user) { create(:user) }
before do
login_as :user
end
scenario 'Report abuse' do
visit user_path(another_user)
click_link 'Report abuse'
fill_in 'abuse_report_message', with: 'This user send spam'
click_button '... |
<?php
/*
|--------------------------------------------------------------------------
| Routes File
|--------------------------------------------------------------------------
|
| Here is where you will register all of the routes in an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| an... |
<?php
declare(strict_types=1);
namespace AmbientLink\SDK\Mqtt\Zigbee;
final class ContactSensorDevice
{
/** @var string */
private $topic;
/** @var int */
private $battery;
/** @var int */
private $voltage;
/** @var bool */
private $contact;
/** @var int */
private $linkQu... |
package org.greenplum.pxf.plugins.hdfs.avro;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertTrue;
public class AvroSchemaFileReaderFactoryTest {
private AvroSchemaFileReaderFactory avroSchemaFileReaderFactory;
@BeforeEach
... |
import org.specs2.mutable._
import org.specs2.runner._
import org.junit.runner._
import play.api.Play
import play.api.test._
import play.api.test.Helpers._
object authUtility {
private def makeDigest: String = {
val login = Play.current.configuration.getString("auth.username").getOrElse("admin")
val passw... |
/// Class providing utility methods when handling with dates.
class DateUtil {
/// Get calendar week for the passed date.
static int getWeekOfYear(DateTime date) {
DateTime weekYearStartDate = _getWeekYearStartDateForDate(date);
int dayDiff = date.difference(weekYearStartDate).inDays;
return ((dayDiff ... |
# frozen_string_literal: true
class AddDeadlineToExercises < ActiveRecord::Migration[5.2]
def change
add_column :exercises, :submission_deadline, :datetime, null: true, default: nil
add_column :exercises, :late_submission_deadline, :datetime, null: true, default: nil
end
end
|
/*
* Copyright (c) 2016, Intel Corporation
* All rights reserved.
*
* Author: Jérémy Compostella <jeremy.compostella@intel.com>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* * Redistributions of sou... |
#!/usr/bin/env python
"""
ObjectMapping Docstring
The ObjectMapping object represents the ORM/
Database object mapping that extracted and
transformed data should be mapped to.
"""
from typing import Type
import importlib.util
import importlib
__author__ = "Dylan Pozorski"
__project__ = "TuringMachine"
__class__ ... |
class PopulationEstimate < ApplicationRecord
include Raw
HEADERS = {
SAMPLE_DATE: "Sample_date",
SHL_CASE_NUMBER: "SHL Case Number",
SPAWNING_DATE: "Spawning_date",
LIFESTAGE: "lifestage",
ABUNDANCE: "abundance",
FACILITY: "facility",
NOTES: "Notes"
}
end
|
<?php
namespace Sandbox\Model\Table;
use Tools\Model\Table\Table;
class ExampleRecordsTable extends Table {
/**
* @var array
*/
public $records = [];
/**
* @param array $config
*/
public function __construct(array $config = []) {
parent::__construct($config);
//ConnectionManager::create('array', [... |
package br.com.arquitetoandroid.appcommerce.viewmodel
import android.app.Application
import androidx.lifecycle.AndroidViewModel
import br.com.arquitetoandroid.appcommerce.repository.ProductsRepository
class ProductViewModel (application: Application) : AndroidViewModel(application) {
private val productsReposito... |
package com.force.api;
public class CreateResponse {
String id;
ApiError[] errors;
boolean success;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public ApiError[] getErrors() {
return errors;
}
public void setErrors(ApiError[] errors) {
this.errors = errors;
}
... |
/* in your Cargo.toml
[dependencies]
twitchchat = "0.10" # this crate
tokio = { version = "0.2", features = ["full", "macros"] } # you need tokio to run it
*/
// or you can use futures::stream::StreamExt
use tokio::stream::StreamExt as _;
#[tokio::main]
async fn main() {
let... |
# githoard
Quickly backup collections of git repositories with the help of [gitea]!
## Why?
Anything that can go wrong, will go wrong. Protect valuable repositories (including other's
repositories) from accidental deletion by mirroring them!
## Quickstart
To quickly get you up and running, follow these easy steps... |
<?php
use Illuminate\Database\Seeder;
use App\Model\FurtherCategory;
class FurtherCategoriesTableSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
for($i=0; $i<200; $i++){
FurtherCategory::create([
'subcategory... |
// COMP4521 HON KIN TAT 20514332 kthon@connect.ust.hk
// COMP4521 LAI CHEUK HEI 20464044 chlaiak@connect.ust.hk
// COMP4521 CHAN HOK HIM 20435392 hhchanal@connect.ust.hk
package com.yosemiteyss.greentransit.app.route
import android.content.res.ColorStateList
import android.vi... |
'use strict';
import { StatusBarAlignment, StatusBarItem, window } from 'vscode';
/**
* Status bar updates. Shows the selected RstTransformerConfig when a
* restructuredtext document is active. If you click on the status bar
* then the RstTransformerConfig is reset and you will need to select from
* the menu when... |
package com.polban.tekpro.monopoly;
public interface TradeDialog {
TradeDeal getTradeDeal();
}
|
// Copyright (c) 2016 Niklas Wolber
// This file is licensed under the MIT license.
// See the LICENSE file for more information.
package main
import (
"fmt"
"log"
"time"
"github.com/fsouza/go-dockerclient"
)
func monitorDocker(s *eventStore) {
host, err := docker.DefaultDockerHost()
if err != nil {
log.Fat... |
import 'package:roomr/model/listing.dart';
class EditListingArguments {
final String listingId;
final Listing listingData;
final String popUntilScreen;
EditListingArguments(this.listingId, this.listingData, this.popUntilScreen);
@override
String toString() {
return 'EditListingArguments{listingId: $l... |
extern crate dotenv;
#[macro_use]
extern crate diesel;
#[macro_use]
extern crate serde;
pub mod db;
pub mod handlers;
pub mod models;
pub mod schema;
pub mod schema_graphql;
|
% for i in range(0,10):
$$ shaker.run SCRIPT
% endfor |
using System;
namespace Olbrasoft.Paging
{
public static class PageInfoExtension
{
public static int CalculateSkip(this IPageInfo pageInfo)
{
if (pageInfo == null) throw new ArgumentNullException(nameof(pageInfo));
return (pageInfo.NumberOfSelectedPage - 1) * pageInfo.... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.