text
stringlengths
27
775k
/* SPDX-License-Identifier: Apache-2.0 * * The OpenSearch Contributors require contributions made to * this file be licensed under the Apache-2.0 license or a * compatible open source license. * * Modifications Copyright OpenSearch Contributors. See * GitHub history for details. * * Licensed to Elasticsearch B.V. unde...
<?php $app->get('/Import', function ($request, $response, $arguments) { global $homematicIp; // Delete Cache $files = glob('cache/*'); if(is_array($files)) { foreach($files as $file){ if(is_file($file)) { unlink($file); } } } $expor...
import modelExtend from 'dva-model-extend' import { pageModel } from 'utils/model' import { message } from 'antd' import { detail, update, list, evaluation } from './service' export default modelExtend(pageModel, { namespace: 'storeIf', state: { ratingModalVisible: false, changeState: false, id: '', ...
#!/usr/bin/env Rscript # Setup R error handling to go to stderr options(show.error.messages=F, error=function(){cat(geterrmessage(),file=stderr());q("no",1,F)}) # Just a simple test for xcms # Set proper locale loc <- Sys.setlocale("LC_MESSAGES", "en_US.UTF-8") # Import library #library(getopt) options(stringAsfactor...
# ProjetoModulo Aula cursoemvideo Phyton - Modulo e Package Todos os exercícios do curso do prof. Guanabara Em 21/02/2021 - ainda não assisti as aulas dos exercícios, portanto podem sofrer correção ou melhoramentos. Este repositório foi criado para usar o Git e o GitHub e aprender sobre esta ferramenta formi...
import { assert } from "console"; import * as THREE from "three"; import { Assets } from "./assets"; import { Debug } from "./debug"; import { InWorldItem } from "./inWorldItem"; export class Encode { static inWorldItem(o: InWorldItem): Object { const result = {}; result['position'] = o.position; result[...
#!/bin/bash if [[ "$SSH_ORIGINAL_COMMAND" == "" ]] ; then /sbin/service disco-booted status else IP="$(echo "$SSH_ORIGINAL_COMMAND" | /bin/egrep '^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$')" if [[ "$IP" != "" ]] ; then /usr/bin/ssh -oStrictHostKeyChecking=no -oUserKnownHostsFile=/dev/null -AT "sm...
import React, { useState, useEffect } from 'react'; import './Calculator.css'; import CalculatorBtns from '../CalculatorBtns/CalculatorBtns'; import Screen from '../Screen/Screen'; import calculate from '../../logic/calculate'; const Calculator = () => { const [total, useTotal] = useState(null); const [next, useNe...
# David R Thompson, Adam Erickson # Build the surface model python3 -c "from isofit.utils import surface_model; surface_model('configs/prm20151026t173213_surface_coastal.json')" # Run retrievals isofit --level DEBUG configs/prm20151026t173213_D8W_6s.json isofit --level DEBUG configs/prm20151026t173213_D8p5W_6s.json i...
#' Normalize Infinium HumanMethylation450 BeadChips #' #' Normalize a set of samples using their normalized quality control objects. #' #' @param norm.objects The list or sublist of \code{\link{meffil.normalize.quantiles}()}. #' @param pseudo Value to add to the denominator to make the methylation #' estimate more stab...
require_relative 'spec_helper' require_relative 'helpers' describe NATOPhone::NATOPhoneCLI do let(:cli) {NATOPhone::NATOPhoneCLI} describe "#encode" do it "encodes" do printed = capture_stdout do test = lambda {cli.start(['encode', 'hello world'])} test.call end expect(print...
import os SOCIAL_DB_HOST = os.getenv('SOCIAL_DB_HOST', 'social-db') SOCIAL_DB_NAME = os.getenv('SOCIAL_DB_NAME', 'social') SOCIAL_DB_USER = os.getenv('SOCIAL_DB_USER', 'social') SOCIAL_DB_PASS = os.getenv('SOCIAL_DB_PASS', '') CLUSTER_DB_HOST = os.getenv('CLUSTER_DB_HOST', 'cluster-db') CLUSTER_DB_NAME = os.getenv('C...
package com.onpositive.clauses.impl; import com.onpositive.analitics.model.IClass; import com.onpositive.analitics.model.IProperty; import com.onpositive.analitics.model.IType; public class ContainingProperty implements IProperty { protected final IClass targetClass; protected final IClass baseClass; @Override p...
# -*- coding: utf-8 -*- # from django.db.models.signals import post_save, post_delete from django.dispatch import receiver from django.db import transaction from devops.utils import current_request from common.utils import get_request_ip from .models import OperateLog MODELS_NEED_RECORD = ( 'User', 'Organization...
#include <algorithm> #include <iostream> #include <vector> using namespace std; const int SIZE = 1e6 + 10; int dp[SIZE] = {0}; // call it N times, n stands for the number of items void ZeroOnePack(int cost, int value, int size) { for (int i = size; i >= cost; i--) dp[i] = max(dp[i], dp[i - cost] + value); } void...
using SharpMapExec.HiveParser; using System; using System.Collections.Generic; using System.Linq; using System.Text; using static SharpMapExec.HiveParser.Registry; namespace SharpMapExec.Lib { internal class Secrets { public static void ParseSecrets(string sampath, string systempath, string securitypa...
package io.github.bhuwanupadhyay.payment.application.internal.outboundservices; import io.github.bhuwanupadhyay.payment.domain.events.PaymentReceivedEvent; import io.github.bhuwanupadhyay.payment.infrastructure.brokers.rabbitmq.PaymentEventSource; import io.github.bhuwanupadhyay.schemas.PaymentReceivedV1; import lombo...
package com.purexyz.uci.input.engine; import lombok.extern.slf4j.Slf4j; @Slf4j public record EngineResult(String result) { private static final EngineResult emptyResult = new EngineResult(null); public static EngineResult emptyResult() { return emptyResult; } public boolean isEmpty() { return resul...
#!/bin/bash cd $(dirname $0) source ../config/scripts.conf source $BASEDIR/scripts/inc_lock.sh lock $LOCK_NAME source $BASEDIR/scripts/inc_error.sh mkdir -p $STATUS_DIR # check previous process if [ -f $PID_FILE ];then PID=$(cat $PID_FILE | tr -d ' ') [ ! -z $PID ] && [ -e /proc/$PID ] && abort "Old process s...
// @dart = 2.7 // Copyright 2021 Workiva 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...
const { App } = require("@slack/bolt"); const getPort = require("get-port"); const CreateSlackApp = async () => { let SlackApp = null; // * Slackbot Event-based Cron Job if (!process.env.SLACK_BOT_TOKEN || !process.env.SIGNING_SECRET) { console.error("!!!Missing SLACK BOT TOKENS!!!"); } else { SlackAp...
<?php namespace App\Http\Requests; use Illuminate\Foundation\Http\FormRequest; class OrderRequest extends FormRequest { public function authorize() { return true; } public function rules() { return [ 'id_customer_domicile' => 'required|integer|exists:customer_domicil...
using BusinessLayer.Abstract.Generic; using parms = DTO.i.DTOs; using dtoo = DTO.o.DTOs; namespace BusinessLayer.Abstract.Services { public interface IAlumneSet : ISet<parms.AlumneSearchParms, dtoo.Alumne> { } }
import snackbar from '~/composition/snackbar/snackbar' import dialog from '~/composition/dialog/dialog' export default localVue => { const plugin = { $snackbar: snackbar, $dialog: dialog } Object.keys(plugin).map(key => (localVue.prototype[key] = plugin[key])) if (!localVue.prototype.$nuxt) { loc...
// // Copyright 2014 The ANGLE Project Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // // test_utils_win.cpp: Implementation of OS-specific functions for Windows #include "util/test_utils.h" #include <aclapi.h> #include <stdarg....
class Topgrade < Formula desc "Upgrade all the things" homepage "https://github.com/r-darwish/topgrade" url "https://github.com/r-darwish/topgrade/archive/v0.13.0.tar.gz" sha256 "c1a7fe9675a4572f77afad21849ce5e512c194e4e00de17ce5590f5588ad38b9" bottle do sha256 "505ca928e99e82a7348447c6d9b5dde05a2d7b38d1...
<?php namespace App\Http\Controllers\Admin; use App\Comment; use Illuminate\Http\Request; use App\Http\Requests; use App\Http\Controllers\Controller; class CommentController extends Controller { // public function index(){ return view('admin/comment')->withComments(Comment::all()); } public...
import arrow.fx.IO import org.junit.Assert import org.junit.Test import java.io.ByteArrayInputStream import java.io.ByteArrayOutputStream import java.io.InputStream import java.io.PrintStream class TennisGameTest { @Test fun aCompleteGame() { val inputs: String = inputs("1", "1", "1", "1") val...
-module(kvstest). -export([testKVS/1]). -include_lib("eunit/include/eunit.hrl"). testKVS(NodeNum) -> Configuration = getKVSInstances(NodeNum), ?assertEqual(NodeNum, length(Configuration)), % io:format("configuration is ~p",[Configuration]), configureKVS(Configuration), testStore(Configuration), ok. configureKV...
import { useCallback, useEffect, useState } from 'react' import type { FocusEvent, ChangeEvent } from 'react' interface Options { value: number min: number max: number onChange: (quantity: number) => void } const narrow = (value: number, min: number, max: number) => Math.min(Math.max(value, min), max) expo...
import { gql } from '@apollo/client'; const queries = { GET_FACTORS_PARAMS: gql` query getFactorsParams($category: String!, $emission: String!) { getFactorsParams(category: $category, emission: $emission) { name, label, units, periods, } } `, } export default que...
package com.popda.weatherforcast.ui.weather_screen import android.icu.text.MeasureFormat import android.icu.text.MeasureFormat.FormatWidth import android.icu.util.Measure import android.icu.util.MeasureUnit import android.icu.util.ULocale import android.view.LayoutInflater import android.view.View import android.view....
import torch from torch import nn from .multi_src_joint_multi_headed_attn import MultiSrcJointMultiHeadedAttention from onmt.modules.gpt_mlp import MLP class TransformerGPTDecoderLayerMultiPSA(nn.Module): """ Args: d_model (int): the dimension of keys/values/queries in :class:`MultiHeadedAtte...
using System; using System.Collections.Generic; using System.Linq; using System.Web; namespace Sitecore.Foundation.LocalDatasource { using Sitecore.Data; public class Templates { public struct RenderingOptions { public static ID ID = new ID("{D1592226-3898-4CE2-B190-090FD5F84A4C}"); ...
// Copyright (c) 2011-2014, Stoyan Nikolov // All rights reserved. // This software is governed by a permissive BSD-style license. See LICENSE. #include "stdafx.h" #include "VertexTypes.h" D3D11_INPUT_ELEMENT_DESC PositionVertexLayout[] = { { "POSITION", 0, DXGI_FORMAT_R32G32B32_FLOAT, 0, 0, D3D11_INPUT_PER...
#!/bin/bash # Give the JEE Discovery Directory a chance to start ... sleep 30 asadmin --user admin --passwordfile=/opt/payara41/pwdfile --interactive=false start-domain --debug --verbose & PID=$! sleep 30 asadmin --interactive=false --user admin --passwordfile=/opt/payara41/pwdfile deploy /sit-jee-app.war wait $PID
require File.expand_path('../../spec_helper', __FILE__) Chef::Knife::ProfitbricksSnapshotCreate.load_deps describe Chef::Knife::ProfitbricksSnapshotList do before do { :profitbricks_user => 'test', :profitbricks_password => 'test', }.each do |key, value| Chef::Config[:knife][key] = value ...
// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. namespace Microsoft.CodeAnalysis.Sarif.Readers { internal class OverflowCorrector { // Note: Consider sbyte overflow: Range is -128...127, so 129 will ...
namespace MAVN.Service.QuorumTransactionSigner.Client.IntegrationTests { public class TestsBase { internal const string BecauseIntegrationTest = "Is an integration test."; } }
# frozen_string_literal: true require 'spec_helper' require 'ace/transport_app' require 'rack/test' require 'ace/config' require 'faraday' require 'openssl' RSpec.describe ACE::TransportApp do include Rack::Test::Methods before do # see: https://github.com/bblimke/webmock#connecting-on-nethttpstart WebMo...
using System; using System.Collections.Generic; using System.Threading.Tasks; using TheSaga.Models; using TheSaga.Models.Interfaces; namespace TheSaga.Persistance { public interface ISagaPersistance { Task<ISaga> Get(Guid id); Task Remove(Guid id); Task Set(ISaga sagaData); Tas...
use std::{collections::VecDeque, time::Instant}; use std::io; use evdev::{uinput::VirtualDevice, Device, InputEvent}; use super::{Rule, RuleCtx}; pub struct Layer { rules: Vec<Box<dyn Rule>>, buf: VecDeque<InputEvent>, } impl Layer { pub fn new(rules: Vec<Box<dyn Rule>>) -> Self { Self { ...
package com.ivieleague.skate import java.io.File import java.nio.file.Files import java.util.concurrent.TimeUnit fun File.createSymbolicLinkTo(other: File): Boolean { return try { println("Linking $this <==> $other") Files.createSymbolicLink(this.absoluteFile.toPath(), other.absoluteFile.toPath())...
const langs: Record<string, string> = { en: 'cp1252', fr: 'cp1252', de: 'cp1252', es: 'cp1252', 'pt-BR': 'cp1252', 'zh-CN': 'gb2312', 'zh-CN_china': 'gb2312', 'zh-SG': 'gb2312', 'zh-TW': 'big5', 'zh-HK': 'big5', ru: 'cp1251', ja: 'shiftjis', } export default langs
<?php namespace App\Models; use App\Utility\PathUtility; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model; class Index extends Model { use HasFactory; protected $table = 'index'; protected $fillable = [ 'path', 'file_name', 'year' , ...
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. #ifndef air_MultirotorRpcLibAdapators_hpp #define air_MultirotorRpcLibAdapators_hpp #include "common/Common.hpp" #include "common/CommonStructs.hpp" #include "api/RpcLibAdapatorsBase.hpp" #include "vehicles/multirotor/cont...
package godag_test import ( "testing" "github.com/karrick/godag" ) func helperStringSlices(tb testing.TB, a, b []string) { tb.Helper() if got, want := len(a), len(b); got != want { tb.Fatalf("GOT: %v; WANT: %v", got, want) } for i := 0; i < len(a) && i < len(b); i++ { if i >= len(a) { tb.Errorf("INDEX...
-- CREATE DATABASE IF NOT EXISTS bamazon CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci; -- CREATE USER 'bamazon'@'localhost' IDENTIFIED BY ''; -- GRANT ALL PRIVILEGES ON bamazon.* TO 'bamazon'@'localhost'; -- FLUSH PRIVILEGES; USE bamazon; CREATE TABLE IF NOT EXISTS products ( item_id INT UNSIGNED NOT NULL...
# Trulioo Java SDK Sample Application This is a sample [Spring Boot](https://spring.io/projects/spring-boot) application that utilizes the [Trulioo Java SDK](https://github.com/Trulioo/sdk-java). Please visit the SDK respository for documentation on installation, usage, and supported functions. ## Before You Begin J...
# encoding: utf-8 ActiveAdmin.register Category do menu priority: 8 config.sort_order = "title_asc" index do column :id column :title do |p| span p.title, style: "color: #{p.color}" end column :color do |p| span p.color, style: "color: #{p.color}" end actions end controll...
#!/usr/bin/perl $ENV{'PATH'} = "../bin:$ENV{'PATH'}"; $command = "smartpca"; $command .= " -p par.example >example.log"; print("$command\n"); system("$command"); $command = "ploteig"; $command .= " -i example.evec "; $command .= " -c 1:2 "; $command .= " -p Case:Control "; $command .= " -x "; $command .= " -o exampl...
/// // Generated code. Do not modify. // source: google/appengine/v1beta/firewall.proto // // @dart = 2.12 // ignore_for_file: annotate_overrides,camel_case_types,unnecessary_const,non_constant_identifier_names,library_prefixes,unused_import,unused_shown_name,return_of_invalid_type,unnecessary_this,prefer_final_field...
# 区块链学习笔记 #### 交易所 | 名称 | 中文名称 | 网址 | | ---------- | ------ | ------------------------ | | Bittrex | B网 | https://bittrex.com | | Poloniex | P网 | https://poloniex.com | | Binance | 币安 | https://www.binance.com | | ZB | 中币 | https://www.zb.com ...
# Copyright 2017-present Open Networking Foundation # # 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 ag...
class ParamTemplate { ParamTemplate( {required this.name, required this.type, this.defaultValue, this.hasRequiredKeyword = false}); final String name; final String type; final String? defaultValue; final bool hasRequiredKeyword; String get asArgument => name; NamedArgTemplate g...
import * as React from 'react'; interface TurkishLiraProps { } export const TurkishLira: React.SFC<TurkishLiraProps> = (props) => { return <span>&#8378;</span>; }; export default function TurkishLiraBlockRenderer(contentBlock) { const type = contentBlock.getType(); if (type === 'turkish-lira') { ...
#ifndef __NX_OBJECT_H__ #define __NX_OBJECT_H__ #include <nx/object_base.hpp> #include <nx/handle_error.hpp> #include <nx/handlers.hpp> #include <nx/service.hpp> namespace nx { struct postponer { postponer& operator<<(void_cb&& cb) { auto ptr = o.ptr(); async() << [ptr, cb = std::move(cb)]()...
#!/usr/bin/env ruby require 'openssl' require 'open-uri' require 'optparse' require 'ostruct' require 'yaml' options = OpenStruct.new options.web_config = false OptionParser.new do |opts| opts.banner = "Usage: install.rb [options]" opts.on("-w", "--[no-]web.config", "Include web.config") do |v| options.web_co...
echo "Run this script on a cirrus instance." cadc-get-cert --user ekoch BIGDATA_PATH="/mnt/bigdata/ekoch/" LGHI_PATH="vos:ekoch/LocalGroup-HI/" vmkdir $LGHI_PATH M31HI_PATH="${LGHI_PATH}/M31/" vmkdir "${M31HI_PATH}" # Upload the M31 D-config M31HI_DCONF_PATH="${M31HI_PATH}/M31_HI_Dconfig_58arcsec_0p42kms_wEBHI...
/* * Copyright 2002 Felix Pahl. All rights reserved. * Use is subject to license terms. */ package info.joriki.compression.ascii; import java.io.IOException; import java.io.StreamCorruptedException; public class Base85Decoder extends BaseDecoder { public Base85Decoder () { super (85,5,4); } protected...
package enums import kotlinx.serialization.Serializable @Serializable enum class RivenType { shotgun, rifle, pistol, melee, zaw, kitgun }
package br.com.eiasiscon.notafiscal.pagamento; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonProperty; @JsonFormat(shape = JsonFormat.Shape.OBJECT) public enum IndPag { A_VISTA("0", "A Vista"), A_PRAZO("1...
/* * JBoss, Home of Professional Open Source. * Copyright 2006, Red Hat Middleware LLC, and individual contributors * as indicated by the @author tags. See the copyright.txt file in the * distribution for a full listing of individual contributors. * * This is free software; you can redistribute it and/or modify i...
using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; namespace SSOAuth.Data.Entity.Authorization { public class User : Base { public User() { this.UserRoles = new HashSet<UserRole>(); this.UserLogins = new HashSet<UserLogin>()...
require 'spec_helper' module Bittrex::Api RSpec.describe 'Public Api' do before {set_bittrex_api_token} it '/public/getmarkets' do Public.getmarkets.size.should > 100 end it '/public/getcurrencies' do Public.getcurrencies.size.should > 100 end it '/public/getticker' do Pu...
using System.IO; using System; using Aspose.Pdf; namespace Aspose.Pdf.Examples.CSharp.AsposePDF.Pages { public class InsertEmptyPage { public static void Run() { // ExStart:InsertEmptyPage // The path to the documents directory. string dataDir = RunExamples.G...
class ImageUrl { static const String proBackground = "assets/img/pro-background.png"; static const String onboardBackground = "assets/img/onboard-background.png"; static const String logoAndroid = "assets/img/logo-android.png"; static const String logoIos = "assets/img/logo-ios.png"; static const String logoA...
module ExcelMerge class Sheet def initialize(file_path) @xls = Roo::Spreadsheet.open(file_path, :extension => :xls) end def each_sheet @xls.sheets.each do |sheet| @xls.default_sheet = sheet yield sheet end end def each_row 0.upto(@xls.last_row) do |index| ...
require 'active_model' require 'active_support/core_ext/class/attribute_accessors' require 'active_support/core_ext/class/attribute' require 'active_support/core_ext/class/subclasses' require 'active_support/core_ext/module' require 'active_support/core_ext/string' require 'active_support/core_ext/array' require 'activ...
import React from 'react'; import { Card, CardProps, Button, Badge } from 'antd'; import { ArtContent } from './../ArtContent'; // import { useArt } from '../../hooks'; import { PublicKey } from '@solana/web3.js'; import { Data } from '../../logic/utils/get-mints'; import { useMeta } from '../../contexts/meta/meta'; im...
$( document ).ready( function ( $ ) { var selectedRows = $( 'table.jsgrid-table' ).find( 'tbody' ) // select table body and .find( 'tr' ) // select all rows that has .has( 'input[type=checkbox]:checked' ) // checked checkbox element alert(selectedRows); } );
import { AngularFireAuth } from 'angularfire2/auth'; import { Injectable } from '@angular/core'; import * as firabase from 'firebase/app' import { map } from "rxjs/operators"; //import 'rxjs/add/operator/map'; @Injectable({ providedIn: 'root' }) export class AuthService { //public emailUsuario: string; public ...
/* * Copyright (C) 2015 Alberto Irurueta Carro (alberto@irurueta.com) * * 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 * * Unles...
package com.mydomain.accounting.dao.mapper; import com.mydomain.accounting.model.persistence.UserInfoPersistence; import org.apache.ibatis.annotations.Insert; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Select; @Mapper public interface ...
using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Security.Policy; using System.Text; using System.Threading.Tasks; using System.Xml; using System.Xml.Linq; using Newtonsoft.Json; namespace Postman.Common { public class CollectionFile { public string Name...
/* * Anarres C Preprocessor * Copyright (c) 2007-2008, Shevek * * 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 ...
DROP DATABASE IF EXISTS bamazon; CREATE database bamazon; USE bamazon; CREATE TABLE products ( item_id VARCHAR(100) NULL, product_name VARCHAR(100) NULL, department_name VARCHAR(100), price DECIMAL(10,2) NULL, stock_quantity INT(4) ); INSERT INTO products(item_id, product_name, department_name, price, sto...
#!/bin/bash cd /mnt/efs/fuzzer/input wget https://github.com/openpreserve/format-corpus/raw/master/pdfCabinetOfHorrors/calistoMTNoFontsEmbedded.pdf wget https://github.com/openpreserve/format-corpus/raw/master/pdfCabinetOfHorrors/javascript.pdf wget https://github.com/openpreserve/format-corpus/raw/master/pdfCabinetOf...
var express = require('express'); var exphbs = require('express-handlebars'); var request = require('request'); var app = express(); app.use(express.static('assets')); app.engine('handlebars', exphbs({ defaultLayout: 'main', partialsDir: ['views/partials/'] })); app.set('view engine', 'handlebars'); app.g...
/* * Copyright (c) 2011, H.Westphal * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright * notice, this list of condi...
{-# LANGUAGE LambdaCase #-} module Main where import IrvSim import System.Environment main :: IO () main = getArgs >>= \case [] -> putStrLn "Usage: ./irvsim ELECTIONFILE" (fn:_) -> runElection fn >>= \case Nothing -> putStrLn "No one won the election :(\nCheck that your ballots are correctly formatte...
import * as _ from 'lodash' import * as dayjs from 'dayjs' import * as debrid from '@/debrids/debrid' import * as dicts from '@/utils/dicts' import * as ffprobe from '@/adapters/ffprobe' import * as filters from '@/scrapers/filters' import * as guessit from '@/adapters/guessit' import * as media from '@/media/media' im...
SELECT mrss_id, url, size, type, medium, is_default, expression, bitrate, framerate, samplingrate, channels, duration, width, height, lang, mediagroup, rating, rating_scheme, title, description, keywords, copyright_url, copyright_text, star_rating_average, star_rating_count, star_rating_min, star_rating...
<?php namespace Typesense\Exceptions; class ObjectNotFound extends TypesenseClientError { }
const int DefaultSize=100; template <typename Type> class SeqList{ public: SeqList(int sz=DefaultSize) :m_nmaxsize(sz),m_ncurrentsize(-1){ if(sz>0){ m_elements=new Type[m_nmaxsize]; } } ~SeqList(){ delete[] m_elements; } i nt Length() const{ //get the length return m_ncurrents...
object frmConvertLevelData: TfrmConvertLevelData Left = 269 Top = 92 Caption = 'Sokoban-Level-Converter' ClientHeight = 829 ClientWidth = 929 Color = clBtnFace Font.Charset = DEFAULT_CHARSET Font.Color = clWindowText Font.Height = -11 Font.Name = 'Tahoma' Font.Style = [] OldCreateOrd...
module Exlibris module Primo module WebService module Request # # Abstract base class for Primo interactions # class Base include Abstract include BaseElements include Client include Call include Config::Attributes ...
<?php namespace App\Http\Controllers; use Illuminate\Http\Request; use App\Actor; class ActorController extends Controller { public function create() { return view('actor.create'); } public function store() { // die ("asdasd") ; $this->validate(request(), [ ...
{-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeSynonymInstances #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE StandaloneDeriving #-} {- | Module : Disguise.Widget Description : Definition...
//this package manages the messages package messages import "io" // TODO: move these funcs/interface to channels type UiMessageHandler interface { NewMessage(Message) NewScreen([]Message) SetChats([]Chat) PrintError(error) PrintText(string) PrintFile(string) SetStatus(SessionStatus) OpenFile(string) GetWrite...
const express = require('express') const cors = require('cors') const ytdl = require('ytdl-core') const FFmpeg = require('ffmpeg') const app = express() app.use(cors()) app.listen(process.env.PORT || 4000, () => { console.log("Server online at port " + process.env.PORT || "4000") }) app.get("/download", async (r...
--- title: is-mobile check tags: - javascript emoji: 📱 --- ```js const parser = require('ua-parser-js') function isUserAgentSignallingMobile(userAgentString) { const ua = parser(userAgentString) return ua.device.type === 'mobile' } ``` Repository: [https://github.com/faisalman/ua-parser-js](https://github...
#!/usr/bin/env bash sudo ip link | grep -o "sw[0-9]\+veth[0-9]\w[@]" | grep -o "sw[0-9]\+veth[0-9]\w" | xargs -L 1 sudo ip link delete dev
JOTS_DIR="${HOME}/jots" JOTS_FILE="${JOTS_DIR}/jots.txt" bfl_jots() { local TODAY="$(date +'%F')" local DATESTAMP="DATESTAMP ${TODAY}" mkdir -p ${JOTS_DIR} touch ${JOTS_FILE} if ! grep "${DATESTAMP}" ${JOTS_FILE} > /dev/null ; then echo "${DATESTAMP} does not exist, stamping" echo "" >> ${JOTS_FILE} ...
import { MutationTree, } from 'vuex'; import { State } from '@/store/state'; import { MutationTypes } from '@/store/mutation-types'; import { User, Poker } from '@/api/types'; export type Mutations<S = State> = { [MutationTypes.SET_USER](state: S, payload: User): void; [MutationTypes.SET_POKER](state: S, payload...
--- company-name: "Line Corporation" domain: linecorp.com home: https://linecorp.com privacy-policy: http://terms.line.me/line_rules/?lang=en email: 160-0022 owned-by: Naver ---
include("Graph.jl") include("Tools.jl") include("Algorithm.jl") # Read Graph buf = split(ARGS[1], ',') fileName = string("data/", buf[1], ".txt") networkType = "unweighted" if size(buf, 1) > 1 networkType = buf[2] end # Find LLC G0 = readGraph(fileName, networkType) G = getLLC(G0) lg = open("log.txt", "a") println(l...
import 'dart:async'; import 'package:binder/binder.dart'; import 'package:firestore_todos/data/entities/todo.dart'; import 'package:firestore_todos/data/repositories/todos.dart'; final todosLogicRef = LogicRef((scope) => TodosLogic(scope)); final todosRef = StateRef(const <Todo>[]); class TodosLogic with Logic impl...
class ApplicationController < ActionController::Base protect_from_forgery before_action :set_draftsman_whodunnit def create Trashable.new(name: 'Bob').save_draft head :no_content end def update trashable = Trashable.last trashable.name = 'Sam' trashable.save_draft head :no_content ...
package service import ( "sync" "testing" "github.com/stretchr/testify/assert" ) var ( number = 1 mutex sync.Mutex done = make(chan struct{}) ) type mockedService struct { quit chan struct{} multiplier int } func newMockedService(multiplier int) *mockedService { return &mockedService{ quit: ...