text stringlengths 27 775k |
|---|
# DiliDili-Fun
just for fun copy by bilibili v4.9.0. writen by swift~
|
module Jekyll
module FilterStringsByRegexp
def filter_strings_by_regexp(list, regexp)
reg = Regexp.new regexp
list.select { |item| item =~ reg }
end
end
end
Liquid::Template.register_filter(Jekyll::FilterStringsByRegexp)
|
<?php
namespace Geodesy\Models;
class Bessel1841 extends BaseModel implements ModelInterface
{
CONST SEMI_MAJOR_AXIS = 6377397.155;
CONST FLATTENING = 299.1528128;
} |
function getLinesFromInput(input)
lines = zeros(Int32, 0)
splitInput = split.(input, " ")
for i in splitInput
(x1, y1) = parse.(Int32, split(i[1],","))
(x2, y2) = parse.(Int32, split(i[3],","))
append!(lines, [x1, y1, x2, y2,])
end
return transpose(reshape(lines, 4, :))
end
... |
libraryDependencies ++= Seq(
"org.eclipse.jgit" % "org.eclipse.jgit.pgm" % "5.2.1.201812262042-r",
"org.slf4j" % "slf4j-log4j12" % "1.7.25"
)
scalacOptions ++= Seq("-deprecation", "-feature")
|
'use strict';
require('co-mocha');
const axios = require('axios');
const expect = require('chai').expect;
const sinon = require('sinon');
const rewire = require('rewire');
const Telegram = rewire('../lib/telegram');
describe('Unit tests for lib/telegram', function () {
context('Testing formUrl', function () {
... |
#!/bin/bash
# Exit on any errors
set -e
if [[ "x$1" = "x" ]]; then
if [ ! -f hosts ]; then
echo "Usage: ./ssh-setup.sh [hostsfile]"
echo "Note: the hosts file MUST be of a format readable for OpenMPI."
echo "Normal /etc/hosts often contains more information that needed,"
echo "such as hostname aliases and oth... |
#pragma once
#include <Model.hpp>
#include <QGridLayout>
#include <QProgressIndicator.hpp>
#include <QPushButton>
#include <QTableWidget>
#include <QVBoxLayout>
#include <QWidget>
namespace TUNet
{
struct DetailPage : QWidget
{
public:
DetailPage(QWidget* parent, Model* pmodel);
~DetailPag... |
import coil.setupLibraryModule
plugins {
id("com.android.library")
id("kotlin-android")
}
setupLibraryModule(publish = true)
dependencies {
api(projects.coilBase)
implementation(libs.androidx.core)
testImplementation(projects.coilTest)
testImplementation(libs.bundles.test.jvm)
androidT... |
use edjx::{error, info, FetchResponse, HttpFetch, HttpRequest, HttpResponse, StatusCode, Uri};
use std::str::FromStr;
pub fn serverless(_req: HttpRequest) -> HttpResponse {
info!("**Basic HTTP request and response function**");
let fetch_uri = Uri::from_str("https://httpbin.org/get").unwrap();
let mut fe... |
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Product extends CI_Model
{
function __construct()
{
$this->proTable="product";
$this->custTable="customers";
$this->ordTable="orders";
$this->ordItemsTable="order_item";
}
function get_rows($id='')
{
$this->db->select("*");
$this->db->... |
package lab.dkataiev.ms.k8s.accounts.controller;
import io.github.resilience4j.circuitbreaker.annotation.CircuitBreaker;
import io.github.resilience4j.ratelimiter.annotation.RateLimiter;
import io.github.resilience4j.retry.annotation.Retry;
import io.micrometer.core.annotation.Timed;
import lab.dkataiev.ms.k8s.account... |
<?php
require_once('config.inc');
$dbh = @pg_connect($conn_str);
if (!$dbh) {
die ("Could not connect to the server");
}
pg_close($dbh);
require_once(dirname(__FILE__).'/../../dba/tests/test.inc');
require_once(dirname(__FILE__).'/../../dba/tests/dba_handler.inc');
?> |
---
layout: member
title: Junhyuk Kim
position: PhD student
image: /images/people/junhyuk-kim.jpg
---
|
---
title: "Reverse - Harleighblu"
tags: ["DOP","Editor"]
featured_image: "/images/filmography/ReverseHarleighblu.png"
description: ""
order: 5
---
Music Video
{{< youtube-embed youtube-id="JusPCB0pgbc" >}} |
<?php
/**
* Handles options and database changes in updates
*
* @since 4.0.0
*/
class BQW_SliderPro_Updates {
/**
* Current class instance.
*
* @since 4.0.0
*
* @var object
*/
protected static $instance = null;
/**
* Current version number in the database
*
* @since 4.0.0
*
* @var st... |
set -eo nounset
cd /sources
for k in \
https://downloads.sourceforge.net/w3m/w3m-0.5.3.tar.gz \
http://www.linuxfromscratch.org/patches/blfs/svn/w3m-0.5.3-bdwgc72-1.patch ; do
test -f `basename $k` || \
wget --no-check-certificate \
$k
done
rm -rf w3m-0.5.3
tar xf w3m-0.5.3.tar.gz
pushd w3m-0.5.3
patch -Np1 -i ..... |
var utils = require('./utils.js').Utils;
var Utils = new utils();
var CENUMS = require('./enums.js').Enums; //init client enums
var Attribute = function(){
this.pokemon = null;
this.id = null;
this.name = null;
this.value = null;
this.base = null;
this.nMod = null;
this.pMod = null... |
<?php
/**
* 数据库model基础类中加入自定义方法
*/
class BaseCActiveRecord extends CActiveRecord {
}
|
###
# ssh_key_helpers.rb - methods to help manipulate ssh keys
#
# Copyright 2012 Red Hat, Inc. and/or its affiliates.
#
# 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.... |
// Copyright (c) 2018, The GoKi 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 runes provides a small subset of functions that are found in strings, bytes
standard packages, for rune slices. For rendering, and other logi... |
using System.Collections.Generic;
using System.Threading.Tasks;
using MyNoSqlServer.Abstractions;
using DealingAdmin.Abstractions;
namespace DealingAdmin.MyNoSql.InstrumentSubGroup
{
public class InstrumentSubGroupsMyNoSqlRepository : IInstrumentSubGroupsRepository
{
private readonly IMyNoSqlServerData... |
# ts-jest-webpack-es6-babel-template
常用工具函数开发模板
## 缺少webpack-cli `错误`
```
const statsPresetToOptions = require("webpack").Stats.presetToOptions;
^
TypeError: Cannot read property 'presetToOptions' of undefined
```
原... |
package org.araymond.joal.core.client.emulated;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.apache.commons.io.FilenameUtils;
import org.araymond.joal.core.SeedManager;
import org.araymond.joal.core.config.JoalConfigProvider;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import javax.inje... |
# Remote Yamls
Fallout supports importing test yamls from a remote url. Use the `yaml_url` key
to specify the URL of the raw remote test yaml.
```yaml
yaml_url: https://some-yaml-url
```
If specifying a remote yaml url, no other keys are permitted. The following
test yaml will cause an exception.
```yaml
yaml_url:... |
### **Virtual Webcam Linux**
_Tuesday, May 12, 2020_
Let just be honest, we all tired in the current pandemic, some people had endless work to do and
some had nothing to do. But all share the common. You need to fill presence so your boss don't have
to worry about their employee playing videogames all day instead of... |
Cosas para recordar de Linux
============================
Debian related
--------------
### Agregar la architectura 32 bits a una 64
`sudo dpkg --add-architecture i386` `sudo apt-get update`
`sudo apt-get install build-essential gcc-multilib rpm libstdc++6:i386`
`libgcc1:i386 zlib1g:i386 libncurses5:i386`
### progr... |
---
layout: post
title: "イデアル論入門の英語用語集"
date: 2018-05-19
category: Math
author: tex2e
cover: /assets/cover1.jpg
redirect_from: /misc/ideal-theory
comments: true
published: true
---
各用語の説明はありません。英語から日本語の訳を調べるために作りました。
各用語の詳しい説明は『イデアル論入門』をお読みください。
## 1. 一般論
- 2項演算:b... |
import moment from 'moment';
export function validateSponsorDeathDate(
errors,
{ isDeceased, dateOfBirth, dateOfDeath },
) {
if (
dateOfBirth &&
isDeceased === 'yes' &&
dateOfDeath &&
moment(dateOfDeath).isSameOrBefore(moment(dateOfBirth))
) {
errors.dateOfDeath.addError('Date of death must... |
import 'package:flutter/material.dart';
import 'package:url_launcher/url_launcher.dart';
import 'package:http/http.dart' as http;
import 'dart:convert';
import 'feed.dart';
class FeedList extends StatefulWidget {
@override
createState() => _FeedListState();
}
class _FeedListState extends State<FeedList> {
int _... |
# -*- coding: utf-8 -*-
"""
Created on Mon May 20 21:34:24 2019
@author: Training28
"""
1.
Write a Python program to read an entire text le.
def file_read(fname):
txt = open(fname)
print(txt.read())
file_read(r'C:\Users\Training28\Anaconda3\test.txt')
2.Write a Python program to read rs... |
using Particles: candidates, instantiate
# original, one-step fit method
function old_fit(p::InfiniteParticle, y, x::Int)
# first calculate log-prior
Δlogweight = log_prior(p.stateprior, x)
# then update sufficient stats and convert x to an index
stateprior, x = add(p.stateprior, x)
0 < x ≤ length(... |
package com.terwergreen.action.insert;
/**
* @name: InsertConstant
* @author: terwer
* @date: 2022-03-18 23:30
**/
public class InsertConstant {
public static final Integer MAX_COUNT = 1000_0000;
public static final Integer MAX_THREAD_COUNT = 16;
}
|
use std::str::FromStr;
use rip::openapi::v2::Spec as SpecV2;
use rip::openapi::v3::Spec as SpecV3;
use rip::rest::Application;
use rip::rest::application::ApplicationBuilder;
use rip::rest::contact::Contact;
use rip::rest::contact::ContactBuilder;
use rip::rest::documentation::Documentation;
use rip::rest::documentati... |
package config
import (
"github.com/tal-tech/go-zero/rest"
)
type Config struct {
rest.RestConf
GraphQL GraphQLConf
}
type GraphQLConf struct {
Debug struct {
EnableVerbose bool `json:",optional"` //nolint:revive,staticcheck // FIXME: go-zero
}
}
// TODO: 破坏了代码分层,后续优化
var GraphQL GraphQLConf
|
// https://leetcode-cn.com/problems/search-insert-position/
// Runtime: 0 ms
// Memory Usage: 2 MB
use std::convert::identity;
pub fn search_insert(nums: Vec<i32>, target: i32) -> i32 {
nums.binary_search(&target).unwrap_or_else(identity) as i32
}
// binary_search array
#[test]
fn test2_35() {
assert_eq!(search... |
import 'dart:async';
import 'package:connectivity/connectivity.dart';
import 'package:flutter/material.dart';
import 'package:note_it/UI/offline.dart';
import 'package:note_it/UI/sidemenu.dart';
import 'package:note_it/category/algoScreen.dart';
import 'package:note_it/category/appdevScreen.dart';
import 'package:note_... |
<?php
set_include_path('../src/'.PATH_SEPARATOR.get_include_path());
date_default_timezone_set('UTC');
include 'Cezpdf.php';
$pdf = new Cezpdf('a4', 'portrait');
$pdf->selectFont('Courier');
$fontSize = 15;
$fontFile = realpath('../src/fonts/FreeSerif.ttf');
$text = 'Text using TTF font, added as image';
$extra =... |
import random
from socket import *
# Configure the server socket
serverSocket = socket(AF_INET, SOCK_DGRAM)
serverSocket.bind(('', 12000))
while True:
try:
rand = random.randint(0, 10)
# Reveive the message from client
message, address = serverSocket.recvfrom(1024)
message = messag... |
{-# LANGUAGE ConstrainedClassMethods #-}
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE DefaultSignatures #-}
{-# LANGUAGE TypeFamilies #-}
-- | Module : Data.Algebra
-- Copyright : (c) Jacob Leach, 2020 - 2022
-- License : see LICENSE
--
-- Maintainer : jacobleach@protonmail.com
... |
<?php
namespace App\Utils\JWS;
use Gamegos\JWS\Algorithm\AlgorithmInterface;
use Gamegos\JWS\Exception\UnspecifiedAlgorithmException;
use Gamegos\JWS\Exception\UnsupportedAlgorithmException;
use Gamegos\JWS\Util\Base64Url;
class JWS extends \Gamegos\JWS\JWS
{
/**
* @param $name
* @return AlgorithmInter... |
package flank.scripts.cli.testartifacts
import com.github.ajalt.clikt.core.CliktCommand
import com.github.ajalt.clikt.core.requireObject
import com.github.ajalt.clikt.parameters.options.default
import com.github.ajalt.clikt.parameters.options.option
import flank.scripts.ops.testartifacts.Context
import flank.scripts.o... |
package com.yourtion.Pattern03
import com.yourtion.Pattern03
/**
* Created by Yourtion on 10/10/2016.
*/
object RegisterClient {
def run() = {
val register = new CashRegister(0)
val purchaseOne = Register.makePurchase(register, 100)
val purchaseTwo = Register.makePurchase(register, 50)
Regist... |
// Load Proveedores desde CSV
var Cecos = require('../models/cecos');
var mongoose = require('mongoose');
//mongoose.connect('mongodb://127.0.0.1:27017/casupo');
//mongoose.connect('mongodb://testuser:20160707@ds017175.mlab.com:17175/shopping');
mongoose.connect('mongodb://invoice:Inv.1984@admapps01:27017/invoice2... |
package org.jetbrains.bio.npy
import org.junit.Test
import org.junit.runner.RunWith
import org.junit.runners.Parameterized
import org.junit.runners.Parameterized.Parameters
import kotlin.test.assertEquals
@RunWith(Parameterized::class)
class TestParseDict(private val expected: Map<String, Any>,
pr... |
/*
* event.cpp
*
* Created on: May 10, 2021
* Author: OS1
*/
#include "event.h"
#include "kev.h"
#include "pcb.h"
/*
* Kreiraj novu internu strukturu dogadjaja
*/
Event::Event(IVTNo ivtNo) {
lock
lockF
myImpl = new KernelEv(ivtNo, this);
unlock
unlockF
}
Event::~Event() {
lock
lockF
delete myIm... |
package org.openstack4j.api.trove;
import java.util.List;
import java.util.logging.Logger;
import com.google.common.base.Preconditions;
import org.openstack4j.api.AbstractTest;
import org.openstack4j.model.trove.Datastore;
import org.openstack4j.model.trove.DatastoreVersion;
import org.testng.annotations.Test;
impor... |
package DirectTrueLoadUntrue;
use strict;
use warnings;
use true;
use Untrue1;
sub whatever { 'whatever' }
|
package org.apache.spark
import org.apache.spark.executor.{InputMetrics, OutputMetrics}
object ExposedMetrics {
def incrementRecord(metrics: InputMetrics) {
metrics.incRecordsRead(1)
}
def incrementBytes(metrics: InputMetrics, nBytes: Long) {
metrics.incBytesRead(nBytes)
}
def setBytes(metrics: Ou... |
#!/bin/bash
set -euo pipefail
gcloud config set compute/region "us-west1"
gcloud config set compute/zone "us-west1-c"
gcloud config set project ${1}
#Create a zonal cluster
#Below command creates a 2-node zonal cluster in us-west1-c with auto-scaling enabled.
gcloud container clusters create ${2} \
--zone us-we... |
#!/bin/bash
sum=0
for i in $* #($*表示所有参数)
do
sum=$((sum+i))
done
echo $sum |
/*
//@HEADER
// ************************************************************************
//
// Kokkos v. 3.0
// Copyright (2020) National Technology & Engineering
// Solutions of Sandia, LLC (NTESS).
//
// Under the terms of Contract DE-NA0003525 with NTESS,
// the U.S. Govern... |
class View
def initialize
@contents ||= []
end
def add_child(o)
@contents.push(o)
end
def add_child_at(o,id)
@contents.insert(id,o)
end
def remove_child(o)
@contents.delete_if {|x| x == o }
end
def remove_child_at(id)
@contents.delete_at(id)
end
de... |
namespace OX.Copyable.Tests
{
using Microsoft.VisualStudio.TestTools.UnitTesting;
[TestClass]
public class InheritanceTest
{
class Foo
{
public int Value { get; set; }
}
class Bar : Foo
{
}
[TestMethod]
... |
class ExternalUsers::ClaimTypesController < ExternalUsers::ApplicationController
skip_load_and_authorize_resource
before_action :set_available_claim_types_for_provider, only: %i[new create]
before_action :enable_breadcrumb, only: %i[selection]
def new
if @available_claim_types.empty?
redirect_to(
... |
<?php
ob_start();
?>
<div class="ibox-content">
<a href="?page=addKegiatan">
<button class="btn btn-success dim " type="button" ><i class="fa fa-plus"></i> Data Kegiatan</button>
</a>
</div>
<div class="ibox-content">
<div class="table-responsive">
<table class="table table-striped table-bordered table... |
package ratpack.kotlin.handling
import ratpack.func.Action
import ratpack.guice.BindingsSpec
import ratpack.guice.Guice
import ratpack.handling.Handler
import ratpack.registry.Registry
import ratpack.registry.RegistrySpec
import ratpack.server.RatpackServerSpec
import ratpack.server.ServerConfig
import ratpack.server.... |
<?php
// src/Blogger/BlogBundle/Entity/Enquiry.php
namespace Blogger\BlogBundle\Entity;
use Symfony\Component\Validator\Mapping\ClassMetadata;
use Symfony\Component\Validator\Constraints\NotBlank;
use Symfony\Component\Validator\Constraints\Email;
use Symfony\Component\Validator\Constraints as Assert;
//use Symfony\... |
# Recycle!
Support for schedules provided by [Recycle / recycleapp.be](https://www.recycleapp.be/).
## Configuration via configuration.yaml
```yaml
waste_collection_schedule:
sources:
- name: recycleapp_be
args:
postcode: POST_CODE
street: STREET
house_number: HOUSE_NUMBER
```
Th... |
import type { TextComponent } from './text';
import type { HoverEvent } from './hover-event';
import type { TranslatableComponent } from './translatable';
export interface ComponentApparence {
color: string;
font: string;
}
export interface ComponentDecoration {
bold: boolean;
italic: boolean;
underlined: b... |
/*
* Copyright 2015 Jo Rabin
*
* 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 ... |
import { SEMI_MAJOR_AXIS, TILE_SIZE } from "src/constant/common";
import MapCamera from "./MapCamera";
import Tile, { TileLevelInfo, tileLevels } from "./TIle";
import Vec3 from "./Vec3";
function getXY(levelInfo: TileLevelInfo, x: number, y: number) {
const max = Math.pow(2, levelInfo.level);
let tileX = x;
let... |
require 'spec_helper'
RSpec.describe 'git', type: :rake do
describe 'git:clone' do
it 'git clone' do
expect { invoke_all }.to output(output_file('git_clone')).to_stdout
end
it 'git clone with commit' do
Mina::Configuration.instance.set(:commit, '123456')
expect { invoke_all }.to output... |
// $Source: bitbucket.org:berkeleylab/gasnet.git/other/amudp/socklist.cpp $
// Description:
// Copyright 2000, Dan Bonachea <bonachea@cs.berkeley.edu>
#include <assert.h>
#include "socklist.h"
#ifdef SOCKLIST_MT
semaphore SocketList::lock("socketlist");
#define LOCK do { if (TS) lock.wait(); } while (0)
#... |
#!/bin/bash
die() { echo "$0:$@ !"; exit 1; }
for i in *; do
if [ -f $i/make.sh ]; then
pushd $i
[ "$1" == "clean" ] && rm -rf build
./make.sh || die "Could not make $i"
popd
fi
done
|
using DbEx.DataService;
using DbEx.dboDataService;
using FluentAssertions;
using Xunit;
namespace HatTrick.DbEx.MsSql.Test.Expression
{
public class AverageFunctionExpressionEqualityTests : TestBase
{
[Theory]
[MsSqlVersions.AllVersions]
public void Average_functions_of_person_id_shoul... |
import socket
import sys
print("Cliente iniciado...")
HOST, PORT = "localhost", 9999
data = " ".join(sys.argv[1:])
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
sock.sendto(bytes(data + "\n","utf8"), (HOST, PORT))
received = sock.recv(1024)
print(sys.argv)
print("Enviado: {0}".format(data))
print("Recibido:... |
(ns editors.utilities
(:require [clerk.text :as text]
[clojure.string :as string])
(:gen-class))
(defn make-pattern
"Used to concat regex pattern to search for multiple specimens at once."
[re-payload case-sensitive?]
(let [leftb (if case-sensitive? "\\b(" "(?i)\\b(")]
(->> re-payload
... |
using Microsoft.Extensions.Logging;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using VwM.BackgroundServices;
using VwM.Database.Server;
namespace VwM.CronTasks
{
public class DbStatusCronTask : ICronTask
{
public string Sche... |
package playground
object PatternMatching extends App {
/**
* Person is a case class, thus all its fields are implicitly
* marked as `vals`.
*/
case class Person(name: String, surname: String, age: Int)
/**
* Standard, non-case class. To make its fields public we have
* to mark them as `vals` ex... |
class HH::Sequel::SQLite::Dataset
def table_name
@opts[:from]
end
def widget(slot)
slot.stack(:margin => 18).tap do |s|
s.title "The #{table_name} Table"
set.each do |item|
s.para s.link(item[:title], :size => 18, :stroke => "#777"),
" Table::Item", :stroke => "#999"
... |
<?php
namespace Picqer\Financials\Moneybird\Entities;
use Picqer\Financials\Moneybird\Model;
/**
* Class Note.
*
* @property string $id
* @property string $note
* @property bool $todo
* @property string $assignee_id
*/
class Note extends Model
{
/**
* @var array
*/
protected $fillable = [
... |
#!/bin/bash
source=awesome-if.asciidoc
# "docs_src/build.sh" v1.0.1 | 2019/10/20
#-------------------------------------------------------------------------------
# Build:
# 1. The pre-processed single-file AsciiDoc README.adoc in the repository
# root for previewing on GitHub.... |
#' Compute relative distances between intervals.
#'
#' @param x [tbl_interval()]
#' @param y [tbl_interval()]
#' @param detail report relative distances for each `x` interval.
#'
#' @family interval statistics
#'
#' @return
#' If `detail = FALSE`, a [tbl_interval()] that summarizes
#' calculated `.reldist` values with ... |
class ManageIQ::Providers::IbmCloud::PowerVirtualServers::StorageManager::CloudVolume < ::CloudVolume
supports :create
supports_not :snapshot_create
supports_not :update
def available_vms
availability_zone.vms.select { |vm| vm.format == volume_type }
end
def self.validate_create_volume(ext_management_... |
using .DistributionsAD: TuringDirichlet, TuringWishart, TuringInverseWishart,
FillVectorOfUnivariate, FillMatrixOfUnivariate,
MatrixOfUnivariate, FillVectorOfMultivariate, VectorOfMultivariate,
TuringScalMvNormal, TuringDiagMvNormal, TuringDenseMvN... |
#include"all_defines.hpp"
#include<iostream>
#include<sstream>
#include<string>
#include<vector>
#include<errno.h>
#include<sys/types.h>
#include<sys/stat.h>
#include<unistd.h>
#include<stdlib.h>
/*
* print a fail and exit
*/
void fail(const char* f) {
std::cerr << "hl: " << f << std::endl;
exit(1);
}
/*
* det... |
package io.hirasawa.server.webserver.route
import io.hirasawa.server.webserver.enums.HttpMethod
import io.hirasawa.server.webserver.internalroutes.errors.RouteMethodNotAllowed
import io.hirasawa.server.webserver.internalroutes.errors.RouteNotFoundRoute
import io.hirasawa.server.webserver.objects.Request
import io.hira... |
package main
import (
_ "github.com/go-sql-driver/mysql"
"github.com/jmoiron/sqlx"
"github.com/labstack/echo/v4"
"github.com/labstack/echo/v4/middleware"
"github.com/sjcl/shionstagram-backend/web/handler"
"github.com/sjcl/shionstagram-backend/web/model"
)
func main() {
db := sqlx.MustConnect("mysql", "shion:... |
<?php
if (!defined('B_PROLOG_INCLUDED') || B_PROLOG_INCLUDED!==true)die();
use Bitrix\Main;
use Bitrix\Main\Localization\Loc;
use Bitrix\Crm\Activity\Provider\ExternalChannel;
use Bitrix\Crm\WebForm\Manager as WebFormManager;
use Bitrix\Crm\Integration\Channel\EmailTracker;
use Bitrix\Crm\Integration\Channel\VoxImplan... |
namespace AzTestReporter.TestContent
{
using System.Diagnostics.CodeAnalysis;
[ExcludeFromCodeCoverage]
public class Class1
{
}
}
|
package mx.horace.cats.ch02
import cats._
import cats.implicits._
/*import cats.syntax.semigroup._
import cats.instances.string._
import cats.instances.int._
import cats.instances.option._
*/
object MonoidAndSemigroup extends App {
/*
Monoids and Semigroups are used for combining values
1.- Type class
... |
# Analytics Middle Tier Testing
This test package does not test the created SQL Schema in detail. It does,
however, ensure that the migration library executes correctly. Here is how this
project operates:
1. Check to see if the target testing database exists on the localhost default
database instance.
1. If n... |
package common
import (
"bytes"
"encoding/json"
"time"
)
const (
PRIORITY_LOW = 0
PRIORITY_HIGH = 1
JobPrefix = "H:"
)
type Job struct {
Handle string //server job handle
Id string
Data []byte
Running bool
Percent int
Denominator int
CreateAt time.Time
ProcessAt... |
#!/bin/bash
# count number of times script forked
# http://stackoverflow.com/questions/17718508/how-to-count-number-of-forked-sub-processes
fork=0
set -o monitor
trap "((++fork))" CHLD
X=10
for i in $(seq 1 $X); do #fastest way, forks onces
#for i in $(eval echo {1..$X}); do #medium speed, forks once
#... |
-module(prometheus_rabbitmq_nodes_collector).
-export([register/0,
register/1,
deregister_cleanup/1,
collect_mf/2,
collect_metrics/2]).
-import(prometheus_model_helpers, [create_mf/5,
label_pairs/1,
gauge_metrics/... |
package com.bn.view;
import javax.microedition.khronos.opengles.GL10;
import com.bn.catcherFun.MainActivity;
import com.bn.catcherFun.MySurfaceView;
import com.bn.constant.Constant;
import com.bn.object.BN2DObject;
import com.bn.util.manager.ShaderManager;
import android.opengl.GLES30;
import android.view.MotionEvent... |
use crate::property::{HasCharCount, HasCheckedValue, HasEmptyValue, HasLength, HasMember};
use std::collections::{BTreeMap, BTreeSet, HashMap, HashSet, LinkedList, VecDeque};
use std::hash::{BuildHasher, Hash};
impl HasCheckedValue for bool {
fn is_checked_value(&self) -> bool {
*self
}
}
impl HasEmpt... |
import 'dart:async';
import 'package:flutter/material.dart';
import 'package:chewie/chewie.dart';
import 'package:flutter/services.dart';
import 'package:http/http.dart' as http;
import 'package:video_player/video_player.dart';
typedef ChewiePlayerControllerCallback(
ChewieController controller, VideoPlayerContro... |
import enum
from typing import Optional
import logging
from PyQt5 import QtWidgets, QtGui
from .scan_ui import Ui_Form
from ...utils.plotscan import PlotScan
from ...utils.window import WindowRequiresDevices
logger=logging.getLogger(__name__)
logger.setLevel(logging.INFO)
class RangeType(enum.Enum):
Absolute =... |
## Understanding - Beginner, exercise 6
### Text
Consider the following function in Python:
```python
def ni(s1, s2):
if s1 in s2 and s2 in s1:
return False
else:
return True
```
Write down the value that is returned by the function above when called as follows: `ni("27", "42")`
### Solutio... |
package org.ossiaustria.amigo.platform.domain.services
import com.ninjasquad.springmockk.SpykBean
import io.mockk.every
import org.assertj.core.api.Assertions.assertThat
import org.junit.jupiter.api.BeforeEach
import org.junit.jupiter.api.Test
import org.junit.jupiter.api.assertThrows
import org.ossiaustria.amigo.plat... |
package org.clever.hinny.graal.mvc.http;
import org.springframework.util.Assert;
import javax.servlet.http.HttpSession;
import java.util.List;
/**
* 作者:lizw <br/>
* 创建时间:2020/08/31 20:17 <br/>
*/
public class HttpSessionWrapper {
protected HttpContext httpContext;
private final org.clever.hinny.mvc.http.H... |
/*
* Package : dartivity_database
* Author : S. Hamblett <steve.hamblett@linux.com>
* Date : 05/011/2015
* Copyright : S.Hamblett 2015
*/
part of dartivity_database;
class DartivityResourceDatabase {
/// This class implements the Dartivity resource database. The implementation
/// is revisionless, regardl... |
JackTriviaScript:
random 11
ifequal 0, .Thunder
ifequal 1, .Rollout
ifequal 2, .Solarbeam
ifequal 3, .Stomp
ifequal 4, .Gust
ifequal 5, .Twister
ifequal 6, .Earthquake
ifequal 7, .Magnitude
ifequal 8, .Sandstorm
ifequal 9, .SunnyDay
ifequal 10, .RainDance
.Thunder:
farwritetext JackThunderTrivia... |
<?php
namespace App\Http\Controllers\Admin;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use App\Exports\CustomersExport;
use Maatwebsite\Excel\Facades\Excel;
use App\User;
use Validator, Str, DB, App, Session, Exception;
class CustomerController extends Controller
{
public $views;
publi... |
# encoding: utf-8
# Copyright (C) 2016 Mikio Ikoma
require 'regextest/common'
# Parse back refer element (\1, \k<foo> etc.)
module Regextest::Front::BackRefer
class BackRefer
include Regextest::Common
@@id = 0 # a class variable for generating unique name of element
# Constructor
def initial... |
#!/bin/sh
if [ -r "VERSION" ] ; then
. ./VERSION
fi
: ${MAJOR:=0} ${MINOR:=0} ${PATCH:=0}
VERSION="$MAJOR.$MINOR.$PATCH"
case $1 in
--major) echo "$MAJOR" ;;
--shell)
echo "MAJOR=\"$MAJOR\""
echo "MINOR=\"$MINOR\""
echo "PATCH=\"$PATCH\""
;;
*) echo "$VERSION" ;;
esac
|
using System;
using System.Net.Http;
using Microsoft.Azure.WebJobs;
using Yarm.Extensions;
namespace Yarm.FunctionApp.Tests
{
/// <summary>
/// This represents the base trigger function
/// </summary>
public abstract class FunctionTriggerTests : IDisposable
{
private bool _disposed;
... |
package com.klst.einvoice.api;
import java.math.BigDecimal;
import com.klst.edoc.untdid.TaxCategoryCode;
/**
* TaxCategory contains a category code and a rate
* <p>
*
* used in
* <br> AllowancesAndCharges, DOCUMENT LEVEL ALLOWANCES (BG-20) and CHARGES (BG-21)
* <br> BG-23 VAT BREAKDOWN : BT-118 , ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.