text stringlengths 27 775k |
|---|
import { RequestHandler } from 'express';
import { PistoletConfig } from 'pistolet';
export interface ExpressPistoletConfig extends PistoletConfig {
port: number;
middlewares?: RequestHandler[];
}
|
These files contain implementations of the basic compression algorithms used:
*wilt-compressor
*Arithmetic Coding
*Lempel-Ziv-Welch Compression
*PPMD
*Run-Length Encoding
*LZ4
*SMAZ
...Jesus Christ, I spent an hour choosing these. What the hell is my life?
Also, make sure each file has a header AND a C++ file i... |
//-----------------------------------------------------------------------------
//
//
// File: smproute.h
//
// Description:
// Simple routing header file. Defines a simple/default IMessageRouter
// as well as constants that are defined in rei.h (which currently
// uses the old IMsg).
//
//... |
package org.opentele.server.dgks.monitoringdataset.version1_0_1.generated;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for KramPredictorType complex type.... |
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
import 'package:built_collection/built_collection.dart';
import 'package:mattermost_dart/src/model/plugin_manifest.dart';
import 'package:built_value/built_value.dart';
import 'package:built_value/serializer.dart';
part 'marketplace_plugin.g.dart';
/// MarketplacePlugin
/... |
export const handleDesc = (str: string | null) =>
str?.replace(/<.*?>(.*?)<\/>/g, '**$1**') || '暂无';
|
class Teacher < ActiveRecord::Base
has_many :courses
has_many :students, through: :courses
has_secure_password
validates_presence_of :name, :username, :email, :password
end |
+++
pre = "<b>5.4.1. </b>"
title = "运行部署"
weight = 1
+++
## 部署启动
1. 执行以下命令,编译生成 ShardingSphere-Scaling 和 ShardingSphere-Proxy 二进制包:
```
git clone --depth 1 https://github.com/apache/shardingsphere.git
cd shardingsphere
mvn clean install -Dmaven.javadoc.skip=true -Dcheckstyle.skip=true -Drat.skip=true -Djacoco.skip=t... |
# frozen_string_literal: true
require "assert"
require "hella-redis/connection_pool_spy"
require "hella-redis/connection_spy"
class HellaRedis::ConnectionPoolSpy
class UnitTests < Assert::Context
desc "HellaRedis::ConnectionPoolSpy"
setup do
Assert.stub_tap_on_call(HellaRedis::ConnectionSpy, :new) do... |
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class RunningScript : MonoBehaviour
{
//set speed - didn't make a public var so that I could override with a 'sprint' key
float Speed = 0.1f;
//set sprint speed
float Sprint = 0.5f;
//set obj-specif... |
<?php
require_once 'app/controllers/tools/Request.class.php';
/**
*
*/
final class ControllerFactory
{
private function __construct(){}
public static function createController()
{
$request = new Request();
//echo $request->getPath();
switch ($request->getNextElement()) {
case '':
... |
package secretsyncer
import (
"fmt"
"io/ioutil"
vaultapi "github.com/hashicorp/vault/api"
)
type Syncer struct {
Source Source
Sink Sink
}
type Source interface {
Read() (Data, error)
}
type Sink interface {
WriteSimple(string, SimpleValue) error
WriteCompound(string, CompoundValue) error
Clear() error
... |
---
layout: post
title: "マルコフ過程"
date: 2021-04-02
excerpt: "マルコフ過程について"
kaggle: true
hide_from_post: true
tag: ["markov", "statistics"]
comments: false
---
# マルコフ過程について
## 定常マルコフ連鎖のパラメータ推定
- n -> ∞で以下の状態になる
$$
\pi = \pi Q
$$
Qが判別していればπを求めることができる
## 有限マルコフ連鎖のパラメータ推定
1. ある推移確率がわかっているときその積を計算する
2. logを取り尤度にする
3. 尤... |
SET NOCOUNT ON;
GO
USE DotNetCampusDemoDatabase_Dev1;
GO
IF EXISTS(SELECT 1 FROM sys.objects WHERE object_id = OBJECT_ID('dbo.UserContacts'))
DROP TABLE dbo.UserContacts;
GO
IF EXISTS(SELECT 1 FROM sys.objects WHERE object_id = OBJECT_ID('dbo.Users'))
DROP TABLE dbo.Users;
GO
IF EXISTS(SELECT 1 FROM sys.objects WHERE... |
use std::ffi::CString;
use std::mem::size_of;
use std::os::raw::c_int;
use std::sync::atomic::{AtomicUsize, Ordering};
use super::bindings::{
cef_base_ref_counted_t, cef_browser_settings_t, cef_browser_view_create,
cef_browser_view_delegate_t, cef_client_t, cef_dictionary_value_create, cef_image_create,
ce... |
//SCRIPT PARA A FUNÇÃO DE VISUALIZAR SENHA NO LOGIN
$(document).ready(function () {
$("#showPassword").on("click", function () {
var passwordField = $("#password");
var passwordFieldType = passwordField.attr("type");
if (passwordFieldType == "password") {
passwordField.attr("type... |
# Global Uninitialized Statics in Rust
Published May 30th, 2017
Before we jump into things I want to put the following disclaimer:
> Uninitialized Global Statics are generally not what you want to have in Rust.
> In fact if this is the first thing you're reaching for you might want to
> rethink your design.
Why thou... |
using System;
using Azos.Data;
using Azos.Log;
using Azos.Serialization.Arow;
using Azos.Sky.Social.Graph.Server.Data;
using Azos.Sky.Workers;
using Azos.Sky.Mdb;
namespace Azos.Sky.Social.Graph.Server.Workers
{
[Arow]
[TodoQueue(SocialConsts.TQ_EVT_SUB_REMOVE, "A0BE51EB-E20B-4AC3-8615-86E6EDDB62BA")]
public ... |
@extends('reservation.layout')
@section('content')
<div class="row">
<br>
<br>
<div class="col-lg-12 margin-tb">
<div class="pull-left">
<h2>Ateliers</h2>
</div>
<div class="pull-right">
<a class="btn btn-primary" href... |
import { ILogger } from './ILogger';
import { injectable } from 'inversify';
@injectable()
export class ConsoleLogger implements ILogger {
debug(message: string): void {
console.debug(`DEBUG: ${message}`);
}
error(message: string): void {
console.error(`ERROR: ${message}`);
}
info(message: string): v... |
#!/bin/bash
# Run tests in golang docker container
go get -d -v
pushd bin
go get -d -v
popd
go test -test.v --running_under_docker
|
from typing import Dict, List, Tuple, Union
import cv2
import numpy as np
import json
class CropOptions:
CROP = 0
PRESERVE = 1
class PosOptions:
CENTER = 0
START = 1
END = 2
def getPos(x: Union[int, float], dx: Union[int, float], opt) -> Tuple[int, int]:
opt = int(opt)
if(opt == PosOpt... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import psutil
from common import bytes2human, right_text, title_text, tiny_font
def render(draw, width, height):
df = psutil.disk_usage("/")
margin = 3
title_text(draw, margin, width, text="Disk")
draw.text((margin, 20), text="Used:", font=tiny_font, fi... |
! written by jxzou at 20201209: move some subroutines from bas_gms2molcas.f90 to this file
! updated by jxzou at 20210222: merge subroutine read_prim_gau1 and read_prim_gau2
module pg
implicit none
integer :: natom ! the number of atoms
integer :: highest ! highest angular momentum
integer, parameter :: iout... |
#!/bin/bash
#
# centos7 イメージ上で、sshdを開始する
#
set -e
touch /etc/rc.d/init.d/functions
echo "create host's key"
bash -x /usr/sbin/sshd-keygen
echo "start sshd daemon"
/usr/sbin/sshd -D &
echo "create users key pair."
ssh-keygen -t rsa -m PEM -N "" -f ~/.ssh/id_rsa
echo "set authorized_keys"
cat ~/.ssh/id_rsa.pub >> ... |
#Installing YARN
apt update -y
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list
.d/yarn.list
apt-get update && sudo apt-get install yarn
#Installing NodeJS
curl -sL https://deb.nodesource.com/setup_6.x | sudo -... |
package chrome.alarms.bindings
import chrome.events.bindings.Event
import scala.scalajs.js
import scala.scalajs.js.annotation.JSGlobal
@js.native
@JSGlobal("chrome.alarms")
object Alarms extends js.Object {
val onAlarm: Event[js.Function1[Alarm, _]] = js.native
def create(name: String = "", alarmInfo: AlarmInf... |
package com.github.bbantonia.webserver.logging;
import com.github.bbantonia.webserver.config.Config;
public abstract class AbstractLogger implements Logger {
protected AbstractLogger() {}
protected final boolean shouldLog(LogLevel intent) {
LogLevel.LogLevelComparator comparator = new LogLevel.LogLe... |
var searchData=
[
['open',['Open',['../struct_serial_interface.html#ab506189cbcec1de46dfc75142fb82068',1,'SerialInterface']]]
];
|
# RandomizeList
Randomize a list of ASCII text: mix the lines. (Finished, tutorial).
|
package it.unibo.sc.activities
import android.os.Bundle
import androidx.activity.viewModels
import androidx.appcompat.app.AppCompatActivity
import androidx.lifecycle.lifecycleScope
import androidx.recyclerview.widget.LinearLayoutManager
import it.unibo.sc.adapters.ProductShelfAdapter
import it.unibo.sc.databinding.Act... |
# frozen_string_literal: true
namespace :html5_validator do
desc 'each run of test generates html files for validation, ' \
'cleanup previous generated files'
task flush_cached_responses: :environment do
puts 'run flush_cached_responses'
Html5Validator.flush_cached_responses
end
desc 'run html5... |
from django.urls import path, include
from . import views
urlpatterns = [
path('', views.index),
path('results',views.results),
# path('get_portfolio',views.get_portfolio),
path('collect_user_data',views.collect_user_data),
# path('style', views.styles),
]
|
---
layout: post
title: 自定义Django内置的User系统
categories: [后端]
tags: []
date: 2019-11-10 11:48:07
comments: true
---
#### 自定义User系统步骤
Django内置的User系统可以帮我们完成后台用户验证,授权,非常强大。
但内置的User系统验证是以Username和Password,也就是Username是unique,而我们常用的是手机号或者邮箱是来验证。而且内置的User还有一些字段如:first_name,last_name等等也不符合我们的需求。
所以我们需要来改写AbstractBaseUser来自... |
package club.broking.cdn.servlets.products;
import club.broking.cdn.models.Product;
import club.broking.cdn.models.ProductAccessor;
import club.broking.cdn.services.CassandraService;
import club.broking.cdn.servlets.AbstractJsonServlet;
import com.datastax.driver.mapping.MappingManager;
import java.util.List;
public... |
---
uid: System.Xml.Serialization.XmlNamespaceDeclarationsAttribute
---
---
uid: System.Xml.Serialization.XmlNamespaceDeclarationsAttribute.#ctor
---
|
# Change Log
## 0.2.1
- Small fix to standardize the namespace used for both configuration and command.
## 0.2.0
- Added feature to automatically run the command when an editor with the specified language is activated.
## 0.1.1
- Use `registerTextEditorCommand` instead of `registerCommand`.
## 0.1.0
- Initial r... |
# frozen_string_literal: true
module Resolvers
class TopicsResolver < BaseResolver
type Types::Projects::TopicType, null: true
argument :search, GraphQL::Types::String,
required: false,
description: 'Search query for topic name.'
def resolve(**args)
if args[:search].pres... |
# Copyright (C) 2019-2020 Greenweaves Software Limited
# 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, modify, me... |
package redbot.discord.impl.d4j
import java.awt.Color
import discord4j.core.`object`.entity.{GuildChannel, MessageChannel, PrivateChannel, TextChannel}
import discord4j.core.`object`.presence.{Activity, Presence}
import discord4j.core.`object`.util.{Permission, Snowflake}
import discord4j.core.`object`.{entity => d4j... |
package com.tiarebalbi.opala.models.compiler
import java.io.File
import java.time.Duration
/**
* Compilation summary
*
* @author Tiarê Balbi Bonamini
* @version 1.0.0
*/
data class Summary(
val duration: Duration,
val compiledFiles: Set<File>
) |
{-# LANGUAGE DeriveDataTypeable #-}
module F where
import Data.Typeable
import Language.Inferno.Solver (TermVar)
data Ty b a =
TyVar a
| TyBool
| TyArrow (Ty a b) (Ty a b)
| TyProduct (Ty a b) (Ty a b)
| TyForall b (Ty a b)
| TyMu b (Ty b a)
-- skip rectypes for now
deriving (Eq, Show, Typ... |
# --- Created by Ebean DDL
# To stop Ebean DDL generation, remove this comment and start using Evolutions
# --- !Ups
create table genre (
id bigserial not null,
name varchar(255),
constraint pk_genre primary key (id))
;
create table movie (
id ... |
package org.nearbyshops.enduserappnew.EditDataScreens.EditItem;
import android.content.Context;
import android.graphics.drawable.Drawable;
import android.view.LayoutInflater;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.widget.I... |
"use strict";
class MessageControls {
constructor() {
this.DOM = document.createElement("div");
this.DOM.classList.add("messageControls");
this.input = document.createElement("input");
this.input.classList.add("messageInput");
this.input.placeholder = "message";
th... |
package invdapi
import (
"errors"
"strconv"
"github.com/Invoiced/invoiced-go/invdendpoint"
)
type File struct {
*Connection
*invdendpoint.File
}
type Files []*File
func (c *Connection) NewFile() *File {
file := new(invdendpoint.File)
return &File{c, file}
}
func (c *File) Create(file *File) (*File, error) ... |
<?php
/*
CONNECT-DB.PHP
PHP to connect to your database
*/
$server = 'localhost';
$user = 'kadyszew_johnk';
$pass = 'Steven12';
$db = 'kadyszew_bio';
$connection = mysql_connect($server, $user, $pass)
or die ("Could not connect to server ... \n" . mysql_error ());
mysql_select_db($db)
or die ("Could not c... |
const $ = require('jquery');
const _ = require('underscore');
const Backbone = require('backbone');
const examples = require('../examples/index');
const applicationRouter = require('./router');
require('../style/app.less');
var HomeView = Backbone.View.extend({
el: '#view-container',
template: _.template([
... |
#[test]
fn adder_go() {
elrond_wasm_debug::mandos_go("mandos/bmi-token.scen.json");
}
|
import semver from "semver";
export const isValidBumpArg = (bumpArg: string): boolean => {
const validBumpArgs = new Set(["patch", "minor", "major", "from-package"]);
// If it isn't a bumpArg in the set and isn't a semver version number
if (!validBumpArgs.has(bumpArg) && !semver.valid(bumpArg)) {
return fal... |
{-|
[@ISO639-1@] fr
[@ISO639-2B@] fre
[@ISO639-3@] fra
[@Native name@] Français
[@English name@] French
-}
module Text.Numeral.Language.FRA.TestData (cardinals, ordinals) where
--------------------------------------------------------------------------------
-- Imports
-----------------... |
/*
* Field
*
* Controls the aspects of the field, but doesn't display it
*/
import $ from "jquery";
import { FieldMap } from "./FieldMap";
import {
FieldDefaultWidth,
FieldDefaultHeight,
FieldDefaultHiddenRows,
PuyoType,
SimulationDefaultPuyoToClear,
} from "../constants";
import { PuyoSim } from "../Puy... |
package no.nav.fo.veilarbregistrering.arbeidssoker.resources
import io.swagger.v3.oas.annotations.Operation
import io.swagger.v3.oas.annotations.Parameter
import io.swagger.v3.oas.annotations.responses.ApiResponse
import io.swagger.v3.oas.annotations.responses.ApiResponses
import io.swagger.v3.oas.annotations.tags.Tag... |
@extends('backoffice.template.mainBack')
@section('baka')
<h2 class="page-section-heading text-center text-uppercase py-5">Modifiez les informations générales</h2>
<section class="container">
@if ($errors->any())
<div class="container alert alert-danger">
<ul>
@foreach ... |
#!/bin/bash
if [ "$#" -lt 1 ]
then
printf "\n Usage: cCompiler <input.js> <output.js> \n\n"
exit 1
fi
INPUT=$1
OUTPUT=$2
if [ ! -e "$INPUT" ]
then
printf "\nCLOSURE COMPILER - Error: INPUT file '$INPUT' not found.\n\n"
exit 1
fi
CLOSURE_COMPILER=closure-compiler-v20170218.jar
# Create default output fi... |
#!/bin/sh
curl="curl -S -s"
url="http://localhost:55732"
metricJson='{
"name": "MyCounter",
"description": "this is my metric",
"units": "Count"
}'
metricId=`$curl -XPOST -d "$metricJson" $url/metric | jq -r .data.id`
echo MetridId: $metricId
dataJson1='{
"metricId": "'"$metricId"'",
"value": 10,
"times... |
//
//! Copyright 2020 Alibaba Group Holding Limited.
//!
//! 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 appl... |
package com.openlattice.linking
import com.openlattice.data.EntityDataKey
import java.util.*
/**
* @author Drew Bailey (drew@openlattice.com)
* Wrapper for Pair<EntityDataKey, Map<EntityDataKey, Map<UUID, Set<Any>>>
*/
data class Block(
val entityDataKey: EntityDataKey,
val entities: Map<EntityData... |
# PDM Trust-Loader
Web Loader for the Wallet User Interface
#include "./workdocs/howitworks.md" |
#!/bin/bash
sudo apt-get install python3
sudo apt-get install python3-pip
sudo pip3 install flask tensorflow |
# Kasa.Vchasno
Client integrated with ```Microsoft.Extensions.DependencyInjection```
and designed to use with IHttpClientFactory
|
<?php
namespace common\modules\user\models;
use Yii;
use yii\base\Model;
class Teacher extends Model{
public $email;
public $username;
public $password;
public $confirmPassword;
public $fname;
public $lname;
public $tel;
public function rules()
{
return[
... |
package com.tek271.util2.reflection;
import org.joor.Reflect;
import java.lang.reflect.Method;
import java.util.HashSet;
import java.util.Set;
import java.util.stream.Collectors;
import static com.google.common.collect.Sets.newHashSet;
import static org.joor.Reflect.on;
public class MethodReflector<T> {
private fi... |
package id.derysudrajat.easyadapter
import android.view.View
import android.view.ViewGroup
import androidx.recyclerview.widget.RecyclerView
import androidx.viewbinding.ViewBinding
abstract class EasyAdapter<T, Binding : ViewBinding>(
private val data: MutableList<T>,
) : RecyclerView.Adapter<EasyAdapter.ViewHolde... |
/*
* 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 ... |
/**
* *************************************************
* Copyright (c) 2019, Grindrod Bank Limited
* License MIT: https://opensource.org/licenses/MIT
* **************************************************
*/
package za.co.grindrodbank.security.service.accesstokenpermissions;
public interface AccessTokenPer... |
module Chewy::Web
class Configuration
attr_accessor :redis, :queue, :max_history
def initialize
@queue = :chewy_web
@max_history = 20
end
end
end
|
using Azure.Data.AppConfiguration;
using Azure.Sdk.Tools.CheckEnforcer.Configuration;
using Microsoft.Extensions.Azure;
using System;
using System.Collections.Generic;
using System.Text;
namespace Azure.Sdk.Tools.CheckEnforcer
{
public class GlobalConfigurationProvider : IGlobalConfigurationProvider
{
... |
Authors:
- [Josh Speagle](https://github.com/joshspeagle)
Contributors:
- [Gus Beane](https://github.com/gusbeane)
- [Catherine Zucker](https://github.com/catherinezucker)
- [Phil Cargile](https://github.com/pacargile)
- [Greg Green](https://github.com/gregreen)
- [Ben Johnson](https://github.com/bd-j)
- [Eddie Schl... |
#!/usr/bin/env bash
## test ci
echo "$DOCKER_PASSWORD" | docker login --username "$DOCKER_USERNAME" --password-stdin
docker build --tag odyseeteam/commentron:$TRAVIS_BRANCH ./
docker push odyseeteam/commentron:$TRAVIS_BRANCH |
#!/bin/bash
# Adapted from https://gist.github.com/domenic/ec8b0fc8ab45f39403dd
set -e
REPO=`git config remote.origin.url`
SSH_REPO=${REPO/https:\/\/github.com\//git@github.com:}
cd scripts/deploy
# Get the deploy key by using Travis's stored variables to decrypt deploy_key.enc
ENCRYPTED_KEY_VAR="encrypted_${ENCRYP... |
## Release 1.4.0
### Summary
First Puppet Labs supported release of this module! Contains new features and bug fixes for tests.
#### Features:
- New readme file added for tests. Also several new tests added.
- Addition of handling in tests to run with Debian 8.
#### Bug Fixes:
- Tests tweaked to handle several Debian... |
-- SELECT * FROM HR.EMPLOYEES;
declare
-- store the retive data in bellow varible
f_name varchar(20);
l_name varchar(20);
begin
select FIRST_NAME,LAST_NAME into f_name,l_name
FROM HR.EMPLOYEES
WHERE EMPLOYEE_ID=100000;
-- output of the varible
dbms_output.put_line(f_name|| ' ' || l_name... |
Ore-Ore Language
================
A ultra primitive programming language that is a bit like Lisp
* [Demo](https://yamahei.github.io/orelang/index.html)
Overview
--------

* JavaScript製オレオレ言語の実行環境
* Lisp風?文法
* FizzBuzzまでは動いた
* 構文木からフローチャート描画
* [Viz.js](http://viz-js.com/)を利用
Usage
-... |
/*
SQL Exercise:
Name: Average Population. [Easy]
Link: https://www.hackerrank.com/challenges/average-population/problem
*/
SELECT FLOOR(AVG(POPULATION))
FROM CITY; |
#!/usr/bin/env python
# requirements: apt install git wget python gcc flex bison make
import platform
import subprocess
if subprocess.call('which sudo', shell=True) == 0:
with_sudo = 'sudo '
else:
with_sudo = ''
major = int(platform.release().split('.')[0])
minor = int(platform.release().split('.')[1])
rev... |
import 'package:flutter/material.dart';
import 'package:pikapika/basic/Method.dart';
import 'package:pikapika/screens/components/ContentLoading.dart';
import '../basic/Common.dart';
import 'components/RightClickPop.dart';
class ModifyPasswordScreen extends StatefulWidget {
const ModifyPasswordScreen({Key? key}) : s... |
// Reference - https://kotlinlang.org/docs/reference/using-gradle.html
// Update at 20190705
import org.jetbrains.kotlin.gradle.plugin.KotlinSourceSet
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
group = "shijian.su"
version = "0.0.1-SNAPSHOT"
plugins {
kotlin("jvm") version "1.3.41"
}
repositories {
... |
#!/bin/bash
USAGE_TXT="
usage: $0
This is a front-end for Linux- and MacOS- maxiconda installers.
It fetches the appropriate and most recent maxiconda installer for the
current OS/CPU, checks the SHA256 signature and then runs it.
"
OS=`uname -s`
case $OS in
"Linux")
OS_NAME="Linux"
;;
"Da... |
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
; RUN: llc -mtriple=thumbv8.1m.main-none-eabi -mattr=+mve -o - %s | FileCheck %s
; RUN: llc -mtriple=thumbv8.1m.main-none-eabi -mattr=+mve.fp -o - %s | FileCheck --check-prefix=CHECK --check-prefix=CHECK-FP %s
define <16 x i8> @vector_add_i8... |
# Introduction
This is the technical handbook for [Wazimap NG](https://openup.org.za/products/wazimap-ng)
This is intended for
* Profile administrators - how to configure profiles
* Developers - how we work on this project.
Profile administrators should see the [Profile Curation Guide](https://openup.gitbook.io/waz... |
require 'rails_helper'
RSpec.describe Storage, type: :model do
fixtures :bots
fixtures :users
fixtures :storages
let :storage do
Storage.find(1)
end
describe '#bot' do
it 'Presence' do
expect(storage).to validate_presence_of(:bot)
end
end
end
|
<?php
namespace Easyutil\Utilities;
class Status
{
/** const SUCCESS constante responsável pela resposta de Sucesso nas requisições */
const SUCCESS = 00;
/** const UNAUTHORIZED constante responsável pela resposta de Inautorizado nas requisições */
const ERROR = 01;
/** const ERROR_VALIDATION co... |
package com.akinci.recipelist.features.listing.di
import com.akinci.recipelist.BuildConfig
import com.akinci.recipelist.common.di.AppModule
import com.akinci.recipelist.common.network.NetworkChecker
import com.akinci.recipelist.features.listing.data.api.ContentService
import com.akinci.recipelist.features.acommon.data... |
# PCB's ontwerpen
## **Voorkennis**
heel weinig tot geen voorkennis
de les was zeer theoretisch en soms moeilijk om te volgen
soms ook langdraadig
Tip: de les van AppInventor was zeer praktijk ingesteld en iedereen was makkelijk mee
##**Les**

|
const len: u32 = 8;
pub fn main() {
calculate_passwords(245182, 790572);
}
fn calculate_passwords(min: u32, max: u32) {
let mut valid_passwords = 0;
for password in min..max+1 {
if validate_password(password) {
valid_passwords += 1
}
}
println!("valid passwords: {}", va... |
@{
Layout = "_Layout";
}
@using HairSalon.Models;
@model HairSalon.Models.Stylist;
<h2>Stylist Details</h2>
<br>
<h3>@Html.DisplayNameFor(model => model.Name): @Html.DisplayFor(model => model.Name)</h3>
@if(@Model.Clients.Count == 0)
{
<p>This stylist currently has no clients.</p>
}
@foreach (Client client in @M... |
// Generate map pins :
// medium.com/welldone-software/map-pins-using-svg-path-9fdfebb74501
// The pin is defined by 4 points :
// - A is the tip of the pin
// - C is the center of the circle (top part of the pin)
// - B (left) and D (right) are the two points where the circle
// connects with the straight line... |
namespace Grimoire.Line.Api.Webhook.Event
{
public record UnFollowEvent : BaseEvent
{
}
} |
# ZPSnowing
本Demo主要介绍如何利用CADisplayLink定时器来实现下雪动画的。
视频路径:小马哥视频2015年(没加密版)——>03-UI进阶——>0617-Quartz2D——>视频——>10-定时器(雪花)_.mkv。
|
<?php
namespace Drupal\commerce_order;
use Drupal\commerce_order\Entity\OrderInterface;
use Drupal\commerce_price\Calculator;
use Drupal\commerce_price\Price;
use Drupal\commerce_price\RounderInterface;
use Drupal\Core\Entity\EntityTypeManagerInterface;
class PriceSplitter implements PriceSplitterInterface {
/**
... |
"""
This file not meant to be modified to configure a local nor a production instance.
To configure the instance, please consider:
- editing a ".env" file at the root of the "oxe-api" directory
- passing the environment variables via "-e" flag if you use a docker container
"""
import os
from dotenv import load_... |
package org.clulab.pdf2txt.preprocessor
import org.clulab.pdf2txt.common.utils.{Test, TextRange}
class ParagraphPreprocessorTest extends Test {
val preprocessor = new ParagraphPreprocessor()
behavior of "ParagraphPreprocessor"
def test(inputText: String, expectedOutputText: String): Unit = {
it should s"c... |
<?php
namespace Pecee\Translation\Providers;
interface ITranslationProvider
{
/**
* Called when looking up single key
* @param string $key
* @return string
*/
public function lookup($key);
/**
* Init method
* @param string $locale
*/
public function load($locale);
} |
#include "MFRCTagReader.h"
bool MFRCTagReader::begin() {
#ifdef MFRC_SIGNAL_PIN
pinMode(MFRC_SIGNAL_PIN, OUTPUT);
digitalWrite(MFRC_SIGNAL_PIN, LOW);
#endif
device->PCD_SoftPowerDown();
device->PCD_SoftPowerUp();
device->PCD_Reset();
device->PCD_Init();
const bool selfTestOk = dev... |
package matcher
func (m *Matcher) Package(input string) bool {
return m.packageName.MatchString(input)
}
|
learningruby
============
learningruby
Revising and perfecting OOP
|
package main
import (
"fmt"
"os"
"path/filepath"
"strings"
"github.com/mitchellh/cli"
"github.com/shirou/gopsutil/process"
)
type uninstallCommand struct{}
func (i *uninstallCommand) Help() string {
return ""
}
func (i *uninstallCommand) Synopsis() string {
return "uninstalls kite"
}
func (i *uninstallCom... |
/**
* Person.js
*
* @description :: TODO: You might write a short summary of how this model works and what it represents here.
* @docs :: http://sailsjs.org/documentation/concepts/models-and-orm/models
*/
module.exports = {
schema: true,
attributes: {
// ADDRESS
city : 'string',
... |
package common;
import static org.junit.jupiter.api.DynamicTest.dynamicTest;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Stream;
import org.junit.jupiter.api.DynamicTest;
import org.junit.jupiter.api.TestFactory;
/**
* Common test implementation for all type and field remove tests.
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.