text stringlengths 27 775k |
|---|
module Rubillow
module Models
# Common data for responses containing zpid's
module Zpidable
# @return [String] ZPID of property
attr_accessor :zpid
protected
# @private
def extract_zpid(xml)
# TODO: clean up this logic
if !xml.xpath('//response/zpid'... |
mod client;
pub mod code;
mod game;
pub mod shift_code;
pub use crate::{
client::Client,
code::Code,
game::Game,
shift_code::ShiftCode,
};
/// Library Result Type
pub type OrczResult<T> = Result<T, OrczError>;
/// Library Error Type
#[derive(Debug, thiserror::Error)]
pub enum OrczError {
/// Reqw... |
## Signs a file
param([string] $file = $(throw "Please specify a filename."))
$cert = @(Get-ChildItem cert:\CurrentUser\My -CodeSigningCert)[0]
Set-AuthenticodeSignature $file $cert
|
#![no_std]
#![no_main]
#![feature(naked_functions)]
#![feature(alloc_error_handler)]
#![feature(llvm_asm)]
#![feature(asm)]
#![feature(global_asm)]
mod hal;
#[cfg(not(test))]
use core::alloc::Layout;
#[cfg(not(test))]
use core::panic::PanicInfo;
use linked_list_allocator::LockedHeap;
use rustsbi::{print, println};
... |
set -v
sudo apt-get update
sudo apt-get install -y git linux-image-extra-`uname -r`
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9
sudo sh -c "echo deb http://get.docker.io/ubuntu docker main > /etc/apt/sources.list.d/docker.list"
sudo apt-get update
sudo apt-get... |
//$ class TopWindow {
public:
virtual void State(int reason);
private:
TopWindowFrame *frame;
void SyncRect();
void SyncFrameRect(const Rect& r);
void DestroyFrame();
friend class Ctrl;
public:
void GripResize();
//$ };
|
package provider
import (
"context"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
"github.com/hashicorp/terraform-plugin-sdk/v2/terraform"
"os"
"testing"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
)
var testAccPro... |
package me.aleiv.core.paper.tablist;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import java.util.UUID;
import java.util.concurrent.ConcurrentHashMap;
import com.google.gson.Gson;
import com.google.gson.JsonObject;
import org.bukkit.Bukkit;
import org... |
package com.emaginalabs.wecodeproperties
import org.scalacheck.Gen
import org.scalatest.prop.PropertyChecks
import org.scalatest.{FlatSpec, Matchers}
import scala.util.{Failure, Success, Try}
class PlayingWithLibrarySpec
extends FlatSpec
with PropertyChecks
with Matchers {
"Playing with the library" s... |
//
// IRILaunchRouterName.h
// IRiskSDK
//
// Created by owen on 2020/8/13.
// Copyright © 2020 owen. All rights reserved.
//
#import <Foundation/Foundation.h>
FOUNDATION_EXTERN NSString * _Nullable const IRROUTERNAME_INSPECT;
NS_ASSUME_NONNULL_BEGIN
@interface IRILaunchRouterName : NSObject
@end
NS_ASSUME_N... |
package com.tencent.bk.devops.plugin.utils
import java.util.Locale
object MachineEnvUtils {
fun getOS(): String {
val osName = System.getProperty("os.name", "generic").toLowerCase(Locale.ENGLISH)
return if (osName.indexOf(string = "mac") >= 0 || osName.indexOf("darwin") >= 0) {
OSType.... |
<?php
/**
* [PHPFOX_HEADER]
*/
defined('PHPFOX') or exit('NO DICE!');
/**
*
*
* @copyright [PHPFOX_COPYRIGHT]
* @author Raymond Benc
* @package Module_Rss
* @version $Id: ajax.class.php 704 2009-06-21 18:50:42Z Raymond_Benc $
*/
class Rss_Component_Ajax_Ajax extends Phpfox_Ajax
{
public function ... |
Один из красивейших портов на сегодняшний день. Поддерживает 3D Модели, текстуры высокого разрешения, прыжки, обзор с помощью мыши, навороченные спецэффекты, игру через интернет или по локальной сети и многое другое.
В общем, рекомендуется всем, кто хочет совместить динамичный геймплей классического Doomа и достаточ... |
/**
* @file btree.h
* Definition of a B-tree class which can be used as a generic dictionary
* (insert-only). Designed to take advantage of caching to be faster than
* standard balanced binary search trees.
*/
#pragma once
#include <vector>
#include <iostream>
#include <string>
#include <sstream>
/**
* BTree c... |
# encoding: UTF-8
# Copyright (c) 2015 VMware, Inc. All Rights Reserved.
require 'spec_helper'
require 'vagrant-guests-photon/guest'
describe VagrantPlugins::GuestPhoton::Guest do
include_context 'machine'
it 'should be detected with Photon' do
expect(communicate).to receive(:test).with("grep 'VMware Photon'... |
package world.gregs.game.playground.spatial.quadtree
import java.awt.Point
import java.awt.Rectangle
interface QuadTree {
/**
* The capacity of a leaf before division
*/
val capacity: Int
/**
* Inserts a point into the tree
*/
fun insert(point: Point): Boolean
/**
* Quer... |
import { Component, Input } from "@angular/core";
import { CompassForm } from "../compass-form";
import { CompassControl } from "../compass-control";
@Component({
selector: "compass-form",
templateUrl: "./compass-form.component.html",
styleUrls: ["./compass-form.component.scss"]
})
export class CompassFormCompon... |
import routes from '@/modules/iam/iam-routes';
import store from '@/modules/iam/iam-store';
export default {
routes,
store,
};
|
import ValueComponent from './ValueComponent';
import CheckboxInput from './CheckboxInput';
export default class BooleanComponent extends ValueComponent {
getActionHandlers() {
return {
toggleValue: this._toggleValue,
};
}
render($$) {
const model = this.props.model;
const value = model.ge... |
<?php
/**
* Created by PhpStorm.
* User: jon
* Date: 2018/10/6
* Time: 下午4:44
*/
namespace app\common\model;
class Complete extends BaseModel
{
public function Theraise()
{
return $this->hasOne('Theraise', 'id', 'theraise_id');
}
public static function PostByAdd($data)
{
$... |
import Document, {
Head,
Main,
NextScript,
DocumentContext,
DocumentInitialProps
} from "next/document";
import React from "react";
import { ServerStyleSheets } from "@material-ui/core";
import {
RenderPage,
NextComponentType,
AppContextType,
AppInitialProps,
AppPropsType
} from "next/dist/next-serv... |
<!-- section start -->
<!-- attr: { id:'', class:'slide-title', showInPresentation:true, hasScriptWrapper:true } -->
# Defensive Programming, Assertions and Exceptions
<!-- <img class="slide-image" showInPresentation="true" src="imgs\pic01.png" style="top:60%; left:62%; width:38.41%; z-index:-1; border: 1px soli... |
my $channel = Channel.new();
$channel.send($_) for 0..10;
$channel.close;
my @readers;
for 1..3 {
push @readers, start {
while 1 {
my $value = $channel.poll;
last if $value === Any;
say "$value² = " ~ $value * $value;
}
};
}
await @readers;
|
import 'database.dart';
const DEFAULT_DURATION_MINUTES=30;
class Visit {
static final empty = Visit(code: '', name: '', address: '', startDate: DateTime.now());
static final table = 'visit';
int id;
final DateTime createDate;
final String code;
final String name;
final String address;
final String? l... |
package leetcode
/**
* https://leetcode.com/problems/check-if-numbers-are-ascending-in-a-sentence/
*/
class Problem2042 {
fun areNumbersAscending(s: String): Boolean {
val words = s.split(" ")
var number = 0
for (word in words) {
val num = word.toIntOrNull()
if (nu... |
# Linux Server Configuration
- IP: 34.235.63.160
- SSH Port: 2200
- App URL 34.235.63.160/catalog
### Installed software
- psycopg2
- psycopg2-binary
- python
- apache2
- postgresql
- libapache2-mod-wsgi
### Configuration
https://github.com/ladytrell/LinuxServerConfig
1. Created user grader
a. create ssh ke... |
import mongoose, { Schema } from "mongoose";
import Bot from "../types/Bot";
const schema: Schema<Bot> = new Schema({
exchangeConnectionId: {
type: mongoose.Schema.Types.ObjectId
},
startBalance: {
type: Number,
required: true
},
currentBalance: {
type: Number,
required: true
},
start... |
---
featuredpath: "/book2/main/page01.jpg"
featured: ""
preview: "/book2/preview/page01.jpg"
title: "Book 2, Page 1"
categories: ["book2"]
type: "post"
linktitle: ""
date: "2018-03-23T22:01:03-05:00"
author: "Maria Rice"
featuredalt: ""
description2: []
---
# First colored Morphic page ever!
Welcome back from the in... |
import 'package:anvil/src/build/build_data.dart';
import 'package:anvil/src/config.dart';
import 'package:anvil/src/content/page.dart';
import 'package:anvil/src/content/section.dart';
import 'build_page.dart';
void buildSection(
Config config, BuildData buildData, Section section) {
if (section.index != null... |
#![allow(non_snake_case, non_upper_case_globals)]
#![allow(non_camel_case_types)]
//! MCU debug component
//!
//! Used by: stm32l412, stm32l4x1, stm32l4x2, stm32l4x3
use crate::{RORegister, RWRegister};
#[cfg(not(feature = "nosync"))]
use core::marker::PhantomData;
/// DBGMCU_IDCODE
pub mod IDCODE {
/// Device i... |
#!/bin/bash
outfile=RooUnfoldExample.cxx.ref
RooUnfoldExample > $outfile
bash ref/cleanup.sh $outfile
diff $outfile ref/$outfile
|
using System.Threading;
using MediatR;
using NetCoreKit.Samples.TodoAPI.Domain;
namespace NetCoreKit.Samples.TodoAPI.v1.Services
{
public class EventSubscriber : INotificationHandler<ProjectCreated>
{
public async System.Threading.Tasks.Task Handle(ProjectCreated @event, CancellationToken cancellationToken)
... |
## 内存信息收集
从Node v. 12开始,可以收集Appium的内存使用信息来分析问题。 这对于分析内存泄漏问题非常有帮助。
### 创建dump文件
为了在任意时间创建dump文件,执行`node`进程时增加如下命令行参数,这会执行appium.js脚本:
```
--heapsnapshot-signal=<signal>
```
这里的 `signal` 可以是一个有效的自定义信号,例如 `SIGUSR2`。然后你就可以
```
kill -SIGUSR2 <nodePID>
```
dump文件会被存放在Appium主脚本执行路径下。文件扩展名为 `.heapsnapshot`,... |
<?php
/**
* InterKassa driver for the Omnipay PHP payment processing library
*
* @link https://github.com/hiqdev/omnipay-interkassa
* @package omnipay-interkassa
* @license MIT
* @copyright Copyright (c) 2015-2017, HiQDev (http://hiqdev.com/)
*/
namespace Omnipay\InterKassa\Message;
/**
* InterKassa ... |
#!/usr/bin/env ruby
# frozen_string_literal: true
require File.expand_path("../config/boot.rb", __dir__)
require File.expand_path("../config/environment.rb", __dir__)
require File.expand_path("../app/extensions/extensions.rb", __dir__)
def do_report(year, do_labels = false)
warn("Doing #{year.inspect}...")
query ... |
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
* Changes may cause incorrect behavior and will be lost if the code is
* regenerate... |
class ArticleCategory {
String name;
ArticleCategory({required this.name});
}
|
import {ICache} from './ICache';
export class LRUMemCache<T> implements ICache<T> {
list: { key: string, value: T }[] = [];
hash: { [key: string]: T } = {};
constructor(private size: number) {
}
get(key: string): Promise<T> {
if (this.hash[key]) {
const index = this.list.findIndex(i => i.key ===... |
<?php
namespace Traits;
Trait Errors{
public function error($status){
if($status === 404){
$this->errorFormat($status , 'Not Found');
}elseif ($status === 403){
$this->errorFormat($status ,'Forbidden');
}elseif ($status === 401){
$this->errorFormat($stat... |
#!/bin/bash
# Based on
# https://github.com/docker-32bit/debian/blob/i386/build-image.sh
# and
# https://github.com/docker/docker/blob/master/contrib/mkimage.sh
# Other resources:
# https://l3net.wordpress.com/2013/09/21/how-to-build-a-debian-livecd/
# https://www.opengeeks.me/2015/04/build-your-hybrid-debian-distro-... |
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace viva{
public class itemSphereClothInteraction : MonoBehaviour
{
public Cloth cloth;
[Range(1,4)]
[SerializeField]
private int maxColliders = 3;
[SerializeField]
private float minimumRadius = 0.04f;
... |
#ifndef __DHT11_H__
#define __DHT11_H__
#include "stm32f10x_gpio.h"
typedef struct
{
GPIO_TypeDef*DATA_GPIO;
uint16_t DATA_Pin;
}DHT11;
typedef struct
{
uint8_t HumidityInteger;
uint8_t HumidityDecimal;
uint8_t TemperatureInteger;
uint8_t TemperatureDecimal;
uint8_t Check;
}DHT11_Data;
v... |
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter/scheduler.dart';
import 'package:flutter_news_app/EventsTabs.dart';
import 'package:flutter_news_app/NewsTabs.dart';
import 'package:flutter_news_app/PodcastPage.dart';
import 'package:flutter_news_app/page_view.dar... |
//
// RunsNetworkMonitor.h
// OU_iPad
//
// Created by runs on 2017/10/12.
// Copyright © 2017年 Olacio. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "Reachability.h"
FOUNDATION_EXTERN NSString * const RunsNetworkMonitorDidChangeMessage; //object NSNumber(NetworkStatus)
typedef void(^RunsNetw... |
import {
all,
fork,
call,
delay,
takeLatest,
put,
actionChannel,
throttle,
} from 'redux-saga/effects';
import { http } from './httpHelper';
import { actionTypes } from '../reducers/actionTypes';
import { Dictionary } from '../typings/Dictionary';
import { AxiosResponse } from 'axios';
i... |
# Omnipay: Instamojo
**[Instamojo](https://www.instamojo.com/) driver for the Omnipay PHP payment processing library**
[Omnipay](https://github.com/thephpleague/omnipay) is a framework agnostic, multi-gateway payment
processing library for PHP 5.3+.
This package implements [Instamojo Payments API v1.1](https://docs.i... |
using Microsoft.Extensions.Configuration;
namespace Kubernetes.Configuration.Extensions.Configmap
{
public class ConfigmapConfigurationSource : IConfigurationSource
{
public string? Namespace { get; set; }
public string? LabelSelector { get; set; }
public string? Separator { get; set; ... |
# frozen_string_literal: true
class User < ApplicationRecord
has_many :authentication_tokens, dependent: :destroy
rolify before_add: :before_add_role, strict: true
validates :email, presence: true
validates :email, uniqueness: true, allow_blank: true
devise :trackable, :token_authenticatable, :omniauthable,... |
import React from 'react';
import classes from './Spinner.module.css';
const Spinner = (props) => {
const style = {
backgroundColor: `var(--${props.variant})`,
};
return (
<div className={classes.Spinner}>
<div className={classes.Bounce1} style={style}></div>
<div className={classes.Bounce2} ... |
<?php
/**
* Created by PhpStorm.
* User: KustovVA
* Date: 25.06.2015
* Time: 18:40
*/
/** @var \common\models\Store $store */
?>
<div class="info-panel f-right">
<span class="info-link" title="Info"></span>
<div class="info-popup">
<div class="info-item font-edit-write">Add Note</div>
<a... |
describe Coactive::Interface do
context 'default' do
let :interface_class do
Variables::DefaultInterface
end
it 'sets default value' do
interface = interface_class.new
expect(interface.context.in).to eq('default value')
end
it 'sets default value by method' do
interface =... |
## v0.1.6
* Further Opal 1.4 compatibility
## v0.1.5
* Opal 1.4 compatibility
|
/** Michał Wójcik 2021 */
/**
* L-System zaimplementowany w języku javascript z wykorzystaniem
* HTML5 Canvas i turtle-graphics-js [https://www.npmjs.com/package/turtle-graphics-js]
*
* Program przyjmuje parametry przez pola tekstowe na stronie
* a następnie rysuje po wciśnięciu przycisku "rysuj"
*
* Składnia re... |
package output
import (
"encoding/json"
"time"
"github.com/shopspring/decimal"
)
type ReportInput struct {
Metadata map[string]string
Root Root
}
func Load(data []byte) (Root, error) {
var out Root
err := json.Unmarshal(data, &out)
return out, err
}
func Combine(currency string, inputs []ReportInput, o... |
import produce from 'immer';
import {
categoriesActionTypes,
categoryState,
SELECT_CATEGORY,
} from './types';
const INITIAL_STATE: categoryState = {
category: '',
};
export default function optionReducer (
state = INITIAL_STATE,
action: categoriesActionTypes,
): categoryState {
return produce(state, d... |
#ifndef _IOTEX_ABI_READ_CONTRACT_H_
#define _IOTEX_ABI_READ_CONTRACT_H_
#include <stdint.h>
#ifdef __cplusplus
extern "C" {
#endif
uint64_t abi_get_order_start(const char *, size_t);
uint32_t abi_get_order_duration(const char *, size_t);
const char *abi_get_order_endpoint(const char *input, size_t);
const char *abi_... |
<?php
namespace App\Http\Controllers;
use App\Models\request_status;
use Illuminate\Support\Facades\DB;
use Illuminate\Http\Request;
class request_statusController extends Controller
{
public function index(){
$requestor = request_status::all();
return response()->json([
'success' =>... |
/// Provides data structures for storing component data.
library component_data;
import 'dart:async';
import 'dart:collection';
import 'package:observable/observable.dart';
import 'package:quiver/core.dart';
part 'src/component_data/linked_hash_map_store.dart';
/// Registers [ComponentTypesStores] for component typ... |
package Monitoring::GLPlugin::TableItem;
our @ISA = qw(Monitoring::GLPlugin::Item);
use strict;
sub new {
my ($class, %params) = @_;
my $self = {};
bless $self, $class;
foreach (keys %params) {
$self->{$_} = $params{$_};
}
if ($self->can("finish")) {
$self->finish(%params);
}
return $self;
}
... |
require 'rails_helper'
require 'email_spec/rspec'
require 'timecop'
require 'shared_context/stub_email_rendering'
RSpec.describe EmailAlert, type: :model do
let(:mock_log) { instance_double("ActivityLogger") }
# set subject appropriately since it's a Singleton
let(:subject) { described_class.instance }
le... |
cordova.commandProxy.add("EchoPlugin",{
echo:function(successCallback,errorCallback,strInput) {
var res = EchoRuntimeComponent.EchoPluginRT.echo(strInput);
if(res.indexOf("Error") == 0) {
errorCallback(res);
}
else {
successCallback(res);
}
}
}... |
package org.leveloneproject.central.kms.domain.keys
import java.util.UUID
import org.leveloneproject.central.kms.domain._
import scala.concurrent.Future
trait KeyStore {
def create(key: Key): Future[Either[KmsError, Key]]
def getById(id: UUID): Future[Option[Key]]
}
|
package services
import (
"fmt"
"io"
"log"
"net/http"
"os"
utils "github.com/kuruvi-bits/transform/utils"
)
func Resize(message utils.Message) {
dirPath := fmt.Sprintf("%s/%s", utils.RESIZED_VOL, message.AlbumName)
filePath := fmt.Sprintf("%s/%s", dirPath, message.PhotoName)
utils.Cre... |
/**
* Copyright 2014 Yahoo! 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 to in writing, sof... |
<?php
require "config.php";
use Illuminate\Database\Capsule\Manager as Capsule;
Capsule::schema()->drop('price_intervals');
Capsule::schema()->create('price_intervals', function ($table) {
$table->increments('id');
$table->date('start_date');
$table->date('end_date');
$table->double('price');
$t... |
import ecdsa
import json
import redis
from typing import NamedTuple, Union
import binascii
from binascii import unhexlify
from luracoin import errors
from luracoin.exceptions import TransactionNotValid
from luracoin.wallet import pubkey_to_address
from luracoin.config import Config
from luracoin.helpers import (
m... |
reload("Persa")
using Base.Test
using DecisionTree
using DatasetsCF
# write your own tests here
#@test 1 == 2
###
reload("COFILS")
dataset = DatasetsCF.MovieLens()
holdout = Persa.HoldOut(dataset, 0.9)
(ds_train, ds_test) = Persa.get(holdout)
model = COFILS.Cofils(ds_train, 10)
Persa.train!(model, ds_train)
prin... |
pub static TEXT: &'static str = "{% macro asset_url(filename) %}
\"/assets/{{ filename }}\"
{% endmacro asset_url %}";
|
using System;
using System.Runtime.Serialization;
namespace DomainBlocks.Persistence
{
[Serializable]
public class StreamDeletedException : Exception
{
public string StreamName { get; }
public StreamDeletedException(string streamName)
{
StreamName = streamName;
... |
import {bindable} from 'aurelia-framework';
import {inject} from 'aurelia-framework';
import moment from 'moment';
import {GameService} from '../services/gameService';
@inject(GameService)
export class GameListItemCustomElement {
constructor(GameService){
this.gameService = GameService;
}
@bindable game;
ge... |
#!/usr/bin/env ruby
IO.foreach("2.2 Ruby Day 2.md") do |block|
puts block if block =~ /(.*)代码块(.*)/
end
|
package net.jp2p.jxse.services;
import net.jp2p.jxta.factory.IJxtaComponents.JxtaComponents;
import net.jxta.impl.loader.JxtaLoaderModuleManager;
import net.jxta.impl.modulemanager.JxtaModuleBuilder;
import net.jxta.module.IModuleBuilder;
import net.jxta.peergroup.core.Module;
public class Component{
priv... |
%%%-------------------------------------------------------------------
%%% @author Michal Stanisz
%%% @copyright (C) 2021 ACK CYFRONET AGH
%%% This software is released under the MIT license
%%% cited in 'LICENSE.txt'.
%%% @end
%%%-------------------------------------------------------------------
%%% @doc
%%% Module r... |
---
author: mikeparker104
ms.author: miparker
ms.date: 06/02/2020
ms.service: notification-hubs
ms.topic: include
ms.openlocfilehash: 5e75c5d5510f596eb7911cae0310e60b6bef67bf
ms.sourcegitcommit: 5cace04239f5efef4c1eed78144191a8b7d7fee8
ms.translationtype: MT
ms.contentlocale: pl-PL
ms.lasthandoff: 07/08/2020
ms.locfile... |
/**
* System Extensions
*
* Copyright (C) 2014-2017 Peter "SaberUK" Powell <petpow@saberuk.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
*
* https://www.apache.org/licenses/... |
# Gamification
> Climbing is demanding, let's make it more fun with game mechanics!
See p91:
- p21 for the self-assessment
- p91 for the technical clues
<!---------------------------------------------------------------------------->
# Table of Contents
- [Physical Skills](#physical-skills)
- [Technical Skills](#tec... |
---
layout: post
title: Distributed software testing
author: Daniel Mewes
author_github: danielmewes
---
# About me
A word about me first: My name is Daniel Mewes, and I just came over to
California to work at RethinkDB as an intern for the oncoming months. After
having been an undergraduate student of computer scie... |
# AWS User Group Kochi
Official Website of AWS User Group Kochi community
### Powered by
- GitHub
- Gatsby
- Netlify
|
import { Injectable } from '@angular/core';
import { Observable } from 'rxjs/Observable';
import { HttpClient} from '@angular/common/http'
export interface Charm {
id: number,
slug: string,
name: string,
ranks: CharmRank[]
}
export interface CharmRank {
name: string,
level: number,
rarity: number,
ski... |
<?php
declare(strict_types=1);
namespace Linio\SellerCenter\Factory\Xml\Order;
use DateTimeImmutable;
use Linio\SellerCenter\Exception\InvalidXmlStructureException;
use Linio\SellerCenter\Model\Order\Order;
use SimpleXMLElement;
class OrderFactory
{
public static function make(SimpleXMLElement $element): Order
... |
require 'rails_helper'
describe 'GET /locations/:location_id/contacts' do
context 'when location has contacts' do
before :all do
@loc = create(:location)
@first_contact = @loc.contacts.
create!(attributes_for(:contact_with_extra_whitespace))
end
before :each do
get api_location... |
<?php
declare(strict_types=1);
/*
* This file is part of the Runroom package.
*
* (c) Runroom <runroom@runroom.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Runroom\UserBundle\Repository;
use Doctrine\ORM\Entit... |
json.id entry.id
json.feed format_text(@titles[entry.feed_id] || entry.feed.title)
json.title format_text(entry.title)
json.author format_text(entry.author)
json.published entry.published.iso8601
json.content text_format(entry.content)
|
package api
import (
"path"
"time"
)
// Experiment describes an experiment and its tasks.
type Experiment struct {
// Identity
ID string `json:"id"`
Name string `json:"name,omitempty"`
// Ownership
Owner Identity `json:"owner"`
Author Identity `json:"author"`
User Identity `json:"user"` // TODO: Deprec... |
#!/bin/bash
# ftrc.sh
# Simple wrapper to use kernel ftrace facility.
trap 'echo 0 > ${PFX}/tracing_on ; popd > /dev/null' INT QUIT
name=$(basename $0)
PFX=/sys/kernel/debug/tracing
TRACE_INTERVAL=5
if [ `id -u` -ne 0 ]; then
echo "$name: need to be root."
exit 1
fi
if [ $# -ne 1 ]; then
echo "Usage: $name ftrac... |
# `Faker().breakingBad`
[Dictionary file](../src/main/resources/locales/en/breaking_bad.yml)
Available Functions:
```kotlin
Faker().breakingBad.character() // => Walter White
Faker().breakingBad.episode() // => Pilot
```
|
(function (window) {
// 'use strict';//目前驾驭不了严格模式有空尽量看一看
// Your starting point. Enjoy the ride!
//ajax原理
// var xhr = new XMLHttpRequest()
// xhr.open('get','http://localhost:8080/todos/getDataAll')
// xhr.send()
// xhr.onreadystatechange = function(){
// if(xhr.readyState === 4 && xhr.status === 200){
/... |
package com.github.antonpopoff.colorwheel.extensions
import android.os.Build
import android.os.Parcel
internal fun Parcel.writeBooleanCompat(value: Boolean) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
this.writeBoolean(value)
} else {
this.writeInt(if (value) 1 else 0)
}
}
int... |
/*!
* CanJS - 2.3.27
* http://canjs.com/
* Copyright (c) 2016 Bitovi
* Thu, 15 Sep 2016 21:14:18 GMT
* Licensed MIT
*/
/*can@2.3.27#construct/super/super*/
steal('can/util', 'can/construct', function (can, Construct) {
var isFunction = can.isFunction, fnTest = /xyz/.test(function () {
return this... |
from django.conf import settings
from django.contrib.auth.mixins import PermissionRequiredMixin
from django.shortcuts import get_object_or_404
from django.views.generic import DetailView
from django_filters.views import FilterView
from django_tables2.views import SingleTableView
from sidekick.filters import (
Log... |
# zergtel-android
Port of ZTVDC to android
Deprecated - practically no features implemented at the moment, and probably indefintely.
See [https://github.com/s-zeng/ZTVDC](https://github.com/s-zeng/ZTVDC) instead
|
import { Component, OnInit } from '@angular/core';
import { Product } from '../../../model/beans/product/product.model';
import { ProductService } from '../../../model/services/product/product.service';
@Component({
selector: 'bp-landing-page-jewelery-component',
templateUrl: './jewelery.component.html'
})
e... |
//=========================================================================
// Copyright (C) 2012 The Elastos Open Source Project
//
// 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
//
// ... |
using FluentValidation;
using FluentValidation.TestHelper;
using Survi.Prevention.ApiClient.DataTransferObjects;
using Survi.Prevention.ServiceLayer.Import.Lane;
using Xunit;
namespace Survi.Prevention.ServiceLayer.Tests.Import.LaneImportation
{
public class LaneGenericCodeImportValidatorTests: AbstractValidator<... |
# AWS Upload & Transcribe Local Files
###### Uploads local audio files to Amazon AWS bucket and starts the transcription job
### _Future Features_
```
1) Save file locally after transcription is completed
2) Format and save the file as a .docx format
3) Identify and split multiple speakers and format in the res... |
namespace WebCore.API.Models
{
public class Note
{
public string Key {get;set;}
public string Subject {get;set;}
public string Body {get;set;}
}
} |
package com.entimer.coronatracker.view.splash
import android.content.Context
import android.content.Intent
import android.net.ConnectivityManager
import android.os.Bundle
import android.widget.Toast
import androidx.appcompat.app.AppCompatActivity
import com.entimer.coronatracker.R
import com.entimer.coronatracker.view... |
package Agua::Ops::Sge;
use Moose::Role;
use Method::Signatures::Simple;
#### SUN GRID ENGINE METHODS
method stopSgeProcess ($port) {
$self->logDebug("Ops::stopSgeProcess(port)");
$self->logDebug("port", $port);
#### INPUT FORMAT: netstat -ntulp | grep sge_*
#### tcp 0 0 0.0.0.0:36472 0.0.0.... |
#!/usr/bin/env zsh
bindkey -e
# Black magic to set terminal modes properly
# See: https://github.com/robbyrussell/oh-my-zsh/blob/3705d47bb3f3229234cba992320eadc97a221caf/lib/key-bindings.zsh#L5
if (( ${+terminfo[smkx]} )) && (( ${+terminfo[rmkx]} )); then
function zle-line-init() {
echoti smkx
}
function zl... |
class SurveyTaker < ActiveRecord::Base
def self.search(search)
puts search.class
where(number: search)
end
end
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.