text stringlengths 27 775k |
|---|
require 'rubygems'
require 'active_support'
require 'active_support/test_case'
# workaround for rails being on crack (maybe?)
require 'test/unit'
require 'test/unit/testcase'
require 'active_support/testing/setup_and_teardown'
#require 'active_support/testing/assertions'
# load up the plugin in question
require 'acti... |
package scopt
trait OParserSetup {
def renderingMode: RenderingMode
def errorOnUnknownArgument: Boolean
/**
* Show usage text on parse error.
* Defaults to None, which displays the usage text if
* --help option is not defined.
*/
def showUsageOnError: Option[Boolean]
}
abstract class DefaultOPar... |
/**
* @license
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
* This code may only be used under the BSD style license found at
* http://polymer.github.io/LICENSE.txt
* The complete set of authors may be found at
* http://polymer.github.io/AUTHORS.txt
* The complete set of contributors ma... |
var utils = require('../utils');
function SetFilterModel(colDef, rowModel, valueGetter) {
if (colDef.filterParams && colDef.filterParams.values) {
this.uniqueValues = colDef.filterParams.values;
} else {
this.createUniqueValues(rowModel, colDef.field, valueGetter);
}
if (col... |
=head1 NAME
Tuba::Publication : Controller class for publications.
=cut
package Tuba::Publication;
use Mojo::Base qw/Tuba::Controller/;
use Tuba::DB::Objects qw/-nicknames/;
sub show {
my $c = shift;
my $identifier = $c->stash('publication_identifier');
my $pub = Publication->new( id => $identifier )->l... |
import 'package:pub_semver/pub_semver.dart';
import 'package:test/test.dart';
import 'package:version_manipulation/mutations.dart';
void main() {
group('Mutations', () {
test('BumpBreaking', () {
check(BumpBreaking(), {'0.2.3-alpha+42': '0.3.0'});
});
test('BumpMajor', () {
check(BumpMajor(),... |
require 'puppet/provider/nimsoft'
Puppet::Type.type(:nimsoft_queue).provide(:nimsoft, :parent => Puppet::Provider::Nimsoft) do
register_config '/opt/nimsoft/hub/hub.cfg', 'postroute'
map_property :remote_queue
map_property :address, :attribute => :addr
map_property :bulk_size
map_property :type, :symbolize... |
//base56 encoding and decoding routines:
//names are stored at $7e:2b00+, and each name is eight bytes long.
//this is not long enough for "Salamander", "Ice Dragon", "Thunderhawk", and "Fahrenheit"
//rather than attempting to migrate the names in both WRAM and SRAM, base56 is used.
//this allows for the storage of 11 ... |
// your application's code
var express = require('express'),
routes = require('./routes'),
http = require('http'),
path = require('path'),
favicon = require('serve-favicon'),
mongoose = require('mongoose'),
models = require('./models'),
dbUrl = process.env.MONGOLAB_URI || 'mongodb://localhost:27017/blog',
db = ... |
; RUN: llc < %s -mtriple=i386-apple-darwin10 -mattr=+fma,-fma4 | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-FMA-INST
; RUN: llc < %s -mtriple=i386-apple-darwin10 -mattr=-fma,-fma4 | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-FMA-CALL
; RUN: llc < %s -mtriple=x86_64-apple-darwin10 -mattr=+fma... |
package messageSender
import (
"bot-git/bot/abstract"
"bot-git/config"
"github.com/mattermost/mattermost-server/model"
"log"
)
const directType = "D"
type sender struct {
channelId string
channelType string
userId abstract.UserId
}
func (s *sender) GetUserId() abstract.UserId {
return s.userId
}
fun... |
using DG.Tweening;
using System;
using System.Collections.Generic;
using XLua;
namespace XLuaExtension
{
public static class DoTweenGen
{
[LuaCallCSharp]
public static List<Type> LuaCallCSharp = new List<Type>()
{
typeof(DOTween),
typeof(Tween),
type... |
'use strict';
const common = require('../common');
const assert = require('assert');
const spawn = require('child_process').spawn;
// Spawn a node child process in interactive mode (enabling the REPL) and
// confirm the '> ' prompt and welcome message is included in the output.
const cp = spawn(process.execPath, ['-i'... |
#include <lib/mul.hpp>
#include <numeric>
#include <vector>
namespace
{
int add_impl(int a, int b)
{
std::vector<int> ints(a, b);
return std::accumulate(ints.cbegin(), ints.cend(), 0);
}
} // namespace
namespace xzr
{
namespace lib
{
inline namespace v1
{
int mul(int a, int b)
{
return add_impl(a, b);
}
}... |
namespace DotNet.Sdk.Extensions.Testing.HttpMocking.HttpMessageHandlers.ResponseMocking
{
/// <summary>
/// Represents the possible outcomes from executing an <see cref="HttpResponseMessageMock"/>.
/// </summary>
public enum HttpResponseMessageMockResults
{
/// <summary>
/// The <see... |
import { local } from './adapters/local'
import { Model, model } from './model'
import id from './fields/id'
import field from './fields/field'
import { runInAction } from 'mobx'
describe('Model Class', () => {
@local()
@model class A extends Model {
@id id : number
@field a : numbe... |
2020年12月20日15时数据
Status: 200
1.盛一伦道歉
微博热度:2974042
2.新冠病毒在英变异后传播力高出70%
微博热度:2343006
3.年终快乐大赏
微博热度:2304921
4.张檬再次向刘雨欣道歉
微博热度:2216053
5.为什么要给丁真开美颜
微博热度:1978485
6.李宇春理想生活敢于拒绝
微博热度:1054243
7.星光大赏彩排
微博热度:951549
8.大量英国人赶在封城前离开伦敦
微博热度:824607
9.星光大赏阵容
微博热度:749609
10.澳门回归21周年
微博热度:748019
11.热橙子水
微博热度:743260... |
program SmallDb;
uses SysUtils;
// =====================
// = Type declarations =
// =====================
type
DataKind = {same as original version}
ColumnValue = {same as original version}
Row = {same as original version}
// The data store is a dynamic linked list of rows, keeping track
//... |
import { ResourceName } from "farmbot";
import { isArray } from "lodash";
import { ResourceIndex } from "./interfaces";
import { joinKindAndId } from "./reducer_support";
let count = 0;
export function generateUuid(id: number | undefined, kind: ResourceName) {
return `${joinKindAndId(kind, id)}.${count++}`;
}
expor... |
package com.badoo.reaktive.observable
import com.badoo.reaktive.base.subscribeSafe
import com.badoo.reaktive.disposable.Disposable
import com.badoo.reaktive.disposable.DisposableWrapper
import com.badoo.reaktive.utils.atomic.AtomicInt
fun <T> Iterable<Observable<T>>.concat(): Observable<T> =
observableUnsafe { ob... |
import {ImageDocument, Document} from 'idai-components-2';
import {getSampleDocuments} from './sample-data';
import {ImageConverter} from '../../../images/imagestore/image-converter';
import {InitializationProgress} from '../../../initialization-progress';
const fs = typeof window !== 'undefined' ? window.require('fs'... |
export MIDI_DEV=`amidi -l | grep ZOOM | awk '{print $2}'`
amidi -p ${MIDI_DEV} -S "f0 7e 00 06 01 f7" -r temp.bin -t 1 ; hexdump -C temp.bin
# DEV 1 . 2 1
# f0 7e 00 06 02 52 65 00 00 00 31 2e 32 31 f7 |.~...Re...1.21.|
|
module Campa
module Lisp
class ListFn
def call(*items)
List.new(*items)
end
end
end
end
|
import { HTMLAttributes, AriaAttributes } from 'react';
export type CommonAttributes = AriaAttributes & Pick<HTMLAttributes<HTMLElement>,
| 'accessKey'
| 'dir'
| 'hidden'
| 'id'
| 'lang'
| 'spellCheck'
| 'style'
| 'tabIndex'
| 'title'
| 'translate'
>;
|
package darius0021.versions.v1_8_2;
import net.minecraft.server.v1_8_R2.EntityInsentient;
import net.minecraft.server.v1_8_R2.Navigation;
import net.minecraft.server.v1_8_R2.World;
public class FlyingNav extends Navigation {
public FlyingNav(EntityInsentient name, World name2) {
super(name, name2);
... |
#!/usr/bin/env python3
# Day 21: Dungeon Game
#
# The demons had captured the princess (P) and imprisoned her in the
# bottom-right corner of a dungeon. The dungeon consists of M x N rooms laid
# out in a 2D grid. Our valiant knight (K) was initially positioned in the
# top-left room and must fight his way through the... |
package io.inapinch.pipeline.operations
import org.junit.Test
import kotlin.test.assertEquals
class CommandUsageTest {
@Test
fun testCommandUsageForStart()
{
val expected = CommandUsage("Start",
arguments = listOf(CommandArgument("value", DataType.of(DataType.ANY))),
... |
; Filename: msf-adduser.nasm
; Author: Metasploit
; Analysed by Re4son <re4son [at] whitedome.com.au>
; Purpose: Disassembly of msf linux/adduser
; for research purpose
global _start
section .text
_start:
; setreuid() sets real and effective user IDs of the calling process
; int setreuid(uid... |
import { Component, OnInit, OnDestroy } from '@angular/core';
import { Subscription } from 'rxjs';
import { ComponentBase, ErrorResponse } from '@angularlicious/foundation';
import { AngularliciousLoggingService } from '@angularlicious/logging';
import { Router } from '@angular/router';
import { GithubSearchService } f... |
i-CA
===================
Aplikasi Pengelolaan CS-SPD
-------------------
Dikembangkan untuk BPBACHE
Silahkan hubungi heru@belajararief.com untuk dapat menggunakan aplikasi ini. |
import './capsule-tabs.less'
import { CapsuleTab, CapsuleTabs } from './capsule-tabs'
import { attachPropertiesToComponent } from '../../utils/attach-properties-to-component'
export type { CapsuleTabsProps, CapsuleTabProps } from './capsule-tabs'
export default attachPropertiesToComponent(CapsuleTabs, {
Tab: Capsul... |
package main
import (
"fmt"
"os"
)
func main() {
rules := ReadSource(os.Stdin)
output := rules.BagsCanContain("shiny gold")
fmt.Printf("%q\n%d\n", output, len(output))
fmt.Printf("%d\n", rules.CountBagsWithin("shiny gold"))
}
|
drop table if exists t1;
create table t1 (
id integer GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY,
name varchar(255) NOT NULL UNIQUE
);
insert into t1 (name)
select md5(i::text)
from generate_series(1, 200000) AS i;
table t1;
select count(*)
from t1 as t
where name like 'a%';
/*
БЫЛО
Количество удаля... |
import 'package:example/pages/basic_example/stores/store_a.dart';
import 'package:flutter/material.dart';
import 'package:flutter_mobx/flutter_mobx.dart';
import 'package:mobx/mobx.dart';
import 'package:mobx_store_disposer/mobx_store_disposer.dart';
class ChildWidgetWithReaction extends StatefulWidget {
@override
... |
<?php
namespace App\Http\Controllers;
use App\AboutUs;
use Illuminate\Http\Request;
use App\Http\Requests;
use App\Http\Controllers\Controller;
use DB;
class AboutusController extends Controller
{
public function index() {
$aboutusregions = DB::table('aboutusregions')->distinct()->get();
foreach($aboutusregi... |
module Reading
class RemoveInheritanceGenerator < Jekyll::Generator
def generate(site)
@site = site
site.pages.each do |p|
if p.data["description"] == "Client-side API Reference"
p.content.sub!(/(^#[^:]*).*/, '\1')
end
end
end
end
end |
/// The default duration for a short animation.
const Duration kShortAnimationDuration = Duration(milliseconds: 300);
/// The default duration for a long animation.
const Duration kLongAnimationDuration = Duration(milliseconds: 600);
|
- Selling stuff
- Setup Unbound + PiHole (Local domains)
- Setup Node Exporter/Wireguard Exporter
- Setup trusted subnet
- Get files from home
- Put 0x0st
|
# WindowsScreenCaptureForm
C#のWPFとWinFormsで画面キャプチャを行うためのサンプルアプリ
|
module.exports = {
randomID: (length) => {
var statement = '';
var characters = 'abcdfghijklmnopqrstuvwxyz0123456789';
for(i = 0; i < length; i++){
statement += characters.charAt(Math.floor(Math.random() * characters.length));
}
return statement;
}
} |
#!/usr/bin/perl
use strict;
foreach ( <STDIN> ) {
chomp;
printf "%20s\n", $_;
}
print "1234567890123456789012345678901234567890\n";
|
module Components (Component(..), Speed, isPositioned, isWalking) where
import Geometry (Position)
import AgentTypes (AgentType)
type Speed = Float
data Component -- TODO how to express components' dependencies
= Positioned Position
| Walking Speed
| Hunting AgentType -- TODO allow multiple AgentTypes
ins... |
<?php
namespace BWF\DocumentTemplates\Layouts;
use BWF\DocumentTemplates\EditableTemplates\EditableTemplateInterface;
use BWF\DocumentTemplates\TemplateDataSources\TemplateDataSourceInterface;
use Illuminate\Support\Collection;
interface LayoutInterface
{
/**
* @return Collection|EditableTemplateInterface[]... |
/* eslint-disable global-require */
import path, { sep } from 'path';
import normalizeSnapshot from '../utils/normalizeSnapshot';
describe('#Elder', () => {
jest.mock(`..${sep}routes${sep}routes`, () => () => ({
'route-a': {
hooks: [
{
hook: 'routeHook',
name: 'route hook',
... |
<?php if (! defined('APP_PATH')) die ('Bad requested!');
/**
* Change the Login Logo
*/
function load_admin_style() {
wp_enqueue_style( 'admin_css', ASSETS_PATH.'css/admin-style.css', false, '1.0.0' );
}
function default_login_logo() { ?>
<style type="text/css">
#login h1 a, .login h1 a {
... |
#!/usr/bin/perl -w
use strict;
use Getopt::Long;
use File::Spec;
my %uncompress = (
'bz2' => 'bzcat',
'gz' => 'zcat'
);
# assume short read fastq with 4 lines per record!
my $size = 1_000_000;
my $outdir;
if ( !defined @ARGV ) {
print "Please Provide
-s int The number of sequences per file [1_000_000]
-o di... |
# frozen_string_literal: true
# Displays internal dashboards and user specific pages.
class InternalController < ApplicationController
before_action :authenticate_user!
layout "layouts/full_page_sidebar"
# GET /dashboard
def dashboard
@replies = Reply.current
.left_outer_joins(:broadcast, :topic)
... |
package VegGuide::SurveyResponse2008001;
use strict;
use warnings;
use VegGuide::Schema;
use VegGuide::AlzaboWrapper (
table => VegGuide::Schema->Schema()->SurveyResponse2008001_t() );
sub VisitFrequencies {
my $class = shift;
my $schema = VegGuide::Schema->Connect();
my %freq;
for my $row (
... |
#!/usr/bin/env bash
yarn build
yarn docs:build
yarn build:demo
currentBranch=`git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/'`
git checkout gh-pages
yes | cp -rf dist/docs/* docs
git add -A
git commit -m "docs update"
git checkout $currentBranch
|
## About
- CSV downloads goes here.
- Programmatically delete when successfull uploaded to kintone.
## File format
[appId]-[timestamp]-[uuid].csv |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace LionFire.Instantiating
{
public interface IInstantiationFactory
{
object Create(InstantiationContext context = null);
}
//public interface IFactory<T>
//{
// T Create(Instantia... |
require 'rspec'
require 'pig_latin'
describe('pig_latin') do
it('will add "way" to any vowel') do
expect(pig_latin("a")).to(eq("away"))
end
it('will add "way" to the end of any word beginning with a vowel') do
expect(pig_latin("email")).to(eq("emailway"))
end
it('will move a single consonant from the... |
import dbg from 'debug';
import fetch, { RequestInit, Response } from 'node-fetch';
import { negotiateParse } from '../msgParser';
import {
sspi,
InitializeSecurityContextInput,
AcquireCredHandleInput,
} from '../../../lib/api';
import { getSPNFromURI } from './misc';
import { ClientCookie } from './ClientCookie... |
package cn.ystk.pro.log.service.impl;
import org.springframework.beans.factory.annotation.Autowired;
import cn.ystk.pro.log.entity.Log;
import cn.ystk.pro.log.mapper.LogMapper;
import cn.ystk.pro.log.service.LogService;
/**
*
* 功能:日志添加接口实现类
* 版本: 1.0
* 开发人员: 徐长江
* 创建日期: 2017年5月15日
* 修改日期: 2017年5月15日
* 修改列表:
... |
/*
* 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 may ... |
import { AppError } from '@/index'
describe('smoke tests', () => {
test('can create error', () => {
new AppError({})
})
})
|
package no.nav.pleiepengerbarn.uttak.regler
import java.time.Duration
fun Duration.prosent(prosentsats: Long): Duration {
return this.multipliedBy(prosentsats).dividedBy(100)
}
|
import React, { useState, useEffect } from 'react';
import { View, StyleSheet } from 'react-native';
import { Text, useTheme } from 'react-native-paper';
import FastImage from 'react-native-fast-image';
import dayjs from 'dayjs';
import LoadingScreen from '../Loading';
import ScrollViewWithBackButton from '~/Components... |
import React from 'react';
import SideSheetContext, {SideSheetContextValue} from "./Context";
export type SideSheetProviderProps = {
children: React.ReactNode;
isOpen: boolean;
onClose?: () => void;
};
export default function SideSheetProvider({
children,
isOpen,
onClose,
}: SideSheetProviderProps) {
co... |
using System;
using HtcSharp.HttpModule.Http;
namespace HtcSharp.HttpModule.Mvc {
public class RequireContentTypeAttribute : Attribute {
public readonly string ContentType;
public RequireContentTypeAttribute(ContentType contentType) {
ContentType = contentType.ToValue();
}
... |
using Org.BouncyCastle.Crypto;
using Org.BouncyCastle.Pkcs;
using Org.BouncyCastle.X509;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace FirmaPdfCertificado
{
class Certificado
{
public AsymmetricKeyParamete... |
class FileContentDatastream < ActiveFedora::Datastream
include Hydra::Derivatives::ExtractMetadata
include Sufia::FileContent::Versions
def filename
URI.unescape(dsLocation).sub('file://', '') if dsLocation
end
# Override so that we can use external files.
def has_content?
dsLocation.present? && ... |
import 'entities/entity_mapping.dart';
import 'grammar.dart';
import 'nodes/attribute.dart';
import 'nodes/cdata.dart';
import 'nodes/comment.dart';
import 'nodes/declaration.dart';
import 'nodes/doctype.dart';
import 'nodes/document.dart';
import 'nodes/document_fragment.dart';
import 'nodes/element.dart';
import 'nod... |
$:.unshift File.expand_path(File.join(File.dirname(__FILE__), '..', 'lib'))
require 'rack/client'
require 'pp'
client = Rack::Client.new('http://whoismyrepresentative.com')
pp client.get('/whoismyrep.php?zip=94107').body
pp client.get('/whoismyrep.php', :zip => 94107).body
|
SchoolWork
==========
School Work... Will be removed
|
; RUN: opt < %s -functionattrs -S | FileCheck %s
; CHECK: declare noalias i8* @fopen(i8* nocapture readonly, i8* nocapture readonly) #0
declare i8* @fopen(i8*, i8*)
; CHECK: declare i8 @strlen(i8* nocapture) #1
declare i8 @strlen(i8*)
; CHECK: declare noalias i32* @realloc(i32* nocapture, i32) #0
declare i32* @reall... |
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the Apache 2.0 License.
// See the LICENSE file in the project root for more information.
using Microsoft.Extensions.Configuration;
using Steeltoe.Common.Discovery;
using System;
using System.Collec... |
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
library utf.unicode_core_test;
import 'package:expect/expect.dart';
import 'package:utf/utf.dart';
im... |
import { Component, OnInit, ViewChild } from '@angular/core';
import { TeachingPractice } from '../../../models/teachingPractice/teachingPractice';
import {HttpEventType} from '@angular/common/http';
import { TeachingPracticeService } from '../teachingPractice.service';
@Component({
selector: 'app-add-teaching-pract... |
CREATE TRIGGER RecordValue
AFTER INSERT ON Comsumptions
FOR EACH ROW
EXECUTE FUNCTION check_record_comsumptions();
CREATE OR REPLACE FUNCTION check_record_comsumptions()
RETURNS TRIGGER
LANGUAGE plpgsql
AS $$
BEGIN
UPDATE RECORDS
SET total_comsumptions = total_comsumptions + 1
WHERE restaurant_cod = (
SELECT... |
# theindoorearthworm
Indoor Growing Equipment
## Hydroponics Supplies - Nutrients - Soil - Growing Media & Lighting |
// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
/// Utilities for use in generated client code.
library client_utils;
import 'dart:async';
import 'dar... |
/*
* Copyright (c) 2021 NVIDIA Corporation.
*
* 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 ... |
# frozen_string_literal: true
##
# Determines the slots count for multple hearings on a day for all hearing days.
#
# This class exists to optimize the process for determining the filled slots
# count for multiple hearings days.
##
class HearingDayFilledSlotsQuery
def initialize(hearing_days)
@hearing_days = he... |
/*
* Copyright 2021 The Android 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
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applica... |
use crate::game::{physics::*, Point2d, *};
use gfx::input::*;
use ncollide2d::pipeline::CollisionGroups;
use specs::prelude::*;
pub struct OnClickedEvent {
pub ent: Entity,
}
#[derive(Debug, PartialEq, Eq)]
enum ClickableState {
Normal,
Hovered,
Clicked,
}
pub struct ClickableComponent {
state: C... |
<?php
require_once(CRYSTAL_ROOT_DIR . 'Crystal.php');
class TestOfOrderbyMysql extends UnitTestCase
{
function __construct()
{
echo '<h2>Testing Crystal order_by() function</h2>';
$this->db = Crystal::db();
}
function TestStringParam()
{
$this->db->clear_sql();
$method = $this->db->orde... |
'use strict';
function Cache(namespace) {
if(!namespace) {
throw new TypeError('Cache needs a namespace, none given')
}
if(!(this instanceof Cache)) {
return new Cache(namespace)
}
this.namespace = namespace
}
/**
* Check that arguments are strings
* @return mixed TypeError or true
*/
Cache... |
'abababab' -replace 'a'
# Expects output:
#
# bbbb
|
(ns ui.notebook.view.segment
(:require
[taoensso.timbre :as timbre :refer [debug info warn error]]
[re-frame.core :as rf :refer [subscribe dispatch]]
[ui.notebook.view.segment.markdown :refer [md-segment]]
[ui.notebook.view.segment.eval-result :refer [er-segment]]
[ui.notebook.view.segment.code :refer... |
#include <stdio.h>
#include <stdlib.h>
int EDivisivel(int a ,int b){
int resto=a%b;
if(resto==0)
return 1;
else
return 0;
}
void main(){
int num1,num2;;
printf("Entre com os numeros a serem testados: ");
scanf("%d%d",&num1,&num2);
if(EDivisivel(num1,num2))
printf("O numero e divisivel ! ");
els... |
require 'rails_helper'
describe Graph::Citation, 'cite_by_note!', :db_connection do
let!(:work_order_a) { create(:graph_work_order, reference: 'a') }
let!(:work_order_b) { create(:graph_work_order, reference: 'b') }
let!(:work_order_c) { create(:graph_work_order, reference: 'c') }
it 'creates a citation betwe... |
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
namespace Magento\Eav\Model\Entity\Attribute\Backend;
use Magento\Framework\Serialize\Serializer\Json;
/**
* Backend model for attribute that stores structures in json format
*
* @api
* @since 100.2.0
*/
class... |
import Mixin from '@ember/object/mixin';
import { inject as service } from '@ember/service';
import { computed } from '@ember/object';
import pojoFormFromQueryParams from 'ember-pojo-validating-fields/utils/pojo-form-from-query-params';
export default Mixin.create({
queryParamsService: service(),
init() {
thi... |
logback rolling file simulating:
```bash
mvn package
java -jar target/logback-1.0-SNAPSHOT.jar <src_path> <target_parth>
```
|
# -*- coding:utf-8 -*-
__version__ = '0.1.0'
__author__ = 'TabQ'
from GuGu.billboard import (BillBoard)
from GuGu.classify import (Classify)
from GuGu.lowriskintarb import (LowRiskIntArb)
from GuGu.macro import (Macro)
from GuGu.marketdata import (MarketData)
from GuGu.reference import (Reference)
from GuGu.sto... |
task :kill_postgres_connections => :environment do
db_name = "#{File.basename(Rails.root)}_#{Rails.env}"
sh = <<EOF
ps xa \
| grep postgres: \
| grep #{db_name} \
| grep -v grep \
| awk '{print $1}' \
| sudo xargs kill
EOF
puts `#{sh}`
end
task "db:drop" => :kill_postgres_connections
|
import SampleAssay from "./SampleAssay";
export default class SampleAssayCollection {
constructor(
public readonly id: string,
public readonly environment: string,
public readonly projectWebsite: string,
public readonly reference: string,
public readonly url: string,
... |
package org.reldb.rel.tests.main;
import org.junit.After;
import org.junit.Test;
import org.reldb.rel.tests.BaseOfTest;
public class TestPossrep09 extends BaseOfTest {
@Test
public void testPossrep09() {
String src =
"BEGIN;" +
"TYPE testType POSSREP {blah INTEGER};" +
"VAR x testTyp... |
require 'yaml'
require 'json'
require 'openssl'
require 'base64'
require 'net/http'
require 'faye/websocket'
require 'redis'
require 'sequel'
require 'logmaster'
require 'straight'
require 'socket.io-client-simple'
Sequel.extension :migration
module StraightServer
VERSION = File.read(File.expand_path('../', File.d... |
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
namespace Microsoft.MixedReality.Toolkit.Audio
{
/// <summary>
/// The values that may be returned by <see cref="WindowsMicrophoneStream"/> methpds.
/// </summary>
public enum WindowsMicrophoneStreamErrorCode
{
/// ... |
import 'package:at_contacts_group_flutter/at_contacts_group_flutter.dart';
import 'package:at_contacts_group_flutter/screens/group_contact_view/group_contact_view.dart';
import 'package:atsign_atmosphere_pro/services/navigation_service.dart';
import 'package:at_common_flutter/services/size_config.dart';
import 'package... |
# Jekyll 3.3 [Qk/Quik Start][qk] :zap: Starter template / scaffold
:crystal_ball: Live [preview][demo]
## Features
* 2 columns
* sass boilerplate 1-7
* normalize v.5.0.0
* flexbox layout (mobile first)
* toggle aside without JS
## Usage
Install QK/Quik gem:
```
~ $ gem install quik
```
Use like:
```
~ $ quik ... |
# Definition for a binary tree node.
class TreeNode:
def __init__(self, x):
self.val = x
self.left = None
self.right = None
def treeRootinLevel(nodes:list, k:int):
n = len(nodes)
if k >= n:
return None
if nodes[k] is None:
return None
root = TreeNode(nodes[k]... |
# Set this to change the default map configuration
# Valid options are: Alaska - EPSG:3338 (default), Alaska - EPSG:3572, USA - EPSG:3857
Makemap::Application.config.map_site = 'Alaska - EPSG:3338'
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
* vim: set ts=8 sts=4 et sw=4 tw=99:
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.... |
# frozen_string_literal: true
class ApplicationController < ActionController::Base
include Pundit
protect_from_forgery
rescue_from Pundit::NotAuthorizedError do
redirect_to new_user_session_url, alert: 'You must create an account to do this.'
end
end
|
package debug
import (
"log"
_ "net/http/pprof"
)
func Start() {
log.Println("开启debug")
} |
<?php defined('SYSPATH') or die('No direct script access.');
class Controller_Login extends Controller {
public function action_index()
{
$this->response->body(View::factory('login')->set('error', null));
}
public function action_initsession()
{
if($this->request->method() == 'POST')
{
$oUser = Acce... |
#!/bin/bash
sudo apt-get update && sudo apt-get upgrade
sudo apt-get install gedit gnome-terminal git
ssh-keygen -t ed25519
cat ~/.ssh/id_ed25519.pub
echo "$(ipconfig.exe |grep 192 |head -n1|cut -d: -f2 |cut -c 2-|tr -d '\r')"":0"
echo $DISPLAY
cat mountUSB.sh
sudo apt-get install python... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.