text stringlengths 27 775k |
|---|
# typed: strict
# frozen_string_literal: true
require "sorbet-runtime"
require_relative "struct"
module LunchMoney
extend T::Sig
class Split < T::Struct
prop :date, String
prop :category_id, Integer
prop :notes, T.nilable(String)
prop :amount, T.any(Integer, String)
end
end
|
package estimatecost
import (
"github.com/Appliscale/perun/parameters"
"github.com/Appliscale/perun/stack/stack_mocks"
"github.com/aws/aws-sdk-go/service/cloudformation"
"github.com/golang/mock/gomock"
"github.com/stretchr/testify/assert"
"io/ioutil"
"testing"
)
func TestEstimateCosts(t *testing.T) {
template... |
HTML Renderer Core
=============
HTML-Renderer ported to run on .Net Core (original project: https://github.com/ArthurHub/HTML-Renderer) |
---
layout: watch
title: TLP4 - 07/05/2020 - M20200507_074406_TLP_4T.jpg
date: 2020-05-07 07:44:06
permalink: /2020/05/07/watch/M20200507_074406_TLP_4
capture: TLP4/2020/202005/20200506/M20200507_074406_TLP_4T.jpg
---
|
package uy.kohesive.iac.model.aws.clients
import com.amazonaws.services.budgets.AbstractAWSBudgets
import com.amazonaws.services.budgets.AWSBudgets
import com.amazonaws.services.budgets.model.*
import uy.kohesive.iac.model.aws.IacContext
import uy.kohesive.iac.model.aws.proxy.makeProxy
open class BaseDeferredAWSBudge... |
// Coordinate Types
use core::{convert::TryFrom, ops::*};
#[repr(C)]
#[derive(Debug, Copy, Clone, Default, PartialEq)]
pub struct Point {
pub x: isize,
pub y: isize,
}
impl Point {
#[inline]
pub const fn new(x: isize, y: isize) -> Self {
Self { x, y }
}
#[inline]
pub const fn x(&... |
# Contributing
- If you have a suggestion, error to report, or general help to the project as a whole,
open a Issue and make it clear in the title as to what you want/ issue type etc.
- EOL Style
- Fork, branch, test, pull request is the recommended way to contribute.
- Remember to keep your fork up to date and read... |
require "bookmark_tag"
describe BookmarkTag do
describe ".create" do
it "creates a link between a bookmark and a tag" do
bookmark = Bookmark.create(url: "http://www.makersacademy.com", title: "Makers Academy")
tag = Tag.create(content: "test tag")
bookmark_tag = BookmarkTag.create(bookmark_id:... |
# poker-simulator
Attempt to write a poker simulator (for bots) in Go
I've just started developing this, so don't expect anything working.
Requires golang 1.2
## How to run
# Set your GOPATH env variable
export GOPATH=~/projects/poker-simulator
go run src/main.go
|
package orm
import (
"time"
"github.com/hashwing/log"
)
// Timer timer table
type Timer struct {
ID string `xorm:"timer_id" json:"timer_id"`
TaskID string `xorm:"task_id" json:"task_id"`
UserID string `xorm:"user_id" json:"user_id"`
Name string `xorm:"timer_name" json:"timer_name"`
S... |
// flow-typed signature: 47721ffa32ca5cd4485c526ef0833ebb
// flow-typed version: <<STUB>>/react-router-native-stack_v^0.0.11/flow_v0.73.0
/**
* This is an autogenerated libdef stub for:
*
* 'react-router-native-stack'
*
* Fill this stub out by replacing all the `any` types.
*
* Once filled out, we encourage y... |
package backend
import "imperial-splendour-launcher/backend/customErrors"
func (a *API) GoToDownloadPage() error {
a.logger.Infof("Navigating to %s", downloadPageUrl)
if err := a.browser.OpenURL(downloadPageUrl); err != nil {
a.logger.Warnf("Could not open website: %v", err)
return customErrors.Website
}
ret... |
mod graph;
mod tasks;
mod test;
mod unstable_features;
mod worker;
use crate::config::Config;
use crate::crates::Crate;
use crate::experiments::{Experiment, Mode};
use crate::prelude::*;
use crate::results::{TestResult, WriteResults};
use crate::runner::graph::build_graph;
use crate::runner::worker::{DiskSpaceWatcher,... |
<?php
namespace App\Http\Controllers;
use App\Models\category;
use Illuminate\Http\Request;
use Illuminate\Http\Response;
use Illuminate\Support\Carbon;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\DB;
use Illuminate\Database\Eloquent\SoftDeletes;
class CategoryController extends Controller... |
/*
* Copyright 2021 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
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applica... |
export enum QLogon {
LOG_ON_SERVICE_USER = 'LOG_ON_SERVICE_USER',
LOG_ON_CURRENT_USER = 'LOG_ON_CURRENT_USER'
} |
%% @author Maas-Maarten Zeeman <mmzeeman@xs4all.nl>
%% @copyright 2014 Maas-Maarten Zeeman
%%
%% @doc exometer_rrets, a rrets based persistency layer for exometer.
%%
%% Copyright 2014 Maas-Maarten Zeeman
%%
%% Licensed under the Apache License, Version 2.0 (the "License");
%% you may not use this file except in compli... |
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class about extends CI_Controller {
public function __construct()
{
parent :: __construct();
$this->load->model('admin/master_model');
}
function index($menuid)
{
$user_id = $this->session->userdata('UserID');
$c... |
namespace OpenCvSharp
{
#if LANG_JP
/// <summary>
/// cvHoughLines2で用いる、ハフ変換(直線検出)の種類
/// </summary>
#else
/// <summary>
/// The Hough transform variant
/// </summary>
#endif
public enum HoughLinesMethod : int
{
#if LANG_JP
/// <summary>
/// 標準的ハフ変換.
/// 全ての線分は2つの浮動小数点値 (ρ, θ)で表される.... |
#!/bin/bash
HOSTS=(master1 master2 master3 infra1 infra2 infra3 app1 app2 app3 app4 app5 stor1 stor2 stor3 stor4)
for host in ${HOSTS[*]}
do
echo $host
ssh -o StrictHostKeyChecking=no $host "ls"
done
|
#import ssd1306
from hcsr04 import HCSR04
from umqttsimple import MQTTClient
from machine import Pin,PWM
import time
import ubinascii
import machine
import micropython
import network
import esp
import gc
from config import *
esp.osdebug(None)
gc.collect()
mqtt_server = '192.168.17.5'
topic_sub = b'... |
<?php $__env->startComponent('mail::message'); ?>
# Introduction
Hi Users! This is the response message.
Please don't reply.
Thanks,
<?php echo e(config('app.name')); ?>
<?php echo $__env->renderComponent(); ?>
<?php /**PATH /var/www/html/uLaravel/Thewayshop/resources/views/emails/welcome.blade.p... |
<?php
namespace App\Console\Commands;
use App\Repositories\WeatherRepositoryInterface;
use Illuminate\Console\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
class AddWeatherCommand extends Command
{
private $weatherRepository;
public funct... |
package main
import (
"github.com/thaniri/folrep/controller"
"net/http"
"time"
)
func main() {
controller := controller.New()
webApp := &http.Server{
Addr: "0.0.0.0:8080",
Handler: controller,
WriteTimeout: 15 * time.Second,
ReadTimeout: 15 * time.Second,
IdleTimeout: 60 * time.Second,
... |
/**
* Define the steps in the sample.
*
* @author Shin Feng
* @date 2018.2.27
* @version 1.0.0
*
*/
const { Given, When, Then } = require('cucumber');
Given(/^a request data: (.*) for (.*) interface$/, function(data, api) {
this.setApi(api);
this.setData(data);
});
Given(/^a request data from "(.*)" for (... |
#pragma once
#include <stdio.h>
#include <tchar.h>
#include <stdlib.h>
#include <string.h>
#include <vector>
#include <set>
#include <deque>
#include <map>
#include <string>
#include <algorithm>
#include <functional>
#include <mutex>
#include <atomic>
#include "..\recompiler_core\build.h"
// Widgets
#define WXUSINGD... |
using System;
using System.Collections.Generic;
using Devdog.General.ThirdParty.UniLinq;
using System.Text;
namespace Devdog.General.UI
{
public interface IUIWindowInputHandler
{
}
}
|
<?php
declare(strict_types=1);
namespace Tulia\Cms\Content\Type\Infrastructure\Framework\Form\Service;
use Tulia\Cms\Content\Type\Domain\WriteModel\Service\Configuration;
use Tulia\Cms\Content\Type\Infrastructure\Framework\Form\ContentTypeFormDescriptor;
use Tulia\Component\Templating\View;
/**
* @author Adam Bana... |
# Automatically logout after 30 minutes idle at command prompt (unless in X).
if [ -z "$DISPLAY" ]; then
TMOUT=1800
readonly TMOUT
export TMOUT
fi
|
class Symbol
# Returns the Symbol as a lowerCamelCase String.
def to_soap_key
to_s.to_soap_key.lower_camelcase
end
end |
# natapp
python tornado mongodb 可缓存版-内网转外网访问工具
# 使用方式
1. conf.txt 为配置文件
port为对外开放端口
url_base 为部署到外网的访问地址,供内网服务请求和转发数据
url_target 为内网转发访问的原网址. 格式为http[s]://[IP]:[Port]/
2. 默认mongodb 数据库
2. 外网访问启动service.py
3. 内网启动consumer.py
4. 程序默认包含了一个半自动化的爬虫效果.有兴趣可以交流交流
|
#include <stdio.h>
#include <stdlib.h>
int main (){
size_t maxSeq(int * array, size_t n);
int array1[]={1,2,3};
int array2[]={1};
int array4[]={0};
int array5[]={};
int array6[]={-1,-2,-3};
int array7[]={4294967293,4294967294,4294967295};
int array8[]={-2,-1,0,1,2};
int array9[]={1,2,2,3,4,5};
int array10[]={42949... |
<?php
namespace App\Controllers;
use Bright\Controller\Controller;
use Bright\View\View;
/**
* Home controller
*/
class Home
{
public function index()
{
View::renderTemplate('index.php', [
'name' => 'Bright Framework',
'author' => 'Asyraf Hussin'
]);
}
public fun... |
from django.shortcuts import render, get_object_or_404
from .models import Kategor, Tovar, Tovar_inphoto, Tovar_img
from django.views.generic.edit import FormView
from django.contrib.auth.forms import UserCreationForm
from django.http import JsonResponse
from django.utils.http import is_safe_url
from django.contrib.aut... |
# -*-perl-*- hey - emacs - this is a perl file
# src/tools/msvc/pgflex.pl
# silence flex bleatings about file path style
$ENV{CYGWIN} = 'nodosfilewarning';
use strict;
use File::Basename;
# assume we are in the postgres source root
require 'src/tools/msvc/buildenv.pl' if -e 'src/tools/msvc/buildenv.pl';
system('f... |
/** \file
* Implementation for \ref include/cqasm-v1-parse-helper.hpp "cqasm-v1-parse-helper.hpp".
*/
#include "cqasm-v1-parse-helper.hpp"
#include "cqasm-v1-parser.hpp"
#include "cqasm-v1-lexer.hpp"
namespace cqasm {
namespace v1 {
namespace parser {
/**
* Parse the given file.
*/
ParseResult parse_file(const s... |
@extends('layout.master')
@section('title')
Home: Schedule
@stop
@include('layout.navi')
@section('content')
<br>
<a href="{{ route('schedule.create') }}" class="button">Create New Schedule</a>
<a href="{{ route('venue.index')}}" class="button">View Venues</a>
<br><br>
<table cellpadding="0" cellspacing="0" bor... |
#include <stdio.h>
#include <stdlib.h>
struct CircularQueue {
int head;
int tail;
int *data;
int capacity;
int size;
};
typedef struct CircularQueue Queue;
struct MaybeInt {
int isJust;
int val;
};
Queue initialiseQueue() {
int capacity = 1;
int *d = (int *) malloc(capacity * sizeof(int));
retu... |
// Java program to find celebrity using
// stack data structure
import java.util.Stack;
class pg2
{
// Person with 2 is celebrity
static int MATRIX[][] = { { 0, 0, 1, 0 },
{ 0, 0, 1, 0 },
{ 0, 0, 0, 0 },
{ 0, 0, ... |
DROP DATABASE IF EXISTS ebid;
CREATE DATABASE ebid;
USE ebid;
CREATE TABLE products (
id int NOT NULL AUTO_INCREMENT,
item VARCHAR(255) NOT NULL,
min_cost FLOAT NOT NULL,
curr_bid FLOAT NOT NULL,
ends_in int NOT NULL,
image VARCHAR(255) NOT NULL,
PRIMARY KEY (id)
);
|
# frozen_string_literal: true
require 'rails_helper'
RSpec.describe Course::Announcement do
let!(:instance) { create(:instance) }
with_tenant(:instance) do
subject { Ability.new(user) }
let(:course) { create(:course) }
let!(:not_started_announcement) { create(:course_announcement, :not_started, course:... |
const controllers = require('./controllers');
const mid = require('./middleware');
const router = (app) => {
app.get('/getToken', mid.requiresSecure, controllers.Account.getToken);
app.get('/getPosts', mid.requiresSecure, controllers.Post.getPosts);
app.get('/getAllPosts', mid.requiresSecure, controllers.Post.ge... |
/*
Copyright 2012 Twitter, 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 writing, software
distr... |
import unittest
import tempfile
import os
import sys
import hashlib
sys.path.insert(0, '..')
import rpTool
#WARNING: Need to copy a version of rpSBML locally
import rpSBML
#WARNING: Also need to copy cache and cache/cid_strc.pickle.gz
import rpCache
class TestRPextractsink(unittest.TestCase):
@classmethod
d... |
#!/usr/bin/python
"""
A simple piece of python code that could convert the Brat annotation
tool format into Event Mention Detection format for easy evaluation. For
detailed features and usage please refer to the README file.
Author: Zhengzhong Liu ( liu@cs.cmu.edu )
"""
import argparse
import logging
import s... |
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { MatCardTitle, MatCardContent ,MatCard } from '@angular/material';
import {FormBuilder, FormGroup, Validators ,ReactiveFormsModule,FormsModule} from '@angular/forms';
import { Router, RouterModule } from '@angular/router';
import { Route... |
package types
import (
"testing"
)
func TestCoins(t *testing.T) {
coins := Coins{
Coin{"GAS", 1},
Coin{"MINERAL", 1},
Coin{"TREE", 1},
}
if !coins.IsValid() {
t.Fatal("Coins are valid")
}
if !coins.IsPositive() {
t.Fatalf("Expected coins to be positive: %v", coins)
}
negCoins := coins.Negative()
... |
use strict;
use warnings;
use utf8;
use Test::More;
use Kossy;
subtest 'JSON' => sub {
is_deeply make_request('application/json', '{"hoge":"fuga"}')->parameters()->as_hashref_multi, {
hoge => ['fuga'],
};
};
subtest 'UrlEncoded' => sub {
is_deeply make_request('application/x-www-form-urlencoded',... |
export const isNotEmpty = (
input: String,
message: string = 'Required',
): string | undefined => (!input ? message : undefined)
export const returnFilter = (
oldMap: {[key: number]: string},
selectedIdentifier: number,
selectedValue: string,
): {[key: number]: string} => {
let filterMap = {
...oldMap,... |
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using DevFramework.Core.Infrastructure.Domain;
namespace DevFramework.Domain.Model
{
public class Request : BaseEntityWithTypeId<long>
{
public int UserId { get; set; }
public long DistanceId { get; set; }
... |
package com.angcyo.widget.text
import android.content.Context
import android.graphics.Canvas
import android.util.AttributeSet
import android.view.MotionEvent
import android.view.View
import androidx.annotation.ColorInt
import androidx.appcompat.widget.AppCompatTextView
import com.angcyo.widget.R
import com.angcyo.widg... |
package com.frogsquare.firebase
object Common {
const val RC_GOOGLE: Int = 0x0004
const val RC_FACEBOOK: Int = 0x0005
const val INTENT_REQUEST_ID: Int = 0x0006
const val NOTIFICATION_REQUEST_ID: Int = 0x0007
const val PROGRESS_NOTIFICATION_ID: Int = 0x0008
const val COMPLETE_NOTIFICATION_ID:... |
# arctan.py
import numpy as np
import torch
from torch import tensor
from adpulses import io, optimizers, metrics, penalties
if __name__ == "__main__":
import sys
if len(sys.argv) <= 1: # mode DEBUG
import os
os.chdir(os.path.dirname(os.path.abspath(__file__)))
m2pName = ('m2p.mat' if ... |
{-# LANGUAGE Safe #-}
{-# LANGUAGE NoImplicitPrelude #-}
module Protolude.Bool (
whenM
, unlessM
, ifM
, guardM
, bool
, (&&^)
, (||^)
, (<&&>)
, (<||>)
) where
import Data.Bool (Bool(..), (&&), (||))
import Data.Function (flip)
import Control.Applicative(Applicative, liftA2)
import Control.Monad (Monad, MonadPlus,... |
---
name: Nocoiner Tears
image: /assets/images/nocoiner-tears-mug.jpg
category: Mug
link: https://mfmerch.com/products/nocoiner-tears-mug
price: $18.00
---
|
<?php
namespace Wardenyarn\MawiApi;
use Wardenyarn\MawiApi\Exceptions\MawiApiException;
trait Documents
{
public function getDocuments($params = [])
{
return $this->getAll('/integration/xml/documents', 'document', $params);
}
public function getDocument(int $id)
{
return $this->a... |
from django.urls import path
from results_viewer.views import get_results_values
urlpatterns = [
path('results/<int:id>/values/', get_results_values),
] |
create or replace function graphql.primary_key_columns(entity regclass)
returns text[]
language sql
immutable
as
$$
select
coalesce(array_agg(pg_attribute.attname::text order by attrelid asc), '{}')
from
pg_index
join pg_attribute
on pg_attribute.attrelid = pg... |
export interface Match {
confidence: number;
name: string;
lang: string;
}
// @ts-ignore
export default (det, rec, confidence, name, lang): Match => ({
confidence,
name: name || rec.name(det),
lang,
});
|
/*=========================================================================
Program: ParaView
Module: pqContextMenuInterface.h
Copyright (c) 2005,2006 Sandia Corporation, Kitware Inc.
All rights reserved.
ParaView is a free software; you can redistribute it and/or modify it
under the terms of the ... |
# Vault-Ecto Sample
## Overview
This repo is to keep track of the latest state of using Hashicorp Vault for as
the source of short-term credentials to a Postgres database that is then used by
Ecto in an Elixir application.
## Components
### docker-compose.yml
The easiest way to ensure consistent environment for bo... |
using System;
using Foundation;
using JavaScriptCore;
namespace XamarinMac {
[Protocol()]
interface IJsExporter: IJSExport {
[Export("fetchMountedVolumes:")]
void FetchMountedVolumes(JSValue jsOptions);
}
public class MyNativeBridge: NSObject, IJsExporter {
JSContext jsContext... |
<#PSScriptInfo
.VERSION 1.6
.GUID 32a11a36-f91c-4241-a11f-af0cf3e90f38
.AUTHOR Karsten.Bott@labbuildr.com
.Edited Blesson John
.COMPANYNAME
.COPYRIGHT
.TAGS
.LICENSEURI
.PROJECTURI
.ICONURI
.EXTERNALMODULEDEPENDENCIES
.REQUIREDSCRIPTS
.EXTERNALSCRIPTDEPENDENCIES
.RELEASENOTES
#>
<#
.DESCRIPTION
This script... |
#include<iostream>
using namespace std;
class Node{
public:
int data;
Node* next;
Node(int d){
data =d;
next =NULL;
}
};
class stack{
public:
Node* head=NULL;
void push(int data){
Node* n = new Node(data);
n->next = head;
head =n;
}
Node* begin(){
return head;
}
v... |
/* Javascript eval */
var myfoo = eval("{ foo: 42 }");
result = eval("4*10+2")==42 && myfoo.foo==42;
//eval shall not alter calling global scope
var myfoo2 = eval("var myfoo; myfoo = {x:'test'}");
assert (myfoo.foo == 42, "myfoo should not be altered");
assert (myfoo2.x == "test", "myfoo2.x == \"test\"");
|
/**
* The MIT License (MIT)
*
* Copyright (c) 2019 vk.com
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy... |
// @flow
const R = require('ramda');
const { PubSub, withFilter } = require('graphql-subscriptions');
const { AmqpPubSub } = require('graphql-rabbitmq-subscriptions');
const { ForbiddenError } = require('apollo-server-express');
const logger = require('../logger');
const sqlClient = require('./sqlClient');
const { que... |
//*********************************************************************
//xCAD
//Copyright(C) 2020 Xarial Pty Limited
//Product URL: https://www.xcad.net
//License: https://xcad.xarial.com/license/
//*********************************************************************
using SolidWorks.Interop.sldworks;
using System;... |
import * as React from "react";
import { Trans } from "@lingui/macro";
import { Tooltip } from "reactjs-components";
import FormGroupHeading from "#SRC/js/components/form/FormGroupHeading";
import FormGroupHeadingContent from "#SRC/js/components/form/FormGroupHeadingContent";
import InfoTooltipIcon from "#SRC/js/compo... |
- [X] consider the merits of writing the entire file to the log when
it changes;
- considered - I can't think of a good reason to do this;
- [X] adjust the log format so that it's more in-line with what gets
thrown in syslog;
- [X] ~~log to syslog instead of to a file;~~ postponed indefinitely
- ... |
package blinky
import ammonite.ops.Path
import blinky.run.Instruction._
package object run {
implicit class ConsoleSyntax[+A](self: Instruction[A]) {
def map[B](f: A => B): Instruction[B] =
flatMap(a => succeed(f(a)))
def flatMap[B](
f: A => Instruction[B]
): Instruction[B] =
self ... |
# -*- encoding : utf-8 -*-
require 'spec_helper'
describe 'rbenv::definition', :type => :define do
let(:user) { 'tester' }
let(:ruby_version) { '1.9.3-p125' }
let(:title) { "rbenv::definition::#{user}::#{ruby_version}" }
let(:dot_rbenv) { "/home/#{user}/.rbenv" }
let(:target_path) { "#{dot... |
import logging
from datetime import timedelta
from homeassistant.components.light import LightEntity
from homeassistant.helpers.entity import Entity
from custom_components.miele import DATA_CLIENT, DATA_DEVICES
from custom_components.miele import DOMAIN as MIELE_DOMAIN
PLATFORMS = ["miele"]
_LOGGER = logging.getLog... |
package com.guohao.guoke.kotlin_self
class FunParamsTest{
fun main(args : Array<String>){
var a = ArrayList<Int>()
var b = Array(5) {""}
}
} |
package com.cloudx.ktx.core
import androidx.lifecycle.Lifecycle
import androidx.lifecycle.LifecycleObserver
import androidx.lifecycle.OnLifecycleEvent
import androidx.lifecycle.ProcessLifecycleOwner
/**
* @Author petterp
* @Date 2020/7/14-3:55 PM
* @Email ShiyihuiCloud@163.com
* @Function LifeCycle工具
*/
class Li... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var writer_1 = require("../writer");
var reader_1 = require("../reader");
describe("Writing a PGN game", function () {
// Ensure that whole games are created correctly
// Moves are normally checked in a separate spec
var writer = n... |
mod spatial_hash_cell;
mod spatial_hash_table;
mod header;
mod coord;
pub use self::spatial_hash_cell::*;
pub use self::spatial_hash_table::*;
pub use self::header::*;
pub use self::coord::*;
|
{-# LANGUAGE UnicodeSyntax #-}
{-# LANGUAGE BangPatterns #-}
module Internal.Control (
modifyMVar',
modifyMVar_',
updateMVar',
updateMVar_'
) where
import Control.Monad (void)
import Control.Concurrent.MVar
import Control.Exception
modifyMVar' ∷ MVar α → (α → IO (α, β)) → IO β
modifyMVar' mv f = ma... |
package com.steven.movieapp.widget.refreshLoad
import android.util.SparseArray
import android.view.View
import android.view.ViewGroup
import androidx.recyclerview.widget.GridLayoutManager
import androidx.recyclerview.widget.RecyclerView
import androidx.recyclerview.widget.StaggeredGridLayoutManager
/**
* Description... |
import { BASEURL, fetch, post, patch, put, postConfig } from './http.js'
export const BASICURL = BASEURL;
// export const uploadPic = data => post('', data);
// export const getALL = () => post(地址); post
// export const getALL = () => fetch(地址); get
//POST获取 "首页"=>"获取验证码后登录"
export const signIn = data => post('admi... |
#!/usr/bin/env bash
set -e
echo "" > coverage.txt
go version
if [[ $TRAVIS_GO_VERSION == 1.4.3 ]]; then
go get golang.org/x/tools/cmd/cover
fi
go test -coverprofile=unit_tests.out -covermode=atomic -coverpkg=./messaging ./messaging/
# go test -v -coverprofile=errors_tests.out -covermode=atomic -coverpkg=./messag... |
module MkExxTable (getApiExx, ApiExx, prApiEx, mkEx) where
import System.Cmd
import System.Environment
import qualified Data.Map as M
import Data.Char
main = do
xx <- getArgs
aexx <- getApiExx xx
return () -- putStrLn $ prApiExx aexx
getApiExx :: [FilePath] -> IO ApiExx
getApiExx xx = do
s <- readFile (hea... |
<?php
/**
* Copyright 2015 Bit API Hub
*
* Initial migration
*/
namespace Fuel\Migrations;
class Create_All
{
function up()
{
\DBUtil::create_table('accounts', array(
'id' => array('type' => 'int', 'constraint' => 11, 'auto_increment' => true),
'consumer_key' => array('type' => 'varchar', 'constrain... |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DbScriptDeploy.UI.Utils
{
public class ControlUtils
{
/// <summary>
/// Utility method to ensure "hidden" or reserved characters get displayed correctly.
/// </... |
# LOOPS
Write-Output('CLASSICAL LOOP') # CLASSICAL LOOP
for ($i = 0; $i -lt 10; $i++) {
Write-Output('i: ' + $i)
}
Write-Output('CLASSICAL LOOP WITH ARRAYS') # CLASSICAL LOOP WITH ARRAYS
$numbers = @(-3.2, 5.3, 3, 1)
for ($i = 0; $i -lt $numbers.Length; $i++) {
Write-Output($numbers[$i])
}
Write-Ou... |
using Microsoft.AspNetCore.Routing;
using System;
using System.Collections.Generic;
using System.Linq;
namespace Cofoundry.Web
{
/// <summary>
/// Implement this interface to define routes that should be
/// injected into the MVC route collection during the startup
/// process. IRunAfterRouteRegistra... |
<?php
namespace Oro\Bundle\IntegrationBundle\Provider;
interface IconAwareIntegrationInterface
{
/**
* Returns icon path for UI, should return value like 'bundles/acmedemo/img/logo.png'
* Relative path to assets helper
*
* @return string
*/
public function getIcon();
}
|
# Generated by jeweler
# DO NOT EDIT THIS FILE DIRECTLY
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
# -*- encoding: utf-8 -*-
Gem::Specification.new do |s|
s.name = "sugar-high"
s.version = "0.7.3"
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubyg... |
##############################################################################
#
# Copyright (c) 2003 Zope Foundation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOF... |
#include "iqrf/request/DPANodeRemoveBondRequest.h"
using namespace BeeeOn;
static const uint8_t REMOVE_BOND_CMD = 0x01;
DPANodeRemoveBondRequest::DPANodeRemoveBondRequest(uint8_t node):
DPARequest(
node,
DPA_NODE_PNUM,
REMOVE_BOND_CMD
)
{
}
|
// Copyright 2012 Viewfinder. All rights reserved.
// Author: Spencer Kimball.
#import <re2/re2.h>
#import "ActivityTable.h"
#import "AppState.h"
#import "CommentTable.h"
#import "DayTable.h"
#import "FullTextIndex.h"
#import "LazyStaticPtr.h"
#import "StringUtils.h"
namespace {
const DBRegisterKeyIntrospect kCommen... |
package com.github.demidko.tokenizer
/**
* @param namesSeparators list of names-allowed symbols. For example lower_snake_case, css-case-var
* @param unaryTokens symbols always one token only. For example, {{{ -> {, {, {
* @param stringsQuotes quote types for string literals, "string" 'string' `string`
*/
fun Strin... |
extern crate rjson;
use std::vec::Vec;
use std::collections::BTreeMap;
use std::convert::From;
use rjson::Value;
use rjson::Array;
use rjson::Object;
use rjson::Null;
use rjson::parse;
enum JsonValue {
Null,
Number(f64),
Bool(bool),
String(String),
Array(Vec<JsonValue>),
Object(BTreeMap<String,... |
#!/bin/sh
echo "Set GPIO 21 to read/pullup"
echo 'm 21 r' > /dev/pigpio
echo 'pud 21 u' > /dev/pigpio
|
package one.mir.http
import akka.http.scaladsl.testkit.RouteTest
import org.scalatest.matchers.{MatchResult, Matcher}
import play.api.libs.json._
import one.mir.http.ApiMarshallers._
import one.mir.api.http.ApiError
trait ApiErrorMatchers { this: RouteTest =>
class ProduceError(error: ApiError) extends Matcher[Rout... |
# <span style="color: darkgreen">**How-to guides**</span>
|
import { Command } from "../Command";
import { Subforum } from "../../Store/firebase/forum/@Subforum";
export declare class UpdateSubforumDetails extends Command<{
subforumID: number;
subforumUpdates: Partial<Subforum>;
}> {
Validate_Early(): void;
oldData: Subforum;
newData: Subforum;
Prepare()... |
using LightBDD.Core.Formatting.ExceptionFormatting;
using LightBDD.Fixie2.Implementation;
using LightBDD.Framework.Configuration;
namespace LightBDD.Fixie2.Configuration
{
/// <summary>
/// Extensions allowing to apply test framework default configuration.
/// </summary>
public static class TestFramew... |
using System.Reflection;
using DataDynamics.PageFX.Common.Extensions;
using DataDynamics.PageFX.Flash.Abc;
using DataDynamics.PageFX.Flash.Core;
using DataDynamics.PageFX.Flash.IL;
namespace DataDynamics.PageFX.Flash.Avm
{
internal sealed class BuiltinTypes
{
private readonly AbcFile _abc;
... |
<?php
namespace Tests\Feature\Domains\Composer;
use Composer\Package\Version\VersionSelector;
use Domains\Composer\InlineComposerDependency;
use Domains\Composer\NoInstallationCandidateFoundException;
use Domains\Composer\PackageVersionToInstallResolver;
use Domains\Composer\VersionSelectorFactory;
use Domains\Create... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.