content
stringlengths
10
4.9M
//======================================================================== // Create the X11 window (and its colormap) //======================================================================== static GLboolean createWindow( int width, int height, const _GLFWwndconfig *wndconfig ) { X...
//--------------------------------------------------- Operation Creation Context class OperationCreationContext { public: ~OperationCreationContext(); MetaCreationContext* GetContext(MetaComposition* composition); void Finalize(); typedef HashMap<MetaComposition*, MetaCreationContext*> ContextMap; ContextMap...
<reponame>pgecsenyi/piepy """ ConfigManager Logic for managing application configuration. """ import json import os from dal.configuration.config import Config, IndexerRuleConfig class ConfigManager: """ Handles and persists application configuration. """ ###########################################...
Donald Trump has further escalated his war on the mainstream media, as he announced on Saturday that he will not be attending the White House Correspondents’ dinner. Trump will be the first president to do so in 30 years. In a tweet, Trump said that “I will not be attending the White House Correspondents’ Association ...
The blizzard that walloped New York City in January is officially the biggest snowstorm in the history of the five boroughs, according to a new report prompted by questions about the accuracy of snowfall measurements. Snowfall totals in Central Park were upped from 26.8 inches to 27.5 inches, making the Jan. 22-23 sto...
package net.anweisen.cloud.driver.event.player; import net.anweisen.cloud.driver.network.packet.def.PlayerEventPacket.PlayerEventPayload; import net.anweisen.cloud.driver.player.CloudPlayer; import net.anweisen.cloud.driver.service.specific.ServiceInfo; import javax.annotation.Nonnull; /** * Called when a player tr...
/* * Copyright 2020, Airtable-java Contributors * * 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, modify, merge...
// Judy arrays 13 DEC 2012 (judy64n.c from http://code.google.com/p/judyarray/ ) // This code is public domain. // Author <NAME>, malbrain AT yahoo.com // with assistance from <NAME>. // modifications (and any bugs) by <NAME>, mpictor at gmail // Simplified judy arrays for strings and integers // Adapted from ...
/** * Simple class for creating dialog windows. */ @SuppressWarnings("Duplicates") public class DialogFactory { private DialogFactory(){ } /** * Creates alert dialog window. * @param alertType alert type * @param title dialog window title * @param content content of dialog window ...
<reponame>tukss/yt import yt # Load the dataset. ds = yt.load("IsolatedGalaxy/galaxy0030/galaxy0030") # Create a 1D profile within a sphere of radius 100 kpc # of the average temperature and average velocity_x # vs. density, weighted by mass. sphere = ds.sphere("c", (100.0, "kpc")) plot = yt.ProfilePlot( sphere, ...
# list comprehension even_num = [even_values for even_values in range(1, 11) if even_values % 2 == 0] odd_num = [odd_values for odd_values in range(1, 11) if odd_values % 3 == 0] other_odd = [other_odd for other_odd in range(1, 11) if other_odd % 2 != 0 and other_odd % 3 != 0] print(f'The list of even numbers from 1 to...
// LogFileFlag registers a flag with the given name which, when set, // causes daemon logs to be sent to the given file in addition to // standard error. A pointer to the file is also returned, // which can be used for a deferred Close in main. func LogFileFlag(name string, mode os.FileMode) **os.File { fileFlag := &...
/** * This is the main application window */ public final class MainWindow extends JFrame implements ActionListener { /** Main window is minimized */ private boolean windowMinimized = false; /** Table column classes */ private static final Class<?>[] columnClasses = { Date.class, String.cla...
def modify_commandline_options(parser, is_train=True): parser.set_defaults(no_dropout=True) if is_train: parser.add_argument('--lambda_A', type=float, default=10.0, help='weight for cycle loss (A -> B -> A)') parser.add_argument('--lambda_B', type=float, default=10.0, help='wei...
def generate(self, ofs: typing.TextIO, length: int, width: int, start_ctx: list = None, reseed_random: bool = True): writer = WordWriter(ofs, width) if not start_ctx: start_ctx = self.chains.random_ctx() ctx = start_ctx ctx_buffer = deque() ctx_buffer...
/** * Helpers for running the example above with the test logging config file. */ public static class InfoExampleRunner { public static void main(final String... args) { CommandLineArgumentExample.main("--info", "--ident=example"); } }
/** * Returns the byte content of the specified file. * * @param file * @return the byte content of the file */ public static byte [] readContent(File file) { ByteArrayOutputStream bos = new ByteArrayOutputStream((int) file.length()); try { FileInputStream fis = new FileInputStream(file); int ...
/* This class holds up to 60 ms of super-wideband (32 kHz) stereo audio. It * allows for adding and subtracting frames while keeping track of the resulting * states. * * Notes * - The total number of samples in |data_| is * samples_per_channel_ * num_channels_ * * - Stereo data is interleaved starting with th...
// Returns locks the mutex and returns 0 if possible. Returns EBUSY if the mutex // is taken. |mutex|->_lock must be locked. int pthread_mutex_lock_internal(pthread_mutex_t *mutex) { const pthread_t self = pthread_self(); if (mutex->_control == PTHREAD_MUTEX_RECURSIVE && mutex->_owner == self) { mutex->_refcoun...
# If you do not conquer self, you will be conquered by self. Napoleon Hill # by : Blue Edge - Create some chaos def g(n): a = 1 k = n n = 2*n + 1 while n: a*=n n-=1 return a//(k+1) n = int(input()) n//=2 print(g(n-1))
n = int(input()); horiz = [0] * n; vert = [0] * n; realDays = [False] * n**2; for i in range( 0, n**2): line = [int(n) for n in input().split()]; if( horiz[line[0]-1]==0 and vert[line[1]-1]==0 ): horiz[line[0]-1] = 1; vert[line[1]-1] = 1; realDays[i] = True; out = ""; ...
News in Science Science uncovers secret to winning rugby Bigger, taller Rugby fans who say the modern game is being dominated more and more by heftier players and pumped iron can point to scientific evidence to back their case. Teams with the tallest backs and heaviest forwards are the likeliest to win the World Cup...
n,k = list(map(int,input().split())) tl = 240-k if 5*(n*(n+1)/2) < tl: print(n) for item in range(0,n+1): if 5*(item*(item+1)/2) == tl: print(item) elif 5*(n*(n+1)/2) > tl and 5*(item*(item+1)/2) < tl and 5*(item+1)*(item + 2)//2 > tl: print(item)
// publicly visible for testing to be dynamically loaded public static class NoArgDynamicallyLoadedLocationProvider implements LocationProvider { // No-arg public constructor @Override public String newDataLocation(String filename) { return String.format("test_no_arg_provider/%s", filename); } ...
/** * One page of comics */ public class Page { public long id; /** Filename without path */ public String fileName; public int order; public boolean isLeftTopCornerDark; public boolean isLeftBottomCornerDark; public boolean isRightTopCornerDark; public boolean isRightBottomCorne...
def switch(self, alias_or_index): self.current = self.get_connection(alias_or_index) return self.current
/** * a simple abstraction for a file descriptor, which for us is little more * than just an id for a native data buffer (we don't want to keep the * data itself in the JPF space) * * <2do> still needs the standard descriptors */ public class FileDescriptor { @FilterField int fd; // to be set from the native s...
Donald Trump Donald John TrumpREAD: Cohen testimony alleges Trump knew Stone talked with WikiLeaks about DNC emails Trump urges North Korea to denuclearize ahead of summit Venezuela's Maduro says he fears 'bad' people around Trump MORE on Friday blasted Hillary Clinton Hillary Diane Rodham ClintonREAD: Cohen testimony ...
<reponame>ardihikaru/mlsp import numpy as np class MSE(): def calc(self, yHat, y): # return ((yHat - y) ** 2) / 2 return np.sum((yHat - y) ** 2) / y.size
import requests class FaucetClient: """ `FaucetClient` is a thin wrapper. """ def __init__(self, url: str) -> None: self.url = url self._httpsession = requests.Session() def mint(self, amount: int, asset: str, party: str) -> requests.Response: """Mint tokens and allocate...
#!/usr/bin/env python """ """ from mininet.topo import Topo from mininet.net import Mininet from mininet.node import RemoteController from mininet.node import Node from mininet.node import CPULimitedHost from mininet.link import TCLink from mininet.cli import CLI from mininet.log import setLogLevel from mininet.util i...
<reponame>yhaoooooooo/FEBS-Cloud package com.yonyou.etl.entity; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import lombok.Data; import lombok.EqualsAnd...
/** * Put unique key. * * @param uniqueKey the unique key */ public void putUniqueKey(final UniqueKey uniqueKey) { initialiseUniqueKeys(); int id = uniqueKeyNames.indexOf(uniqueKey.getName()); if (-1 == id) { uniqueKeyNames.add(uniqueKey.getName()); id...
The Impact of Treatment Noncompliance on Mortality in People With Type 2 Diabetes OBJECTIVE To assess the association of compliance with treatment (medication and clinic appointments) and all-cause mortality in people with insulin-treated type 2 diabetes. RESEARCH DESIGN AND METHODS Data were extracted from U.K. gener...
def train(directory): print('reading from %s' % directory) (2) Create classifier and vectorizer. clf = LogisticRegression() set best parameters vec = CountVectorizer() set best parameters (3) do cross-validation and print out validation metrics (classification_report) (4) Finally, ...
#pragma once #include "Gate.h" #include "Wire.h" #include "QAP.h" #include "SparsePolynomial.h" #include <forward_list> #include <list> using namespace std; class QAP; class GateMul2; class Circuit; // The equals-zero gate class GateZerop : public GateMul2 { public: GateZerop(Field * field); vi...
<reponame>jweite/confluence-publisher from .sphinx_base_data_provider import SphinxBaseDataProvider import re import codecs class SphinxHTMLDataProvider(SphinxBaseDataProvider): DEFAULT_SOURCE_EXT = '.html' DEFAULT_SOURCE_DIR = 'docs/build/html' def get_source_data(self, filename): with codecs.op...
#ifndef TRIANGULO_H_ #define TRIANGULO_H_ class Triangulo { private: unsigned int lado1; unsigned int lado2; unsigned int lado3; public: void atribuirLado1(unsigned valor1){ this->lado1=valor1;} unsigned int }; #endif /*TRIANGULO_H_*/
//__________________________________________________________________________ /// \return Vertex position for mixed event, recover the vertex in a particular event. //__________________________________________________________________________ void AliCaloTrackReader::GetVertex(Double_t vertex[3], Int_t evtIndex) const { ...
def batch_iterator(self, batch_size=64, test=False, one_hot=True, n_batches=5000, n_mixed_files=5, rand_chord_sample=True, rand_mix_sample=True, rand_chord=True): classes = self.get_num_classes() idxs = len(self.fgs[0]) o_index = -1 from sox_chords.util.utils impor...
SOIL TILLAGE SYSTEMS IN THE FUNCTION OF ECOLOGICAL SUSTAINABILITY Stationary field experiment pertaining to the winter wheat in Croatia was performed during the three seasons. This study’s intention was to examine and diagnose the effect of tillage systems (TS) on soil chemical properties (soil acidity, phosphorus , ...
<reponame>weicao/galaxysql /* * Copyright [2013-2021], Alibaba Group Holding Limited * * 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 ...
<reponame>ghsecuritylab/DIR600B2 /* common.c * * Functions for debugging and logging as well as some other * simple helper functions. * * <NAME> <<EMAIL>> 2001-2003 * Rewritten by <NAME> <<EMAIL>> (C) 2003 * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU ...
#!/usr/bin/env python # -*- coding: utf-8; mode: python; -*- ################################################################## # Imports from __future__ import absolute_import from dsenser.lstm import LSTMSenser from dsenser.lstm.lstmbase import LSTMBaseSenser import dsenser from mock import patch, MagicMock from u...
<reponame>easy-koa/easy-koa<filename>packages/plugins/server/utils/create-monitor-plain-object.ts<gh_stars>0 import { isUndefined } from "@easy-koa/shared"; export function interceptor(action: string, { preHandleTime, postHandleTime }: { preHandleTime: number, postHandleTime: number, }) { return { ...
# -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incor...
/** * Sine calculation using interpolated table lookup. * Instead of radiants or degrees we use "turns" here. Means this * sine does NOT return one phase for 0 to 2*PI, but for 0 to 1. * Input: -1 to 1 as int16 Q15 == -32768 to 32767. * Output: -1 to 1 as int16 Q15 == -32768 to 32767. * * See the full descripti...
n = int(input()) ln = [4, 7, 47, 74, 77, 44, 444, 447, 474, 477, 777, 774, 744, 747] def lucky(n, ln): cnt = 0 for i in str(n): if i == "4" or i == "7": cnt += 1 if cnt in ln: print("YES") else: print("NO") lucky(n, ln)
def switchContexts( self, context ): if ( context != self.activeContext ): if ( self.activeContext ): self.activeContext.deactivate() self.activeContext = context if ( self.activeContext ): self.activeContext.activate()
Functional category production and degrees of severity: findings from Chinese agrammatism ABSTRACT Background: People with agrammatism have profound deficits in producing functional categories. The Tree Pruning Hypothesis proposes that these deficits are attributed to the reduced ability to project higher nodes in the...
/* This is the intra-libnetpbm interface header file for libpgm*.c */ #ifndef LIBPGM_H_INCLUDED #define LIBPGM_H_INCLUDED #include "pgm.h" void pgm_readpgminitrest(FILE * const file, int * const colsP, int * const rowsP, gray * const maxvalP); gray pg...
/** * <pre> * Turns on a lns worker which solves relaxed version of the original problem * by removing constraints from the problem in order to get better bounds. * </pre> * * <code>optional bool use_relaxation_lns = 150 [default = false];</code> * @return This builder for chaining. ...
<reponame>Folaht/sn_browser // import { onNetworkStateChange } from '$Extensions/safe/safeBrowserApplication/init/networkStateChange'; import { TYPES as PERUSE_TYPES } from '$Extensions/safe/actions/safeBrowserApplication_actions'; import { TYPES } from '$Actions/notification_actions'; import { SAFE } from '$Extensions...
<gh_stars>1-10 // Created by <NAME>. // Copyright (c) 2015 <NAME>. The National Institute of Advanced Industrial Science and Technology, Japan. All rights reserved. #include <CppUnitTest.h> #include "../../../operational/src/chain/application.h" namespace operationaltests { using namespace operational; using names...
/* * it is window for choose which mode of game users want. Random or manual. * */ public class ModeGame extends JFrame { private JPanel panel; private JButton randomButton; private JButton manualButton; private JButton backButton; private final int WINDOWS_WIDTH = 400; private final int WINDOW...
/** * Declares both g: and gm: extensions into the extension profile. * * @param extProfile extension profile */ public static void declareAllExtensions(ExtensionProfile extProfile) { declareGExtensions(extProfile); declareGMExtensions(extProfile); declareMediaExtensions(extProfile); }
<gh_stars>100-1000 import * as https from 'https'; /** * Makes an http request asynchronously and returns the response data. * * This function wraps the callback-based `http.request()` function with a * Promise. The returned Promise will be rejected in case the request fails with an * error, or the response code ...
#ifndef CaloCluster_CaloContentSim_HH_ #define CaloCluster_CaloContentSim_HH_ #include <algorithm> namespace mu2e { class CaloContentSim { public: CaloContentSim(double edep, double time, double mom): edep_(edep), time_(time),mom_(mom) {}; void update(double edep, double time, do...
// NewMigrateCmd creates a new migrate CLI sub-command func NewMigrateCmd() *cli.Command { return &cli.Command{ Name: "migrate", Usage: "create a new migration, apply (or rollback) migrations to DB.", Description: "Utility for easy migrations handling.", Flags: []cli.Flag{ &cli.StringFlag{ ...
/** * <a href="http://www.openolat.org"> * OpenOLAT - Online Learning and Training</a><br> * <p> * Licensed under the Apache License, Version 2.0 (the "License"); <br> * you may not use this file except in compliance with the License.<br> * You may obtain a copy of the License at the * <a href="http://www.apache...
n = input() a = sorted(map(int,raw_input().split())) print a[n-1]-a[0],[n*(n-1)/2,a.count(min(a))*a.count(max(a))][a[0]!=a[n-1]]
def distance(x, y): dis = 0 for i in range(len(x)): dis += (x[i] - y[i])**2 return numpy.sqrt(dis)
def _sequence_modeling(subject_vis_feature, object_vis_feature, relation_vis_feature, subject_txt_feature, object_txt_feature, relation_txt_feature, cell_fn): start_txt_feature = tf.zeros_like(subject_txt_feature) stop_vis_feature = tf.zeros_like(subject_vis_feature) ...
Irish Toasts Here is a large collection of Irish toast for many different occasions. Irish Drinking Toasts A bird with one wing can’t fly. (to encourage someone to take a second drink) Sláinte It is better to spend money like there’s no tomorrow than to spend tonight like there’s no money! My friends are the bes...
N = int(input()) S = input() def check(l): D = {} for i in range(N-l+1): s = S[i:i+l] if s not in D: D[s] = i continue if D[s]+l <= i: return True return False a = 1 b = N while a < b: i = (a + b)//2 if not check(i): b = i else: if a == i: break a = i r = b-1 ...
# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np import argparse import os import json from keras import callbacks from keras.optimizers import Adam from keras.preprocessing.image import ImageDataGenerator from fun...
export enum MessageType { 'TEXT', 'IMAGE', 'VIDEO' } export interface Message { author?: string; content: string; date: string; type: MessageType; url?: string; }
import FWCore.ParameterSet.Config as cms #Include configuration ParameterSets from L1TriggerConfig.DTTPGConfigProducers.L1DTConfigParams_cff import * from L1TriggerConfig.DTTPGConfigProducers.L1DTConfigMap_cff import * L1DTConfig = cms.ESProducer("DTConfigTrivialProducer", DTTPGMapBlock, DTTPGParametersBlock, ...
<reponame>fossabot/kopia package block // Stats exposes statistics about block operation. type Stats struct { // Keep int64 fields first to ensure they get aligned to at least 64-bit boundaries // which is required for atomic access on ARM and x86-32. ReadBytes int64 `json:"readBytes,omitempty"` WrittenBytes ...
<gh_stars>0 import styles from "./aside.module.scss"; import { CSSProperties, useState } from "react"; import { useTheme } from "next-themes"; import { SVGIcon } from "components/Utils/SVGIcon"; import { useAside } from "libs/context/ContextAside"; import axios from "axios"; import { useRouter } from "next/router"; co...
import { ElkEdge, ElkLabel, ElkNode } from 'elkjs/lib/elk-api' import { FamilyTree, Parents, ParentsID, Person } from "./types"; import { measureText } from "../lib/text"; import { FONT_SIZE, LINE_HEIGHT } from "./font"; type EdgeRouting = | 'UNDEFINED' | 'POLYLINE' | 'ORTHOGONAL' | 'SPLINES' type NodePlacem...
The Use Of The Pseudo-Eikonal In The Optimization Of Optical Systems The pseudo-eikonal is obtained by inserting in the sum of component eikonals of an optical system the linear approximations of the coordinates of the intermediate spaces as functions of the coordinates of the object and image space. The pseudo-eikona...
/** * XML node, one per Time */ public class Location { @Element(name = "temperature", required = false) public Temperature temperature; @Element(name = "symbol", required = false) public Symbol symbol; public Location() { } }
Research suggests that the woman wearing red is likely to attract more sexual attention than her otherwise identical counterparts Photos courtesy of American Apparel Let’s imagine for a minute that six identical 23-year-old female sextuplets were born and raised in a secluded U.S. town. The town is too small to provid...
Multi-robot dispatching in a geographically constrained environment We develop a task allocation approach using k-means algorithm and Steiner tree properties to dispatch a platoon of mobile robots in a constrained environment. Our approach increases task-execution efficiency of multiple robots by reducing the response...
<filename>src/analysis/trampoline_parameters.rs use config; use config::parameter_matchable::ParameterMatchable; use env::Env; use library; use nameutil; use super::conversion_type::ConversionType; use super::ref_mode::RefMode; use analysis::rust_type::rust_type; pub use config::signals::TransformationType; #[derive(...
<filename>shopcreditscore.go // 商户信用分服务 package elemeOpenApi // 连锁店根据商户ID集合批量查询商户信用分信息 // shopIds 商户ID集合 func (chain *Chain) BatchQueryShopCreditScores(shopIds_ interface{}) (interface{}, error) { params := make(map[string]interface{}) params["shopIds"] = shopIds_ return APIInterface(chain.config, "eleme.shopCredi...
Tameness and Rosenthal type locally convex spaces Motivated by Rosenthal's famous $l^1$-dichotomy in Banach spaces, Haydon's theorem, and additionally by recent works on tame dynamical systems, we introduce the class of tame locally convex spaces. This is a natural locally convex analogue of Rosenthal Banach spaces (f...
McDonald’s is having a bumpy year. It just installed a new CEO after a mere two-and-a-half-year stint by his predecessor. In January it announced its latest returns — and the news was bad. It included such shareholder downers as a “global comparable sales decrease of 1 percent, reflecting negative guest traffic in all ...
'use strict'; import { AbstractWebhookListenerUpdate } from "./AbstractWebhookListenerUpdate"; class WebhookListenerCreate extends AbstractWebhookListenerUpdate { /** * The listener listens on state changes of the entity linked with the listener. */ 'entity': number; /** ...
Event‐triggered mechanism based distributed optimal frequency regulation of power grid Considering the limitation of communication network, the event-triggered mechanism based distributed optimal frequency regulation is proposed, which can restore the frequency and retain the economic efficiency of power grid simultan...
<reponame>Vertexvis/scene-studio-demo<gh_stars>0 /* eslint-disable */ import { gql } from "@apollo/client"; import * as Apollo from "@apollo/client"; export type Maybe<T> = T | null; export type Exact<T extends { [key: string]: unknown }> = { [K in keyof T]: T[K]; }; export type MakeOptional<T, K extends keyof T> = O...
Direct Torque Control for Five-Phase Squirrel Cage Induction Generator In wind energy conversion systems based on Slip Angle The concept of multiphase induction motor is been discussedin this paper with new proposed topology of direct angle control (DTC) method with the enhanced slip angle control method. In the norma...
Brussels attacker Moroccan, not known for terror: A federal magistrate in Belgium says that the suspect who was shot and killed by soldiers at the Brussels central station had Moroccan nationality and wasn’t known to authorities for terror activities. Eric Van der Sypt said Tuesday that the man sought to explode a bom...
package com.revature.beans; import java.util.ArrayList; import java.util.List; import com.revature.util.LogThis; public class Users { private int usersId;//USER_ID private String firstName; private String lastName; private String userName; private String password; private String driverLicense; private int a...
import Plane from './type' export default clone declare function clone(plane: Plane): Plane
import { Vpc } from "@aws-cdk/aws-ec2"; import { Construct, Stack, CfnOutput } from "@aws-cdk/core"; import Certificate from "../constructs/Certificate"; import Fargate from "../constructs/Fargate"; import LoadBalancer from "../constructs/LoadBalancer"; import { Protocol, } from "@aws-cdk/aws-ecs"; import { Application...
<gh_stars>10-100 // Copyright 2013-2014 The Algebra Developers. // // 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 ...
<filename>pkg/blockdevice/v1alpha1/blockdevice_test.go /* Copyright 2019 The OpenEBS Authors 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 r...
<gh_stars>10-100 use float_eq::{ AssertFloatEq, AssertFloatEqAll, FloatEq, FloatEqAll, FloatEqDebugUlpsDiff, FloatEqUlpsTol, }; #[derive( Debug, Clone, Copy, PartialEq, FloatEqUlpsTol, FloatEq, FloatEqDebugUlpsDiff, AssertFloatEq, FloatEqAll, AssertFloatEqAll, )] struct MyCo...
<filename>app/interface/main/creative/service/pay/service.go package pay import ( "context" "go-common/app/interface/main/creative/conf" "go-common/app/interface/main/creative/dao/faq" "go-common/app/interface/main/creative/dao/pay" "go-common/app/interface/main/creative/dao/up" faqMdl "go-common/app/interface/m...
<filename>HackerRank/Problem Solving/DataStructure/Queue/Queue Using Two Stacks.c #include <stdio.h> #include <string.h> #include <math.h> #include <stdlib.h> #define MAX 100000 struct{ int arr[MAX]; int front, rear; }queue; int enqueue(int value) { queue.rear++; queue.arr[queue.rear] = value; } int d...
<gh_stars>0 import { JournalReference } from '../common'; import { BiosimulationsId } from '../common/alias'; export enum ProjectProductType { figure = 'figure', table = 'table', box = 'box', algorithm = 'algorithm', supplement = 'supplement', other = 'other', } export const projectProductTypes = [ { va...
def select(self, transform_id): query = """ SELECT id, fk_transform_sets, fk_frames, metadata, rejected FROM transforms WHERE id = ? """ result = Model.execute(query, (transform_id,)) return result.fetchone()
def install( cert, password, keychain="/Library/Keychains/System.keychain", allow_any=False, keychain_password=None, ): if keychain_password is not None: unlock_keychain(keychain, keychain_password) cmd = "security import {} -P {} -k {}".format(cert, password, keychain) if allow_...
// tableAlias returns the alias for a table to be used for pretty-printing. func tableAlias(f *ExprFmtCtx, tabID opt.TableID) string { tabMeta := f.Memo.metadata.TableMeta(tabID) if f.HasFlags(ExprFmtHideQualifications) { return tabMeta.Alias.String() } tn, err := f.Catalog.FullyQualifiedName(context.TODO(), tabM...
/** * Factory for {@link Ggpk}. * * @author Jacob Swanson * @since 8/31/2015 */ @Slf4j public class GgpkFactory { /** * Weak cache of records */ private static final Cache<String, Ggpk> ggpkCache = CacheBuilder.newBuilder().softValues().build(); private Ggpk cacheGet(File file) { St...
package services import ( "encoding/json" "fmt" "time" gosxnotifier "github.com/deckarep/gosx-notifier" "github.com/getlantern/systray" "github.com/hirokimoto/crypto-auto/utils" "github.com/leekchan/accounting" ) var PAIRS = []WatchPair{ {"0x3dd49f67e9d5bc4c5e6634b3f70bfd9dc1b6bd74", 5.0, 8.0}, // SAND...
class Dough: def __init__(self,flour_type,baking_technique,weight): self.flour_type = flour_type self.baking_technique = baking_technique self.weight = weight @property def flour_type(self): return self.__flour_type @flour_type.setter def flour_type(self, value)...
// Use returns an Option that specifies which Driver to use to communicate with // NATS. Defaults to Core(). func Use(d Driver) Option { if d == nil { panic("nil Driver") } return func(bus *Bus) { bus.driver = d } }