content
stringlengths
10
4.9M
/** * This method performs polyomino packing. */ public void pack(Polyomino[] pm, int pcount) { polyominoes = pm; rect = new Rectangle[pcount]; makeGrid(100, 100, 0); Rgen = new Random(1); for (int k = 0; k < pcount; k++) RandomizeMino(k); double[] key = new double[pcount]; ind = new int[pcount]...
<gh_stars>1-10 package com.yalong.entity; // Generated 2020-3-27 16:01:25 by Hibernate Tools 5.2.12.Final import java.util.Date; import javax.persistence.Column; import javax.persistence.Embeddable; /** * EvaluateValveId generated by hbm2java */ @Embeddable public class EvaluateValveId implements java.io.Serializab...
<gh_stars>1-10 package model import ( "strconv" "strings" ) type MessageID int64 func (m MessageID) ToString() string { return strconv.FormatInt(int64(m), 10) } type MessageText string var debugKeyword = "--debug" func (m MessageText) HasKeyword(keyword string) bool { return strings.Contains(string(m), keywor...
Propidium iodide staining method for testing the cytotoxicity of 2,4,6-trichlorophenol and perfluorooctane sulfonate at low concentrations with Vero cells In this article, the feasibility of propidium iodide (PI) staining based on cell membrane damage as a sensitive and quantitative method to test the cytotoxicity of ...
<filename>codegen/src/sql_server_rust.rs<gh_stars>0 // use anyhow::anyhow; // use serde::{Deserialize, Serialize}; use crate::{mms, pdr}; use std::{collections, fs, str}; pub fn run() -> anyhow::Result<()> { let rdr = fs::File::open("mmsdm.json")?; let mapping = fs::read_to_string("table_mapping.csv").unwrap()...
/** * Class to encapsulate all necessary data for collecting {@link StreamingFacet}s. */ public static class StreamingInfo { Collection<StreamingFacet> streamingFacets = new ArrayList<>(); /** * Manages the collection of all expressions needed for streaming facets */ ReductionCollectionManag...
A view looking down the Par 5, eighth hole of the newly opened King Robert the Bruce Course at Trump Turnberry Scotland on June 28. David Cannon/Getty Images This story was originally published by the New Republic and has been republished here with permission from Climate Desk. Last summer, just weeks after being cro...
/** * Processes {@link Summarize} operators. */ @TargetOperator(Summarize.class) public class SummarizeFlowProcessor extends RendezvousProcessor { @Override public ShuffleDescription getShuffleDescription( FlowElementDescription element, FlowElementPortDescription port) { Flow...
<reponame>joshprzybyszewski/cribbage package play import ( "errors" "github.com/joshprzybyszewski/cribbage/model" "github.com/joshprzybyszewski/cribbage/server/interaction" ) var ( ErrActionNotForGame error = errors.New(`action not for game`) ErrPlayerNotInGame error = errors.New(`player is not in this game`) ...
Management of neuropathic pain following traumatic brachial plexus injury with neurolysis and oral gabapentin: A case report Neuropathic pain responds poorly to common analgesics that effectively control nociceptive pain because its pathophysiology is different and it is usually associated with co-morbidities such as ...
/** A skill that extracts content from a file within the enrichment pipeline. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@odata.type") @JsonTypeName("#Microsoft.Skills.Util.DocumentExtractionSkill") @Fluent public final class DocumentExtractionSkill extends SearchIndexe...
/** * logic for the invite process of external subjects * @author mchyzer * */ public class InviteExternalSubjects { /** logger */ private static final Log LOG = LogFactory.getLog(InviteExternalSubjects.class); /** * invite external subjects * @param request * @param response */ ...
class Item: """Job queue item class""" def __init__(self, chunk_id, chunk_range, was_interrupted=False): self.chunk_id = chunk_id # chunk id to be downloaded self.chunk_range = chunk_range # chunk range to download from server self.was_interrupted = was_interrupted
// Copyright: 2020, <NAME>, Berlin, all rights reserved #pragma once #include <cstdint> #include <cstring> #include <iomanip> #include <iostream> #define DATAGRAM_SIZE 9 const int QUEUE_SIZE = 400000; #pragma pack(push,4) struct SPIDatagram { uint32_t control; uint32_t payload[DATAGRAM_SIZE-1]; // sets our va...
package org.ovirt.engine.ui.userportal.widget.extended.vm; import java.util.ArrayList; import java.util.Arrays; import org.ovirt.engine.ui.common.utils.ElementIdUtils; import com.google.gwt.cell.client.CompositeCell; import com.google.gwt.cell.client.HasCell; import com.google.gwt.dom.client.Element; import com.goog...
<filename>static-webp/src/main/java/com/facebook/webpsupport/WebpBitmapFactoryImpl.java<gh_stars>1-10 /* * Copyright (c) 2015-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additio...
// Make sure the search flags on the target editor match our settings tCIDLib::TVoid TSearchTab::SetSearchFlags(TSrcEditor& wndTar) { wndTar.SetSearchFlag(tCIDWUtils::EFindOpts::Case, m_pwndCase->bCheckedState()); wndTar.SetSearchFlag(tCIDWUtils::EFindOpts::PosixRE, m_pwndPosix->bCheckedState()); wndTar.Set...
Ovsynch based protocols in reproductive management and infertility treatment in dairy cows - when and why? In order to optimise reproductive performance and thus production, it is now impossible to control the reproduction of dairy cows without the use of hormones. Due to the characteristics of dairy cows, the use of ...
/** * * @author mtomono * @param <T> */ public class RangeSet<T> extends AbstractList<Range<T>> { public static Builder<Integer> intRanges = b(); public static Builder<Long> longRanges = b(); public static Builder<Double> doubleRanges= b(); public static Builder<BigDecimal> bdRanges= b(); public...
// NewClient creates a new client for all Datastore functionality // // If no options are given, it will use the defaultClientOptions() // ctx may contain a NewRelic txn (or one will be created) func NewClient(ctx context.Context, opts ...ClientOps) (ClientInterface, error) { client := &Client{options: defaultClientOp...
Effect of milking environment enrichment through music on production performance and behaviour in cattle Enrichment of milking environment through music has been proposed to help animals to cope with divergent stressors. In sight of the above, a study was conducted to evaluate the effect of Indian instrumental music-b...
""" NI ELVIS III Encoder Example This example illustrates how to read and decode signals from an encoder through the encoder channels on the NI ELVIS III. The program first defines the configuration for the encoder channels, and then reads the encoder channels in a loop. Each time the read function is called, a list of...
package com.mcarvalhor.apps.mediaconverter; import android.app.ProgressDialog; import android.content.ComponentName; import android.content.Context; import android.content.Intent; import android.content.ServiceConnection; import android.net.Uri; import android.os.Bundle; import android.os.Handler; import android.os.IB...
<gh_stars>10-100 """ A module for scheduling jobs Includes spawning, terminating, checking, and troubleshooting various jobs """ import datetime import itertools import logging import os import shutil import time from IPython.display import display from typing import List, Optional, Tuple, Union from arc import parse...
// This file is part of Eigen, a lightweight C++ template library // for linear algebra. // // Copyright (C) 2013 Christian Seiler <christian@iwakd.de> // // This Source Code Form is subject to the terms of the Mozilla // Public License v. 2.0. If a copy of the MPL was not distributed // with this file, You can obtain ...
package config import ( "encoding/json" "flag" "os" ) func Command() ([]string, bool) { if args := flag.Args(); len(args) > 0 { return args, false } return []string{command}, true } func Env(j string) []string { env := []string{} if j != "" { err := json.Unmarshal([]byte(j), &env) if err != nil { ...
<reponame>talarcon/Urho3D #pragma once #include "../Editor/EditorWindow.h" #include "../Math/Ray.h" #include "../UI/ImGuiElement.h" #include "../Graphics/CustomGeometry.h" namespace Urho3D { class CollisionPolygon2D; class EditorSelection; class EditorBrush; class URHO3D_API EditorGuizmo : public ImGuiElement { ...
<gh_stars>10-100 // This file is automatically created by Recurly's OpenAPI generation process // and thus any edits you make by hand will be lost. If you wish to make a // change to this file, please create a Github issue explaining the changes you // need and we will usher them to the appropriate places. package recu...
Let it rock, let it roll, Let the Bible Belt come and save my soul Fifty-eight-year old rock veteran John Mellencamp recorded his latest record live, in three different sacred spaces: a legendary studio (Sun Studios in Memphis), a hotel room in San Antonio (where blues legend Robert Johnson cut some epochal sides in 1...
package machinery import ( "os" "github.com/yoheimuta/go-protoparser/v4" "github.com/yoheimuta/go-protoparser/v4/parser" ) func ParseProto(filename string) (*parser.Proto, error) { f, err := os.Open(filename) if err != nil { return nil, err } return protoparser.Parse(f, protoparser.WithFilename(filename)) }...
def _ast_leftovers(): ast_classes = {v for v in vars(ast).values() if isinstance(v, type) if issubclass(v, ast.AST) if v is not ast.AST} expr_ctxs = {ast.Load, ast.Store, ast.AugStore, ast.AugLoad, ast.Param} top_nodes = {ast.Module, ast.Expression, a...
<reponame>solxnp/boomer<gh_stars>1-10 package main import ( "log" "time" "github.com/myzhan/boomer" ) func foo() { start := time.Now() time.Sleep(100 * time.Millisecond) elapsed := time.Since(start) // Report your test result as a success, if you write it in python, it will looks like this // events.request...
package directive; import com.jfinal.aop.Inject; import com.jfinal.template.Env; import com.jfinal.template.io.Writer; import com.jfinal.template.stat.Scope; import io.jboot.db.model.Columns; import io.jboot.web.directive.annotation.JFinalDirective; import io.jboot.web.directive.base.JbootDirectiveBase; import io.jpre...
def fromarrays(arraylist, dtype=None, shape=None, formats=None, names=None, titles=None, aligned=False, byteorder=None, fill_value=None): datalist = [getdata(x) for x in arraylist] masklist = [np.atleast_1d(getmaskarray(x)) for x in arraylist] _array = recfromarrays(datalist, ...
/** * @return The current exchange name from the configuration */ public static JLabel newCurrentExchangeName() { String exchangeName = ExchangeKey.current().getExchangeName(); return newLabel(MessageKey.EXCHANGE_RATE_PROVIDER, exchangeName); }
<reponame>usagizmo/nextjs-tailwind<filename>apps/web/src/pages/_app/components/Layout/RouteTransition/usePageTransition/getTimeline/getTimelineDefault.ts import { gsap } from 'gsap' export const getTimelineDefault = ( prevNode: HTMLElement, node: HTMLElement ) => { return gsap .timeline() .to( prev...
/** * Inserts an entity into the specified table * * @param entity Entity model which extends BaseModel * @param entityTable JOOQ table * @return Mono<R> Inserted entity model with its ID */ public Mono<R> insert(R entity, Table<Y> entityTable) { var record = new Up...
Grassley said during a Judiciary Committee business meeting on Thursday that the panel would not vote on Stephen Boyd's nomination to be assistant attorney general for legislative affairs because the Justice Department hasn't responded to more than a dozen letters. "The department needs to improve its communications w...
The cosmic carbon footprint of massive stars stripped in binary systems The cosmic origin of carbon, a fundamental building block of life, is still uncertain. Yield predictions for massive stars are almost exclusively based on single star models, even though a large fraction interact with a binary companion. Using the...
def make_future_dataframe(self, period=30, frequency="D", include_history=True): max_date_observed = self.history[self.__time_col].max() date_range = pd.date_range(start=str(max_date_observed), periods=period+1, freq=frequency) date_range = date_range[1:] future_df = pd.DataFrame({self._...
<filename>module-maestro/src/models/FilesModel.ts const mongoose = require('mongoose') const File = new mongoose.Schema({ title: { type: String, required: true }, path: { type: String, required: true } }, { timestamps: true, toObject: { virtuals: true}, ...
Hematopoietic Stem Cells Are Uniquely Selective in Their Migratory Response to Chemokines Although hematopoietic stem cell (HSC) migration into and out of sites of active hematopoiesis is poorly understood, it is a critical process that underlies modern clinical stem cell transplantation and may be important for norma...
//===-- StringPrinter.cpp -------------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===---------------------------...
def eval_masks_average(args): scores = [] for vid in VIDEO_IDS: path_metrics = os.path.join("results", args.exp, vid, 'masks', 'metrics.txt') with open(f'results/rel/{vid}/masks/metrics.txt') as f: lines = f.readlines() score_map, score_psnr = [float(s) for s in lines[2]....
// The MIT License (MIT) // // Copyright (c) 2015-2017 CERN // // Author: <NAME> // // 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...
<reponame>ehaliewicz/PortalView<gh_stars>10-100 #ifndef THING_H #define THING_H #include <genesis.h> typedef struct { s16 x; s16 y; u16 angle; u16 type; u16 flags; } thing; #endif
/** * Parses lines of a CSV file. Addresses columns by their column headline. It is assumed that the first line in file is * the head-line. For any values to be parsed the {@link #setValueNames(java.util.Set)} has to be called with the names * of the columns which should be parsed (the time is stored in an extra fie...
/** * Asks the bus to return its globally unique ID, as described in the * D-Bus specification. For the session bus, this is useful as a way * to uniquely identify each user session. For the system bus, * probably the bus ID is not useful; instead, use the machine ID * since it's accessible without necessaril...
/** * Checks that the number of Spark instructions that the current test case has executed (as opposed to compiling * into the execution plan) is equal to the expected number. Generates a JUnit error message if the number is out of * line. * * @param expectedNumExecuted number of Spark instructions that the c...
// GetR2H Return RabbitMQ to HTTP Config func GetR2H() Rabbit2http { if !r2HLoaded { load("./config/rabbit2http.json", &rabbit2http) r2HLoaded = true } return rabbit2http }
/** * Returns a collection of strings representing each entry in a Zip file. */ public static List<String> zipEntries(InputStream in) { List<String> result = new ArrayList<>(); try (ZipInputStream zip = new ZipInputStream(in)) { ZipEntry entry = zip.getNextEntry(); whil...
<filename>src/api/identities.rs<gh_stars>1-10 use crate::api::Error; #[derive(Debug, serde::Deserialize)] #[serde(rename_all = "camelCase")] crate struct Identity { crate peer_id: String, crate urn: String, crate shareable_entity_identifier: String, crate metadata: Metadata, crate avatar_fallback: ...
def flash(self,dur=1.0,isi=0.1): LED_state = self.LED.read() flash_time = datetime.datetime.now() flash_duration = datetime.datetime.now() - flash_time while flash_duration < datetime.timedelta(seconds=dur): self.LED.toggle() utils.wait(isi) flash_dura...
/** * A subject context that extends the default, but does not have session support enabled. */ public class StalessSubjectContext extends DefaultSubjectContext { public StalessSubjectContext(SubjectContext ctx) { super(ctx); } public StalessSubjectContext() { } @Override public Sess...
import type { ServerRequest } from "./depends.ts"; import JSONHandler from "./_handlers/json.ts"; import PlaintextHandler from "./_handlers/plaintext.ts"; export interface Handler { (request: ServerRequest): Promise<void>; } export interface Handlers { [index: string]: Handler; } export default { "/json": JSON...
This is an old web browser game. If your web browser doesn't run Flash Player games anymore, you can download this game and play it offline with a standalone Flash Player (included in the zip file). Download giab-old-games.zip Controls the basics: click on spell buttons to select them drag gems to move, throw or co...
<reponame>jsonxr/react-native-materialcommunity-icons // svg/dice-d10-outline.svg import { createSvgIcon } from './createSvgIcon'; export const SvgDiceD10Outline = createSvgIcon( `<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dt...
// Copyright Fuzamei Corp. 2018 All Rights Reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package types import "errors" var ( // ErrNoTicket error type ErrNoTicket = errors.New("ErrNoTicket") // ErrTicketCount error type ErrTicketCoun...
<gh_stars>1-10 /** * Copyright (c) <NAME> https://flsilva.com * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ import { calculateRippleDiameter } from './calculateRippleDiameter'; import { calculateRipplePosition } from './calculateRi...
<reponame>midoks/hammer // +build !notfastpath // Copyright (c) 2012-2018 <NAME>. All rights reserved. // Use of this source code is governed by a MIT license found in the LICENSE file. // Code generated from mammoth2-test.go.tmpl - DO NOT EDIT. package codec // Increase codecoverage by covering all the codecgen pa...
Light flashes delivered to one aggregate of cells evoked increased photon emission in another aggregate of cells maintained in the dark in another room if both aggregates shared the same temporospatial configuration of changing rate, circular magnetic fields. During the presentation of the same shared circumcerebral ma...
import * as React from 'react'; import { Formik, FormikProps } from 'formik'; import { RouteComponentProps, withRouter } from 'react-router'; import { ResetPasswordWithToken, ResetPasswordWithTokenVariables } from './__generated__/ResetPasswordWithToken'; import { Button } from '@hydrokit/button'; import { FormField ...
import type { Rate, u, UST } from '@anchor-protocol/types'; import big, { Big } from 'big.js'; export function computeLtv( borrowLimit: u<UST<Big>>, borrowedAmount: u<UST<Big>>, ): Rate<Big> { if (borrowLimit.lte(0)) { return big(0) as Rate<big>; } return borrowedAmount.div(borrowLimit) as Rate<big>; }
package generate_sp import ( "github.com/swamp/assembler/lib/assembler_sp" decorated "github.com/swamp/compiler/src/decorated/expression" ) type Context struct { constants *assembler_sp.PackageConstants scopeVariables *assembler_sp.ScopeVariables stackMemory *assembler_sp.StackMemoryMapper inFunction ...
<reponame>guidovranken/zrnt package epoch_processing import ( . "github.com/protolambda/zrnt/eth2/beacon" ) func ProcessEpochJustification(state *BeaconState) { previousEpoch := state.PreviousEpoch() currentEpoch := state.Epoch() // epoch numbers are trusted, no errors previousBoundaryBlockRoot, _ := state.GetB...
import { PluginsSettings } from './settings' export interface ISerializedSVG { name: string id: string svg: Uint8Array } export interface IGlobalSettings { userId: string settings: PluginsSettings totalSaved: number version: number }
/** * Timestamper worker is responsible for creating timestamps. */ @Slf4j @RequiredArgsConstructor public class TimestamperWorker extends UntypedActor { private final List<String> tspUrls; @Override public void onReceive(Object message) throws Exception { log.trace("onReceive({})", message.getC...
def gconnect(): if (request.args.get('next')): login_session['next'] = request.args.get('next') if (app.testing): secret_file = request.args.get('secret') access_token_uri = 'http://localhost:5000/test' access_token_uri += '/check_token?id=' + request.args.get('id') acces...
//TO CHANGE THE WORLD #include <bits/stdc++.h> using namespace std; #define L first #define R seoncd #define mp make_pair #define pb push_back typedef long long ll; const int maxn=1e5+10; bool mark[maxn]; int cnt[maxn], n, m; int main() { ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0); cin>>n>>m; ...
<reponame>muXxer/goshimmer package gossip import ( "strconv" "sync" "github.com/iotaledger/goshimmer/packages/errors" "github.com/iotaledger/goshimmer/packages/events" "github.com/iotaledger/goshimmer/packages/network" ) // region constants and variables /////////////////////////////////////////////////////////...
/** * Base class for iterative activities. * * @author Fernando Esteban Barril Otero */ public abstract class IterativeActivity<T extends Weighable<T>> extends AbstractActivity<T> { /** * The config key for the maximum number of iterations. */ public final static ConfigKey<Integer> MAX_IT...
<gh_stars>0 # The following libraries need to be installed: #sudo apt-get install ffmpeg #pip install moviepy[options] # Author: <NAME> # Date: 2/12/2018 # This program selects pictures within a date range, then selects one per day and converts them to a GIF from moviepy.editor import ImageSequenceClip import cv2 imp...
/** * Calculating automorphism group of an atomcontainer, * then setting the permutations for the open sites. * @param ac IAtomContainer * @return ArrayList<Permutation> * @throws CloneNotSupportedException * @throws CDKException * @throws IOException */ public static ArrayList<Permutation> auto...
package com.theastrologist.core; import com.theastrologist.domain.Degree; import com.theastrologist.domain.SkyPosition; import org.apache.log4j.Logger; import org.joda.time.DateTime; import swisseph.*; public class ThemeCalculator { private static final Logger LOG = Logger.getLogger(ThemeCalculator.class); privat...
{-# LANGUAGE RecordWildCards #-} parseArgs = Args { equalProb = E `elem` opts , .. }
<reponame>emer/iv #ifdef HAVE_CONFIG_H #include <../../config.h> #endif /* * Copyright (c) 1987, 1988, 1989, 1990, 1991 Stanford University * Copyright (c) 1991 Silicon Graphics, Inc. * * Permission to use, copy, modify, distribute, and sell this software and * its documentation for any purpose is hereby granted ...
def noam_decay(base_lr, global_step, warmup_steps=4000, min_lr=1e-4): step_num = global_step + 1. lr = base_lr * warmup_steps ** 0.5 * np.minimum(step_num ** -0.5, step_num * float(warmup_steps) ** -1.5) if global_step >= warmup_steps: lr = max(min_lr, lr) return lr
def manifest(self): data_item_manifest_url = self._admin_url + '/data/items' + self.datapath + "/manifest" params = { 'f': 'json', } res = self._portal.con.post(data_item_manifest_url, params, verify_cert=False) return res
//Used every game tick to process user input and update the score and LEDs void update() { button.update(); if(button.down()) { if(leds.get(randLed)) { leds.off(randLed); leds.on(3); scoreFlashTime = millis() + HITLEDTIME; randTime = millis()...
/* ISC license. */ #include <errno.h> #include <skalibs/genset.h> #include <skalibs/avlnode.h> #include <skalibs/avltreen.h> int avltreen_delete (avltreen *t, void const *k) { unsigned int r = avltreen_root(t) ; unsigned int i = avlnode_delete(avltreen_nodes(t), avltreen_totalsize(t), &r, k, t->dtok, t->kcmp, t->...
Just in time for the holiday season, Oreo cookie maker Mondelez International is releasing a candy bar that incorporates the beloved crunchy vanilla-creme cookie and European milk chocolate. The 10.5-ounce Milka Oreo Big Crunch Chocolate Candy Bar hit the candy aisles of Wal-Mart, Kroger, ShopRite and Albertsons store...
// addAnyUIDToServiceAccount adds the capability to run as 1000 for nginx or other special IDs. For example, the binaryscanner // needs to run as root and we plan to add that into protoform in 2.1 / 3.0. func (hc *Creater) addAnyUIDToServiceAccount(createHub *v1.HubSpec) error { if hc.osSecurityClient != nil { log....
/** * Indicates a {@link StreamFeature} has just been negotiated. */ public static class FeatureNegotiatedEvent extends EventObject { private final StreamFeature feature; public FeatureNegotiatedEvent(final HandshakerPipe source, final StreamFeature feature) { sup...
// renderStringTreeBetween returns a string representing the given tree between the given rows. Since each node // is rendered on its own line, the returned string shows the visible nodes not affected by a collapsed parent. func (tree *FileTree) renderStringTreeBetween(startRow, stopRow int, showAttributes bool) string...
#!/usr/bin/env python from ciscoconfparse import CiscoConfParse def main(): cisco_file = 'pynet-rtr1.txt' cisco_cfg = CiscoConfParse(cisco_file) interfaces = cisco_cfg.find_objects(r"^interface") for interface in interfaces: print print interface.text for child in interface.ch...
/// Return the builtin Native functions that come with Hatter. pub(crate) fn natives() -> HashMap<String, Rc<Native>> { let mut map: HashMap<String, Rc<Native>> = HashMap::new(); macro_rules! native { ($name:expr => $fn:expr) => { map.insert($name.to_string(), rc!($fn)); }; } ...
#include <bits/stdc++.h> #define gl(x) getline(cin,x) #define gc(x) cin.get(x) #define sz(x) (int)(x.size()) #define al(x) (x).begin(),(x).end() #define ms(a,b) memset(a,b,sizeof(a)) #define sp ' ' #define nl '\n' #define fi first #define se second #define lsb(x) ((x)&(-x)) using namespace std; template<class...A>void ...
import java.util.ArrayList; /** * A pile of playing cards (of variable size). */ public class Pile { private ArrayList<Card> cards; /** * Constructs an empty pile of cards. */ public Pile() { this.cards = new ArrayList<Card>(); } /** * Adds a card to the bottom of the pi...
package manager import ( "time" "github.com/Sirupsen/logrus" "gopkg.in/mgo.v2" "gopkg.in/mgo.v2/bson" "strings" "github.com/bearded-web/bearded/models/user" "github.com/bearded-web/bearded/pkg/fltr" "github.com/bearded-web/bearded/pkg/utils" ) const AgentEmail = "<EMAIL>" type UserManager struct { manage...
<reponame>yuki216/minipos package paginator type Meta struct { Page int `json:"page"` RowPerPage int `json:"row_per_page"` NextPage bool `json:"next_page"` PreviousPage bool `json:"previous_page"` } func (meta *Meta) BuildMeta(dataLength int, page int, rowPerPage int) { rowPerPage = rowPerPage -...
// // ColorPick_OnMouseMove // // Track the mouse to see if it is over any of our colors. // void ColorPick_OnMouseMove(PCOLORPICKSTATE pcps, HWND hwnd, int x, int y) { int iSel; if (x >= 0 && x < CXFAKEMENU && y >= 0 && y < ARRAYSIZE(c_rgclrPredef) * CYCOLOR) { iSel = y / CYCOLOR...
/** * Mixing directly into another mod's code is pretty gross, but I believe it's better to have things break loudly (like * through mixins) rather than silently (like through re-implementation and reflection). */ @Mixin(PipeFlowItem.class) @SuppressWarnings("unused") public class PipeFlowItemMixin { @Inject(met...
import { h, Component } from 'preact'; import { StateSelector } from '../selector/StateSelector'; import { LayoutPrefs } from './LayoutPrefs'; import { Renderer } from './interface'; import { UIRouter } from '@uirouter/core'; import { ChevronDown } from './icons/ChevronDown'; import { Close } from './icons/Close'; imp...
""" convenience wrappers for lazyflow classes """ import logging import threading import h5py from .abcs import Buildable from lazyflow.operator import Operator as _Operator from lazyflow.operator import InputSlot, OutputSlot from lazyflow.graph import Graph from lazyflow.rtype import SubRegion from lazyflow.operat...
/* * Record entry into an extended quiescent state. This is only to be * called when not already in an extended quiescent state. */ static void rcu_dynticks_eqs_enter(void) { struct rcu_data *rdp = this_cpu_ptr(&rcu_data); int seq; seq = atomic_add_return(RCU_DYNTICK_CTRL_CTR, &rdp->dynticks); WARN_ON_ONCE(IS_E...
import { History } from "history"; import * as React from "react"; import { generatePath, RouteComponentProps } from "react-router"; import { FormAddressType, OverlayContext, OverlayContextInterface, OverlayTheme, OverlayType, ShippingAddressForm } from "../../../components"; import { FormError } from "../...
/** * Unmarshals a property from a plain-text vCard. * @param value the value as read off the wire * @param dataType the data type of the property value. The property's VALUE * parameter is used to determine the data type. If the property has no * VALUE parameter, then this parameter will be set to the proper...
class AutoType: """Emulate keyboard and automatically type strings and keys""" _tools = { 'x11': ['xdotool'], 'wayland': ['sudo ydotool'] } def __init__(self): self._exec = init_executable(self._tools) self._logger = ProjectLogger().get_logger() def string(self, st...
<gh_stars>1-10 // Copyright 1998-2017 Epic Games, Inc. All Rights Reserved. #include "HTTPTransport.h" #if ENABLE_HTTP_FOR_NF #include "Serialization/BufferArchive.h" #include "NetworkMessage.h" #if PLATFORM_HTML5 #include "HTML5JavaScriptFx.h" #include <emscripten/emscripten.h> #endif FHTTPTransport::FHTTPTransp...
/*************************************** * Default implementation that invokes {@link #validate(Object)}. * * @see Function#apply(Object) */ @Override default public ValidationResult apply(T rValue) { return validate(rValue); }