content
stringlengths
10
4.9M
<reponame>JoshVarty/HaliteIO<filename>game_engine/replay/Replay.hpp #ifndef HALITE_REPLAY_HPP #define HALITE_REPLAY_HPP #include <fstream> #include <iostream> #include <string> #include "Statistics.hpp" #include "Command.hpp" #include "GameEvent.hpp" #include "../version.hpp" #include "Constants.hpp" #include "Cell.h...
<reponame>JamFF/HttpProcessor<filename>app/src/main/java/com/jamff/http/processor/RetrofitProcessor.java package com.jamff.http.processor; import android.util.Log; import com.jamff.http.MainActivity; import com.jamff.http.processor.retrofit.ApiService; import java.util.Map; import retrofit2.Call; import retrofit2.C...
/** * Service class around authentication, session cookie and session cache handling. It works together with the * {@link Authentication} controller and the @Authenticated annotation defined in {@link AuthenticationAction}. * * If a user is authenticated (same password as stored in the database) a user session ID i...
def AddBlob(self, blob_hash, length, chunk_number): offset = chunk_number * self.index.chunksize self.index.Seek(offset) if not self.index.ChunkExists(chunk_number): self.size += length self.index.Seek(offset) self.index.Write(blob_hash) self._dirty = True
Today, we are absolutely delighted to announce that volare has concluded months of negotiations to sign an exclusive translation licensing, ebook/digital publishing, and future cooperation agreement with iReader! For those who might be unfamiliar with iReader, they are a technology market leader specializing in wireles...
The Army says the size and scope of Jade Helm 15, a Special Operations exercise that begins in July, set it apart from other training exercises. Also setting it apart: The widespread conspiracy theories that the U.S. is preparing to hatch martial law. The Post's Dan Lamothe explains. (Tom LeGro/The Washington Post) Th...
def ordering(self, v1, v2): if self.isMin: return v1 < v2 return v1 > v2
class MutationMixin: """ All mutations should extend this class """ success = graphene.Boolean(default_value=True) errors = graphene.Field(OutputErrorType) @classmethod def mutate(cls, root, info, **input): return cls.resolve_mutation(root, info, **input) @classmethod def ...
#include<stdio.h> int main() { //2<=n<=30; int h[31]={0},g[31]={0};int n=0; int sum=0; int i=0;int j=0; scanf("%d",&n); for(i=1;i<=n;i++)scanf("%d %d",&h[i],&g[i]); for(i=1;i<=n;i++)//host team { for(j=1;j<=n;j++)//guest team { if(h[i]==g[j])sum++; } } printf("%d\n",sum); return 0; }
<gh_stars>1-10 package polygon.services; import org.hibernate.Hibernate; import org.hibernate.proxy.HibernateProxy; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.cache.annotation.Cacheable; import org.springframework.stereotype.Service; import org.springframework.transaction...
An Argument for Indexical Representations in Temporal Reasoning This paper discusses the need for indexicals in a representation language. It has been claimed that the cost of updating a knowledge base containing indexicals would be prohibitive and thus that a robot should use its internal clock to eliminate indexical...
// Since one BufferManager can be shared by multiple decoders, ContextState is // passed in each time and not just passed in during initialization. Buffer* BufferManager::GetBufferInfoForTarget( ContextState* state, GLenum target) const { switch (target) { case GL_ARRAY_BUFFER: return state->bound_array...
<filename>src/n0220_contains_duplicate_iii.rs /** * [220] Contains Duplicate III * * Given an array of integers, find out whether there are two distinct indices i and j in the array such that the absolute difference between nums[i] and nums[j] is at most t and the absolute difference between i and j is at most k. *...
On Thursday, NBC News sources confirmed that Chuck Todd will bump David Gregory from the Meet the Press host chair. And while Todd isn’t as liberal as his predecessor, he has played defense for the Barack Obama administration on a number of fronts. Most recently he dismissed the IRS-Tea Party scandal by asking “are th...
/// Translate an HSL colour point into an RGB colour point. /// /// Based wholly on https://en.wikipedia.org/wiki/HSL_and_HSV#From_HSL. /// /// # Examples /// /// ``` /// # use mandalas::util::hsl_to_rgb; /// assert_eq!(hsl_to_rgb([1f64, 1f64, 1f64]), [1f64, 1f64, 1f64]); /// assert_eq!(hsl_to_rgb([0f64, 0f64, 0f64]), ...
// token_test.go // // To the extent possible under law, <NAME> has waived all copyright // and related or neighboring rights to token, using the Creative // Commons "CC0" public domain dedication. See LICENSE or // <http://creativecommons.org/publicdomain/zero/1.0/> for full details. package token import ( "crypto/...
/** Add a source stream. If sourceDir is null, it is set to the * same value as the directory where this compound stream exists. * The id is the string by which the sub-stream will be know in the * compound stream. The caller must ensure that the ID is unique. If the * id is null, it is set to t...
def format_jacobian(jacobian): output_dim = jacobian.shape[0] return jacobian.view(output_dim, -1).t()
<reponame>nihilapp/nihilapp<filename>src/data/index.ts export * from './config.data'; export * from './size.data';
<reponame>mavit/mayhem-pi #include "collision.h" #include "platform_data.h" #include "player_view.h" #include "utils.h" #include "allegro_compatibility.h" bool test_collision(struct player_view *pv, struct level_data *currentlevel) { struct vaisseau_data *vaisseau = pv->player->ship; struct platform_da...
import hash from 'object-hash' // v('div', { id: 'foo' }, 'Hello!') /** * <div id="foo">Hello!</div> */ export interface VNode { nodeName: string, attributes: object | null, children: Array<VNode | string>, hash?: string, // a mapping of the children, making the hash the key childMap?: any } export con...
def tag_dataset(self, dataset): docid_to_mentions = {} for context in dataset.contexts: docid = str(context.uri) docid_to_mentions[docid] = self.create_mentions(context.mention) return docid_to_mentions
// Copyright 2015 The LUCI 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...
def replaceAll(original, pattern, format): matches_and_replacements = [] def _replaceWithFormat(match): formatted_match = None if match.groupdict(): try: formatted_match = format % match.groupdict() except TypeError: pass if (not formatted_match) and match.groups(): try...
/************************************************************** * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to y...
package test53.visitor; import java.util.Collection; import java.util.Iterator; /** * Created with IntelliJ IDEA. * User: chin * Date: 8/14/18 * Time: 10:45 AM * To change this template use File | Settings | File Templates. * Description: */ public class Starter { /** * 引例 * print1() 打印集合中的元素, ...
package subscr import ( "encoding/base64" "log" ) // DecodeUrlBase64 decode url safe base64 string, auto add '=' if not enough func DecodeUrlBase64(str string) string { l := len(str) if l%4 != 0 { for i := 0; i < 4-l%4; i++ { str += "=" } } deStr, err := base64.URLEncoding.DecodeString(str) if err != ni...
// Handle an IGMP-record from an IGMP-packet (called by igmp_receive) static ssize_t igmp_handle_record(struct groups *groups, const uint8_t *data, size_t len) { struct igmpv3_grec *r = (struct igmpv3_grec*)data; if (len < sizeof(*r)) return -1; size_t nsrc = ntohs(r->grec_nsrcs); size_t read = sizeof(*r) + nsrc ...
<reponame>KarimIO/DEVE #ifndef _IMAGE_h #define _IMAGE_h #include <string> #include <Types.h> #include <Dispatcher.h> #include "base64.h" #include "JPEG.h" #include "RegistrarArbitration.h" using namespace RRAD; /* wrapper for the JSON containing the user image that should be embedded in the comment section of def...
<reponame>lise1020/pybinding #include "leads/Leads.hpp" #include "wrappers.hpp" using namespace cpb; void wrap_leads(py::module& m) { py::class_<leads::Spec>(m, "LeadSpec") .def_readonly("axis", &leads::Spec::axis) .def_readonly("sign", &leads::Spec::sign) .def_readonly("shape", &leads::Spe...
/* Insert an MIR instruction to the end of a basic block */ void dvmCompilerAppendMIR(BasicBlock *bb, MIR *mir) { if (bb->firstMIRInsn == NULL) { assert(bb->firstMIRInsn == NULL); bb->lastMIRInsn = bb->firstMIRInsn = mir; mir->prev = mir->next = NULL; } else { bb->lastMIRInsn->ne...
<gh_stars>10-100 package defaults import ( "testing" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) func TestSet(t *testing.T) { t.Run("should fail on nil pointer", func(t *testing.T) { err := Set(nil) require.Error(t, err) }) t.Run("should not fail on nil value", func(t *tes...
def patch_port(self, port, patches, ironic=None): ironic = ironic or self.ironic ports = self.ports() if isinstance(port, six.string_types): port = ports[port] LOG.debug('Updating port %(mac)s with patches %(patches)s', {'mac': port.address, 'patches': patch...
import numpy as np import keras from keras.datasets import mnist from keras.layers import Input, Dense, Dropout, Conv2D, Flatten, MaxPooling2D from keras.models import Model from keras import backend as K from keras.preprocessing.image import ImageDataGenerator import time batch_size = 128 num_classes = 10 epochs1 = ...
// Custom mod handler for item type func itemExternalModFunc(d *schema.ResourceData, m interface{}, item *zabbix.Item) { item.Type = zabbix.ExternalCheck item.InterfaceID = d.Get("interfaceid").(string) item.Delay = d.Get("delay").(string) }
//'paramList' is the List of Params of the API that the resulting list of Frames refers to. public ArrayList<Frame> generateFrames(HTTPMethod method, String endpoint, ArrayList<Param> paramList, Double probSelection, Double probFailure, Double probCriticalFailure, Double trueProbSelection, Double trueProbFailure, Doubl...
/* Adjusts the register min/max values in the case that the dst_reg is the * variable register that we are working on, and src_reg is a constant or we're * simply doing a BPF_K check. */ static void reg_set_min_max(struct bpf_reg_state *true_reg, struct bpf_reg_state *false_reg, u64 val, u8 opcode) { ...
def compute_task_params(self, observation: Dict): dst_idx = None if self.command is None: if self.opt.obs_mode == "gt": if self.task == "place": src_idx = self.opt.scene_place_src_idx elif self.task == "stack": src_idx =...
With two minutes left in the first half, the Bengals led the Seahawks, 10-3, on Sunday. Cincinnati called a play-action pass, but the pocket collapsed on the rookie quarterback Andy Dalton as he began to execute the fake handoff. With multiple Seahawks players crashing toward him, Dalton stepped up and fired a bomb int...
<reponame>tosyama/palan /// Array item model class definition. /// /// PlnArrayItem returns item of array /// that indicated by index. /// e.g.) a[3] /// /// @file PlnArrayItem.cpp /// @copyright 2017-2019 <NAME> #include "boost/assert.hpp" #include "../../PlnConstants.h" #include "PlnArrayItem.h" #include "PlnMulOpe...
/* * Displays a minimap * * Copyright (c) 2013 <NAME>, (<NAME>) * * This file is part of the Simutrans project under the artistic licence. * (see licence.txt) */ #ifndef gui_gui_map_preview_h #define gui_gui_map_preview_h #include "gui_komponente.h" #include "../../simcolor.h" #include "../../display/simgraph....
export * from './add-warehouse-products-table.component';
#Author: <NAME> 2019 #merge tables import pandas as pd import click # options @click.command() @click.option('--counts', 'counts_file', required=True, type=click.Path(exists=True, readable=True), help='Barcodes (DNA or RNA).') @click.option('--assignment', ...
// Log calls Log() on the wrapped logger appending the Context's values func (l *Context) Log(keyvals ...interface{}) { if l == nil || IsDisabled(l.Logger) { return } l.Logger.Log(copyIfDynamic(addArrays(l.KeyVals, keyvals))...) }
package main import ( "bufio" "fmt" "log" "os" "crypto/sha512" "encoding/json" "github.com/it-chain/bifrost" "github.com/it-chain/bifrost/conn" "github.com/it-chain/bifrost/mux" "github.com/it-chain/bifrost/pb" "github.com/it-chain/heimdall/auth" "github.com/it-chain/heimdall/key" ) func CreateHost(ip s...
Calcium-dependent arrhythmias in transgenic mice with heart failure. Transgenic mice overexpressing the inflammatory cytokine tumor necrosis factor (TNF)-alpha (TNF-alpha mice) in the heart develop a progressive heart failure syndrome characterized by biventricular dilatation, decreased ejection fraction, atrial and v...
package maze import ( "fmt" "math/rand" "time" "zura.org/vector" ) const ( Road int = iota Wall ) const ( axisX int = iota axisY ) type Maze struct { Map [][]int Width int Height int } func New(w, h int) *Maze { rand.Seed(time.Now().UnixNano()) m := new(Maze) m.setSize(w, h) m.allocMap() retur...
def is_cfcli_mta_available(self): is_available = False result, error = self.call_subprocess(['cf', 'deploy']) version = None if error == True: is_available = False elif error == False and 'not a registered command' in result: is_available = False e...
/** * {@link OperatesOnDeploymentAwareProvider} implementation to * provide {@link CamelContextRegistry} injection to {@link ArquillianResource}- * annotated fields. * * @author Thomas.Diesler@jboss.com * @since 19-May-2013 */ public class CamelContextRegistryProvider implements ResourceProvider { @Inject ...
package cmd import ( "os" "testing" "github.com/stretchr/testify/assert" ) func TestGetShipmentEnvironment(t *testing.T) { if !*integrationTest || *usernameTest == "" || *passwordTest == "" { t.SkipNow() } os.Unsetenv("HC_CONFIG") //login token, err := harborLogin(*usernameTest, *passwordTest) assert.No...
def save(self, to_dir, compressionlevel=9): if os.path.exists(to_dir) and not os.path.isdir(to_dir): raise Exception(f'Not a directory : {to_dir}') elif not os.path.exists(to_dir): os.makedirs(to_dir, mode=int('0755', 8)) _save(os.path.join(to_dir, FILE_USER_FST_DATA), se...
/** * A transition is a pair from one state to another. * * @param <State> The state enum type. */ private static final class Transition<State> { /** The state to transition from. */ private final State startState; /** The state to transition to. */ private final Sta...
def WriteSerialized(cls, attribute_container): json_dict = cls.WriteSerializedDict(attribute_container) return json.dumps(json_dict)
//Spawn the animated-element func (spawner *StaticSpawner) Spawn(animatedelementID string, moveDirection state.Direction) { timer := time.NewTimer(spawner.timeMs) animatedElement := spawner.players[animatedelementID] delete(spawner.players, animatedelementID) spawner.playersWaitingForSpawn[animatedelementID] = anim...
<filename>bytedance/src/main/java/io/basc/start/bytedance/poi/PoiExtHotelSkuRequest.java package io.basc.start.bytedance.poi; import io.swagger.v3.oas.annotations.media.Schema; import java.io.Serializable; import java.util.List; public class PoiExtHotelSkuRequest implements Serializable { private static final long ...
<reponame>AnnexCloudSAP/SAP-Cloud-Commerce-2005 package com.annexcloud.dao.impl; import com.annexcloud.dao.AnnexCloudSegmentDao; import de.hybris.platform.acceleratorservices.model.email.EmailAddressModel; import de.hybris.platform.basecommerce.model.site.BaseSiteModel; import de.hybris.platform.personalizationservice...
def reset(serial, yes): local_print("Reset is only possible 10secs after plugging in the device.", "Please (re-)plug in your Nitrokey FIDO2 now!") if yes or AskUser.yes_no("Warning: Your credentials will be lost!!! continue?"): local_print("Press key to confirm -- again, your credentials...
/** * Performs increments of visit count of the given IP. * * @param ip The IP to increment * @param amount The amount to increment */ @WriteOnly public void increment(String ip, long amount) { keyValueTable.increment(Bytes.toBytes(ip), amount); }
The latest version of Google's self-driving car - a pod-like two-seater that needs no gas pedal or steering wheel - has made its debut on the roads around Mountain View. This prototype is the first vehicle built from scratch for the purpose of self-driving, Google says. The technology giant's mission is to have drive...
Implant site preparation using a single bur versus multiple drilling steps: 4-month post-loading results of a multicenter randomised controlled trial. PURPOSE To compare the clinical outcome of implants inserted in sites prepared with a simplified protocol consisting of one single drill versus multiple conventional dr...
<gh_stars>10-100 # Copyright (c) Barefoot Networks, Inc. # Licensed under the Apache License, Version 2.0 (the "License") from p4_hlir.hlir import p4_counter, P4_DIRECT, P4_COUNTER_BYTES from programSerializer import ProgramSerializer from compilationException import * import ebpfTable import ebpfProgram class EbpfC...
On the Distance Between the Rumor Source and Its Optimal Estimate in a Regular Tree This paper addresses the rumor source identification problem, where the goal is to find the origin node of a rumor in a network among a given set of nodes with the rumor. In this paper, we focus on a network represented by a regular tr...
def add_commit_push(show=True): branch = ewm.get_branch_name() files = [x.split(' ', 1)[-1] for x in ewm.get_status()] message = 'Changed ' + ', '.join(files) + ' in branch ' + branch return bh.run( 'git add .; git commit -m "{}"; git push'.format(message), show=show )
//=--------------------------------------------------------------------------= // ExistInprocServer [RegisterUnknownObject Helper] //=--------------------------------------------------------------------------= // Checks for the Implemented Categories key under a given key // // Parameters: // riid - [in] CLSID of...
import { BadRequestException, Injectable, Logger, NotFoundException, } from '@nestjs/common'; import { ConfigService } from '@nestjs/config'; import { UserRepository } from 'modules/user/repositories/user/user.repository'; import { CONFIG } from 'config/config-keys'; import { UserDocument } from 'modules/user/e...
/** * Uses the specified producer to send the specified message. * * @param producer the producer * @param message the message * @param retryTimes times for retry * @return a {@code SendResult} * @throws TooManyRetryException if too many retry occurs */ public static final ...
/** * Factory to create objects that are stored in the InMemory store. * */ public class StoreManagerImpl implements StoreManager { private static final String UNKNOWN_REPOSITORY = "Unknown repository "; private static final String CMIS_READ = "cmis:read"; private static final String CMIS_WRITE = "cmis...
Microsoft plans to give $75 million to nonprofits that can spread computer science education throughout the world, CEO Satya Nadella said on Wednesday during Salesforce’s annual Dreamforce conference in San Francisco. The investment is part of the company’s YouthSpark initiative to promote computer science education i...
<filename>winter-framework/src/main/java/de/uni_mannheim/informatik/dws/winter/webtables/app/ShowTableData.java<gh_stars>10-100 /* * Copyright (c) 2017 Data and Web Science Group, University of Mannheim, Germany (http://dws.informatik.uni-mannheim.de/) * * Licensed under the Apache License, Version 2.0 (the "Lice...
<filename>api/schema/student/__init__.py from .schema import StudentProfileMutation, RegisterStudentInput, StudentQuery, StudentInput
// Copyright (c) HashiCorp, Inc. // SPDX-License-Identifier: MPL-2.0 package plugin import ( "context" "testing" "google.golang.org/grpc" "github.com/hashicorp/go-plugin" "github.com/hashicorp/vault/sdk/logical" "github.com/hashicorp/vault/sdk/plugin/pb" ) func TestStorage_GRPC_ReturnsErrIfStorageNil(t *test...
A “two-eyed seeing” approach to Indigenizing nursing curricula Educational institutions, including schools of nursing, find themselves in significant times, as they work to Indigenize programs, and strive to repair and heal relationships with Indigenous peoples as recommended in the Truth and Reconciliation Commission...
import GravidKravState from './GravidKravState'; interface GravidKravProps { state?: GravidKravState; } export default GravidKravProps;
<reponame>g6tech/spring-corp<filename>src/main/java/spring/corp/framework/configuracao/ManagerSetting.java package spring.corp.framework.configuracao; import java.io.BufferedReader; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.uti...
The multifarious oxytocin: a review Oxytocin over centuries has always been regarded as the drug of paramount importance during childbirth. Oxytocin, a peptide hormone facilitates parturition and breastfeeding. These nine amino acid peptides have presently been found to be associated with a wide variety of pathophysio...
{-# LANGUAGE OverloadedStrings #-} import Control.Applicative import Control.Monad import Data.List import Data.Maybe process [] = [] process [a] = [a] process (a:b:c) | a=='R' && b=='U' = 'D' : (process c) | a=='U' && b=='R' = 'D' :(process c) | otherwise = a: (process (b:c)) main = do getLine...
Functional Magnetic Resonance Imaging Study of Thymus Activation Induced by Different Intensity Electrical Stimulation Functional magnetic resonance imaging (fMRI) was used to observe the activation response of the hypothalamus under different intensity electrical stimulation, and to explore the role of thalamus in th...
/* * This is where you parse your lower-case arguments. * the format was defined in the lm_optstr assignment * in benchmark_init */ int benchmark_optswitch(int opt, char *optarg) { debug("benchmark_optswitch\n"); switch (opt) { case 'm': optm = atoi(optarg); break; case 's': opts = atoi(optarg); b...
#ifndef ICOLLIDER_HPP #define ICOLLIDER_HPP #include <Core\Vector.h> #include <Core\Rect.hpp> template <class T> class QuadTreeNode; template<class T> class ICollider { public: QuadTreeNode<T>* node; bool update; Core::Rect<float&> rect; inline ICollider(float& x=0, float& y=0, float& w=0, float& h=0) : rect(x...
/** * Merge two arrays into a sorted array * @param a the first array * @param b the second array */ private void mergeArray(int[]a,int[]b) { int[]c = new int[a.length+b.length]; int s = 0; for(int i = 0; i < c.length; i++) { if(i<a.length) ...
Mitochondrial DNA: Epigenetics and environment Maintenance of the mitochondrial genome is essential for proper cellular function. For this purpose, mitochondrial DNA (mtDNA) needs to be faithfully replicated, transcribed, translated, and repaired in the face of constant onslaught from endogenous and environmental agen...
Combined Partial Test Vector Reuse and FDR Coding for Two Dimensional SoC Test Compression This paper proposes a novel approach to core based SoC test compression. Research works show that almost all the test vectors have the same part in common. Therefore there exists such a vector, from which parts of each test vect...
<gh_stars>100-1000 #include <cctbx/boost_python/flex_fwd.h> #include <cctbx/sgtbx/space_group_type.h> #include <cctbx/sgtbx/space_group_hash.h> #include <boost/python/tuple.hpp> #include <boost/python/class.hpp> #include <boost/python/args.hpp> #include <boost/python/return_arg.hpp> #include <scitbx/boost_python/utils...
def __mlx_irq_to_queue_idx(self, irq): mlx5_fp_irq_re = re.compile("mlx5_comp(\d+)") mlx4_fp_irq_re = re.compile("mlx4\-(\d+)") m5 = mlx5_fp_irq_re.search(self.__irqs2procline[irq]) if m5: return int(m5.group(1)) else: m4 = mlx4_fp_irq_re.search(self.__irq...
def zero_cross(sig): return len(np.where(np.diff(np.sign(sig)))[0])
def mp3gen(): global music_listing if music_listing is not None: return if sys.platform != 'darwin' \ and sys.platform != 'win32' \ and not sys.platform.startswith('linux'): print "Music only enabled on darwin, win32, and linux." return music_listing = [] ...
/*****************************************************************************/ /** Loads the core skeleton. * * This function loads the core skeleton from a file. * * @param strFilename The file from which the core skeleton should be loaded * from. * * @return One of the following valu...
# MC621 - Desafios de Programacao II - 2s2020 # Contest: 20/11/2020 # Problema F: Buy the String # leitura do numero de casos testes t = int(input()) # leitura dos casos testes for _ in range(t): # descricao do caso teste n, c0, c1, h = map(int, input().split()) # leitura da string binaria em questao s = lis...
n = int(input()) x = list(map(int, input().split())) pdlist = [] for i in range(max(x) + 1): p = i dlist = [] for j in x: dlist.append(int((int(j) - int(p)) ** 2)) sumd = sum(dlist) pdlist.append(sumd) minpdlist = min(pdlist) print(minpdlist)
#include "Classes/ObjectPlacement/ObjectPlacementModule.h" #include "Classes/ObjectPlacement/Private/ObjectPlacementData.h" #include "Classes/ObjectPlacement/Private/ObjectPlacementSystem.h" #include "Classes/Qt/Scene/SceneEditor2.h" #include "Classes/Qt/Scene/System/ModifSystem.h" #include "Classes/SceneManager/Scene...
#include <stdio.h> #include <string.h> #include <stdlib.h> struct range { int start; int end; }; #define max(a,b) ((a) > (b) ? (a) : (b)) #define min(a,b) ((a) < (b) ? (a) : (b)) #define BUF_SIZE 20 int main(void) { struct range range0, range1; char line[BUF_SIZE]; FILE* fp = stdin; if(!fgets(line, BUF_...
a,b,c,d=map(int, input().split(' ')) if c*2<d : print(-1) exit() elif ( d*2>=a*2) or( d*2>=b*2) : print(-1) exit() else: res=0 for i in range(2*a): if (i>=c) and (i<=2*c) and (i>=d) and (i<=2*d): res=i break; if (res!=0) :print(2*a,2*b,i,sep='\n',en...
/***************************************************************************** * CSRDlg::CreateRecoContext * *---------------------------* * Description: * This creates a new instance of the recognizer with whatever is the * current defaults for the recognizer. * The "fInitialize" argument is...
// NewClient creates a pubsubhubbub client func NewClient(hubURL string, callbackURL string, from string) *Client { return &Client{ hubURL: hubURL, callbackURL: callbackURL, from: from, httpClient: &http.Client{}, } }
<reponame>cogwirrel/html-to-pdf-puppeteer-lambda<filename>lib/html-to-pdf-puppeteer-lambda-stack.ts<gh_stars>0 import * as cdk from '@aws-cdk/core'; import * as lambda from '@aws-cdk/aws-lambda'; import * as apigateway from '@aws-cdk/aws-apigateway'; import * as iam from '@aws-cdk/aws-iam'; export class HtmlToPdfPuppe...
#include<stdio.h> #include<stdlib.h> int main() { int a; long int x,y,y1,y2; scanf("%d%ld%ld",&a,&x,&y); y1 = y/a; y2 = y%a; if(y2!=0 && (y1==0 || y1%2==1) && (2*x<a && 2*x>-1*a)) { if(y1==0) printf("1\n"); else printf("%ld\n",((y1-1)/2)*3+2); } else if(y2!=0 && y1!=0 && y1%2==0 && x!...
<reponame>CodeFreezr/rosettacode-to-go<filename>tasks/Least-common-multiple/least-common-multiple.go package main import ( "fmt" "math/big" ) var m, n, z big.Int func init() { m.SetString("2562047788015215500854906332309589561", 10) n.SetString("6795454494268282920431565661684282819", 10) } func main() { fmt.P...
<gh_stars>0 import api from functools import * import requests r = requests.get(url=api.GET_QUESTION_STATUS, auth=(api.USER, api.PWD), headers=api.headers, timeout=10, verify=False) with open('weburl.txt','w') as f: f.write(reduce(lambda a,b:a+"\n" +b,[i['attack']['web_ip'] for i in r.json()['AiChallenge']])) with ...
package rbac const identityHeader = `X-RH-Identity` // PaginatedBody represents the response body format from the RBAC service type PaginatedBody struct { Meta PaginationMeta `json:"meta"` Links PaginationLinks `json:"links"` Data interface{} `json:"data"` } // PaginationMeta contains metadata for paginati...
/** * Modified to add a "completed" flag, which lets the caller know if the case instance has run to completion without encountering a wait state or experiencing an error/ exception. * * @author Tijs Rademakers */ public class CaseInstanceResponse { protected String id; protected String name; prot...