text stringlengths 27 775k |
|---|
package graphdriver // import "github.com/ellcrys/docker/daemon/graphdriver"
import (
"fmt"
"path/filepath"
"github.com/ellcrys/docker/pkg/plugingetter"
"github.com/ellcrys/docker/pkg/plugins"
"github.com/ellcrys/docker/plugin/v2"
"github.com/pkg/errors"
)
func lookupPlugin(name string, pg plugingetter.PluginG... |
package com.xl.plugin.xlplugin.gui;
import com.xl.plugin.xlplugin.entity.DeploymentEntity;
import com.xl.plugin.xlplugin.impl.DeploymentPackageServiceImpl;
import com.xl.plugin.xlplugin.service.DeploymentPackageService;
import com.xl.util.GUIUtil;
import java.awt.event.KeyEvent;
import java.awt.event.WindowAdapter;
im... |
# Field guide
This guide provides detailed information about the different types of variable sources.
Proceed <a href="_static/taxonomy.html">here</a> to interactively inspect the taxonomy
tree we are employing in SCoPe. Please refer to [arXiv:2102.11304](https://arxiv.org/pdf/2102.11304.pdf)
for more details on the ... |
package fpgatidbits.axi
import chisel3._
import chisel3.util._
// Define simple extensions of the Chisel Decoupled interfaces,
// with signal renaming to support auto inference of AXI stream interfaces in Vivado
/*
class AXIStreamMasterIF[T <: Data](gen: T) extends DecoupledIO(gen) {
def renameSignals(ifName: Stri... |
<?php
declare(strict_types=1);
use Illuminate\Database\Seeder;
use Spatie\Permission\Models\Permission;
use Spatie\Permission\Models\Role;
final class RoleTableSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
/** @var \Spatie\Per... |
import ray
from ray.streaming import StreamingContext
def test_data_stream():
ray.init(_load_code_from_local=True, _include_java=True)
ctx = StreamingContext.Builder().build()
stream = ctx.from_values(1, 2, 3)
java_stream = stream.as_java_stream()
python_stream = java_stream.as_python_stream()
... |
/**
* Class for keeping MoCap description and frame data together.
* Also performs proper copying and cleanup of data structures.
*/
#pragma once
#include "NatNetTypes.h"
class MoCapData
{
public:
MoCapData();
~MoCapData();
public:
sMarkerSetDescription* findMarkerSetDescription( const sMarkerSetData& refMa... |
/*DROP DATABASE IOU_DB;
CREATE DATABASE IOU_DB;*/
USE IOU_DB;
CREATE TABLE USERNAME(
UserName varChar(25) PRIMARY KEY,
FirstName varchar(15),
LastName varchar(20),
Email varchar(320),
Password varchar(30),
LoggedIn boolean
);
CREATE TABLE EVENT_TABLE (
UserName varchar(25),
FOREIGN KEY... |
import * as React from 'react';
import ListItem from '@material-ui/core/ListItem';
import ListItemText from '@material-ui/core/ListItemText';
import { Avatar } from '../Avatar';
import { ListItemProperties } from '@blueeast/bluerain-ui-interfaces';
/**
* The props of ListItem Component
* @param {Object} props.style ... |
package linalg
import (
"math"
"github.com/hebl/gosl/errors"
"github.com/hebl/gosl/matrix"
"github.com/hebl/gosl/permutation"
)
/**
LU_decomp
*/
//LU LU decomp
// See Golub & Van Loan, Matrix Computations, Algorithm 3.4.1 (Gauss
// Elimination with Partial Pivoting).
func LU(A *matrix.Matrix) (*permutation.Perm... |
// <copyright file="Constructor_Should.cs" company="YAGNI">
// All rights reserved.
// </copyright>
// <summary>Holds unit tests of JsonWriter object constructor.</summary>
using System;
using LibrarySystem.FileExporters.Utils.Contracts;
using Moq;
using NUnit.Framework;
namespace LibrarySystem.FileExporters.UnitTes... |
using System.Collections.Generic;
namespace MiniEngine.Editor.Workspaces
{
public static class ListExtensions
{
public static T Next<T>(this List<T> list, T current)
{
var index = list.IndexOf(current);
var nextIndex = (index + 1) % list.Count;
return list[n... |
pro = float(input('Preço do produto: '))
porc = int(input('porcentagem: '))
#corrigindo
novo = pro - (porc * pro / 100)
s = pro * porc / 100
print('preço do produto com desconto de {}%: R${}'.format(porc,s))
print('o preço custa agora: R${}'.format(novo))
|
package com.mercadolivro.controller
import com.fasterxml.jackson.databind.ObjectMapper
import com.mercadolivro.controller.request.PostCustomerRequest
import com.mercadolivro.controller.request.PutCustomerRequest
import com.mercadolivro.enums.CustomerStatus
import com.mercadolivro.helper.buildCustomer
import com... |
import {
ChakraProvider,
IconButton,
IconButtonProps,
useColorMode,
} from '@chakra-ui/react'
import { AppProps } from 'next/app'
import React from 'react'
import { FiMoon, FiSun } from 'react-icons/fi'
import { chakraNextTheme } from '../'
export default function App({
Component,
pageProps,
err,
}: AppP... |
require_relative '../lib/column_pack/bin_packer'
include ColumnPack
hundred = File.readlines(File.expand_path('./dummy/test/fixtures/files/hundred.txt'))
algos = [:best_fit_increasing, :best_fit_decreasing]
algos.each do |algo|
empty_spaces = []
(2..20).each do |num_bins|
bp = BinPacker.new(num_bins, {:al... |
---
title: Short Lease
letter: S
permalink: "/definitions/bld-short-lease.html"
body: A term applied collo-quially, but wlthout much precision, to a lease for a short
term, (as a month or a year,) as dlstlngulshed from one running for a long period
published_at: '2018-07-07'
source: Black's Law Dictionary 2nd Ed (191... |
-- file:privileges.sql ln:744 expect:true
SELECT has_table_privilege('regress_user1', 'atest4', 'SELECT WITH GRANT OPTION')
|
import scala.quoted._
import scala.quoted.staging._
object Test {
def main(args: Array[String]): Unit = {
given Compiler = Compiler.make(getClass.getClassLoader)
def u(using Quotes): Expr[Unit] = '{}
println(withQuotes(u.show))
println(run(u))
}
}
|
const status = require('http-status');
const reviewsController = require('../../src/controllers/reviews');
const logger = {
debug: jest.fn()
};
const review = {
productId: 123,
rating: 10,
comment: 'comment'
};
const pagination = {
page: 2,
pageSize: 3,
count: 4,
totalPages: 5
};
con... |
using System.Windows;
namespace Caliburn.Micro.Hello
{
public class HelloBootstrapper : BootstrapperBase
{
public HelloBootstrapper()
{
Initialize();
}
protected override void OnStartup(object sender, StartupEventArgs e)
{
DisplayRo... |
import 'package:test/test.dart';
import 'package:simple_kalman/simple_kalman.dart';
void main() {
test('Test Kalman filter', () {
final _origin = <int>[0, 1, 3, 5, 7, 2, 11, 13, 15];
final _filtered = <double>[
0.0,
0.2,
0.6897689768976898,
1.4209764760046477,
2.4025998748506314... |
package com.realsoc.shiby.componentization
/*
* Copyright (C) 2018 Netflix, 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
*... |
-- Create userids
GRANT ALL PRIVILEGES ON *.* TO 'cfs'@'localhost' IDENTIFIED BY 'cfs123';
GRANT ALL PRIVILEGES ON *.* TO 'cfs'@'*' IDENTIFIED BY 'cfs123';
-- Create Database
CREATE DATABASE CFS;
-- create table
CREATE TABLE USERS {
ID
}
|
import * as PIXI from 'pixi.js'
import * as System from '../arch/system'
import { clamp } from '../core/math/numeric'
import { MyState, config } from '../main'
const x_base = 400
const game_height = 320
export const CameraSystem = System.create<MyState>(
() => {},
(game, time) => {
game.state.cameras.forEach(... |
//! Utilities for scheduling tasks to be executed by the Node.js runtime
use std::marker::{Send, Sized};
use std::os::raw::c_void;
use crate::context::TaskContext;
use crate::handle::{Handle, Managed};
use crate::result::JsResult;
use crate::types::{JsFunction, Value};
use neon_runtime;
use neon_runtime::raw;
/// A ... |
#![allow(non_snake_case, non_camel_case_types, non_upper_case_globals, clashing_extern_declarations, clippy::all)]
pub type INDClosedCaptionDataReceivedEventArgs = *mut ::core::ffi::c_void;
pub type INDCustomData = *mut ::core::ffi::c_void;
pub type INDDownloadEngine = *mut ::core::ffi::c_void;
pub type INDDownloadEngi... |
ls -AR > oldlarch.txt
ls -AR > babylarch.txt
#comment out line depending on computer running from
|
#!/usr/bin/env node
// @ts-ignore: Cannot find declaration file
require('source-map-support/register');
const cdk = require('@aws-cdk/core');
// Import libraries to read a config file
const yaml = require('js-yaml');
const fs = require('fs');
const { CloudmapperauditorStack } = require('../lib/cloudmapperauditor-sta... |
#include <gtest/gtest.h>
#include "cmod_grid_test.h"
TEST_F(CMGrid, SingleYearHourly_cmod_grid) {
grid_default_60_min(data);
// Run with fixed output
int errors = run_module(data, "grid");
EXPECT_FALSE(errors);
if (!errors)
{
ssc_number_t capacity_factor, annual_energy_pre_interconnect, annual_energy_interc... |
%%--------------------------------------------------------------------
%% Copyright (c) 2021-2022 EMQ Technologies Co., Ltd. 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 Lice... |
<?php
declare(strict_types=1);
namespace Test;
use PHPUnit\Framework\TestCase;
use Someniatko\AmqpUrlParser\AmqpUrl;
use Someniatko\AmqpUrlParser\Parser;
final class ParserTest extends TestCase
{
/** @dataProvider urlProvider */
public function test(string $rawUrl, AmqpUrl $expectedParsedUrl): void
{
... |
CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
C
C Source: http://people.sc.fsu.edu/~jburkardt%20/f_src/rk4/rk4.f90
C
C Reformatted to F77 standard.
C
CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
subroutine rk4vec_ENCKE ( t0, m, u0, RHO0, dt, f, u )
... |
require 'data_objects'
if RUBY_PLATFORM =~ /java/
require 'do_jdbc'
require 'java'
module DataObjects
module Mysql
JDBC_DRIVER = 'com.mysql.jdbc.Driver'
end
end
begin
java.lang.Thread.currentThread.getContextClassLoader().loadClass(DataObjects::Mysql::JDBC_DRIVER, true)
rescue java.lang.... |
<?php
declare(strict_types=1);
namespace Platformsh\FlexBridge\Tests;
use PHPUnit\Framework\TestCase;
use function Platformsh\FlexBridge\mapPlatformShEnvironment;
class FlexBridgeTest extends TestCase
{
public function testDoesNotRunWithoutPlatformshVariables() : void
{
mapPlatformShEnvironment();
... |
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use \App\Friend;
class FriendController extends Controller
{
public function index(){
$info = Friend::find(1);
return view("admin.friend.index",[
"info"=>$info
]);
}
public function update(Request $req... |
import React, { Component } from 'react';
import classnames from 'classnames';
import { Sigil } from '/components/lib/icons/sigil';
class PostButton extends Component {
render() {
if (this.props.enabled) {
return (
<p className="body-regular pointer" onClick={this.props.post}>
-> Post
... |
from django.conf.urls import patterns, url
urlpatterns = patterns('ietf.secr.areas.views',
url(r'^$', 'list_areas', name='areas'),
url(r'^add/$', 'add', name='areas_add'),
url(r'^getemails', 'getemails', name='areas_emails'),
url(r'^getpeople', 'getpeople', name='areas_getpeople'),
url(r'^(?P<name>... |
import React from 'react';
import PropTypes from 'prop-types';
import { makeStyles } from '@material-ui/core/styles';
import Button from '@material-ui/core/Button';
import ShowsGrid from '../ShowsGrid';
import LoadingIndicator from '../LoadingIndicator';
const useStyles = makeStyles(() => ({
root: {
width: '100... |
// Copyright 2018 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.
package org.chromium.chrome.browser.media.router.cast.remoting;
import com.google.android.gms.cast.ApplicationMetadata;
import com.google.android.gms.cas... |
/*
* Copyright 2021 DeNA Co., Ltd.
*
* 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 ... |
using System;
using System.Security.Cryptography;
using jCrypto;
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace UnitTests.jCrypto
{
[TestClass]
public class PublicKeyTests
{
private KeyPair _alice;
private KeyPair _bob;
private KeyPair _eve;
private string _m... |
# Manifest Webpack plugin
## Installation
`npm install @skyrpex/manifest-webpack-plugin`
## Usage
```js
// webpack.config.js
import ManifestPlugin from '@skyrpex/manifest-webpack-plugin';
export default {
// ...
plugins: [
new ManifestPlugin('path/to/manifest.json'),
],
};
```
|
# Copyright 2019 PerfKitBenchmarker Authors. 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 appli... |
package typingsSlinky.bingmaps.global.Microsoft.Maps
import org.scalajs.dom.raw.HTMLElement
import typingsSlinky.bingmaps.Microsoft.Maps.IKmlScreenOverlayOptions
import org.scalablytyped.runtime.StObject
import scala.scalajs.js
import scala.scalajs.js.`|`
import scala.scalajs.js.annotation.{JSGlobalScope, JSGlobal, JS... |
#include "types.h"
#include "stat.h"
#include "user.h"
#define NPROC 64 // maximum number of processes
#define KEY_UP 0xE2
#define KEY_DN 0xE3
#define KEY_LF 0xE4
#define KEY_RT 0xE5
char procstate[6][9] = {"UNUSED", "EMBRYO", "SLEEPING", "RUNNABLE", "RUNNING", "ZOMBIE"};
char digits[] = "0123456789";
char blankproc... |
using System;
using System.Collections.Generic;
using System.Text;
using SmartCode.Configuration;
using SmartCode.ETL.Entity;
using SmartSql;
using SmartSql.Batch;
namespace SmartCode.ETL
{
public static class ProjectExtensions
{
public const String ETL_TASK_ID = "ETLTaskId";
public static voi... |
import { Component, Input, OnInit } from '@angular/core'
import { EditorContentService } from '@ws/author/src/lib/routing/modules/editor/services/editor-content.service'
// import { CollectionResolverService } from './../../services/resolver.service'
@Component({
selector: 'ws-auth-table-tree-label',
templateUrl: ... |
<script type="text/javascript">
$(document).ready(function() {
$('.js-example-basic-single').select2({ width: '100%' });
$('#ngaycap').datetimepicker({
timepicker:false,
format:'d/m/Y'
});
CKEDITOR.replace('content',{
allowedContent: true,
disableAutoInline: true,
... |
package io.github.kaisery.shi.microservice.common.dto
data class ResponseDto<T>(
var code: String,
var msg: String,
var timestamp: Long,
var data: T?
)
|
# This is a < h1 > header
## This is a < h2 > header
###### This is a < h6 > header
|
package com.example.mothertochild.controller;
import com.example.mothertochild.util.JsonResult;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annota... |
# IoT/termosensor
## интеллектуальный датчик температуры (IoT)
(by) Dmitry Ponyatov, <dponyatov@gmail.com>>, 2018
(c) ICBCOM LLC http://icbcom.ru, 2018
All rights reserved
### Концепция
1. Целевая платформа: Linux (x86/PC, ARM/Raspberry, MIPS/MR3020)
1. Hardware реализация должна включать поддержку шины 1-Wire (... |
//
// YWHomeCompareOtherModel.h
// YuWaShop
//
// Created by Tian Wei You on 16/11/30.
// Copyright © 2016年 Shanghai DuRui Information Technology Company. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface YWHomeCompareOtherModel : NSObject
@property (nonatomic,copy)NSString * star;
@property (... |
import { Store, Parser } from 'n3';
import { owl2rl } from 'hylar-core';
import * as fs from 'fs';
import path from 'path';
import { namedNode, literal } from '@rdfjs/data-model';
import inferencer from '../lib';
const parser = new Parser();
const ontologyQuads = parser.parse(
fs.readFileSync(path.join('__tests__',... |
+++
title = "CORS Middleware"
description = "CORS middleware for Echo"
[menu.main]
name = "CORS"
parent = "middleware"
+++
CORS middleware implements [CORS](http://www.w3.org/TR/cors) specification.
CORS gives web servers cross-domain access controls, which enable secure cross-domain
data transfers.
*Usage*
`e.U... |
part of '../../dartsicord.dart';
/// A Webhook resource. Create with [TextChannel.createWebhook].
class Webhook extends _Resource {
_Route get _endpoint => client.api + "webhooks" + id;
Snowflake id;
/// The name of the Webhook.
String name;
/// The avatar of the Webhook.
String avatar;
/// The secur... |
# Examples
Run:
```bash
$ go run ./_examples/<name>/<file>.go
```
Example:
```bash
$ go run ./_examples/composition/composition.go
```
|
import {AbstractRequestInterceptor, Request, Next} from '../interceptor';
import {AuthManagerInterface, SecretInterface, UserInterface} from '@/scaffold/auth';
export type MapHeaders<T extends UserInterface> = (user: T) => Map<string, string>;
export interface SimpleAuthInterceptorOptions<UserType extends UserIn... |
using Niancat.Formatters
import Niancat.Formatters: format
format(::SlackFormatter, r::Correct) = "Ordet $(r.word.w) är korrekt!"
format(::SlackFormatter, r::PuzzleIs) = r.puzzle
format(::SlackFormatter, r::NoPuzzleSet) = "Det finns inget pussel än."
format(::SlackFormatter, r::Incorrect) = "Ordet $(r.word.w) finns in... |
{-# LANGUAGE GADTs #-}
module Epsalon.Internal.Query.Ast where
import Data.Text (Text)
import Data.Typeable (Typeable, cast)
import Database.PostgreSQL.Simple.ToField (ToField)
import Epsalon.Internal.Types
import Epsalon.Internal.ValueGuard
type Identifier = Text
-- | Wrapper around user-supplied parameters
data ... |
---
title: Huiwen Ren
authors:
- huiwen-ren
role: Ph.D Students
user_groups:
- Ph.D Students
---
|
using System;
using System.Collections.Generic;
namespace Projeto_WSTower.Domains
{
public partial class Jogador
{
public int Id { get; set; }
public string Nome { get; set; }
public DateTime Nascimento { get; set; }
public string Posicao { get; set; }
public int Qtdefa... |
package com.example.lemon
import org.junit.jupiter.api.Test
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.boot.test.context.SpringBootTest
import org.springframework.boot.test.context.SpringBootTest.WebEnvironment
import org.springframework.boot.test.web.client.TestRestTempl... |
UPDATE MR
SET MR.Quantity =
CASE
WHEN M.Quantity < MR.Quantity / 50 THEN MR.Quantity / 1000
WHEN M.Quantity > MR.Quantity * 50 THEN MR.Quantity * 1000
END
FROM [Notification].[MovementReceipt] AS MR
INNER JOIN [Notification].[Movement] AS M
ON M.Id = MR.MovementId
WHERE MR.Quantity IS NOT NULL
AND
(
MR.Quantit... |
# edu-chat
Writing to practice C++, learn how to use ncurses, sockets,
and potentially other libraries and languages for educational
purposes.
|
var x = Math.LN10;
Math.LN10 = 1;
{
var __result1 = Math.LN10 !== x;
var __expect1 = false;
}
|
import React from 'react';
import { makeStyles } from '@material-ui/core';
import InfiniteScroll from "react-infinite-scroll-component";
import { useHistory } from 'react-router-dom';
import { BookmarkedPosts, getPosts } from '../../graphql';
import { usePagination } from '../../hooks/usePagination';
import { Post, Po... |
/*
* Copyright 2017-2020 original 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
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agr... |
#### 1, FA2 NFT contract
address: KT1Nqrmo5815o1wUcPqSjKk4HLMVy6VDRdo8
to view storage detail:
https://better-call.dev/mainnet/KT1Nqrmo5815o1wUcPqSjKk4HLMVy6VDRdo8/operations
### 2, EXCHANGE contract
address: KT19F3JXqrUAJHLnGgTqKgjwvgmk5uFM18tb
to view storage detail:
https://better-call.dev/mainnet/... |
## TPP - Bacillus Clausii
The clustering results at the edge sparsification threshold $87$ does not
recapitulate profiling: though it contains all the selected profiles but
groups them into the $2$ largest clusters ([5[6[4][3]][19[7]]],
[5[11[4][3]][19[7]]], and [5[11[4][3]][19[7]]][138] in one and
[5[11[4][3]][56... |
/*
* ReadWriteWorkload.h
*
* This source file is part of the FoundationDB open source project
*
* Copyright 2013-2022 Apple Inc. and the FoundationDB project 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 ... |
import { FilterLike } from '@rxap/data-source/table';
import {
Injectable,
OnDestroy
} from '@angular/core';
import {
ReplaySubject,
Subscription
} from 'rxjs';
@Injectable()
export class TableFilterService implements FilterLike, OnDestroy {
public readonly change = new ReplaySubject<Record<string, any>>(1)... |
using MyMath;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using UnityEngine;
/// <summary>
/// Display a 4 dimensional mesh
/// </summary>
[RequireComponent(typeof(MeshFilter))]
[RequireComponent(typeof(MeshRenderer))]
class Displayer4D : MonoBeh... |
# firebase_functions_api
firebase_functions_api will pull and push from Cloud Firestore DB data by creating a RESTful services endpoint.
|
//
// Created by rahul on 20/8/19.
//
#include <iostream>
using namespace std;
/*namespace Testspace
{
int m;
void display(int n)
{
cout<<n;
}
}
int main()
{
using Testspace::m;
m=109;
//display(200); not ok as not use
m=10;
}
*/
namespace name1{
double x=4.56;
int m=100;... |
#!/usr/bin/env python
# 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
# "Li... |
Puppet::Type.newtype(:netapp_igroup) do
@doc = "Manage Netapp ISCSI initiator groups [Family: vserver]"
apply_to_device
ensurable
newparam(:name) do
desc "initiator group name"
isnamevar
end
newproperty(:group_type) do
desc "initiator group type"
newvalues(:fcp,:iscsi,:mixed)
end
ne... |
<?php
namespace App\Http\Controllers\Backend;
use App\Http\Controllers\Controller;
class AuthController extends Controller
{
public function __construct()
{
$this->middleware(['auth','active_user']);
}
/**
* Get authenticated user instance
*/
protected function userEmployeeAuth... |
package store.marks
import com.arkivanov.mvikotlin.core.store.Store
import com.arkivanov.mvikotlin.core.utils.JvmSerializable
import model.Cut
import model.MarkModel
import model.MarkTypeModel
import model.Shape
import store.marks.MarksStore.*
interface MarksStore : Store<Intent, State, Label> {
sealed class Inten... |
package authoring.edit_object;
import java.util.List;
import authoring.view.AuthoringView;
import conditions.Comparator;
import conditions.ComparatorManager;
import conditions.Condition;
import conditions.ConditionManager;
import gui_elements.factories.ButtonFactory;
import gui_elements.factories.ComboBoxFactory;
imp... |
# frozen_string_literal: true
class PostsController < ApplicationController
include SessionsHelper
before_action :logged_in_user, only: %i[new create]
def new
@post = current_user.posts.new
end
def create
@post = current_user.posts.build(post_params)
return unless @post.save
flash[:success... |
<?
$MESS["TASKS_REMINDER"] = "Your task reminder: you have a task \"#TASK_TITLE#\" #PATH_TO_TASK#";
?> |
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Car;
class CarController extends Controller
{
public function index(){
$car = Car::all();
return ($car);
}
public function tambah(Request $request){
$car = new Car();
$car->model = $request->mod... |
require 'spec_helper'
describe Bookmark do
it 'has a valid factory' do
create(:bookmark).should be_valid
end
it { should belong_to(:audio_recording)}
it { should belong_to(:user).with_foreign_key(:creator_id) }
it { should validate_presence_of(:audio_recording_id)}
it 'is valid without name specifi... |
python3 examples/run_dmc.py --cuda 0 --num_actor_devices 1 --training_device 0 --num_actors 8 --save_interval 30
|
// Copyright 2013 SAP AG.
//
// 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 writing... |
#!/usr/bin/env bash
# Script that pipes the current volume level
# to the /tmp/xob-volume-pipe for xob to consume
volume=$(pamixer --get-volume)
mute_status=$(pamixer --get-mute)
if [ "$mute_status" == "true" ]; then
volume="$volume!"
fi
echo "$volume" > /tmp/xob-volume-pipe
|
require "test_helper"
require "rake"
class DumpToFixtureTest < ActiveSupport::TestCase
test "it has a version number" do
assert DumpToFixture::VERSION
end
test "the rake task can be invoked" do
Rake::Task['db:dump_to_fixture'].invoke
end
test "it adds the dump_to_fixture method to ActiveRecord" do... |
# \$\$isScaleSVGTransform
- [source](./isScaleSVGTransform.index.js)
- [test](./isScaleSVGTransform.spec.js)
해당 `SVGTransform`의 `type`이 `SVGTransform.SVG_TRANSFORM_SCALE`인지 여부를 판단합니다.
```javascript
console.log($$isScaleSVGTransform($$createSVGTransformScale()()));
// true
```
```javascript
console.log($$isScaleSVGT... |
# frozen_string_literal: true
# Transform payload into CSV
class SerializeCsv
send(:include, Dry::Monads[:result, :do])
# @param [rendered_template] :rendered_template Rendered Liquid Template
# @param [template] :template Template Object
# @param [options] Additional options for serializer
# @param [Dry::S... |
package org.ibase4j.core.config;
import javax.sql.DataSource;
import org.apache.ibatis.logging.slf4j.Slf4jImpl;
import org.apache.ibatis.plugin.Interceptor;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;... |
import java.io.FileNotFoundException;
import java.io.IOError;
import java.io.IOException;
public class ExceptionTester {
int a;
public void method1() throws FileNotFoundException {
Object o;
throw new FileNotFoundException();
}
public void method2() throws IOException {
throw ... |
#!/bin/bash
set -e
hdf5=hdf5-1.8.21
if [ ! -f "${hdf5}.tar.gz" ] ; then
wget "https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.8/hdf5-1.8.21/src/${hdf5}.tar.gz"
fi
if [ -d "${hdf5}" ] ; then
rm -rf "${hdf5}"
fi
tar -xzf "${hdf5}.tar.gz"
cd "$hdf5"
curdir=`pwd`
./configure --enable-fortran --prefix="... |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Warnings
{
class TestDriver2 : ITest
{
public bool Test()
{
Console.WriteLine("This tests the calculator for basic function.");
Calculator calcu... |
---
layout: post
title: "Gimli : Certainty of Death"
excerpt: "what are we waiting for"
categories: exp56
tags: [ exp56 ]
date: 2019-04-22T08:08:50-04:00
---
Certainty of death
Small chance of success
What are we waiting for...
The quest for Mars
- Gimli : Made my day
|
<?php
namespace App\Parser\Storeland;
use App\Collection\ProductCollection;
use App\DataProvider\FilesDataProvider;
use App\Domain\Product;
use App\Parser\AbstractParser;
use App\Parser\ConverterFactory;
use League\Csv\Exception;
use RuntimeException;
/**
*
*/
class StorelandProduct extends AbstractParser
{
pr... |
<?php // session_start();
include_once 'Config.php';
include_once CLASSES . 'Util.class.php';
include_once CLASSES . 'Filter.class.php';
include_once CLASSES . 'Database.class.php';
include_once CLASSES . 'Response.class.php';
include_once CLASSES . 'PoisDataset.class.php';
include_once CLASSES . 'ResponseDatase... |
package com.lkroll.ep.compendium
import org.scalatest._
import org.scalatest.funsuite._
import org.scalatest.matchers.should._
import com.lkroll.ep.compendium.utils.OptionPickler._
import io.lemonlabs.uri.Url
class DataTestsJVM extends AnyFunSuite with Matchers {
import utils.Implicits.instance2Option;
import Cla... |
package com.iphayao.demo;
import org.junit.Test;
import static org.junit.Assert.*;
public class DemoTest {
ShapeFacade shapeFacade = new ShapeFacade();
@Test
public void testFacadeShapeFacadeCircle() {
assertEquals("Circle::draw()", shapeFacade.drawCircle());
}
@Test
public void tes... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.