text stringlengths 27 775k |
|---|
INSERT INTO agi_plz_ortschaften_pub.plzortschaften_postleitzahl(plz, zusatzziffern, astatus, geometrie)
SELECT
plzortschaft_plz6.plz,
plzortschaft_plz6.zusatzziffern,
plzortschaft_plz6.astatus,
ST_Multi(ST_Union(plzortschaft_plz6.flaeche)) AS geometrie
FROM
agi_plz_ortschaften.plzortschaft... |
# 微博热榜
`最后更新时间:2021-10-22 23:08:37 +0800`
## 热门搜索
暂无数据
## 热门话题
暂无数据
|
require 'optparse'
require 'openssl'
require 'set'
require 'puppetserver/ca/errors'
require 'puppetserver/ca/utils/cli_parsing'
require 'puppetserver/ca/utils/file_system'
require 'puppetserver/ca/utils/config'
require 'puppetserver/ca/x509_loader'
module Puppetserver
module Ca
module Action
class Prune
... |
desc "This task generates a csv for payments purposes and sends an email"
task :generate_and_send_payments => :environment do
if [Date.today.monday?, Date.today.thursday?].any?
PaymentsCSV.create_and_send!
end
end
|
FPS bar
------------------------
Simple addon that will show your current FPS and ping.
There's some convars to customize fps bar:
- `fpsbar_show` \- turns fps bar on or off
- `fpsbar_show_ping` \- sets whether fps bar should display ping
- `fpsbar_indent_x` \- indent by x axis
- `fpsbar_indent_y` \- indent by y axis
... |
package nodes;
import java.util.ArrayList;
import java.util.List;
//print internal nodes of binarytree and count of internal nodes also
class Node {
int root;
Node left, right;
Node(int data) {
root = data;
left = right = null;
}
}
public class BinaryTreeInternalnodes {
Node root;
public static void main(... |
package com.otus.alexeenko.atm.money;
/**
* Created by Vsevolod on 16/05/2017.
*/
public class CreditVolume5 implements Money {
public static final int VOL_SIZE = 5;
}
|
use super::dag_config::{
DagConfig, DefinitionConfig, DefinitionConfigId, NodeConfig, NodeConfigId, RunnerConfig,
RunnerConfigId,
};
use super::dag_config_parser::{DagConfigParser, SupportedFormat};
use crate::errors::YoshiError;
use log::{debug, info};
use serde::Deserialize;
use serde_yaml;
use serde_yaml::Va... |
using System;
using System.Threading.Tasks;
using Microsoft.Extensions.Logging;
using RabbitMQ.Client.Events;
namespace RabbitMQ.Services
{
/// <summary>
/// Interface <c>IRabbitMQService</c> is used to publish messages to an exchange and subscribe to receive them
/// </summary>
public interface IRabb... |
package main
import (
"fmt"
)
// START OMIT
type Test struct {
field1 string
field2 int
}
func main() {
x := Test{"foo", 1}
y := Test{"foo", 1}
fmt.Println(" Comparing structs:", x == y)
a := &Test{"foo", 1}
b := &Test{"foo", 1}
fmt.Println("Comparing pointers:", a == b)
}
// END OMIT
|
# 10001st prime
#
# https://projecteuler.net/problem=7
require 'prime'
prime = Prime::TrialDivision.instance[10_001 - 1]
puts(prime) # => 104743
|
// Flutter imports:
import 'dart:io';
import 'dart:typed_data';
import 'package:flutter/widgets.dart';
import 'package:http/http.dart' as http;
import 'package:path/path.dart';
import 'package:path_provider/path_provider.dart';
class FetchPDFAction {
static Future<File> loadNetwork(String pdfUrl, BuildContext conte... |
import React from "react";
import { graphql, useStaticQuery } from "gatsby";
import { makeStyles } from "@material-ui/core/styles";
import BackgroundImage from "gatsby-background-image";
import { Button } from "@material-ui/core";
import { red } from "@material-ui/core/colors";
const useStyles = makeStyles(theme => ({... |
package com.example.schedulerdemo.service;
import com.example.schedulerdemo.config.Const;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.stereotype.Service;
import java.util.concurrent.CountDownLatch;
@Service
public... |
# Query Parameters
## \$SELECT
`.select()` can take a string property, an array of strings or you can pass in each value as a separate argument.
```typescript
try {
// Below three statements are same
let res1 = await client
.api("/me/people")
.select("displayName")
.select("department")
.get();
let res2 =... |
import os
import sys
# only apply hack if we're not running a specialized test
if 'tests' not in os.getcwd():
os.chdir('./tests/')
sys.path.append('../src/')
from unittest.mock import MagicMock
import pytest
from discord.ext.commands import Context
from main import Bot
@pytest.fixture
def ctx():
Conte... |
_OakText6::
text "Now, what did you"
line "say your name was?"
prompt
_OakText7::
text "<PLAYER>, are you"
line "ready?"
para "Your very own"
line "#MON story is"
cont "about to unfold."
para "You'll face fun"
line "times and tough"
cont "challenges."
para "A world of dreams"
line "and adventures"
pa... |
import Component from '@ember/component';
// @ts-ignore: Ignore import of compiled template
import template from '../../templates/components/nacho/array-link-cell';
import { tagName, layout } from '@ember-decorators/component';
import { assertComponentPropertyNotUndefined } from '@datahub/utils/decorators/assert';
impo... |
package com.kiven.sample.libs.chatkit
import android.os.Bundle
import android.view.Menu
import android.view.MenuItem
import android.view.View
import android.widget.LinearLayout
import androidx.appcompat.widget.Toolbar
import com.bumptech.glide.Glide
import com.kiven.kutils.activityHelper.KActivityHelper
import com.kiv... |
#[doc = "MODE2 Control A"]
pub struct CTRLA {
register: ::vcell::VolatileCell<u16>,
}
#[doc = "MODE2 Control A"]
pub mod ctrla;
#[doc = "MODE2 Control B"]
pub struct CTRLB {
register: ::vcell::VolatileCell<u16>,
}
#[doc = "MODE2 Control B"]
pub mod ctrlb;
#[doc = "MODE2 Event Control"]
pub struct EVCTRL {
r... |
# frozen_string_literal: false
require 'spec_helper'
RSpec.describe MaterialSharedPolicy do
let(:material_shared_policy) { InteractivePolicy.new(nil, nil) }
# TODO: auto-generated
describe '#new_or_create?' do
it 'new_or_create?' do
result = material_shared_policy.new_or_create?
expect(resul... |
<form action="" method="post">
{{csrf_field()}}
<div class="sign-up-htm">
<div class="group">
<label for="user" class="label">Username</label>
username= <input id="user" type="text" class="input" name="username">
</div>
<div class="group">
<label for... |
CREATE PROCEDURE [dbo].[spPMAddAdvice]
@token_id NVARCHAR(50),
@new_adv_external_identifier NVARCHAR(500),
@new_adv_priority NVARCHAR(20),
@new_adv_type NVARCHAR(20),
@new_adv_task_Fk BIGINT = NULL,
@new_adv_device_type NVARCHAR(20),
@new_adv_technical_object_Fk BIGINT = NULL,
@new_adv_comments NVARCHAR... |
require "no_cache_control/version"
module NoCacheControl
def self.included(base)
begin
base.before_action :set_no_cache_control
rescue NoMethodError
base.before_filter :set_no_cache_control
end
end
def set_no_cache_control
response.headers["Cache-Control"] = "no-cache, no-store, max-... |
package com.adityakamble49.wordlist.di.module.word
import com.adityakamble49.wordlist.ui.word.WordActivity
import com.adityakamble49.wordlist.ui.word.WordContract
import com.adityakamble49.wordlist.ui.word.WordPresenter
import dagger.Binds
import dagger.Module
/**
* [WordActivity] View Module
*
* @author Aditya Ka... |
package main
import "os"
func hostsPath() string {
return `C:\Windows\System32\drivers\etc\hosts`
}
func tmpPath() string {
return os.Getenv("temp")
}
func newline() string {
return "\r\n"
}
|
CREATE TABLE IF NOT EXISTS prints
(
id INT AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(32),
price DECIMAL(6,2)
);
INSERT INTO prints(name, price)
VALUES ("Merry Structure",29.99),
("Heavy Red", 24.99),
("Black Lines", 45.99);
SELECT * FROM prints;
|
module positions
use parameters
use cudafor
implicit none
public position
contains
attributes(global) subroutine position(x,y,z,fx,fy,fz,randv,pbc)
real, intent(in) :: fx(:), fy(:), fz(:)
real, intent(inout) :: x(:), y(:), z(:)
real, intent(inout) :: randv(:)
in... |
package com.jetbrains.sorrel.plugin.model
enum class InfoLink(val displayName: String) {
PROJECT_SITE(com.jetbrains.sorrel.plugin.SorrelBundle.message("sorrel.ui.toolwindow.link.projectSite")),
DOCUMENTATION(com.jetbrains.sorrel.plugin.SorrelBundle.message("sorrel.ui.toolwindow.link.documentation")),
READM... |
I am the base class for all WindowAnnouncements
I define the common interface for WindowAnnouncements.
You can check the type of the announcement (isMoved/isScrolled ...)
My subclasses implement the specific window announcements and may provide further states.
|
<?php
require_once "../../../maincore.php";
require_once INFUSIONS."al_tourney/infusion_db.php";
if (file_exists(INFUSIONS."al_tourney/locale/".$settings['locale'].".php")) {
include INFUSIONS."al_tourney/locale/".$settings['locale'].".php";
} else {
include INFUSIONS."al_tourney/locale/English.php";
}
require_once I... |
import 'package:cardgame/constants.dart';
import 'package:cardgame/main.dart';
import 'package:cardgame/models/card_model.dart';
import 'package:cardgame/models/deck_model.dart';
import 'package:cardgame/models/player_model.dart';
import 'package:cardgame/models/turn_model.dart';
import 'package:cardgame/services/deck_... |
using System;
using System.IO;
using System.Threading.Tasks;
using VTopeApiBot.Credentials;
using VTopeApiBot.Requests;
using VTopeApiBot.Tests.Integration.Fixtures;
using Xunit;
namespace VTopeApiBot.Tests.Integration
{
public class VTopeBotTests : IClassFixture<HttpClientFixture>
{
private readonly ... |
class TokenValidationService
attr_reader :grants
# Validates a JWT and holds its state (valid? && the grants)
#
# @param token [String] the JSON Web Token to be validated
# @param valid_against [Hash] must contain :iss, :aud, :cert to verify against
# @return [TokenValidationService]
def initialize(token... |
package com.ttulka.spring.boot.configstore.jdbc;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.autoconfigure.jdbc.JdbcTest;
import org.springframework.jdbc.core.JdbcTemplate;
import org.spr... |
import 'package:mockito/mockito.dart';
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:prep/utils/backend.dart';
import 'package:prep/utils/backend_provider.dart';
import 'package:prep/widgets/appointment_prep/category_card.dart';
class MockBackend extends Mock... |
# -*- coding: utf-8 -*-
adj = ["red", "big", "tasty"]
fruits = ["apple", "banana", "cherry"]
for x in adj:
for y in fruits:
print(x, y)
for x in [0, 1, 2]:
pass
|
"""Some essential object of interpreter"""
import collections
class Frame(object):
"""
The frame object that deals with function calls
"""
def __init__(self, f_code, f_globals, f_locals, f_back):
self.f_code = f_code
self.f_globals = f_globals
self.f_locals = f_locals
... |
# frozen_string_literal: true
RSpec.describe RuboCop::Cop::RSpec::Capybara::SpecificMatcher do
it 'does not register an offense for abstract matcher when ' \
'first argument is not a replaceable element' do
expect_no_offenses(<<-RUBY)
expect(page).to have_selector('article')
expect(page).to have_... |
import { ChangeEvent, useEffect, useState } from 'react'
import { FaTrash } from 'react-icons/fa'
import ErrorPage from '../../../ErrorPage'
import { IProduct } from '../../../../domain'
import { useStorage } from '../../../../hooks'
import { propertyOf } from '../../../../utils/utils'
import Button from '../../../../... |
/// <reference path="libraries/jquery.js" />
window.CrmWebApiFacade = function () {
var endpoint = '/api/data/v8.1/',
globalContext = null,
serverUrl = null;
function getContext() {
if (globalContext === null) {
if (typeof window.GetGlobalContext !== "undefined") {
globalContext = win... |
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT License.
// See the LICENSE file in the project root for more information.
using System;
using System.Linq.Expressions;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Reaqtive;
... |
## 入坑笔记
1. pip install 安装django报错
pyton的版本问题,切换一下全局变量的版本
2. 安装python虚拟环境
windows环境安装的不是virtualenvwrapper,你需要执行这个安装命令 pip install virtualenvwrapper-win |
// This adapter converts editor callbacks to ipc events
var editorCallback = Fire.Engine._editorCallback;
editorCallback.onEnginePlayed = function (continued) {
window.dispatchEvent( new CustomEvent ('engine-played', {
detail: { continued: continued },
bubbles: false,
cancelable: false,
... |
// Minimum Index Sum of Two Lists
/**
* @param {string[]} list1
* @param {string[]} list2
* @return {string[]}
*/
var findRestaurant = function(list1, list2) {
let sum = -1
let result = []
for (let i = 0; i < list1.length; i++) {
const index = list2.indexOf(list1[i])
if (index !== -1) {
const s... |
section .text
global _start
_start:
mov rax, 1
|
#!/usr/bin/env bash
/bin/configure.sh &
${CATALINA_HOME}/bin/catalina.sh run
|
package toopiexec
import (
"bytes"
"fmt"
"io"
"io/ioutil"
"os"
"os/exec"
"path/filepath"
)
func Run() error {
dir, err := filepath.Abs(filepath.Dir(os.Args[0]))
if err != nil {
return fmt.Errorf("Path detection error %s", err)
}
filelist, err := FS.Readdir(-1)
for index, file := range filelist {
fmt.P... |
unit pngpvt;
//
// Copyright (c) 1997,1998, 2001 Colosseum Builders, Inc.
// All rights reserved.
//
// Colosseum Builders, Inc. makes no warranty, expressed or implied
// with regards to this software. It is provided as is.
//
// See the README.TXT file that came with this software for restrictions
// on the ... |
---
slug: social-media-directory
title: "Social Media Directory"
date: January 01 2020
---
<h2>Official accounts</h2>
<h2>Announcements</h2>
<p>
<em
>For access to mailing lists or Dashboard messages, please
<a href="https://csumb.edu/it">submit an IT service request</a> using
Accounts > Other for t... |
import asyncio, functools, socket
from .formater import formatRequest
from .reqreader import Reader
runNo = []
class Go:
def __init__(
self,
verb,
route,
*,
host_port = None,
sock = None,
body = {},
header = {},
):
if (
isinstance(host_port, tuple) and
isinstance(ho... |
# 24、两两交换链表中的节点
<https://leetcode-cn.com/problems/swap-nodes-in-pairs>
### Solution
`Swift`
```swift
func swapPairs(_ head: ListNode?) -> ListNode? {
let top = ListNode(110)
top.next = head
var current: ListNode? = top
while current?.next?.next != nil {
let temp = current?.next?.next?.... |
; RUN: llc < %s -mtriple=x86_64-linux-wine32 | FileCheck %s
; RUN: llc < %s -mtriple=x86_64-linux-wine32 -fast-isel | FileCheck %s
; Test calling function pointer passed in struct
; The function argument `h' in
; struct foo {
; void (* __ptr32 f) (void);
; int i;
; };
; void
; bar (struct fo... |
import { StyleSheet } from 'aphrodite'
import { StyleTheme } from 'style-/theme'
import { css } from 'aphrodite/no-important'
interface style_vo {
/** 组件顶层 */
SetCube: object
LeftGroup: object
MidItem: object
RightOption: object
CubeGroupItem: object
CubeItemItem: object
CubeItemRemark:... |
## [5.2.0] - 14 jul 2021
*5.2.0 use case refactoring
*4.2.7 restorable remove, restoreRepository implementation
*4.2.5 pop method bug fixing
*3.1.1 bolter upd
*3.0.6 loading notifier called null fix
*3.0.0 improved useCaseContainer and layers separation
*2.0.3 replaced .first operator to [0] for more safe calling exac... |
require 'sinatra'
require 'multi_json'
require File.join(File.dirname(__FILE__), 'lib', 'service')
File.open('services.pid', 'w') {|f| f.write Process.pid }
set :port, 9292
get '/' do
MultiJson.encode Service.subclass_description
end
post '/test' do
request.body.rewind
params = MultiJson.decode(request.body.r... |
import repl from "repl"
import { PrismaClient } from "@cleomacs/db"
export const prisma = new PrismaClient()
export const deleteDbContent = async () => {
await prisma.invitation.deleteMany()
await prisma.membership.deleteMany()
await prisma.organization.deleteMany()
await prisma.userPassword.deleteMany()
aw... |
<?php
namespace NetLinker\FastBaselinker\Tests\Clients;
use Dotenv\Dotenv;
use Illuminate\Support\Facades\Config;
use NetLinker\FastBaselinker\Clients\ClientApi;
use NetLinker\FastBaselinker\Methods\MethodBaselinker;
use NetLinker\FastBaselinker\Tests\TestCase;
class ClientApiTest extends TestCase
{
public func... |
<article style="width: 100%; padding: 2em;">
<h3 style="text-align: center"><?= $asset->name; ?></h3>
<p style="text-align: center"><?= $asset->description; ?></p>
<a class="btn btn-primary"
style="display: block; margin: 0 auto; width: 16em; text-align: center"
href="<?= $asset->url; ?>... |
use crate::{
core::{
geometry::{Point2f, Point2i},
lowdiscrepancy::{sample_generator_matrix, sobol_2d, van_der_corput, MAX_MIN_DIST},
pbrt::{is_power_of_2, log_2_int_i64, round_up_pow2_i64},
sampler::{PixelSampler, Sampler, SamplerDt, SamplerDtRw},
sampling::shuffle,
},
... |
/*
* Copyright 2010-2015 JetBrains s.r.o.
*
* 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 agre... |
/**
* @file pp助手下载
* @author Zhou
*/
define(function (require) {
var $ = require('zepto');
var customElem = require('customElement').create();
var browser = {
versions: (function () {
var u = navigator.userAgent;
return {
ios: !!u.match(/\(i[^;]+;( U;)? CPU... |
'use strict'
const redis = require('redis')
const RedisClient = redis.createClient();
/**
* this Producers Message
* @requires topic , data { object }
* example https://redis.io/topics/pubsub
*/
class PublisherQuizMessage {
storedAnswered (topic ,data) {
RedisClient.publish(topic,data)
}
}
module.exports... |
-- NOTE: this script is DANGEROUS and may cause data loss so it is for advanced users only
-- NOTE: before running this script, you should stop the myems-normalization service and myems-aggregation service
-- NOTE after running this script, you should start the myems-normalization service and myems-aggregation servic... |
#!/bin/sh
export TERM=xterm-color
for dir in *-example; do
if (cd $dir; sbt $@); then
echo "Test(s) succeeded in $dir"
else
echo "Test(s) failed in $dir"
exit 1
fi
done
|
# Changelog
All notable changes to this project will be documented in this file.
### [0.4.4]
* Added several badges to the project.
### [0.4.3]
* New API feature added. Extraction of Tankopedia Badges.
* Additional argument in the main class to specify the location of where the database should be created.
* Updated d... |
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
//
package model
import (
"bytes"
"encoding/json"
"fmt"
"io/ioutil"
"net/http"
"net/url"
"github.com/pkg/errors"
)
// Client is the programmatic interface to the genesis server API.
type Client str... |
// Copyright (c) 2017 Hardik Bagdi <hbagdi1@binghamton.edu>
//
// MIT License
//
// 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 ri... |
action :init do
execute "Initialize project with modman #{new_resource.name}" do
cwd new_resource.project_path
user "root"
command "$HOME/bin/modman init"
not_if do
::File.exists?("#{new_resource.project_path}/.modman")
end
end
new_resource.updated_by_last_action(true)
end
action :updat... |
package net.dinkla.raytracer.math
import io.kotest.core.spec.style.AnnotationSpec
import io.kotest.matchers.shouldBe
import net.dinkla.raytracer.math.MathUtils.max
import net.dinkla.raytracer.math.MathUtils.maxMax
import net.dinkla.raytracer.math.MathUtils.min
internal class MathUtilsTest : AnnotationSpec() {
@T... |
package security
import be.objectify.deadbolt.scala.{DynamicResourceHandler, DeadboltHandler}
import play.api.mvc.{Request, Result, Results}
import be.objectify.deadbolt.core.models.Subject
import models.User
import scala.concurrent.ExecutionContext.Implicits.global
import scala.concurrent._
/**
*
* @author Steve C... |
/**
* Copyright 2018-2020, Optimizely
*
* 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... |
package io.github.wulkanowy.sdk.mobile.register
import com.squareup.moshi.Json
import com.squareup.moshi.JsonClass
@JsonClass(generateAdapter = true)
data class Student(
@Json(name = "IdOkresKlasyfikacyjny")
val classificationPeriodId: Int,
@Json(name = "OkresPoziom")
val periodLevel: Int,
@Jso... |
package com.klibisz.elastiknn.benchmarks
import java.io.File
import com.klibisz.elastiknn.api.ElasticsearchCodec
import com.klibisz.elastiknn.benchmarks.codecs._
import kantan.codecs.Encoder
import kantan.csv
import kantan.csv._
import kantan.csv.ops._
import kantan.csv.generic._
import kantan.csv.java8._
import zio.... |
// Hi, future me (or whoever you are)!
//
// Yes, we do need this attr.
// No, the warnings cannot be fixed otherwise.
// Accept and endure. Do not touch.
#![allow(unused)]
use clap::CommandFactory;
pub fn get_help<T: CommandFactory>() -> String {
let mut output = Vec::new();
<T as CommandFactory>::command()
... |
# mserver
bconf server, based on [mediasoup v3.1](https://github.com/versatica/mediasoup) SFU server
## how to
```
$ npm install
```
```
$ npm start
```
|
module TestingCiphers where
import Test.QuickCheck
import CipherWithInput
prop_caesarUnCaesar :: Int -> String -> Bool
prop_caesarUnCaesar n xs = encrypted == uncaesar n encrypted
where encrypted = caesar' n xs
-- fails on 1 "a", not sure why. Works on ghci when I manually test it
test_caesar :: IO ()
test_caesar ... |
import React, { useEffect, useState } from 'react';
interface OpenFileProps {
filename: string;
}
export default function OpenFile({ filename }: OpenFileProps): JSX.Element {
const [Dynamic, setDynamic] = useState<JSX.Element | undefined>(undefined);
useEffect(() => {
(async (): Promise<void> => {
try... |
import React from "react";
import { ReactController, BaseReactController, ReactRoute, RouteParam } from "../../../../index";
@ReactRoute({ path: "/catch-all/*" })
@ReactController()
export default class CatchAllPage extends BaseReactController {
@RouteParam({ name: "*" })
private message: string;
renderView() {... |
CREATE SEQUENCE TEST_SEQ -- 序列名
-- 增量:
INCREMENT BY 1 -- 每次加几个
-- 开始值:
START WITH 1 -- 从1开始计数
-- 最小值:
MINVALUE 1 -- 最小值
-- NOMINvalue -- 也可设置为没有最小值
-- 最大值:
MAXVALUE 99999 -- 最大值
-- NOMAXvalue -- 也可设置为没有最大值
-- 循环:
CYCLE -- 循环到最大值后,从最小值重新开始
-- NOCYCLE -- 也可设置一直累加,不循环
-- 缓存:
CACHE 10 -- 设置缓存... |
import React, { useState } from 'react'
import { Label, Table, Button } from 'semantic-ui-react'
import axios from 'axios'
const EquipmentUpdate = (props) => {
const initialQuantites = props.data.reduce(
(acc, { id, quantity_needed }) => ({
...acc,
[id]: parseInt(quantity_needed),
}),
{}
)
... |
export * from "./abi";
export * from "./chain";
export * from "./errors";
export * from "./ethArgs";
export * from "./general";
export * from "./logger";
export * from "./networks";
export * from "./parameters";
export * from "./promiEvent";
export * from "./types";
export * from "./transaction";
|
# Mixin for building Service objects
module Service
extend ActiveSupport::Concern
included do
# Instantiates and calls the service object
#
# @param agrs [Array<Object>] The params to be passed along to the service object instance
# @return [void] Returns are defined by the individual Service objec... |
import {Component, OnInit, ViewChild} from '@angular/core';
import {DishHttpService} from '../../../services/dish-http.service';
import {Dish} from '../../../../entities/dish';
import {ToastrService} from 'ngx-toastr';
import {MatDialog, MatPaginator, MatSort, MatTableDataSource} from '@angular/material';
import {Activ... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Generated with Bot Builder V4 SDK Template for Visual Studio v4.14.0
using System;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using System.Web;
using AdaptiveCards;
using Micr... |
module DbCharmer
module AbstractAdapterExtensions
module InstanceMethods
def self.included(base)
base.alias_method_chain :format_log_entry, :connection_name
end
def connection_name
raise "Can't find connection configuration!" unless @config
@config[:connection_name]
... |
package args
import (
"github.com/dpb587/boshua/util/checksum"
"github.com/pkg/errors"
)
type Checksum struct {
checksum.ImmutableChecksum
}
func (c *Checksum) UnmarshalFlag(data string) error {
nc, err := checksum.CreateFromString(data)
if err != nil {
return errors.Wrap(err, "parsing checksum arg")
}
c.I... |
export default function DrawableCanvas(canvas, socket) {
this.canDraw = false;
this.clearCanvas = function () {
const ctx = canvas.getContext("2d");
ctx.clearRect(0, 0, canvas.width, canvas.height);
};
let prevPosition = null;
canvas.addEventListener("mousemove", (e) => {
if (e.buttons !== 1 || ... |
package com.webers.applock.ui.callblocker.log
import androidx.lifecycle.LiveData
import androidx.lifecycle.MutableLiveData
import com.webers.applock.repository.CallBlockerRepository
import com.webers.applock.ui.RxAwareViewModel
import com.webers.applock.util.extensions.plusAssign
import io.reactivex.android.schedulers... |
# DeveloperProfile
This repository is just for studies purposes of Kotlin.
Test for jenkins 2
|
// NOTE: this file will be copied to `cypress/integration` and run from there,
// so imports paths will be based on that location!
describe('LangAdminCreateDelete-Song.js > LangAdminCreateDelete-Song', () => {
it('Test to check that a language admin can create and delete songs.', () => {
/*
... |
/*
build.js
*/
const gulp = require('gulp');
module.exports = function() {
/**
* Defines the build Gulp task.
*
* Note that the build.js file needs to be defined after all the other tasks.
* This is why the other task files are prefixed with an underscore.
*/
gulp.task('build', gulp.series(
... |
require File.dirname(__FILE__) + '/../helper'
class BaseTest < Test::Unit::TestCase
# context "base" do
# setup do
# oauth = TripIt::OAuth.new('token', 'secret')
# oauth.authorize_from_access('token', 'secret')
# @tripit = TripIt::Base.new(oauth)
# end
#
# should "req... |
import pymongo
import time
import requests
from requests_oauthlib import OAuth1
import vislab
auth = OAuth1(*vislab.config['api_keys']['500px'])
popular_url = 'https://api.500px.com/v1/photos?feature=popular'
likes_url = 'https://api.500px.com/v1/photos/{}/votes'
favs_url = 'https://api.500px.com/v1/photos/{}/favorit... |
package main
import (
"encoding/json"
"log"
"net/http"
uuid "github.com/satori/go.uuid"
)
type Book struct {
ID uuid.UUID `json:"id"`
Isbn string `json:"isbn"`
Title string `json:"title"`
Author *Author `json:"author"`
}
type Author struct {
FirstName string `json:"firstName"`
LastName str... |
# Read and write cgs files
using Dates
export export_compgraph, import_compgraph;
"""
function export_compgraph(
graph,
fname;
main_output = nothing,
order = get_topo_order(graph)[1],
fun = "",
dom = "",
err = "",
genby = "",
descr = "",
... |
<?php
namespace App\Http\Controllers\Api\Customers;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Str;
use Kreait\Firebase\Factory;
use App\Models\Posts;
class CampaignsController extends Controller
{
/**
* Display a listing of ... |
# tsallisDistr
Provides R implementation for Tsallis q-distributions including q-exponential, q-Weibull and q-Gaussian (partial).
## Installation
You can install tsallisDistr with following commands (you'll need to have `devtools` installed):
```
library(devtools)
install_github("atamazian/tsallisDistr")
```
|
class Ramco
module API
module ValidateUser
# ValidateUser
# Returns the globally unique id of a contact that matches the provided
# cobalt_username and cobalt_password parameters.
#
# Returns a 422 error when there is no user with provided username/password combination.
... |
#ifndef DATASTRUCTURE_GRAPH_H
#define DATASTRUCTURE_GRAPH_H
#include "../002-LinkList/DLinklist.h"
template <typename T>
typedef struct Entry{
int key;
T val;
Entry *next;
}Entry;
class HashT {
}
#endif //DATASTRUCTURE_GRAPH_H
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.