content
stringlengths
10
4.9M
import { buildAuthenticationContext, LoginCredentials } from '@adam-beck/use-simple-login'; interface User { username: string; token: string; role: string; } async function mockGetUser(credentials: LoginCredentials) { return new Promise<User>((resolve) => { setTimeout(() => { resolve({ usern...
/* Unit testing of this class. Takes the name of a digraph input file as a command-line argument, constructs the digraph, reads in vertex pairs from standard input, and prints out the length of the shortest ancestral path between the two vertices and a common ancestor that participates in that path ...
<reponame>arilsonsouza/gama-academy import { cartConstants } from '../constants'; let cart: any = localStorage.getItem('cart'); cart = cart ? JSON.parse(cart) : {}; const initialState = { items: [], quantity: 0, ...cart } const cartReducer = (state = initialState, action) => { const { type, payload } = acti...
/** * Creates a specialization axiom between two terms and adds it to the given vocabulary * * @param vocabulary the context vocabulary * @param subTermIri the iri of the sub term * @param superTermIri the iri of the super term * @return a specialization axiom that is added to the vocabu...
<reponame>jacktose/advent-of-code #!/usr/bin/env python3 """ https://adventofcode.com/2021/day/6 Day 6: Lanternfish """ import sys from collections import Counter, deque def main(): test() data = get_input() print(part_1(data), 'lanternfish') print(part_2(data), 'lanternfish') def get_input(file='./...
def save_config(self, filename): parser = configparser.SafeConfigParser(self.defaults) for key in self.defaults: parser.set("DEFAULT", key, getattr(self, key)) with open(filename, "wt") as f: parser.write(f)
def localised_filesize(number): def rnd(number, divisor): return localised_number(float(number * 10 / divisor) / 10) if number < 1024: return _('{bytes} bytes').format(bytes=number) elif number < 1024 ** 2: return _('{kibibytes} KiB').format(kibibytes=rnd(number, 1024)) elif numb...
<filename>shms/src/main/java/kr/ac/shms/lecture/controller/LectureWeekController.java package kr.ac.shms.lecture.controller; import java.io.IOException; import java.io.PrintWriter; import java.util.HashMap; import java.util.List; import java.util.Map; import javax.inject.Inject; import javax.servlet.http.HttpServletR...
2nd International Virtual Conference on Environmentand Natural Resources (IVCENR-2022) College of Science, University of Al-Qadisiyah 19th-2th January 2022 Preface Welcome to the 2nd International Virtual Conference on Environment and Natural Resources (IVCENR-2022) That held on June 19ft-20th 2022 at the College of S...
/** * INTERACTIVE LAYER * Created by Baptiste PHILIBERT on 27/04/2017. */ public class APIClient { private static final String TAG = "com.thestudnet.twicandroidplugin.managers." + APIClient.class.getSimpleName(); public static String TWIC_CONVERSATION_GETPATH = "conversation.get"; public stati...
package com.vmusco.softminer.graphs.persistence; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import org.jdom2.Attribute; import org.jdom2.Element; import com.vmusco.softminer.graphs.EdgeIdentity; import com.vmusco.softminer.graphs.EdgeMarkers; import com.vmusco.softminer.grap...
<filename>Cartwheel/lib/Python26/Lib/site-packages/OpenGL/lazywrapper.py """Simplistic wrapper decorator for Python-coded wrappers""" def lazy( baseFunction ): """Produce a lazy-binding decorator that uses baseFunction Allows simple implementation of wrappers where the whole of the wrapper can be summed up as do...
// an example API for rw redis cache func v1ExampleRedis(ctx hybs.Ctx) { var redisClient = ctx.Redis("Redis") redisClient.Set(ctx.Context(), "TestSpace:TestKey", ctx.Now().Unix(), time.Hour) var val, err = redisClient.Get(ctx.Context(), "TestSpace:TestKey").Int64() if err != nil { ctx.SysLogf("get redis value fai...
/** * Provided by CC3002 Coordination * Transforms a BinaryString to an integer * @param binary Binary string * @return the integer that the binaryString represents */ public static int toInt(String binary) { if (bitToInt(binary.charAt(0)) == 0) { return positiveBinToInt(bin...
<reponame>RonPenton/NotaMUD import React from 'react'; import Spinner from "./Spinner"; export type GameIconProps = { url: string; size: number; } & GameIconPresetProps export type GameIconPresetProps = { foreground: string; foregroundOpacity?: number, background: string; backgroundOpacity?: ...
<gh_stars>0 import os import ast import time, datetime import argparse import pandas as pd import numpy as np from prettytable import PrettyTable from model_sinne.SiNNE import SiNNE from model_iml.Anchor import Anchor from config import root from eval.evaluation_od import evaluation_od from utils.eval_print_utils impor...
<filename>src/test/java/generator/DataProviders.java package generator; import com.google.common.reflect.TypeToken; import com.google.gson.Gson; import models.Customer; import org.testng.annotations.DataProvider; import java.io.BufferedReader; import java.io.File; import java.io.FileReader; import java.io.IOException...
def _connected(self, link_uri): self._cf = self._helper.cf self._update_flight_status() logger.debug("Crazyflie connected to {}".format(link_uri)) self.cfStatus = ': connected'
def sort_boxes(boxes, labels): box_areas = (boxes[:, 2] - boxes[:, 0]) * (boxes[:, 3] - boxes[:, 1]) _, box_inds = torch.sort(box_areas, descending=True) boxes = boxes[box_inds, :] labels = labels[box_inds] return boxes, labels
def remove_segmented_nuc(image, mask, nuclei_size=2000): stack.check_array(image, ndim=2, dtype=[np.uint8, np.uint16]) stack.check_array(mask, ndim=2, dtype=[np.uint8, np.uint16, np.int64, bool]) if mask.dtype == bool or...
/** * * The {@code HungryPhilosopher} class defines a behavior representing a * hungry philosopher. This behavior moves to the {@code EatingPhilosopher} * behavior when it gets both the two forks. * **/ public class HungryPhilosopher extends Behavior { private static final long serialVersionUID = 1L; ...
// Rwalk writes a new Rwalk message to the underlying io.Writer. An error is returned if wqid // has more than MaxWElem elements. func (enc *Encoder) Rwalk(tag uint16, wqid ...Qid) error { if len(wqid) > MaxWElem { return errMaxWElem } size := uint32(minSizeLUT[msgRwalk] + 13*len(wqid)) enc.mu.Lock() defer enc.m...
/** * <b>Title:</b> IntegerParameter * <p> * * <b>Description:</b> A Parameter that accepts Integers as it's values. If * constraints are present, setting the value must pass the constraint check. * Since the parameter class in an ancestor, all the parameter's fields are * inherited. * <p> * * The constrain...
def function(cls): return cls._namespace_SIO('SIO_000017')
# -*- coding: utf-8 -*- from __future__ import print_function """Make subprocess calls with time and memory limits.""" from . import limits from . import returncodes from . import util import logging import os import subprocess import sys def print_call_settings(nick, cmd, stdin, time_limit, memory_limit): if...
/** * <p>Thread-Safe method to parse duration. * <u>No trailing or leading spaces are allowed.</u> * Digit groups may defined using one or two digits.</p> * * Duration string format: <code>M+ | M+:SS | H+:M[M]:S[S]</code>, or: * <ul> * <li>HH:MM:SS ...
Performance of the portable autonomous observation system Aiming at the demand of marine environment observation and realizing AUV industrialization, A portable autonomous observation system (PAOS) was built by Shenyang Institute of Automation. In 2013, Lake trial, sea trial and the standard sea trial was conducted. T...
#include<bits/stdc++.h> #define pf printf #define sf scanf #define db double #define z long long int using namespace std ; #define MAX 1000001 #define fast ios_base::sync_with_stdio(false); cin.tie(NULL); z ans(z a[],z n) { if(n==1) return a[0]; else return max(a[n-1],ans(a,n-1)); } int main() ...
def main(): parser = argparse.ArgumentParser(description='Multi-agent example') parser.add_argument('--rollouts', type=int, default=1, help='number of rollouts') parser.add_argument('--mission_file', type=str, default="basic.xml", help='the mission xml') parser.add_argument('--turn_based', action='store...
/** * An identifier for a holiday calendar. * <p> * This identifier is used to obtain a {@link HolidayCalendar} from {@link ReferenceData}. * The holiday calendar itself is used to determine whether a day is a business day or not. * <p> * Identifiers for common holiday calendars are provided in {@link HolidayCale...
def append(self, item): if not type(self) == type(item): raise ValueError("can't append different type of object") if len(item) > 1: raise ValueError("can't append a multivalued instance - use extend") super().append(item.A)
<filename>chrome/browser/ui/views/toolbar/chrome_labs_bubble_view_model_unittest.cc<gh_stars>100-1000 // Copyright 2020 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/browser/ui/views/toolbar/chrome_lab...
Breaking News Emails Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings. June 4, 2016, 4:16 AM GMT / Updated June 4, 2016, 2:57 PM GMT By Jon Schuppe Muhammad Ali, the silver-tongued boxer and civil rights champion who famously proclaimed himself "The Greatest" ...
// IsOnGoing returns true when the execution is running func (exec *Execution) IsOnGoing() bool { switch job.Status(exec.Status) { case job.RunningStatus: return true default: return false } }
def remove_random_elements(light_curve: np.ndarray, ratio: float = 0.01) -> np.ndarray: light_curve_length = light_curve.shape[0] max_values_to_remove = int(light_curve_length * ratio) if max_values_to_remove != 0: values_to_remove = np.random.randint(max_values_to_remove) el...
/** * TypeExtensionDefinition : extend ObjectTypeDefinition */ func parseTypeExtensionDefinition(parser *Parser) (ast.Node, error) { start := parser.Token.Start _, err := expectKeyWord(parser, lexer.EXTEND) if err != nil { return nil, err } definition, err := parseObjectTypeDefinition(parser) if err != nil { ...
/** * Food * * @author Vladislav Nechaev * @since 04.06.2020 */ public abstract class Food { private String name; private LocalDate expireDate; private LocalDate createDate; private int price; private int discount; public Food(String name, LocalDate expireDate, LocalDate createDate, int p...
import { ref } from 'vue' import type { Ref } from 'vue' type DateRange = [Date | null, Date | null] export default (customRange?: Ref<DateRange>) => { const range = customRange ? customRange : ref<DateRange>([new Date(), new Date()]) const setStart = (startDate: Date) => { const [, endDate] = range.v...
/** * This is a base class for form-based editor factories. * * Each instance of this class handles a local value/object according to the * specifications provided through the implementation of the various methods. * * Note that the local value/object is encapsulated in a virtual parent object * for practical ...
/** * A weight from 0 to 1 for parametric weighting in mathematics. * * @author jonathanl (shibo) */ @UmlClassDiagram(diagram = DiagramLanguageValue.class) @LexakaiJavadoc(complete = true) public class Weight extends Level { public static Weight weight(double value) { return new Weight(value); }...
// ReloadAchievements reloads the achievement cache func ReloadAchievements() error { tx, err := config.Node.Beginx() if err != nil { return err } defer tx.Commit() allAchievementsMutex.Lock() allAchievementsByID = make(map[string]*types.PPAchievement) allAchievements, err = types.GetPPAchievements(tx) for _...
// ConvertTo implements apis.Convertible // Converts source from v1alpha2.PingSource into a higher version. func (source *PingSource) ConvertTo(ctx context.Context, obj apis.Convertible) error { switch sink := obj.(type) { case *v1beta1.PingSource: sink.ObjectMeta = source.ObjectMeta sink.Spec = v1beta1.PingSourc...
/** Creates the underlying database table. */ public static void createTable(SQLiteDatabase db, boolean ifNotExists) { String constraint = ifNotExists? "IF NOT EXISTS ": ""; db.execSQL("CREATE TABLE " + constraint + "\"ALARM\" (" + "\"DEVICE_ID\" INTEGER NOT NULL ," + 0: deviceId ...
//.. // Then, we define the function 'traceExample1', that will print a stack-trace: //.. int traceExample1() { In this call to 'loadStackTraceFromStack', we use the default value of 'maxFrames', which is at least 1024 and the default value for 'demanglingPreferredFlag', which is 'true', meaning that the operati...
We’ve been trying to find our place in the RV world for years now and just haven’t found our niche. We’re not retired, not work-campers, not exactly ‘free spirits’, we don’t plan much, and we don’t seem to go to the kinds of places other full time RVers go or want to read about. We occasionally tent camp, seek out mud,...
from math import ceil,floor from math import sqrt n=int(input()) l=sqrt(n) if ceil(l)==floor(l): print(int(4*l)) else: g1=ceil(l) g2=floor(l) m=(g1+g2)/2 if l>=m: print(ceil(l)*4) else: print((ceil(l)+floor(l))*2)
def parse_tr(self): self.skip_to_section("TR") for line in self.reader: line = line.strip() if "#TR" in line: return line_match = re.match(r"([\w-]+)\s*,\s+([^,]{,30})[\s,]+([\w-]{2})\s+==>\s+([^,]{,30})[\s,]+([\w-]{2})\s+Kier\. (\w)\s+Poz. (\w)", line...
def f(): t = list(input()) p = sorted(list(input()), reverse = True) j, n = 0, len(t) for i in p: while t[j] >= i: j += 1 if j == n: return ''.join(t) t[j] = i return ''.join(t) print(f())
Fortified Settlements in the Eastern Baltic: From Earlier Research to New Interpretations A brief history of research and earlier interpretations of fortified settlements east of the Baltic Sea are provided in the first part of the article. The earlier research has resulted in the identification of the main area of th...
Distribution of the compression and expansion of morbidity in 194 countries and territories, 1990–2016: The role of income inequality Background Compression and expansion of morbidity are two critical hypotheses to analyze the relationship among morbidity, disability, and mortality. This study aims to analyze the g...
def update_rv_tuple(rv_tuple, op, first, second, num_inputs, num_outputs): if first.startswith("X_"): index = int(first[2:]) assert not second.startswith("X") and not second.startswith("Y"), \ "input constraints must be box (" + op + " " + first + " " + second + ...
// doRequest executes the HTTP request func (c *Client) doRequest(method string, path string, body interface{}, headers http.Header, respObj interface{}, statusCode int) error { var reader io.Reader var curlBody string if body != nil { b, err := json.Marshal(body) if err != nil { logrus.WithError(err).Warn("e...
def from_0to1(self) -> T: if self.parameter_range is not None: return self.parameter_range.from_0to1(self) return self
Revisiting Elena Tager ’s Early Biography For the first time, ten letters of the writer Elena Mikhailovna Tager (1895–1964), referring to the early, least studied years of her life, are published. Among her correspondents are S.P. Milyukov, N.A. Rubakin, Viach. Ivanov and A.A. Blok. The meaning of the letters goes bey...
def dehydrate(integer): if integer < 0: return NEGATIVE_BUFFER + dehydrate(-integer) if integer == 0: return '0' string = "" while integer > 0: remainder = integer % BASE string = true_chr(remainder) + string integer /= BASE return string
package CommonPO; import org.openqa.selenium.JavascriptExecutor; import org.openqa.selenium.WebDriver; /** * @author <NAME> * @date 11 January 2021 */ public class BasePage { public WebDriver driver; /** * @param seconds * @return * @author <NAME> * @date 11 January 2021 */ p...
async def end( self, ctx: commands.Context, giveaway_id: typing.Union[discord.Message, str] = None ): gmsg = giveaway_id or await self.giveaway_from_message_reply(ctx.message) if not gmsg: return await ctx.send_help("giveaway end") activegaw = self.giveaway_cache.copy() ...
<filename>drone-system/src/main/resources/io/github/dronesecurity/dronesystem/performance/drone/proximityPerformanceSimulator.py<gh_stars>1-10 import time forward = [x * 1.5 for x in range(48, 12, -1)] backward = [x * 1.5 for x in range(12, 48, 1)] # Simulating Data Stream index = 0 while True: for i in forward: ...
/** * test {@code SshActionExecutor.check()} method with host connection * failure. */ public void testSshCheckWithConnectionError() throws Exception { WorkflowJobBean workflow = createBaseWorkflowJobBean(); final WorkflowActionBean action = new WorkflowActionBean(); action.setId...
def cuda_(self): self.to_("cuda")
#include "tracepath.h" #include <stdlib.h> #include <vector> #include <string> #include <android/log.h> #include <stdio.h> #include <errno.h> #include <string.h> #include <time.h> #include <linux/errqueue.h> #include <sys/socket.h> #include <netinet/in.h> #include <netinet/ip.h> #include <netinet/ip_icmp.h> #include <a...
/* * Routine: DiskSize * * Description: This routin returns information about the size of the disk (diskSize). * * Arguments: unit, how many bytes in one sector, how many sectors in one track, and how many tracks in one disk * * Return Value: 0 means success, -1 means error occurs * */ int DiskSize(int...
//CSRFErrorHandler is a custom error handler when CSRF tokens come in invalid func (s *Server) CSRFErrorHandler() http.Handler { return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { s.Log.Errorln(csrf.FailureReason(r)) http.Error(w, "CSRF token invalid", http.StatusForbidden) return }) }
//****************************************************************************** // NAME: AllocateNormativePattern // // INPUTS: (ULONG partitionNum) - partition number of this normative pattern // (ULONG bestSubNum) - best substructure number in this partition // // RETURN: (NormativePattern *) - pointer to ne...
/** * Navigates to the given planet in the given star. Starts the SolarSystemActivity. * * @param star * @param planet * @param scrollView If \c true, we'll also scroll the current view so that given star * is centered on the given star. */ public void navigateToPlanet(Star s...
// GetIndexes returns an iterator to thethe raw index info for a collection by // using the listIndexes command if available, or by falling back to querying // against system.indexes (pre-3.0 systems). nil is returned if the collection // does not exist. func GetIndexes(coll *mgo.Collection) (*mgo.Iter, error) { var c...
<filename>testsuite/tests/profiling/should_compile/T19894/Unfold.hs {-# LANGUAGE CPP #-} {-# LANGUAGE TupleSections #-} {-# LANGUAGE ExistentialQuantification #-} module Unfold ( Unfold (..) , supplyFirst , many , lmap ) where import Step (Step(..)) #if defined(FUSION_PLUGIN) import Fusion.Plugin...
// Scan implements the Scanner interface for NullBool func (ns *NullBool) Scan(val interface{}) error { var b sql.NullBool if err := b.Scan(val); err != nil { return err } *ns = NullBool{Bool: b.Bool, Valid: b.Valid} return nil }
District and Building Energy Systems: A Collaborative Exchange of Results on Optimal System Operation for Energy Efficiency Workshop organized by INDIGO project as a collaborative activity among EU funded projects in the area of District Energy Systems. The objective of the workshop was twofold: (1) to create a cluste...
<filename>swarm/lib/Swarm/RON/Text.hs module Swarm.RON.Text ( TextFrame (..), ) where import Data.Proxy (Proxy) import Foreign (ForeignPtr) -- | Class @ron::TextFrame@ newtype TextFrame = TextFrame (ForeignPtr (Proxy TextFrame))
[n,k]=map(int,raw_input().split()) factors=[] for i in range(1,n+1): if n%i==0: factors.append(i) for a in factors: if (n/a)<k: print(a*k+n/a) exit()
Sjögren's syndrome: autoantibodies to cellular antigens. Clinical and molecular aspects. Autoantibodies to cellular autoantigens are usually found in sera of patients with systemic autoimmune rheumatic diseases. Patients with Sjögren's syndrome (SS) frequently present autoantibodies to both organ and non-organ-specifi...
Effects of Phthalate Esters (PAEs) on Cell Viability and Nrf2 of HepG2 and 3D-QSAR Studies Phthalate esters (PAEs) are a widespread environmental pollutant, and their ecological and environmental health risks have gradually attracted attention. To reveal the toxicity characteristics of these compounds, ten PAEs were s...
/** Evaluate a haptic scene. Each object adds it's effect to the tipforce */ vect_n* eval_bthaptics(bthaptic_scene *bth,vect_n *pos, vect_n *vel, vect_n *acc, vect_n *force) { static int i; if (bth->state) { for(i=0; i < bth->num_objects; i++) { if(bth->list[i] != NULL) { (*(bth->li...
A location-based multiple point statistics method: modelling the reservoir with non-stationary characteristics Abstract In this paper, a location-based multiple point statistics method is developed to model a non-stationary reservoir. The proposed method characterizes the relationship between the sedimentary pattern a...
<reponame>Kchakz/basic-to-intermideate-projects<gh_stars>1-10 from time import strftime from tkinter import Label, Tk window = Tk() window.title("Clock") window.geometry("350x155") window.configure(bg="black") window.resizable(False, False) clock_label = Label(window, bg="black", fg="cyan", font=("ds-digital", 50), ...
/** * DStartNode ** Start ** * All nodes are ImageView Nodes from the javafx library * So all dnodes can be rendered using javafx application * All dnodes are represented by images */ public class DStartNode extends DNode { StringProperty actionStringProperty1 = new SimpleStringProperty(); StringProperty...
<reponame>cccsar/Data-type-simulator<gh_stars>0 module Main where import Constants (intro, frequent, prompt, invalidOption) import Impure import Types import qualified Data.Map as M import System.IO (stderr, stdout) import System.Exit (exitSuccess) main :: IO () main = do putStrLn intro putStrLn...
def verify(signature): message_hashes = signature.aggregation_info.message_hashes public_keys = signature.aggregation_info.public_keys hash_to_public_keys = {} for i in range(len(message_hashes)): if message_hashes[i] in hash_to_public_keys: hash_to_public_key...
async def _fetch_cdt_translation_files(self, ctx, filename=None): data = Embed.create( self, ctx, title="Retrieving [{}] CDT JSON files\n".format(len(files.keys())) ) package = "" monitor = await ctx.send(embed=data) keycount = len(files.keys()) af = 0 ...
<reponame>cbron/cli<filename>vendor/github.com/rancher/types/client/management/v3/zz_generated_k3s_upgrade_strategy.go package client const ( K3sUpgradeStrategyType = "k3sUpgradeStrategy" K3sUpgradeStrategyFieldDrainServerNodes = "drainServerNodes" K3sUpgradeStrategyFieldDrainWorkerNodes = "drai...
/// <reference types="node" /> import type { Context } from 'vm'; import '../../node-polyfill-web-streams'; import type { WasmBinding } from '../../../build/webpack/loaders/next-middleware-wasm-loader'; /** * For a given path a context, this function checks if there is any module * context that contains the path with...
import pytest from aiokafka.producer.transaction_manager import TransactionManager from aiokafka.structs import TopicPartition NO_PRODUCER_ID = -1 NO_PRODUCER_EPOCH = -1 @pytest.fixture def txn_manager(loop): return TransactionManager("txn_id", 20000, loop=loop) def test_txn_manager(txn_manager): assert t...
Routes to High-Ranged Thermoelectric Performance Thermoelectric technology has immense potential in enabling energy conversion between heat and electricity, and its conversion efficiency is mainly determined by the wide-temperature thermoelectric performance in a given material. Therefore, it is more meaningful to pur...
<gh_stars>1-10 /* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package mn.sict.krono.model; import java.util.ArrayList; import java.util.List; /** * * @author lupino */ public cl...
<reponame>alyssonlcss/sudoku-solution def readFile(pathFile): file = open(pathFile, 'r') file_list = [] for line in file: line = line.rstrip() file_list.append(line) file.close() return file_list def viewMatrix(matrix): for l in range(9): for c in range(9): ...
/* Macros to support TLS testing in times of missing compiler support. */ #include <sys/cdefs.h> #include <sys/asm.h> #include <sysdep.h> #define LOAD_GP \ ".option push\n\t" \ ".option norelax\n\t" \ "la gp, __global_pointer$\n\t" \ ".option pop\n\t" #define UNLOAD_GP #define TLS_GD(x) \ ({ ...
// Copyright 2021 The Ray 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 to i...
package net.minecraft.world.gen.feature; import java.util.Random; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.block.state.IBlockState; import net.minecraft.init.Blocks; import net.minecraft.util.BlockPos; import net.minecraft.world.World; import net.minecraft.wo...
<filename>AiHome/Comm/TouchID/TouchIDViewController.h // // TouchIDViewController.h // ConnectedHome // // Created by wkj on 2017/12/16. // Copyright © 2017年 华通晟云. All rights reserved. // #import <UIKit/UIKit.h> #import "TouchIDAuthenticate.h" @interface TouchIDViewController : UIViewController @property (nonato...
<reponame>vtaits/form-schema /* eslint-disable @typescript-eslint/no-explicit-any */ export type GetFieldSchema<FieldSchema> = (name: string) => FieldSchema; export type GetFieldType< FieldSchema, Values extends Record<string, any> = Record<string, any>, RawValues extends Record<string, any> = Record<string, any>, Ser...
<reponame>Spencerfar/djin-aging<filename>Alternate_models/dynamics_full.py import torch import torch.nn as nn from torch.nn import functional as F import numpy as np class SDEModel(nn.Module): def __init__(self, N, device, context_size, gamma_size, mean_T, std_T): super(SDEModel, self).__init__() ...
<gh_stars>0 use crate::data::types::DataType; use crate::{Instruction, InstructionInfo}; use serde_derive::{Deserialize, Serialize}; #[derive(Debug, PartialEq, Default, Clone, Serialize, Deserialize)] pub struct Dbg { pub format: String, pub arg_types: Vec<DataType>, } impl Dbg { pub fn new(format: String...
//dumb笨! //n节课,每一章花费x小时 //第i节课,有ci章! //先排序后学习! //我必须选择最快的排序算法! /*interface*/ #include<stdio.h> #define N 100000+1 void print(int *,int); void sort(long long *,int); void mergeSort(long long *,int ,int ,int ); void partition(long long *,int ,int ); void sort(long long * merge,int n) { partition(merge,0,n-1); } voi...
I stare at her, so sweet, so precious, all curled up on her single bed, blankets up to her chin. As I listen to her snore to the rise and fall of every breath, I close my eyes and reminisce in silence. My little girl – oh, how I love her. I will miss the day when I won’t have to meticulously cut her food so tiny to pr...
import { Component } from '@angular/core'; import { IMarker, IPoint } from './interfaces'; @Component({ templateUrl: 'google-maps.html' }) export class GoogleMapsPage { public markers: IMarker[]; public origin: IPoint; public zoom: number; constructor() { this.initMarkers(); this.origin = { lat: -0.95236...
// This method is called to construct a new Node Node * FOBModule::createNode( const std::string& name, const StringTable& attributes) { if( name.compare("FOBSource") == 0 ) { int number; if( attributes.get("number", &number ) != 1 ) { ACE_DEBUG((LM_ERROR, ACE_TEXT("ot:FOBModule : error r...
/** * {@link TileUpdateRequester} which notifies the viewer that it should fetch a new version of the * Timeline. */ class ViewerTileUpdateRequester implements TileUpdateRequester { /** * The intent action used so a Tile Provider can request that the platform fetches a new * Timeline from it. */ ...
<gh_stars>0 from django.shortcuts import render from django.utils import timezone from django.core.paginator import Paginator from .models import Project # General Methods def paginate(request, list_objects, items_per_page): paginator = Paginator(list_objects, items_per_page) page_number = request.GET.get('pa...
/** * Parses body to get DOCTYPE and configure Transformer * with proper method, public id and system id. * @param body The body to be parsed. * @param transformer Transformer to configure with proper properties. * @throws IOException if something goes wrong. */ private static void prepare...