text
stringlengths
27
775k
#!/usr/bin/env bash script_path='./scripts/shrink-pr-pdfs/' FILES=$(curl -s -X GET -G "$1" | jq -r '.[] | .filename' | grep "\.pdf$") if [ -n "$FILES" ]; then IFS=$'\n' for file in $FILES; do if grep -q "$file" "${script_path}/shrank-pdfs";then echo "already shrank '$file'" else echo "shrinkin...
/* example code for cc65, for NES * testing the zapper gun on controller slot 2 * using neslib * Doug Fraker 2018 */ #include "LIB/neslib.h" #include "LIB/nesdoug.h" #include "LIB/zaplib.h" #include "Zapper.h" #include "NES_ST/Zap_Test.h" #include "Sprites.h" const unsigned char pal1[]={ 0x0f, 0x00, 0x10,...
#!/bin/sh # # Script to install ansible without internet connection in the vagrant local environment. # Notice: No virtualenv here because virtualenvs are not working with mapped vagrant folders... # # import helper function (these will provide section_echo and the install* functions) # source /opt/ansible/scripts/h...
use crate::architecture::arm::ArmChipInfo; /// Information about a chip which is used /// for automatic detection of the connected chip. /// /// For ARM-based chips, the function [ArmProbeInterface::read_from_rom_table] is /// used to read the information from the target. /// /// [ArmProbeInterface::read_from_rom_tabl...
-- vim: set ts=2 sw=2 sts=0 ff=unix foldmethod=indent: {-# LANGUAGE OverloadedStrings #-} module MixKenallGeocode.Csv ( Csv, CsvRow, csv, withCsv, parseCsv ) where import System.IO import Control.Applicative import qualified Data.Text as T import qualified Text.Parsec as P import qualified Text.Parsec.T...
class RecipeSerializer < ActiveModel::Serializer attributes :name, :description, :category, :portions, :tip, :time, :ingredients, :steps, :image, :reviews_count, :reviews_average belongs_to :user has_many :reviews def category object.category.name end def ingredients object.ingredients.pluc...
<?php declare(strict_types=1); namespace Pt\LaravelAdminWebUpload\Form; trait BaseKit { /** * @param string $attribute * @param string $value * * @return $this */ protected function defaultAttribute($attribute, $value): static { if (!array_key_exists($attribute, $this->att...
// Copyright 2021 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef THIRD_PARTY_BLINK_RENDERER_EXTENSIONS_CHROMEOS_SYSTEM_EXTENSIONS_WINDOW_MANAGEMENT_CROS_WINDOW_H_ #define THIRD_PARTY_BLINK_RENDERER_EXTENSIONS_CH...
package org.mjstudio.gfree.data.database import androidx.room.Dao import androidx.room.Insert import androidx.room.Query import org.mjstudio.gfree.domain.dto.NotiDTO @Dao interface NotiDAO { @Insert suspend fun insertNoti(item : NotiDTO) @Insert suspend fun insertAll(vararg items : NotiDTO) @Qu...
import asyncio import datetime import threading import time from twitter_listener import TwitterListener from StreamerTests.twitter_keys_hidden import api_key, api_secret, access_token_secret, access_token import tweepy def push_tweet(author: str, text: str, created_at: datetime): print("{author} tweeted at {at}...
/** * Copyright 2019, OpenCensus Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or ...
data Rocks = Rocks String deriving (Eq, Show) data Yeah = Yeah Bool deriving (Eq, Show) data Papu = Papu Rocks Yeah deriving (Eq, Show) data Papu2 = Papu21 String Bool deriving (Eq, Show) -- 1. -- phew = Papu "chases" False -- ERROR: string and bool aren't equal to Rocks and Yeah phew = Papu21 "chases" Fals...
using System; using System.Collections; using System.Collections.Generic; using UnityEngine; [Serializable] public class Colocado : IComparable { public string Nome; public int Pontos; public string Id; public Colocado(string nome, int pontos, string id) { Nome = nome; Pontos = po...
package com.infinum.sentinel.data.sources.raw.collectors import android.content.Context import android.provider.Settings import com.infinum.sentinel.data.models.raw.DeviceData import com.infinum.sentinel.domain.collectors.Collectors internal class DeviceCollector( private val context: Context ) : Collectors.Devic...
default["user"] = "di" default["brew_cask"]["packages"] = ["iterm2", "google-chrome", "slack", "1password", "docker-toolbox", "skitch", "viscosity", "vagrant", "aws-vault"]
export * from './complex.module'; export * from './fields-filter.pipe'; export * from './read-complex-field-raw.component'; export * from './read-complex-field-table.component'; export * from './read-complex-field-collection-table.component'; export * from './read-complex-field.component'; export * from './write-comple...
// *********************************************************************** // Assembly : PureActive.Hosting // Author : SteveBu // Created : 11-03-2018 // License : Licensed under MIT License, see https://github.com/PureActive/PureActive/blob/master/LICENSE // // Last Modified By : ...
const { genericService } = require("../util"); const { itemDb } = require("../db"); const itemService = { get: genericService.get(itemDb.get), update: genericService.update(itemDb.update), create: genericService.create(itemDb.create), remove: genericService.remove(itemDb.remove), } module.exports = item...
extern crate termion; use termion::color::{Bg, Rgb}; fn get_color(index: usize) -> Rgb { let palette: Vec<Rgb> = vec![ Rgb(7, 7, 7), Rgb(31, 7, 7), Rgb(47, 15, 7), Rgb(71, 15, 7), Rgb(87, 23, 7), Rgb(103, 31, 7), Rgb(119, 31, 7), Rgb(143, 39, 7), ...
require "sinatra" require "openssl" require "rack" require "twitter" def verify_signature(payload_body, request_signature) signature = "sha1=" + OpenSSL::HMAC.hexdigest(OpenSSL::Digest.new("sha1"), ENV["GITHUB_WEBHOOK_TOKEN"], ...
package com.karasiq.shadowcloud.metadata.imageio import com.typesafe.config.Config import com.karasiq.shadowcloud.metadata.{MetadataParser, MetadataProvider, MimeDetector} class ImageIOMetadataProvider(rootConfig: Config) extends MetadataProvider { protected object imageioConfig { val config = rootConfig.getCo...
##ShaunFlynn import numpy as np import matplotlib.pyplot as pyplot ## d(f(x)) is f(x**n) = n * x**(n-1) ## function of x^2 def f(): return (x**2) ## function of x^3 def f_2(): return (x**3) ## function of x^3 + 5x def f_3(): return (x**3 + 5x) ## derivative of f def d_f: return (2x) ## derivative ...
import 'package:bullshit/screens/home_screen.dart'; import 'package:bullshit/screens/show_todo_screen.dart'; import 'package:bullshit/screens/splash_screen.dart'; import 'package:flutter/material.dart'; class Routes { static const String splashScreen = "/"; static const String homeScreen = "/homeScreen"; static ...
'use strict'; /** * Created by Adrian on 11-Apr-16. */ module.exports = function(thorin, opt, AccountModel) { function initModel(modelObj, Seq) { modelObj .field('id', Seq.PRIMARY) .field('type', Seq.STRING(20)) // the history type. Types: LOGIN, PASSWORD_CHANGE, etc. .field('user_agent...
package com.andryoga.safebox.security.interfaces interface PasswordBasedEncryption { fun encryptDecrypt( password: CharArray, data: ByteArray, salt: ByteArray, iv: ByteArray, encrypt: Boolean ): ByteArray fun getRandomSalt(): ByteArray fun getRandomIV(): ByteArr...
import 'models/models.dart'; import 'models/models.reflectable.dart'; import 'package:flutter_model_form_validation/flutter_model_form_validation.dart'; import 'package:flutter_test/flutter_test.dart'; void main() { initializeReflectable(); group('StringRange.', () { group('Test the priority between user and ...
#ifndef GAME_MAPENTITYLIST_H #define GAME_MAPENTITYLIST_H /////////////////////////////////////////////////////////////////////////////// #define MAX_MAPENTITIES 1024 class MapEntityList { public: MapEntityList ( ); ~MapEntityList ( ); MapEntity* findEnt ( int ); MapEntity* findEntSing...
import { Block, BlockList } from "./block-node.js"; const LINE_BREAK_LENGTH = 1; /** * Used for building a block syntax tree. */ export class BlockSyntaxTreeBuilder { private blocks: BlockList; private activeBlock: Block | undefined; private lastOffset: number; constructor() { this.blocks = this.emptyBl...
//--------------------------------------------------------------------- // <copyright file="LinqToAstoriaEvaluator.cs" company="Microsoft"> // Copyright (C) Microsoft Corporation. All rights reserved. See License.txt in the project root for license information. // </copyright> //------------------------------...
require 'test_helper' module PushType class AdminHelperTest < ActionView::TestCase before { @view_flow = ActionView::OutputFlow.new } describe '#title' do let(:my_title) { 'My test title' } before { title my_title } it { content_for?(:title).must_equal true } it { content_for(:title...
import {UserHighlightPayload} from '@api/payloads'; const BASE_URL = 'http://localhost:6617', Mappings = { LIST_REPOSITORIES_URL: 'repositories', LIST_MODELS_URL: 'models', LIST_VIEWS_URL: 'views', LIST_PROJECTS_URL: 'projects', USER_HIGHLIGHT_URL: (payload: UserHighlig...
# # Cookbook Name:: rubygems # Recipe:: ip_security # bash "disable tcp timestamps" do code "echo 0 > /proc/sys/net/ipv4/tcp_timestamps" not_if "cat /proc/sys/net/ipv4/tcp_timestamps | grep 0" end bash "enable syn cookies (prevent against the common 'syn flood attack')" do code "echo 1 > /proc/sys/net/ipv4/...
#![cfg_attr(docsrs, feature(doc_cfg))] #[macro_use] extern crate static_assertions; use std::{collections::HashMap, time::Duration}; use hyper::client::connect::HttpConnector; pub use clickhouse_derive::Row; use self::error::Result; pub use self::{compression::Compression, row::Row}; pub mod error; pub mod insert...
#ifndef _DELTAIP_ARP_H #define _DELTAIP_ARP_H #include "pktbuf.h" #include "iface.h" #define ARP_TABLE_SIZE 128 #define ARP_STATE_EMPTY 0x00 #define ARP_STATE_STABLE 0x01 #define ARP_STATE_STATIC 0x02 #define ARP_OP_REQUEST 0x01 #define ARP_OP_REPLY 0x02 #define ARP_TIMEOUT 300 #define ARP_FOREACH(ent...
#include <iostream> using namespace std; constexpr int MAX_N = 1000; template<class T> class Number { public: T value; int count; Number() {}; Number(T value, int count) : value(value), count(count) {}; bool operator<= (const Number& n) { if (this->count > n.count) { retu...
# Open For Contributions Upload anything related to development, programming. Make your own Folder and update file in it. Add Name to contributors.md.
#include <stddef.h> #include <kernel/gpio.h> #include <kernel/timer.h> #include <common/stdio.h> /** * Write 32-bit value to register * @param reg Register to write * @param data Value to write to the register */ void mmio_write(uint32_t reg, uint32_t data) { *(volatile uint32_t *) reg = data; } /** * Read valu...
import { ActionTree, MutationTree, GetterTree } from 'vuex' import { augmentKeys, chainIdHexToNumber } from '~/modules/tools' import { BSC, ETH, IMainChain, Polygon } from '~/constant/chain' import { IAccountInfo } from '~/services/Account' export interface IConnectedAccount { address: string chain: IMainChain, ...
import { Memento } from "./Memento"; class PositionSnapshot { public constructor(public x: number, public y: number) { } public toJSON() { return { x: this.x, y: this.y } } } class Position implements Memento<PositionSnapshot> { public constructor(private _x: ...
package com.ifanr.tangzhi.ext import com.google.gson.JsonObject import java.lang.reflect.Constructor private val CONSTRUCTS = mutableMapOf<Class<*>, Constructor<*>>() @Throws(Exception::class) private fun findSuitableConstruct(clz: Class<*>): Constructor<*> { synchronized(CONSTRUCTS) { return CONSTRUCTS....
<?php namespace app\api\model; use think\Model; /** * 用户类 model */ class Member extends Model { public function getUser(){ } public function add( $data ){ $result = $this->save( $data ); if( $result === false ){ return $this->getMessage(); }else{ return $result; } } pub...
<?php namespace Drupal\Tests\feeds\Kernel; use Drupal\feeds_test_events\EventSubscriber\FeedsSubscriber; use Drupal\node\Entity\Node; /** * Tests for dispatching feeds events. * * @group feeds */ class FeedsEventsTest extends FeedsKernelTestBase { /** * {@inheritdoc} */ public static $modules = [ ...
# frozen_string_literal: true module Tinybucket module Resource class PullRequests < Base def initialize(repo, options) @repo = repo @args = [options] end # Create a new pull request. # # @todo to be implemented. # @raise [NotImplementedError] to be implemente...
1 142 150 157 304 2 3 240 4 5 136 6 98 228 7 97 214 294 8 72 259 305 9 148 190 10 202 11 12 189 339 13 348 14 145 15 54 293 329 16 17 45 56 152 170 18 19 198 276 20 24 21 132 218 289 22 23 145 188 253 24 149 302 25 125 314 26 116 178 27 28 270 29 39 283 299 30 148 258 31 1 297 32 51 33 251 306 307 34 182 244 282 289 35...
module HandlePolicyNotification class BrokerDetails include Virtus.model attribute :npn, String def found_broker @found_broker ||= Broker.by_npn(npn).first end end end
package com.raphtory.algorithms import com.raphtory.core.model.algorithm.{GraphAlgorithm, GraphPerspective, Row} import scala.collection.mutable /** Description This algorithm will return the two hop neighbours of each node in the graph. If the user provides a node ID, then it will only return the two hop neig...
package lila package game import game._ class FeaturedTest extends LilaSpec { import Featured._ "Featured" should { "box 0 to 1" in { foreach(List( 0f -> 0f, 1f -> 1f, 0.5f -> 0.5f, 0.9f -> 0.9f, -1f -> 0f, 2f -> 1f)) { case (a, b) ⇒ box(0 to 1)...
# [Efficient Comparison](https://app.codesignal.com/arcade/python-arcade/meet-python/NWtSkp4Gd8ZeKc5R5/)
# Deallocate Firewall Login-AzAccount $resourceGroup = 'rg-alias-region-networking' $firewallName = 'fw-alias-region-01' $firewall = Get-AzFirewall -Name $firewallName -ResourceGroupName $resourceGroup $firewall.Deallocate() Set-AzFirewall -AzureFirewall $firewall # Allocate Firewall Login-AzAccount $resourceGroup = '...
/***************************************************************************** * Copyright (C) 2003-2010 PEAK System-Technik GmbH * * linux@peak-system.com * www.peak-system.com * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as pub...
import 'package:flutter/material.dart'; import 'package:flutter/widgets.dart'; import 'package:flutterapp/common/main.dart'; class TabBarPage extends StatefulWidget { @override State<StatefulWidget> createState() => TabBarPageState(); } class TabBarPageState extends State<TabBarPage> with SingleTickerProvider...
#include "pch.h" #include <stdexcept> #include "CppUnitTest.h" using namespace Microsoft::VisualStudio::CppUnitTestFramework; import boring32.winsock; namespace WinSock { TEST_CLASS(WinSockInit) { public: TEST_METHOD(TestInit) { Boring32::WinSock::WinSockInit init(2,2); } TEST_...
export const validateUserName = (username) => { var va = /^[^)!@#$%^&*(]*$/; return va.test(username) } export const validateEmail = (email) => { var va = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+[a-zA-Z]$/; return va.test(email) } export const validatePhoneNumber = (phoneNumber) => { var va = /^[(0|84|\...
import { Component, Input, Output, EventEmitter } from "@angular/core"; import GridColumnSettings from "../../../shared/danphe-grid/grid-column-settings.constant"; import { AccountingSettingsBLService } from "../../settings/shared/accounting-settings.bl.service"; import { MessageboxService } from "../../../shared/mess...
## AutoreleasePool 和 Runloop 的关系? 每一个线程,包括主线程,都会拥有一个专属的 `RunLoop` 对象,并且会在有需要的时候自动创建。子线程的`runloop` 需要自己手动创建,如果子线程的 `runloop` 没有任何事件,`runloop`会马上退出。 另外每一个线程都会维护自己的 `autoreleasepool` 堆栈,当 `runloop` 迭代结束时会向 `autoreleasepool` 发送 `release` 消息。 ### Reference https://blog.sunnyxx.com/2014/10/15/behind-autorelease/
# Safarie the Simple AI ! Safarie is a simple AI designed by me for ACICTS Bits'21. 👾 ### How to use ? Please download both Python files and run the main.py ! ### Let's contribute. If you like to contribute this project, Please make a folk and after you made changes, Open a pull request ! 💣 ### Don't copy and past...
package ay2021s1_cs2103_w16_3.finesse.logic.parser.bookmarkparsers; import static ay2021s1_cs2103_w16_3.finesse.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT; import ay2021s1_cs2103_w16_3.finesse.commons.core.index.Index; import ay2021s1_cs2103_w16_3.finesse.logic.commands.bookmark.DeleteBookmarkCommand; impor...
<?hh <<__EntryPoint>> function main(): void { //line 3 //line 4 //line 5 $s = new SplFileObject(__FILE__); echo $s->current(); }
# slack-clone-client Using graphql, react, express ## Getting started: - Run ```yarn``` and ```yarn start``` - Visit http://localhost:3000. - uri: - http://localhost:3000/login - http://localhost:3000/reigster - http://localhost:3000/view-team
import 'package:mvc_pattern/mvc_pattern.dart'; import 'package:admin/models/NavigationModel.dart'; import 'package:flutter/cupertino.dart'; class NavigationController extends ControllerMVC { static final NavigationController _navigationController = NavigationController._internal(); factory NavigationController()...
use std::{convert::From, error, fmt, io, num::ParseIntError}; /// Enum of all possible errors during manipulation of asar archives. #[derive(Debug)] pub enum Error { IoError(io::Error), ParseIntError(ParseIntError), JsonError(serde_json::Error), GlobError(glob::GlobError), } impl fmt::Display for Error { fn fmt(...
using UnityEngine; using UnityEngine.UI; namespace Elka.UI.Controller { public class UIOverlay : MonoBehaviour { private Image overlay; private Button overlayButton; private Canvas mCanvas; private void Awake() { overlay = GetComponent<Image>(); ...
uaa-keystone ============ a place to collaborate on Cloud Foundry UAA and OpenStack Keystone. code in this repo is likely to be quickly merged into the UAA repo and it is likely to be short-lived repository.
# Example 05: Logging Here, we see an example of how to use the AlephZero logger. It's a standalone docker image that is configured to save all messaged on topics matching `from/*` to `/tmp/logs`. See prior examples for how to start and stop the processes.
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Classes and functions pertaining to the loading and batching of data. """ # ============================================================================= # IMPORTS AND DEPENDENCIES # ============================================================================= imp...
""" Copyright (c) 2022 Huawei Technologies Co.,Ltd. openGauss is licensed under Mulan PSL v2. You can use this software according to the terms and conditions of the Mulan PSL v2. You may obtain a copy of Mulan PSL v2 at: http://license.coscl.org.cn/MulanPSL2 THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, W...
extern crate db_service; extern crate message_handler; extern crate schema; extern crate utils; use super::aura_message_sender::AuraMessageSender; use super::aura_messages::{AuraMessageTypes, AuthorBlock, BlockAcceptance, RoundOwner}; use super::config::initialize_config; use db_service::db_fork_ref::SchemaFork; use d...
CREATE TABLE users ( id bigint not null AUTO_INCREMENT, name varchar(255), primary key (id) ); CREATE TABLE addresses ( id bigint not null AUTO_INCREMENT, user_id bigint null, primary key (id), FOREIGN KEY (user_id) REFERENCES users(id) );
#!/usr/bin/env python3.8 import argparse import csv import dataclasses import datetime as dt import lzma import os import requests import sqlitedict import threading import time as timelib from concurrent.futures import ThreadPoolExecutor @dataclasses.dataclass class InventoryStation: name: str province: st...
import React from 'react'; import { StyleSheet, View, ScrollView } from 'react-native'; import { Header } from '../../components/header'; import LoginScreen2 from './screen2'; import LoginScreen3 from './screen3'; type LoginComponentProps = {}; const Login: React.FunctionComponent<LoginComponentProps> = () => { ret...
use super::file_location::*; /// /// Indicates an error with parsing a SAFAS file /// #[derive(Debug, Clone, PartialEq)] pub enum ParseError { /// Found an unimplemented feature Unimplemented, /// Suffered an interior error InternalError(FileLocation, String), /// A value is not value as a charac...
package com.pawanjeswani.superrvadapter import android.view.View internal interface BinderAbstract<RH, BH> { /** * For creating view holder for views between elements from * @param view * And return the view holder */ fun onCreateViewHolderBetweenElements(view: View): BH /** * Fo...
require_relative 'response' module Router BASE_ROUTES_FOLDER = './routes' DEFAULT_INDEX_ACTION = :index module_function def dispatch(request) route = lookup(request) response = route.send(action(request)) Response.build(response) rescue NotFound, NoMethodError Response.not_found end ...
; RUN: opt %s -scalarizer -scalarize-load-store -S | FileCheck %s 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" ; Function Attrs: nounwind uwtable define void @f1(<4 x i32>* nocapture %a, <4 x i32>...
(in-package :graph) (defun -sort-edge (e) (sort e #'<)) (defun cycle->edge-set (cycle) (declare (list cycle)) (loop for a in cycle and b in (cdr cycle) collect (-sort-edge (list a b)))) (defun edge-set->graph (es) (declare (list es)) (loop with grph = (make) for (a b) in es do (add grph a...
class Problem def self.solution(arr, key) binary_search_rotated(arr, key) end def self.binary_search_modified_rec(arr, from, to, key) # assuming all the keys are unique. if (from > to) return -1 end mid = from + ((to - from) / 2).floor if (arr[mid] == key) re...
#encoding: utf-8 require "model-base" class WeixinerInfo include DataMapper::Resource include Utils::DataMapper::Model extend Utils::DataMapper::Model include Utils::ActionLogger property :id , Serial property :subscribe, Boolean property :openid , String property :nickname ,...
<?php namespace FondOfSpryker\Zed\PriceProductPriceList\Dependency\Facade; use Generated\Shared\Transfer\PriceProductTransfer; use Spryker\Zed\PriceProduct\Business\PriceProductFacadeInterface; class PriceProductPriceListToPriceProductFacadeBridge implements PriceProductPriceListToPriceProductFacadeInterface { /...
# Copyright 2017 The Forseti Security Authors. All rights reserved. # # 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 ap...
#pragma once #include "../FilaInt.h" /** * Questão 05 * Função info * Retorna por referência o maior, * o menor e a média */ void info(Fila *fila, int *maior, int *menor, float *media);
--============================================================================== -- GPI - Gunther Pippèrr -- Desc: get the rights on a DB role -- Date: November 2013 --============================================================================== set verify off set linesize 130 pagesize 300 define ROLENA...
class Organization::Public::Piece::CategorizedDocsController < Organization::Public::PieceController def pre_dispatch @piece = Organization::Piece::CategorizedDoc.find(Page.current_piece.id) @item = Page.current_item render plain: '' unless @item.is_a?(Organization::Group) end def index sys_group...
# This is an automatically generated file. # DO NOT EDIT or your changes may be overwritten import base64 from enum import IntEnum from xdrlib import Packer, Unpacker from ..__version__ import __issues__ from ..exceptions import ValueError __all__ = ["TransactionResultCode"] class TransactionResultCode(IntEnum): ...
package org.jetbrains.ngramgenerator.io import com.fasterxml.jackson.databind.ObjectMapper import java.io.File object FileWriter { fun write(file: File, dirPath: String, targetDirPath: String, content: Any) { val relativePath = file.relativeTo(File(dirPath)) val outputPath = File("$targetDirPath/$...
# AGH-schedule-optimizer Make those lengthy calendar entries go away ![Image of before and after this script](http://i.imgur.com/ljf1Sae.png) ## Installation 1. Install [Node.js](https://nodejs.org/) 2. `npm install -g shelljs` ## Usage 1. Download `plan_zajec.ics` from https://dziekanat.agh.edu.pl/ into this repo 2...
require File.expand_path('../../../spec_helper', __FILE__) require File.expand_path('../fixtures/common', __FILE__) require File.expand_path('../shared/glob', __FILE__) describe "Dir.[]" do it_behaves_like :dir_glob, :[] end describe "Dir.[]" do it_behaves_like :dir_glob_recursive, :[] end describe "Dir.[]" do ...
using UnityEngine; using UnityEngine.UI; namespace i5.Toolkit.Core.Utilities.UnityAdapters { public class ScrollRectAdapter : IScrollView { public ScrollRect Adaptee { get; private set; } public Vector2 NormalizedPosition { get { re...
use std::process; extern crate split_gpg_user; use split_gpg_user::spawn_similarly; const SERVER_BIN_NAME: &'static str = "split-gpg-user-server"; fn main() { let server = spawn_similarly(SERVER_BIN_NAME); let status = server.expect("Error running the server").wait().expect("Server errored"); process::e...
import 'package:geofence_service/models/geofence_radius_sort_type.dart'; /// Options for [GeofenceService]. class GeofenceServiceOptions { /// The time interval in milliseconds to check the geofence status. /// The default is `5000`. int _interval = 5000; /// Geo-fencing error range in meters. /// The defau...
import { pickBy } from 'lodash'; import { Using } from 'src/types/formulas'; import { Action } from '../actions'; import { ShapesAction, ShapesState, ShapeType } from '../types/shapes'; import makeDefaultShape from '../util/makeDefaultShape'; export const shapesInitialState: ShapesState = { rect: makeDefaultShape(Sh...
//! Curves. #[cfg(test)] extern crate assert; extern crate num_traits as num; use num::Float; use std::marker::PhantomData; /// A curve. pub trait Curve<T: Float> { /// Evalute the curve at a point in `[0, 1]`. fn evaluate(&self, T) -> T; } /// A trace of a curve. #[derive(Clone, Copy, Debug)] pub struct T...
// Analyse and manipulate an image using OpenCV by processing // a list of actions described in a yaml file. // Created by Dilpesh Patel on 2019/08/02 #include <iostream> #include <string> #include "image_processor.hpp" static const char *const USAGE = "usage: ./play_image <yaml_path>\n"; static const std::...
using System; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.Text; using System.Threading.Tasks; using Microsoft.VisualStudio.TestTools.UnitTesting; using Uno.Extensions; using Windows.Foundation; using Windows.Foundation.Collections; using Windows.UI.Xaml; usin...
import CognitoAuth from '../src/CognitoAuth'; import CognitoConstants from '../src/CognitoConstants'; const authData: any = { ClientId: "ClientId", AppWebDomain: "localhost:3000", TokenScopesArray: ['email', 'profile', 'openid'], RedirectUriSignIn: "http://localhost:3000", RedirectUriSignOut: "htt...
class IncreaseMavenJnlpVersionSize < ActiveRecord::Migration[5.1] def up change_column :maven_jnlp_versioned_jnlp_urls, :date_str, :string, :limit => nil end def down change_column :maven_jnlp_versioned_jnlp_urls, :date_str, :string, :limit => 15 end end
import readline from 'readline' import c from 'picocolors' const spinnerMap = new WeakMap() const spinnerFrames = ['-', '\\', '|', '/'] function getSpinner() { let index = 0 return () => { index = ++index % spinnerFrames.length return spinnerFrames[index] } } function getLines(str = '', width = 80) { ...
import { combineReducers } from 'redux'; /// import cachedRequests from './cachedRequests'; /// import expanded from './expanded'; import ids from './ids'; import loadedOnce from './loadedOnce'; import params from './params'; /// import selectedIds from './selectedIds'; import total from './total'; const defa...
class Transaction < ActiveRecord::Base belongs_to :transaction_request belongs_to :charge belongs_to :plaid_category, foreign_key: :category_id, primary_key: :plaid_id belongs_to :merchant def linked_account transaction_request.linked_account end def financial_institution linked_account.financial_...
## API ### 属性 | 参数 | 说明 | 类型 | 默认值 | | --- | --- | --- | --- | | `v-model` | 绑定的值 | _any_ | **false** | | `checked-value` | 选中状态的值 | _any_ | **true** | | `unchecked-value` | 未选中状态的值 | _any_ | **false** | | `label` | 标签名 | _string \| number_ | **-** | | `size` | 复选框尺寸, 可选值为 `normal` `small` `mini` | _string_ | **norm...
use strict; use warnings; use CGI; use FormValidator::Lite qw/Email Date/; my $q = CGI->new; $q->param( param1 => 'ABCD' ); $q->param( param2 => 12345 ); $q->param( mail1 => 'lyo.kato@gmail.com' ); $q->param( mail2 => 'lyo.kato@gmail.com' ); $q->param( year => 2005 ); $q->param( month => 11 ); $q->param( day ...