text stringlengths 27 775k |
|---|
require 'ffi'
require 'ffi/tools/const_generator' # This wasn't being loaded by the FFI gem as a whole
module LinuxCLib
extend FFI::Library
ffi_lib 'c'
@@cg = FFI::ConstGenerator.new(nil, required: true) do |gen|
gen.include('unistd.h')
gen.const(:_SC_CLK_TCK)
end
attach_function :sysconf, [:int], ... |
package List;
import java.sql.SQLOutput;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.List;
/**
* Author:QiyeSmart
* Created:2019/5/11
*/
/*
数组实现
*/
public class testArrayList {
public static void code1(){
List<String> list=new ArrayList<>();
... |
"""authentik saml_idp Models"""
from typing import Optional
from django.db import models
from django.urls import reverse
from django.utils.translation import gettext_lazy as _
from rest_framework.serializers import Serializer
from structlog.stdlib import get_logger
from authentik.core.models import PropertyMapping, P... |
!COMPILER-GENERATED INTERFACE MODULE: Fri Mar 6 15:34:29 2020
! This source file is for reference only and may not completely
! represent the generated interface used by the compiler.
MODULE EMBM__genmod
INTERFACE
SUBROUTINE EMBM(ISTEP,LATENT_ATM,SENSIBLE_ATM,NETS... |
#!/bin/sh
#
# about:
#
# compile_vba.sh - create a vimball from the given files
#
# author: mathias gumz <akira at fluxbox org>
# licence: MIT
#
# usage:
#
# compile_vba.sh infile1 infile2 infile3
#
# the vimball is dumped to stdout, to create a .vba.gz
# just pipe the output to gzip
cat <<EOF
" Vi... |
export declare var outputName: string;
export declare function getBinaryName(): string;
export declare function getBinaryPath(): string;
export declare function requireBinding(): any;
export declare function getBinaryUrl(): string;
|
using UnityEngine;
public class Sounds : MonoBehaviour
{
[SerializeField] private AudioSource buttonAudio;
[SerializeField] private AudioClip clickSound, passSound, correctSound, tabooSound;
private void Start()
{
buttonAudio = GameObject.Find("ButtonClickSound").GetComponent<AudioSource>();
... |
package com.grab.databinding
import android.os.Bundle
import android.widget.TextView
import androidx.appcompat.app.AppCompatActivity
import androidx.databinding.BaseObservable
import androidx.databinding.BindingAdapter
import androidx.databinding.DataBindingUtil
import androidx.databinding.ObservableField
import com.g... |
package com.couchbase.workshop;
import com.couchbase.client.java.Bucket;
import com.couchbase.client.java.Cluster;
import com.couchbase.client.java.CouchbaseCluster;
import com.couchbase.client.java.env.CouchbaseEnvironment;
import com.couchbase.client.java.env.DefaultCouchbaseEnvironment;
import org.springframework.b... |
//! The tests which require access to [`std::panic::catch_unwind`], which is
//! unavailable in a `no_std` crate
use retain_more::RetainMoreString as _;
#[test]
fn retain_default_safety() {
let mut s = String::from("0è0");
let _ = std::panic::catch_unwind(std::panic::AssertUnwindSafe(|| {
let mut coun... |
#include <raykernel.h>
#include <tdm/io.h>
#include <rmi/rmi.h>
#include <threads/sleep.h>
#include <drivers/dmesg/dmesg.h>
#include <memory/memory.h>
#include <tdm/int.h>
#include "drives.h"
#include "ataio.h"
volatile IPLOCK waitForDataP;
volatile IPLOCK waitForDataS;
void InitializeControllers() {
UINT8 CtrlPri... |
export default ({ router }) => {
router.addRoutes([
// After renaming "Topics" section to "Guides"
{ path: '/topics/', redirect: '/guides/' },
])
}
|
#!/bin/bash
# Configure administration access
# Leandro Sehnem Heck (leoheck@gmail.com)
# This script configures the main login screen (LightDM)
# Features:
# - Set de root password
# - Enable sudo for professors
# DEFAULT ROOT PASSWORD
# To generate the cripto password: openssl passwd
echo "root:VLuxY7G/MDMO2" | ch... |
import { PostQuery, Posts } from "../..";
import db from "../setup";
export const getAllPosts = async (): Promise<PostQuery[]> =>
await db<Posts>("posts")
.join("users", "users.id", "posts.userId")
.select(
"posts.id",
"posts.description",
"posts.imageUrl",
"posts.userId",
"user... |
require 'bitarray'
def count(g)
c = 0
g.each do |row|
c += row.total_set
end
c
end
def neighbors(grid, x, y)
left = x == 0
right = x == grid.length - 1
top = y == 0
bottom = y == grid.length - 1
r = 0
if !top
r += grid[y - 1][x - 1] if !left
r += grid[y - 1][x]
r += grid[y - 1][x ... |
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
public class SoundManager : MonoBehaviour {
/* Variables de audo */
private static AudioClip getCoin;
private static AudioClip getShield;
private static AudioClip shieldDown;
private static AudioCl... |
#!/bin/bash
echo "Installing xrdp-server..."
echo "➜ Updating APT repositories..."
sudo apt -y update
echo
echo "➜ Installing xrdp xorgxrdp xserver-xorg-{video,input}-all..."
sudo apt install -y \
xrdp \
xorgxrdp \
xserver-xorg-video-all \
xserver-xorg-input-all \
|| { echo "Failed to install ne... |
demo How to solve Compilation failure: Provider AnnotationProcessor not found
You can read [The article](https://www.bswen.com/2019/06/java-How-to-solve-Compilation-failure-Provider-AnnotationProcessor-not-found.html) here. |
import { v4 as uuidv4 } from "uuid"
import { DEFAULT_POINT } from "../api_point";
export interface UserParams {
clientId: string
redirectUri: string
}
export class GyazoUser {
userParams: UserParams;
constructor(baseParams: UserParams) {
const { clientId, redirectUri } = baseParams;
thi... |
#ifndef M_H //要使用元对象系统,需在头文件中定义类。
#define M_H
#include<QObject>
class B{public:int i;};
class C{public:int i;};
class D{public:int i;};
Q_DECLARE_METATYPE(B)
Q_DECLARE_METATYPE(C)
//Q_DECLARE_METATYPE(D)
class Z:public QObject{ Q_OBJECT
public: Z(){}
Q_PROPERTY(B b READ fb WRITE gb)
Q_PROPERTY(C c READ fc WR... |
# Quit confirmation dialog
``` python
import webview
if __name__ == '__main__':
# Create a standard webview window
webview.create_window('Confirm Quit Example',
'https://pywebview.flowrl.com/hello',
confirm_quit=True)
``` |
require 'open3'
require 'active_support/all'
require 'date'
require 'octokit'
require 'ruboty/capistrano/version'
require 'ruboty/capistrano/github_repository_validators'
require 'ruboty/handlers/capistrano'
require 'ruboty/capistrano/actions/deployment'
require 'ruboty/capistrano/actions/rollback'
module Ruboty
mod... |
using UnityEngine;
public class StateMachineFunctions : StateMachineBehaviour {
public bool NotifyAnimatorOnFinish;
//notify on animation finish
override public void OnStateExit(Animator animator, AnimatorStateInfo stateInfo, int layerIndex) {
if(NotifyAnimatorOnFinish) animator.gameObject.SendMessage ("Ready"... |
<?php
/**
* Created by PhpStorm.
* User: alan
* Date: 18-11-14
* Time: 下午3:19
*/
namespace App\Tools;
use Monolog\Handler\StreamHandler;
class Logger
{
/** @var Logger */
private static $log;
public static function log($info, $level = \Monolog\Logger::DEBUG)
{
$logPath = realpath(env('S... |
package br.com.brasileiraoapp.viewmodel.list
import android.os.Parcelable
import androidx.lifecycle.MutableLiveData
import br.com.brasileiraoapp.presentation.model.GameModel
import br.com.brasileiraoapp.presentation.model.GameViewResult
import br.com.brasileiraoapp.usecase.ResultError
import br.com.brasileiraoapp.view... |
use comrak::{
nodes::{AstNode, NodeValue},
parse_document, Arena, ComrakOptions,
};
use pulldown_cmark::Options;
use std::fs;
use std::io::{BufWriter, Write};
use crate::script::Isolate;
fn iter_nodes<'a, F>(node: &'a AstNode<'a>, f: &F)
where
F: Fn(&'a AstNode<'a>),
{
f(node);
for c in node.chil... |
<?php
namespace Addon\Quotes\Http\Controllers\DataTable;
use Addon\Quotes\Models\Quote;
use Fusion\Http\Controllers\DataTableController;
class QuoteController extends DataTableController
{
public function builder()
{
return Quote::query();
}
public function getDisplayableColumns()
{
... |
<?php
return [
'date_simple' => "d/m/Y", // The format of the date in the simpliest format
'date_full' => "d/m/Y H:i:s"
];
|
package com.bluebrim.postscript.impl.server.drawingops;
import com.bluebrim.postscript.impl.shared.*;
/**
* Scales the user space in postscript. This is equivalent of concatenating a scaling matrix to the CTM
* (current transform matrix). Make sure to push the graphics state before doing this.
*
* <p><b>Creation ... |
# rust-ffmpeg
基于 ffmpeg v4.2.2 改造
## example
设备信息和编解码列表
```
cargo run --example format
```
编解码详情
```
cargo run --example codec-info h264
```
查看音视频文件元信息
```
cargo run --example metadata examples/resources/audio.ogg
```
视频截帧
```
cargo run --example snapshot examples/resources/mov.mp4
```
编码生成视频
```
cargo run ... |
// using multer and cloudinary to store user uploaded images
const cloudinary = require("cloudinary");
const multer = require("multer");
const cloudinaryStorage = require("multer-storage-cloudinary");
const dotenv = require('dotenv');
dotenv.config()
// load in cloudinary environment variables
cloudinary.config({
... |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Net;
using System.Net.NetworkInformation;
namespace HYKT
{
class NetUtil
{
const string TAG = "NetUtil";
public static bool IsPortInUse(IPAddress ipAd... |
@file:JvmMultifileClass
@file:JvmName("OptionWithValuesKt")
package com.github.ajalt.clikt.parameters.options
import com.github.ajalt.clikt.completion.CompletionCandidates
import com.github.ajalt.clikt.core.BadParameterValue
import com.github.ajalt.clikt.core.Context
import com.github.ajalt.clikt.core.UsageError
impo... |
#!/bin/bash
#
# Redwall
#
# Example Bash script that:
# - looks for JPEG images in a directory (and its subdirectories)
# - filters results to only keep images at least as big as a given resolution
# - chooses a random image
# - detects the dominant color from this image
# - sets the image as a wallpaper using feh
#
# ... |
require 'test_helper'
class FolloweeTest < ActionDispatch::IntegrationTest
include Warden::Test::Helpers
def setup
Warden.test_mode!
@user = users(:chikuwa)
@other_user = users(:shinji)
@nweet = @other_user.nweets.first # nweets(:yesterday)
login_as(@user)
end
test 'show statement if not... |
#include <bits/stdc++.h>
#include "bitfile.cpp"
#include "bitfile.h"
#define ll long long int
using namespace std;
map <int,string> table;
map <string,int> table2;
struct MinHeapNode
{
char data;
unsigned freq;
MinHeapNode *left, *right;
MinHeapNode(char data, unsigned freq)
{
... |
<?php
/**
* sh404SEF - SEO extension for Joomla!
*
* @author Yannick Gaultier
* @copyright (c) Yannick Gaultier - Weeblr llc - 2017
* @package sh404SEF
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
* @version 4.9.2.3552
* @date 2017-06-01
*/
// No Permission
defined('_JEXEC') or ... |
import { QueryHandler } from '@nestjs/cqrs';
import { Inject } from '@nestjs/common';
import { LoginQuery } from './LoginQuery';
import { AuthenticatedView } from '../View/AuthenticatedView';
import { IUserRepository } from 'src/Domain/HumanResource/User/Repository/IUserRepository';
import { IPasswordEncoder } from 'sr... |
import {p256} from '@loopx/crypto/p256';
import {SHA256} from '@loopx/crypto/sha256';
import {oids} from '@loopx/crypto/encoding/oids';
import {algs} from '../algs';
const {curves} = oids;
algs.addAsym({
[curves.P256]: p256,
});
algs.addHash([SHA256]);
|
# Xiaomi Mijia LYWSD03MMC Bluetooth 4.2 Temperature Humidity sensor

First, upgrade your devices with custom firmware described here: https://github.com/atc1441/ATC_MiThermometer
Please replace `FF:FF... |
// Copyright 2020 The XLS 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
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed t... |
# Book List
This book list project uses Redux to manage the state and the list of books to be displayed are hard-coded.
```
> git clone https://github.com/chanddu/Copart-Learning.git
> cd book_list
> npm install
> npm start
```
```
> npm install
> npm start
```
|
package com.msilb.scalanda.restapi.model
sealed trait CandleFormat
object CandleFormat {
case object MidPoint extends CandleFormat {
override def toString = "midpoint"
}
case object BidAsk extends CandleFormat {
override def toString = "bidask"
}
}
|
using System.Collections;
using System.Collections.Generic;
using System.IO;
#if UNITY_EDITOR
using UnityEditor;
#endif
using UnityEngine;
namespace UnityDevTools.Common
{
public static class ScriptableDataUtils
{
public static void SaveScriptableToJSON(string localPath, Object data)
{
... |
#!/usr/bin/env bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
echo ---------------------------------------------
echo Downloading sports-1m-dataset labels...
wget \
-N \
https://raw.githubusercontent.com/gtoderici/sports-1m-dataset/master/labels.txt \
--directory-prefix=${DIR}
echo --------------... |
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using System.Linq;
using UWPResourcesGallery.ResourceModel;
namespace UWPResourcesGallery.ResoureModel.Tests.SourceTests
{
[TestClass]
public class GenericItemsSourceTests : GenericItemsSource<FilterableString>
{
[ClassInitialize]... |
package main
import (
"flag"
"fmt"
"log"
"net/http"
"github.com/PuerkitoBio/goquery"
"encoding/json"
)
type Page struct {
Imgs []string `json: "imgs"`
Links []string `json: "links"`
Videos []string `json: "vids"`
}
// This will get called for each HTML element found
func processIm... |
/**
* @fileoverview Enforce component methods order
* @author Yannick Croissant
*/
'use strict';
var util = require('util');
var Components = require('../util/Components');
/**
* Get the methods order from the default config and the user config
* @param {Object} defaultConfig The default configuration.
* @para... |
require 'oauth/models/consumers/token'
class ConsumerToken
include Mongoid::Document
include Mongoid::Timestamps
include Oauth::Models::Consumers::Token
# You can safely remove this callback if you don't allow login from any of your services
before_create :create_user
field :token, :type => String
fie... |
// 灯光的特性
/***
* 运动
* 颜色
* 强度
* 距离
* 角度
* 附着:漫反射
* 所属:场景
* 融合:多光源效果
*/
import { Object3d } from "../core/Object3d";
import { Vec3 } from '../math/Vec3';
import { Color } from "../core/Color";
export class Light extends Object3d {
public color:Color = new Color(1,1,1,1);
public intensity:number = 1.0;
construct... |
---
layout: post
title: Web-сервер
---
[Основной документ](http://ais2016.github.io/HTTP/)
# Практика (контрольная)
Игра "Жизнь" на PHP (или не PHP, но всё равно через Apache2):
- Начальное положение задаётся накликиванием мышкой.
- Следующая итерация получается после нажатия кнопки.
- Поле минимум 128x128.
- Расчет ... |
require 'open3'
require 'srv/murakumo_activity_check_notifier'
require 'misc/murakumo_const'
module Murakumo
class ActivityChecker
def initialize(address, name, cloud, logger, options)
@address = address
@name = name
@cloud = cloud
@logger = logger
@options = options
# 各種変... |
package hey.rich.edmontonwifi.utils;
import java.util.Comparator;
import hey.rich.edmontonwifi.Objects.Wifi;
/**
* Created by chris on 14/08/14.
*/
public class Sorters {
/**
* Used to compare wifis by name their name in alphabetical order
*/
public static class NameComparator implements Comparat... |
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... |
# Releasing https://glottolog.org
- Checkout the corresponding release of glottolog/glottolog.
- For major or minor releases: create the static archive including the last release:
```shell script
glottolog-app create_archive
tar -czf archive.tgz archive/
```
- initialize the DB running (about 60 mins)
```sh... |
import axios from 'axios'
import { Loading } from 'element-ui'
import { message } from '@/utils/message'
let loadingInstance
const debug = process.env.NODE_ENV !== 'production'
const Http = axios.create({
baseURL: 'http://rap2api.taobao.org/app/mock/288712/',
timeout: 60 * 1000,
withCredentials: true
})
Http.in... |
CREATE TABLE SURVEY.AGENT_REGION (
NAME VARCHAR(255),
REGION VARCHAR(255)
); |
import numpy as np
import random
import torch
from memory_buffer import MemoryBuffer
class Net(torch.nn.Module):
def __init__(self, in_features, n_hidden, out_features):
super().__init__()
self.in_features = in_features
self.out_features = out_features
self.f_internal = torch.r... |
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class CharacterAnimator : MonoBehaviour
{
Animator animator;
FirstPersonController controller;
float speedPercent;
void Start()
{
animator = GetComponentInChildren<Animator>();
controller = GetComponent<FirstPersonControll... |
package no.nav.hjelpemidler.metrics
import no.nav.hjelpemidler.configuration.Configuration
import org.influxdb.dto.Point
import org.slf4j.LoggerFactory
import java.net.URI
import java.net.http.HttpClient
import java.net.http.HttpRequest
import java.net.http.HttpResponse
import java.time.Duration
import java.util.*
imp... |
import { sortByRank, findRankIndex } from './sort';
test('findRankIndex', () => {
const result = findRankIndex('Amos Burton');
expect(result).toBe(1000);
});
test('sortByRank', () => {
const names = [
{ name: 'Amos Burton' },
{ name: 'Jim Holden' },
{ name: 'Captain Sandrine' },
{ name: 'Admiral... |
# Machine-Learning-Algorithms
Repository for All Basic Machine Learning Algorithms
1. [SVM (Spam Filter Implementation)](https://github.com/pranavraikote/ML-SpamFilter) <br>
2. [k-Means Clustering](https://github.com/pranavraikote/ML-KMeans) <br>
3. [Naive Bayes](https://github.com/pranavraikote/ML-NaiveBayes) <br>
4.... |
import { AsyncIterator } from "asynciterator";
import { inject, injectable } from "inversify";
import LDFetch from "ldfetch";
import TravelMode from "../../../enums/TravelMode";
import TYPES from "../../../types";
import IConnection from "../IConnection";
import IConnectionsFetcher from "../IConnectionsFetcher";
import... |
<?php
namespace App\Policies;
use App\Admin;
use App\Productstyle;
use Illuminate\Auth\Access\HandlesAuthorization;
class ProductstylePolicy
{
use HandlesAuthorization;
/**
* Determine whether the user can view the productstyle.
*
* @param \App\User $user
* @param \App\Productstyle $... |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BLTools.CRM2011 {
public interface IOrderDetail : ICrmEntity, IError, IFatalError {
int LineNumber { get; set; }
IProduct Product { get; set; }
int QuantityOrdered { get; set; }
... |
<?php
use Illuminate\Support\Facades\Route;
Route::get('/', function () {
return view('auth.login');
});
Route::middleware('auth')->group(function(){
Route::resource('dashboard','DashboardController');
Route::resource('piket','PiketController');
Route::resource('kumpul_rayon','KumpulRayonController');... |
<?php
namespace App\Http\Controllers\radar;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use App\radar\Mod_Cliente;
use App\User;
use Illuminate\Support\Facades\Hash;
class Con_Usuario extends Controller
{
public function form_usuario()
{
$usuarios = User::join('cliente', 'users... |
package lesson2
/*
* Find the element that exists only 1 time in the array
* */
class OddOccurrencesInArray {
companion object {
@JvmStatic
fun main(args: Array<String>) {
val result = solution(intArrayOf(10,9,8,3,10,9,8,3,4))
println("result : $result")
}
... |
/*
Copyright 2018 Gravitational, 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, soft... |
import { initMixin } from "./init";
// TinyVue 构造函数
function TinyVue(options) {
// 进行初始化
this._init(options);
}
// 混入初始化代码(将初始化的函数一起写在init文件中)
initMixin(TinyVue)
export default TinyVue;
|
module SocialProfile
module People
class InstagramParser < Person
def username
user['username']
end
def last_posts
# RubyInstagramScraper.get_user_media_nodes(self.uid)['items']
user['edge_owner_to_timeline_media'].try(:[], 'edges')
end
def get_post(post_uid... |
import { IApi, IConfig } from '@umijs/types';
export default (api: IApi) => {
const defaultOptions = {
history: { type: 'hash' },
targets: {
ie: 9,
},
// dynamicImport: true,
// dynamicImport: {
// webpackChunkName: true,
// level: 3,
// },
dva: true,
antd: true,
... |
import 'package:test/test.dart';
import 'package:utils/graph.dart';
import 'package:utils/undotree.dart';
String _treeString<T>(UndoTree<T> tree) => treeToString<UndoTreeNode<T>>(
UndoTreeRootNode<T>(tree.tail),
(n) => n.value.visit(
just: (t) => t.toString(),
none: () => 'root',
),
... |
const assert = require('chai').assert;
const index = require('../index');
describe('Sample', function() {
it('tests handler', function(done) {
// Add your test cases here.
assert(true);
done();
});
});
|
unit main;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ExtCtrls,
ComCtrls, StdCtrls, EditBtn, LCLIntF, StrUtils, MD_Label, miscfunc, scanthread;
type
{ TfrmMain }
TfrmMain = class(TForm)
btnGo: TButton;
btnAbout: TButton;
... |
namespace Bitrix24RestApiClient.Core.Models.Response.FieldsResponse
{
public class StringFieldSettings
{
public int? Size { get; set; }
public int? Rows { get; set; }
public string RegExp { get; set; }
public int? MinLength { get; set; }
public int? MaxLength { get; set; }
... |
import React from "react";
import UsersAction from "./UsersAction";
import { initialState } from "./usersReducer";
import UsersState from "./UsersState";
export const UsersContext = React.createContext<{
state: UsersState;
dispatch: (action: UsersAction) => void;
}>({
state: initialState,
dispatch: () => {},
}... |
library helpers;
export "src/helpers/args.dart";
export "src/helpers/csv.dart";
export "src/helpers/default_map.dart";
export "src/helpers/dir.dart";
export "src/helpers/logger.dart";
export "src/helpers/serializable.dart"; |
using System;
using System.Collections.Generic;
namespace Iodd2AmlConverter.Cli.Result
{
/// <summary>
/// Represents a basic result returned by the command line parser.
/// </summary>
public abstract class ParserResult
{
/// <summary>
/// Indicates whether the command line pa... |
package com.g00fy2.developerwidget.base
import androidx.recyclerview.widget.DiffUtil
import androidx.recyclerview.widget.ListAdapter
abstract class BaseAdapter<T, VH : BaseViewHolder<T>> constructor(diffCallback: DiffUtil.ItemCallback<T>) :
ListAdapter<T, VH>(diffCallback) {
private var commitCallback: Runnable?... |
package com.lightning.walletapp.ln.crypto;
import org.spongycastle.crypto.digests.SHA256Digest;
import org.spongycastle.crypto.params.KeyParameter;
import org.spongycastle.crypto.macs.HMac;
public final class Digests {
private static HMac createHmacSha256Digest(byte[] key) {
SHA256Digest digest = new SHA... |
export interface CircularFrameStyle {
border : string;
ratio : number;
status_color: string;
status_text_color : string;
} |
import csv
import logging
import multiprocessing as mp
import os
from threading import current_thread
from concurrent.futures import ProcessPoolExecutor
from progress.bar import Bar
from rx import Observable
from rx import config
from project.lib.data_generator import DataGenerator, generate_data
from project.lib.uti... |
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn it_can_calculate_area_by_function() {
let r = Rectangle {
width: 2,
height: 3,
};
assert_eq!(area_rec(&r), 6);
}
#[test]
fn it_can_calculate_area_by_method() {
let r = Rectangle {
... |
---
title: Uninstallation Guide | KubeDB
description: KubeDB Unistallation Guide
menu:
docs_{{ .version }}:
identifier: uninstallation-guide
name: Uninstall
parent: setup
weight: 20
menu_name: docs_{{ .version }}
---
|
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeFamilies #-}
module Ivory.Tower.Drivers.Display.Fonts where
import Ivory.Language
import Ivory.Stdlib
-- 7 segment font for MAX7219
--
-- -- A --
-- | |
-- F B
-- | |
-- -- G --
-- | |
-- E C... |
package overlay
//go:generate protoc -I.:../../Godeps/_workspace/src/github.com/gogo/protobuf --gogo_out=import_path=github.com/docker/docker/libnetwork/drivers/overlay,Mgogoproto/gogo.proto=github.com/gogo/protobuf/gogoproto:. overlay.proto
import (
"encoding/json"
"net"
"sync"
"github.com/Microsoft/hcsshim"
... |
//
// DLYSimilarImages.h
// simillarty
//
// Created by duly on 2018/11/6.
// Copyright © 2018年 duly. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
typedef double Similarity;
@interface DLYSimilarImages : NSObject
- (void)setImgWithImgA:(UIImage*)imgA ImgB:(UIImage*)imgB;
- (vo... |
#!/bin/sh
# Output path (relative to build sh file)
OutputPath="./build/linux64"
# Assets path (relative to output folder)
AssetsPath="../../assets"
# Include path (relative to output folder)
IncludePath="../../deps/include"
# Lib path (relative to output folder)
LibPath="../../deps/lib/linux64"
# Compiler flags
#... |
import 'package:flutter/material.dart';
class ColorPlate {
static const Color TransparentColor = Colors.transparent;
static const Color BlueColor = Colors.blue;
static const Color WhiteColor = Colors.white;
static const Color BlackColor = Colors.black;
static const Color GrayColor = Colors.grey;
static con... |
package api
import (
"net/http"
"github.com/fernandezvara/certsfor/pkg/client"
"github.com/fernandezvara/rest"
"github.com/julienschmidt/httprouter"
)
// GetStatus GET /status
func (a *API) getStatus(w http.ResponseWriter, r *http.Request, ps httprouter.Params) {
var (
response client.APIStatus
)
response... |
; RUN: llc < %s -mtriple=i686-pc-win32 | FileCheck %s
%Foo = type { i32, i32 }
declare x86_stdcallcc void @foo_byref_stdcall_p(%Foo* byref(%Foo))
declare x86_stdcallcc void @i(i32)
; byref does not imply a stack copy, so this should append 4 bytes,
; not 8.
define void @stdcall(%Foo* %value) {
; CHECK-LABEL: _stdcal... |
# Arnat CZ Adapter for Commitizen
> :sparkles: A [adapter](http://npm.im/arnat-cz) with strong standards Tech industries.
[](https://nodei.co/npm/arnat-cz/)
```shell
? Selecciona el tipo de cambio que estas enviando: (Use arrow keys)
❯ ✨ Feat: ... |
type Getters<Type> = {
[Property in keyof Type as `get${Capitalize<string & Property>}`]: () => Type[Property]
};
interface Person {
name: string;
age: number;
location: string;
}
type LazyPerson = Getters<Person>; |
package org.jid.pruebas.kotlinspringbootmultiplemongodbs.db2.anotherRepo
import org.jid.pruebas.kotlinspringbootmultiplemongodbs.db2.model.Metric3
import org.springframework.data.mongodb.repository.MongoRepository
import org.springframework.stereotype.Repository
@Repository
interface Repo3: MongoRepository<Metric3, S... |
/* Copyright 2009-2019 EPFL, Lausanne */
package stainless
package math
import stainless.annotation._
import stainless.lang.StaticChecks._
@library
final case class Nat(toBigInt: BigInt) { n =>
require(toBigInt >= 0)
def +(m: Nat): Nat = Nat(n.toBigInt + m.toBigInt)
def *(m: Nat): Nat = Nat(n.toBigInt * m.toB... |
package com.agoda.boots.strict
import com.agoda.boots.Bootable
import com.agoda.boots.Key.Companion.multiple
import com.agoda.boots.Key.Companion.single
import org.junit.Test
class SccFinderTest {
val bootable1 = object : Bootable() {
override val key = single("Bootable 1")
override fun boot() {}... |
using Microsoft.AspNet.SignalR;
using Microsoft.AspNet.SignalR.Hubs;
namespace AngularAzureSearch.WebAPI.Hubs
{
[HubName("trailHub")]
public class TrailHub : Hub
{
}
} |
# frozen_string_literal: true
module Kozo
module Commands
class Apply < Plan
self.description = "Execute a plan"
attr_reader :parser, :options
def initialize(configuration, *args)
super(configuration)
@options = {
yes: false,
}
@parser = OptionParse... |
---
title: Search
layout: search.html
index: /ehs/2-3/index.json
product: Enteprise Home Screen
productversion: '2.3'
---
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.