content stringlengths 10 4.9M |
|---|
<gh_stars>0
package main;
import com.jayway.jsonpath.JsonPath;
import paas.Download;
import paas.Record;
import paas.Room;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.HashMap;
public class DownloadTest {
// 下载对象
private static Download downloadObj;
... |
<reponame>forkiv/burrow<gh_stars>100-1000
package state
import (
"fmt"
"github.com/hyperledger/burrow/crypto"
"github.com/hyperledger/burrow/encoding"
"github.com/hyperledger/burrow/execution/registry"
"github.com/hyperledger/burrow/storage"
)
var _ registry.IterableReader = &State{}
func getNode(forest storag... |
<reponame>Fefo6644/DocDex
package me.piggypiglet.docdex.file.utils;
import com.google.common.io.Resources;
import org.jetbrains.annotations.NotNull;
import java.io.File;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.nio.file.S... |
/**
* Creates a dummy node for the given non-north-south self-loop edge. The dummy node's
* {@code ORIGIN} property is set to the edge. The dummy node has two ports, one for each port
* the node was connected to. Their {@code ORIGIN} property is set accordingly.
*
* @param layeredGraph
* ... |
/*
* The MIT License
* Copyright (c) 2019 CERN/Switzerland
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy... |
/*
* Copyright (c) 2021 Huawei Technologies Co.,Ltd.
*
* openGauss is licensed under Mulan PSL v2.
* You can use this software according to the terms and conditions of the Mulan PSL v2.
* You may obtain a copy of Mulan PSL v2 at:
*
* http://license.coscl.org.cn/MulanPSL2
*
* THIS SOFTWARE IS PROVIDED ... |
<reponame>lkilcher/dolfyn-light<filename>dolfyn/adv/clean.py
import numpy as np
import warnings
from ..tools.misc import fillgaps, group, slice1d_along_axis
# import tools.timer as tmr
warnings.filterwarnings('ignore', category=np.RankWarning)
sin = np.sin
cos = np.cos
def cleanFill(indat, bad):
"""
Interpo... |
Monoidal characterisation of groupoids and connectors
We study internal structures in regular categories using monoidal methods. Groupoids in a regular Goursat category can equivalently be described as special dagger Frobenius monoids in its monoidal category of relations. Similarly, connectors can equivalently be des... |
<gh_stars>1-10
package services
/*
#cgo CFLAGS: -I ./ -I./lib -I../lib
#cgo CXXFLAGS: -I./
#cgo LDFLAGS: -L../lib -lWeWorkFinanceSdk_C -ldl
#include "../lib/WeWorkFinanceSdk_C.h"
#include <stdlib.h>
*/
import "C"
import (
"crypto/md5"
"crypto/rand"
"crypto/rsa"
"crypto/x509"
"encoding/base64"
"encoding/hex"
... |
def createPSCodeReportsCombined(populations, path, t):
print("16 starting\n")
p = populations.getAllCAIRS()
cN = os.path.join(path, "C19 Primary({}).csv".format(t))
header = ['CWID', 'Administered Date', 'PS Code', 'isEmployee', 'isStudent']
with open(cN, "w", newline='') as f:
writer = csv.writer(f)
writer.wr... |
<gh_stars>0
use std::str::FromStr;
use expectest::expect;
use expectest::prelude::*;
use serde_json::Value;
use pact_models::bodies::OptionalBody;
use pact_models::content_types::{JSON, TEXT};
use pact_models::generators;
use pact_models::generators::{ContentTypeHandler, Generator, JsonHandler};
use pact_models::path... |
/**
* Generate a Thumbnail of the input file.
* (You can override this method if you want to handle the different MIME-Types).
*
* @param input Input file that should be processed
* @param output File in which should be written
* @param mimeType MIME-Type of input file (null if unknown)
* @throws IOExce... |
<filename>node_modules/styled-icons/crypto/Waves/Waves.ts
export * from '@styled-icons/crypto/Waves' |
<reponame>nantapat/ng-dashboard
import { Component, OnInit } from '@angular/core';
import { ROUTES } from './sidebar-routes.config';
import { AuthService } from '../../services/auth.service'
declare var $:any;
@Component({
selector: 'app-sidebar',
templateUrl: './sidebar.component.html',
styleUrls: ['./sidebar.c... |
<gh_stars>1-10
import * as React from 'react';
import { concatStyleSets, IStyleSet, IStyleFunctionOrObject, IConcatenatedStyleSet } from '@uifabric/merge-styles';
import { Customizations } from './customizations/Customizations';
import { CustomizerContext, ICustomizerContext } from './customizations/CustomizerContext';... |
<gh_stars>1-10
import {ChatPostMessageArguments, WebClient} from "@slack/web-api";
import {compareAndCreatePost, createMaterialPost} from "./itc-lms/slack";
import * as fs from "fs";
import {sameMaterial} from "./itc-lms/utils";
(async () => {
const slackClient = new WebClient(process.env.YOU_THEE_SLACK_BOT_USER_T... |
<filename>packages/local_adapter/src/internal/local_metadata_extra.ts<gh_stars>1-10
import { MetadataExtra } from '@odroe/fs';
import fs from 'fs';
import crypto from 'crypto';
import type { FileTypeResult } from 'file-type';
const defaultMimeType = 'application/octet-stream';
export class LocalMetadataExtra implemen... |
package org.cytoscape.rest.internal.model;
/**
* Dummy class for generating API document.
*/
public class CyJsNetwork {
private NetworkData data;
private Elements elements;
/**
* @return the data
*/
public NetworkData getData() {
return data;
}
/**
* @param data
* the data to set
*/
... |
// Move should fail if the volume on same mount has no space.
@Test(timeout = 30000)
public void testMoveBlockWithSameMountMoveWithoutSpace() {
MiniDFSCluster cluster = null;
try {
conf.setBoolean(DFSConfigKeys
.DFS_DATANODE_ALLOW_SAME_DISK_TIERING, true);
conf.setDouble(DFSConfigKeys
... |
def _dummy(name, token, expr, **kwargs):
d = _dummy_(name, token, **kwargs)
if d in expr.free_symbols:
return Dummy(name, **kwargs)
return d |
<reponame>brightiron/olympus-frontend<filename>src/lib/react-query.tsx
import React from "react";
import { QueryCache, QueryClient, QueryClientProvider } from "react-query";
import { ReactQueryDevtools } from "react-query/devtools";
import { Environment } from "src/helpers/environment/Environment/Environment";
export ... |
import * as React from 'react';
import {Linking} from 'react-native';
import {GLOBAL} from '../styles/global';
import {CTEXT} from '../elements/custom';
import store from '../../../shared/redux/store';
// import router from '../../navigators/router';
// import {Card, Carousel} from '../elements/layout';
import {CARD} ... |
def data_cpt_ENSAE_2016_11_blind_set(password):
if password == "dummy":
return [random.random() for i in range(7500)]
else:
name = os.path.join(os.path.dirname(__file__),
"data_competition", "answers.bin")
if not os.path.exists(name):
raise FileNot... |
External Validation of the Skin and UV Neoplasia Transplant Risk Assessment Calculator (SUNTRAC) in a Large European Solid Organ Transplant Recipient Cohort.
Importance
The Skin and UV Neoplasia Transplant Risk Assessment Calculator (SUNTRAC) tool has been developed in the US to facilitate the identification of solid ... |
def run_thresholds(self, type):
common.run_thresholds(self, type) |
/**
* This method adds the ActionListener to the infixQueryEntry, prefixQueryEntry,
* infixSearchButton and prefixSearchButton. Similar to the
* addConfirmActionListener method, the JTextField infixQueryEntry and
* prefixQueryEntry also generate the same event as the buttons when the user
* press the 'En... |
Essential Medication Prescription and Associated Maternal Characteristic among Hospitalized Pregnant Women: A Retrospective Population Based Study
Objective: There are limitations of Food and Drug Administration pregnancy risk classification system and pregnancy information, surplus resources are essential to evaluate... |
/**
* UINode
*
* @author Eric Buitenhuis
* @version 1.0
*/
public class UINode extends UIComponentBase {
public static final String DEFAULT_COMPONENT_TYPE = "UINode";
public static final String DEFAULT_RENDERER_TYPE = "NodeRenderer";
public static final String DEFAULT_FAMILY = "NodeFamily";
priva... |
<reponame>kprotty/lazer
#include "lock.h"
#if defined(LZR_WINDOWS)
#include <Windows.h>
#define cpu_yield() Sleep(1)
#define cpu_relax() YieldProcessor()
#elif defined(LZR_LINUX)
#include <sched.h>
#include <immintrin.h>
#define cpu_relax() _mm_pause()
#define cpu_yield() sched_yield()
#en... |
/**
* @author athomas
*
* The About panel.
*/
public class AboutPanel extends GeneralOptionPanel {
/** Constructor. */
public AboutPanel(GanttProject parent)
{
super(GanttProject.correctLabel(GanttLanguage.getInstance().getText("about")),
GanttLanguage.getInstance().getText("settingsAbout")+" "+GanttPro... |
def load_model_after_ae(model, checkpoint_dir, filename='checkpoint.pth.tar'):
from copy import deepcopy
model_after_ae = deepcopy(model)
model_dict = model_after_ae.state_dict()
param_dict = torch.load(os.path.join(checkpoint_dir, filename))
ae_pretrained_dict = param_dict['model']
ae_pretraine... |
// CheckIfValidFile : Check if CSV File is valid
func CheckIfValidFile(filename string) (bool, error) {
if extension := filepath.Ext(filename); extension != ".csv" {
return false, errors.New("File is not csv")
}
if _, err := os.Stat(filename); err != nil && os.IsNotExist(err) {
return false, errors.New("File doe... |
/**
* Unit testser for XmlBinaryInteractionEvidenceIterator
*
* @author Marine Dumousseau (marine@ebi.ac.uk)
* @version $Id$
* @since <pre>08/11/13</pre>
*/
public class XmlBinaryInteractionEvidenceIteratorTest {
@Test
public void test_read_valid_xml25_inferred() throws PsiXmlParserException, JAXBExcepti... |
class privateClass {
}
export class publicClass {
}
export interface publicInterfaceWithPrivateTypeParameters {
// TypeParameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_type_1
new <T extends privateClass>(): privateClass;
// TypeParameter_0_of_constructor_signature_fro... |
/* eslint-disable import/extensions */
/* eslint-disable no-console */
import { AudioVideoObserver, ConsoleLogger, DefaultDeviceController, DefaultMeetingSession, LogLevel, MeetingSessionConfiguration } from "amazon-chime-sdk-js";
import { AttendeeResponse } from "../models/AttendeeResponse";
import { MeetingResponse }... |
Mere seconds from completing the Scotiabank Toronto Waterfront Marathon on Sunday, a 27-year-old man collapsed and died just short of the finish line.
The half-marathon runner had just 300 metres to go when he dropped near the intersection of King and Wellington streets at 11:15 a.m. and never got up, race organizers ... |
"""
The Blake2 Implementation
^^^^^^^^^^^^^^^^^^^^^^^^^^
"""
import struct
from dataclasses import dataclass
from typing import List, Tuple
from ethereum.base_types import Uint
def spit_le_to_uint(data: bytes, start: int, num_words: int) -> List[Uint]:
"""
Extracts 8 byte words from a given data.
Parame... |
def rewrite_cloudoptions(cld_attr_lst, available_clouds, user_defined_only = True) :
if len(available_clouds) :
for cloud_name in available_clouds :
if cld_attr_lst["cloud_name"].lower() != cloud_name :
continue
searchkey = "cloudoption_" + cloud_name
for ... |
/**
* Handles routing session requests to the appropriate
* {@link TrashDayManager} methods.
* <p>
* This is mostly boilerplate code from Alexa samples modified to handle
* the specific Intents for our application. Additionally, the {@link #TrashDaySpeechlet(AmazonDynamoDBClient, String)}
* constructor is added ... |
//
// Copyright (c) 2021 shawnfeng. All rights reserved.
//
#pragma once
#include <stdio.h>
#include <string.h>
// Precompiler define to get only filename;
#if !defined(__FILENAME__)
#define __FILENAME__ \
({ \
strrchr... |
Decision Support with EMPEROR
Selecting the right practice or technology for a given task should be based on the project goals and context. The selection process should be supported by empirical evidence and experiences with the practice in similar contexts . Practitioners, however, usually do not have the time to se... |
module Utils.Task1BenchUtils
( generatePoint
, generatePointList
) where
import Test.QuickCheck (Gen, choose, vectorOf)
import Task1 (Point (..))
generatePoint :: Gen Point
generatePoint = do
x' <- choose (-10000000, 10000000)
y' <- choose (-10000000, 10000000)
return (Point x' y')
generatePointList :: ... |
<gh_stars>0
import { HeaderArea } from 'douhub-ui-web-platform';
const Header = (props: Record<string, any>) => {
return <HeaderArea {...props}/>
};
export default Header; |
<gh_stars>1-10
#include <iostream>
#include <vector>
#include <regex>
#include <fstream>
#include <sstream>
#include <string>
void ex_7()
{
std::cout << std::endl << "ex_7" << std::endl;
std::vector<std::string> lines = {"PO12345", "PO 12345", "PZ973ND", "WE20456"};
std::regex re(R"(((PO)|(PZ)) ?[A-Z0-9]... |
<reponame>chriskalmar/shyft
/* eslint-disable @typescript-eslint/no-explicit-any */
import { passOrThrow, isMap, isFunction } from '../util';
import { AttributeBase } from '../attribute/Attribute';
import { DataTypeFunction } from '../datatype/DataType';
import {
generatePermissionDescription,
processActionPermiss... |
/**
* Created by Administrator on 2014/12/17.
*/
public class NumberUtil {
private NumberUtil() {}
public static int getPageCount(int count, int row) {
return (count + row - 1) / row;
}
} |
/**
* Test class of {@link ProvQuoteContainerResource}
*/
class ProvQuoteContainerResourceTest extends AbstractProvResourceTest {
@Autowired
protected ProvBudgetResource budgetResource;
@Override
@BeforeEach
public void prepareData() throws IOException {
// Only with Spring context
persistSystemEntities();... |
# Library importing
import json
import sys
import time
from collections import Counter
from mpi4py import MPI
# checking start time
start_time = time.time()
# reading file name from command
data_file_nm = sys.argv[1]
map_file_nm = sys.argv[2]
sentiment_file_nm = sys.argv[3]
# Initialising Mpi4py and and getting nu... |
/**
* Encapsulates the consumers management (add, remove and call).
*
* @author Francesco Illuminati
*/
public class AbstractPerformanceProducer<T extends AbstractPerformanceProducer<T>>
implements Serializable, PerformanceProducer, PerformanceConsumer {
private static final long serialVersionUID = 1L;
... |
package main
import (
"fmt"
"bufio"
"os"
"strconv"
"sort"
)
var sc = bufio.NewScanner(os.Stdin)
func scanInt() int {
sc.Scan()
a,_ := strconv.Atoi(sc.Text())
return a
}
type work struct {
a int
b int
}
type works []work
func (a works) Len() int {
return len(a)
}
func (a works) Swap(i,j int) {
a[i],a[j... |
<reponame>rodrigosmig/meudinherim-frontend
import {
Box,
Flex,
Stack
} from "@chakra-ui/react";
import * as yup from 'yup';
import { yupResolver } from "@hookform/resolvers/yup";
import { SubmitHandler, useForm } from "react-hook-form";
import { SubmitButton } from "../../Buttons/Submit";
import { Input } from "... |
// NewServer returns an api server instance
func NewServer(db *sql.DB) *Server {
return &Server{
db: db,
router: gin.Default(),
}
} |
def move_cursor(self, x, page):
if x >= self.LCD_WIDTH | x < 0:
return
if page > self.LCD_PAGE_COUNT - 1 | page < 0:
return
self.send_command([self.CMD_SET_PAGE | self.__pagemap[page]])
self.send_command([self.CMD_SET_COLUMN_LOWER | (x & 0xf)])
self.send_c... |
#include "led-control.hpp"
#include "Arduino.h"
const int DEFAULT_FADE_SPEED = 4;
LedControl::LedControl() {
_minBrightness = 0;
_maxBrightness = MaxBrightness;
_fadeSpeed = DEFAULT_FADE_SPEED;
}
void LedControl::setup(int pin) {
_pin = pin;
pinMode(_pin, OUTPUT);
}
void LedControl::update() {
// TODO n... |
<filename>appengine/findit/main.py
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import endpoints
import webapp2
from findit_api import FindItApi
from handlers import build_failure
from handlers import ... |
def verify_coupon(coupon):
try:
Coupon.objects.active().get(pk=coupon.pk)
except Coupon.DoesNotExist:
return False
return True |
// TemplateByID returns a template based on the user corresponding to the provided ID's settings.
func (ombi *Ombi) TemplateByID(id string) (result map[string]interface{}, code int, err error) {
result, code, err = ombi.UserByID(id)
if err != nil || code != 200 {
return
}
for _, key := range stripFromOmbi {
if ... |
def is_authorized_key(id):
authorized_keys = _get_ssh_authorized_keys_path()
command_check = ['grep', '"{c}"'.format(c=id), authorized_keys]
return subprocess.call(command_check, stdout=subprocess.PIPE) == 0 |
<reponame>woshidaniu-com/niutal<filename>niutal-component-wjdc-parent/niutal-component-wjdc-ext/src/main/java/com/woshidaniu/wjdc/service/impl/WjglManager.java<gh_stars>1-10
/**
* <p>Copyright (R) 2014 我是大牛软件股份有限公司。<p>
*/
package com.woshidaniu.wjdc.service.impl;
import java.lang.management.ManagementFactory;
impor... |
// mustExecute executes a template, panicing on error
func mustExecute(templates *template.Template, templ string, data ...interface{}) string {
if len(data)%2 != 0 {
panic("data length must be 2")
}
templateData := map[string]interface{}{}
for i := 0; i < len(data); i = i + 2 {
key := data[i].(string)
templa... |
/**
* Analyze the sequence to find the appropriate ranges within which code
* splitting should be performed. Code splitting allows chains of Optional
* expressions to turn into binary trees, with the non-optional that follows
* at the leaves. Since the endpoints are unique, we can postpone pushing
* the con... |
use crate::radial_menu::{OpenMenuEvent, PropagateSelectionEvent, UpdateCursorPositionEvent};
use crate::{GameState};
use bevy::prelude::*;
use crate::gate::systems::InsertGateEvent;
use bevy_asset_loader::AssetCollection;
use nodus::world2d::camera2d::MouseWorldPos;
pub struct GateMenuPlugin;
impl Plugin for GateMen... |
class NodeBuilder:
"""NodeBuilder converts python objects to typescript's types."""
def __init__(self) -> None:
self._modules: Dict[str, Any] = {}
self._definitions: Dict[str, nodes.TypeNode] = {}
self._stack: List[Tuple[str, str, Any]] = []
@property
def definitions(self) -> D... |
<gh_stars>10-100
/* eslint-disable */
export function info(...objects: unknown[]) {
console.info(...objects);
}
export function debug(...objects: unknown[]) {
console.log(...objects);
}
export function error(...objects: unknown[]) {
console.error(...objects);
}
export default {
debug,
info,
error,
};
|
package com.ops.sc.ta.trans;
import com.google.common.collect.Maps;
import com.ops.sc.common.enums.CallErrorCode;
import com.ops.sc.common.enums.CallBackType;
import com.ops.sc.common.enums.LocalInvokeType;
import com.ops.sc.common.exception.ScClientException;
import com.ops.sc.core.service.tcc.TccExecuteInfo;
import... |
/**
* Adds flexibility to {@code allToAll}: location of data for send is
* specified by {@code sdispls} and location to place data on receive
* side is specified by {@code rdispls}.
* <p>Java binding of the MPI operation {@code MPI_IALLTOALLV}.
* @param sendbuf send buffer
* @param sendcount number of ite... |
package app
import (
handlers "IRCService/app/controllers"
core "IRCService/app/core"
coap "github.com/dustin/go-coap"
)
func setRouters(ci core.CoapInterface) {
mux.Handle("cmd", coap.FuncHandler(handlers.CommandHandler(ci)))
mux.Handle("mouseEvent", coap.FuncHandler(handlers.MouseEventHandler(ci)))
mux.Handl... |
/**
* Test function.
* @param function function name
* @param func func
*/
public static void testFunction(String function, Func func) {
try {
System.out.println("============================================================================");
System.out.println("Testing '" + function + "' ......");
S... |
def required_params(keys):
for key in keys:
if re.search(r"\[", key):
return False
if len(keys):
return True
return False |
/** Call this function from overridden env_get_char_spec() if you need
* this functionality.
*/
int env_nvram_get_char(int index)
{
uchar c;
nvram_read(&c, CONFIG_ENV_ADDR + index, 1);
return c;
} |
<gh_stars>0
// -*- mode: C++; c-file-style: "cc-mode" -*-
//*************************************************************************
// DESCRIPTION: Verilog::Preproc: Preprocess verilog code
//
// Code available from: http://www.veripool.org/verilator
//
//**************************************************************... |
def clone(self):
clone = copy.copy(self)
for key, spec in clone._nested_spec.items():
clone._nested_spec[key] = spec.clone()
return clone |
<reponame>RadicalZephyr/just<gh_stars>1-10
use Verbosity::*;
#[derive(Copy, Clone)]
pub enum Verbosity {
Taciturn,
Loquacious,
Grandiloquent,
}
impl Verbosity {
pub fn from_flag_occurrences(flag_occurences: u64) -> Verbosity {
match flag_occurences {
0 => Taciturn,
1 => Loquacious,
_ => ... |
/**
* Adds all uncovered classes to the corresponding maps with a value of 0.
* @param model
*/
public void addUncoveredClasses(MModel model) {
for (MClass cls : model.classes()) {
if (!this.classCoverage.containsKey(cls)) {
this.classCoverage.put(cls, Integer.valueOf(0));
}
if (!this.completeClass... |
<reponame>ricMuehlbauer/curso-flask<gh_stars>0
inteiro: int = 5
flutuante: float = 6.1
online: bool = True
texto: str = "Ricardo"
|
Diagnosing the kinematics of the tori in active galactic nuclei with the velocity-resolved reverberation mapping of the narrow iron K$\alpha$ line
The properties of the dusty tori in active galactic nuclei (AGNs) have been investigated in detail, mainly focusing on the geometry and components; however, the kinematics ... |
{-# LANGUAGE TemplateHaskell #-}
module T11941 where
import Data.Monoid
const (return []) $ mempty { getFrst = Just () }
|
import React from "react";
import { Typography } from "@material-ui/core";
import Background from "../../../images/img.jpg";
import { CommonHtmlElement } from "../../../css/styles.modulecss";
import {
RightWrapper,
WelcomeBlock,
Title,
MainContent,
LoginLink,
ExploreButton,
} from "./Welcome.... |
class EncodingCache:
""" A class for caching the encoding type for each topic. This will only
work if the encoding does not change. """
def __init__(self):
self.encoding_map = {}
def lookup_encoding(self, topic):
if topic in self.encoding_map:
return self.encoding_map[topi... |
Gene duplication in Saccharomyces cerevisiae.
Five independent duplications of the acid-phosphatase (aphtase) structural gene (acp1) were recovered from chemostat populations of S. cerevisiae that were subject to selection for in vivo hyper-aphtase activity. Two of the duplications arose spontaneously. Three of them w... |
// Attach creates and attaches a channel to the broadcaster
func (b *Broadcaster) Attach() <-chan interface{} {
channel := make(chan interface{})
b.Lock()
b.recipients = append(b.recipients, channel)
b.Unlock()
return channel
} |
def show_all():
unpack_changes()
i = 1
while i <= len(CHANGES):
show_number(i)
i += 1
print("\nNumber of changes shown : " + str(len(CHANGES)))
print("Last update : " + str(STORAGE.config_get("last_update")))
print("End.\n") |
#include "stdafx.h"
#include "Internal/VulkanDevice.h"
#include "VulkanComputeStage.h"
#include "VulkanDescriptorSet.h"
#include "Internal/VulkanCommandBuffer.h"
#include "Internal/VulkanGraphicsPipeline.h"
#include "VulkanShaderModule.h"
#include "VulkanSemaphore.h"
#include "VulkanSemaphoreFactory.h"
#include "Vulkan... |
<reponame>CarbonDesigns/carbon-ui
import * as React from "react";
import * as PropTypes from "prop-types";
import { app, backend, Invalidate, Rect } from "carbon-core";
import { Component, listenTo } from "../../../CarbonFlux";
import { FormattedMessage } from "react-intl"
import { GuiButton, GuiButtonStack, GuiInput, ... |
// transcode dubbo response to http response
func (t *springcloud2dubbo) TranscodingResponse(ctx context.Context, headers api.HeaderMap, buf api.IoBuffer, trailers api.HeaderMap) (api.HeaderMap, api.IoBuffer, api.HeaderMap, error) {
log.DefaultContextLogger.Debugf(ctx, "[springcloud2dubbo transcoder] response header %... |
<gh_stars>1-10
// Copyright 2021 the u-root Authors. All rights reserved
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build plan9
package main
import (
flag "github.com/spf13/pflag"
)
var (
final = flag.BoolP("print-last", "p", false, "Print only the ... |
package ansi
const (
MinRGB24 = MinGray8 + CountGray8
CountRGB24 = 1 << 24
_ = MinRGB24 + (CountRGB24 - 1)
)
func ColorRGB24(r, g, b uint8) Color {
rgb := (Color(r) << 16) | (Color(g) << 8) | Color(b)
return MinRGB24 + rgb
}
|
package lib
import (
"os"
"github.com/cbroglie/mustache"
)
var template string = "templates/project.mustache"
type File struct {
Name string
}
func (p *Project) WriteHtml() error {
out, _ := mustache.RenderFile(template,
map[string]interface{}{
"Name": p.Name,
"Url": p.Url,
"Contrib... |
/** Append binds to the existing list in this builder. */
public Builder appendBinds(final Iterable<String> newBinds) {
final List<String> list = new ArrayList<>();
if (this.binds != null) {
list.addAll(this.binds);
}
list.addAll(Lists.newArrayList(newBinds));
this.binds = copyWith... |
Role of the immune system in allergic children
Patients suffering from allergic diseases like allergic asthma and atopic dermatitis, generally develop an IgE-mediated immune response of which the intensity is highly variable. The induction of this IgE synthesis is thought to be based on two signals: one being provided... |
<gh_stars>1000+
namespace DB
{
class FunctionFactory;
void registerFunctionLike(FunctionFactory &);
void registerFunctionILike(FunctionFactory &);
void registerFunctionNotLike(FunctionFactory &);
void registerFunctionNotILike(FunctionFactory &);
void registerFunctionMatch(FunctionFactory &);
void registerFunctionExtr... |
def create_query(request):
user = request.user
if request.method == "POST":
query_form = QueryForm(request.POST)
if query_form.is_valid():
query = query_form.save(commit=False)
query.author = user
query.save()
messages.success(request, f'Thanks for... |
<reponame>rmateeq/contiki-ng
//#define LOG_CONF_LEVEL_IPV6 LOG_LEVEL_DBG
//#define LOG_CONF_LEVEL_RPL LOG_LEVEL_DBG
//#define LOG_CONF_LEVEL_6LOWPAN LOG_LEVEL_DBG
//#define LOG_CONF_LEVEL_TCPIP LOG_LEVEL_DBG
//#define LOG_CONF_LEVE... |
def generateResponse(self, constraints=False, beauti=False, tabledata=False, matrix=False):
assert not self.pending, "NexusExport.generateResponse " \
"impossible for pending exports."
if constraints:
name = self.constraintsName
elif beauti:
... |
REYNOSA, Tamaulipas — A series of leaked crime scene images paint a graphic picture of the death of the Gulf Cartel boss known as “El Toro” and “Comandante Toro.”
As Breitbart Texas reported, Juan Manuel “Comandante Toro” Loaiza Salinas aka Julian Loiza Salinas was killed Saturday morning during a fierce clash with Me... |
A Met copper received "management advice" after it emerged he had "participated in a pornographic film aimed at the gay market for which he had been paid money," a Freedom of Information response to El Reg has revealed.
It is not clear from the response whether the officer in question was in uniform at the time or whe... |
//!
//! Benchmark WOTS
//!
use criterion::{criterion_group, criterion_main, Criterion};
use iota_conversion::Trinary;
use mam_rs::{
definitions::ss::{PrivateKey, PrivateKeyGenerator},
spongos::MamSpongos,
wots::{WotsPrivateKey, WotsPrivateKeyGenerator},
};
const SEED: &str =
"NNNNNNNNNNNNNNNNNNNNNNNNNN... |
<gh_stars>0
import { FormDefinition } from "@xgovformbuilder/model";
export function hasConditions(conditions: any[]): boolean {
return conditions.length > 0;
}
|
Produced by Juliet Sutherland, Linda Cantoni and PG Distributed
Proofreaders
SAMUEL JOHNSON
BY
LESLIE STEPHEN
NEW YORK
1878
CONTENTS.
CHAPTER I.
CHILDHOOD AND EARLY LIFE
CHAPTER II.
LITERARY CAREER
CHAPTER III.
JOHNSON AND HIS FRIENDS
CHAPTER IV.
JOHNSON AS A LITERARY DICTATOR
CHAPTER V.
THE CLO... |
from unittest import TestCase
from longest_consecutive_sequence import Solution
class TestLongestConsecutiveSequence(TestCase):
def test_out_of_order(self):
self.assertEqual(4, Solution().longestConsecutive([100, 4, 200, 1, 3, 2]))
def test_in_order(self):
self.assertEqual(4, Solution().long... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.