text stringlengths 27 775k |
|---|
from time import perf_counter as pfc
import re
def load_puzzle(datei):
with open(datei) as f:
return f.readlines()
def solve(puzzle):
rentiers, dist = {}, {}
for zeile in puzzle:
rentiers[zeile.split()[0]] = list(map(int,re.findall(r'\d+',zeile)))
for ren, (kms, s1, s2) in rentiers.items():
dist... |
module LinkedData::Client
class ResourceIndex
HTTP = LinkedData::Client::HTTP
def self.resources
get(:resources)
end
def self.counts(classes, params = {})
classes = classes.is_a?(Array) ? classes : [classes]
params.merge!(class_params_hash(classes))
get(:counts, params)
e... |
import { ModelRepository } from 'src/modules/shared/decorators/model-repository';
import { BaseRepository } from 'src/modules/shared/repositories/base-repository';
import { Icd } from '../models/icd';
@ModelRepository(Icd)
export class IcdRepository extends BaseRepository<Icd> {}
|
using System;
using System.Collections.Generic;
using Vardirsoft.DI.Interfaces;
namespace Vardirsoft.DI.Shelves
{
public class InstanceShelf : IShelf
{
public InstanceCreationMode CreationMode => InstanceCreationMode.None;
public object ContainedInstance { get; }
public Type ... |
require 'bcrypt'
module Revise
module Models
module DatabaseAuthenticatable
extend ActiveSupport::Concern
MAILERS = []
HELPERS = ['Authentication']
CONTROLLERS = ['Sessions', 'Accounts']
included do
attr_reader :password, :current_password
attr_accessor :pa... |
using Caviar.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Caviar.Core
{
public class AppInteractor : Interactor
{
public override bool IsAdmin => GetAdmin();
private bool GetAdmin()
{
... |
// Copyright 2009-2020 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
#pragma once
#include "../common.h"
#include "AbstractArray.h"
#include "FixedArrayView.h"
namespace rkcommon {
namespace utility {
/* 'FixedArrayView<T>' implements an array interface on a pointer to
* data which is owned ... |
; ---------------------------------------------------------------------------
; Object 8B - Eggman on "TRY AGAIN" and "END" screens
; ---------------------------------------------------------------------------
EndEggman:
moveq #0,d0
move.b obRoutine(a0),d0
move.w EEgg_Index(pc,d0.w),d1
jsr EEgg_Index(pc,d1.w)
... |
#! /bin/bash
export DEBIAN_FRONTEND=noninteractive
apt-get update
apt-get -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" dist-upgrade
apt-get install -y ruby ruby-dev
yes | gem install jekyll
|
/*
* 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... |
#!/usr/bin/env bash
HERE="$(dirname ${0})"
source "${HERE}"/lib/user.sh
# generates source code
USAGE="${0} <top of the tree>"
TOP=${1:?${USAGE}}
RAGEL=${RAGEL:-$(which ragel)}
[ -x "${RAGEL}" ] || die "missing ragel or RAGEL env variable"
set -e
"${RAGEL}" "${TOP}"/src/mailbox_parser.rl.c -T1 -o "${TOP}"/src-gener... |
# Release History
### 1.0.2 (2022-05-23)
- [x] Object callbacks;
### 1.0.2 (2022-03-04)
- [x] Fix: Breadcrumbs in callback are not correct;
### 1.0.0 (2022-03-04)
- [x] Initial code;
- [x] Test package;
- [x] Documentation;
- [ ] Bug: Breadcrumbs in callback are not correct;
|
class PapersMailer < ApplicationMailer
default from: Settings.mailer.default_from
def notification_after_create(paper_id)
@paper = Paper.find(paper_id)
mail to: @paper.user.email, subject: "We have recieved your proposal."
end
end
|
# MÃO NA MASSA - TRAGA UM FILME DISTINCT EM REGISTROS REPETIDOS
# APENAS RETIRA AS DUPLICIDADES
SELECT DISTINCT F.TITULO, F.DESCRICAO, F.FILME_ID
FROM ALUGUEL A, FILME F, INVENTARIO I
WHERE A.INVENTARIO_ID = I.INVENTARIO_ID
AND F.FILME_ID = I.FILME_ID
ORDER BY TITULO;
# AGRUPAMENTO MAIS COMPLETO, AJUDA NAS FUNÇÕES D... |
script.module.certifi
=====================
Python certifi library packed for KODI.
See https://github.com/certifi/python-certifi
|
const client = require('../../client.js');
module.exports = payload => {
return client.post('statuses/update', {
status: payload
}, (error) => {
if (error) console.log(error);
});
}; |
using System.Threading.Tasks;
using FinanceDataMigrationApi.V1.Gateways.Interfaces;
using FinanceDataMigrationApi.V1.Handlers;
using FinanceDataMigrationApi.V1.Infrastructure.Entities;
using FinanceDataMigrationApi.V1.UseCase.Interfaces.DmRunStatus;
namespace FinanceDataMigrationApi.V1.UseCase.DmRunStatus
{
public... |
//---------------------------------------------------------------------
// <copyright file="JsonLightMaintainPropertyOrderAnnotation.cs" company="Microsoft">
// Copyright (C) Microsoft Corporation. All rights reserved. See License.txt in the project root for license information.
// </copyright>
//------------... |
package com.github.seaframework.core.common;
import lombok.extern.slf4j.Slf4j;
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
/**
* 模块名
*
* @author spy
* @version 1.0 2019-05-14
* @since 1.0
*/
@Slf4j
public class CoreConst {
private CoreConst() {
}
public static final ... |
## New very minor version 0.3.1
* Add another vignette
## Test environments
* local OS X install, R 4.0.3
* Mac OS X (on github), R 4.0.3
* Windows (on github), R 4.0.3
* Ubuntu (on github), R 4.0.3
* Ubuntu (on github), R devel
## R CMD check results
There were no ERRORs, WARNINGs, or NOTEs
## New minor version 0... |
// ********************************************************** //
// *********** Connection DB Of App ************************* //
// ********************************************************** //
const Sequelize = require("sequelize");
const env = require("./env");
const _env = env.local;
const db = {};
const sequelize... |
#!/bin/sh
sudo pacman -S zsh
sh -c "$(wget https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)"
sudo pacman -S awesome-terminal-fonts powerline-fonts
sudo pacman -S pygmentize # For ccat support
# TODO: set ZSH_THEME="agnoster"
# plugins=(
# # git
# dotenv
# colored-man-pa... |
package org.alvheim.sphinx.services.impl;
import static org.alvheim.sphinx.services.util.ServiceUtils.applyPatches;
import java.util.List;
import java.util.Map;
import javax.transaction.Transactional;
import org.alvheim.sphinx.entities.Resource;
import org.alvheim.sphinx.exception.ResourceNotFoundException;
import or... |
# OVN docker插件
```sh
# start docker
docker daemon --cluster-store=consul://127.0.0.1:8500 \
--cluster-advertise=$HOST_IP:0
# start north
/usr/share/openvswitch/scripts/ovn-ctl start_northd
ovn-nbctl set-connection ptcp:6641
ovn-sbctl set-connection ptcp:6642
# start south
ovs-vsctl set Open_vSwitch . \
exter... |
using CairoMakie, LinearAlgebra
CairoMakie.activate!()
function E(q, rx, ry, x, y)
d = sqrt((x-rx)^2 + (y-ry)^2)^3
return (q * (x - rx) / d, q * (y - ry) / d)
end
function charges(; nq = 2)
qs = []
for i in 1:nq
q = i % 2 * 2 - 1
push!(qs, (q, cos(2π * i / nq), sin(2π * i / nq)))
end... |
var React = require('react');
var {Calendar} = require('../../lib/index');
var moment = require('moment');
// require('moment/locale/nb');
function datePicked(date) {
console.log(date);
}
let dateMap = {
};
dateMap[new Date().toDateString()] = React.createElement('span', {}, 'test');
var baseDate = new moment();
... |
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
?>
<script type="text/javascript">
$(document).ready(function() {
function getVisible() {
var $el = $('footer'),
scrollTop = $(this).scrollTop(),
scrollBot = scrollTop + $(this).height(),
elTop = $el.offset().top,
elBottom = elTop +... |
#!/usr/bin/env python3
# tab-width:4
# pylint: disable=missing-docstring
from typing import Optional
from .global_vars import DNSMASQ_CONFIG_INCLUDE_DIRECTORY
class DnsgateConfig():
def __init__(self, *,
mode: Optional[str] = None,
dnsmasq_config_file: Optional[str] = None,
... |
// ReSharper disable AccessToDisposedClosure
// ReSharper disable CheckNamespace
using System;
using System.Collections.Generic;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using AM.Threading.Tasks;
#nullable enable
namespace UnitTests.AM.Threading.Tasks
{
[TestClass]
public class SimplestTaskProc... |
package com.appmattus.markdown.rules
import com.appmattus.markdown.processing.MarkdownDocument
import com.appmattus.markdown.dsl.RuleSetup
import com.appmattus.markdown.errors.ErrorReporter
/**
* # Multiple consecutive blank lines
*
* This rule is triggered when there are multiple consecutive blank lines in the do... |
# Advent of Code 2020: Day 05
# Take the input list of boarding passes,
# translate them to their row, col to get their seat ID
# and get the max seat ID.
# NOTES
# - 128 rows in plane
# - 8 seats per row
# Part 2
# - find my seat
# - my seat will be missing from the list
# - fill the matrix (airplane seats)
# - th... |
module Admin
module Customers
class MergeView
def initialize(original:, duplicate:)
@original = original
@duplicate = duplicate
end
def duplicate_identifier
duplicate.identifier
end
def original_identifier
original.identifier
end
def dup... |
# -*- coding: UTF-8 -*-
require 'tmpdir'
require 'fileutils'
class PoufCommandsTests < Test::Unit::TestCase
include PoufTestsUtils
def setup
@prev_cmd = ENV['POUF_CMD']
ENV['POUF_CMD'] = 'echo'
@prev_dir = Pouf.sounds_dir
@prev_path = Dir.pwd
Pouf.sounds_dir = @sounds_dir = Dir.mktmpdir('pouf... |
import request from '@/plugin/axios'
class Helper {
constructor (controllerName) {
this.controllerName = controllerName
}
// 首页视图
Index (query = null) {
return request.get(`${this.controllerName}/Index`, {
params: query
})
}
// 查询UID数据 搜索按钮对应的处理也是这个方法
LoadData (query = {}) {
return r... |
echo "update"
apt-get update -y > log
echo "install apt-utils"
apt-get install apt-utils -y > log
echo "install curl"
apt-get install curl -y > log
echo "install sudo"
apt-get install sudo -y > log
curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash - > log
echo "install git"
sudo apt-get install git -y >... |
package com.landenlabs.all_webviewtester.util;
import java.lang.reflect.Field;
import java.lang.reflect.Member;
import java.util.ArrayList;
import java.util.List;
/**
* Created by ldennis on 8/15/16.
*/
enum ClassMember { CONSTRUCTOR, FIELD, METHOD, CLASS, ALL }
public class ClassSpy {
public static List<Strin... |
package ru.debajo.reader.rss.data.db.model
import androidx.room.ColumnInfo
import androidx.room.Entity
import androidx.room.PrimaryKey
@Entity
class DbNewArticle(
@PrimaryKey
@ColumnInfo(name = "articleId")
val articleId: String,
@ColumnInfo(name = "channelUrl")
val channelUrl: String,
)
|
/*********************************************************************
* Filename: QuickSort_Int.Array.c
* Author: Javier Montenegro (https://javiermontenegro.github.io/)
* Copyright:
* Details: This code is the implementation of the quicksort algorithm.
***********************************************************... |
package main
import (
"fmt"
"math"
)
func main() {
fmt.Println(findRotateSteps("godding", "godding"))
fmt.Println(findRotateSteps("godding", "gd"))
}
func findRotateSteps(ring string, key string) int {
n := len(ring)
cache := make(map[string]int)
var process func(ring int, key string) int
process = func(r... |
require 'active_support/core_ext/hash'
require 'active_support/core_ext/string'
require 'securerandom'
require 'json'
require 'net/http'
spec = Gem::Specification.find_by_name("six_saferpay")
gem_root = spec.gem_dir
Dir[File.join(gem_root, "lib", "six_saferpay", "**/*.rb")].sort.each do |file|
require file
end
mo... |
// The MIT License (MIT)
// Copyright (c) 2020 Maksim Andrianov
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to
// deal in the Software without restriction, including without limitation the
// rights to use, c... |
unit Unit1;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ComCtrls,
StdCtrls, Spin, Buttons, ExtCtrls;
type
{ TForm1 }
TForm1 = class(TForm)
BitBtn1: TBitBtn;
BitBtn2: TBitBtn;
BitBtn3: TBitBtn;
Image1: TImage;
ImageLi... |
-module(poll).
-author("Tom McNulty <tom.mcnulty@cetiforge.com>").
%%%
% Voting Poll
%
%%%
% Copyright 2009 Ceti Forge
%
% 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... |
import { Injectable } from '@angular/core';
import { NgxAnalytics } from 'ngx-analytics';
declare var mixpanel: any;
@Injectable()
export class NgxAnalyticsMixpanel {
constructor(
private ngxAnalytics: NgxAnalytics
) {
this.ngxAnalytics.pageTrack.subscribe((x) => this.pageTrack(x.path));
this.ngxAna... |
require 'spec_helper'
describe Space, '#updatable_by?' do
it 'returns true if the user is an admin of the space' do
space = Space.new(id: 'co-up')
user = double(:user)
allow(user).to receive(:admin_of?).with(space) {true}
expect(space).to be_updatable_by(user)
end
it 'returns false if the user ... |
<?php
namespace App\Http\Controllers\Lecturer;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
use App\Courses;
use App\Stu_enrollment;
use App\Assignments;
use App\Quiz;
use Illuminate\Support\Facades\Notification;
use App\Notifications\NewAssignment;
use App\User... |
/*
** Read about this code at http://shutdownhook.com
** MIT license details at https://github.com/seanno/shutdownhook/blob/main/LICENSE
*/
// There is a lot of black magic in here gleaned from a ton of coding-
// by-google. I don't pretend to claim that it's perfect, but have tried
// to encapsulate it all in one pla... |
const { extractMatrixColumn } = require('../solutions/22-extract-matrix-column');
const matrix = [[1, 1, 1, 2], [0, 5, 0, 4], [2, 1, 3, 6]];
const column = 2;
const result = [1, 0, 3];
describe('tests/22-extract-matrix-column.test.js', () => {
test('expect extractMatrixColumn to be a function', () => {
expect(t... |
//
// LPCToolsDemoViewController.h
// LPCTools
//
// Created by godlikelpc@gmail.com on 11/29/2018.
// Copyright (c) 2018 godlikelpc@gmail.com. All rights reserved.
//
@import UIKit;
@interface LPCToolsDemoViewController : UIViewController
@end
|
package com.strumenta.kolasu.parserbench
import com.google.gson.JsonObject
import com.strumenta.kolasu.emf.EMFEnabledParser
import com.strumenta.kolasu.emf.saveAsJsonObject
import com.strumenta.kolasu.emf.toEObject
import com.strumenta.kolasu.parsing.ParsingResult
import com.strumenta.kolasu.validation.Result
import o... |
package com.quickblox.sample.chat.kotlin.utils.imagepick
import java.io.File
interface OnImagePickedListener {
fun onImagePicked(requestCode: Int, file: File)
fun onImagePickError(requestCode: Int, e: Exception)
fun onImagePickClosed(requestCode: Int)
} |
<?php
/**
* Routing for the web application requisition.
*
* @copyright 2019 Fernando Val
* @author Fernando Val <fernando.val@gmail.com>
* @license https://github.com/springy-framework/core/blob/master/LICENSE MIT
*
* @version 1.0.0
*/
namespace Springy\HTTP;
use Springy\Exceptions\SpringyException;
... |
package main
import (
"bytes"
"fmt"
. "github.com/jlaffaye/ftp"
)
var conn *ServerConn
func main() {
// 连接
//conn, err := Dial("localhost:21", DialWithDebugOutput(os.Stdout))
var err error
conn, err = Dial("localhost:21")
if err != nil {
panic(err)
}
// 登录
if err = conn.Login("admin", "admin"); err != ... |

**RxLine** helps you manage complex (possibly async) operations on collections (or streams) of entities.
A common example is performing a series of tasks on a list of files
(compiling sass to css or markdown to html).
# Installation
```bash
npm i rxline
```
---
# Usage
Typical usage of **RxL... |
import 'dart:convert';
import 'package:HabitApp/src/core/models/Habit.dart';
class History {
List<Habit> history = [];
getHistory() => history;
addToHistory(Habit ended) => history.add(ended);
History();
History.fromJson(Map<String, dynamic> json) {
final list = json['history'] as List;
print(li... |
---
id: version-0.59-snapshotviewios
title: SnapshotViewIOS
original_id: snapshotviewios
---
##### 本文档贡献者:[sunnylqm](https://github.com/search?q=sunnylqm%40qq.com+in%3Aemail&type=Users)(100.00%)
### 查看 Props
* [View props...](view.md#props)
- [`onSnapshotReady`](snapshotviewios.md#onsnapshotready)
- [`testIdentifie... |
# frozen_string_literal: true
require 'spec_helper'
RSpec.describe Mutations::Boards::Issues::IssueMoveList do
let_it_be(:group) { create(:group, :public) }
let_it_be(:project) { create(:project, group: group) }
let_it_be(:board) { create(:board, group: group) }
let_it_be(:epic) { create(:epic, group: group) ... |
/**
* @module veact.logger
* @author Surmon <https://github.com/surmon-china>
*/
import { isFunction, isPromise } from './utils'
const VEACT_NAME = 'veact'
const LOGGER_PREFIX = `[${VEACT_NAME}]`
export const logger: Console = {
...console,
log(...args: any) {
console.log(LOGGER_PREFIX, ...args)
},
wa... |
-- file:misc_functions.sql ln:20 expect:true
SELECT num_nulls(VARIADIC '{"1","2","3","4"}'::text[])
|
<?php
declare(strict_types=1);
namespace Rowbot\DOM\Tests\dom\nodes;
use Rowbot\DOM\Tests\dom\DocumentGetter;
use Rowbot\DOM\Tests\TestCase;
/**
* @see https://github.com/w3c/web-platform-tests/blob/master/dom/nodes/Node-isConnected.html
*/
class NodeIsConnectedTest extends TestCase
{
use DocumentGetter;
... |
module Pass
using Cassette
using Core: CodeInfo, SlotNumber, SSAValue
Cassette.@context Ctx
storage = Any[]
function Cassette.execute(ctx::Ctx, f, args...)
if Cassette.canoverdub(ctx, f, args...)
_ctx = Cassette.similarcontext(ctx, metadata = storage)
return Cassette.overdub(_ctx, f, args...)
... |
rm -rf /var/cache/yum/*/*/local
mv *.rpm /opt/jidoteki/repos/yum/centos/RPMS/
createrepo /opt/jidoteki/repos/yum/centos
yum update -y --disablerepo=* --enablerepo=local
|
(in-package :ls-base)
;;;;; Indentation of macros
;;;
;;; This code decides how macros should be indented (based on their
;;; arglists) and tells Emacs. A per-connection cache is used to avoid
;;; sending redundant information to Emacs -- we just say what's
;;; changed since last time.
;;;
;;; The strategy is to scan a... |
import { ILevel, IGoal, IHint } from './interfaces'
import Cell from './Cell'
import Grid from './Grid'
import Toolbox from './Toolbox'
import Goal from './Goal'
import Hint from './Hint'
import GameState from './GameState'
/**
* LEVEL CLASS
* Level class describes the level data and logic
* Levels are loaded as a ... |
module ApplicationHelper
def csrf_token
%Q{<input name="authenticity_token"
value="#{form_authenticity_token}"
type="hidden" />
}.html_safe
end
end
|
'use scrict';
const credits = 23580;
const pricePerDroid = 3000;
let message;
let countDroid = prompt('How much droid do u wont?');
// countDroid = Number(countDroid);
const totalPrice = countDroid * pricePerDroid;
const balance = credits - totalPrice;
console.log(totalPrice);
console.log(balance);
if (countDroid === n... |
/*
*
* Copyright 2018 Asylo 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 agree... |
# coffee-app
Coffee ordering app with a test suite using Midje library.
## Usage
### Using Leiningen's test task
$ lein test
### Using REPL
$ lein repl
user=> (use 'midje.repl)
user=> (autotest) |
#include <cstdio>
#include <algorithm>
using namespace std;
unsigned long long dp[18][18];
unsigned long long solve(int n, int k) {
if (dp[n][k]) return dp[n][k];
return dp[n][k] = solve(n, k - 1) - solve(n - 1, k - 1);
}
int main() {
int t;
unsigned long long f = 1;
scanf("%d", &t);
for (int i = 0; i < 1... |
#pragma once
#include "IApp.hpp"
#define GLEW_STATIC 1
#include <GL/glew.h>
class App final : public IApp
{
public:
int Run() override;
private:
void RunFrame();
void RunGui();
bool CreateGui();
bool CreateShaders();
bool ReloadShaders();
bool CreateTexture();
... |
# update-dist usage example: {{{1
#
# update-dist TXF_AGENT $TXF_AGENT TXF_AGENT_SECRET $TXF_AGENT_SECRET
#
update-dist () {
local GK=$1
local GV=$2
local SK=$3
local SV=$4
local FILE='./.env.dist'
local U1="$GK = <Stellar public key>"
local U2="$SK = <Stellar secret key>"
echo "- updating ${FILE} wit... |
!*robodoc*u* tests/test_mpi_hxvn
! NAME
! test_mpi_hxvn
! SYNOPSIS
!$Id: test_mpi_hxvn.f90 537 2018-04-03 13:57:55Z mexas $
program test_hxvn_mpi
! PURPOSE
! Test MPI HX routines: ca_mpi_halo_type_create, ca_mpi_hx_all,
! ca_mpi_halo_type_free. The kernel is a simply copy.
! DESCRIPTION
! Even though... |
module Advent.Y2020.Day9.Part1 where
import Advent.Input
import Advent.List
-- | Collect a value from the list and the _n_ values preceding it
prior :: Int -> [a] -> [(a, [a])]
prior n
= catMaybes
. map uncons
. filter (\l -> length l == (n + 1))
. map (reverse . (\l -> drop (length l - (n + 1)) l))
. inits... |
module.exports = {
base: 'https://manhwaindo.id/',
latest: 'https://manhwaindo.id/series/?order=update',
detail: 'https://manhwaindo.id/series/',
all: 'https://manhwaindo.id/series/?page=',
search: 'https://manhwaindo.id/?s=',
} |
<?php
/*
* Copyright 2016 Google 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 or agreed t... |
//
// ICChatBoxMoreView.h
// XZ_WeChat
//
// Created by 郭现壮 on 16/3/11.
// Copyright © 2016年 gxz All rights reserved.
//
#import <Foundation/Foundation.h>
#import "ICChatBoxMoreViewItem.h"
typedef NS_ENUM(NSInteger, ICChatBoxItem){
ICChatBoxItemFace = 0, // face
ICChatBoxItemAlbum, // Album
ICChatB... |
Given /^I have no portfolio entries$/ do
PortfolioEntry.delete_all
end
Given /^I (only )?have a? ?portfolio entry?i?e?s? titled "?([^\"]*)"?$/ do |only, title|
PortfolioEntry.delete_all if only
entry = PortfolioEntry.create(:title => title)
end
Then /^I should have ([0-9]+) portfolio entries?$/ do |count|
Po... |
public class SwEngineer extends Employee {
private String projName;
public SwEngineer(String name, double baseSalary, String projName) {
super(name, baseSalary);
this.projName = projName;
}
public String getProjName() {
return projName;
}
//todo own hash and equals
... |
use super::super::values::type_value::{
TypeValue, TypeValueWithRelatedType, TypeValueWithTelephoneType,
};
use super::super::values::Value;
use super::super::Set;
use super::*;
use std::fmt::{Display, Write};
use validators::{Validated, ValidatedWrapper};
#[derive(Clone, Debug, PartialEq, Eq, Hash)]
pub struct ... |
#!/bin/bash
read TPdevice <<< $( xinput | sed -nre '/Touchpad/s/.*id=([0-9]*).*/\1/p' )
state=$( xinput list-props "$TPdevice" | grep "Device Enabled" | grep -o "[01]$" )
if [ "$state" -eq '1' ];then
xinput --disable "$TPdevice"
else
xinput --enable "$TPdevice"
fi
|
using System.Buffers;
using System.Collections.Generic;
namespace Shared
{
public static class Parsers
{
static ArrayPool<short> _separatorsPosition = ArrayPool<short>.Shared;
// Parsing with List of Int
public static IList<int> ParseLineWithList(string line)
{
var... |
# DigitalCollections: Blueprints 5: Application (Spring Boot + Commandline) (Step 04)
This application is a commandline application for transforming a XML file with a XSL file.
## Usage
```sh
usage: java -jar transform-xml.jar <xml file> <xsl file> [-h] [-p <arg>]
-h,--help Show help... |
import * as R from 'ramda';
const valuesToPromisesList = mapperFn => R.compose(
R.map(
([key, val]) => {
let promise = mapperFn(val);
if (!R.is(Promise, promise))
promise = Promise.resolve(val || null);
return promise.then(result => ([key, result]));
},
),
R.toPairs,
);
const ... |
#!/bin/bash
# Written by Heiko Horn 2019.11.26
# This script will change the time zone and will enable and set the network time server.
# Set the timezone. See "sudo systemsetup -listtimezones" for other values.
systemsetup -settimezone "Europe/Berlin" > /dev/null
# Enable network time use.
systemsetup -setusingnetwo... |
#pragma once
#include "Object.h"
#include "ControllableCharacter.generated.h"
UINTERFACE()
class RPG_API UControllableCharacter : public UInterface
{
GENERATED_UINTERFACE_BODY()
};
class RPG_API IControllableCharacter
{
GENERATED_IINTERFACE_BODY()
virtual void MoveVertical(float Value);
virtual void MoveHorizont... |
import 'package:firebase_admob/firebase_admob.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:harpy/core/misc/harpy_theme.dart';
import 'package:harpy/harpy.dart';
/// Shows a banner ad and builds the space that is occupied by the banner ad
/// in the free versi... |
module Colors
# Human-friendly alternative to HSL color space.
# The definition of HUSL is provided in <http://www.hsluv.org>.
class HUSL < HSL
def ==(other)
case other
when HUSL
h == other.h && s == other.s && l == other.l
else
other == self
end
end
def desatu... |
/**
* Iterates over an array of values
*/
export class Iterator<T> {
private readonly source : T[];
private cursor : number = 0;
/**
* Create an iterator
*
* @param source - The source data
*/
public constructor(source : T[]) {
this.source = source;
}
/**
* Checks if the source data has remaining... |
from typing import List, Optional, Union, overload, Tuple, Type
import warnings
import torch
import xitorch as xt
import dqc.hamilton.intor as intor
from dqc.df.base_df import BaseDF
from dqc.df.dfmol import DFMol
from dqc.hamilton.base_hamilton import BaseHamilton
from dqc.hamilton.orbconverter import OrbitalOrthogona... |
#region Copyright (C) 2017 Kevin (OSS开源作坊) 公众号:osscoder
/***************************************************************************
* 文件功能描述:微信支付模快 —— 微信支付的配置信息
*
* 创建人: Kevin
* 创建人Email:1985088337@qq.com
* 创建日期:2017-9-6
*
*************************************************************************... |
import swiggimp
importer = swiggimp.Importer()
scene = importer.ReadFile("Dragon.dae", 0)
mesh = swiggimp.aiMesh.valueAt(scene.mMeshes, 0)
verVal = mesh.vertexValues()
print(verVal[0])
print(verVal[verVal.size() - 1])
|
import ThemeProps from '../ThemeProps'
import fontSizes from './fontSizes'
const scale = fontSizes.base
const spacing: ThemeProps['spacing'] = {
px: 1,
0: 0,
0.5: 0.125 * scale,
1: 0.25 * scale,
2: 0.5 * scale,
3: 0.75 * scale,
4: 1 * scale,
5: 1.25 * scale,
6: 1.5 * scale,
7: 1.75 * scale,
8: 2... |
#!/bin/sh
exercises=(
/#divide/
/#hello5/
/#hello_x_times/
/#string_plus/
/#join_reverse_array/
/#array_tack_join/
/Table1/
/Table2#height_times2/
)
if [ $# -lt 1 ]; then
echo "Usage: $0 [number]"
echo "[number] is the exercise number you want to run tests for."
exit 1
fi
ruby exercises_spec.rb --name ${e... |
// Package coquelicot provides (chunked) file upload capability (with resume).
package coquelicot
type Storage struct {
output string
host string
verbosity int
}
// FIXME: global for now
var makeThumbnail bool
func (s *Storage) StorageDir() string {
return s.output
}
func (s *Storage) Host() string {
retu... |
<?php
//from http://www.ajax-cross-origin.com/how.html#js-how-it-works
$url = isset($_GET['url']) ? $_GET['url'] : false;
if (!$url) {
exit();
}
//$referer = (isset($_SERVER['HTTP_REFERER'])) ? strtolower($_SERVER['HTTP_REFERER']) : false;
//$is_allowed = $referer && strpos($referer, strtolower($_SERVER['SERVER_NA... |
cls_lst=('ape' 'benchvise' 'cam' 'can' 'cat' 'driller' 'duck' 'eggbox' 'glue' 'holepuncher' 'iron' 'lamp' 'phone')
cls=${cls_lst[12]}
python3 rgbd_renderer.py --cls_type ${cls}
|
---
title: dynamics 365 typescript
tags:
---
# Dynamics 365 Client Side Development with Typescript
# Intro
# About Typecript
# Environment Requirements
# Files Structure
# Unit Testing
## Basic Unit Tests
## Mocking
# Deployment
https://medium.com/@and.nil/using-typescript-in-dynamics-365-499a0e56b143
https... |
%%% -*- erlang-indent-level: 2 -*-
%%%-------------------------------------------------------------------
%%% Author: Kostis Sagonas
%%%
%%% Tests for correct handling of funs.
%%%-------------------------------------------------------------------
-module(basic_fun).
-export([test/0]).
-export([dummy_foo/4, add1/1, t... |
# Contributing
Contributions of all kinds are welcome. In particular pull requests are appreciated.
The authors will endeavour to help walk you through any issues in the pull request
discussion, so please feel free to open a pull request even if you are new to such things.
## Issues
The easiest contribution to make... |
Project A – OS and Networking
Scenario
You have been hired by an IT company as an IT subject matter expert. Management has a client who
wants to upgrade their IT systems, but the client has a limited budget and no more physical space to
install new equipment. You suggest implementing virtual machines instead of more ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.