content
stringlengths
10
4.9M
def f(n): if n%2==0: return n//2 else: return 3 * n + 1 s = int(input()) array = [] while s not in array: array.append(s) s = f(s) print(len(array)+1)
What follows is a journal written by one of the operatives in the second XCOM campaign, Alan Robertson. Operation Starving Shield – April 20th,2035 Today’s mission sees us heading back to East Africa. Today, we are tasked with recovering a data vault from an ADVENT facility in the slums district of Cairo. We recently...
<reponame>HM-DTLab-WiSe20-21-Alzheimer/WiSe20-21-Alzheimer-Vergissmeinnicht package vergissmeinicht.helper; import com.amazonaws.services.dynamodbv2.AmazonDynamoDB; import com.amazonaws.services.dynamodbv2.document.*; import com.amazonaws.services.dynamodbv2.model.*; import org.json.*; import java.util.*; public fina...
#include<iostream> #include"mytime1.h" Time::Time() { hours=minutes=0; } Time::Time(int h,int m) { hours=h; minutes=m; } void Time::AddMin(int m) { minutes+=m; hours+=minutes/60; minutes%=60; } void Time::AddHr(int h) { hours+=h; } void Time::Reset(int h,int m) { hours=h; minutes=m; } Time Time::operator+(cons...
Results The Pentagon created a toll-free hotline to report potential exposure and seek medical screening. As of March 2015, 544 people had called the hotline to report being exposed. In late 2014, the Pentagon formed a group, led by Brad R. Carson, under secretary of the Army, to identify service members potentially e...
package me.moodcat.core.mappers; import static javax.ws.rs.core.Response.Status.NOT_FOUND; import javax.persistence.EntityNotFoundException; import javax.ws.rs.core.Response; import javax.ws.rs.ext.Provider; /** * This ExceptionMapper maps {@link EntityNotFoundException EntityNotFoundExceptions} in such a way * th...
<reponame>DragonRoar/deep-radiomics-glioma from .vq_module import VQModule as VQ
/** * Util class for encoding/decoding boolean values for {@link EnumFacing}s on * bit level. * * @author Oliver Kahrmann * */ public final class FaceBitmap { private FaceBitmap() { // Util Class } public static boolean isSideBitSet(byte bitField, EnumFacing side) { int oper = 1 << side.ordinal(); retu...
/// convert pyarray object to persia tensor /// this function will panic when meet some datatype numpy::Datatype can't support fn convert_pyarray_object_to_tensor_impl( pyarray_object: &PyAny, dtype: &PyAny, name: Option<String>, python: Python, ) -> TensorImpl { let dtype: &PyArrayDescr = dtype.dow...
// Copyright 2020 The Kubernetes Authors. // SPDX-License-Identifier: Apache-2.0 package polling import ( "context" "fmt" "time" "k8s.io/apimachinery/pkg/api/meta" cmdutil "k8s.io/kubectl/pkg/cmd/util" "k8s.io/kubectl/pkg/scheme" "sigs.k8s.io/cli-utils/pkg/kstatus/polling/clusterreader" "sigs.k8s.io/cli-util...
/** * The <code>DecoderInfo</code> object contains the neccessary data to * initialize a decoder. A track either contains a <code>DecoderInfo</code> or a * byte-Array called the 'DecoderSpecificInfo', which is e.g. used for AAC. * * The <code>DecoderInfo</code> object received from a track is a subclass of * t...
Starting a new corporation is not an easy task. Even with veterans of Eve, beginning something new while creating the infrastructure, and willing a corporation into existence requires tremendous effort. Combine that with the monumental task of building an alliance from scratch at the same time, and even a veteran is in...
<gh_stars>0 /*#pragma config(Motor, port2, FrontLeft, tmotorVex393HighSpeed_MC29, openLoop) #pragma config(Motor, port3, FourBar, tmotorVex393HighSpeed_MC29, openLoop) #pragma config(Motor, port4, BackLeft, tmotorVex393HighSpeed_MC29, openLoop) #pragma config(Motor, p...
package com.example; import io.undertow.Undertow; import io.undertow.server.handlers.PathHandler; import io.undertow.servlet.Servlets; import io.undertow.servlet.api.DeploymentInfo; import io.undertow.servlet.api.DeploymentManager; import io.undertow.servlet.api.ServletContainer; import io.undertow.servlet.api.Servlet...
<filename>src/org/semanticweb/cogExp/core/AbstractSequentInferenceRule.java package org.semanticweb.cogExp.core; import java.util.ArrayList; import java.util.List; public class AbstractSequentInferenceRule implements SequentInferenceRule { @Override public boolean isApplicable(Sequent s) { // TODO Auto-generated me...
// TODO: coord on triangle, see Embree's documentation void Scene::getIntersectionInfo(const Intersection &intersection, IntersectionInfo *info) { info->primitive = makeRef<const Primitive>(&fetchIntersectedPrimitive(intersection)); info->distance = intersection.hitDistance(); info->wo = Vec3f(-intersection...
<reponame>ashkrishan/jbwizard<gh_stars>0 import { Component, OnInit } from "@angular/core"; import { Comment } from "./comment.model"; import { CommentService } from "./comment.service"; @Component({ selector: 'app-comment-list', template: ` <div class="col-md-8 col-md-offset-2"> <app-comm...
/// The distinct identification string as required by regulation for a human cell, /// tissue, or cellular and tissue-based product. pub fn distinct_identifier(&self) -> Option<&str> { if let Some(Value::String(string)) = self.value.get("distinctIdentifier") { return Some(string); } ...
import {ADTBase} from '../base/base'; import {ADTPriorityQueueChildren} from './priority-queue-children'; import {ADTPriorityQueueComparator} from './priority-queue-comparator'; import {ADTPriorityQueueOptions} from './priority-queue-options'; import {ADTPriorityQueueState} from './priority-queue-state'; import {ADTQue...
def crossover_chromosomes( self, parent_1, parent_2 ) -> Tuple[Chromosome, Chromosome]: if self.crossover_type == "single_point": crossover = self.single_point_crossover else: crossover = self.single_point_crossover if random.random() < self.crossover_probabil...
/** * This drain is similar to the one provided? * @param drain Drain to compare with * @return TRUE if they are similar */ private boolean similar(final Temporary drain) { return this.work.owner().equals(drain.work.owner()) && this.work.rule().equals(drain.work.rule()) ...
"""Convert problem settings.""" import copy from test.core.derivatives.utils import get_available_devices from typing import Any, Iterator, List, Tuple import torch from torch import Tensor from torch.nn.parameter import Parameter from backpack import extend from backpack.utils.subsampling import subsample def mak...
<reponame>SilentEight/cloud-nuke package aws import ( "fmt" "math" "strings" "sync" "time" "github.com/hashicorp/go-multierror" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-go/service/s3" "github.com/gruntwork-io/go-...
Following the misfire that was Margaret Cho’s 1994 sitcom All-American Girl, it took 20 years before ABC — or any other network — would take a chance on a series led by an Asian-American cast. As Viola Davis noted in her history-making Emmys speech on Sunday, “The only thing that separates women of color from anyone el...
package scripting import ( "context" "time" ) // TestOutcome reflects the task status. type TestOutcome string const ( TestOutcomeSuccess = "success" TestOutcomeFailure = "failure" TestOutcomeTimeout = "timeout" ) type TestOptions struct { Name string `bson:"name" json:"name" yaml:"name"` Args [...
""" Check that CCL works correctly. """ import pytest import numpy as np from cobaya.model import get_model from cobaya.likelihood import Likelihood class CheckLike(Likelihood): """ This is a mock likelihood that simply forces soliket.CCL to calculate a CCL object. """ def logp(self, **params_valu...
<gh_stars>10-100 use crate::command::trove::CommandTrove; use crate::gui::prompts::{prompt_input, prompt_input_validate}; use serde::{Deserialize, Serialize}; pub trait Parsable { fn parse_arguments(matches: &clap::ArgMatches) -> Self; } #[derive(Debug, Clone, Serialize, Deserialize)] pub struct HoardCommand { ...
<gh_stars>1-10 /* * LiskHQ/lisk-commander * Copyright © 2019 Lisk Foundation * * See the LICENSE file at the top-level directory of this distribution * for licensing information. * * Unless otherwise agreed in a custom licensing agreement with the Lisk Foundation, * no part of this software, including this file...
-- We deliberately want to ensure the function we add to the rule database -- has the constraints we need on it when we get it out. {-# OPTIONS_GHC -Wno-redundant-constraints #-} {-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE DerivingStrategies #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGU...
import { Component, OnInit, OnDestroy, Input } from '@angular/core' // import { BreakpointObserver } from '@angular/cdk/layout' // import { DomSanitizer } from '@angular/platform-browser' // import { ConfigurationsService } from '../../../../../../../../../library/ws-widget/utils/src/public-api' import { ActivatedRoute...
// DNSRebindFromQueryRandom is a response handler to DNS queries // It extracts the two hosts in the DNS query string // then returns either extracted hosts randomly func DNSRebindFromQueryRandom(session string, dcss *DNSClientStateStore, q dns.Question) []string { dcss.RLock() answers := []string{dcss.Sessions[se...
def initialize(self, system, env): self.system = system self.env = env self.env.process(self.scheduling())
/** * Created by ietree * 2017/5/1 */ public class ArrayBinTreeTest { public static void main(String[] args) { ArrayBinTree<String> binTree = new ArrayBinTree<String>(4, "根"); binTree.add(0, "第二层右子节点", false); binTree.add(2, "第三层右子节点", false); binTree.add(6, "第四层右子节点",...
<reponame>dmjesus89/campanha<gh_stars>0 /** @author diegomauricio * * Classe responável por representar o time */ package com.br.campanha.mvc.entity; import java.io.Serializable; import java.util.List; import javax.persistence.CascadeType; import javax.persistence.Column; import javax.persistence.Entity; import j...
/// Performs the Boolean `OR` operation against another bitstream and writes the /// result into `self`. If the other bitstream ends before `self` does, it is /// extended with zero, leaving all remaining bits in `self` as they were. impl<E, T, I> BitOrAssign<I> for BitSlice<E, T> where E: crate::Endian, T: crate::Bits...
def receive(self, receivedQueue = None): oldData = "empty" while True: if self.isReceiver: try: if self.sub.poll(timeout=0): data = self.sub.recv_multipart() if oldData != data: st...
/** * Called upon child returning and USER saying no. */ public static final SubLObject uiat_sr_rejected_assertion(SubLObject interaction, SubLObject concept) { { final SubLThread thread = SubLProcess.currentSubLThread(); { SubLObject state = user_interaction_ag...
Picture: Wikipedia Here we have some real science fiction. Researches from UK have received 228.000 pounds from the "Leverhulme Trust", to build an amorphous non-silicon biological robot. The plasmobot should be build from physarum polycephalum. This is mould, that lives in forests, gardens and wet places in general. ...
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE NoStarIsType #-} -- | Convention: -- -- @>@ Vector to the left of operator (mnemonic: v) -- @<@ Vector to the right of operator (mnemonic: v) -- @|@ Matrix to side of operator...
/** * Created by guilhermeaugusto on 15/08/2014. */ public class AlarmReciever extends BroadcastReceiver { @Override public void onReceive(Context context, Intent intent) { LogFiles.writeAlarmTriggerLog(Enums.TriggerType.Active); DataBaseHandler dataBaseHandler = new DataBaseHandl...
/* * Copyright 2002-2014 iGeek, Inc. * All Rights Reserved * 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 appli...
VOL. 130 | NO. 169 | Monday, August 31, 2015 Apple is preparing to move its Germantown store, with a “next generation” design planned for the new location. The retailer has applied for a $1.5 million building permit through the city-county Office of Construction Code Enforcement for a new storefront and interior reno...
Three. That’s the number of times Senate Majority Leader Harry Reid mentioned his favorite political targets, the billionaire Koch brothers, in a Senate Judiciary Committee hearing held Tuesday. Reid was testifying at the hearing, which was held to address a constitutional amendment to overturn the controversial 2010 ...
/** * Draw string at widget offset. * * @param gc the GC * @param offset the widget offset * @param s the string to be drawn * @param fg the foreground color */ private void draw(GC gc, int offset, String s, Color fg) { int baseline= fTextWidget.getBaseline(offset); FontMetrics fontMetrics= gc.getFont...
import platform import numpy as np import cv2 import math from skimage.filters import gaussian from skimage.feature import peak_local_max from tflite_runtime.interpreter import Interpreter from tflite_runtime.interpreter import load_delegate # edge tpu delegate names for different hardware EDGETPU_SHARED_LIB = { '...
Characterization of a human pathological immunoglobulin fragmenting during purification. A pathological immunoglobulin GI (Po), briefly characterized in plasma before purification, was found to fragment during salt precipitation to material resembling the Fab and Fc components of papain proteolysis. Termed (Fab)s and ...
/* * Get the MultiXact data to save in a checkpoint record */ void MultiXactGetCheckptMulti(bool is_shutdown, MultiXactId *nextMulti, MultiXactOffset *nextMultiOffset, MultiXactId *oldestMulti, Oid *oldestMultiDB) { LWLockAcquire(MultiXactGenLock, LW_SHARED); *nextMulti = MultiXactState-...
use std::io::Read; fn main() { let mut s: String = String::new(); std::io::stdin().read_to_string(&mut s).ok(); let mut itr = s.trim().split_whitespace(); let a: Vec<usize> = (0..9) .map(|_| itr.next().unwrap().parse().unwrap()) .collect(); let n: usize = itr.next().unwrap().parse()...
/** * Returns whether there is an active network connection or not. * <p/> * Note that an active network connection does not guarantee that there is a connection to the * internet. * * @param context the context to use to get the {@link ConnectivityManager} * @return whether there is ...
Text Size: A- A+ The Gujarat BJP has been posting videos of religious and spiritual gurus praising Prime Minister Narendra Modi, and asking their followers to ‘strengthen his hands’. New Delhi: In between their sermons on gods and goddesses and the scriptures, spiritual leaders and religious preachers in Gujarat have...
/** * Writes a PUSH_PROMISE frame to the output stream. * * @param frame the PUSH_PROMISE frame * @param out the output stream * * @throws IOException if an I/O error occurs */ private void writePushPromise(final Frame frame, final OutputStream out) throws IOException { assert...
""" This utility is called by Github Actions. It bumps the version number, unless the patch part of the major.minor.patch version is 0. This would suggest a manual major or minor release, in which case we probably don't want automatic patch increments. It's expected that setup.py contains a call to setup, where one o...
. BACKGROUND Alpine skiing and snowboarding are the most popular winter sports. These sports are also associated with a certain injury risk which, however, has steadily decreased during the past decades. During the winter season 2002/2003 the last large survey on ski injuries in Austria was performed. Among others, mo...
<gh_stars>1-10 type Result = { current: [any, any] } export function getStateFromResult(result: Result) { return result.current[0] } export function getHandlersFromResult(result: Result) { return result.current[1] }
// trimPrefix is an implementation of strings.TrimPrefix that uses caseCompare func (b *Kit) trimPrefix(s, prefix string) string { if b.hasPrefix(s, prefix) { return s[len(prefix):] } return s }
/** * The action that allows navigating to the path element */ static class NavigateAction extends DumbAwareAction { /** * The constructor */ NavigateAction() { super("Navigate to ...", "Navigate to place where path element is defined", null); } /** * {@inheritDoc} */ ...
/** * * Agent which starts the whole system core * */ public class Agent_Initiator extends PikaterAgent { private static final long serialVersionUID = -3908734088006529947L; private String fileName = null; /** * Get ontologies which is using this agent */ @Override public List<Ontology> getOntologie...
<filename>src/app/model/calculations/indicators/rsi-indicator.ts import { SmoothedMovingAverage } from '../moving-average/smoothed-moving-average'; import { ConfigurableSourceIndicator } from './configurable-source-indicator'; import { IndicatorConfiguration } from './configurable-source'; import { SimpleMovingAverage ...
def obfuscate(cls, idStr): return base64.b64encode(idStr)
<filename>callback.go package wxwork // Callback 应用回调,需加密 type Callback struct { // 企业应用接收企业微信推送请求的访问协议和地址,支持http或https协议 URL string `json:"url,omitempty" xml:"url,omitempty"` // 用于生成签名 Token string `json:"token" xml:"token"` // 用于消息体的加密,是AES密钥的Base64编码 EncodingAESKey string `json:"encodingaeskey" xml:"encodinga...
/** * Method to set up the text area */ private void initTextArea() { textArea = new JTextArea(50, 50); textArea.setLineWrap(true); textArea.addKeyListener(new textKeyListener(this)); textArea.addMouseListener(new textMouseListener(this)); }
/** * <p>Returns the saved {@link HttpResponse} for the given {@link Request}, if any.</p> * @param request The {@link Request} to retrieve from cache * @param <T> Type of object inside request * @param <I> Type of object mapped * @return Cached {@link HttpResponse} if any */ public <T, I>...
<filename>src/model/ant-sql-model.ts import { Entity, KeyGenParams } from '@antjs/ant-js'; import { AntModel } from '@antjs/ant-js/build/model/ant-model'; import { AntSqlReference } from './ref/ant-sql-reference'; import { ApiSqlColumn } from '../api/api-sql-column'; import { SqlColumn } from './sql-column'; import { S...
/* eslint-disable react/display-name */ import React, { useState } from 'react'; import { Table, Checkbox, Button, Input } from 'antd'; import { SearchOutlined } from '@ant-design/icons'; import { Link } from 'react-router-dom'; import { Chapter, Series, Languages } from 'houdoku-extension-lib'; import { ipcRenderer } ...
import numpy as np def init_maze(ax, env, state, params): im = ax.imshow(env.occupied_map, cmap="Greys") anno_pos = ax.annotate( "A", fontsize=20, xy=(state.pos[1], state.pos[0]), xycoords="data", xytext=(state.pos[1] - 0.3, state.pos[0] + 0.25), ) anno_goal = a...
package com.epul.oeuvre.domains; import javax.persistence.*; import java.sql.Date; import java.util.Objects; @Entity @Table(name = "reservation", schema = "baseoeuvre", catalog = "") @IdClass(EntityReservationPK.class) public class EntityReservation { private Integer idOeuvrevente; private Integer idAdheren...
package message import ( "CommonModule" "fmt" "time" ) // 获取服务组件信息的消息 type DownloadServiceLogMessage struct { BaseMessageInfo Service string // 服务名称 } // 生成消息 func NewDownloadServiceLogMessage(name string, pri common.Priority, tra TransType) (msg *DownloadServiceLogMessage) { MessageId++ return &DownloadSer...
import java.io.*; import java.util.*; import java.lang.Math; public class Problem { public static Cup[] solve(int n, int w, int k){ Bottle[] bottles = new Bottle[n]; Cup[] cups = new Cup[k]; double totalvolume = (double)n*w/(double)k; double lastvolume = 0; double currvolume = 0; double eps = 1e-7; fo...
/** Parse a {@link String} representation of a Bitcoin monetary value. If this * object's pattern includes a currency sign, either symbol or code, as by default is true * for instances of {@link BtcAutoFormat} and false for instances of {@link * BtcFixedFormat}, then denominated (i.e., prefixed) currenc...
// InstallPath returns unique filename for bitstream relative to given directory func (f *FileAOCX) InstallPath(root string) (ret string) { interfaceID := f.InterfaceUUID() uniqID := f.UniqueUUID() if interfaceID != "" && uniqID != "" { ret = filepath.Join(root, interfaceID, uniqID+fileExtensionAOCX) } return }
def sample_categorical(X_hat_cat_split: List[np.ndarray], C_cat_split: Optional[List[np.ndarray]]) -> List[np.ndarray]: X_ohe_hat_cat = [] rows = np.arange(X_hat_cat_split[0].shape[0]) for i in range(len(X_hat_cat_split)): proba = softmax(X_hat_cat_split[i], axis=1) ...
package com.mdd.service; import javax.ws.rs.*; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; import java.util.List; @Path("/api") public class DevFestResource { private NameGenerator _generator = new NameGenerator(); @GET @Path("hello") @Produces(MediaType.TEXT_PLAIN) publ...
import argparse import sys, os parser = argparse.ArgumentParser() parser.add_argument('pyqlabpath', help='path to PyQLab directory') parser.add_argument('qubit', help='qubit name') parser.add_argument('stop', help='longest delay in ns', type = float) parser.add_argument('step', help='delay step in ns', type = float) a...
LONDON—Policies that promote gender equality, safeguards against violence and exploitation and access to healthcare make Canada the best place to be a woman among the world’s biggest economies, a global poll of experts showed on Wednesday. Infanticide, child marriage and slavery make India the worst, the same poll conc...
def generate_vectranspose_matrix(n, k): indices = np.arange(n*k).reshape((n,k)) ind_vec = np.reshape(indices,(-1,1)) ind_T_vec = np.reshape(indices.T,(-1,1)) Tnk = np.zeros((n*k,n*k)) for i in range(n*k): Tnk[i,np.where(ind_vec == ind_T_vec[i])] = 1 return Tnk
package com.cts.training.lamda; public class LamdaExDemo { public static void main(String []args) { Hello h=(int a,int b)->a+b; System.out.println(h.add(10,20)); } } interface Hello { public int add(int a,int b); }
#include "plumber.h" int sporth_comb(sporth_stack *stack, void *ud) { plumber_data *pd = ud; SPFLOAT input; SPFLOAT out; SPFLOAT looptime; SPFLOAT revtime; sp_comb *comb; switch(pd->mode) { case PLUMBER_CREATE: #ifdef DEBUG_MODE fprintf(stderr, "comb: Creating\n"); #en...
def parse(u): if yaml is None: http://code.google.com/p/simplejson/issues/detail?id=40 and the documentation of simplejson.loads(): "If s is a str then decoded JSON strings that contain only ASCII characters may be parsed as str for performance and memory reasons. ...
def priority(self): if self.name.endswith( "_BIT" ): bias = 1 else: bias = 0 if self.category.startswith( "GL_VERSION_" ): priority = 0 elif self.category.startswith( "GL_ARB_" ): priority = 2 elif self.category.startswith( "GL_EXT_" ): priority = 4 else: priority = 6 return priority + b...
import { Context, getUserId, AuthError } from '../../utils' export const note = async (_, { id }, ctx: Context, info) => { const userId = getUserId(ctx) const hasPermission = await ctx.db.exists.Note({ id, owner: { id: userId } }) if (!hasPermission) { throw new AuthError() ...
<gh_stars>100-1000 #pragma once class CDestroyablePhysicsObject : public CPhysicObject, public CPHDestroyable, public CPHCollisionDamageReceiver, public CHitImmunity, public CDamageManager { typedef CPhysicObject inherited; float m_fHealth; ref_sound m_destroy_sound; shared_str m_destroy_particles...
/** * List displaying fragment. */ public class ListMenuFragment extends AbstractMenuNavigatorFragment { public ListMenuFragment() { super(); } private class ListMenuAdapter extends BaseAdapter { private final ListMenu listMenu; private final LayoutInflater inflater; pu...
/** * * @author Boris Heithecker */ @XmlRootElement(name = "NotenAssessmentContext") @XmlAccessorType(value = XmlAccessType.FIELD) @XmlType(propOrder = { "rangeMaximum", "floorValues", "marginModel", "marginValue", "defaultDistribution" }) public class NotenAssessmentXmlAdapter { public stat...
package solver import ( "github.com/mokiat/gomath/sprec" "github.com/mokiat/lacking/game/physics" ) var _ physics.DBConstraintSolver = (*MatchRotation)(nil) // NewMatchRotation creates a new MatchRotation constraint solver. func NewMatchRotation() *MatchRotation { return &MatchRotation{ xAxis: NewMatchAxis(). ...
<filename>Linux/demo/Android-Build-Demo/server.c #include <stdio.h> #include <unistd.h> #include "src/HPSocket4C.h" En_HP_HandleResult OnReceive(HP_Server pSender, HP_CONNID dwConnID, const BYTE* pData, int iLength) { printf("[ConnID:%d, Length: %d] %s\n", dwConnID, iLength, pData); return HR_OK; } int main(int arg...
<reponame>ross-alexander/lizards #include <assert.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <libxml++/libxml++.h> extern "C" { #include "lualib.h" #include "lauxlib.h" } #include <lizards.h> #include "local.h" /* ---------------------------------------------------------------------- -- -...
<filename>NewEngine/CityPlane/Gamepad.h #ifndef GAMEPAD_H #define GAMEPAD_H #include <Windows.h> #include <Xinput.h> // XInput Button values static const WORD XINPUT_Buttons[] = { XINPUT_GAMEPAD_A, XINPUT_GAMEPAD_B, XINPUT_GAMEPAD_X, XINPUT_GAMEPAD_Y, XINPUT_GAMEPAD_DPAD_UP, XINPUT_GAMEPAD_DPAD_DOWN, XINPUT_GA...
package graph.trans; import java.io.File; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.concurrent.ArrayBlockingQueue; import java.util.concurrent.BlockingQueue; import java.util.concurrent.RejectedExecutionHandler; import java.util.concurrent.ThreadPoolExecutor; import j...
def draw_all_objects(): window.clear() for x_offset in (-window.width, 0, window.width): for y_offset in (-window.height, 0, window.height): gl.glPushMatrix() gl.glTranslatef(x_offset, y_offset, 0) batch.draw() gl.glPopMatrix()
import math from collections import defaultdict import itertools def trial_division(n): a = [1] for i in range(2,int(math.sqrt(n)) + 1): while n % i == 0: n //= i a.append(i) a.append(n) return a N = int(input()) d = defaultdict(int) for i in range(2,N+1): for k in t...
Ubisoft's new DRM scheme is already causing problems, as the servers required to authenticate games went down today. When Ubisoft announced its new DRM system, that required PC gamers to be connected to the Ubisoft servers at all times while playing, one of the biggest concerns that gamers had is what would happen if ...
/** * Represents a count that was the result of a {@link Prospector} run. */ public class IndexEntry { private final String index; private final String data; private final String dataType; private final String tripleValueType; private final String visibility; private final Long count; pri...
import { FabrixService as Service } from '@fabrix/fabrix/dist/common' /** * @module SchemaMigrationService * @description Schema Migrations */ export class SchemaMigrationService extends Service { /** * Drop collection */ async dropModel(model, connection) { const dialect = connection.dialect.connecti...
def compressed_data_files_exist(self): if self['compressed_data_files'] is None: return False fullfile = os.path.join(self['pathname'], self['compressed_data_files'][0]) train = sfiles.CompressedFileTrain(fullfile, "traverse") try: train.open() train.c...
def start_modbus_server(self, ip, name=None, timeout=None): Rammbock.start_tcp_server(ip=ip, port=MODBUS_PORT, name=name, timeout=timeout, protocol='modbus', family='ipv4')
/** * Additional test. * Tests that whatever getPresentationName() of the last edit returns - * empty string in particular - the result doesn't change. */ public void testGetPresentationName02() { assertEquals("", ce.getPresentationName()); TestUndoableEdit.counter = 1; ce.ad...
a=int(input());print(max(i for i in [1, 6, 28, 120, 496, 2016, 8128, 32640, 130816]if a%i==0))
/** * Copyright (C) 2011 - present by OpenGamma Inc. and the OpenGamma group of companies * * Please see distribution for license. */ package com.opengamma.financial.interestrate.future.calculator; import org.apache.commons.lang.Validate; import com.opengamma.financial.interestrate.AbstractInterestRateDerivative...
The kinetics of ageing in dry-stored seeds: a comparison of viability loss and RNA degradation in unique legacy seed collections. Background and Aims Determining seed longevity by identifying chemical changes that precede, and may be linked to, seed mortality, is an important but difficult task. The standard assessmen...
<reponame>aashritha2001/hackportal import { useEffect, useState } from 'react'; import 'firebase/storage'; import firebase from 'firebase'; import Image from 'next/image'; import defaultPFP from '../public/assets/defaultPFP.jpg'; import GitHubIcon from '@material-ui/icons/GitHub'; import LinkedInIcon from '@mui/icons-m...