content
stringlengths
10
4.9M
<reponame>myohn-paypal/butterfly<gh_stars>10-100 package com.paypal.butterfly.extensions.api; import java.util.List; /** * Marker interface for every type that can be assigned as * the parent of a {@link com.paypal.butterfly.extensions.api.TransformationUtility} * * @author facarvalho */ public interface Transfo...
def write_trial_result(self, experiment: Experiment, response_correct: bool, response_time: int) -> None: curr_trial = experiment.get_current_trial() if curr_trial is None: raise ValueError("Experiment is finish...
/** * * * @author Paul Speed */ public class SkyState extends BaseAppState { private Spatial sky; public SkyState() { } @Override protected void initialize( Application app ) { Texture texture1 = app.getAssetManager().loadTexture("Textures/galaxy+Z.jpg"); Texture text...
def prefix(self, prefix): if prefix is not None and len(prefix) < 1: raise ValueError("Invalid value for `prefix`, length must be greater than or equal to `1`") self._prefix = prefix
package com.github.mvp4g.nalu.client.handler; import com.github.mvp4g.nalu.client.application.IsContext; import org.gwtproject.event.shared.SimpleEventBus; public abstract class AbstractHandler<C extends IsContext> implements IsHandler { protected C context; protected SimpleEventBus eventBus; public Abstra...
"A calorie is a calorie" is a tautology used to convey the speaker's conviction that the concept of the "calorie" is in fact a sufficient way to describe energy content of food. The tautological phrase means that regardless of the form of food calorie a person consumes (whether a carbohydrate, protein or fat calorie) ...
/* $Id: VBoxAutostart.h $ */ /** @file * VBoxAutostart - VirtualBox Autostart service. */ /* * Copyright (C) 2012-2017 Oracle Corporation * * This file is part of VirtualBox Open Source Edition (OSE), as * available from http://www.virtualbox.org. This file is free software; * you can redistribute it and/or mod...
/** Removes an XPath Query item from the saved cache. * * @param searchItem String containing the user text string to remove. * */ public void removeSavedXPathQuerySearch( String searchItem ) { removeFindSearch( searchItem, "XPathQueries", ...
<gh_stars>1-10 """ Provide a comment after each right curly bracket. This rule only recognizes single line type comments. == Violation == } <== Violation. No comment == Good == } // if <== OK. Comment of bracket """ from nsiqcppstyle_rulehelper import * from nsiqcppstyle_reporter import * from nsiqcpp...
Initiative sponsored by Carnegie Council and led by UN climate veteran aims to break silence around geo-technologies and explore their potential By Ed King Ban Ki-moon’s former climate advisor is to lead a project to develop rules for geoengineering, amid fears current efforts to slow global warming are insufficient....
/** * Creates the replacement instruction for the given index in the * instruction sequence. */ public Instruction create(Clazz clazz, CodeAttribute codeAttribute, int index) { int matchedInstructionIndex = index < instructionSequenceMatcher.instructionCoun...
"""Denormalize Request.payout Revision ID: 3e5e1d3a02c Revises: 5<PASSWORD> Create Date: 2014-07-26 21:25:29.870535 """ # revision identifiers, used by Alembic. revision = '3e5e1d3a02c' down_revision = '5<PASSWORD>' from decimal import Decimal from alembic import op import sqlalchemy as sa from sqlalchemy.sql impor...
Share On copy Share On copy Share On link Share On link Share On tumblr Share On tumblr Share On more Share On more Share On whatsapp Share On whatsapp Share On sms Share On sms Share On email Share On email Share On twitter Share On twitter Share On lineapp Share On lineapp Share On pinterest Share On pintere...
// SpawnClientInstances spawns instances of clients of the service to be tested. func SpawnClientInstances(t *testing.T, clientCount int, listenerCreator ChannelListenerCreator, clientName, serviceName string) ([]*EndpointMockInstance, *sync.WaitGroup) { var result []*EndpointMockInstance wg := &sync.WaitGroup{} for...
by Adam Armstrong HPE Announces All-Flash For As Little As 3¢/GB/Month Hewlett Packard Enterprise (HPE) announced today its new initiative around flexible storage consumption models and accelerating all-flash data center adoption with its HPE 3PAR Flash Now. HPE is also announcing an update to its StoreFabric 32Gb (G...
/** * CatHW_Async.java * * * An "hardware" class that acts as the master in which all the other "hardware" classes run * through. * * This is NOT an OpMode. This class is used to define all the other hardware classes. * This hardware class assumes the following device names have been configured on the robot. ...
t = int(input()) answer = [] ans = [] counter = 0 for a in range(t): counter = 0 n = int(input()) ans = [0 for d in range(n)] line = list(input()) for b in range(len(line)-n+1): current = [line[c] for c in range(b, b+n)] #print(current) check = int(ans[counter])|int(current[c...
<filename>defs/defs.go<gh_stars>10-100 package defs const ( FILE_DIR = "./file/" MAX_UPLOAD_SIZE = 1024 * 1024 * 50 )
<gh_stars>0 package com.ruoyi.activiti.listener; import lombok.extern.slf4j.Slf4j; import org.activiti.engine.delegate.DelegateTask; import org.activiti.engine.delegate.TaskListener; @Slf4j public class SetAssignListener implements TaskListener { @Override public void notify(DelegateTask delegateTask) { ...
// Convert a HWCART communicator to a native MPI_Cart communicator. // Dimension order will be set to MPI order (ZYX). All standard MPI_Cart functions // (MPI_Cart_shift, MPI_Cart_sub, MPI_Cart_rank, etc.) can be used on mpicart_com. int hwcart2mpicart(MPI_Comm hwcart_comm, int nlevels, int *topo, int *periodic, hwcart...
/** * Check to see if an object is empty i.e. if all fields of an object are full, then this will return true. * * @param object containing various fields * @return true if there exists at least 1 field that is not null; false otherwise */ public static boolean isEmpty(Object object) { ...
use super::super::api; use std::collections::HashSet; use std::mem; pub type Selector<T> = Fn(&api::DataSet<T>, api::Feature, usize) -> Vec<api::Number>; fn number_bound<T: api::RecordMeta>(record: &T, feature: api::Feature, bound: api::Number) -> bool { match record.number_value(feature) { Some(value) =...
H, W, K = map(int, input().split()) S = [list(map(int, list(input()))) for _ in range(H)] tab_h = [[0] * (W + 1) for _ in range(H)] for i in range(H): cnt = 0 for j in range(W): cnt += S[i][j] tab_h[i][j + 1] = cnt # tab_v = [[0] * (H + 1) for _ in range(W)] # for j in range(W): # cnt = 0 ...
Sorry about the delay. It is a crazy time of the year. And the most difficult is to find enough time to actually get back to ponies and to this style. It's funny the part that says "patience, my little ponies" is the one making people wait. It wasn't on purpose, I swear.So... yeah, as I said before, it's crazy how a si...
import { Injectable } from '@angular/core'; import { AuthService } from '../shared/services'; import { OdbcService } from '../shared/services'; @Injectable() export class User { private username: number; private password: string; private name: string; private family_name: string; private groups: ...
use crate::env::Env; use crate::ffi::*; use deno_core::v8; #[napi_sym] fn napi_throw_type_error( env: napi_env, code: *const c_char, msg: *const c_char, ) -> Result { let mut env = &mut *(env as *mut Env); // let code = CStr::from_ptr(code).to_str().unwrap(); let msg = CStr::from_ptr(msg).to_str().unwrap(...
#include <cmath> #include <vector> #include <string> #include <boost/shared_ptr.hpp> #include <ros/ros.h> #include <sensor_msgs/PointCloud2.h> #include <auro_lidar_msgs/LidarSweep.h> #include <pcl_conversions/pcl_conversions.h> #include <pcl_ros/point_cloud.h> #include <pcl/point_types.h> #ifndef SWEEP_TO_POINT_CLOU...
<filename>src/schema/test/clone.ts import test = require('tape'); import { MuBoolean, MuUTF8, MuFloat32, MuDate, MuArray, MuSortedArray, MuVector, MuDictionary, MuStruct, MuUnion, } from '../index'; test('primitive.clone()', (t) => { const bool = new MuBoolean(); t.equal...
def normalize_element(element, element_signature=None): normalized_components = [] if element_signature is None: components = nest.flatten(element) flattened_signature = [None] * len(components) pack_as = element else: flattened_signature = nest.flatten(element_signature) components = nest.fla...
package watcher import ( "context" "git.henghajiang.com/backend/api_gateway_v2/core/routing" "git.henghajiang.com/backend/api_gateway_v2/core/utils" "github.com/coreos/etcd/clientv3" "github.com/coreos/etcd/mvcc/mvccpb" "github.com/hhjpin/goutils/logger" "time" ) type Watcher interface { Put(key, val string, ...
import { default as groupBy } from "lodash/groupBy" import parseISO from "date-fns/parseISO" import { Gender, getGender } from "./getGender" import { Credit } from "./Credit" import { Movie } from "./Movie" import { Photo, Poster, Backdrop } from "./Images" import { SocialMedia } from "./SocialMedia" import { TV } from...
class DefaultSegment: """DefaultSegment represents a particluar segment of a JPEG file. This class is instantiated by JpegFile when parsing Jpeg files and is not intended to be used directly by the programmer. This base class is used as a default which doesn't know about the internal structure of th...
def scale_pdata(dic, data, reverse=False): try: scale = np.power(2., -float(dic['procs']['NC_proc'])) except KeyError: warn('Unable to scale data, returning unscaled data') scale = 1 if reverse == True: return data * scale else: return data / scale
def terminal_stop_logging(self): if self.flag_graphics: print(BRACKET_END) self.push()
<reponame>matteobruni/FlexSearch /// <reference path="..\..\references\references.d.ts" /> module flexportal { 'use strict'; import Session = FlexSearch.DuplicateDetection.Session; import TargetRecord = FlexSearch.DuplicateDetection.TargetRecord; export class Duplicate extends FlexSearch.Duplicat...
For $11 an hour I stocked nonfiction and worked the register at Black Oak Books in Berkeley, a used bookstore otherwise staffed by aging, garrulous intellectuals without institutional affiliation. For $12 an hour I assisted Sam Green, a filmmaker whose first documentary, The Weather Underground, chronicled the radical ...
#include <bits/stdc++.h> using namespace std; int main() { int n, temp; cin >> n; vector<int> a{0}; vector<bool> b{false}; vector<bool> already{false}; for(int i=0;i<n;i++) { cin >> temp; a.push_back(temp); b.push_back(false); already.push_back(false); } int last = 1, ans = 0; b.at(1)...
from stardb.btree import BTree from stardb.btree import IndexNode from stardb.btree import LeafNode from stardb.util import unpack, bytesToString from io import BytesIO class LeafInputStream: def __init__(self, blockStorage, buff): self.blockStorage = blockStorage self.blockBuffer = buff def r...
/** * Iterator Function * * @return An iterator object */ @Override public Iterator<Space> iterator() { Iterator<Space> it = new Iterator<Space>() { private int currentIndex = flipRow ? 7 : 0; private int nextIndex() { if (flipRow) { ...
Is The Covid-19 Vaccine Halal? Revisiting The Role of National Pharmaceutical Regulatory Agency (NPRA) and JAKIM _____________________________________________________________________________________________________ The urge to be vaccinated has increased rapidly during the outbreak of the COVID-19 pandemic. Resorting ...
<reponame>rdnfn/beobench<gh_stars>1-10 """Subpackage with dockerfiles for experiments."""
/** * Super class for Boolean constants. * @version 2.0.0 * @since 1.0 */ public abstract class Constant extends Formula { private static final SortedSet<Variable> EMPTY_VARIABLE_SET = Collections.unmodifiableSortedSet(new TreeSet<>()); private static final SortedSet<Literal> EMPTY_LITERAL_SET = Collection...
import { random } from 'faker'; import { evalWithScope } from '@/parser/sandbox/main'; describe('parser/sandbox/main', () => { it('Not allow visit out scope variables', () => { const words = random.words(); const val = evalWithScope({ foo: { bar: words } }, 'foo.bar'); expect(val).toBe(words); try {...
Transferability of microsatellite markers from Brachypodium distachyon to Miscanthus sinensis, a potential biomass crop. Miscanthus sinensis has high biomass yield and contributed two of the three genomes in M. x giganteus, a bioenergy crop widely studied in Europe and North America, and thus is a potential biomass cr...
package com.rainbowcard.client.common.utils; import android.util.Log; import java.lang.reflect.Field; /** * Created by gc on 14/10/20. */ public class ObjectUtils { public static String toString(Object object) { Field[] fields = object.getClass().getDeclaredFields(); StringBuilder...
<filename>src/day3/index.ts import fs from 'fs'; type Bit = '0' | '1'; const INPUT_FILE_PATH = 'src/day3/input.txt'; const inputText = fs.readFileSync(INPUT_FILE_PATH).toString('utf-8'); const inputValues = inputText.split('\n'); function findMostCommonBit(values: string[], position: number): Bit { const { zero...
from server import app, DBSession from flask import Blueprint, request, session, send_file, make_response, jsonify from utils import captcha, cmparePswd, invalid, invalidate from flask_jwt_extended import jwt_required, jwt_optional, create_access_token, get_jwt_identity, get_raw_jwt import io from model import * import...
/* ** Obtain a read-lock on database version identified by the combination ** of snapshot iLsm and tree iTree. Return LSM_OK if successful, or ** an LSM error code otherwise. */ int lsmReadlock(lsm_db *db, i64 iLsm, u32 iShmMin, u32 iShmMax){ int rc = LSM_OK; ShmHeader *pShm = db->pShmhdr; int i; assert( db->iR...
def update_exam_authorization_final_grade(sender, instance, **kwargs): authorize_user_for_schedulable_exam_runs(instance.user, instance.course_run)
/** * <p> * Overrides {@link java.io.FilterInputStream#read()} to update the * <code>IProgressMonitor</code> after the read operation. * </p> * * @return the value read or <b>-1</b> if the end of the stream has been * reached * @throws IOException * if an io error occured during the read ...
/** * Return the string representation of a {@link ServiceEvent} type */ public static String serviceEvent(int eventType) { String retType = "[" + eventType + "]"; if (ServiceEvent.REGISTERED == eventType) retType = "REGISTERED"; else if (ServiceEvent.UNREGISTERING == event...
// String marshals a keymanager kind to a string value. func (k Kind) String() string { switch k { case Derived: return "derived" case Imported: return "direct" case Remote: return "remote" default: return fmt.Sprintf("%d", int(k)) } }
<reponame>Umbriwii/DH export const Scripts: BattleScriptsData = { init: function() { this.modData('Learnsets', 'thundurus').learnset.spikes = ['8L1']; this.modData('Learnsets', 'starmie').learnset.mysticalfire = ['8L1']; this.modData('Learnsets', 'golisopod').learnset.morningsun = ['8L1']; this.modData('Le...
<filename>skyfield/data/iers.py """Parse data files from the International Earth Rotation Service. See: https://datacenter.iers.org/eop.php ftp://cddis.gsfc.nasa.gov/pub/products/iers/readme.finals2000A """ import numpy as np import re from ..constants import DAY_S inf = float('inf') _R = re.compile(b'^......(........
r, g, b = sorted(map(int, input().split(' '))) if ((g - r) % 3 == 2) and ((b - r) % 3 == 2): if r == 0: print((g // 3) + (b // 3)) else: print(r - 1 + ((g - r + 1) // 3) + ((b - r + 1) // 3)) else: print(r + ((g - r) // 3) + ((b - r) // 3))
struct x { int a; int b; }; x y = { 1, 2 }; int z[] = { 2, 3, 4 }; // should result in a int[]
The Russian developer President Donald Trump teamed up with in 2015 to try to build a tower in the heart of Moscow had a shoddy business record, the Wall Street Journal reported Friday. Longtime Trump associate Felix Sater brought the Trump Organization a proposal to license the President’s name to IC Expert, a firm t...
// CalcDigest calculates the digest of the object using the specified algorithm // (md5 or sha256), using ranged downloads of the specified size. func CalcDigest(obj Object, downloadRangeSize int64, algorithm string) ([] byte, error) { h, err := newHash(algorithm) if err != nil { return nil, err } _, err = Downlo...
Crews battled a four alarm fire at a farmers market in Burlington County, New Jersey Tuesday afternoon.The fire broke out just after 2:00 p.m. inside building 4 within the landmark Columbus Farmers Market complex, located off Route 206 in Columbus.Firefighters had a lot on their hands with today's high winds fanning th...
Material Preparation and Geotechnical Properties of Transparent Cemented Soil for Physical Modeling The preparation of transparent materials suitable for simulating different rock and soil masses is the foundation for image-based physical modeling tests in studying deformation and failure mechanisms in geotechnical me...
/** * A test case for Entity Centre DSL generated top level actions. * @author TG Team * */ public class EntityCentreBuilderTopLevelActionsTest { @Test public void top_level_actions_should_be_present_in_configuration_with_appropriate_groups_and_order() { final EntityActionConfig topActionStub = act...
mod table_result; pub use self::table_result::TableResult; #[cfg(test)] mod tests; use core::{fmt, slice::Iter}; use crate::{Column, Dice, Result, Rows, Row}; use serde::de::{self, Deserialize, Deserializer, MapAccess, SeqAccess, Visitor}; use serde_derive::{Deserialize, Serialize}; /// A `Table` that can be rolled ...
/** * @param element * with concrete class name as its tag. This class is expected to * be in the same package as referenceType, unless the field is * annotated with the package name. A special attribute name * "_class", if present would be the class name * @param...
package com.kissthinker.javabean; import java.beans.PropertyChangeSupport; /** * @author <NAME> * */ public interface PropertyChangeSupporter { /** * * @return PropertyChangeSupport */ PropertyChangeSupport propertyChangeSupport(); }
Buzz: A novel programming language for heterogeneous robot swarms A new programming language designed specifically for robot swarms, Buzz is based on the idea that a developer must be allowed to pick the most comfortable approach to behavioral design – whether that’s bottom-up or top-down. Designing swarm robotics sy...
/** * Keep-alive cluster member group integration tests. */ public class SimpleKeepAliveClusterMemberGroupIntegrationTest { private static int testInvokedCounter; private ClusterMemberGroup memberGroup; @Before public void beforeTest() { memberGroup = ClusterMemberGroupUtils.newBuilder() ...
The leaker who allegedly got hold of an Xbox One dev kit and released a slew of information to the Internet has warned that if he is arrested today, he’ll spill everything he knows. The individual known as Superdae told Gizmodo that he expects to be charged today, after several months of investigation. If he is arres...
/* ** List media currently mounted on a printer or printers. */ static void ppop_media(const char command[]) { const char function[] = "ppop_media"; char *destname; int destid; int x, y; int group = FALSE; #ifdef DEBUG_PPOPINT debug("%s(\"%s\")", function, command); #endif if(gu_sscanf(command, "f %S", &destn...
import legate.numpy as np import timeit def kernel(A, p, r): return r @ A, A @ p def init_data(M, N, datatype): A = np.empty((N, M), dtype=datatype) s = np.empty((M, ), dtype=datatype) q = np.empty((N, ), dtype=datatype) p = np.empty((M, ), dtype=datatype) r = np.empty((N, ), dtype=datatyp...
Learning modular policies for robotics A promising idea for scaling robot learning to more complex tasks is to use elemental behaviors as building blocks to compose more complex behavior. Ideally, such building blocks are used in combination with a learning algorithm that is able to learn to select, adapt, sequence an...
/** * Generic container for abstract information in a tuple-based static analysis. * * @author damiano * */ public abstract class Tuple implements Comparable { private Object elem; public Object getElem() { return elem; } public abstract Tuple clone(); }
PAGO PAGO, American Samoa -- Vice President Mike Pence is shortening his stay in Hawaii to a few hours so that he could fly back to Washington in what promises to be a very busy week for the administration and Congress. Pence’s office said he would depart Hawaii on Monday afternoon after meeting with U.S. Pacific Comm...
class BlendedImageSet: """ @class BlendedImageSet represents a set of blended images, given a fg/bg pair. """ def __init__(self, bg, fgs): self.bg = bg self.fgs = fgs self.blended_images = {} self.flying_distractors = [] # Holds pairs of [image, mask] def add_flying...
/** * Check if this living entity has a gun of this type already in possession * @param entity the entity to check * @return true if already in inventory, false otherwise. */ public boolean hasGun(LivingEntity entity) { if (entity == null || !enabled) return false; ItemStack[] inv; if (entity instanceo...
/// <reference path="chomp.d.ts"/> export function pxToPt(px : number) : number { return px * 3 / 4; } export function ptToPx(pt : number) : number { return pt * 4 / 3; } export function probability(chance: number, runs: number) : number { return 1 - Math.pow((1 - chance), runs); } export function descr...
#include <bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); // freopen("input.txt","r",stdin); // freopen("output.txt","w",stdout); int n, u; scanf("%d %d", &n, &u); vector<int> e(n); for(int i = 0; i < n; i++) { scanf("%d", ...
/** * Given an incomplete structure or union entity and a consistent, complete * structure or union type node, completes the entity using the information * provided by the node. * * @param structureOrUnion * an incomplete structure or union entity (non-<code>null</code> * ) * @par...
<filename>src/controllers/users.controller.ts<gh_stars>1-10 import { Router, Response } from "express"; import { Auth } from "../guardians/auth"; import telkit from 'terminal-kit'; import bodyParser from 'body-parser'; import { UsersSerivce } from "../services/Users.service"; import { ORMHelper } from "../helper/orm.he...
The traditional media are so petrified of being called "liberal" that they are prepared to allow the Breitbarts of the world to become their assignment editors. Mainstream journalists regularly criticize themselves for not jumping fast enough or high enough when the Fox crowd demands coverage of one of their attack lin...
Chris Lane: Chancey Luna, 17, found guilty of murdering Australian baseballer in Duncan Updated US teenager Chancey Luna has been found guilty of murdering Australian baseball player Chris Lane and sentenced to life in prison without parole. Lane, originally from Melbourne, was a student at East Central University i...
<reponame>chrisgradl/react-navigation-playground import { createSlice, PayloadAction } from "@reduxjs/toolkit"; import {RootState} from "./types"; export interface SelectedInspector { type: "Screen" | "Navigator" | "Theme" | "Debug"; navigatorId: string; screenId?: string; } const slice = createSlice({ initia...
<filename>crates/nu-protocol/src/value/evaluate.rs use crate::value::{Primitive, UntaggedValue, Value}; use indexmap::IndexMap; use nu_errors::ShellError; use query_interface::{interfaces, vtable_for, Object, ObjectHash}; use serde::{Deserialize, Serialize}; use std::cmp::{Ord, Ordering, PartialOrd}; use std::fmt::Debu...
#include <iostream> #include <cstdio> #include <cstring> #include <cmath> #include <set> #include <deque> #include <queue> #include <algorithm> #include <stack> #include <vector> #include <map> #include <list> #include <bits/stdc++.h> typedef long long ll; typedef unsigned long long ull; typedef double d...
import { Injectable } from '@nestjs/common'; import { ChurchService } from 'src/church/church.service'; import { CreateEventDto } from './dto/create-event.dto'; import { CreateScheduleDto } from './dto/create-schedule.dto'; import { CreateWeeklyEventDto } from './dto/create-weekly-event.dto'; import { UpdateEventDto } ...
def validate(self): try: Configuration(**self.serialize()) except dbt.exceptions.ValidationException as e: raise DbtProjectError(str(e))
//===--- app.h ----------------------------------------------------------===// // Copyright (c) 2017 <NAME> // // 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...
<filename>helix-core/src/main/java/com/linkedin/helix/messaging/handling/HelixStateTransitionHandler.java /** * Copyright (C) 2012 LinkedIn Inc <<EMAIL>> * * 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...
# -*- coding: utf-8 -*- import logging import sys import time import boto3 import lumbermill.utils.DictUtils as DictUtils from lumbermill.BaseThreadedModule import BaseThreadedModule from lumbermill.utils.Decorators import ModuleDocstringParser @ModuleDocstringParser class SQS(BaseThreadedModule): """ Read ...
// ParseFields parses a string to fetch fields func (c *Caller) ParseFields(data string) map[string]Field { var ita []string var key string var value string m := regexp.MustCompile(`{\$(.*?)}`) items := m.FindAllString(data, -1) fields := make(map[string]Field) for _, item := range items { if !strings.HasPrefi...
// Trace print sql message. func (l Logger) Trace(ctx context.Context, begin time.Time, fc func() (string, int64), err error) { if l.LogLevel <= gormlogger.Silent { return } elapsed := time.Since(begin) switch { case err != nil && l.LogLevel >= gormlogger.Error && (!errors.Is(err, gormlogger.ErrRecordNotFound) |...
// This works just like http.ListenAndServeTLS but certificates are loaded into // a wrapper struct that reloads certificates from disk when a SIGHUP is // received. func ListenAndServeTLS(addr, certFile, keyFile string, handler http.Handler) error { server := &http.Server{Addr: addr, Handler: handler} keypair, err :...
<filename>fengshen/models/auto/__init__.py<gh_stars>100-1000 # coding=utf-8 # Copyright 2021 The IDEA Authors. 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:...
<gh_stars>10-100 export const METRIC_NAMES = { viewHome: "loaded screen: home", };
<reponame>11Zero/DemoBCG //******************************************************************************* // COPYRIGHT NOTES // --------------- // This is a part of the BCGControlBar Library // Copyright (C) 1998-2014 BCGSoft Ltd. // All rights reserved. // // This source code can be used, distributed or modified // o...
<reponame>acetrand/es6-mocha-snippets-vs-code type Snippet = { body: string[], description: string, prefix: string, functionType: 'arrow' | 'function' | 'both' } const snippets: Snippet[] = [ { prefix: "before", functionType: 'arrow', body: [ "before(() => {", "\t${1}", "});" ], ...
import paho.mqtt.client as mqtt from settings import settings ldr_value = 100 # Last LDR value received light_stat = False # Light Stat (as sent from here) def turn_light(stat): """Switch ON/OFF the light""" global light_stat if stat: payload = "ON" light_stat = True else: p...
/** Actions to perform on entering S_GROW_CACHE state. */ static int grow_cache_st_in(struct m0_sm *mach) { struct m0_conf_fetch_resp *resp; int rc; struct m0_confc_ctx *ctx = mach_to_ctx(mach); struct m0_rpc_item *item = ctx->fc_rpc_item; struct m0_rpc_machine *rmach = i...
<reponame>gitter-badger/yggdrash<filename>yggdrash-core/src/main/java/io/yggdrash/core/BranchGroup.java /* * Copyright 2018 Akashic Foundation * * 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 Licens...
<reponame>RulLu16/dss package io.github.ztkmkoo.dss.core.message.rest; import akka.actor.typed.ActorRef; import io.github.ztkmkoo.dss.core.network.rest.enumeration.DssRestContentType; import io.github.ztkmkoo.dss.core.network.rest.enumeration.DssRestMethodType; import lombok.Builder; import lombok.Getter; import java...
import { Handler } from "../../../../../../../shared/command-bus"; import { SCHEDULE_JOB_COMMAND_TYPE, ScheduleJobCommand } from "../commands/schedule-job.command"; import { Scheduler } from "../../../../scheduler/producer/scheduler.types"; export interface ScheduleJobHandlerProps { scheduler: Scheduler; } export d...