text
stringlengths
27
775k
# frozen_string_literal: true module SmileFilter class Cmd ARROW = '=>' def initialize(expr) @expr = expr @args = expr.split(ARROW).map { |a| a.split.map(&:to_sym) } end def exec(chat) return chat.mail.clear if @args.first == [:all] return unless (@args.first - chat...
package sqsjobs func convAttr(h map[string]string) map[string][]string { ret := make(map[string][]string, len(h)) for k := range h { ret[k] = []string{h[k]} } return ret }
module Asciinema module FeatureHelpers def expect_browse_links expect(page).to have_link('All') expect(page).to have_link('Featured') end def expect_doc_links expect(page).to have_link('How it works') expect(page).to have_link('Getting started') expect(page).to have_link('I...
using System; namespace VST.Device.LightingController { /// <summary> /// Hello /// </summary> public enum StrobeModes { /// <summary> /// /// </summary> None, /// <summary> /// /// </summary> F1, /// <summary> /// ...
package radius import ( "github.com/ca17/teamsacs/common/log" "github.com/ca17/teamsacs/service/app" "github.com/ca17/teamsacs/service/models" "time" ) func ClearExpireOnline() { log.ErrorIf(app.GormDB.Where("last_update <= ?", time.Now().Add(time.Second*300*-1)). Delete(&models.RadiusOnline{}).Error) } fun...
import unittest import sys import logging from unittest.mock import patch from communication.serial_interface import SerialInterface from communication.exceptions import SerialConnectionError logger = logging.getLogger() logger.level = logging.DEBUG class TestSerialInterface(unittest.TestCase): def setUp(self):...
package main import "fmt" func main() { var amount,rate,time,simple_interest float64 fmt.Printf("Enter Principal Amount: ") fmt.Scanf("%f",&amount) fmt.Printf("Enter Rate of Interest: ") fmt.Scanf("%f",&rate) fmt.Printf("Enter Period of Time: ") fmt.Scanf("%f",&time) simple_interest = (amount*rate*time)...
using System; using Microsoft.Azure.Cosmos; using Newtonsoft.Json; using Newtonsoft.Json.Linq; namespace SimpleEventStore.CosmosDb { public class CosmosDbStorageEvent { [JsonProperty("id")] public string Id { get; set; } [JsonProperty("eventId")] public Guid EventId { get; set...
--- title: "Descrição dos Monstros" metaTitle: "Descrição dos Monstros" metaDescription: "Monstros > Descrição dos Monstros" --- .
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package net.thevpc.pnote.api.model; /** * * @author thevpc */ public interface ObservableNoteListener { void onAdded(PangaeaNo...
#![deny(warnings, rust_2018_idioms)] use loom; use loom::sync::atomic::AtomicUsize; use loom::thread; use std::sync::atomic::Ordering::Relaxed; use std::sync::Arc; #[test] fn yield_completes() { loom::model(|| { let inc = Arc::new(AtomicUsize::new(0)); { let inc = inc.clone(); ...
#!/bin/bash set -eu set -o pipefail cd "$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" cd .. . scripts/import-vars.sh . red/vars.sh mkdir -p ${REDISGRAPH_SCRATCH_DIR} red/stop.sh sudo rm -rdf ${REDISGRAPH_SCRATCH_DIR} > /dev/null 2>&1 mkdir ${REDISGRAPH_SCRATCH_DIR} sudo mkdir -p ${REDISGRAPH_S...
# User schema # --- !Ups ALTER TABLE `documents` ADD COLUMN `path` VARCHAR(255) NOT NULL AFTER `updated_at`; # --- !Downs ALTER TABLE `documents` DROP COLUMN `path`;
package graphqlbackend import ( "fmt" "testing" "time" "github.com/google/go-cmp/cmp" "github.com/throttled/throttled/v2" "github.com/throttled/throttled/v2/store/memstore" "github.com/sourcegraph/sourcegraph/internal/trace" "github.com/sourcegraph/sourcegraph/schema" ) func TestEstimateQueryCost(t *testing...
package com.example.yjw.Socket; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.io.OutputStream; import java.net.Socket; /** * Socket套接字的使用步骤 */ public class SocketUtils { /** * 步骤一:创建客户端&服务器的连接 */ //创建Socket对象&指定...
ssr ############################################################################## ## ## Fit is the only exported function ## ############################################################################## function fit(m::InteractiveFixedEffectModel, f::Formula, df::AbstractDataFrame, ...
export { default as artifactRoutes } from './artifacts.routes'; export { default as characterRoutes } from './character.routes'; export { default as consumableRoutes } from './consumable.routes'; export { default as materialsRoutes } from './materials.routes'; export { default as weaponRouter } from './weapons.routes';...
# encoding: UTF-8 ## TODO use Vertex class in Graph::Base # class Vertex # # attr_accessor :name, :edges # # def initialize(name, *edges) # @name = name # @edges ||= Hash.new # edges.each { |edge| @edges << edge } # end # # def eql?(edge) # (self.source == edge.source) && (self.target == edge.t...
uses Common, Classes, SysUtils, Windows; type TWord = class(TObject) Count : longword; Date : TDateTime; Word : string; end; {case} const hicolor = '#B00000'; locolor = '#800000'; WordList : TList = NIL; indexstr : string = ''; totalentries : integer = 0; totalwords : integer = 0;...
package thread_0527; import java.util.concurrent.atomic.AtomicReference; import java.util.concurrent.atomic.AtomicStampedReference; /** * [description] * * @author: zhangbo * @date: 2021-05-27 * @time: 19:49 */ /* * ABA问题解决 * 添加了版本号 * */ public class demo94 { private static AtomicStampedReference money = ...
<?php defined('BASEPATH') OR exit('No direct script access allowed'); /* | ------------------------------------------------------------------------- | URI ROUTING | ------------------------------------------------------------------------- | This file lets you re-map URI requests to specific controller functions. | | T...
import 'package:flutter/material.dart'; import 'package:flutter_spinkit/flutter_spinkit.dart'; import 'package:scuffed_wordle/bloc/board/board_bloc.dart'; import 'package:scuffed_wordle/bloc/dictionary/dictionary_bloc.dart'; import 'package:scuffed_wordle/bloc/settings/settings_bloc.dart'; import 'package:scuffed_wordl...
#ifndef COMPRESSION_PPMD_STREAM_H #define COMPRESSION_PPMD_STREAM_H namespace compression { namespace ppmd { class stream { private: u32 m_buffer_size; u8 *m_buffer; u8 *m_pointer; public: inline stream (const void *buffer, const u32 &buffer_size); inline void put_char (const u8 &object); inline ...
#include <iostream> using namespace std; //不同类型参数 template <class T, class U> class MyHashMap { private: T key; U value; public: MyHashMap (T k, U v) : key(k), value(v) { cout << k <<": " << v << endl; } }; int main() { MyHashMap<string, int> map("age", 24); }
using Dotmim.Sync.Enumerations; using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Dotmim.Sync { public enum MigrationAction { None, Alter, Create, Drop, Rename, } public class MigrationResults { /// <...
#!/bin/bash echo "Ejemplo de comando cut mostrando los usuarios de /etc/passwd" echo "" echo "cat /etc/passwd | cut -d: -f1" e=0 users=$(cut -d: -f1 < /etc/passwd) # cat /etc/passwd | cut -d -f1 for u in $users; do let e+=1 echo "Usuario $e: $u" done echo "" echo "El código es:" echo "" cat $(pwd)/15-cut.sh exit 0
'use strict'; // eslint-disable-line module.exports.fetchReading = async (event, context) => ({ statusCode: 200, body: JSON.stringify({ message: 'Go Serverless v1.0! Your function executed successfully!', event, context, }), });
/** * Created by liddohx on 10/29/2018. */ window.addEventListener ("load", function() { var nodes = document.querySelectorAll('nav[data-action="expand"] *:first-child'); for (var k=0; k<nodes.length; k++) { nodes[k].addEventListener("click", function() { var parent = this.parentN...
require 'ensurance/date_ensure' RSpec.describe ::Date do before do Time.zone = 'Eastern Time (US & Canada)' end it 'returns nil for nil' do expect(described_class.ensure(nil)).to eq(nil) end it 'returns nil for empty string' do expect(described_class.ensure(' ')).to eq(nil) end it 'returns...
/* eslint-disable */ /* Auto-generated */ export type FLUIDS = ( 'minecraft:empty' | 'minecraft:flowing_water' | 'minecraft:water' | 'minecraft:flowing_lava' | 'minecraft:lava' )
{***************************************************************************} { } { Spring Framework for Delphi } { } { ...
-- -- Mise à jour de la structure de la table compte_minima -- ALTER TABLE `compte_minima` ADD COLUMN `typ_gen_cpt_min` VARCHAR(1) NOT NULL DEFAULT 'P' COMMENT 'type de hash utilisé' AFTER `pwd_cpt_min`;
#!/bin/bash # -*- coding: UTF-8 -*- ############################################# # 作者:KevinCheng # 环境:Ubuntu18.04 64位 # 1. 配置域名解析 # 2. git clone **.git # 3. cd *.git && sh ngrokd-ubuntu.sh # ############################################# sed -i '$a source /etc/profile' ~/.bashrc # 获取当前脚本执行路径 SELFPATH=$( cd "$...
#!/bin/bash diff -Naur old-cmake new-cmake > cmake.patch diff -Naur old-cell new-cell > cell.patch diff -Naur old-petsc new-petsc > petsc.patch
package frodo640shake import ( "github.com/cloudflare/circl/internal/sha3" ) func expandSeedIntoA(A *[paramN * paramN]uint16, seed *[seedASize]byte, xof *sha3.State) error { var ARow [paramN * 2]byte var seedSeparated [2 + seedASize]byte copy(seedSeparated[2:], seed[:]) for i := 0; i < paramN; i++ { seedSepa...
<script> const flashdatadanger = $('.flashdatadanger').data('flashdatadanger'); const flashdatasuccess = $('.flashdatasuccess').data('flashdatasuccess'); if (flashdatadanger) { Swal.fire({ icon: 'error', title: 'Oopps...', html: flashdatadanger }); } if (flashdatasuccess) { Swal.fire({ icon: 'succ...
/* * Copyright (c) Heru Himawan Tejo Laksono. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, * this list of c...
// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; using System.Linq; using System.Text.RegularExpressions; using Antlr4.Runtime; using Antlr4.Runtime.Misc; using Antlr4.Runtime.Tree; namespace...
CREATE DATABASE IF NOT EXISTS `phpstan_dba`; USE `phpstan_dba`; CREATE TABLE `ada` ( `adaid` smallint NOT NULL, `gesperrt` tinyint(1) NOT NULL DEFAULT '0', `email` varchar(100) NOT NULL DEFAULT '', `freigabe1u1` smallint(1) NOT NULL ) ENGINE=MyISAM; ALTER TABLE `ada` ADD PRIMARY KEY (`adaid`); ...
<?php include_once 'dbconnect.php'; $sql = "DELETE from order where no='".$_GET['del_no']."'"; $query = mysqli_query($conn, $sql) or die($sql); header ("Location: order_a.php"); ?>
#!/bin/bash # # Commands below are supposed to be run after run.sh. # echo "This shell script may run as-is on your system, but it is recommended that you run the commands one by one by copying and pasting into the shell." # exit 1 set -e . ./cmd.sh . ./path.sh SBS_LANGUAGES="AR CA DT HG MD SW UR" for L in $SBS_L...
#!/bin/bash lens=$(awk 'END{print NR}' coftp.ini) i=1 while(( "$i" <= "$lens" )) do odir=$(awk 'NR=='$i' {print $1}' coftp.ini) ndir=$(awk 'NR=='$i' {print $2}' coftp.ini) mkdir -p "/var/www/ftp/"$ndir mount --bind "/var/www/ftpbase/"$odir "/var/www/ftp/"$ndir ((i++)) done supervisord -c /etc/sup...
/* * Copyright (C) 2015 University of Oregon * * You may distribute under the terms of either the GNU General Public * License or the Apache License, as specified in the LICENSE file. * * For more information, see the LICENSE file. */ /* */ #ifndef LINUX #include <thread.h> #endif #include <pthread.h> #defin...
--- title: "CodePen in p5.js" video_number: 16 date: 2016-08-03 video_id: 5gfUgNpS6kY links: - title: "Daniel's CodePen" url: "http://codepen.io/shiffman/" --- In this tutorial, I show you how you can use the online code editor CodePen to write your own p5.js sketches.
<?php namespace AppBundle\Entity; use Doctrine\Common\Collections\ArrayCollection; use Doctrine\ORM\Mapping as ORM; use JMS\Serializer\Annotation as JMS; use Symfony\Component\Validator\Constraints as Assert; use Vich\UploaderBundle\Mapping\Annotation as Vich; use Symfony\Component\HttpFoundation\File\File; /** * @...
<?php /* * This file is part of the SgDatatablesBundle package. * * (c) stwe <https://github.com/stwe/DatatablesBundle> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Sg\DatatablesBundle\Datatable; use Closure; trait...
# angular-webpack-skeleton ## Settings up project - npm install --save-dev ## Start using project - npm run start:hmr (run server with hot module replacement) - npm run start:dev (run server in dev mode) - npm run start:test (run server in test mode) - npm run start:prod (run server in production mode) ## Customize ...
package com.htxk.edusystem.service; import com.htxk.edusystem.domain.EduQuestion; import com.htxk.ruoyi.common.core.domain.Ztree; import java.util.List; /** * 题库Service接口 * * @author maple * @date 2021-03-18 */ public interface IEduQuestionService { /** * 查询题库 * * @param id 题库ID * @retur...
-- PCT12C. SEX BY AGE (AMERICAN INDIAN AND ALASKA NATIVE ALONE) -- designed to work with the IRE Census bulk data exports -- see http://census.ire.org/data/bulkdata.html CREATE TABLE ire_pct12c ( geoid VARCHAR(11) NOT NULL, sumlev VARCHAR(3) NOT NULL, state VARCHAR(2) NOT NULL, county VARCHAR(3), cbsa VARCHAR(...
import React from 'react'; import styled from 'styled-components'; import 'animate.css/animate.min.css'; import ScrollAnimation from 'react-animate-on-scroll'; import ChartUrl from '../../static/StakingRewards.svg'; import { Heading } from '../../components/Heading'; import { Text } from '../../components/Text'; import...
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Oct 31, 2020 at 04:29 PM -- Server version: 10.4.13-MariaDB -- PHP Version: 7.4.8 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIEN...
<?php if( ! isset( $_SERVER['REMOTE_ADDR'] ) || $_SERVER['REMOTE_ADDR'] != '76.24.176.23' ) { if( ! isset( $_SERVER['USER'] ) || $_SERVER['USER'] !== "root" ) { header("HTTP/1.0 404 Not Found"); exit; } } error_reporting( E_ALL ); ini_set( 'display_errors', 'on' ); date_default_timezone_set(...
package com.frodo.github.business.repository; import android.content.Context; import android.net.Uri; import android.view.View; import android.view.ViewGroup; import com.frodo.github.R; import com.frodo.github.bean.dto.response.Repo; import com.frodo.github.view.BaseListViewAdapter; import com.frodo.github.view.Octic...
#!/sbin/sh # # /system/addon.d/91-sounds.sh # Removes camera sounds after an upgrade source uiprint.sh case "$1" in backup) # Stub ;; restore) ui_print "Deleting sounds..." rm "$S/media/audio/ui/camera_click.ogg" rm "$S/media/audio/ui/camera_focus.ogg" rm "$S/media/audio/ui/VideoRecord.ogg" ...
import '../layer/layer.dart'; import '../type.dart'; /// Mapping StamenType to its template URL. TileLayerOptions stamen({ required StamenType type, required TileLayerOptions options, }) { TileLayerOptions opts = options.copy( subdomains: 'abcd', attribution: 'Map tiles by Stamen Design, CC BY 3....
using LuckParser.Controllers; using LuckParser.Parser; using Newtonsoft.Json; using System; using System.Collections.Generic; using System.Linq; namespace LuckParser.Models.ParseModels { public class Mob : AbstractMasterActor { // Constructors public Mob(AgentItem agent) : base(agent) ...
""" 2014 February 11 Shane Bussmann Compare uvfit10 and uvfit11 model results. uvfit10 = MLE + statwt + CASA-bin uvfit11 = chi2 + statwt + CASA-bin """ from astropy.table import Table import glob import modifypdf import matplotlib.pyplot as plt from pylab import savefig import matplotlib modelloc = '../../ModelFit...
require 'test_helper' class MessageTest < ActiveSupport::TestCase def setup @users = [users(:user_one) ,users(:user_two) , users(:user_three)] [0,1,2].each{ |i| @users[i].save } @conversations = [conversations(:one),conversations(:two)] [0,1].each{ |i| @conversations[i].save ...
# hostmonitor 基于Spring Boot的远程主机监控。该项目系个人开发学习之作品,拒绝一切商业用途。如若侵权,请与本人联系。Email:jack.feng.liu@gmail.com
# Distributed under the Apache License, Version 2.0. # See accompanying NOTICE file for details. import os import pathlib import argparse from trailblazer.traffic.base_layer import BaseLayer from trailblazer.traffic.road_network import RoadNetwork from trailblazer.utils import kw_utils def main(kw18_in=None, osm_fn...
require_relative '../../lib/ress/alternate_version' describe Ress::AlternateVersion do describe '#subdomain' do it 'defaults to the name of the category' do category = Ress::AlternateVersion.new('mobile', 'some media query') category.subdomain.should == 'mobile' end it 'can be overridden b...
import React, { useState } from "react"; import { List } from "immutable"; import { Redirect } from "react-router-dom"; import * as DateUtil from "../../../utils/DateUtil"; import { VirtualContestItem } from "../types"; import { CreateContestRequest, createVirtualContest, updateVirtualContestItems, } from "./ApiC...
import * as fs from "fs"; import * as _path from "path"; import { spawnSync } from "child_process"; const cwd: string = process.cwd(); const root: string = _path.resolve(__dirname, ".."); const assetsPath: string = _path.resolve(root, "assets"); const tsconfgPath: string = _path.resolve(assetsPath, "tsconfig", "base.t...
#!/bin/sh # # Script to generate STIG description scripts for Enterprise Linux 6 # STIG finding IDs # # Note: Create LISTFILE from the table at: # http://www.stigviewer.com/stig/red_hat_enterprise_linux_6/2014-06-11 # ######################################################################### LISTFILE=${1:-STIG-MAC-1...
/***************************************************************************** * ts_streams_private.h: Transport Stream input module for VLC. ***************************************************************************** * Copyright (C) 2004-2016 VLC authors and VideoLAN * * This program is free software; you can r...
# Sample code from Programing Ruby, page 725 require 'timeout' for snooze in 1..2 puts "About to sleep for #{snooze}" begin Timeout::timeout(1.5) do |timeout_length| puts "Timeout period is #{timeout_length}" sleep(snooze) puts "That was refresh...
/** * jp.co.future.uroborosql.parameter.ParameterTest */ SELECT * FROM ( SELECT CAST('2000-01-01' AS DATE) AS TARGET_DATE UNION ALL SELECT CAST('2001-01-01' AS DATE) AS TARGET_DATE UNION ALL SELECT CAST('2002-01-01' AS DATE) AS TARGET_DATE UNION ALL SELECT CAST('2003-01-01' AS DATE) AS TAR...
import React from "react"; import Navbar from "../../components/navbar/index"; import "../Admission_ug/index.css"; import Footer from "../../components/footer"; import { Typography, Grid, Box, } from "@material-ui/core"; import { makeStyles } from "@material-ui/core/styles"; const Admission_program = () => { c...
ActiveAdmin.register Region do menu :parent => I18n.t('active_admin.menu.dictionaries'), :if => proc{ can? :manage, Region } batch_action :destroy, false index :download_links => false do column :id column :kind do |region| region.kind.text end column :name column :has_tic actions...
package t6034 final class OptPlus[+A](val x: A) extends AnyVal { }
Hello there! If you haven't read our CONTRIBUTING.md document, please take a look, particularly at the section on our commit message conventions: https://github.com/nhost/nhost-dart/tree/main/CONTRIBUTING.md#commit-message-conventions
/* * 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 ...
<?php namespace Trilix\EventsApiBundle\HttpClient; class Exception extends \RuntimeException { }
class Task attr_reader :description def initialize(description) @description = description end def run end end
{-# LANGUAGE OverloadedStrings , TupleSections #-} module Graphics.ImageSize ( -- * Parsers imageFormatParser , imageSizeParser , imageInfoParser -- * Types , Size (..) , FileFormat (..) , JPEGContainer (..) , Endianness (..) ) where -- Magic number references: -- -- PNG: http://www.libpng....
from pyapprox.adaptive_sparse_grid import CombinationSparseGrid, \ max_level_admissibility_function, variance_refinement_indicator, \ get_sparse_grid_univariate_leja_quadrature_rules_economical from functools import partial import numpy as np from pyapprox.multivariate_polynomials import PolynomialChaosExpansi...
import Work, { IWork } from "../models/work.model" export const db_addWork = async (work: IWork): Promise<void> => { const newWork = new Work(work) await newWork.save() } export const db_updateWork = async (work: IWork) => { await Work.findOneAndUpdate({ _id: work._id }, work) } export const db_getWorks ...
using System; using System.Collections.Generic; using System.IO; using System.Linq; using UnityEditor.UIElements; using UnityEngine.UIElements; namespace AsmExplorer.Profiler { class ScrewItOverview : IScrewItView { readonly Label m_Info; ProfilerTrace m_Trace; bool m_HasData; ...
require 'rails_helper' describe 'User updates artworks', js: true do let(:hits) do [ { '_source' => { 'id' => '1234', 'name' => 'Pikachu', 'image_url' => 'https://d32dm0rphc51dk.cloudfront.net/Zm4R54uWxcufME7KJBRxdw/square.jpg' } }, { '_sour...
/*) Implemente um método que compare a igualdade de dois arrays e retorne um valor booleano. Entrada do método ([1,2,3,4],[1,2,3,4]), Resultado do método: true*/ function arraysEqual(array1, array2) { if (!Array.isArray(array1) || ! Array.isArray(array2) || array1.length !== array2.length) return false; ...
package io.mapwize.mapwizeuicomponents import android.app.Application import io.mapwize.mapwizesdk.core.MapwizeConfiguration class MapwizeApplication: Application() { override fun onCreate() { super.onCreate() val config = MapwizeConfiguration.Builder( this, resou...
package org.jetbrains.dataframe.io import org.jetbrains.dataframe.AnyFrame import org.jetbrains.dataframe.stubs.DataFrameToListNamedStub import org.jetbrains.dataframe.stubs.DataFrameToListTypedStub inline fun <reified C> AnyFrame.writeClass(): DataFrameToListTypedStub { check(C::class.java.isInterface) { "Interf...
#!/bin/bash SHELL_PATH=$(dirname $0) cd $SHELL_PATH cd .. echo "[deploy] yarn installing..." yarn install --frozen-lockfile echo "[deploy] yarn install done"
#!/usr/bin/env julia # script with a simple command line interface # the first line allows the script to be run like an executable from the # terminal # The "ArgParse" framework provies a simpl framework for parsing and type # checking arguments passed from the terminal using ArgParse function main(args::Dict{Stri...
package Example; public class Swap { public static void swap(Integer a, Integer b) { int temp = a.value(); a.value(b.value()); b.value(temp); } public void Program() { Integer a = new Integer(3); Integer b = new Integer(5); Swap.swap(a,b); System.out.println(a.value()); System.out.print...
import json import boto3 import botocore def lambda_handler(event, context): DryRunSetting = False SNAPSHOT_REGION = event['region'] SNAPSHOT_ID = event['detail']['snapshot_id'].split('/')[1] #SNAPSHOT_REGION = 'eu-west-2' #SNAPSHOT_ID = 'snap-00934cec8fdc15ec2' ec2 = boto3.client('e...
######################################################################## # sealed-secrets.sh ######################################################################## MYDIR=$WORK_DIR/sealed-secrets mkdir -p MYDIR if ! [[ $(stat /usr/local/bin/kubeseal) ]] then wget https://github.com/bitnami-labs/sealed-secrets/releas...
using System.Collections.Generic; using PFAssistant.Core.ViewModels.Crafting; namespace PFCrafting.ViewModels { public class CraftMenuViewModel : PolyhydraGames.Core.ViewModel.ViewModelBase { public CraftMenuViewModel() { Title = "Crafting Menu"; // _Character = new C...
package repositories import com.byteslounge.slickrepo.repository.Repository import javax.inject.Inject import models.FileMetadata import models.FileMetadataTable.FileMetadataTable import slick.ast.BaseTypedType import slick.jdbc.JdbcProfile class FileMetadataRepository @Inject()(override val driver: JdbcProfile) exte...
const low = require('lowdb') const FileSync = require('lowdb/adapters/FileSync') const iotaCore = require('@iota/core') if (typeof process.env.SEED == 'undefined') { throw 'Missing SEED in .env' } const filename = 'db_iota-payment-' + process.env.SEED.substring(0, 5) + '.json' const adapter = new FileSync(filename...
/* * Copyright 2017 PayPal * * 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 writin...
/* * Copyright (c) 2021, Jamie Mansfield <jmansfield@cadixdev.org> * Copyright (c) 2022, the SerenityOS developers. * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include <AK/Array.h> #include <LibCards/CardStack.h> #include <LibGUI/Frame.h> using Cards::Card; using Cards::CardStack; namespace Spid...
@extends('Shared/Layout') <!--titulo de la pagina--> <!--titulo de la pagina--> <!--titulo de la pagina--> @section('titulo') @endsection <!--body--><!--body--><!--body--> @section('seccion') @endsection @section('scripts') <script> $.ajax('/registrarUsuarios', { type: 'POST', // http method ...
package main import ( spoe "github.com/criteo/haproxy-spoe-go" ) func doResolve(messages []spoe.Message) (actions []spoe.Action, err error) { if debug { Debug.Printf("messages: %+v\n", messages) } for _, msg := range messages { var action []spoe.Action switch msg.Name { case "A": var ip string va...
import numpy as np from .distance import euclidean_dist def average_linkage_dist(nodes, cluster_a, cluster_b, distance_function=euclidean_dist): dist = 0 for a in cluster_a: for b in cluster_b: dist += distance_function(nodes[a], nodes[b]) return dist / (len(cluster_a) * len(cluster_...
<?php /** * Date: 19.11.14 * Time: 15:23 * Devs: [ * ] */ namespace Ojs\JournalBundle\Tests\Entity; use Ojs\Common\Tests\BaseTestCase; class JournalRepositoryTest extends BaseTestCase { public function testBanUser() { $user = $this->em->find('OjsUserBundle:User', 1); $journal = $this-...
package storage import "strings" var ( // MapPartToFindFunction maps a text type to the find function of its type MapPartToFindFunction = map[string]func(uint, string, int, int, bool) ([]Text, error){ "text": FindTextsByUserID, "shapes": FindShapesByUserID, "tags": FindTagsByUserID, "lemmas": FindLemmas...
<?php /* * David Bray * BrayWorth Pty Ltd * e. david@brayworth.com.au * * MIT License * */ namespace smokealarm\dao\dto; use dao\dto\_dto; class smokealarm_suppliers extends _dto { public $id = 0; public $name = ''; public $contact = ''; public $phone = ''; public $email = ''; }
import React, { Component } from "react"; import { connect } from "react-redux"; import Burger from "../../Components/Burger/Burger"; import BuildControls from "../../Components/Burger/BuildControls/BuildControls.js"; import Modal from "../../Components/UI/Modal/Modal"; import OrderSummary from "../../Components/Burge...
<?php /**========================================= * Admins actions * =========================================*/ Route::get('/admins', 'AdminController@index') ->name('admin_users_index'); Route::get('/{userId}/upsert/', 'AdminController@upsert') ->name('admin_user_upsert'); Route::post('/{userId...