text stringlengths 27 775k |
|---|
package eu.kanade.tachiyomi.extension.en.newmanganelos
import eu.kanade.tachiyomi.lib.ratelimit.RateLimitInterceptor
import eu.kanade.tachiyomi.network.GET
import eu.kanade.tachiyomi.network.asObservableSuccess
import eu.kanade.tachiyomi.source.model.FilterList
import eu.kanade.tachiyomi.source.model.Page
import eu.ka... |
package expr
import (
"github.com/imulab/go-scim/pkg/core/spec"
)
var urnsCache = &urns{}
// Register the resource type to correctly use expression package's compiler capability. This method
// caches all schema urn ids available in a resource type, so they can be recognized later when an
// expression that contain... |
#!/bin/bash
DATE=`date +%Y%m%d%H%M`
BACKUPDIR=/opt/pgsql-dump
PGDATA=/opt/pgsql-data
PGSQL_HOME=/opt/pgsql
echo "select pg_start_backup('full - $DATE');" | $PGSQL_HOME/bin/psql
cd $PGDATA
tar -zcvf $BACKUPDIR/full-dump-pit-$DATE.tar.gz .
echo "select pg_stop_backup();" | $PGSQL_HOME/bin/psql
|
package de.jensklingenberg.actions
import com.intellij.openapi.actionSystem.AnAction
import com.intellij.openapi.actionSystem.AnActionEvent
import de.jensklingenberg.ui.deeplinkStarter.DeepLinkStarterContract
import de.jensklingenberg.ui.deeplinkStarter.DeepLinkStarterView
class ToolsMenuAction : AnAction() {
ov... |
// Command d4mctl offers command line manipulation of a docker-for-mac installation.
package main
import (
"encoding/json"
"fmt"
"os"
"strconv"
"github.com/spf13/cobra"
"github.com/tmc/d4mctl/d4m"
)
func loadConf() *d4m.Settings {
s, err := d4m.Load()
if err != nil {
fmt.Println("issue loading configuratio... |
# Disciplina de Sistemas Embarcados
Material das aulas e trabalhos das equipes de sistemas embarcado do curso de Engenharia da Computação da Uema.
# Aulas
...
# Trabalhos da disciplina
1 - Automacao Residencial (https://github.com/elizeumatheus/AutomacaoResidencial)
2 - Seguranca Residencial (https://github.com/rod... |
#!/bin/bash
# To be run as sudo
echo "Clearing CIB temp files"
rm -r /tmp/tomcat*
echo "Clearing thumbor temp files"
rm -r /tmp/thumbor
echo "Clearing RIC temp files"
rm -r /tmp/RICdiskcache
echo "Clearing cache"
sh -c 'sync && echo 3 >/proc/sys/vm/drop_caches'
|
/**
* Module API
*
* import { Basic, Advanced, Managers, Utils } from 'czechidm-core';
*
* @author Radek Tomiška
*/
import * as Basic from './src/components/basic';
import * as Advanced from './src/components/advanced';
import * as Services from './src/services';
import * as Managers from './src/redux';
import * ... |
/* eslint-disable camelcase */
/**
* WordPress dependencies
*/
const { __ } = wp.i18n;
const { render } = wp.element;
const { Icon } = wp.components;
/**
* Internal dependencies
*/
import './style.scss';
import { Discord } from '../providers/discord';
const App = () => {
return (
<>
<div className="codein... |
<?php
declare(strict_types=1);
/*
* @author mfris
* @copyright PIXELFEDERATION s.r.o.
* @license Internal use only
*/
namespace K911\Swoole\Server\Runtime\HMR;
use UnexpectedValueException;
/**
*
*/
final class HmrComposerLoader
{
/**
* @var LoadedFiles
*/
private $loadedFiles;
/... |
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
; RUN: llc %s --mtriple aarch64 -verify-machineinstrs -o - | FileCheck %s
define dso_local void @jsimd_idct_ifast_neon_intrinsic(i8* nocapture readonly %dct_table, i16* nocapture readonly %coef_block, i8** nocapture readonly %output_buf, i32... |
@extends ('layout')
@section('content')
<div class="content">
<div class="title-banner" style="background-image: url({{ Request::root() }}/img/photo_gallery.jpg);">
<div class="wrapper">
<h2>{{ Request::is('media_center/video_gallery') ? 'Видеогалерея' : 'Фотогалерея' }}</h2>
</div>
</div>
<div class="w... |
#include <iostream>
#include <string> // imports more string's functions
using namespace std;
// Without using template
// here, you can only use int
class Number1{
public:
int n1, n2;
int get_sum(){
return this->n1 + this->n2;
}
};
// Using template
// here, you can use any da... |
#encoding: utf-8
module SpreeImporter
module Parsers
class BaseParser
def parse value
raise 'You must define this function'
end
end
end
end
|
# Enable tab completion
source ~/bin/git-completion.bash
# colors!
green="\[\033[0;32m\]"
blue="\[\033[0;34m\]"
purple="\[\033[0;35m\]"
reset="\[\033[0m\]"
# Change command prompt
source ~/bin/git-prompt.sh
export GIT_PS1_SHOWDIRTYSTATE=1
# '\u' adds the name of the current user to the prompt
# '\$(__git_ps1)' adds g... |
# 4.1 VBA明细选择判定示例
* 效果图:

* 实现在Excel表格中点击不同明细区域时,区域首行更新为选中行的数据
```vb
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim rng
Set rng = Application.Intersect(Target(1).EntireRow,Range("_data1")) '检查是否为data1行区域
If rng Is Nothing Then
Set rng = Applica... |
import pytest
from plums.commons.path import Path
from plums.dataflow.utils.path import PathResolver
def test_resolver_init():
resolver = PathResolver('data/images/{dataset}/{aoi}/{source}/{tile}.jpg')
assert resolver._regex.pattern \
== r'data/images/(?P<dataset>[^/]+)/(?P<aoi>[^/]+)/(?P<source>[^/]... |
require 'spec_helper'
require 'fileutils'
RSpec.describe DataSourcePipeline do
describe '#process' do
let(:zip_file_name) { 'loopholes.zip' }
let(:file_name) { 'test' }
let(:source_name) { 'loopholes' }
let(:file_content) { File.read("spec/fixtures/#{zip_file_name}") }
let(:passphrase) { '' }
... |
#!/busybox/sh
java -jar /var/lib/nodedial-jars/nodedial-client.jar "$@"
|
/* ************************ Lab0.c *************************************
* File name: Lab0.c
* Author: Richard W. Wall
* Date: August 19, 2013
* This program is designed to provide a simple platform for exploring the
* software instrumentation and debugging tools available with the MPLAB X
* Integrated Devel... |
"""
```julia
using DifferentialEquations, Plots
function lorenz!(du,u,p,t)
du[1] = 10.0*(u[2]-u[1])
du[2] = u[1]*(28.0-u[3]) - u[2]
du[3] = u[1]*u[2] - (8/3)*u[3]
end
u0 = [1.0;0.0;0.0]
tspan = (0.0,100.0)
prob = ODEProblem(lorenz!,u0,tspan)
sol = solve(prob)
plot(sol)
```
"""
module DifferentialEquations
using ... |
using System;
using System.Xml;
namespace WebApplication
{
/// <summary>
/// Summary description for XmlAcmeResponseError.
/// </summary>
public class XmlAcmeResponseError : XmlAcmeResponse
{
#region Constructors
/// <summary>
/// Create an instance of XmlAcmeResponseError.
/// </summary>
/// <param... |
/*
*************************************************************************************
* Copyright 2011 Normation SAS
*************************************************************************************
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in complian... |
import 'package:cached_network_image/cached_network_image.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_jellow/model/moments_vo.dart';
import 'package:flutter_jellow/pages/moments/photo_view_page.dart';
import 'package:flutter_screenutil/flutter_screenut... |
package com.hamrah.akka.persistence.rocksdb
package journal
import akka.persistence.journal._
import com.typesafe.config.ConfigFactory
import akka.actor._
import akka.testkit._
import org.scalatest._
import org.rocksdb._
import java.io.File
import org.apache.commons.io.FileUtils
class RocksDbJournalSpec
extends J... |
require 'pathname'
module Blog
# Blog CLI
class CLI
HELP_MESSAGE = <<~TEXT.freeze
Usage:
blog build <source>
blog serve <source>
blog -h | --help
Options:
-h --help Show this message
TEXT
private_constant :HELP_MESSAGE
# @param [ARGV, Array<String>] ar... |
************************************************************************
* This file implements heapsort strategies for arrays.
************************************************************************
************************************************************************
* Heapsort for integer arrays
*
* This routin... |
lui $1,35117
ori $1,$1,33896
lui $2,64975
ori $2,$2,47349
lui $3,39921
ori $3,$3,13256
lui $4,30093
ori $4,$4,7286
lui $5,60867
ori $5,$5,53937
lui $6,63760
ori $6,$6,27844
mthi $1
mtlo $2
sec0:
nop
nop
nop
slt $5,$6,$2
sec1:
nop
nop
sltu $6,$1,$1
slt $5,$6,$2
sec2:
nop
nop
lui $6,20852
slt $0,$6,$2
sec3:
... |
---
layout: page
title: "JavaScript runkit_method_add function"
comments: true
sharing: true
footer: true
alias:
- /functions/view/runkit_method_add:813
- /functions/view/runkit_method_add
- /functions/view/813
- /functions/runkit_method_add:813
- /functions/813
---
<!-- Generated by Rakefile:build -->
A JavaScript equ... |
C***********************************************************************
C Module: avl.f
C
C Copyright (C) 2002 Mark Drela, Harold Youngren
C
C This program is free software; you can redistribute it and/or modify
C it under the terms of the GNU General Public License as published by
C the Free Softwar... |
homebrew_cask "iterm2"
cookbook_file "/Users/malston/Library/Preferences/com.googlecode.iterm2.plist" do
source "com.googlecode.iterm2.plist"
user node['current_user']
mode "0600"
end
|
;; Copyright (c) Tomek Lipski. All rights reserved. The use
;; and distribution terms for this software are covered by the Eclipse
;; Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php)
;; which can be found in the file LICENSE.txt at the root of this
;; distribution. By using this software in any fas... |
# Northstar Speedometer
R2Northstar mod that restores speedometer in multiplayer
It was available before through VPK editing but now it's simpler to install
Uses MPH as default. To use kM/h add `+speedometer_use_metric_units 1` to startup args (ns_startup_args.txt)
|
package launchers
import (
"fmt"
"io/ioutil"
"os"
"path/filepath"
"github.com/cybriq/p9/pkg/interrupt"
"github.com/cybriq/p9/pkg/qu"
"github.com/cybriq/p9/cmd/ctl"
"github.com/cybriq/p9/cmd/node"
"github.com/cybriq/p9/cmd/wallet"
"github.com/cybriq/p9/pkg/constant"
"github.com/cybriq/p9/pod/state"
"gith... |
alias youtubedl='docker run --rm -u $(id -u):$(id -g) -v $PWD:/data vimagick/youtube-dl'
|
module Exec (
Command, VarTable, CommandTable, ScriptState(..),
runHashProgram, runTopLevel, getPath, emptyScriptState
) where
import qualified Data.Map as M
import Control.Applicative ((<$>))
import Control.Monad (when, (>>=))
import System.FilePath.Posix (isRelative, (</>))
import System.IO
import qualified Prob... |
'use strict';
let env = String(process.env.NODE_ENV);
if (env !== 'production' && env !== 'testing') env = 'development';
const nodeEnv = module.exports = () => env;
nodeEnv.switch = (envArg) => {
envArg = String(envArg);
if (envArg === 'development' || envArg === 'testing' || envArg === 'production') {
env = en... |
// Copyright 2018-2022 the Deno authors. All rights reserved. MIT license.
use crate::magic::transl8::impl_magic;
use crate::magic::transl8::FromV8;
use crate::magic::transl8::ToV8;
use std::mem::transmute;
/// serde_v8::Value allows passing through `v8::Value`s untouched
/// when de/serializing & allows mixing rust ... |
import { ComposableStyles, ElementStyles } from "../styles/element-styles";
import type { ElementViewTemplate } from "../templating/template";
import { AttributeConfiguration, AttributeDefinition } from "./attributes";
/**
* Represents metadata configuration for a custom element.
* @public
*/
export interface Partia... |
/****************************************************************************
* Copyright 2021 EPAM Systems
*
* 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... |
<?php
/** @var \Illuminate\Database\Eloquent\Factory $factory */
use App\Model;
use Faker\Generator as Faker;
$factory->define(\App\Models\Category::class, function (Faker $faker) {
$faker_ar = \Faker\Factory::create('ar_JO');
return [
'name_en' => $faker->name,//Str::random(10),
'name_ar' =>... |
'use strict';
import chalk from 'chalk';
import fs from 'fs';
exports.configFileExists = () => {
if (!fs.existsSync('./mevn.json')) {
console.log(
chalk.cyanBright(`\n\n Make sure that you're within a valid MEVN project
\n${chalk.redBright('Error:')} No mevn.json file found
`),
);
proces... |
/*
* Copyright 2012-2020 smartics, Kronseder & Reiner GmbH
*
* 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 appli... |
<?php $_CONTROL->lblPromptLabel->Render() ?>
<br />
<?php $_CONTROL->lblBottom->Render() ?> |
export class CategorizedSkill {
category: string;
skills: string;
constructor(category?: string, skills?: string) {
this.category = category;
this.skills = skills;
}
}
|
package net.corda.examples.energyaccount.contracts
import net.corda.testing.node.transaction
import org.junit.Test
import java.time.LocalDate
class AccountContractModifyTests : AccountContractTestBase() {
@Test
fun `No input state provided`() {
ledgerServices.transaction() {
command(defau... |
2020年12月03日21时数据
Status: 200
1.奚梦瑶发长文谈产后抑郁
微博热度:3763516
2.澳总理微信发文被删
微博热度:2497848
3.李佳琦增补为上海青联委员
微博热度:1275507
4.离婚证必须双方同时领取
微博热度:1265950
5.孙俪一件衣服穿十年
微博热度:1223789
6.明年1月1日起办理离婚将设冷静期
微博热度:1096561
7.当我妈妈必须先当硕士
微博热度:900769
8.四川失联女子疑在菲律宾遭男友杀害
微博热度:892617
9.美发布限制中共党员及家属赴美旅行新规
微博热度:876433
10.华春莹回应澳总理微信发文被删
... |
let loadGame = function() {
/*
cardDeckContract.events.DeckReady({
}, function(error, event) {
console.log('EVENTT', event);
})
.on('data', function(event) {
return cards.init({ table: '#card-table', type: STANDARD })
.then(res => {
startGame();
});
})... |
# Import required libraries
import numpy as np
import pandas as pd
from numpy import std
from numpy import mean
from math import sqrt
import matplotlib.pyplot as plt
from sklearn import linear_model
from scipy.stats import spearmanr
from sklearn.metrics import r2_score
from sklearn.metrics import max_error
from sklear... |
/*!
* Copyright (c) Microsoft. All rights reserved.
* Licensed under the MIT license. See LICENSE file in the project.
*/
import * as React from 'react'
import styled from 'styled-components'
import theme from '../util/theme'
const PrivacyStatement: React.SFC = () => (
<PrivacyText>
This site does not collec... |
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
//
// Here we are testing that SSA and liveness agree on whether a dead
// partial store constitues a use (it does, in our model).
using System;
using System.Runtime.CompilerService... |
@extends('template.main')
@section('title','Crear Semestre')
@section('content')
{!! Form::open(['route'=>'admin.semestres.store', 'method'=>'POST']) !!}
<table>
<tbody>
<tr>
<td>{!! Form::label('semestre','Semestre') !!}
{!! Form::text('semestre', null, ['class'=>'form-control', 'placeholde... |
"""Unit tests for chartjs api."""
import json
from django.test import TestCase
try:
from django.urls import reverse
except ImportError:
# remove import shim when support for django 1.9 is dropped
from django.core.urlresolvers import reverse
from demoproject._compat import decode
from demoproject.models im... |
#ifndef ATOMICTEST_H
#define ATOMICTEST_H
#include <inttypes.h>
#include <stdexcept>
#include <vector>
#include <iostream>
class AtomicTest {
public:
AtomicTest() = delete;
AtomicTest(uint64_t idx, uint64_t testId, uint64_t variantIdx,
uint64_t subtestIdx, uint64_t statisticIdx)
: _idx... |
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Security.Principal;
using System.Threading.Tasks;
using System.Web.Http;
using System.Web.Http.Controllers;
using System.Web.Http.OData;
using Chapter3.DataObjects;
using Chapter3.Extensions;
using Chapter3.Models;
using Microsoft.Azur... |
import classNames from 'classnames'
import PropTypes, { InferProps } from 'prop-types'
import { AtRateProps } from 'types/rate'
import { Text, View } from '@tarojs/components'
import { CommonEvent } from '@tarojs/components/types/common'
import Taro from '@tarojs/taro'
import AtComponent from '../../common/component'
i... |
import React from "react"
import {
Box,
BoxProps,
GridColumns,
Column,
Flex,
HTML,
Text,
} from "@artsy/palette"
import { createFragmentContainer, graphql } from "react-relay"
import { FairHeader_fair } from "v2/__generated__/FairHeader_fair.graphql"
import { ForwardLink } from "v2/Components/Links/Forwar... |
<?php
namespace Tests\Unit;
use App\Docsets\ChartjsPluginDatalabels;
use Godbout\DashDocsetBuilder\Services\DocsetBuilder;
use Tests\TestCase;
class ChartjsPluginDatalabelsTest extends TestCase
{
public function setUp(): void
{
parent::setUp();
$this->docset = new ChartjsPluginDatalabels();
... |
import numpy as np
from glob import glob
import subprocess
import os
import shutil
import json
import audiofile
from concurrent.futures import ProcessPoolExecutor
"""
FFMPEG convert all mp4 to aac
ls *mp4 | parallel --dry-run "ffmpeg -i {} -vn -acodec copy {/.}.aac"
Do above command parrallel for all folders
for f in ... |
# frozen_string_literal: true
# Preview all emails at http://localhost:3000/rails/mailers/request_guest_review_mailer
class RequestGuestReviewMailerPreview < ActionMailer::Preview
def request_review_mail
demo_reservation = Reservation.first
RequestGuestReviewMailer
.with(reservation: demo_reservation)
... |
using Newtonsoft.Json;
namespace ArgentPonyWarcraftClient
{
/// <summary>
/// RGBA color information.
/// </summary>
public class ColorDetails
{
/// <summary>
/// Gets the red channel value for the color.
/// </summary>
[JsonProperty("r")]
public long Red { ... |
require "yaml"
module SecureConf
module Storage
module Yaml
def self.load(path)
if File.file?(path)
YAML.load_file(path)
else
{}
end
end
def self.save(path, obj)
h = {}
h.replace(obj)
File.open(path, "w") {|f|
YAML.d... |
/*
* Copyright The OpenTelemetry Authors
* SPDX-License-Identifier: Apache-2.0
*/
package io.opentelemetry.kotlin.api.trace
import io.kotest.matchers.booleans.shouldBeFalse
import io.kotest.matchers.booleans.shouldBeTrue
import io.kotest.matchers.shouldBe
import io.opentelemetry.kotlin.api.internal.OtelEncodingUti... |
package org.mbari.vars.ui.javafx.rectlabel;
import javafx.scene.layout.AnchorPane;
import javafx.scene.shape.Shape;
/**
* @author Brian Schlining
* @since 2018-05-08T16:44:00
*/
public class BoundingBoxCreatedEvent {
protected final AnchorPane anchorPane;
protected final Shape shape;
public BoundingB... |
#/bin/bash
#
##
## Usage: archlinux
##
## This script automates the building of ownCloud documentation on the ArchLinux platform.
## While new, it should handle installing all of the required platform dependencies, and afterwards
## build the documentation.
##
## Author: Matthew Setter <msetter@owncloud.com>
##
set... |
namespace Test.Unit.Core.Domain.Models
{
using System;
using CompanyName.Notebook.NoteTaking.Core.Domain.Models;
using NSubstitute;
using NUnit.Framework;
[TestFixture]
public class NoteTester
{
[Test]
public void CanCreateNote()
{
// ARRANGE
... |
import React from "react";
import { capitalize, getPriceDollars } from "./Util";
import PaymentForm from "./PaymentForm";
const SummaryTable = (props) => {
const { discountFactor, minItemsForDiscount, items, order } = props;
//Return array of selected items
var getSelectedItems = () => {
return items.filter... |
---
layout: team
title: Elsbeth Geldhof
image: /images/staff/ElsbethGeldhof.jpg
institution: External member
job-title: Independent conservator
---
Elsbeth Geldhof is an independent historic paint conservator, and researcher of longue durée painting techniques and
pigment sources from the ancient world and beyond. In t... |
package com.mxx.blogs.dto;
import com.mxx.blogs.pojo.BlogsArticle;
import lombok.Data;
import java.util.List;
@Data
public class BLogsIndexDto {
private String uName;
private String userName;
private String uImage;
private String passWord;
private boolean isLogin;
private List<BlogsArticle> a... |
@extends('shopify-app::layouts.default')
@section('content')
<!-- You are: (shop domain name) -->
<p>You are: {{ Auth::user()->name }}</p>
<div id="app"></div>
@endsection
@section('scripts')
@parent
@endsection |
// https://getemoji.com/
const faceEmojis = new Map([
['Grinning Face', '😀'],
['Face with Tears of Joy', '😂'],
['Smiling Face with Sunglasses', '😎'],
['Face Blowing a Kiss', '😘'],
['Smiling Face with Heart-Eyes', '😍'],
['Smiling Face with Hearts', '🥰'],
['Sleeping Face', '😴'],
['... |
// extern crate clap;
//
// use clap::{clap_app, crate_name, crate_version, App, AppSettings};
//
// fn build_app() -> App<'static, 'static> {
// let app = clap_app!(app =>
// (name: crate_name!())
// (version: crate_version!())
// (about: "A tool stitches scripts and commands together by YA... |
package com.zyb.service;
import com.zyb.entity.Class;
import com.zyb.entity.Teacher;
import org.apache.ibatis.annotations.Param;
import java.util.List;
public interface ClassService {
//查询所有班级信息
List<Class> getClasses();
//查询所有毕业班级信息
List<Class> getClassesGraduated();
//查询所有在读班级信息
List<Cla... |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace AOC.Year2019
{
public class Simulator
{
private readonly Dictionary<int, Instruction> _instructions;
public Simulator(Dictionary<int, Instruction> instructions)
{
_instructions ... |
# 2020 Tommaso Ciussani and Giacomo Giuliari
"""
This class defines the abstraction for a strategy, passed to a phase to define a specific computation step.
This class is open for custom extension, in order to create different execution strategies for specific steps.
The methods name() and param_description() are use... |
module Watir
class TableRow < HTMLElement
include CellContainer
include Enumerable
#
# Yields each TableCell associated with this row.
#
# @example
# row = browser.tr
# row.each do |cell|
# puts cell.text
# end
#
# @yieldparam [Watir::TableCell] element Itera... |
#!/usr/bin/env sh
# UnicodeData.txt
#
# codepoint character-name general-catagory
# canonical-combining-classes bidirectional-category
# character-decomposition-mapping decimal-digit-value
# digit-value numeric-value mirrored unicode10name
# iso10646-comment-field uppercase-mapping lowercase-mapping
# titlecase-mappin... |
---
title: Knowledge Base
---
!!!note
[Submit a ticket if your question is not listed here](https://github.com/awslabs/scale-out-computing-on-aws/issues)
###Job & Scheduler
- [JS1) I submitted a job but the job stays in the Q state](../troubleshooting/troubleshoot-job-queue)
## Virtual Desktops
- [DCV1) I cann... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
import argparse
from DBGater.db_singleton_mongo import SynDevAdmin
__author__ = 'Ziqin (Shaun) Rong'
__maintainer__ = 'Ziqin (Shaun) Rong'
__email__ = 'rongzq08@g... |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Charlotte.Commons;
namespace Charlotte
{
public class Test0001
{
public void Test01()
{
for (int c = 0; c < 1000; c++) // テスト回数
{
Test01_a();
}
}
private void Test01_a()
{
for (int c = 1; c <= 26; ... |
import 'package:example/models/event.dart';
import 'package:flutter/material.dart';
import 'package:simple_timetable/simple_timetable.dart';
import 'package:dart_date/dart_date.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return... |
import 'package:flutter_test/flutter_test.dart';
import 'package:flutter_teaslate/flutter_teaslate.dart';
String API_KEY = "type_your_api_key_here";
void main() {
print("Starting tests unit");
test('can connect to API', () {
String goodKey = API_KEY;
String badKey = "wrong";
TeaSlate teaslate =
... |
import React, { useState, useMemo, useEffect } from 'react';
import { toast } from 'react-toastify';
import { useLazyQuery, useMutation } from '@apollo/react-hooks';
import { SINGLE_POST } from '../../graphql/queries';
import { POST_UPDATE } from '../../graphql/mutations';
import omitDeep from 'omit-deep';
import { use... |
require File.dirname(__FILE__) + '/rails/test/lib/key_structure.rb'
require File.dirname(__FILE__) + '/rails/test/lib/normalize.rb'
$LOAD_PATH.unshift(File.dirname(__FILE__) + '/lib') unless $LOAD_PATH.include?(File.dirname(__FILE__) + '/lib')
class Locales < Thor
desc 'test_all', 'Check formality of all locale file... |
require 'test_helper'
class AbstractControllerTest < ActionDispatch::IntegrationTest
def setup
@base_title = 'Ruby on Rails Tutorial Sample App'
end
end
|
# frozen_string_literal: true
module Gitlab
module AlertManagement
# Represents counts of each status or category of statuses
class AlertStatusCounts
include Gitlab::Utils::StrongMemoize
STATUSES = ::AlertManagement::Alert::STATUSES
attr_reader :project
def self.declarative_policy_... |
-- | Defines the endpoints listed in the
-- <http://developer.oanda.com/rest-live-v20/account-ep/ Account> section of the
-- API.
module OANDA.Accounts
( AccountProperties (..)
, oandaAccounts
, AccountsResponse (..)
, oandaAccountDetails
, AccountDetailsResponse (..)
, oandaAccountChanges
, AccountChang... |
class Comment
module Subscribing
extend ActiveSupport::Concern
included do
after_create :subscribe_user
after_commit :notify_subscribers_later, on: :create
end
def notify_subscribers_later
CommentSubscriptionWorker.perform_async id
end
def notify_subscribers
subscrip... |
class SiteImage < ApplicationRecord
include Maawol::Models::Concerns::TmpUploadable
before_create :generate_slug
mount_uploader :image, SiteImageUploader
after_save :perform_migrate_tmp_file_job, if: -> { self.image_tmp_media_id.present? }
def fields_for_upload
[:image]
end
def perform_migrate_tmp_file_jo... |
import boto3
from m3d.util.aws_credentials import AWSCredentials
class Boto3Util(object):
@staticmethod
def create_s3_resource(
aws_credentials=None
):
"""
Initialize and return boto3 resource for S3.
:param aws_credentials: AWS credentials. Empty values will be used ... |
// Copyright 2017 Google Inc. 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 applicabl... |
import mongoose from 'mongoose';
export const TestModel = mongoose.model(
'TestModel',
new mongoose.Schema({
name: String,
}),
);
|
require 'case'
class IndexPageTest < Case
def setup
get '/'
end
def test_it_should_redirect_to_the_last_post
assert_equal 302, status
end
def test_it_shoud_redirect_to_an_existing_page
follow_redirect!
assert_equal 200, status, "Index page should respond"
assert_match %r{text/html}, con... |
import React from 'react';
import Page from '../../components/Page';
import { DataProviders } from '@burner-wallet/ui-core';
const { PluginElements } = DataProviders;
const AdvancedPage: React.FC = () => {
return (
<Page title="Advanced">
<PluginElements position='advanced' />
</Page>
);
};
export ... |
# Тестовое задание
## Окружение для разработки
### Требования
- Vagrant
- VirtualBox
### Запуск
Чтоб запустить контейнер с настроенным окружением, необходимо
запустить команду `vagrant up`.
При первом запуске, скачается образ системы и установятся необходимые пакеты.
Затем команда будет запускать настроенную систем... |
#include <stdio.h>
#define SIZE 16
void toBin(int num)
{
for (int k = SIZE; k > 0; --k) {
if ((num>>k)&1) printf("x^%d+",k);
}
printf("1\n");
}
int power(int base, int power)
{
int ret = 1;
for (int i = 0; i < power; ++i)
ret = ret * base;
return ret;
}
int mul(int m, int n)
{
int num1 = m;
int num2 =n;... |
// https://github.com/netlify-labs/oauth-example/blob/master/src/utils/sort.js
// License MIT
export function matchText(search, text) {
if (!text || !search) {
return false
}
return text.toLowerCase().indexOf(search.toLowerCase()) > -1
}
export function sortByDate(dateType, order) {
return fun... |
/*
Converts array <-> number in SICStus Prolog.
toNum(List, Base, Num) converts a list of integers to a number for a
base Base. It is bidirectional but it is really recommended that
the length of List is fixed.
See examples below.
Compare with the following models:
* Comet : http://www.hakank.org/co... |
BeforeAll {
. (Resolve-Path -Path "$PSScriptRoot\..\..\source\public\Add-DataSetTable.ps1")
}
Describe -Name "Add-DataSetTable.ps1" -Fixture {
BeforeAll {
$DataTable = New-Object System.Data.Datatable
$DataTable.TableName = 'TableName'
$DataSet = New-Object -TypeName System.Dat... |
// 哪些类型的变量值会随时间改变呢
package main
import (
"fmt"
"sync"
"time"
)
func main() {
fmt.Println("begin", intClosure, stringClosure, sliceClosure, mapClosure, syncMapClosure)
time.Sleep(10 * time.Second)
fmt.Println("end", intClosure, stringClosure, sliceClosure, mapClosure, syncMapClosure)
}
var intClosure = func() i... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.