content
stringlengths
10
4.9M
#include <stdio.h> int main(void) { int num,count,i,j,inst,card[202],shuffle[202]; scanf("%d%d",&num,&count); for (i=1; i<=2*num; i++) card[i]=i; for (i=0; i<count; i++) { scanf("%d",&inst); if (inst==0) { for (j=1; j<=2*num; j++) shuffle[j]=card[j]; for (j=1; j<=...
def _match(qs, ks): qts = tuple(map(lambda x: re.compile(x + "$"), qs)) for i in range(len(ks) - len(qs) + 1): matches = [x.match(y) for x, y in zip(qts, ks[i:])] if matches and all(matches): return True return False
package indexer import ( "encoding/json" "flag" "fmt" "io" "log" "os" "github.com/algolia/algoliasearch-client-go/v3/algolia/search" "github.com/carlmjohnson/flagext" ) const appName = "indexer" // CLI runs the algolia-indexer application func CLI(args []string) error { var app appEnv err := app.ParseArgs...
<reponame>mathriv/OCast-JS /* * Copyright 2017 Orange * * 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 appl...
<gh_stars>0 import { CORRECT_NUMBER_TEXT_STYLE, DEBUG, DEBUG_SHOW_CORRECT_NUMBERS, FLOATING_NUMBER_TEXT_STYLE, GAME_TIME, INCREMENT_DIFFICULTY_VALUE, INCREMENT_SCORE_VALUE, NUMBER_TEXT_STYLE, TEXT_STYLE, } from '../config'; import { scaleGameObjectToGameWidth } from '../lib/align'; import Timer from '...
/*********************************************************************** * lowerUnmaskOps : lower the simd unmask begins and ends */ void CMSimdCFLower::lowerUnmaskOps() { std::vector<Instruction *> MaskBegins; std::vector<Instruction *> MaskEnds; for (auto fi = F->begin(), fe = F->end(); fi != fe; ++fi) { ...
import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core' import { BrowserModule } from '@angular/platform-browser' import { BrowserAnimationsModule } from '@angular/platform-browser/animations' // basic modules import { CoreModule } from './core/core.module' import { SharedModule } from './shared/shared.module...
package com.example.service; import java.util.List; import java.util.stream.IntStream; @FunctionalInterface public interface LotteryService { List<Integer> draw(int max, int size); default List<List<Integer>> draw(int max, int size,int column){ return IntStream.range(0, column) .mapToObj(i -> draw(max...
/** * @return Whether the current device lacks proper Google Play Services. This will return true * if the service is not authentic or it is totally missing. Return false otherwise. * Note this method returns false if the service is only temporarily disabled, such as * when i...
/* * converts a pointer to a CK_ATTRIBUTE structure into a Java CK_ATTRIBUTE Object. * * @param env - used to call JNI funktions to create the new Java object * @param ckpAttribute - the pointer to the CK_ATTRIBUTE structure * @return - the new Java CK_ATTRIBUTE object */ jobject ckAttributePtrToJAttribute(JNIEnv...
/** * Constructs the path to the file instide the bundle that we're keen on. * * @returns IPRT status code. * @param pszPath Path to the bundle on input, on successful * return it's the path to the desired file. This * a RTPATH_MAX size buff...
The Bill of Rights is the first 10 amendments to the Constitution. It defines citizens’ and states’ rights in relation to the Government. The Constitution defines the framework of the Federal Government of the United States. The Declaration of Independence expresses the ideals on which the United States was founded a...
/* * INESC-ID, Instituto de Engenharia de Sistemas e Computadores Investigação e Desevolvimento em Lisboa * Copyright 2013 INESC-ID and/or its affiliates and other * contributors as indicated by the @author tags. All rights reserved. * See the copyright.txt in the distribution for a full listing of * individual co...
<filename>message_media_webhooks/message_media_webhooks_client.py # -*- coding: utf-8 -*- """ message_media_webhooks.message_media_webhooks_client This file was automatically generated for MessageMedia by APIMATIC v2.0 ( https://apimatic.io ). """ from .decorators import lazy_property from .configurat...
def preview(drafts): if not find_executable(HUGO_COMMAND): print_hugo_install_instructions() return command = ['hugo', 'server'] if drafts: command.append('-D') if is_docker(): command.extend(['--bind', '0.0.0.0']) try: cmd = subprocess.Popen(command, cwd=conf...
WASHINGTON -- President Barack Obama's budget for fiscal year 2016 includes a major change for legally married same-sex couples, making them eligible to receive Social Security spousal benefits regardless of where they live. Currently, these couples are unable to get such benefits if they live in a state that does not ...
def playGame(self, action=-1, verbose=False): if self.game.getGameEnded(self.board, self.curr_player)==0: if verbose: assert(self.display) self.display(self.board) if action == -1: print(self.players[self.curr_player+1]) act...
/** * @brief Helper for validator that uses SignedInterest + CommandInterest + Config policy and * NetworkFetcher */ class ValidatorConfig : public Validator { public: using Validator::Validator; using SignedInterestOptions = ValidationPolicySignedInterest::Options; using CommandInterestOptions = Valida...
<reponame>aqfaridi/Competitve-Programming-Codes /** * SPOJ Problem Set (classical) * 11736. Prime Time * Problem code: PTIME * * For your math homework this week your teacher gave you five large * numbers and asked you to find their prime factors. However these * numbers aren't nearly large enough for someone wi...
/* *** In The Name of God ... *** */ #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; #define int long long #define all(v) v.begin() , v.end() #define pb push_back template<typename T> inline bool smin(T &a, const T &b){ return b < a ? a = b,1:0;} template<t...
Association of findings in flow‐volume spirometry with high‐resolution computed tomography signs in asbestos‐exposed male workers Introduction:  Disorders of pulmonary tissue and pleura are visualized by findings in high‐resolution computed tomography (HRCT), and the impairment caused by these findings is assessed by ...
<filename>projects/ngx-state-store/src/lib/state/state-helper-cyclic-dependencies.spec.ts import { inject, TestBed } from '@angular/core/testing'; import { StateHelper } from './state-helper'; describe('StateHelper - cyclic dependencies tests;', () => { let funk; let funk2; let complexObject; let complexObject...
<filename>data_process/sentence_retrieve.py from getData import * addRetrieveData('../data/train_raw.json', '../data/train_retrieve.json') addRetrieveData('../data/val_raw.json', '../data/val_retrieve.json') addRetrieveData('../data/test_raw.json', '../data/test_retrieve.json') tagGoldInfo('../data/test_retrieve.json',...
class BoxModelSystem: """Represent a single- or multibox system. BoxModelSystems contains boxes, fluid-flows/variable-fluxes between them, and global conditions that can affect for example process/reaction rates. Args: name (str): Human readable string describing the system. boxes ...
n=int(input()) l=[int(x) for x in input().split()] s=sum(l) ans=[1] su=l[0] if l[0]>s//2: print(1) print(1) exit(0) flag=0 for i in range(1,n): if 2*l[i]<=l[0]: ans.append(i+1) su+=l[i] if su>s//2: flag=1 break if flag==0: print(0) else: pr...
/** check if two property sets are equals in its * shared properties. * * Note: Only set properties of the match set will be searched * inside the original set. And its values must be equals. * Using of reg expressions or similar mechanism will not * be supported here. * * ...
/** Example of creating a Dataproc cluster. */ public class DataprocExample { // parameters private static final String CLUSTER_NAME = "cluster-name"; private static final String PROJECT_ID = "project-id"; private static final String REGION = "region-name"; private static final String ZONE = "zone-name"; ...
package ops import ( "fmt" "github.com/VictoriaMetrics/metrics" "github.com/shirou/gopsutil/v3/cpu" "github.com/shirou/gopsutil/v3/disk" "github.com/shirou/gopsutil/v3/mem" "github.com/shirou/gopsutil/v3/net" ) const ( METRICS_MEMORY_EXPOSITION = `ops_memory_stats{type="%s"}` METRICS_CPU_EXPOSITION = `op...
def load_walker(self): return DocWalker( self.packages, out=self.target, description=self.readme, extra_fields=self.config, template_directory=self.template_dir, examples_directory=self.examples_dir )
It is ironic that President Barack Obama would travel to China and speak against government control over the internet. If the American Department of Homeland Security has its way new cybersecurity laws will enable Obama’s administration to take control of the internet in the event of a national crisis. How that nationa...
// _____ ______ _ // / ____| | ____| (_) // | (___ __ _ _ _ ___ ___ | |__ _ __ __ _ _ _ __ ___ // \___ \ / _` | | | |/ __/ _ \ | __| | '_ \ / _` | | '_ \ / _ \ // ____) | (_| | |_| | (_| __/ | |____| ...
/** * HostCommandHandlers handle commands directly to the ADB Server itself, such as host:kill, * host:devices, etc.... This does not include host commands that are directed at a specific device. */ public abstract class HostCommandHandler extends CommandHandler { /** * This is the main execution method of...
def ash_split(arg, qty): l = arg.split(',') if len(l) < qty: l.extend([None for x in xrange(qty-len(l))]) return l
import { map, flattenDeep } from 'lodash'; import { max, mean, median, min, mode, quantile, standardDeviation, sum, variance } from 'simple-statistics'; import { expect } from 'chai'; import DataSet from '../../../src'; import populationChina from '../../fixtures/population-china.json'; describe('View API: statistics'...
use crate::error::{Error, PathError}; pub struct Node { pub index: u32, pub hardened: bool } pub fn valiidate_path(path: &str, allow_hardened: bool) -> Result<Vec<Node>, Error> { if !path.starts_with("m/"){ return Err(Error::InvalidPath(PathError::InvalidHead)); } let mut vec = vec![]; ...
Preview: Mega Man #42 Share: The battle RAGES ON! Based on the legendary game Mega Man 3 comes “Legends of the Blue Bomber” Part Two: We’ve seen Mega Man battle Robot Masters before, but now see the fight unfold from the perspectives of the villainous robot adversaries themselves! Shadow Man recalls his humble beginni...
NASSAU, Bahamas (AP) — PGA Tour Commissioner Tim Finchem jokingly said he was relieved to see Tiger Woods still alive after reading such gloomy reports from his press conference in the Bahamas about his back issues. Finchem didn’t come away with a feeling that Woods was finished. As for his own future? That’s equally ...
/** * Specifies a peak fitting result that cannot be modified. * * <p>Any method that modifies the result will throw a data exception. */ public class ImmutablePeakResult extends AttributePeakResult { private static final long serialVersionUID = 20190319L; private static final String IMMUTABLE_MESSAGE = "This ...
/** * simplistic Object array that differentiates from ArrayList by * using chunks instead of exponential growth, thus efficiently dealing * with huge, potentially sparse arrays * * the motivation for this class is memory optimization, i.e. space efficient * storage of potentially huge arrays without good a-prior...
/** * @deprecated This method will not be supported in the future. * Use addTriangleMesh instead. */ @Deprecated public Content addMesh(List<Point3f> mesh, Color3f color, String name, int threshold) { return addTriangleMesh(mesh, color, name); }
/** * Merges the capabilities of the following stream classes into a single class: * FileInputStream, BufferedInputStream, and DataInputStream. This allows us to * manage buffered data reads from files efficiently. * */ public class BufferedFileDataInput { private static Logger logger = Logger.getLogger(Buffer...
package co.itodo.common.filter; import javax.servlet.ServletOutputStream; import javax.servlet.WriteListener; import java.io.DataOutputStream; import java.io.IOException; import java.io.OutputStream; /** * @Desc TODO * @Author by Brant * @Date 2017/05/25 */ public class CustomServletOutputStream extends ServletOu...
<reponame>obarnet/Teste #include "Searchable.h" void Searchable::DoStopSearch() { // provide this default implementation which does nothing for // some classes(like SMFileInfo) in the hierarchy } void Searchable::Search(const QStringList& keywords, const Qt::CaseSensitivity& caseSensitive, ...
import { Component, Input } from '@angular/core'; @Component({ selector: 'auto-icon', template: ` <div class="container"> <svg height="60" width="60" viewBox="0 0 60 60"> <circle *ngIf="level === 1" class="goal" cx="29" cy="30" r="28"/> <svg:path *ngIf="level === 2" class="next" [attr.d]=...
package example.josh.util; public class EzMath { /** * Returns a value clamped within the given range. * @param value * @param min * @param max * @return */ public static double clamp(double value, double min, double max) { return Math.max(Math.min(value, max), min); ...
// Asset2Asset2 converts a txnbuild.Asset to a horizon.Asset. func Asset2Asset2(Asset txnbuild.Asset) hProtocol.Asset { a := hProtocol.Asset{} a.Code = Asset.GetCode() a.Issuer = Asset.GetIssuer() if Asset.IsNative() { a.Type = Native } else if len(a.Code) > 4 { a.Type = "credit_alphanum12" } else { a.Type ...
import { Atom } from "@thi.ng/atom"; import { comp, filter, last, map, take } from "@thi.ng/transducers"; import * as assert from "assert"; import { TIMEOUT } from "./config"; import { CloseMode, fromInterval, fromIterable, fromPromise, fromView, State, stream, sync, transduce, } fro...
Higher Number of Night Shifts Associates with Good Perception of Work Capacity and Optimal Lung Function but Correlates with Increased Oxidative Damage and Telomere Attrition Sleep deprivation and the consequent circadian clock disruption has become an emergent health question being associated with premature aging and...
<filename>src/endpoints.ts import { NotebookDocument, workspace } from "vscode"; import { loadConfig, GraphQLProjectConfig } from "graphql-config" import { Endpoint, Endpoints } from "graphql-config/extensions/endpoints" export class EndpointsManager { async getConfiguredEndpoints(notebookDocument: NotebookDocument)...
ON THE ECONOMY OF SUSTAINABLE INDUSTRIAL GROWTH . Scientific paper covers issues of Russian economy transformation to the model of sustainable industrial growth. Paper performs the comparison study of the rates of economic growth in Russia, countries of «Big seven» and BRICS in the view of their sustainability, consid...
/** * Created by kevinleperf on 08/02/16. */ public class NetworkConstantsTest { @Test public void testConstructor() throws NoSuchMethodException, InstantiationException, IllegalAccessException, InvocationTargetException { TestUtil.assertUtilityClassWellDefined(NetworkConstants.class); } }
#include <bits/stdc++.h> using namespace std; int const N = 1e5 + 10; int a[N]; vector <int> o; int main() { int n; scanf("%d", &n); for (int i=0,x; i<n; ++i) scanf("%d", &x), a[x] = min(a[x]+1, 2); for (int i=0; i<N; ++i) if (a[i]-- > 0) o.push_back(i); for (int i=N-1; i>0; --i) if (a[i]-- > 0) o.pu...
//AddCapability adds capabilities to the destAddr entry. It returns false if there is no entry in //the cache for dstAddr. If there is already a capability list associated with destAddr, it will be //overwritten. func (c *connectionCacheImpl) AddCapabilityList(dstAddr connection.Info, capabilities []message.Capability)...
/// Returns `Some(_)` if this method makes the containing trait not object safe. fn object_safety_violation_for_method<'tcx>(tcx: &ty::ctxt<'tcx>, trait_def_id: ast::DefId, method: &ty::Method<'tcx>) ...
<filename>aws_lambda_builders/workflows/__init__.py<gh_stars>0 """ Officially supported builder workflows """ import aws_lambda_builders.workflows.python_pip import aws_lambda_builders.workflows.nodejs_npm
def assertMsgNotInLogs(self, level, msg, partial=False): matchType = "a partial" if partial else "an exact" failMsg = "Found {} match for {} under {} but should not have" self.assertFalse(self.msgInLogs(level, msg, partial), msg=failMsg.format(matchType, msg, level))
/** * Validates a single line of Variable initialization or updating * statement. * * @param line The line. * @return true if the line is valid. */ private boolean validateLine(String line) { int ind = line.indexOf("="); int lastInd = line.la...
/** * @Author Andrew Arnold & Erik Riis */ public class PathMaker { private GridPane grid; private int myPathSize; private final Map<String,String> GAMEPLAYER_PROPERTIES; private final View myView; public PathMaker(Map<String,String> gamePlayerProperties, View view) { GAMEPLAYER_PROPERTIES = g...
import getTicTacToeGameModule from '../tictactoe/components/Game'; import {GameModule} from './common'; // eslint-disable-next-line @typescript-eslint/no-explicit-any export type AnyGameModule = GameModule<any>; const allGameModules: AnyGameModule[] = [getTicTacToeGameModule()]; export function getAllGameModules(): ...
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */ class Solution { public: int longestConsecutive(TreeNode* root) { int longest = 0; dfs(root, root, longe...
<reponame>Drieger/v8<gh_stars>0 // Copyright 2014 the V8 project authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef V8_UNITTESTS_TEST_UTILS_H_ #define V8_UNITTESTS_TEST_UTILS_H_ #include <vector> #include "include/v8.h" #inclu...
<filename>dev/tools/run_speed_tests.py from brian2 import * from brian2.tests.features import * from brian2.tests.features.base import * from brian2.tests.features.speed import * #from brian2genn.correctness_testing import GeNNConfiguration # Full testing # res = run_speed_tests() # res.plot_all_tests() # show() # Qu...
def write(results_file, array, labels): try: fp = open(results_file, 'w') for i in range(len(array)): fp.write(str(array[i]) + '\t' + labels[i] + '\n') except IOError: raise finally: fp.close()
/** * Displays movie titles of the given {@link Movie} array. */ public class MoviesAdapter extends ArrayAdapter<Movie> { private static int LAYOUT = R.layout.movie_item; private LayoutInflater mInflater; private String mImageBaseUrl; private DateFormat dateFormatMovieReleaseDate = DateFormat.getD...
Inside houdini's distributed solver system Distributing a simulation over multiple computers enables simulations that exceed the capacity of any individual machine. Distributed systems, however, tend to be hard to deploy and maintain. Our approach can work with commodity hardware and is agnostic to the specific type o...
def from_text(base_url, content_dict): if not bool(content_dict): return { "text": "Oh no, there was an error with your inputs!", "attachments": [ { "text": """Example usage of `/jamaconnect create`: \t`/jamaconnect create: <projectId>` brings up a...
import functools N = int(input()) K = int(input()) @functools.lru_cache(None) def func(num,counter): remain = num%10 quotient = num//10 if counter == 0: return 1 if num<10: if counter ==1: return num else: return 0 return func(quotient...
<gh_stars>0 package fsorepos import ( "errors" "fmt" ) var ErrCommandUnknown = errors.New("unknown command") var ErrCommandConflict = errors.New("command conflict") var ErrConflictShadowPath = errors.New("shadow path conflict") var ErrConflictWorkflow = errors.New("workflow conflict") var ErrNoGPGKeys = errors.New(...
<gh_stars>10-100 from django.forms import CharField, Form, Textarea from django.utils.safestring import mark_safe from .base import WidgetTest class TextareaTest(WidgetTest): widget = Textarea() def test_render(self): self.check_html( self.widget, "msg", "value", ...
<reponame>liu5855019/DMKitPods // // NSString+DMTools.h // DMKit // // Created by iMac-03 on 2017/12/29. // Copyright © 2017年 呆木. All rights reserved. // #import <Foundation/Foundation.h> @interface NSString (DMTools) /// 是否为有效字符串 (是字符串类型 && 长度大于0) - (BOOL)isStringWithLength; /// 是否为有效字符串 且 不能全是空格 - (BOOL)isSt...
/** * Read the raw bytes from a file and return them * @param file The file to read * @return The raw bytes, or null if an error occured */ private byte[] readFileRaw(File file) { byte[] filebytes = null; try { RandomAccessFile fobj = new Rando...
…And he also just happens to be the head of Al-Qaeda Paul Joseph Watson Infowars.com September 13, 2013 Ayman al-Zawahri, the leader of Jabhat al-Nusra, which is the primary opposition fighting force in Syria, has called for terror attacks inside the United States. Al-Zawahri just happens to be the leader of anoth...
<filename>test/test_smoke.rs<gh_stars>0 extern crate mio; use mio::{Token, Ready, PollOpt}; use mio::deprecated::{EventLoop, Handler}; use mio::tcp::TcpListener; use std::time::Duration; struct E; impl Handler for E { type Timeout = (); type Message = (); } #[test] fn run_once_with_nothing() { let mut e...
/** * Whether a point is contained in this ShadedTriangle. * * @param p the target point * @return false if p is outside of this triangle, otherwise true */ public boolean contains(Point2D p) { if (degree == 1) { return overlaps(corner[0], p) || overlaps(corner[1...
<reponame>fossteams/teams-api package csa import ( api "github.com/fossteams/teams-api/pkg" "time" ) type User struct { } type FeedProperty struct { IsEmptyConversation string ConsumptionHorizon string ConsumptionHorizonBookmark string } type PrivateFeed struct { Id string Type ...
export * from './lib/orders-orders.module';
<filename>test/table.test.ts /** * @Author: abbeymart | <NAME> | @Created: 2020-12-26 * @Company: Copyright 2020 <NAME> | mConnect.biz * @License: All Rights Reserved | LICENSE.md * @Description: mc-central-ts: bookmark socket.io */ import "../lib/esm/McDataTable"; const htmlPage = ` <mc-data-table></mc-dat...
def add_from_dict(self, fname_dict): for alias, fname in fname_dict.items(): self.add(alias, fname)
<gh_stars>0 package main import ( "encoding/json" "fmt" "io/ioutil" "log" "os" "path/filepath" "reflect" "sort" "strconv" "strings" "sync" "text/template" "time" "github.com/leekchan/gtf" "github.com/umisama/go-cpe" "github.com/valyala/fastjson" "github.com/aquasecurity/vuln-list-update/redhat" "g...
<gh_stars>0 package storagemarket import ( "context" "io" "github.com/ipfs/go-cid" "github.com/filecoin-project/specs-actors/actors/abi" "github.com/filecoin-project/go-fil-markets/shared" ) // ProviderSubscriber is a callback that is run when events are emitted on a StorageProvider type ProviderSubscriber fu...
/** * Analyzes code with <a href="http://clarkware.com/software/JDepend.html">JDepend</a>. */ public class JDepend extends DefaultTask implements Reporting<JDependReports> { private FileCollection jdependClasspath; private File classesDir; private final JDependReports reports; /** * Returns ...
<filename>app/src/main/java/com/moping/imageshow/view/ShadowBackground.java package com.moping.imageshow.view; import android.graphics.Canvas; import android.graphics.Color; import android.graphics.ColorFilter; import android.graphics.Paint; import android.graphics.PixelFormat; import android.graphics.PorterDuff; impo...
/** * @author Steve Ebersole */ public class EntityReturnImpl extends AbstractEntityReference implements EntityReturn, ExpandingFetchSource { public EntityReturnImpl(EntityDefinition entityDefinition, ExpandingQuerySpaces querySpaces) { super( querySpaces.makeRootEntityQuerySpace( querySpaces.generateImp...
<gh_stars>0 import {DynamicModulesManager} from './dynamic-modules-manager'; import {entryPoint} from '../outputs/formatters/json-formatter'; import {ProtocolManager} from './protocol-manager'; import {ReportFormatterManager} from './report-formatter-manager'; import {ObjectParserManager} from './object-parser-manager'...
<gh_stars>0 //! Interfaces to managed assets use codec::{Decode, Encode}; use frame_support::dispatch::DispatchResult; use scale_info::TypeInfo; #[cfg(feature = "std")] use serde::{Deserialize, Serialize}; #[cfg(feature = "std")] use sp_std::vec::Vec; use xcm::latest::MultiLocation; /// works only with concrete assets...
Maximum Compared to Average: 11056 11056 . Proposed by John H. Lindsey II, Cambridge, MA. Let n be a positive integer, and let p be a polynomial of degree at most n. Show that on any nonempty finite real interval I, maxxe/ Ip(x)\ is at most 4n2 times the average on I of Ip(x)|. Solution by Omran Kouba, Higher Institu...
// SerializeSymmetricKeyEncrypted serializes a symmetric key packet to w. // The packet contains a random session key, encrypted by a key derived from // the given passphrase. The session key is returned and must be passed to // SerializeSymmetricallyEncrypted or SerializeAEADEncrypted, depending on // whether config.A...
/** * Call @c generateUUID and expect a string of length @c UUID_LENGTH. Check that each character in the string * is a hexedecimal number except for the hyphens. */ TEST_F(UUIDGenerationTest, test_uUIDContainsOnlyHexCharacters) { auto uuid = generateUUID(); ASSERT_EQ(UUID_LENGTH, uuid.length()); for (un...
/** * Carrot2 parameter mapping (recognized and mapped if passed via Solr configuration). * @lucene.experimental */ public final class CarrotParams { private static String CARROT_PREFIX = "carrot."; public static String ALGORITHM = CARROT_PREFIX + "algorithm"; public static String TITLE_FIELD_NAME = CARRO...
/** * Initializes the per-tariff inconvenience factors. * These are not normalized; it is up to the customer model to normalize the * per-tariff and cross-tariff factors as appropriate */ public void initializeInconvenienceFactors (double touFactor, double tiere...
import Vue from 'vue' import VssuePlugin, { Vssue, VssueComponent, } from 'vssue' // @ts-ignore import PlatformAPI from '@vssue/api-bitbucket-v2' import 'vssue/dist/vssue.css' import 'github-markdown-css' const onlyComponent: boolean = process.env.VUE_APP_ONLY_COMPONENT === 'true' const options: Partial<Vssue.Op...
<filename>src/MonCat/Exp.hs {-# LANGUAGE RankNTypes #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE PolyKinds #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE FunctionalDependencies #-} {-# LANGUAGE InstanceSigs #-} {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeApplicatio...
import React, { InputHTMLAttributes } from 'react' import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' import { faEye, faEyeSlash } from '@fortawesome/free-regular-svg-icons' import { faCheck, faTimes } from '@fortawesome/free-solid-svg-icons' import { Container } from './styles' import { useState } from ...
// AtCoder154 C #define _CRT_SECURE_NO_WARNINGS #include <stdio.h> #include <math.h> #include <assert.h> #include <string.h> #include <memory.h> #include <malloc.h> #include <stdlib.h> struct node_t { char s[11]; struct node_t* left; struct node_t* right; }; struct node_t* mallocNode(char* adds) { st...
/** * create a memory based model with extended prefixes and initialises it * with statements parsed from a string. * * does all insertions in a transaction. * * @param facts * @return Model */ public static Model memModel(String facts) { Model model = ModelFactory.createMemModelMaker().createFreshM...
"""YVals is the Python representation of the yval_t enum, the node tags of value DAGS is a Model.""" import yices_api as yapi class Yval: UNKNOWN = yapi.YVAL_UNKNOWN BOOL = yapi.YVAL_BOOL RATIONAL = yapi.YVAL_RATIONAL ALGEBRAIC = yapi.YVAL_ALGEBRAIC BV = yapi.YVAL_BV SCALAR ...
// combine aggregates all registered filters into a single terra.ReleaseFilter func (f *filterBuilder) combine() terra.ReleaseFilter { var destFilters []terra.DestinationFilter if len(f.destinationIncludes) > 0 { destFilters = append(destFilters, filter.Destinations().Or(f.destinationIncludes...)) } else { destF...
<reponame>kennethgjohnson/MTPC-Basics<filename>mtpc-basics/src/main/java/dev/kennethgjohnson/mtpc/basics/concurrencybasics/callablefuture/CallableFutureWithLambdaApp.java<gh_stars>0 package dev.kennethgjohnson.mtpc.basics.concurrencybasics.callablefuture; import java.util.ArrayList; import java.util.List; import java....
def register_all_links(): ph_tasks = ["lift", "can", "square", "transport", "tool_hang", "lift_real", "can_real", "tool_hang_real"] ph_horizons = [400, 400, 400, 700, 700, 1000, 1000, 1000] for task, horizon in zip(ph_tasks, ph_horizons): register_dataset_link(task=task, dataset_type="ph", hdf5_type...
The Detroit Pistons entered the most crucial stretch of the season and have come to a sputtering halt. This team will be defined by its failures. Just a couple of weeks ago, the Detroit Pistons boasted the NBA’s 4th-best record since the beginning of February. The Pistons were 12-6 between February 1st and March 11th,...