content
stringlengths
10
4.9M
<reponame>gismaker/lambkit-jdk1.7 package com.lambkit.generator.test; import java.util.Map; import com.beust.jcommander.internal.Maps; import com.lambkit.Lambkit; import com.lambkit.generator.GeneratorType; import com.lambkit.generator.GeneratorManager; import com.lambkit.generator.IGenerator; import com.lam...
def float64(self) -> floatType: return struct.unpack("d", self.buffer.read(8))[0]
export const mockCodeMonitorNodes = [ { id: 'foo0', description: 'Test code monitor', enabled: true, actions: { nodes: [{ enabled: true, recipients: { nodes: [{ id: 'baz' }] } }] }, }, { id: 'foo1', description: 'Second test code monitor', enabled: tru...
def _list_relations_in_schema( self, database: Optional[str], schema: Optional[str] ) -> List[_CachedRelation]: key = (lowercase(database), lowercase(schema)) to_remove: List[_CachedRelation] = [] for cachekey, relation in self.relations.items(): if (cachekey.database, ca...
// SPDX-License-Identifier: GPL-2.0 #include <test_progs.h> #include "test_stacktrace_build_id.skel.h" void test_stacktrace_build_id(void) { int control_map_fd, stackid_hmap_fd, stackmap_fd, stack_amap_fd; struct test_stacktrace_build_id *skel; int err, stack_trace_len; __u32 key, previous_key, val, duration = 0;...
<gh_stars>1-10 package langdon.math; import java.lang.reflect.Array; import java.io.InputStreamReader; import java.io.BufferedReader; import java.io.IOException; import java.util.ArrayList; import java.util.Arrays; import java.util.regex.Pattern; import java.text.ParseException; public class Simple { pri...
Nicolas Cage Turns 50: Here Are 15 Facts About Our Real Life National Treasure! What is there to say about Nicolas Cage?? He’s one of the most prolific actors of this or any generation, and nobody can float in and out of AH-MAZING and awful movies like he can. He’s won an Oscar, but he also has starred in so many box...
package io.github.mayunfei.simple.apt; import io.github.mayunfei.simple.Glide; import io.github.mayunfei.simple.RequestManager; import io.github.mayunfei.simple.manager.Lifecycle; import io.github.mayunfei.simple.manager.RequestManagerTreeNode; /** * 如果在同一个 activity 或者是 同一个 fragment 会得到同一个 GlideRequests,也就是 RequestM...
// Copyright 2015-2020 Parity Technologies (UK) Ltd. // This file is part of OpenEthereum. // OpenEthereum is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your opt...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from math import * def Gcd(ls): ls = set(ls) c = min(ls) if c == 1: return 1 for a in ls: c = gcd(c, a) return c n = int(input()) ls = list(map(int, input().split())) ls.sort() for i in range(len(ls)-1): ls[i...
/***********************************************************************************************/ /** * \fn static SHORT aggregation_vmb (dCSRmat *A, ivector *vertices, AMG_param *param, * dCSRmat *Neigh, INT *num_aggregations, INT lvl) * * \brief Form aggregation based on strongly...
/** * Create a Commons-HttpClient cookie from a Cactus cookie, with information * from the web request and the URL. * * @param theRequest The request * @param theUrl The URL * @param theCactusCookie The Cactus Cookie object * @return The HttpClient cookie */ public static org.ap...
<filename>old/mvp/tests/TestMVPTileSeeder.cxx #include <gtest/gtest.h> #include <test/Helpers.h> #include <mvp/MVPTileSeeder.h> #include <mvp/MVPAlgorithm.h> using namespace std; using namespace vw; using namespace vw::test; using namespace vw::cartography; using namespace mvp; // TODO: Write proper tests here stru...
/** * Created by shrey.garg on 30/12/16. */ public abstract class HandlerSet { protected Tune tune; protected MetaInfo metaInfo; protected RuleSet ruleSet; public HandlerSet() { } public HandlerSet(Tune tune, MetaInfo metaInfo, RuleSet ruleSet) { this.tune = tune; this.meta...
/** * <b>DOM</b>: Implements * <code>EventTarget.hasEventListenerNS(String,String)</code> from an old * draft of DOM Level 3 Events. */ public boolean hasEventListenerNS(String namespaceURI, String type) { if (eventSupport == null) { return false; } if (namespaceU...
import numpy as np import os import cv2 import pandas as pd from tqdm import tqdm from chainercv.datasets import VOCSemanticSegmentationDataset from chainercv.evaluations import calc_semantic_segmentation_confusion from adp.adp_semantic_segmentation_dataset import ADPSemanticSegmentationDataset from deepglobe.deepglob...
<gh_stars>1-10 // Copyright (C) 2017-2018 Intel Corporation // // SPDX-License-Identifier: Apache-2.0 package com.intel.dai.procedures; import java.lang.*; import org.voltdb.*; /** * */ public class ComputeNodeCommon extends VoltProcedure { public final SQLStmt selectComputeNodeHistoryWithThisTimestamp = new...
import { TokenDecoder } from '@usecases/protocols/cryptography/token-decoder' import { TokenSetGenerator } from '@usecases/protocols/cryptography/token-set-generator' import { LoadAccountByEmailRepository } from '@usecases/protocols/account/load-account-by-email-repository' import { AccountPublicModel, TokenSet } from ...
/** * @author Eugene Zhuravlev */ public class ParamAnnotation implements RW.Savable{ public static final ParamAnnotation[] EMPTY_ARRAY = new ParamAnnotation[0]; public final int paramIndex; public final @NotNull TypeRepr.ClassType type; public ParamAnnotation(int paramIndex, @NotNull TypeRepr.ClassType typ...
import * as React from 'react'; import Card from '@material-ui/core/Card'; import CardActionArea from '@material-ui/core/CardActionArea'; import CardActions from '@material-ui/core/CardActions'; import CardContent from '@material-ui/core/CardContent'; import CardMedia from '@material-ui/core/CardMedia'; import ...
<reponame>Ali-RS/jme-swing-devkit<filename>src/main/java/com/jayfella/devkit/forms/ImportModel.java package com.jayfella.devkit.forms; import com.intellij.uiDesigner.core.GridConstraints; import com.intellij.uiDesigner.core.GridLayoutManager; import com.intellij.uiDesigner.core.Spacer; import com.jayfella.devkit.confi...
// Checks for the current browser context if the user is affiliated. bool IsPermittedToGetDeviceAttributes(content::BrowserContext* context) { const user_manager::User* user = chromeos::ProfileHelper::Get()->GetUserByProfile( Profile::FromBrowserContext(context)); return user->IsAffiliated(); }
/** * Find game provider embedded into the Fabric Loader jar, best effort. * * <p>This is faster than going through service loader because it only looks at a single jar. */ private static GameProvider findEmbedddedGameProvider() { try { Path flPath = UrlUtil.getCodeSource(Knot.class); if (flPath == null...
#include "rpc_serializer.h" #include <string.h> #ifdef _WIN32 # include <winsock2.h> #else # include <sys/socket.h> typedef int SOCKET; #endif #ifndef _cplusplus #ifndef _WIN32 # include <stdbool.h> #endif #endif void RPCSerializer_Init(RPCSerializer* self, uint8_t* Buffer, uint32_t sz) { self->BufferPtr =...
Ousmane Dembele could be back in time for Barcelona's December Clasico against Real Madrid, the specialist who operated on his tendon injury has said. Dembele, Barca's record signing ruptured a tendon in only his third appearance after joining from Borussia Dortmund for an initial €105 million in August. He was initi...
Breakthrough in delirium research 'solves 2,500-year-old mystery' Posted Australian researchers say they have made a significant breakthrough in identifying the cause of delirium, a brain-related condition which affects up to 50 per cent of elderly hospital patients. Key points: Delirium is a brain syndrome common i...
def variables(texto_eqn): texto_eqn = '1*' + texto_eqn texto_eqn = ajustes(texto_eqn) parent_abrir = buscainds(texto_eqn, '(') cambios = [] for posicion in parent_abrir: if posicion > 0: pos_check = posicion - 1 if esalfanum(texto_eqn[pos_check]): Es...
Pranab Mukherjee, then finance minister, greets Sheikh Hasina in New Delhi in 2010 New Delhi, April 6: The curtain will come down on Sunday on what is, in all likelihood, the last instance of personal chemistry determining the course of diplomacy in a 45-year-old association when President Pranab Mukherjee, breaking w...
// TODO: [P2] #3976 We should export this to allow web developers to bring in their own microphone. // For example, it should enable React Native devs to bring in their microphone implementation and use Cognitive Services Speech Services. import { AudioConfig } from 'microsoft-cognitiveservices-speech-sdk'; imp...
/* This file is part of: NoahFrame https://github.com/ketoo/NoahGameFrame Copyright 2009 - 2020 NoahFrame(NoahGameFrame) File creator: lvsheng.huang NoahFrame is open-source software and you can redistribute it and/or modify it under the terms of the License; b...
def reset(self): if self.read_only: raise TypeError("Config is read-only") self.update(copy_dict(self.init_config), force_update=True)
Story highlights Mobile gaming is a big focus of mobile-tech trade show in Barcelona Raj Talluri says gaming is now a necessity for mobile devices More than 60% of users regularly play games on their mobile gadgets Intel has invested in the mobile sector with technology like its 1.66Ghz Intel Atom processor The sma...
/**************************************************************************/ /* version.h */ /**************************************************************************/ /* This file is part of: */ /* ...
def create_heatmap(self, key, full_df, nmb): f_time_lst = [] nmb_heatmaps = nmb interval = round((len(full_df.index) - 1) / nmb_heatmaps, 0) for i in range(nmb_heatmaps): j = int(interval * (i + 1)) f_time = full_df.index[j] f_time_lst.append(f_time) ...
palavra = raw_input() trecho = raw_input() print palavra.count(trecho)
class CartServer: """ Cartesian space planning ROS service. """ def __init__(self, server_name, robot, db): self.robot = robot self.server = rospy.Service( 'ompl_lin_planning', LINPlanning, lambda x: self.handle_request(x) ) self.db = db ...
import { SWFFile } from "../format/swf"; import { OutputContext } from "../output/context"; import { generateCharacters } from "./characters"; import { generateProperties } from "./properties"; export async function translateSWF(ctx: OutputContext, swf: SWFFile) { await generateCharacters(ctx, swf); generateProper...
/* * Echo Service * * Echo Service API consists of a single service which returns a message. * * OpenAPI spec version: version not set * * Generated by: https://github.com/swagger-api/swagger-codegen.git */ package echo // Embedded represents a message embedded in SimpleMessage. type ExamplepbEmbedded struc...
/** * Gives the track section represented by the given character. * * @param representation character representation; should be a valid value * @return track section */ static TrackSection of(char representation) { return Stream.of(TrackSection.values()) .filter(section...
/** * An executor for handlers implementing the * {@link com.amazonaws.services.lambda.runtime.RequestStreamHandler} interface. */ public class RequestStreamHandlerExecutor extends Executor { private static final Logger _LOG = LogManager.getLogger(RequestStreamHandlerExecutor.class); /** * @param userH...
#include<bits/stdc++.h> using namespace std; #define file_io ifstream cin("input.txt"); ofstream cout("output.txt"); #define f first #define s second #define ll long long #define mp make_pair const int Maxn = 1000+10, Mod = 1000*1000*1000+7; int n, dp[Maxn][Maxn], t[Maxn]; vector < pair < int, int > > a...
// GetAsValueUnitStringArrays Get all the values of the strings values for the given field name func (entry Entry) GetAsValueUnitStringArrays(key string) (strvalues [][2]string, exists bool) { values, keyExists := entry.fields[key] var strArrvalues [][2]string for _, interfaceValue := range values { strArrvalues =...
Experimental validation of gas leak detection in screw thread connections of galvanized pipe based on acoustic emission and neural network Galvanized steel pipes with screw thread connections are widely used in the household part of urban gas distribution system. For such pipes, leakages usually occur at the connectio...
/** * A material substance originating from a biological entity intended to be transplanted or infused into another (possibly the same) biological entity. */ @ResourceDef(name="BiologicallyDerivedProduct", profile="http://hl7.org/fhir/StructureDefinition/BiologicallyDerivedProduct") public class BiologicallyDerive...
A 387.6fs Integrated Jitter and -80dBc Reference Spurs Ring based PLL with Track- and-Hold Charge Pump and Automatic Loop Gain Control in 7nm FinFET CMOS This paper presents a phase-locked loop that employs a track-and-hold charge pump and automatic loop gain control to enhance the jitter and spur performance against ...
from .nanopub_blueprint import nanopub_blueprint from .delete_nanopub import delete_nanopub as __delete_nanopub from .get_nanopub import get_nanopub as __get_nanopub from .post_nanopub import post_nanopub as __post_nanopub from .put_nanopub import put_nanopub as __put_nanopub
/** * Update instance to service. * * @param namespaceId namespace * @param serviceName service name * @param instance instance * @throws NacosException nacos exception */ public void updateInstance(String namespaceId, String serviceName, Instance instance) throws NacosException { ...
def fetch_plugin_file(self, plugin_name, *path): url = self.url_to_plugin_file(plugin_name, *path) path = self.path_to_plugin_file(plugin_name, *path) self.ensure_dir_for_file_exists(path) self.fetch_resource(url, path) return url, path
#!/usr/bin/env python3 from threading import Thread from flask import Flask, request from flask_restplus import Resource, Api, fields from parser import parse_instructions from io import open from os.path import isfile app = Flask(__name__) api = Api(app) program = api.model('program', { 'instructions': fields.Li...
As multiple scandals and controversies continue to envelop the White House, the Trump administration is largely in hiding from the media. It has now been over a week since the last on-camera press briefing, and there have also been scant few television appearances by administration officials. In the face of continuing...
class Hash: """ Simplify the hashing of data or file content. :param str algo: The algorithm to use for hashing. :raise ValueError: When the given algo is not known. """ def __init__(self, algo="sha512_224"): self.algo = algo.upper() if not hasattr(hashes, self.algo):...
Rule Learning from Time-Dependent Data Applied to Fraud Detection In financial environment, fraud detection is a challenging problem with tremendous financial impacts where data is highly unbalanced, sequential and timestamped. An additional constraint comes from the fact that common machine learning methods cannot be...
import { AsyncRouter } from 'express-async-router' import { FRONTEND_HOST } from '@src/constants' import { KEYS } from '@src/middlewares/redis' import { MapsRequest } from '@src/interfaces/routes' const router = AsyncRouter() router.post('/tags', async (req: MapsRequest) => { // the host is not important here con...
from django.urls import path from rest_framework.routers import DefaultRouter from accounts.views.system_user import AccountViewSet from auth_token.views import GetAuthToken router = DefaultRouter() router.register(r'users', AccountViewSet, basename='user') urlpatterns = router.urls urlpatterns += [ path('login/'...
Now you can trade in your broken iPhone for store credit: You use to be able to trade in your old, broken iPhone with the reuse and recycle program for credit towards the new phone you are buying. Now not only are you able to trade in your broken iPhone 5s, 6 and 6 plus for store credit, Apple has also teamed up with ...
<gh_stars>0 use rosu_pp::{ osu::{OsuDifficultyAttributes, OsuPerformanceAttributes}, Beatmap, DifficultyAttributes, Mods, PerformanceAttributes, }; use super::stars; /// Calculator for pp on osu!standard maps. /// /// # Example /// /// ``` /// # use rosu_pp::{OsuPP, PpResult, Beatmap}; /// # /* /// let map: B...
// GetPEM implements the Encodable interface for PublicKey. // GetPEM encodes the associated public key in PEM format. func (k *PublicKey) GetPEM() (PEM, error) { der, err := x509.MarshalPKIXPublicKey(&k.privateKey.PublicKey) if err != nil { return nil, err } var b bytes.Buffer err = pem.Encode(&b, &pem.Block{ ...
/** * Media player using vlc4j (including media playback controls.) */ public class PhonMediaPlayer extends JPanel { private static final long serialVersionUID = -5365398623998749265L; private static final org.apache.logging.log4j.Logger LOGGER = LogManager.getLogger(PhonMediaPlayer.class.getName()); public f...
#include <bits/stdc++.h> using namespace std; int main() { int p,r; cin >> p; int a[p]; for(int i =0 ; i < p ; i ++){ cin >> a[i]; } cin >> r; int b[r]; for(int i =0 ; i < r ; i ++){ cin >> b[i]; } int count=0,ratio=0; for(int i = 0 ; i <p ; i ++){ for (int j = 0 ; j < r ; j ...
/** * Returns an arry view of this buffer's content. */ public int[] toIntArray() { int[] i = new int[currentSize]; System.arraycopy(buffer, 0, i, 0, currentSize); return i; }
package model import "github.com/jinzhu/gorm" // Article is life type Article struct { Title string Body string gorm.Model }
module Ros.Internal.Msg.MsgInfo where class MsgInfo a where sourceMD5 :: a -> String msgTypeName :: a -> String
// DefaultGenesisState returns a default genesis state // TODO pick better values func DefaultGenesisState() GenesisState { return GenesisState{ types.LiquidatorModuleParams{ DebtAuctionSize: sdk.NewInt(1000000000), CollateralParams: []types.CollateralParams{ { Denom: "ubtc", AuctionSize: s...
<reponame>like-ycy/mofang_api import logging from logging.handlers import TimedRotatingFileHandler # 按时间分割日志文件 from flask import Flask class Logger: """日志配置""" def __init__(self, app: Flask = None): if app is not None: self.init_app(app) def init_app(self, app): """ ...
<reponame>ltabis/raytracer<gh_stars>1-10 use cgmath::Vector3; use raytracer::props::{ color::Color, material::{Material, Texture}, ray::Ray, }; use raytracer::rendering::scene::Scene; use raytracer::rendering::sphere::Sphere; #[test] fn intersect_sphere_test() { let scene = Scene { width: 1000,...
import dash external_stylesheets = [ "static/css/style.css", "https://codepen.io/chriddyp/pen/bWLwgP.css", ] app = dash.Dash( "COVID19 India Tracker", external_stylesheets=external_stylesheets ) server = app.server app.config.suppress_callback_exceptions = True app.title = "Coronavirus (COVID19) India Trac...
By Savannah J. Foley ~ If you’re a writer, and I mean a Writer, then you are probably somewhat insane. Consider the following quotes for context: Writing became such a process of discovery that I couldn’t wait to get to work in the morning: I wanted to know what I was going to say. ~Sharon O’Brien First, find out w...
<reponame>manimax3/MineTest<gh_stars>1-10 #include "Texture2DArray.h" #include "SOIL/SOIL.h" Texture2DArray::Texture2DArray() { glCreateTextures(GL_TEXTURE_2D_ARRAY, 1, &m_TextureID); } Texture2DArray::~Texture2DArray() { glDeleteTextures(1, &m_TextureID); } void Texture2DArray::loadFromFiles(const std::vector<std...
Mucociliary interaction in vitro: effects of physiological and inflammatory stimuli. Mucociliary transport in the airways is governed by the interaction between ciliary activity and the depth and rheological properties of the liquids (mucus) covering the epithelial surface. A change in one of these parameters may not ...
/** * Returns the content of the description step. * * @param request * The HTTP request * @return The view */ @View( value = STEP_DESCRIPTION ) public XPage viewDescription( HttpServletRequest request ) { Map<String, Object> model = getModel( request ); ...
<reponame>celinval/kani-dev // Copyright Kani Contributors // SPDX-License-Identifier: Apache-2.0 OR MIT // Check that `copy_nonoverlapping` fails if the `src`/`dst` regions overlap. #[kani::proof] fn test_copy_nonoverlapping_with_overlap() { let arr: [i32; 3] = [0, 1, 0]; let src: *const i32 = arr.as_ptr(); ...
package phpfpm import ( "sync" "time" "wphpfpm/conf" log "github.com/sirupsen/logrus" ) // Instance : struct type Instance struct { // execPath string // args []string // env []string // processes []Process idleProcesses []*Process // php-cgi 如果沒有任何連線處理,都存在這 processes []*Process stopManage ...
<filename>common/src/main/java/de/consol/labs/aws/neptunedemoapp/common/crud/AbstractVertexAdapter.java<gh_stars>0 package de.consol.labs.aws.neptunedemoapp.common.crud; import org.apache.tinkerpop.gremlin.structure.*; import java.util.Iterator; public abstract class AbstractVertexAdapter implements Vertex { pr...
<reponame>WearyJunger/notebook<filename>java/String/String Hashing.java<gh_stars>0 Estructura para realizar operaciones de hashing. static class Hash { char[] s; int[] h; int[] pot; int p = 265; //Número pseudo-aleatorio base del polinomio (mayor al tamaño del lenguaje) long MOD = 1000000009; //Número primo gran...
import type { ZodObject, ZodType, ZodTypeDef, TypeOf as ZodTypeOf, ZodRawShape } from 'zod'; import type { BaseSchema, SchemaOf } from 'yup'; import { isIndex } from '../../shared'; /** * Transforms a Zod's base type schema to yup's base type schema */ export function toFieldValidator<TValue = any, TDef extends ZodT...
/** * The builder for this GraphServiceClient */ public static final class Builder2 { private final IAuthenticationProvider authenticationProvider; private ISerializer serializer; private IHttpProvider httpProvider; private IExecutors executors; private ILogger...
#include <stdio.h> #if 0 typedef unsigned long long ticks; static __inline__ ticks getticks(void) { ticks val; __asm__ __volatile__("rdtsc" : "=A" (val)); return val; } #else #include <time.h> typedef clock_t ticks; #define getticks clock #endif #define START_PROFILING {\ ticks start,stop;\ start...
/** * @brief Disables internal fifo for LPUART * */ void uart_hardware_t::fifo_disable() noexcept { reg_set(uart_->FIFO, LPUART_FIFO_RXFLUSH_MASK | LPUART_FIFO_TXFLUSH_MASK); reg_clear_bit(uart_->FIFO, LPUART_FIFO_RXFE_SHIFT); reg_clear_bit(uart_->FIFO, LPUART_FIFO_TXFE_SHIFT...
/** * Matches Grails' SimpleController class. * * @author Graeme Rocher * @since 1.2 */ public class GrailsControllerHandlerMapping extends AbstractHandlerMapping implements GrailsApplicationAware { public static final String MAIN_CONTROLLER_BEAN = "mainSimpleController"; private GrailsApplication grailsA...
Sally Ride showed Generation X girls the sky’s the limit — literally. In this Oct. 7, 2009 file photo, former astronaut Sally Ride speaks to members of the media. (Pablo Martinez Monsivais/Associated Press) Amid all the girl power that Ride taught women, one barrier the first American woman in space chose not to brea...
<reponame>yifeishu-com/taroify import "../../styles/style"
/** * Creates a random image and looks for corners in it. Sees if the naive * and fast algorithm produce exactly the same results. */ @Test public void compareToNaive() { GrayU8 img = new GrayU8(width, height); ImageMiscOps.fillUniform(img, new Random(0xfeed), 0, 100); GrayS16 derivX = new GrayS16(img.get...
The Lure and Limitations of Administrative Cancer Databases. 1113 Diseases of the Colon & ReCtum Volume 59: 12 (2016) ongoing critical evaluation of clinical outcomes and care delivery processes is essential for any individual, practice group, institution, and healthcare system. large national cancer databases are a c...
/** * This method updates cgd for item in solr. * * @param itemIds the item ids */ public void updateCGDForItemInSolr(List<Integer> itemIds) { if (CollectionUtils.isNotEmpty(itemIds)) { List<ItemEntity> itemEntities = itemDetailsRepository.findByIdIn(itemIds); updateC...
/** * Execute a CQL script template located in the class path and * inject provided values into the template to produce the actual script * * @param scriptTemplateLocation the location of the script template in the class path * @param values template values */ public void e...
n = int(input()) a = list(map(int, input().split())) rates = [0]*9 for i in range(n): r = min(a[i]//400, 8) rates[r] += 1 n_min, n_max = 0, 0 if max(rates[:-1]) > 0: for i in range(8): n_min += 1 if rates[i] > 0 else 0 n_max = n_min+rates[-1] else: n_min = 1 n_max = rates[-1] print(n_min, n_max)
<gh_stars>1-10 #ifndef _DaughterWindow #define _DaughterWindow //General Libraries #include <string.h> //Qt Libraries #include <QFileDialog> #include <QMainWindow> #include <QWidget> #include "QVTKWidget.h" #include "ui_MotherWindow.h" //ITK Libraries #include "itkImage.h" #include "itkBinaryThresholdImageFilter.h" ...
def read_pdb(self, filename='default'): if filename == 'default': filename = self.files['pdb'] with open(filename, 'r') as f: content = f.read() ff_start = [0, 6, 12, 16, 17, 21, 22, 26, 30, 38, 46, 54, 60, 72, 76, 78] ff_end = [4, 11, 16, 17, 21, 22, 26, 27, 38, ...
class Links: """ Helpers for the parsing and storing links info. """ def __init__(self, links: Dict[str, Union[int, str]]): """ :param links: Dict with links. """ self.self_link = links["self"] self.self_params = uparse.parse_qs( uparse.urlparse(self....
<reponame>nixorn/shtuki {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE OverloadedLabels #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE DuplicateRecordFields #-} {-# LANGUAGE ExistentialQuantification #-} ...
<reponame>gisabernardess/venture<gh_stars>1-10 import NextLink from 'next/link'; import { Flex, Image, Box, Text, Stack, Heading, Button, useBreakpointValue, } from '@chakra-ui/react'; import { FaDiceD20, FaUserPlus, FaPlay } from 'react-icons/fa'; import { MdVideogameAsset } from 'react-icons/md'; imp...
// boundsMin is guaranteed to start at the beginning of an entry, boundsMax at the end private IndexEntry searchForBlockIndexEntry(int blockNumber, long boundsMin, long boundsMax) throws IOException { int chunkSize = 1600000; if (boundsMax - boundsMin < chunkSize) { synchronized (stream) { ...
/** * Model de la boutique. * * @author jeremy */ public class StoreModel { private User usr; private Set<StylisticDevice> fertilizerList; public StoreModel(User usr) { this.usr = usr; this.fertilizerList = new HashSet<StylisticDevice>(); } public StoreModel(User usr, HashSet...
//Dump outputs a bytearray of data from the buffer //Currently Load and Dump are mutually exclusive with a mutex func (buff *Imgbuffer) Dump() (read int, img []byte) { buff.mtx.Lock() defer buff.mtx.Unlock() var msg []byte size := buff.Sizes[buff.SRptr] if size == 0 { return 0, nil } if buff.SRptr == buff.SWpt...
/* Accept a connection on a bound socket. */ AG_NetSocket * AG_NetAccept(AG_NetSocket *ns) { AG_NetSocket *nsNew; AG_MutexLock(&ns->lock); nsNew = agNetOps->accept(ns); AG_MutexUnlock(&ns->lock); return (nsNew); }
#![allow(dead_code, non_upper_case_globals)] ///! Utilities for helping sanitize macro use proc_macro2::{TokenStream, Ident}; use quote::{quote, format_ident, ToTokens}; const CNAME: &str = "::binread"; const TNAME: &str = "BinRead"; macro_rules! from_crate { () => { IdentStr(CNAME) }; ($path:path) => { Ident...
import test from 'ava'; import { ListNode, Action, BackwardsActionIterator } from './8_self_referencing_type'; test('backwards test', t => { const action1 = { type: "LOGIN" }; const action2 = { type: "LOAD_POSTS" }; const action3 = { type: "DISPLAY_POSTS" }; const action4 = { type: "LOGOUT" }; const actionN...
def plot(self, shm, screen, viz_brain, ccol): return False
use gost94::{Gost94CryptoPro, Gost94Test, Gost94s2015, Digest}; fn main() { let mut hasher = Gost94CryptoPro::new(); hasher.update("Hello"); let result = hasher.finalize(); println!("\nThe Gost94CryptoPro hash for \"Hello\" is:"); println!("{:x}\n", result); let mut hasher2 = Gost94Test::new()...
<reponame>AlexStoyanova/UP-FMI #include <iostream> using namespace std; const unsigned int MAX_HEALTH_P = 100; const unsigned int DAMAGE_P = 10; const unsigned int ARMOUR_P = 25; const unsigned int LUCK_P = 5; const unsigned int MAGIC_POTION_P = 5; const unsigned int MAX_HEALTH_M = 50; const unsigned int DAMAGE_M = 5;...