content
stringlengths
10
4.9M
<gh_stars>1-10 import { Frame, MapPlayer, Trigger } from "w3ts"; import { ITalentSlot, TalentState } from "../Interfaces/ITalentSlot"; import { ITalentTreeView } from "../Interfaces/ITalentTreeView"; import { DependencyOrientation } from "../Interfaces/ITalentView"; import { Talent } from "../Models/Talent"; import { T...
It’s official! We will be getting more teenage horror stories come 2018. This morning, Netflix has officially announced the renewal of their adult animated show “Big Mouth” for a second season. The show was created by Nick Kroll, Andrew Goldberg, Jennifer Flackett, and Mark Levin, and Season 2 is slated for 2018. Thi...
For a movement that burst into life on the sleeping bags of college kids, some of the “Occupy Wall Street” protesters are getting downright long in the tooth. This week alone, the Raging Grannies and the Granny Peace Brigade have turned up to show solidarity. And signature boomer anthems by Neil Young, Buffalo Springf...
<reponame>dlehdrjs36/Travel package travel.image.command; import java.util.ArrayList; import java.util.List; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import travel.image.com.ImageListDAO; import travel.image.com.ImageListDTO; public class MainImageListC...
An application of augmented reality (AR) in the manipulation of fanuc 200iC robot In this paper, the simulation and manipulation of 6 DOF robot manipulator is presented using the kinematic model and an AR (Augmented reality) environment. In this context, the system is based on a multimodal user interface to overlay vi...
import { MediaProcessorConnectorInterface } from '../../lib/main' import VideoMirrorHelper from './video-mirror-helper.js' import VideoSink from './video-sink.js'; class CameraSource { videoMirrorHelper_: VideoMirrorHelper; stream_: MediaStream; mediaProcessorConnector_: MediaProcessorConnectorInterface sink_:...
/** * Set the gripper to open position. */ void openWideGripper() { if (leftGrip != null) leftGrip.setPosition(LEFT_OPEN_WIDE_POSITION); if (rightGrip != null) rightGrip.setPosition(RIGHT_OPEN_WIDE_POSITION); }
// Copyright (c) HashiCorp, Inc. // SPDX-License-Identifier: MPL-2.0 package agent import ( "context" "os" "path/filepath" "testing" "time" log "github.com/hashicorp/go-hclog" "github.com/hashicorp/vault/command/agentproxyshared/auth" token_file "github.com/hashicorp/vault/command/agentproxyshared/auth/token...
package promql import ( "github.com/influxdata/promql/v2" "github.com/influxdata/promql/v2/pkg/labels" ) func escapeLabelName(ln string) string { switch { case ln == "": // This can occur in parameters to functions (e.g. label_replace() empty "src" parameter). return "" case ln == "__name__": return "_fiel...
<filename>src/it/fridrik/agent/Smith.java<gh_stars>1-10 /* * Agent Smith - A java hot class redefinition implementation * Copyright (C) 2007 <NAME> * * 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 th...
Illustration by Mark Alan Stamaty The American consumer is back for the first holiday season since 2007. But while shoppers are hitting the malls, they’re also being choosy—and comparison shopping is more easily done online. Web sales will rise 11 percent in November and December, according to ComScore, compared with ...
<filename>src/Intraday/model.ts import { IntradayTimeSeries } from "./IntradayTimeSeries.entity" import { MarketDataSchema } from "../Common/interfaces"; type DayTypes = "UP" | "DOWN" | "INSIDE" | "OUTSIDE" | "GAPUP" | "GAPDOWN" export class IntradayBatch { public schema: MarketDataSchema = "INTRADAY" pub...
<filename>src/util/logger.ts import * as Winston from "winston"; Winston.cli(); const logger: Winston.LoggerInstance = new (Winston.Logger)({ transports: [ new (Winston.transports.Console)({ level: "info" }) ] }); export default logger; export {logger as Logger};
Impact of a multifaceted and multidisciplinary intervention on pain, agitation and delirium management in a Canadian community intensive care unit: a quality improvement study protocol Background: Pain and agitation are closely linked to the development of delirium, which affects 60%–87% of critically ill patients. De...
/* * zdbrestrpos() -- restore scan to last saved position */ Datum zdbrestrpos(PG_FUNCTION_ARGS) { elog(NOTICE, "zdbrestrpos()"); PG_RETURN_VOID(); }
<filename>Intro/program_12/testsortDowning.cpp #include <iostream.h> #include <iomanip.h> #include <conio.h> //the three functions: void findaverage(float grades[][1]); void highaverage(char name[][20], float grades[][1]); void lowaverage(char name[][20], float grades[][1]); main() { char name[10][20] ...
These days we have drug fiends, wife-beaters, wimps, traitors, and perverts for role models. We used to have heroes. But heroes were found to be “racist”: The California Assembly refused Thursday to honor actor John Wayne after a sharp debate in which he was accused of being a racist. Assembly Concurrent Resolution 13...
//creates a new group entry in firestore. group_ID is set here. Other values must be set before calling createGroup. public void createGroup(Group group){ this.databaseGroup = FirebaseFirestore.getInstance().collection("Groups").document(); group.setGroupId(databaseGroup.getId()); Map<String, O...
Characterization of Indoor Air Quality in Relation to Ventilation Practices in Hospitals of Lahore, Pakistan Temporal variations of particulate matter ( PM) and carbon dioxide ( CO 2 ) in orthopedic wards and emergency rooms of different hospitals of Lahore, Pakistan were investigated. Hospitals were classified into t...
/// Takes a pointer to a string from C and copies it into a Rust-owned `CString`. pub unsafe fn ptr_to_cstring(ptr: *mut c_char) -> CString { // expect that no strings are longer than 100000 bytes let end_ptr = memchr(ptr as *const c_void, 0, 100000); let len: usize = end_ptr as usize - ptr as usize; le...
def generate_polyphonic_sequence( self, num_steps, primer_sequence, temperature=1.0, beam_size=1, branch_factor=1, steps_per_iteration=1, modify_events_callback=None): return self._generate_events(num_steps, primer_sequence, temperature, beam_size, branch_factor, steps_p...
def _set_parameter(self, name, value): try: parameter = self.get_api().getParameter(name) parameter.setValue(value) self.get_api().updateParameter(parameter) except ParameterNotFound: parameter = Parameter(name=name, value=value) self.get_api()...
#include <iostream> #include <algorithm> #include <cmath> #include <vector> #include <set> #include <map> #include <string> #include <numeric> #include <cstdlib> using namespace std; using ll = long long; using vi = vector<int>; using vl = vector<ll>; using pii = pair<int, int>; using ull = unsigned lon...
// HasUndefined returns whether the call has undefined arguments func (c *call) HasUndefined() bool { for i := range c.Args { if c.Args[i] == nil { return true } if basic, ok := c.Args[i].(*types.Basic); ok { if basic.Kind() == types.Invalid { return true } } if strings.Index(c.Args[i].String(),...
def apply(self, solution): size = solution.size rate = float(1/size) copy_solution = solution.clone() rand = random.uniform(0, 1) copy_solution.data = [x if rand > rate else x + self._sigma(size) * (self.maxi - (self.mini)) for x in solution.data] copy_solution.data = sel...
package config import ( "fmt" "path/filepath" "github.com/d3ta-go/system/system/utils" "github.com/spf13/viper" ) // NewConfig is a function to Load Configuration func NewConfig(path string) (*Config, *viper.Viper, error) { defaultConfigFile, err := GetConfigFilePath(path) if err != nil { return nil, nil, e...
import * as MaskedText from 'react-native-masked-text' import * as RN from 'react-native' import * as React from 'react' import { StyleSheet, TextInput as _TextInput, } from 'react-native' import { TextInputMaskOptionProp } from 'react-native-masked-text/index' interface UnmaskedTextInputProps extends RN.TextInp...
In the wake of numerous reports of Windows 10's forced updates causing problems with drivers, Microsoft has backtracked on the feature and has released a tool that allows you to block or uninstall updates that are suspected to be causing issues. Here's Microsoft's stance on why it released the tool: In Windows 10 Ins...
/** * Of course we can call {@link #$listOf(int, samples.Builder)} inline and assign the produced * list of item builders directly to the order builder. * <p> * That means, that on every call to some($Order()) we will get a new {@link Order} with a * complete unique list of items. */ @Test pub...
/* Database The sole purpose of this module is to provide dead-simple persistence of data that has been processed / needs to be processed. It should: - make interacting with the data as simple as possible It shouldn't: - leak abstractions or otherwise require consumers to work with the data st...
Not to be confused with Cortlandt, New York City in New York, United States Cortland is a city in Cortland County, New York, United States of America. Known as the Crown City, Cortland is located in New York's Southern Tier region. As of the 2010 census, the city had a population of 19,204.[2] It is the county seat o...
/** * Vaadin scopes configuration. * * @author Vaadin Ltd * */ @Configuration public class VaadinScopesConfig { /** * Creates a Vaadin session scope. * * @return the Vaadin session scope */ @Bean public static BeanFactoryPostProcessor vaadinSessionScope() { return new Vaadi...
Election 2012: Nevada President Nevada: Obama 50%, Romney 48% President Obama still receives 50% of the vote in Nevada’s tight presidential race. The latest Rasmussen Reports telephone survey of Likely Nevada voters, taken the night after the final presidential debate, shows Obama with 50% support to Mitt Romney’s 4...
Functional and Molecular Imaging: Key Components of Personalized Healthcare The ongoing revolution in biomedical imaging has produced technologies capable of depicting both tissue structure and function with high fidelity. Advances in nuclear medicine, magnetic resonance imaging, computed tomography and optical imagin...
from datetime import date ano = int(input('Digite o ano do seu nascimento: ')) idade = (date.today().year-ano - 18)*-1 if idade > 0: print(f'Ainda falta {idade} para seu alistamento obrigatorio') elif idade == 0: print('Está na epoca que de se alistar!') elif idade < 0: print(f'Já passou da epoca de se alis...
<filename>opengl-text/src/gl_vertex_array.cpp #include "gl_vertex_array.h" #include "gl_get_proc_address.h" #include "gl_validate.h" #include "gl_vertex_buffer.h" #include <stdexcept> namespace opengl { namespace gl { VertexArray::VertexArray( ) : vertex_array_ { }, glCreateVertexArrays { GetProcAddress(...
// Copyright (c) 2020 DDN. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. pub mod error; pub mod linux_plugin_transforms; use device_types::{ devices::{Device, DeviceId}, mount::Mount, }; pub use error::ImlDeviceError; use futures::...
// Copyright (c) 2016 Chef Software Inc. and/or applicable contributors // // 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 r...
/** * Decodes an application/x-www-form-urlencoded string encoded in UTF-8. * * @return the decoded key trimmed and in lower case * @throws DatastoreException */ public static String urlDecode(String id) throws DatastoreException { try { String decodedId = URLDecoder.decode(id, "UTF-8").trim().toLowerCas...
// ResetUserPassword is handler for PUT /api/user/password/reset func (h *Handler) ResetUserPassword(w http.ResponseWriter, r *http.Request, ps httprouter.Params) { h.auth.MustAuthenticateUser(r) var id int err := json.NewDecoder(r.Body).Decode(&id) checkError(err) tx := h.db.MustBegin() defer func() { if r := ...
<filename>src/camera.cpp #include "lib/universal_include.h" #include <math.h> #include <string.h> #include <float.h> #include "lib/gfx/debug_render.h" #include "lib/debug_utils.h" #include "lib/hi_res_time.h" #include "lib/input.h" #include "lib/window_manager.h" #include "lib/math_utils.h" #include "lib/...
Comparison of two active surveillance programs for the detection of clinical dengue cases in Iquitos, Peru. Endemic dengue transmission has been documented in the Amazonian city of Iquitos, Peru, since the early 1990s. To better understand the epidemiology of dengue transmission in Iquitos, we established multiple act...
The Market Ticker September 29, 2008 You are being asked to pass a $700 billion “bailout” or “rescue” package and are told by your leadership that it is “necessary” to prevent a catastrophe in the financial markets and, by extension, on Main Street. Please think carefully about the following facts before you vote: ...
def update_packet_filter(self, context, id, packet_filter): LOG.debug("update_packet_filter() called, " "id=%(id)s packet_filter=%(packet_filter)s .", {'id': id, 'packet_filter': packet_filter}) pf_data = packet_filter['packet_filter'] if hasattr(self.ofc.driv...
import { BotonicMessageEvent, MessageEventTypes } from './message-event' export interface LocationMessageEvent extends BotonicMessageEvent { type: MessageEventTypes.LOCATION lat: number long: number }
/** * Content values wrapper for the {@code favourites} table. */ public class FavouritesContentValues extends AbstractContentValues { @Override public Uri uri() { return FavouritesColumns.CONTENT_URI; } /** * Update row(s) using the values stored by this object and the given selection. ...
ON THE ISSUE OF THE GESER EPIC IN CHINA IN THE 21st CENTURY . The study of “Geser” in China began in the late fifties of the last century and entered the development stage in the late eighties . In the new century, research on the origin of the Mongolian “Geser”, the translation of the Mongolian “Geser”, the Mongolian...
3d–4p Transitions in the zinclike and copperlike ions Y x, xi; Zr xi, xii; Nb xii, xiii; and Mo xiii, xiv Lines occurring as satellites on the long-wavelength side of the 3d10–3d94p resonance lines of Ni-like ions have been investigated with a low-inductance vacuum spark and a 10.7-m spectrograph for the elements Y, Z...
def __BSMlambda(self): V = self.V S = self.S delta = self.delta return round(delta*(S / V), 4)
<filename>src/main/java/com/afmobi/cassandra/datastax/pojo/User.java package com.afmobi.cassandra.datastax.pojo; public class User { private int uid; private String name; private String passwd; public int getUid() { return uid; } public void setUid(int uid) { this.uid = uid; } public String getNam...
Computing Nash equilibria for scheduling on restricted parallel links We consider the problem of routing n users on m parallel links, under the restriction that each user may only be routed on a link from a certain set of allowed links for the user. Thus, the problem is equivalent to the correspondingly restricted pro...
package org.hamcrest.reflection; import org.hamcrest.Description; import org.hamcrest.TypeSafeDiagnosingMatcher; import java.util.Arrays; public class ImplementsInterface extends TypeSafeDiagnosingMatcher<Class<?>> { private final Class<?> expectedInterface; public ImplementsInterface(Class<?> expectedInte...
// Find all netplugin nodes and add them to ofnet master func (d *MasterDaemon) agentDiscoveryLoop() { agentEventCh := make(chan objdb.WatchServiceEvent, 1) watchStopCh := make(chan bool, 1) err := d.objdbClient.WatchService("netplugin", agentEventCh, watchStopCh) if err != nil { log.Fatalf("Could not start a wat...
<filename>aeron-cluster/src/test/java/io/aeron/cluster/ClusterTest.java /* * Copyright 2014-2019 Real Logic Ltd. * * 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 * * https://www.apache....
Reversible strain effect on the magnetization of LaCoO3 films The magnetization of ferromagnetic LaCoO3 films grown epitaxially on piezoelectric substrates has been found to systematically decrease with the reduction of tensile strain. The magnetization change induced by the reversible strain variation reveals an incr...
#![allow(unused_variables, dead_code)] use std::{collections::HashMap, io, thread, net::SocketAddr, sync::{Arc, atomic::AtomicBool, mpsc}}; use thiserror::Error; use mio::{Poll, Waker, net::{TcpListener, TcpStream}}; use vru_session::{ self as session, Command, Event, NodeDisconnected, handshake::{...
<reponame>compomics/peptizer package com.compomics.peptizer.gui.renderer; import org.apache.log4j.Logger; import javax.swing.*; import java.awt.*; /** * Created by IntelliJ IDEA. * User: kenny * Date: Jan 20, 2009 * Time: 3:21:22 PM * To change this template use File | Settings | File Templates. */ public clas...
/** * Responsible for injecting decorated object and its decorated "children" of {@link AbstractDecorator} type. * * @author Alex Objelean * @created 2 May 2012 * @since 1.4.6 */ public class InjectorAwareDecorator<T> extends AbstractDecorator<T> { private final Injector injector; public InjectorAwar...
<reponame>fredwangwang/linear-programming-example import numpy as np import cvxopt as co import cvxpy as cp import numpy.testing as npt co.solvers.options['show_progress'] = False co.solvers.options['glpk'] = {'msg_lev': 'GLP_MSG_ERR'} # https://www.analyzemath.com/linear_programming/linear_prog_applications.html ...
. Bronchopulmonary complications are one of the leading causes of morbidity after cardiac surgery; they lengthen a patient's hospital stay and increase the cost of treatment. The most common postoperative bronchopulmonary complications include pneumonia, atelectasis, respiratory failure, pneumothorax, and bronchospasm...
<filename>test/test_pgmagick_api.py from __future__ import print_function import hashlib import sys import unittest import pgmagick from pgmagick.api import Image, Draw print(pgmagick.gminfo().version) LIBGM_VERSION = [int(v) for v in pgmagick.gminfo().version.split('.')] class ImageTestCase(unittest.TestCase): ...
/** * Whether input SodukuMatrix is solvable. * TODO * * @param originMatrix input SodukuMatrix * @return whether */ boolean solvable(SodukuMatrix originMatrix) { return true; }
Full Order Observer With Unmatched Constraint: Unknown Parameters Identification This letter concerns both state estimation and parameters identification for linear system with unmatched unknown parts. It deals with a full order output delayed unknown inputs observer (DUIO), in which, the time delay concept is investi...
<filename>ui/ui-app/src/main/resources/static/js/ops-mgr/alerts/AlertDetailsController.ts import * as angular from "angular"; import {moduleName} from "../module-name"; import * as _ from "underscore"; import OpsManagerRestUrlService from "../services/OpsManagerRestUrlService"; import {AccessControlService} from "../.....
// RunState is used to tell if the run loop should continue async fn process_msg(&mut self, op: TxOpRequest) -> RunState { match op.msg { TxOpRequestMsg::Single(ref operation, trace_id) => { let result = self.execute_single(&operation, trace_id).await; let _ = op.resp...
// waitUntilWorkflowIsDone will wait until the workflow for the given operation is done (successfully or not) for the node func (d *Driver) waitUntilWorkflowIsDone(operation string, wid string, node string) error { log.Infof("Waiting for workflow of '%s' operation to finish, it will take a few minutes...", operation) ...
<reponame>joshyamal/cloudproxy import boto3 import os import json import botocore as botocore from cloudproxy.providers.config import set_auth from cloudproxy.providers.settings import config __location__ = os.path.realpath(os.path.join(os.getcwd(), os.path.dirname(__file__))) ec2 = boto3.resource("ec2", region_nam...
#include<bits/stdc++.h> typedef long long int ull; typedef long long int ll; #define ub upper_bound #define lb lower_bound #define pb push_back #define m_p make_pair #define int_char_index(a) a-'0' #define neginf -1000000001 #define inf 1000000000000000001 #define mod 1000000007 #define F first #define S se...
def check_accessible( self, trans, history ): if self.is_accessible( trans, history ): return history raise exceptions.ItemAccessibilityException( "History is not accessible to the current user", type='error' )
Dirty Little Secret: Almost Nobody Cleans Contacts Properly Enlarge this image toggle caption Marek Brzezinski/iStockPhoto.com Marek Brzezinski/iStockPhoto.com People who wear contact lenses say they're diligent about keeping them clean. But press them for details, and it turns out that hardly anyone is doing it the ...
""" TCF CLI VERSION """ __version__ = '0.1.1'
import { Component } from '@angular/core'; @Component({ templateUrl: './header.page.html', }) export class LayoutHeaderDemoPageComponent { public header1 = `import { HeaderModule } from '@acpaas-ui/ngx-layout'; @NgModule({ imports: [ HeaderModule, ] }); export class AppModule {};`; public header2 = `<aui-...
<gh_stars>0 package uk.gov.gchq.gaffer.types; import org.junit.Test; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; public class TypeSubTypeValueTest { @Test public void testComparisonsAreAsExpected() { TypeSubTypeValue typeSubTypeValue = new TypeSubTypeValue...
// UnmarshalJSON decode json time.Unix to t. func (t *Time) UnmarshalJSON(b []byte) (err error) { var sec int64 if err := json.Unmarshal(b, &sec); err != nil { return err } *(*time.Time)(t) = time.Unix(sec, 0) return nil }
PIV measurements and CFD simulations of a hydrofoil at lock-in As part of an ongoing investigation into the mitigation of vortex induced vibrations of hydrofoils, a combined experimental and numerical study of the fluid-structure interactions and wake of a hydrofoil at lock-in has been conducted at the Waterpower labo...
<filename>tests/test_actor.rs use std::sync; use std::sync::atomic::{AtomicBool, AtomicUsize, Ordering}; use std::sync::Arc; use actori::prelude::*; use tokio::time::{delay_for, Duration, Instant}; #[derive(Debug)] struct Num(usize); impl Message for Num { type Result = (); } struct MyActor(Arc<AtomicUsize>, Ar...
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. // // A number of test-cases based on: // // https://golang.org/src/fmt/fmt_test.go // BSD: Copyright (c) 2009 The Go Authors. All rights reserved. import { sprintf } from "./printf.ts"; import { assertEquals } from "../testing/asserts.ts";...
import React from 'react'; import createSvgIcon from './helpers/createSvgIcon'; export default createSvgIcon( <React.Fragment><path d="M18 2.01L6 2c-1.11 0-2 .89-2 2v16c0 1.11.89 2 2 2h12c1.11 0 2-.89 2-2V4c0-1.11-.89-1.99-2-1.99zM18 20H6L5.99 4H18v16z" /><circle cx="8" cy="6" r="1" /><circle cx="11" cy="6" r="1" />...
package io.github.shenbinglife.validators.anno.meta; import java.lang.annotation.*; /** * 字段错误消息插值填充的功能注解 * <P> * 当前的框架内,默认提供的两个插值是:field: 注解内定义的字段名称, val: 被校验对象的字符串格式 * </P> * <P> * 在校验注解内部提供的方法上标记该注解,表示可以在校验注解的emsg中使用该字符串插值 * </P> * 示例: * * <pre> * public @interface Equals { * * <code>@MsgFiller(...
/** * Creates a formatted String listing the undone commands. */ public static String makeResultString(List<HistoryRecord> undoneRecords) { StringBuilder sb = new StringBuilder(); for (HistoryRecord record : undoneRecords) { sb.append(record.getCommand().getCommandText().orElse(rec...
<reponame>IsaiahPressman/Kaggle_Hungry_Geese<filename>handcrafted_agents/public/debug.py from kaggle_environments.envs.hungry_geese.hungry_geese import Observation, Configuration, Action, row_col def agent(obs_dict, config_dict): """This agent always moves NORTH, and is used for debugging""" observation = Obs...
package wrap_test import ( "testing" "github.com/lucacasonato/wrap" ) func createDatabase() (*wrap.Database, error) { client, err := connect() if err != nil { return nil, err } database := client.Database("testing") return database, nil } func TestDatabase(t *testing.T) { database, err := createDatabase...
<reponame>baian1/NeteaseMusiceClient import { ADD_SONG, SET_INDEX, DELETE_SONG, SET_SONG_SRC, DELETE_SONG_BY_INDEX, SET_TIMER, CHANGE_SONG_PLAYING, SET_VOLUME, SET_PLAY_MODE, NXET_SONG, } from "./constants" import { Play } from "@/api/request" /** * 列表函数 * @param data */ export const addSong = (...
/** * Returns the matching symbol to a given character that is relevant for the * 41++ language. */ public static char matchingSymbol(char start) { switch (start) { case '[': return ']'; case ']': return '['; case '(': return ')'; case ')': return '('; case '\'': return '\'...
/* (c) <NAME>. See "licence DDRace.txt" and the readme.txt in the root of the distribution for more information. */ #ifndef DDRACE_H #define DDRACE_H #include <game/server/gamecontroller.h> #include <game/server/teams.h> #include <game/server/entities/door.h> #include <vector> #include <map> class CGameControllerDDR...
def split_format(self, ev, data): if self.conf.part_mode == 'batch_time': dtm = self.batch_info['batch_end'] elif self.conf.part_mode == 'event_time': dtm = ev.ev_time elif self.conf.part_mode == 'current_time': dtm = datetime.datetime.now() elif self....
Alternative Media and Citizen Journalists across the web are in a storm over the latest developments on the Korean peninsula. North Korea test fired another missile on April 5th, 2017 ahead of the meeting between Chinese President Xi and President Donald Trump. Strong language has been coming from Secretary of State ...
<gh_stars>0 use rayon::prelude::*; #[derive(Default)] pub struct ChaCha8 { input: [u32; 16], } const SIGMA: [u8; 16] = *b"expand 32-byte k"; // const TAU: [u8; 16] = *b"expand 16-byte k"; #[inline] const fn u8to32_idx_little(i: u8, idx: u8) -> u32 { (i as u32).to_le() << (24 - idx * 8) } #[inline] const fn ...
def power_spectrum(self, time, radius=None, **kwargs): radius = basicConfig['params.r_surf'] if radius is None else radius coeffs = self.synth_coeffs(time, **kwargs) return mu.power_spectrum(coeffs, radius)
package org.mitre.synthea.export.rif; import java.io.IOException; import java.math.BigDecimal; import java.util.Collections; import java.util.HashMap; import java.util.LinkedHashMap; import java.util.LinkedList; import java.util.List; import java.util.Map; import java.util.Set; import java.util.concurrent.atomic.Atomi...
/** * Created by Benedikt Linke on 23.11.15. */ public class DocumentController { private CMSController cmsController; /** * Konstruktor * initialisiert einen DocumentController * @param cmsController */ public DocumentController(CMSController cmsController){ this.cmsControll...
<filename>benches/graphemes.rs #[macro_use] extern crate bencher; extern crate unicode_segmentation; use bencher::Bencher; use unicode_segmentation::UnicodeSegmentation; use std::fs; fn graphemes(bench: &mut Bencher, path: &str) { let text = fs::read_to_string(path).unwrap(); bench.iter(|| { for g in ...
/** * sis_old_set_piomode - Initialize host controller PATA PIO timings * @ap: Port whose timings we are configuring * @adev: Device we are configuring for. * * Set PIO mode for device, in host controller PCI config space. This * function handles PIO set up for all chips that are pre ATA100 and * also early ATA1...
/** * This class represents the watermark source that parse the input and emits punctuated watermark. * If the input represents a punctuated watermark, it generate the MistWatermarkEvent. * If not, extract the timestamp and make it as MistDataEvent. */ public final class PunctuatedEventGenerator<I, V> extends Event...
/** * The Output is where the elements of the query output their bits of SQL to. * * @author <a href="mailto:joe@truemesh.com">Joe Walnes</a> */ public class Output { /** * @param indent String to be used for indenting (e.g. "", " ", " ", "\t") */ public Output(String indent) { this.inden...
/* * Copyright 2017 Red Hat, Inc. and/or its affiliates. * * 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 a...
<reponame>CodeFreezr/rosettacode-to-go<gh_stars>1-10 package main import ( "fmt" "os" "os/exec" ) func main() { var h, w int cmd := exec.Command("stty", "size") cmd.Stdin = os.Stdin d, _ := cmd.Output() fmt.Sscan(string(d), &h, &w) fmt.Println(h, w) } //\Terminal-control-Dimensions\terminal-control-dimensio...
// If we have detected a problem with the RSL, we need to reset the fetched // origin/RSL to the last trusted revision of our local RSL. pub fn reset_remote_to_local(&mut self) -> Result<()> { // find reference of origin/RSL let mut reference = self.repo.find_reference("refs/remotes/origin/RSL")?; ...
<gh_stars>10-100 /// <reference path="../../../../../../types/styled-system__core.d.ts" /> import { HeightProps } from './height'; import { MaxHeightProps } from './max_height'; import { MaxWidthProps } from './max_width'; import { MinHeightProps } from './min_height'; import { MinWidthProps } from './min_width'; impor...
<reponame>kailag/KiddieCare import { Component } from '@angular/core'; import { IonicPage, NavController, NavParams, ViewController } from 'ionic-angular'; import { FormGroup, FormBuilder, Validators } from '@angular/forms'; @IonicPage() @Component({ selector: 'page-add-schedule', templateUrl: 'add-schedule.html',...