text stringlengths 27 775k |
|---|
const _ = require('lodash');
const helper = require('./helper');
const node = require('./node');
module.exports = {
one(schema, driver, criteria, doc, options, cb) {
const updates = _.merge(_.pick(doc, _.keys(criteria)), criteria);
let match_clause = `MATCH (doc:${helper.getLabel(doc)} {m_id: '${doc._id}'... |
# CraftCMS Locations Locator Plugin
> still in development...
A CraftCMS plugin which allows you to add a location finder to your pages.
## Instructions coming soon...
## License
MIT License - Created by [jamescgarrett](https://github.com/jamescgarrett/craftcms-locations) |
use num::*;
use sound::*;
use std::fmt;
use std::ops::{Div, Mul};
/// unison (1:1)
pub const INTERVAL_UNISON: Interval = Interval {
numerator: 1,
denominator: 1,
ratio: 1.0,
reciprocal: 1.0,
};
/// Harmonic musical interval (of frequencies), represented by a rational number.
#[derive(Debug, Copy, Clon... |
import styled from 'styled-components';
export const Container = styled.div`
align-items: center;
background: rgba( 136, 237, 196, 0.6 );
display: flex;
height: 100%;
justify-content: center;
left: 0;
position: fixed;
top: 0;
width: 100%;
@media (max-width: 500px) {
box-sizing: border-box;
... |
<?php declare(strict_types=1);
namespace PHPLLVM\Type;
use PHPLLVM\Type;
interface Element extends Type {
public function getElementType(): Type;
} |
<?php
/**
* Created by PhpStorm.
* User: YingQuan-han
* Date: 2018/11/1
* Time: 10:06
*/
namespace App\Models;
use Laravel\Passport\HasApiTokens;
use Illuminate\Notifications\Notifiable;
use Illuminate\Foundation\Auth\User as Authenticatable;
class User extends Authenticatable
{
use HasApiTokens, Notifiable... |
---
layout: post
title: web.dev LIVE wrap-up
subhead: >
A summary of the major news and updates that were announced during our
3-day online community event, and a reminder about upcoming regional events.
description: >
A summary of the major news and updates that were announced during our
3-day online community... |
mod instructions;
use rand::SeedableRng;
use rand::rngs::SmallRng;
use crate::apu::Apu;
use crate::gpu::Gpu;
use crate::rom::Rom;
use crate::util::*;
use instructions::*;
pub struct Cpu {
/// CPU registers
regs: Registers,
/// The `ROM` / `RAM` memory, it has a size of 64 KB
memory: Vec<u8>,
///... |
import 'dart:async';
import 'dart:html' as html;
import 'dart:js_util' as jsutil;
import 'package:flutter/services.dart';
import '../interface/media_stream.dart';
import '../interface/rtc_video_renderer.dart';
import 'media_stream_impl.dart';
import 'ui_fake.dart' if (dart.library.html) 'dart:ui' as ui;
// An error ... |
package react.redux
import react.*
import redux.*
fun RBuilder.provider(store: Store<*, *, *>, handler: RHandler<ProviderProps>) =
child<ProviderProps, Provider> {
attrs.store = store
handler()
}
|
import { useStaticQuery, graphql } from 'gatsby';
let cachedImages: any = null;
export const queryImages = (...names: string[]) => {
const images = (cachedImages =
cachedImages ||
useStaticQuery(graphql`
query {
allFile(filter: { relativePath: { glob: "assets/*.(jpg|JPG)" } }) {
node... |
---
layout: post
title: testig things
---
## This
This is very nice!
* one
* two
* three |
(defpackage #:mariko-examples
(:use #:cl)
(:export #:tile-map-test
#:basic-sprite-test
#:anim-test))
|
# WarnableModels
require File.dirname(__FILE__) + '/warnings'
module Freegenie
module WarnableModels
module ClassMethods
def acts_as_warnable(options={})
class_eval("@@warnable_options = #{options.inspect}")
send :include, InstanceMethods
before_save :load_w... |
#![allow(unused)]
use std::{borrow::Cow, cmp::Ordering};
use proc_macro2::{Ident, TokenStream};
use syn::{punctuated::Punctuated, token::Comma, Attribute, FnArg, ItemFn};
use crate::path::PathOperation;
#[cfg(feature = "actix_extras")]
pub mod actix;
#[cfg(feature = "rocket_extras")]
pub mod rocket;
#[cfg_attr(feat... |
{-# LANGUAGE FlexibleContexts #-}
import Control.Monad.Memo
main = print $ startEvalMemo (getNumberOfPaths 30 30)
getNumberOfPaths :: (MonadMemo (Integer, Integer) Integer m) => Integer -> Integer -> m Integer
getNumberOfPaths 0 _ = return 1
getNumberOfPaths _ 0 = return 1
getNumberOfPaths x y = do
n1 <- for2 memo... |
#!/bin/bash
/opt/symform/SymformNode.sh service contrib 2> /dev/null &
/opt/symform/SymformNode.sh service sync 2> /dev/null &
/opt/symform/SymformNode.sh service web 2> /dev/null &
C="0"
symform_pid () {
PID=$(ps aux | egrep -i "symform(sync|web|contrib)" | grep -v exe| awk '{ print $2 }')
if [[ $(echo $PID | wc ... |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using VideoRentalApp.Models;
using VideoRentalApp.ViewModels;
using System.Data.Entity;
namespace VideoRentalApp.Controllers
{
public class MoviesController : Controller
{
// ----------- with dat... |
//! STUN client and server structs and functions.
pub mod async_stun_client;
pub mod async_stun_server;
|
# gridijkstra
Python package wrapping scipy's dijkstra with a grid-based interface
```python
>>> import gridijkstra
>>> import numpy as np
>>> costs = np.ones((50, 60))
>>> costs[10:15, :20] = 1e30 # np.inf also works, but is less convenient for plotting
>>> costs[20:25, 25:55] = 1e30
>>> costs[30:40, 30:40] = 1e30
>... |
# Connect-AzAccount #dont worry if already logedin
#check the sandbox subcriptions ID
# Get-AzSubscription
$conciergesub = Get-AzSubscription -SubscriptionName "Concierge Subscription"
$conciergesub.Id
# set the context sandbox
$context = Get-AzSubscription -SubscriptionId $conciergesub.Id
Set-AzContext $context
# ... |
export {hasViewportRelativeCoordinates} from './hasViewportRelativeCoordinates';
export {isTouchEvent} from './isTouchEvent';
|
/*
* Copyright (C) Hao Feng
*/
import sbt.Credentials
import sbt.Keys.{ credentials, publishTo }
lazy val common = Seq(
organization := "io.0ops",
version := "2.4.4",
scalaVersion := "2.11.12",
/* BuildPaths.defaultGlobalBase => ~/.sbt */
credentials += Credentials(BuildPaths.defaultGlobalBase / ".creden... |
use std::prelude::v1::*;
use teaclave_attestation::verifier;
use teaclave_config::RuntimeConfig;
use teaclave_config::BUILD_CONFIG;
use teaclave_proto::teaclave_access_control_service::*;
use teaclave_rpc::config::SgxTrustedTlsClientConfig;
use teaclave_rpc::endpoint::Endpoint;
use teaclave_types::EnclaveInfo;
pub fn ... |
# frozen_string_literal: true
require File.expand_path("base", File.dirname(__FILE__))
Daemons::Base.new("auto_cancel").start do
canceler = AutoCanceler.new
canceler.cancel_reservations
sleep 1.minute.to_i
end
|
package planit.planitPages.loginPage;
import org.openqa.selenium.By;
public class LoginPageLocators {
protected String releaseManagerUser = "RMP_bot_testing_Manager";
protected String releaseManagerPassword = "RMP121PMP2000";
By loginField = By.name("login");
By passwordField = By.name("password");... |
//import "angular";
//import "angular-route";
//import "angular-aria";
//import "angular-animate";
//import "../../deps/angular-material.min.js";
import "../../tmp/templates/templates"
import RouteConfig from "./routes/routeConfig";
import "./constants/constants.module";
import "./persistence/persistence.module";
imp... |
module Eternity.Foldl.General
where
import Eternity.Prelude hiding (maximum)
import Control.Foldl
import qualified Data.Attoparsec.Text as B
parsing :: B.Parser parsed -> Fold (Either Text parsed) folded -> Fold Text folded
parsing parser =
premap (bimap fromString id . B.parseOnly parser)
ignoringLeft :: Fold ri... |
# todo-list lab
Project for COMP4711 lab 5, lab 6, lab 7, lab 8, Fall 2017
Start date:
12, Oct, 2017 -- lab5 Todo List (Working With Models & Views)
19, Oct, 2017 -- lab6 Building Out Our TODO List Manager
02, Nov, 2017 -- lab7 Unit Testing for Our TODO List Manager
16, Nov, 2017 -- lab8 A Taste of X... |
package com.team9.motors.controller;
import java.util.List;
import javax.validation.Valid;
import com.team9.motors.interfacemethods.InventoryInterface;
import com.team9.motors.interfacemethods.ProductInterface;
import com.team9.motors.interfacemethods.StockUsageInventoryInterface;
import com.team9.motors.in... |
import 'dotenv/config';
export = {
host: process.env.DB_HOST,
username: process.env.POSTGRES_USER,
password: process.env.POSTGRES_PASSWORD,
database: 'discord-bot',
dialect: 'postgres',
logging: false,
pool: { max: 40, min: 2, acquire: 20000, idle: 5000 },
retry: { max: 10 }
};
|
package org.cqfn.save.api
/**
* Authorization data
*
* @property userInformation user source and name, separated by `@`
* @property token
*/
data class Authorization(
val userInformation: String,
val token: String? = null
)
|
#
# Cookbook Name:: bacula-server
# Recipe:: storage
#
# Copyright 2015 Pavel Yudin
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unle... |
# https://github.com/kingreza/quantization
# Create several different smaller models of
# the original model from CoreML
import coremltools
mode_name = "MegaNic50"
model = coremltools.models.MLModel(mode_name+".mlmodel")
functions = ["linear", "linear_lut", "kmeans"]
for function in functions :
for bit in [16,... |
# mosn.io
Source for mosn.io site <https://mosn.io>.
Powered by [hugo](https://gohugo.io) with [docsy theme](https://github.com/google/docsy).
## Notice
This webiste is built under hugo version v0.55.5-A83256B9C/extended. There may be unknown errors when compiling on other versions. |
using ClassificationTree.Infraestructure.Base;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Wrapper.Spacy;
using static ClassificationTree.Infraestructure.Base.IFunction;
using static ClassificationTree.Infraestructure.Base.IMoviments;
namespace ClassificationTr... |
/*
Copyright (c) 2005-2021 Intel Corporation
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 la... |
package munit
import sbt.testing.Event
// Framework tests needs to be manually added to FrameworkSuite.tests
class FrameworkTest(
val cls: Class[_ <: FunSuite],
val expected: String,
val tags: Set[Tag] = Set.empty,
val format: FrameworkTestFormat = SbtFormat,
val arguments: Array[String] = Array()... |
# Copyright 2015 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
import json
import os
from pants.testutil.pants_run_integration_test import PantsRunIntegrationTest
from pants.util.contextutil import temporary_dir
class TestJvmDependencyUsageIntegrat... |
<?php
/**
*
* Abstract base class for all SMTP-based transports
*
* @author Ashley Schroder (aschroder.com)
* @copyright Copyright (c) 2014 Ashley Schroder
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
*/
class Aschroder_SMTPPro_Model_Transports_Basesmtp {
publ... |
package com.anujandankit.foodrunner.adapter
import android.content.Context
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.TextView
import androidx.recyclerview.widget.DefaultItemAnimator
import androidx.recyclerview.widget.LinearLayoutManager
import andr... |
(function() {
Vue.component("data-center-modal", {
template: Kooboo.getTemplate(
"/_Admin/View/Market/Scripts/components/DataCenterModal.html"
),
props: {
isShow: Boolean, // is-show.sync
available: Array
},
data: function() {
return {
dataCenter: ""
};
},... |
import 'dart:developer';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'package:star_citizen_app/Screens/data_screen.dart';
import 'package:star_citizen_app/Screens/widgets/component_selection.dart';
import 'package:star_citizen_app/Screens/widgets/stats_dashboard.dart';
impo... |
import 'package:arbor/api/responses/base_response.dart';
import 'package:arbor/core/constants/arbor_constants.dart';
import 'package:arbor/core/constants/hive_constants.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter_secure_storage/flutter_secure_storage.dart';
import 'package:hive/hive.dart';
... |
require 'cipisek/model'
module Cipisek
class Response < Model
class User < Cipisek::Model
attributes :userId, :username, :agencyStatus, :walletCredit,
:walletCreditWithWat, :walletVerified, :dayBudgetSum, :accountLimit
end
end
end
|
#!/bin/bash
BACKUP_NAME=cacerts-GA-backup.original
SYS_TRUSTED_CA="${JRE_SECURITY_FOLDER}/${TRUSTED_CA}"
cp -v $SYS_TRUSTED_CA "${JRE_SECURITY_FOLDER}/${BACKUP_NAME}"
cp -v $SYS_TRUSTED_CA "../${JRE_VERSION}/GA/lib/security/cacerts.GA" |
require 'mongo'
connection = Mongo::MongoClient.new("localhost", 27017)
connection.database_names.each do |name|
if name.start_with? 'm_'
connection[name].collections.each do |collection|
collection.remove {} if collection.name != "system.indexes"
end
end
end |
package iog
import (
"math"
"runtime"
"sync"
"sync/atomic"
)
type HandlePanic func(rcv interface{})
type IOG struct {
tasksPending *int32
tasksChan chan task
workersPool sync.Pool
waitGroup sync.WaitGroup
firstTimeCallGo sync.Once
cap int
}
func New(cap int) *IOG {
if cap =... |
import { Image } from '@graphcommerce/image'
import { SxProps, Theme } from '@mui/material'
import { extractImageBackgroundProps } from './extractImageBackgroundProps'
import { ImageBackgroundProps } from './getImageBackgroundProps'
type ImageBackgroundComponentProps = ImageBackgroundProps & {
sx?: SxProps<Theme>
}
... |
module M2yFast
require 'savon'
require 'digest/md5'
require 'active_support/core_ext'
class Base
def self.get_client
Savon.client(
wsdl: M2yFast.configuration.wsdl,
log: true,
proxy: M2yFast.configuration.proxy,
log_level: M2yFast.configuration.production? ? :info : :d... |
package visualisation.graph
import calculations.CoordinationNeedsMatrixCalculation
import dataProcessor.AssignmentMatrixDataProcessor
import dataProcessor.FileDependencyMatrixDataProcessor
import kotlinx.serialization.encodeToString
import kotlinx.serialization.json.Json
import miners.gitMiners.FileDependencyMatrixMin... |
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE TemplateHaskell #-}
module Day12 where
import Control.Lens (Lens', makeLenses, over, (^.), _1, _2)
import Data.Monoid (Endo (Endo, appEndo))
import Test.QuickCheck (Property, ioProperty, property)
import Test.QuickCheck.All (quickChe... |
#!/bin/sh
setup_git() {
# Set the user name and email to match the API token holder
# This will make sure the git commits will have the correct photo
# and the user gets the credit for a checkin
git config --global user.email "travis@noreply.spring-media.de"
git config --global user.name "Travis"
git confi... |
package main
import (
"bytes"
"flag"
"io"
"log"
"net"
"time"
)
var (
proxyAddr = flag.String("proxy-addr", ":8080", "Reverse Proxy Address")
registerAddr = flag.String("register-addr", ":8081", "Register Address")
clientMode = flag.Bool("client", false, "Start client mode")
clientPreConnect... |
from sklearn.metrics.scorer import _BaseScorer
from xgboostextension.xgbranker import XGBRanker, _preprare_data_in_groups
from xgboostextension.scorer.util import _make_grouped_metric
class RankingScorer(_BaseScorer):
def __init__(self, score_func, sign=1):
"""
Base class for applying scoring func... |
package be.artisjaap.polyglot.core.model;
import be.artisjaap.common.model.AbstractDocument;
import org.bson.types.ObjectId;
import org.springframework.data.mongodb.core.mapping.Document;
import java.time.LocalDateTime;
@Document(collection = "PolTranslationPractice")
public class TranslationPractice extends Abstrac... |
package typingsSlinky.stormReactDiagrams
import typingsSlinky.stormReactDiagrams.abstractLabelFactoryMod.AbstractLabelFactory
import typingsSlinky.stormReactDiagrams.defaultLabelModelMod.DefaultLabelModel
import org.scalablytyped.runtime.StObject
import scala.scalajs.js
import scala.scalajs.js.`|`
import scala.scalajs... |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE CPP #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE Rank2Types #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE GeneralizedNewty... |
#!/bin/sh
####################################################################################
# If not stated otherwise in this file or this component's Licenses.txt file the
# following copyright and licenses apply:
# Copyright 2018 RDK Management
# Licensed under the Apache License, Version 2.0 (the "License");
#... |
<?php
namespace Aternos\Codex\Test\Tests\Log\File;
use Aternos\Codex\Log\File\StringLogFile;
use PHPUnit\Framework\TestCase;
class StringLogFileTest extends TestCase
{
public function testGetContent(): void
{
$content = uniqid();
$logFile = new StringLogFile($content);
$this->assertE... |
#!/bin/bash
INITIAL_DIR=$PWD
cd "${0%/*}"
mkdir Temporary
cd Temporary
wget -O download.tar.gz "https://github.com/Kitware/CMake/releases/download/v3.22.1/cmake-3.22.1-linux-x86_64.tar.gz"
tar -xf download.tar.gz
rm download.tar.gz
mv cmake-3.22.1-linux-x86_64 CMake
wget -O download.tar.gz "https://github.com/K... |
use path::math::Point;
use path::{Path, PathSlice};
use path::builder::{Build, FlatPathBuilder};
use path::PathEvent;
use svg;
pub type Polygons = Vec<Vec<Point>>;
pub fn path_to_polygons(path: PathSlice) -> Polygons {
let mut polygons = Vec::new();
let mut poly = Vec::new();
for evt in path {
mat... |
// Copyright 2021 Ivanov Arkadiy
#include <gtest/gtest.h>
#include <iostream>
#include "./vector_alternations.h"
#include <gtest-mpi-listener.hpp>
TEST(seq_and_par_check_equivalence, two_elems_at_the_borders_vec_size_200) {
int procRank = 0;
const int vecLen = 200;
int* vec = nullptr;
MPI_Comm_rank(M... |
def login(email, password)
visit root_path
click_link "Войти"
fill_in :user_email, with: email
fill_in :user_password, with: password
click_button "Log in"
end |
# laravel-formrequest-singleton
Use Laravel's excellent FormRequest as Singleton
## Installation
* run `composer require lextira/laravel-formrequest-singleton`
* open `config/app.php` in your project
* replace `Illuminate\Foundation\Providers\FoundationServiceProvider::class`
with `Lextira\FormRequestSing... |
<?php
namespace Biskuit\View\Helper;
use Biskuit\View\View;
class DataHelper implements HelperInterface
{
/**
* @var array
*/
protected $data = [];
/**
* Encode <, >, ', &, and " for RFC4627-compliant JSON, which may also be embedded into HTML.
* 15 === JSON_HEX_TAG | JSON_HEX_APOS |... |
module FastdfsClient
extend ActiveSupport::Concern
included do
delegate :upload, to: self.class
end
module ClassMethods
# option = Rails.application.secrets.fastdfs
# puts "option = #{Rails.application.secrets}"
@@tracker = Fastdfs::Client::Tracker.new(trackers: {host: "49.232.151.122", port:... |
@Target(AnnotationTarget.VALUE_PARAMETER, AnnotationTarget.TYPE)
annotation class A0
@Target(AnnotationTarget.VALUE_PARAMETER, AnnotationTarget.TYPE)
annotation class A1
@Target(AnnotationTarget.VALUE_PARAMETER, AnnotationTarget.TYPE)
annotation class A2
@Target(AnnotationTarget.VALUE_PARAMETER, AnnotationTarget.TYPE)
... |
package tifmo
import dcstree.WordBase
import mylib.res.en.EnStopWords
package main.en {
case class EnWord(lemma: String, mypos: String, ner: String, isSingleton: Boolean) extends WordBase {
override def toString = lemma.replaceAll("[^a-zA-Z0-9]", "_") + "_" + mypos
def isStopWord = (ner == "O" || ner == "NUMB... |
var videoId = $(".video-js").attr('id');
var player = videojs(videoId);
var videoList = JSON.parse($("#videoList").val());
player.playlist(videoList); //load the playlist into the video player
var video = videoList[0]; // load the first video
$(".video-details").find("#video-title").text(video.name);
$(".video-details... |
; RUN: llc -march=r600 -mcpu=redwood -verify-machineinstrs < %s
declare float @llvm.AMDGPU.dp4(<4 x float>, <4 x float>) nounwind readnone
define void @test_dp4(float addrspace(1)* %out, <4 x float> addrspace(1)* %a, <4 x float> addrspace(1)* %b) nounwind {
%src0 = load <4 x float>, <4 x float> addrspace(1)* %a, al... |
#!/usr/bin/env bash
#
# Helper functions for running processes
# jaagr <c@rlberg.se>
#
include utils/log/defer.sh
include utils/spinner.sh
function proc::wait
{
local pid="$1" ; shift
local outbuf
local -i num=0
ansi::extend_buffer
log::defer "${1:-waiting for pid} $(ansi::colorize "31" "$pid") $(ansi::... |
/*
* Stream Cipher
* (C) 1999-2010 Jack Lloyd
*
* Distributed under the terms of the Botan license
*/
#include <botan/stream_cipher.h>
namespace Botan {
void StreamCipher::set_iv(const byte[], size_t iv_len)
{
if(iv_len)
throw Invalid_Argument("The stream cipher " + name() +
... |
export interface RPCResponse {
data: any
error: any
result: any
id: number
}
|
import numpy as np
import matplotlib.pyplot as plt
from load_binary_files import training_ims, training_labels
from init_functions import p_matrix, w_connectivity
from corrup import distort_binnary
# Select quantity of data to use
N_data_total = len(training_labels)
percentage = 0.05
N_to_use = int(percentage * N_... |
// eslint-disable-next-line import/no-extraneous-dependencies
import { ToastOptions } from '@ionic/core';
import Observable from 'zen-observable';
/*
export interface ToastOptions {
header?: string;
message?: string;
cssClass?: string | string[];
duration?: number;
buttons?: (ToastButton | string)[... |
package api
import (
"bytes"
"encoding/json"
"math/rand"
"net/http"
"time"
"github.com/Cocos-BCX/cocos-go/logging"
"github.com/juju/errors"
"github.com/pquerna/ffjson/ffjson"
)
//RPCClient allows you to access wallett functions
type RPCClient interface {
CallAPI(method string, args ...interface{}) (*json.Ra... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.areaCircunferencia = void 0;
const PI = 3.1416;
const areaCircunferencia = (raio) => {
return PI * Math.pow(raio, 2);
};
exports.areaCircunferencia = areaCircunferencia;
//# sourceMappingURL=Circunferencia.js.map |
/**
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* @format
*/
import * as crypto from 'crypto';
/**
* Hash content into the form expected in a manifest entry.
*/
export function hashContent(str: string) {
const hasher = crypto.createHash('sha1');
const normalizedStr = str.repl... |
Sequel.migration do
change do
create_table(:comments) do
primary_key :id, :type=>:Bignum
column :post_id, "bigint", :null=>false
column :body, "character varying", :null=>false
column :author_name, "character varying", :null=>false
column :created_at, "timestamp(6) without time zone"... |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using Xunit.Internal;
using Xunit.Sdk;
namespace Xunit.v3
{
/// <summary>
/// A reusable implementation of <see cref="_ITestFrameworkExecutor"/> which contains the basic behavior
/// for running... |
require 'vagrant'
require 'vagrant-ansible/provisioner'
Vagrant.provisioners.register(:ansible, Vagrant::Provisioners::Ansible)
|
#pragma once
#include <vector>
#include "base/Mesh.hpp"
class IRenderingDevice;
class Material;
class IProgram;
class ResourceManager {
public:
static ResourceManager& instance();
bool init(IRenderingDevice& renderingDevice);
Material* createMaterial(const char* programName);
Mesh* createMesh(Mesh... |
using System.Collections.Generic;
using System.Threading.Tasks;
using LMSEntities.DataTransferObjects;
using LMSEntities.Helpers;
using LMSEntities.Models;
namespace LMSContracts.Interfaces
{
public interface IAuthorService
{
Task<AuthorDto> AddAuthor(AuthorDto authorDto);
Task<LmsResponseHan... |
package com.plop.bankingkotlin.buildingBlocks
import kotlin.reflect.KClass
class EventDispatcher(eventHandlers: List<EventHandler<out DomainEvent>>) : EventBusMiddleware {
private var registeredCommandHandlers: Map<KClass<out DomainEvent>, List<EventHandler<out DomainEvent>>> = mapOf()
init {
regist... |
# frozen_string_literal: true
module Formatters
# Used to help format arrays of database responses for numeric variables.
class NumericFormatter < DomainFormatter
def raw_response(response, shared_responses = domain_options)
domain_option = shared_responses.find { |option| option.value == response }
... |
package com.guru.composecookbook.tiktok.components.home
import android.content.Context
import android.net.Uri
import androidx.compose.runtime.Composable
import androidx.compose.runtime.DisposableEffect
import androidx.compose.runtime.remember
import androidx.compose.ui.viewinterop.AndroidView
import com.google.android... |
# BiomeEdit
An experimental Forge mod for setting biome values over coordinate areas.
## Command Usage
- `/blist` prints list of all available biome names.
- `/bget` displays biome name for the block at your current location.
- `/bget <x> <z>` displays biome name for the block at (x,z).
- `/bset <x1> <z1> <x2> <z2> ... |
package offchainreporting
import (
"context"
"database/sql"
sqlds "github.com/ipfs/go-ds-sql"
pgqueries "github.com/ipfs/go-ds-sql/postgres"
p2ppeerstore "github.com/libp2p/go-libp2p-core/peerstore"
p2ppeerstoreds "github.com/libp2p/go-libp2p-peerstore/pstoreds"
)
const tableName = "p2p_peerstore"
// NewPeers... |
; ModuleID = '/home/david/src/c-semantics/tests/cil/test7.c'
target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
@y = common global i8 0, align 1
@x = common gl... |
# frozen_string_literal: true
require "flow/base/atomic_boolean"
require "flow/errors"
module Flow
module Base
#
# TODO: Document Signaller class
#
class Signaller
#
# @param target [Object]
# Target object to receive asynchronous signal handler callbacks as the
# pending... |
#!/bin/bash
[ -n "$DEBUG" ] && set -o xtrace
set -o nounset
set -o errexit
shopt -s nullglob
cd $(dirname "${0}")
source ./etc/config
filter_forward_chain="warden-forward"
filter_default_chain="warden-default"
filter_instance_prefix="warden-i-"
filter_instance_chain="${filter_instance_prefix}${id}"
filter_instance_... |
import ShortUniqueId from 'short-unique-id';
// @ts-ignore
import { version } from '../package.json';
type milliseconds = number;
export type PayloadId = string;
export type QueueableFunction<O = {[k: string]: any}, R = void> = (options: O) => Promise<R>;
export type QueueableSyncFunction<O = {[k: string]: any}, R... |
1 28 162 515 704
2 57 417 483
3 293
4 297 543
5 325 365
6 72 507
7 155 183 274 538
8 670
9 326
10 5 122 148 554
11 82
12 113 562
13 68
14 63 73 257 413 521 687
15 330 685
16 14 170 194 398 645
17 324 349 599 607 694
18 111 389 419 499 703
19 201 240
20 27 315
21
22 444 604
23 80 431 549
24 108 474 575
25 44 176 187 486... |
import 'package:flutter/material.dart';
import 'package:flutterando_class/app/core/constants/colors.dart';
class CustomTitleWidget extends StatelessWidget {
final String title;
final ImageProvider? icon;
const CustomTitleWidget({
Key? key,
required this.title,
this.icon,
}) : super(key: key);
@... |
// Code generated by counterfeiter. DO NOT EDIT.
package fakes
import (
"sync"
"github.com/mminges/replicator/replicator"
)
type TileReplicator struct {
ReplicateStub func(replicator.ApplicationConfig) error
replicateMutex sync.RWMutex
replicateArgsForCall []struct {
arg1 replicator.ApplicationCo... |
require 'spec_helper'
describe Showcase::Helpers do
let(:object) { Person.new('Steve Ballmer') }
let(:context) { Context.new }
describe '.present' do
it 'instanciate a new presenter, inferring the class' do
PersonPresenter.stub(:new).with(object, context).and_return 'Presenter'
context.present(o... |
# Copyright (c) 2012-2016 Seafile Ltd.
from django.conf import settings
NOTIFICATION_CACHE_TIMEOUT = getattr(settings, 'NOTIFICATION_CACHE_TIMEOUT', 0)
|
"""
Custom logger for the project.
"""
from colorama import init
from termcolor import colored
init(autoreset=True, convert=True)
def print_inf(msg: str):
"""Print information message.
Args:
msg (str): Message to be printed.
"""
print(msg)
def print_title(msg: str):
"""Print title mes... |
# Usage: ./release.sh 3.95
# Delete old stuff
#cd ~/repos/wekan
#./releases/release-cleanup.sh
# Build Source
#cd ~/repos/wekan
#./releases/rebuild-release.sh
REPODIR=/home/wekan/repos
WEKANDIR=/home/wekan/repos/wekan
# Ensure sudo access
sudo echo .
# Build Sandstorm
cd $REPODIR
rm -rf $WEKANDIR
git clone git@gith... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.