content
stringlengths
10
4.9M
THE ESSENCE AND TYPES OF TOOLS FOR ECONOMIC PROTECTION OF THE ENTERPRISES IN INTERNATIONAL ACTIVITY Purpose. The action of the tools for economic protection of the enterprise is aimed at ensuring the state of economic security, characterized by the absence of threats to the external and internal environment. In the co...
/** * This a utility class that wraps a criterion, a name and a description. * The Criterion object cannot store a name or a description because of the * optimization process (which does not create a new Object for each new Criterion). */ public class CriterionWrapper { private String name, description; private ...
// keyForItem returns Key or nil if not recognized as a key. func keyForItem(item *keyring.Item) (Key, error) { switch item.Type { case string(X25519): return AsX25519Key(item) case string(X25519Public): return AsX25519PublicKey(item) case string(EdX25519): return AsEdX25519Key(item) case string(EdX25519Publ...
Hypnosis is a set of effective communication techniques for shaping one’s beliefs, attitudes, thought-patterns, and behaviors. Often these communication techniques take advantage of direct or indirect suggestions, of which a participant may accept or deny, depending on their own free will or “condition of suggestibilit...
import { compact } from 'lodash'; import { AggregationOperator, Relation, RelationSide, RootEntityType } from '../../model'; import { AddEdgesQueryNode, AggregationQueryNode, BasicType, BinaryOperationQueryNode, BinaryOperator, BinaryOperatorWithAnalyzer, ConcatListsQueryNode, Conditiona...
/** * Parse media position parameter strings. */ static final class MediaPositionParser { private MediaPositionParser() { } static final Parser<Double> number = token(Parsers.dbl); static final Parser<MediaPosition> seconds = number.bind(new Fn<Double, Parser<MediaPosition>>() { @Override p...
Wave-packet formation at the zero-dispersion point in the Gardner-Ostrovsky equation. The long-time effect of weak rotation on an internal solitary wave is the decay into inertia-gravity waves and the eventual emergence of a coherent, steadily propagating, nonlinear wave packet. There is currently no entirely satisfac...
<filename>packages/theme/src/styles/toast.ts import { createStyles } from "@material-ui/core/styles"; // Custom. import VoTheme from "../index"; export const stylesToast = createStyles({ "@global": { ".Toastify__toast--default": {}, ".Toastify__toast--info": { background: VoTheme.palette.primary.main,...
def decode_many(cls: Type[T], session: Session, data: Any) -> List[T]: if not isinstance(data, list): raise UnexpectedResponseType(data, list) def decode(obj: Any) -> T: if not isinstance(obj, dict): raise UnexpectedResponseType(obj, dict) user = cls( ...
<reponame>modest/framerx-js-lib<filename>src/utils/observable.ts<gh_stars>1-10 import { Animatable, isAnimatable } from "../animation/Animatable" export function getObservableNumber( value: number | Animatable<number> | null | undefined, defaultValue: number = 0 ): number { if (!value) { return def...
History lessons offered on Clearing, Garfield Ridge Visitors to the Clearing Branch Library, 6423 W. 63rd Place, enjoyed a fun jaunt down memory lane Monday night during a slide show presentation celebrating “100 Years of Clearing and Garfield Ridge” and the regions’ annexation to the city of Chicago in 1915. Clear-Ri...
<filename>libnaucrates/src/parser/CParseHandlerScalarPartBound.cpp //--------------------------------------------------------------------------- // Greenplum Database // Copyright (C) 2014 Pivotal, Inc. // // @filename: // CParseHandlerScalarPartBound.cpp // // @doc: // Implementation of the SAX parse handler class f...
#include<iostream> #include<algorithm> #include<cstdio> #define N 100001 using namespace std; int a[N],b[N],c[N][2],d[N]; int p,n,m,t,fip,ans,top; long long gcd(long long x,long long y){ return !y?x:gcd(y,x%y); } int calc(int x,int y,int MOD){ static int s; s=1; while (y){ if (y&1)s=(long long)s*x%MOD; x=(long ...
package v1alpha2 import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) // NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized. // NOTE: The +listType=set marker are required by OpenAPI generation for list types. const ( // StackDesiredStateActive represents ...
// Write implements io.Writer func (rw *RotateWriter) Write(p []byte) (n int, err error) { rw.writeMutex.Lock() defer rw.writeMutex.Unlock() if rw.file == nil { return 0, fmt.Errorf("Error: no file was opened for work with") } if rw.IsBuffered { n, err = rw.bufferedOut.Write(p) rw.lastWriteTime = time.Now() ...
<reponame>CodeWicky/DWKit // // DWCameraManagerViewController.h // DWCameraManager // // Created by Wicky on 2020/6/22. // Copyright © 2020 Wicky. All rights reserved. // #import <UIKit/UIKit.h> #import "DWCameraManager.h" NS_ASSUME_NONNULL_BEGIN @interface DWCameraManagerViewController : UIViewController<DWCame...
// todo - Widget should only be a template. We are installing a single instance. public WidgetInstance fork(ServerNode server, Widget widget) { File unzippedDir = null; File recipeDir = null; Recipe recipe = null; Recipe.Type recipeType = null; try { String recipeURL ...
package routes import ( "go-auth-api-sample/controllers" "github.com/gofiber/fiber/v2" ) func SetupPublicAuthRoutes(app *fiber.App) { app.Post("/api/register", controllers.Register) app.Post("/api/login", controllers.Login) } func SetupAuthRoutes(app *fiber.App) { app.Post("/api/logout", controllers.Logout) a...
ST. ALBANS, Vt. (AP) — A group that seeks to reunite lost Purple Hearts with service members or their descendants is embarking on an ambitious project: to return 100 such medals or certificates earned in World War I before the 100th anniversary next April of the United States’ entry into the conflict. Zachariah Fike, ...
class PdfPrinter: """A wrapper class around pdfkit functionality to print html to pdfs""" @staticmethod def from_file(infile, outfile): options = { "page-size": "Letter", "dpi": "96", "margin-top": "1in", "margin-right": "1.25in", ...
/** * The ImmutableClassBuilder is responsible for handling Immutable classes as a bind destination for Configs */ @ApplicationScoped @Priority(1) public class ImmutableClassBuilder implements ConfigClassBuilder { private static final Set<String> sIgnorableBuilderMethods; static { Set<String> builder = new Hash...
<gh_stars>0 import * as types from './types'; import { IStationSubNameState } from './types'; import { ISatationSubNameItem, IStationQueryResponseState } from './models'; import createReducer from '../../lib/createReducer'; import { addUniqueValueToObject } from '../../utils/objectUtilis'; // const initialState: ISe...
// Concrete Mediator 1 class PublicRoom extends ChatRoom { PublicRoom(String nm){ name = nm; } public void send(String from, String to, String message) { Chatter c; for(int i=0; i<chatters.size(); i++){ c = (Chatter) chatters.get(i); if(c.getName().equals(to)){ c.receive(from, message)...
<filename>server/web/controller/filesystem_controller.go package controller import ( "net/http" "github.com/bitwormhole/gie/server/service" "github.com/bitwormhole/gie/server/web/vo" "github.com/bitwormhole/starter-gin/glass" "github.com/bitwormhole/starter/markup" "github.com/gin-gonic/gin" ) // F...
<reponame>hwipl/service-proxy<filename>internal/pserver/portrangelist_test.go package pserver import ( "reflect" "testing" "github.com/hwipl/service-proxy/internal/network" ) func TestPortRangeListAddRange(t *testing.T) { var got, want []string var ports portRangeList var test = func() { got = []string{} f...
<reponame>CSCfi/sd-filesystem package api import ( "bytes" "encoding/json" "errors" "fmt" "io" "net/http" "reflect" "strings" "testing" ) type mockConnecter struct { sTokens map[string]sToken projects []Metadata projectsErr error } func (c *mockConnecter) getProjects(string, string) ([]Metadata, e...
#ifndef EUCLID__MDD_H #define EUCLID__MDD_H 1 #include "utils.h" #include "command.h" #include "mdx.h" #define MD_ENTITY_NAME_BYTSZ 62 #define META_DEF_DIMS_FILE_PATH "/meta/dims" #define META_DEF_MBRS_FILE_PATH "/meta/mbrs" #define MEASURE_DIM_COMM_NAME "measure" typedef long md_gid; typedef struct _stct_dim_ { ...
/** * Tag for creating multiple &lt;select&gt; options for displaying a list of * country names. * * <p> * <b>NOTE</b> - This tag requires a Java2 (JDK 1.2 or later) platform. * </p> * * @author Jens Fischer, Matt Raible * @version $Revision$ $Date$ * * @jsp.tag name="country" bodycontent="empty" */ publ...
The results of a study conducted with the use of Wim Hof method suggest that a person can learn to consciously control their immune responses. Wim Hof is a Dutch world record holder who is famous worldwide for his ability to resist cold. For this incredible invulnerability to cold, he was commonly nicknamed “the Icema...
Following the transfer of Radamel Falcao to Manchester United, Liverpool legend Phil Thompson has come out stating that Arsenal fans should be ‘worried’ after missing out on signing the Colombian striker. The former English footballer said that Falcao would have perfectly fitted in Arsenal’s style of play and was a mu...
/** * @author Johan Hall * */ public abstract class Algorithm { protected DependencyParserConfig manager; protected ClassifierGuide classifierGuide; protected ParserState parserState; protected ParserConfiguration currentParserConfiguration; protected boolean diagnostics = false; protected BufferedWri...
Nigel Farage, the sometime leader of red-faced dreadful man party UKIP, is probably being a twat somewhere, it has emerged. Having been several days since he was last able to stand in front of a camera and spill out whatever hate-filled, bile-strewn nonsense that has just popped into his head, his whereabouts and acti...
package defaults func String(strs ...string) string { for _, str := range strs { if str != "" { return str } } return "" }
#include "RobotInfo.hpp" const char *const RobotInfo::TypeName[] = { "rUnknown", "rBlue", "rRed" };
#!/usr/bin/env python # CREATED BY <NAME> # INTEGRATIVE BIOINFORMATICS, NIEHS import argparse from TSScall import writeBedHeader def printBedEntry(entry, OUTPUT): OUTPUT.write('{}\t{}\t{}\t{}\t{}\t{}\n'.format( entry['chromosome'], str(int(entry['position'])-1), entry['position'], ...
from math import floor, ceil N = int(input()) A = [] for i,a in enumerate(input().split()): A.append(int(a)-(i+1)) A.sort() if N % 2 : print(-1*sum(A[:N//2]) + sum(A[N//2+1:])) else: print(-1*sum(A[:N//2]) + sum(A[N//2:]))
def _read_handshake_post_dh(self, shared_secret, other_pubkey, data): self.shared_secret = shared_secret log_prefix = "obfs3:_read_handshake_post_dh()" log.debug("Got public key: %s.\nGot shared secret: %s" % (repr(other_pubkey), repr(self.shared_secret))) self.send_cry...
#pragma once #include "Core/SurfaceBehavior/SurfaceOptics.h" #include <memory> namespace ph { /* An ideal absorber absorbs any incoming energy. Pretty much resembles a black hole under event horizon. */ class IdealAbsorber : public SurfaceOptics { public: IdealAbsorber(); ESurfacePhenomenon getPhenomenonOf(Sur...
// validateBottlerocketSettings validates the supplied Kubernetes settings to ensure fields related to bootstrapping // and fields available on the ManagedNodeGroup object are not set by the user. func validateBottlerocketSettings(kubernetesSettings map[string]interface{}) error { clusterBootstrapKeys := []string{"clu...
import test from "ava"; import { registerHooks, SUPER_ADMIN_AUTH_STRING } from "../../util"; import { ClientAction, ClientContext, createV2AuthXScope, UserAction, UserContext } from "@authx/authx/dist/util/scopes"; const ctx = registerHooks(__filename); test("Fetch users with limited read scope and page", a...
<gh_stars>1-10 import { Observable } from "../src/Observable"; import { Computed } from "../src/Computed"; import { IsTracking } from "../src/DependencyTracking"; let mockObserver: jest.Mock; beforeEach(() => { mockObserver = jest.fn(); }); test("Should handle value generators that sometimes throw string errors", (...
package pkg import ( bosherr "github.com/cloudfoundry/bosh-utils/errors" boshcmd "github.com/cloudfoundry/bosh-utils/fileutil" boshsys "github.com/cloudfoundry/bosh-utils/system" boshman "github.com/nttrpf/bosh-cli/release/manifest" . "github.com/nttrpf/bosh-cli/release/resource" ) type ArchiveReaderImpl struct...
def save_weights_file(self, file_path, file_name): path = join(file_path, "{}.h5".format(file_name)) self._cnn_model.save_weights(path)
// convert .bc bytecode to .c source code (microcontroller include) #include <stdlib.h> #include <stdio.h> #include <assert.h> #include "bcx.h" int main(int argc, char*argv[]) { assert(argc==3); FILE *in = fopen(argv[1],"rb"); FILE *out = fopen(argv[2],"wb"); Cp = fread(M,1,Msz,in); assert(Cp); fprintf(out,"#...
<reponame>Ankr-network/btrfs package btrfs import ( "errors" "fmt" ) type ErrNotBtrfs struct { Path string } func (e ErrNotBtrfs) Error() string { return fmt.Sprintf("not a btrfs filesystem: %s", e.Path) } // Error codes as returned by the kernel type ErrCode int func (e ErrCode) Error() string { s, ok := err...
<reponame>satnath/tesseractindic<filename>ccmain/tfacepp.cpp /********************************************************************** * File: tfacepp.cpp (Formerly tface++.c) * Description: C++ side of the C/C++ Tess/Editor interface. * Author: <NAME> * Created: Thu Apr 23 15...
for _ in range(int(input())): q=list(input().split(' ')) w=list(input().split(' ')) for i in range(len(q)): q[i]=int(q[i]) w[i]=int(w[i]) q.sort() w.sort() if q[1]==w[1]==(q[0]+w[0]): print('YES') else: print('No')
<reponame>mehrdad-shokri/retdec<gh_stars>1000+ /** * @file tests/bin2llvmir/optimizations/x87_fpu/x87_fpu.cpp * @brief Tests for the @c X87FpuAnalysis. * @copyright (c) 2019 Avast Software, licensed under the MIT license */ #include "bin2llvmir/utils/llvmir_tests.h" #include "retdec/bin2llvmir/optimizations/x87_fpu/x8...
Comparative analysis of DWT and WPT for current signal analysis Squirrel Cage Induction Motor (SCIM) is the most impotent tool for energy conversion and industry applications, with increased utilities due to power electronic drive system introduction. Discrete Wavelet Transform (DWT) gives a superior idea about the va...
<reponame>ysoyipek/Arduino // // FILE: AnalogKeypad.cpp // AUTHOR: <NAME> // VERSION: 0.1.2 // DATE: 2019-01-31 // PURPOSE: Class for analog keypad // // HISTORY: // 0.1.0 - 2019-01-31 initial version // 0.1.1 - 2019-02-01 add pressed() event() last() // 0.1.2 - 2019-02-01 refactored rawRead(), first stable vers...
""" footing.update ~~~~~~~~~~~~~~ Updates a footing project with the latest template """ import json import os import shutil import subprocess import tempfile import textwrap import cookiecutter.main as cc_main import cookiecutter.vcs as cc_vcs import footing.check import footing.constants import footing.forge impor...
from dash.dependencies import Input, Output, State from app import app from carrotlayout import * import carrotmysql @app.callback(Output('tabs-content', 'children'), [Input('tabs', 'value')]) def render_content(tab): if tab == 'loss': return loss_display() elif tab == 'accuracy': ...
// Copyright 2020 The jackal 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 required by applicable law or agreed...
/** * Creates the preference page hierarchy. * * @return the preference manager */ public PreferenceManager createPreferencePageHierarchy() { PreferenceManager preferenceManager = new PreferenceManager(); preferenceManager.addToRoot(getGeneralNode()); preferenceManager.addToR...
def _check_locked_users(self, users: list) -> None: locked_users = [] for username in users: try: pw_policy = self._client.pwpolicy_show(user=username) user_status = self._client.user_status(username, all=True) except NotFound as err: logging.error("password policy find error: %s", err) contin...
def generate_midi_files_report(self) -> FileReport: tempos = [] keys = [] max_pitchs = [] min_pitchs = [] for pm in self.pms: tempos.append(pm.estimate_tempo()) key = pm.key_signature_changes[0].key_number keys.append(key) min_pitch...
// // MVPCoredataInput.h // mvc-base // // Created by 张超 on 2018/12/22. // Copyright © 2018 orzer. All rights reserved. // #import <UIKit/UIKit.h> #import "MVPBaseMiddleware.h" #import "MVPOutputProtocol.h" NS_ASSUME_NONNULL_BEGIN @class NSManagedObject; @protocol MVPModelProtocol,NSFetchRequestResult; @interface ...
<filename>Cells/Cell.py class Cell: Normal = 'Normal' Teleporter = 'Teleporter' Clue = 'Clue' HealPoint = 'HealPoint' Beast = 'Beast' def __init__(self, coordinates, guardian_present=[], neighbour_cells=[], cell_type=Normal): self.__coordinates = coordinates self.__guardian_pres...
He was known as the Bear Man of Dushanbe. An old man with a bushy white beard and his bear, Maria, were a regular fixture in the Tajik capital for the over 20 years, strolling along streets, posing for photos, even riding public transport. Now Tajik social media users want to raise money to build a statue of "bear ma...
<filename>simple-example/src/test/java/de/hda/simple_example/container/FailingCallAdapter.java package de.hda.simple_example.container; import java.io.IOException; import okhttp3.Request; import retrofit2.Call; import retrofit2.Callback; import retrofit2.Response; /** * Created by Andy on 16.12.2016. */ public a...
/// Copyright (C) 2003 <NAME> /// Copyright (C) 2010 Dependable Systems Laboratory, EPFL /// Copyright (C) 2016 Cyberhaven /// Copyrights of all contributions belong to their respective owners. /// /// This library is free software; you can redistribute it and/or /// modify it under the terms of the GNU Library Gene...
Signup to receive a daily roundup of the top LGBT+ news stories from around the world American schools have been warned to stop censoring educational lesbian, gay, bisexual and transgender websites. The American Civil Liberties Union has written to school districts in Missouri and Michigan to warn that filtering such...
package com.ef.service.util; import com.ef.entity.*; import java.time.LocalDateTime; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Objects; import java.util.stream.Collectors; import java.util.stream.Stream; import org.apache.commons.httpclient.HttpStatus; import org.s...
// set how zero values in topologies should be colored // (white or minimal color) // void SystemTopology::setWhiteForZero( bool whiteForZero ) { this->whiteForZero = whiteForZero; }
Though it is already illegal in France to have sex with someone aged under 15 rape charges are only brought if prosecutors can prove it was non-consensual. Currently there is no legal minimum age below which it is presumed in law that a child cannot give consent, which would then automatically bring about rape charges...
// Database Admin Credentials details. func (o GetMigrationsMigrationCollectionItemGoldenGateDetailsHubOutput) RestAdminCredentials() GetMigrationsMigrationCollectionItemGoldenGateDetailsHubRestAdminCredentialsOutput { return o.ApplyT(func(v GetMigrationsMigrationCollectionItemGoldenGateDetailsHub) GetMigrationsMigrat...
<filename>include/Item.h #ifndef __Item__ #define __Item__ #include "Entity.h" enum class ItemType { COMMON, KEY, WEAPON, SHIELD, HOLDER }; class Item : public Entity { public: Item(string name, string description, ItemType itemType = ItemType::COMMON) : Entity(EntityType::ITEM, name, description) { ...
/** * Useful functions for benchmarking feature detection. * * @author Peter Abeles */ public class BenchmarkDetectHelper { public static <T extends ImageSingleBand, D extends ImageSingleBand> List<BenchmarkAlgorithm> createAlgs(BenchmarkInterestParameters<T, D> param) { int radius = param.radius; Class<T> im...
<filename>examples/003-config.ts /** * @file Send a HTTP request */ // file ./krans.config.js import { http } from '@krans/http' export default { input: 'src/main', output: [File(Json, 'my-file.json')], plugins: [http()], } // file ./main.js import { fetch } from '@krans/fetch' import { Json } from '@k...
Evolution of bacterial susceptibility pattern of Escherichia coli in uncomplicated urinary tract infections in a country with high antibiotic consumption: a comparison of two surveys with a 10 year interval. OBJECTIVES For the empirical treatment of cystitis, clinicians are often guided by susceptibility data taken fr...
/** * adds a new Field to a database * @param aField a predefined Field object * @see Field * @throws xBaseJException * org.xBaseJ error caused by called methods * @throws IOException * Java error caused by called methods */ public v...
<filename>nonlinear/ISAM2.h<gh_stars>1-10 #ifndef ISAM2POINTER_H_INCLUDED #define ISAM2POINTER_H_INCLUDED #include "../nonlinear/ISAM2-impl.h" #include "../nonlinear/NonlinearFactorGraph.h" #include "../nonlinear/ISAM2Params.h" #include "../inference/VariableIndex.h" #include "../nonlinear/ISAM2Clique.h" /** 1. Spli...
package factory.example.pizzastore; import factory.example.PizzaType; import factory.example.ingredients.IngredientFactory; import factory.example.ingredients.NYIngredients; import factory.example.pizza.CheesePizza; import factory.example.pizza.Pizza; public class NYPizzaStore extends PizzaStore { @Overrid...
def accuracy(predictions, labels, verbose=False): predictions_normalized = np.zeros(predictions.shape) row = np.arange(predictions.shape[0]) col = np.argmax(predictions, axis=1) predictions_normalized[row,col] = 1 difference = np.absolute(predictions_normalized-labels) result = np.sum(difference...
<reponame>nzjrs/opencv_old_libdc1394 /* symbol.h * * (C) Copyright May 7 1995, <NAME>. * ALL RIGHTS RESERVED. * This code may be copied for personal, non-profit use only. * */ #ifndef HSIZE #define HSIZE 101 #endif extern symentry_t *HTAB[]; int iskeyword(keyword_t *keywords,char*id,int n); v...
/** Appends the element to the specified ancestor of the anchor. */ @Override void appendElementToContainer(Element element) { Element container = getOffsetAnchestorForAnchor(); container.appendChild(element); }
/** * Utility methods to simplify shutdown. * <p> * This is a static thread-safe utility class. */ public final class ShutdownUtils { /** * Hidden constructor. */ private ShutdownUtils() { } //------------------------------------------------------------------------- /** * Exits the JVM, trying ...
package main import ( "fmt" "io/ioutil" "log" "net/http" "strings" "text/template" ) func Index(w http.ResponseWriter, r *http.Request) { cfg := ReadConfig() fn, er := ioutil.ReadDir(cfg.Content.OrgDir) if er != nil { log.Println(er) } fmt.Fprintf(w, "<html><body><h1>Index</h1><hr /><ul>") for _, f := r...
/** * Created by baokangwang on 2016/4/6. */ @Controller @RequestMapping("/api") public class ImageController extends ApiController { @Autowired @Qualifier("imageService") ImageService imageService; @ResponseBody @RequestMapping(value = "/image/base/{id}", method = RequestMethod.GET) public ...
// Create event will create event in database. // ID passed in input will get ignore. func (r *repository) CreateEvent(event *models.Event) error { values := make(map[string]interface{}) if !validEventType(event.EventType) { return ErrInvalidEventType } values["event_type"] = event.EventType if event.UserID == "...
Marysville shooting occurs less than 2 weeks before Washington voters decide on new gun control measures Activist Post Doesn’t there always seem to be funny business with these alleged school shootings? The latest is the Marysville, Washington active shooter event taking place today. This post isn’t to discuss the d...
. One of the underlying ideas is that there are ecological limits to diversity (there is a limited number of niches that can be filled with species) and hence to diversification . The hypothesis has been extensively studied both empirically and theoretically . Phylogenetic diversity, quantifying the genetic differenc...
<reponame>redis-developer/hentry-server<filename>src/modules/team/controller.ts import { NotFoundException, BadRequestException } from 'http-exception-transformer/exceptions' import { Team, CreateTeamInterface } from './interface' import { TeamService } from './service' class TeamController { /** returns list of all...
/** * Test method for {@link AssertorClass#hasName} . * * @throws IOException * On errors */ @Test public void testHasName() throws IOException { String name = IOException.class.getName(); assertTrue(Assertor.<IOException> ofClass().hasName(name).that(IOExc...
// Copyright 2018 The Chromium OS Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. use std::collections::BTreeMap; use std::env; use std::fmt::Write as FmtWrite; use std::fs; use std::io::Write; use std::path::{Path, PathBuf}; use std...
<filename>src/main/java/org/idomine/domain/crud/service/helper/TemplatePathHelper.java /** * The MIT License * * Copyright (c) 2018, <NAME> (<EMAIL>) * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal...
def updateStats(self, testsBeingRunMap): self.__testToMaxDependencyLength = {} toProcess = collections.deque(self.__testToListOfDependencies.keys()) safetyCheck = 0 sentinel = 10000000 while toProcess: test = toProcess.pop() maxCount = -1 for ...
// Examples - Publishing // August 24th, 2021 func main() { config, err := tcr.ConvertJSONFileToConfig("config.json") if err != nil { log.Fatal(err) } rabbitService, err := tcr.NewRabbitService(config, "", "", nil, nil) if err != nil { log.Fatal(err) } id, err := uuid.NewUUID() if err != nil { log.Fatal(...
// List lists all go files within the build context and applies a function. func List(path string, processFiles func(files []string) error) error { var process func(path string) error process = func(path string) error { dir, err := os.Open(path) if err != nil { return err } var files []string entries, er...
/** * Called when current snapshot phase 2 is done in {@link * ProcessorTasklet}. All processors do it concurrently. */ void phase2DoneForTasklet() { int newRemainingTasklets = numRemainingTasklets.decrementAndGet(); assert newRemainingTasklets >= 0 : "newRemainingTasklets=" + newRemainin...
<filename>src/strategy/include/strategy/pso.h #ifndef PSO_H #define PSO_H // CONSTANTS #define PSO_MAX_SIZE 100 // max swarm size #define PSO_INERTIA 0.7298 // default value of w (see clerc02) // === NEIGHBORHOOD SCHEMES === //global best topology #define PSO_NHOOD_GLOBAL 0 // ring topology #define PSO_NHOOD_RING...
/** This threaded task when executed performs a single search. */ public class requestSearchTask implements Task{ private SearchAssignment MySearchAssignment=null; private WordBinaryList EliminateDuplicate=new WordBinaryList(); public requestSearchTask(SearchAssignment MySearchAssignment){ this.MySearchAs...
/* Return true if all entries are equal to val */ static bool AllEntriesEqual(const uint8_t *buf, uint8_t len, uint8_t val) { uint8_t i; for (i = 0; i < len; i++) { if (buf[i] != val) { return false; } } return true; }
/** * Created by liushaobo.xicp.net on 2016/6/12. */ public class VolleySingleton { private static VolleySingleton volleySingleton; private RequestQueue mRequestQueue; private VolleySingleton(Context context) { mRequestQueue = Volley.newRequestQueue(context); } private static synchroni...
//: improve this by maintaining slot -> executors as well for more efficient operations @SuppressWarnings({"unchecked","rawtypes"}) public class SchedulerAssignmentImpl implements SchedulerAssignment { /** * topology-id this assignment is for. */ String topologyId; /** * assignment detail, a mapping from execu...
<filename>FrontEnd/src/utilities/useScrollToTop.ts import React from "react"; import { fromEvent } from "rxjs"; import { filter, throttleTime } from "rxjs/operators"; function useScrollToTop( handler: () => void, enable = true, option = { maxOffset: 50, throttle: 1000, } ): void { const handlerRef = ...
package cn.w2n0.genghiskhan.alarm.dingtalk.entity; import com.alibaba.fastjson.JSONObject; import lombok.Getter; import lombok.Setter; import org.apache.commons.lang3.StringUtils; /** * @author 无量 * date 2021/10/22 14:30 */ @Getter public class ActionCardEntity implements MsgEntity{ /** * 显示标题 */ ...
<reponame>elmurci/tribute-ui import {DEFAULT_ETH_ADDRESS, DEFAULT_DAO_NAME} from '../helpers'; export const daoResponse = { tributeDaos: [ { id: DEFAULT_ETH_ADDRESS, daoAddress: DEFAULT_ETH_ADDRESS, name: DEFAULT_DAO_NAME, totalUnits: null, bank: { id: DEFAULT_ETH_ADDRESS, ...
<filename>src/bgpfu/cli.py<gh_stars>10-100 # Copyright (C) 2016 <NAME> <<EMAIL>> # # This file is part of bgpfu # # 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/licen...
// Generates the digits of input number w. // w is a floating-point number (DiyFp), consisting of a significand and an // exponent. Its exponent is bounded by kMinimalTargetExponent and // kMaximalTargetExponent. // Hence -60 <= w.e() <= -32. // // Returns false if it fails, in which case the generated digits in ...