text stringlengths 27 775k |
|---|
<?php namespace App\ARep\Repositories;
use App\Orcamento as Orcamento;
class OrcamentoRepository implements IOrcamentoRepository
{
function __construct()
{
}
public function index()
{
$contratos = Orcamento::with('paciente','atendimentos')->orderBy('id')->paginate(50);
return $contratos;
}
public... |
package net.catchpole.silicone.security;
public class Hash {
private byte[] salt;
private byte[] hash;
public Hash(byte[] salt, byte[] hash) {
this.salt = salt;
this.hash = hash;
}
public byte[] getSalt() {
return salt;
}
public byte[] getHash() {
return h... |
package cmd
import (
"fmt"
"github.com/spf13/cobra"
)
func newAuthCmd() *cobra.Command {
return &cobra.Command{
Use: "auth",
Short: "Manage Vespa Cloud credentials",
Long: `Manage Vespa Cloud credentials.`,
DisableAutoGenTag: true,
SilenceUsage: false,
Args:... |
<?php
class CD
{
private $title;
private $artist;
private $cover_art;
function __construct($album_name, $band_name, $image_path)
{
$this->title = $album_name;
$this->artist = $band_name;
$this->cover_art = $image_path;
}
... |
#!/usr/bin/env bats
load ${BASE_TEST_DIR}/helpers.bash
only_if_env DRIVER amazonec2
use_disposable_machine
require_env AWS_ACCESS_KEY_ID
require_env AWS_SECRET_ACCESS_KEY
@test "$DRIVER: Should Create a default host" {
run machine create -d amazonec2 $NAME
echo ${output}
[ "$status" -eq 0 ]
}
|
module Distribution.Nixpkgs.Haskell.FromCabal.Flags ( configureCabalFlags ) where
import Distribution.Package
import Distribution.PackageDescription
import Data.Version
configureCabalFlags :: PackageIdentifier -> FlagAssignment
configureCabalFlags (PackageIdentifier (PackageName name) version)
| name == "accelerate-... |
# DownloadLimiter
Shuts down the PC when a download limit is reached. Script written to limit my data usage while downloading
through my daily limited internet.
### It requires admin privileges to shutdown.
>On windows, you can invoke it from Admin Command Prompt or PowerShell. <br>
>On Linux and Mac, use sudo before... |
require 'rails_helper'
RSpec.describe Device, type: :model do
before { build(:site) }
describe "Factory" do
it "has a valid factory" do
expect(build(:device)).to be_valid
end
end
describe "Associations" do
it { should belong_to :site }
it { should have_many :device_supplies }
it { ... |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DotSquish {
internal struct Vector3 {
public float X, Y, Z;
public Vector3(float value) {
this.X = this.Y = this.Z = value;
}
public Vector3(fl... |
#include "ast.hpp"
#include <iostream>
#include <set>
#include <vector>
#include "sdl/database.hpp"
#include "sdl/table.hpp"
namespace white::davisbase::ast {
using common::NullValue;
using sdl::CellIndex;
using sdl::ColumnValueVariant;
using sdl::Database;
using sdl::TableLeafCell;
using sdl::TableLeafPage;
using... |
#!~/anaconda3/bin/python3
# ******************************************************
# Author: Pengshuai Yang
# Last modified: 2021-07-30 18:49
# Email: yps18@mails.tsinghua.edu.cn
# Filename: get_roi.py
# Description:
# save roi
# ******************************************************
import numpy as np
from PIL imp... |
package slices
import "testing"
func TestGetSlice(t *testing.T) {
got := GetSlice()
want := []int{1, 2, 3}
if len(got) != len(want) {
t.Errorf("GetSlice() returned bad length: got %d, want %d", len(got), len(want))
}
}
|
package Functions
import scala.annotation.tailrec
object Recursion {
//Ejercicio 16
def fibonacci(n:Int): Int = {
if (n == 0) 0
else if (n == 1) 1
else fibonacci(n - 1) + fibonacci(n - 2)
}
// Ejercicio 15-17
def factorial(n:Int): Int = {
@tailrec
def tail(n:Int, res:Int):Int = {
i... |
//
// SRequest.h
//
// Created by dev on 2017/8/7.
// Copyright © 2017年 . All rights reserved.
//
#import <Foundation/Foundation.h>
#import "SError.h"
@interface SRequest : NSObject
typedef NS_ENUM(NSUInteger, SHttpMethod)
{
SHttpMethodGet,
SHttpMethodPost
};
typedef void (^OnRequestSuccess)(SRequest *re... |
<?php
namespace App\Form;
use App\Validator;
use Laminas\Form\Element\Csrf;
use Laminas\Form\Form as LaminasForm;
use Laminas\Form\FormInterface;
use Laminas\InputFilter\Input;
use Laminas\InputFilter\InputFilter;
/**
* Class AbstractForm
* @package App\Form
*/
abstract class AbstractForm extends LaminasForm
{
... |
---
title: '#CumExFiles'
external_url: https://cumex-files.com
teaser: Making a big cross-border investigation technically happen
ordering: 90
---
## A CROSS-BORDER INVESTIGATION
*How Europe's taxpayers have been swindled of €55 billion*
The vast so-called cum ex tax scandal which has rocked Germany in the past
deca... |
using System;
using System.Collections.Generic;
using CoreGraphics;
using UIKit;
using AnimatedButtons;
namespace LiquidFloatingActionButtonSample
{
partial class ViewController : UIViewController
{
public ViewController()
{
}
public ViewController(IntPtr handle)
:... |
CREATE TABLE `spacesuit_work_data`
(
`Spacesuit` varchar(18) NOT NULL,
`SpacesuitWorkItem` varchar(10) NOT NULL,
`Worker` varchar(20) DEFAULT NULL,
`WorkerName` varchar(40) DEFAULT NULL,
`Astronaut` ... |
package slf4jansi;
import org.slf4j.helpers.SubstituteLogger;
public class StringLogger extends SubstituteLogger {
private final StringBuilder contents = new StringBuilder();
public StringLogger() {
super("TEST", null, true);
}
@Override
public void info(String msg) {
contents.a... |
/*
Copyright © 2021 Dell Inc. or its subsidiaries. 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... |
#!/bin/sh
#
# Open a new terminal emulator tab in the current working directory.
#
# Usage:
# ./terminal-tab.sh [-t terminal_emulator] [-w window_name] [-k keystroke]
#
# Requires xdotool:
# http://www.semicomplete.com/projects/xdotool/
#
# Copyright 2015, Sebastian Tschan
# https://blueimp.net
#
# Licensed under the ... |
package br.com.zup.edu.chavepix.remove
import br.com.zup.edu.config.validacao.ValidUUID
import io.micronaut.core.annotation.Introspected
import io.micronaut.validation.Validated
import javax.validation.constraints.NotBlank
@Validated
@Introspected
class RemoveChavePix(
@field:ValidUUID @field:NotBlank val pixId: ... |
require 'reek/source'
module Reek
module CLI
#
# CLI Input utility
#
module Input
def sources
if no_source_files_given?
if input_was_piped?
source_from_pipe
else
working_directory_as_source
end
else
sources_from_arg... |
package com.slowhand.monaka.thread;
import android.os.Handler;
import android.os.HandlerThread;
import android.util.Log;
/**
* 処理スレッド基底クラス
*
* @author slowhand0309
*/
public abstract class MoBaseWorkerThread extends HandlerThread {
private static final String TAG = MoBaseWorkerThread.class.getSimpleName();
... |
# frozen_string_literal: true
module RuboCop
module Cop
module Layout
# This cop checks if method calls are chained onto single line blocks. It considers that a
# line break before the dot improves the readability of the code.
#
# @example
# # bad
# example.select { |item|... |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
import unittest
from infi.clickhouse_orm.models import BufferModel
from infi.clickhouse_orm.engines import *
from .base_test_with_data import *
class BufferTestCase(TestCaseWithData):
def _insert_and_check_buffer(self, data, count):
self.da... |
export const utils = {
sha256: async (message: Uint8Array): Promise<Uint8Array> => {
if (typeof window == "object" && "crypto" in window) {
const buffer = await window.crypto.subtle.digest(
"SHA-256",
message.buffer
);
return new Uint8Array(buffer);
} else if (typeof process === "object" && "node"... |
import { initialStateType, UserType, NoteType} from "../types";
function mainReduser(state: initialStateType, action: { type: string, payload?: {user?: UserType | {},
notes?: Array<NoteType> | [];
} }) {
switch (action.type) {
case "ADD_USER":
return { ...state, user: action.payload };
default:
r... |
package io.jstack.sendcloud4j.mail;
import org.junit.Test;
import static org.junit.Assert.assertEquals;
public class SubstitutionTest {
String varName = "name";
String varAge = "age";
@Test
public void testSingleSub() {
Substitution.Sub sub = Substitution.sub()
.set(varName,... |
#!/bin/bash
# General trainning configurations
NICS=eth0
PADDLE_INIT_PORT=7164
PADDLE_INIT_PORTS_NUM=1
PADDLE_INIT_PORTS_NUM_FOR_SPARSE=1
PADDLE_INIT_PSERVERS=$(cat machines | sed -e ':a' -e 'N' -e '$!ba' -e 's/\n/,/g')
PADDLE_INIT_USE_GPU=False
PADDLE_INIT_NUM_GRADIENT_SERVERS=${OMPI_COMM_WORLD_SIZE}
PADDLE_INIT_TRA... |
# Three.js 知识
> JavaScript 3D library
## 基础篇
- [Three.js 系列学习之基础篇](./javascript/threejs/base/) |
// Package staticdata defines a static data client for Data Dragons.
//
// Static data is not rate limited.
package staticdata
import (
"context"
"encoding/json"
"fmt"
"io/ioutil"
"net/http"
"github.com/yuhanfang/riot/constants/language"
"github.com/yuhanfang/riot/external"
)
// Client requests static data fr... |
import React from 'react';
import { shape, string } from 'prop-types';
import { FormattedMessage } from 'react-intl';
import css from './ListingPage.css';
const SectionTeachingHour = props => {
const { publicData } = props;
const teachingHour = publicData.teachingHour;
return (
<div className={css.section... |
package io.kanro.idea.plugin.protobuf.lang.psi
import com.intellij.openapi.util.TextRange
import com.intellij.psi.PsiElement
import com.intellij.psi.util.PsiElementFilter
import com.intellij.psi.util.elementType
import com.intellij.psi.util.parentOfType
import io.kanro.idea.plugin.protobuf.lang.psi.primitive.ProtobufE... |
#!/bin/bash
#
# The script was used to move the CL applications from one directory with a long
# monolite CMake file to their individual directories. This allows finer control
# of their dependencies and it looks cleaner.
#
for app in niftkAdd \
niftkAddBorderToImage\
niftkAffine\
niftkAnonymiseDICOMMammo... |
package leetcode_201_250;
import java.util.HashMap;
/**
* leetcode_201_250
* 给定两个字符串 s 和 t ,编写一个函数来判断 t 是否是 s 的一个字母异位词。
* 说明:
* 你可以假设字符串只包含小写字母。
* 进阶:
* 如果输入字符串包含 unicode 字符怎么办?你能否调整你的解法来应对这种情况?
*
* 算法1,开辟两个26大小的数组来存计数
* 算法2,两个hashmap
*
* @author xin
* @date 2019-02-28
*/
public class ValidAnagram_242 {
... |
use std::collections::HashMap;
use query_core::Deprecation;
use serde::{Deserialize, Serialize};
#[derive(Debug, Serialize, Deserialize, Default)]
#[serde(rename_all = "camelCase")]
pub struct DmmfSchema {
pub input_object_types: HashMap<String, Vec<DmmfInputType>>,
pub output_object_types: HashMap<String, Ve... |
const NUMBER = 8
window.addEventListener('scroll', callVideos);
function callVideos() {
// var http = new XMLHttpRequest();
// http.open('get','http://mytube.local:8080/callVideo/3')
// http.onload = function(videos){
// videos = JSON.parse(http.response)
// for (var i = 0; i < videos.length; i++) {
/... |
## New Oppurtunity for Flash and OSC integration
::: {.content}
The next rev. of Flash supports [binary
sockets](http://livedocs.macromedia.com/labs/1/flex/langref/flash/net/Socket.html)
. Could a flash developer please implement OSC in ActionScript 3.0 using
the socket interface for UDP and TCP transport.
Since Acti... |
module Ferrara
class HuluFinder
def initialize
@endpoint = "http://www.hulu.com/sapi_us/search/video"
@link = "http://www.hulu.com/watch/"
end
def fetch(show, season, episode)
query = "?query=" + build_query(show, season, episode)
url = @endpoint + query
response = HTTParty... |
package io.gige;
import java.util.Set;
import javax.annotation.processing.AbstractProcessor;
import javax.annotation.processing.RoundEnvironment;
import javax.annotation.processing.SupportedAnnotationTypes;
import javax.lang.model.SourceVersion;
import javax.lang.model.element.TypeElement;
import javax.tools... |
class Invitation < ActiveRecord::Base
before_validation(:on => :create) {generate_token}
after_save :send_invitation
validates :invitee, :presence => true
validates :email,
:presence => true,
:format => {:with => /^([\w\.%\+\-]+)@([\w\-]+\.)+([\w]{2,})$/i},
:not_participant => true,
:uniqueness... |
import 'package:flutter/material.dart';
//task() async {
// try{
// String id = await login();
// String userInfo = await getUserInfo();
// await saveUserInfo(userInfo);
// } catch(e){
// //错误处理
// }
//}
//await必须用在async函数中,Future函数的返回值都是Future类型,使用链式函数进行调用,then方法防治进入回调地狱
class TestModel extends Statef... |
use crate::{response::Ignore, Client, Error};
pub async fn purge(client: &Client, titles: &[&str], recursive: bool) -> Result<(), Error> {
for chunk in titles.chunks(50) {
client
.post::<Ignore>(&[
("action", "purge"),
("forcelinkupdate", "true"),
... |
import React, { useState } from "react";
import { HashRouter as Router, Switch, Route } from "react-router-dom";
import { Main } from "@aragon/ui";
import { updateModalMode } from "./utils/web3";
import { storePreference, getPreference } from "./utils/storage";
import NavBar from "./components/NavBar";
import HomePage... |
#
# Copyright (C) 2012 Instructure, Inc.
#
# This file is part of Canvas.
#
# Canvas is free software: you can redistribute it and/or modify it under
# the terms of the GNU Affero General Public License as published by the Free
# Software Foundation, version 3 of the License.
#
# Canvas is distributed in the hope that ... |
subroutine invert_anneal_psc()
use annealing, only: anneal
use fltinv, only: fault, &
max_iteration, &
reset_iteration, &
temp_start, &
temp_minimum, &
cooling_factor, &
fault_slip
implicit none
! Interface t... |
#!/bin/bash
# Run integration tests against deployed app
# Will test local dev by default, but pass command line arg
# "stage" or "production" to test remote systems
cd "$(dirname "$0")/.."
source ./bin/lib/strict_mode.sh
case "$1" in
stage)
pro=stage.peterlyons.com
pers=stage.peterlyons.org
;;
produ... |
package me.quenchjian.presentation.tasks.model
import androidx.annotation.MainThread
import androidx.annotation.WorkerThread
import kotlinx.coroutines.launch
import kotlinx.coroutines.withContext
import me.quenchjian.concurrent.Schedulers
import me.quenchjian.data.TaskRepository
import me.quenchjian.model.Task
import ... |
package com.crscd.cds.spring.netcomm.converter;
import javax.annotation.Nullable;
/**
* @author zhaole
* @date 2022-05-01
*/
public interface MessageConverter {
@Nullable
Object fromMessage(byte[] data, Class<?> targetClass)
throws InstantiationException, IllegalAccessException;
@Nullable
... |
#!/bin/sh
# rm pid.*.txt
pid=$$
fname="pid.$pid.txt"
echo $pid > $fname
url=$1
counter=0
status_code=404
max_retry=50
# status_code=$(curl -s -o /dev/null -w "%{http_code}" $url)
status_code="0"
is_fail=0
sleep_time=30
echo "Checking status of : $url"
until [[ "$status_code" -eq "200" ]]; do
# ((counter=$counter+1)... |
import javax.swing.{SwingUtilities, UIManager}
import javax.swing.text.PlainDocument
import javax.swing.undo.UndoManager
import gui._
import de.sciss.syntaxpane.DefaultSyntaxKit
import global.{GlobalConst, GlobalVars}
import javax.swing.event.{CaretEvent, CaretListener, DocumentEvent, DocumentListener}
import pa... |
using System;
using System.IO;
namespace FastFitParser.Core
{
// Fast 64 bit 8x256 lookup table for CRC16 algorithm
// Inspiration/credit to Matt Stancliff, author of CRC speed: https://matt.sh/redis-crcspeed
// This implementation is for the CRC16 variant of the CRC algorithm
public static class Crc1... |
using System.Globalization;
using System.Threading;
using System.Threading.Tasks;
using System.Web.Http.ExceptionHandling;
using JustEat.StatsD;
namespace JE.ApiExceptions.WebApi.StatsD
{
public class StatsDExceptionLogger : ExceptionLogger
{
private readonly IStatsDPublisher _stats;
public S... |
import { Component, OnInit } from '@angular/core';
import { combineLatest, Observable } from 'rxjs';
import { map } from 'rxjs/operators';
import { ILanguage, LanguageStatus } from '@ng-scrappy/models';
import { ActiveLangService } from '../../services/active-lang.service';
import { DbService } from '../../services/d... |
package com.liquidlabs.syslog4vscape.handler;
import org.junit.Test;
import org.productivity.java.syslog4j.util.SyslogUtility;
import static org.junit.Assert.*;
/**
* Created by neil on 04/08/2015.
*/
public class MultiplexerHandlerTest {
@Test
public void testGetFacility() throws Exception {
byte... |
package com.java110.store.listener.smallWeChat;
import com.alibaba.fastjson.JSONObject;
import com.java110.core.event.service.AbstractBusinessServiceDataFlowListener;
import com.java110.entity.center.Business;
import com.java110.store.dao.ISmallWechatAttrServiceDao;
import com.java110.utils.constant.ResponseConstant;
... |
package com.nohex.aoc.day13
import io.kotest.core.spec.style.ShouldSpec
import io.kotest.matchers.shouldBe
internal class FoldingMapTest : ShouldSpec({
context("The example puzzle input") {
val mapData = MapData(getInput("example.txt"))
val sut = FoldingMap(mapData.dots)
val instructionIte... |
Function Get-MyAlias {
[cmdletbinding()]
[alias("gma")]
[OutputType([System.Management.Automation.AliasInfo])]
Param(
[Parameter(HelpMessage = "Only show aliases that DO NOT belong to a module.")]
[switch]$NoModule
)
Begin {
Write-Verbose "[$((Get-Date).TimeofDay) BEGIN ... |
import React, { PureComponent } from 'react';
import styles from '../styles';
export default class PickerItem extends PureComponent {
props: {
text?: string,
img?: any,
value: any,
onClick: (value: any) => void,
propagateEvent: boolean,
};
onClick = (e: SyntheticEv... |
package no.nav.helse.fritakagp.integration.brreg
import io.ktor.client.*
import io.ktor.client.features.*
import io.ktor.client.request.*
interface BrregClient {
suspend fun getVirksomhetsNavn(orgnr: String): String?
suspend fun erVirksomhet(orgNr: String): Boolean
}
class MockBrregClient : BrregClient {
... |
---
path: 'https://spring.io/blog/2020/02/19/announcing-spring-cloud-stream-horsham-sr2-3-0-2-release-and-spring-cloud-hoxton-sr2'
title: 'Spring Cloud Stream 3.0.2 Released'
date: '02-19-2020'
category: 'release'
image: './thumbs/default-cloud.png'
description: 'This release contains several fixes and enhancements pri... |
/*
* Copyright 2019 The Android Open Source Project
*
* 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 applicab... |
<?php
namespace BoutiqueBundle\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundationn\Request;
class ProduitController extends Controller
{
/**
* @Route("/", name="accueil")
* Page qui affic... |
using FluentAssertions;
using Xunit;
namespace Kros.AspNetCore.Tests
{
public class HelpersShould
{
#region Test classes
class TestOptions
{}
class TestClass
{ }
#endregion
[Fact]
public void GetSectionName()
{
Helpers.Get... |
/* globals require module */
const modelRegistrator = require('./utils/model-registrator');
module.exports = modelRegistrator.register('Product', {
title: {
type: String,
required: true
},
price: Number,
quantity: String,
description: String,
category: {
type: String,
... |
/**
*
*/
package com.kuehne.nagel.app.helpers;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.env.Environment;
import org.springframework.stereotype.Component;
@Component
public class ContanctServiceHelper {
@Autowired
Environment lEnvironment;
}
|
const INITIAL_STATE = {
usuarioName: "",
usuarioLogado: 0,
};
function usuarioReducer(state = INITIAL_STATE, action) {
switch (action.type) {
case "LOG_IN":
return {
...state,
usuarioLogado: 1,
usuarioName: action.usuarioName,
};
case "LOG_OUT":
return {
... |
import { test, moduleForModel } from 'ember-qunit';
import Ember from 'ember';
moduleForModel('gogovan_order', 'GogovanOrder Model', {
needs: ['model:delivery', 'service:i18n']
});
test('check attributes', function(assert){
assert.expect(26);
var model = this.subject();
var name = Object.keys(model.toJSON()).... |
package com.whirly
import com.ggstar.util.ip.IpHelper
object IpHelperTest {
def main(args: Array[String]): Unit = {
println(IpHelper.findRegionByIp("10.100.0.1"))
println(IpHelper.findRegionByIp("183.240.130.23"))
println(IpHelper.findRegionByIp("119.130.229.90"))
println(IpHelper.findRegionByIp("11... |
SET NOCOUNT, ARITHABORT, XACT_ABORT ON;
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
DECLARE @MinPendingTasksForAlert INT;
DECLARE @MinCreatedWorkersPercent INT;
SET @MinPendingTasksForAlert = 25;
SET @MinCreatedWorkersPercent = 85;
DECLARE @results AS TABLE
(
id INT IDENTITY(1,1) NOT NULL PRIMARY KEY CLUSTERED... |
#!/bin/bash
#$ -N TOOL
#$ -cwd
#$ -pe threaded 8
#$ -l h_rt=1:0:0
VCF=/path/to/file.vcf.gz
. /hpc/pmc_vanboxtel/tools/TOOL/venv_3.6/bin/activate
python /home/pmc_research/mroosmalen/pmc_vanboxtel/tools/TOOL/tool.py \
-i $VCF \
-b /path/to/*.bam \
-t 8 \
-bl /hpc/pmc_vanboxtel/data/Mutation_blacklists/MSC_healthyBM_... |
// AboutPage:
// ___________________________________________________________________
import React from 'react'
import { GatsbyImage } from 'gatsby-plugin-image'
// Theme + Styles
import theme from '../../gatsby-plugin-theme-ui'
import * as S from './styles.scss'
import { Box, Flex, Grid, Heading, Text, useColorMode ... |
package com.morro.mall.coupon.dao;
import com.morro.mall.coupon.entity.CouponSpuRelationEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
/**
* 优惠券与产品关联
*
* @author zheng
* @email morrowind0422@gmail.com
* @date 2021-05-04 13:36:48
*/
@Mapper
public in... |
import 'dart:math' as math;
import 'common.dart';
void main(List<String> arguments) {
Day07().solve();
}
class Day07 extends AdventOfCodeDay<List<int>> {
const Day07([String? inputFileName]) : super(7, inputFileName);
@override
List<int> parseInput(Input input) {
return input.rawInput.split(',').map((e)... |
<?php
/**
* Template part for displaying page header.
*
* @package Sinatra
* @author Sinatra Team <hello@sinatrawp.com>
* @since 1.0.0
*/
?>
<div <?php sinatra_page_header_classes(); ?><?php sinatra_page_header_atts(); ?>>
<div class="si-container">
<?php do_action( 'sinatra_page_header_start' ); ?>
<?p... |
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Archive.Contracts;
using Archive.Service.Services;
namespace Archive.Service.Controllers
{
[Route("api/[controller]")]
[ApiController]
public class AuthController : ControllerBase
{
private readonly TokenService _tokenService;
pu... |
import React, { Component } from "react";
import styled from "styled-components";
import { getProjects } from "./helper";
import ProjectCard from "./project-card";
const Wrapper = styled.div`
display: flex;
flex: 1;
flex-direction: column;
padding-left: 100px;
padding-right: 100px;
margin-top: 100px;
`;
const ... |
package com.github.ruediste.rise.nonReloadable.front.reload;
import java.io.IOException;
import java.nio.file.FileSystems;
import java.nio.file.FileVisitResult;
import java.nio.file.FileVisitor;
import java.nio.file.Files;
import java.nio.file.LinkOption;
import java.nio.file.Path;
import java.nio.file.StandardWatchEv... |
module Main where
import Text.Regex.TDFA ((=~))
parse :: String -> (Integer, Integer, Char, String)
parse s = cast matches
where
cast [min, max, chr, pass] = (read min :: Integer, read max :: Integer, head chr, pass)
matches = submatches (s =~ "(.+)-(.+) (.): (.*)" :: (String, String, String, [String]))
... |
cask "fmcsadmin" do
version "1.3.0"
sha256 "597baa7e90c4e54cac6127ef795c283b759a87e3b12b72c071a9a5c325fe1b4b"
url "https://github.com/emic/fmcsadmin/releases/download/#{version}/fmcsadmin-#{version}-macos-universal.dmg"
name "fmcsadmin"
desc "The 'fmcsadmin' is the command-line tool to administrate FileMake... |
use crate::{Error, Solver, ComputeDescriptor};
use crate::fdtd::{TransmissionLine, VSource, Terminator};
/// Describes the composition of a `StandardSolver`.
pub struct FdtdSolverDescriptor<L: TransmissionLine> {
pub tline: L,
pub source: Box<dyn VSource>,
pub terminator: Box<dyn Terminator>,
}
/// Does s... |
# PHPSocket.io
[](https://travis-ci.org/RickySu/phpsocket.io)
socket.io php server side alternative.
## Install
The recommended way to install phpsocket.io is [through composer](http://getcomposer.org).
```JSON
{
"require": {
... |
import Command from '../../base/classes/Command';
import { Client, Message, TextChannel } from "discord.js";
export default class extends Command {
constructor () {
super({
name: 'clean',
description: 'Deletes up to 100 messages from chat',
usage: ['<Limit:Number> <?User:ID>'],
category: ... |
package extensions
import org.gradle.api.provider.Property
interface VersionInfo {
val version: Property<String>
}
|
#!/usr/bin/env bash
##
## Copyright (c) 2014, Facebook, Inc.
## All rights reserved.
##
## This source code is licensed under the University of Illinois/NCSA Open
## Source License found in the LICENSE file in the root directory of this
## source tree. An additional grant of patent rights can be found in the
## PATENTS... |
package EPUB3::Builder::Navi;
use strict;
use warnings;
use Smart::Args;
use Class::Accessor::Lite rw => [qw/ page_title toc_title navi_list /];
sub new {
args(
my $class => 'ClassName',
my $page_title => { isa => 'Str', default => 'Navigation' },
my $toc_title => { isa => 'Str', default =... |
# frozen_string_literal: true
describe 'Group show page', type: :feature do
let(:current_user) { create :user }
let(:group) { create :group, users: [current_user] }
before do
login_as current_user
visit group_path(group)
end
it { expect(page).to have_content group.name }
end
|
CREATE OR REPLACE VIEW incoming.raw_entry_calendar AS
SELECT
json_array_elements((doc#>'{events}')::json) AS element,
doc->>'timezone' AS timezone,
id,
doc->>'name' AS name
FROM
api.snapshot
WHERE
doc->>'apptype' = 'Calendar'
AND doc->>'category' = 'Timesheet'
;
CREATE OR REPLACE VIEW incoming.entry_... |
package main
import (
"fmt"
"github.com/flosch/pongo2"
"net/http"
"encoding/json"
)
type Moduler interface {
Init(env *Env)
}
type SysModule struct {
name string
env *Env
}
func (self *SysModule) Init(env *Env) {
self.env = env
}
func (self *SysModule) super(moduleName string, env *Env) {
self.name = modu... |
package stackoverflow
import org.apache.spark.SparkConf
import org.apache.spark.SparkContext
import org.apache.spark.SparkContext._
import org.apache.spark.rdd.RDD
import org.junit._
import org.junit.Assert.assertEquals
import java.io.File
object StackOverflowSuite {
val conf: SparkConf = new SparkConf().setMaster(... |
module SolidusMultiDomainEnhancements
module OrderAttributes
extend ActiveSupport::Concern
def generate_order_number(options = {})
options[:length] ||= Spree::Order::ORDER_NUMBER_LENGTH
options[:letters] ||= Spree::Order::ORDER_NUMBER_LETTERS
options[:prefix] ||= order_prefix
possi... |
#!/bin/bash
function send() {
local msg=$(cat <<MSG
{
temperature: $1
}
MSG
)
mosquitto_pub -h $MQTT -t "/device/sample/attrs" -m "$msg"
}
i=0
while true ; do
send i
i=$((i + 1))
sleep 1
done
|
import "compiler.dart";
class CompilerX86 extends Compiler {
CompilerX86() {
print( "\n\nInitialize X86 Compiler\n");
}
@override
String preprocess(String code) {
String output = "void main() { cout << 2147483647 << endl; }";
print( "X86 preprocesor generated '$output'");
return output;
}
@ov... |
import pygeostat as gs
import numpy as np
# load some data
gs.qq_plot(np.random.randn(1000),np.random.randn(1000)) |
/**
* Copyright 2020 Phenix Real Time Solutions, Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unle... |
module GMAT
using Pkg.Artifacts
using GMAT_jll
export run_script
include("startup_file.jl")
"""
run_script(script;
data=joinpath(artifact"data", "gmat-data-2020a"),
output=joinpath(pwd(), "gmat-output"),
)
Run a GMAT `script` while optionally specifying the path to the `data` package and an
`output` directo... |
#
# DO NOT MODIFY!!!!
# This file is automatically generated by Racc 1.4.11
# from Racc grammer file "".
#
require 'racc/parser.rb'
module Fc
class Parser < Racc::Parser
##### State transition tables begin ###
clist = [
'-3,80,147,145,149,146,24,31,161,29,202,158,28,27,152,203,25,147,145',
'159,146,178,30,207,148,1... |
import 'dart:ui';
import 'package:carousel_slider/carousel_slider.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:smooth_page_indicator/smooth_page_indicator.dart';
import 'package:the_movie_app/controllers/movie_controller.dart';
import 'package:the_movie_app/co... |
package react4j.dom.events;
import elemental2.dom.Event;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsType;
@JsType( isNative = true, namespace = JsPackage.GLOBAL, name = "Object" )
@SuppressWarnings( "unused" )
public class FormEvent
extends SyntheticEvent<Event>
{
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.