content
stringlengths
10
4.9M
package main import ( "crypto/tls" "errors" "flag" "fmt" "io/ioutil" "math" "net" "net/url" "os" "sort" "strconv" "strings" "time" ) const USAGE = `makeRequest Usage: makeRequest --url=<URL> [--profile=<COUNT>] makeRequest --help Flags: --url=<URL> The URL that this program will make a reque...
<gh_stars>1-10 package ast // Ident node represents a identifier. type Ident struct { NamePos int Name string } // NewIdent returns a new ident node. func NewIdent(namePos int, name string) *Ident { return &Ident{ NamePos: namePos, Name: name, } } // Pos implementations for expression nodes. func (e *I...
package sdk import ( "context" "github.com/ethereum/go-ethereum/core/types" "testing" "time" ) func TestMockBackend_SubscribeNewTransaction(t *testing.T) { backend := NewMockBackend() ch := make(chan *types.Transaction, 1) sub := backend.SubscribeNewTransaction(ch) defer sub.Unsubscribe() sdk := NewSDKWithB...
def run_and_verify_status_xml(expected_entries = [], *args): exit_code, output, errput = run_and_verify_svn(None, None, [], 'status', '--xml', *args) if len(errput) > 0: raise Failure doc = parseString(''.join(output)) entries = ...
// returns URL for pending shell view iff there is one and there is NOT an // active view. result returned in VT_BSTR variant HRESULT CIEFrameAuto::_QueryPendingUrl(VARIANT *pvarResult) { HRESULT hres = E_FAIL; if (_psb) { IShellView *psv; if (SUCCEEDED(_psb->QueryActiveShellView(&psv))...
// Listen subscribes to the specified message type and calls the specified handler when fired func (mm *MessageManager) Listen(messageType string, handler MessageHandler) MessageHandlerId { mm.Lock() defer mm.Unlock() if mm.listeners == nil { mm.listeners = make(map[string][]HandlerIDPair) } handlerID := getNewH...
/* ========================================================= * InvalidParameterException.java * * Author: <NAME> * Created: Nov 13, 2007 4:30 PM * * Description * -------------------------------------------------------- * This error is used to notify when an invalid parameter is passed. * * Change L...
package com.example.a68.listapplication; import android.support.design.widget.FloatingActionButton; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.support.v7.widget.Toolbar; i...
<reponame>Luminoth/nature-of-code //! Creature components use bevy::prelude::*; use bevy_inspector_egui::Inspectable; use bevy_prototype_lyon::prelude::*; use crate::bundles::creatures::*; use crate::bundles::physics::*; use crate::resources::*; use super::particles::*; use super::physics::*; // TODO: move all of t...
<filename>returns/_generated/pipe.py # -*- coding: utf-8 -*- from functools import reduce from returns.functions import compose def _pipe(*functions): """ Allows to compose a value and up to 7 functions that use this value. Each next function uses the previos result as an input parameter. Here's ho...
activate_mse = 1 activate_adaptation_imp = 1 activate_adaptation_d1 = 1 weight_d2 = 1.0 weight_mse = 1.0 refinement = 1 n_epochs_refinement = 10 lambda_regul = [0.01] lambda_regul_s = [0.01] threshold_value = [0.95] compute_variance = False random_seed = [1985] if not compute_variance else [1985, 2184, 51, 12, 465] ...
package io.nutz.nutzsite.module.open.api; import io.nutz.nutzsite.common.wxpay.util.WXPayUtil; import io.nutz.nutzsite.common.wxpay.util.WebChatUtil; import io.swagger.annotations.Api; import org.dom4j.DocumentException; import org.nutz.ioc.loader.annotation.IocBean; import org.nutz.mvc.annotation.At; import org.nutz....
<gh_stars>0 package yhao.micro.service.workflow.apilist.model.approve; import io.swagger.annotations.ApiModelProperty; import yhao.infra.common.model.Entity; import yhao.micro.service.workflow.apilist.model.flow.FlowProcessDefinitionModel; import yhao.micro.service.workflow.apilist.model.task.TaskNodeModel; import ja...
#include <stdio.h> #include <stdlib.h> // variable is place holders FOR SOMETHING ELSE ( IS THAT SIMPLE ! YES IT IS. :) ) // in more technical language it is memory location OF bunch of data-types where actual data is stored. // RULES // you have to start variable name with UPPERCASE or LOWERCASE , no NUMBERS...
The benefits of the 5-week Table Stars @school program as part of physical education in primary schools – A pilot intervention study The Table Stars @school program was launched in 2010 to serve as a first introduction to table tennis in primary school children. The main aims of this pilot intervention study were 1. t...
<reponame>MaxAtslega/magic-home-desktop import React, { Component } from 'react' import { Container, DeviceName, ModelName, ControlItems, ControlItem } from './Device.styles' import { BiRocket } from 'react-icons/bi' import { FiPower } from 'react-icons/Fi' interface Props { currentDeviceColor: string; name: strin...
import { filter } from 'fuzzaldrin-plus'; import { isEqual } from 'lodash'; import React, { useCallback, useEffect, useMemo, useRef, useState, } from 'react'; import { createFixtureTree, FlatFixtureTreeItem, flattenFixtureTree, } from 'react-cosmos-shared2/fixtureTree'; import { FixtureId, FixtureList }...
<reponame>DiSiqueira/MySlackBotTwo<filename>pkg/plugins/wolfram/wolfram.go package wolfram import ( "fmt" "github.com/disiqueira/MySlackBotTwo/pkg/bot" "github.com/disiqueira/MySlackBotTwo/pkg/provider" "strings" ) const ( multivac = "INSUFFICIENT DATA FOR A MEANINGFUL ANSWER" ) var ( api provider.Wolfram ) f...
/* * Copyright 2020 DiffPlug * * 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.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in...
/* This is part of the netCDF package. Copyright 2006 University Corporation for Atmospheric Research/Unidata. See COPYRIGHT file for conditions of use. This test was provided by Jeff Whitaker as an example of a bug, specifically a segfault when re-writing an NC_CHAR attribute as an NC_STRING attribute....
<reponame>elsys/c-programming-hw<filename>B/04/04/03_zadacha.c<gh_stars>10-100 #include <stdio.h> #include <stdlib.h> int main() { char string[100]; int c=0,bukvi[26]={0}; fgets(string,100,stdin); while(string[c] != '\0') { if(string[c]>='a'&&string[c]<='z') bukvi[string[c]-'a']++; ...
def buscar_pessoa(id): try: pessoa = database.search(Query().id == id)[0] except IndexError: return {'message': 'Pessoa not found!'}, 404 return jsonify(pessoa)
print("Challenge 5: WAF that takes a input n and computer n+nn+nnn.") y = int(input("Input an integer : ")) n1 = int( "%s" % y ) n2 = int( "%s%s" % (y,y) ) n3 = int( "%s%s%s" % (y,y,y) ) print (n1+n2+n3)
/** * Create an implicit intent based on the given URI. */ public static Intent createUriIntent(String intentAction, String intentUri) { if (intentAction == null) { intentAction = Intent.ACTION_VIEW; } return new Intent(intentAction, Uri.parse(intentUri)) .a...
// GetAddr returns the localhost IPv4 TCP address with the // designated port func GetAddr(tcpSocketPort int) (*net.TCPAddr, error) { return &net.TCPAddr{ IP: net.IPv4(127, 0, 0, 1), Port: tcpSocketPort, }, nil }
<reponame>atlasapi/atlas<gh_stars>10-100 package org.atlasapi.remotesite.channel4.pmlsd.epg; import org.atlasapi.media.entity.Alias; import org.atlasapi.media.entity.Publisher; import org.atlasapi.remotesite.channel4.pmlsd.C4AtomApi; import org.atlasapi.remotesite.channel4.pmlsd.C4PmlsdModule; import org.atlasapi.remo...
# -*- coding: utf-8 -*- import abc from datetime import datetime, timedelta import os from typing import List, Optional, Tuple, Union import torch import torch.nn as nn import torch.distributed as dist from torch.optim import Adam from torch.optim.lr_scheduler import ExponentialLR from supar.parsers.parser import Pa...
/** * @author Nikolay Chugunov * @version: $Revision: 1.4 $ */ public class ComplexTest extends TestCase { private final Vector classLoaders = new Vector(); static Logger log = Logger.global; // isStop is used only by testMultiThread private boolean isStop ...
def from_json(cls, json_string: str): if json_string is None or len(json_string) == 0 or json_string == ABCPropertyGraphConstants.NEO4j_NONE: return None d = json.loads(json_string) ret = cls() ret.set_fields(**d) return ret
package chargify type Customer struct { Id int `json:"id,omitempty"` FirstName string `json:"first_name,omitempty"` LastName string `json:"last_name,omitempty"` Organization string `json:"organization,omitem...
// Copyright 2016 union-find-rs Developers // // Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or // http://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or // http://opensource.org/licenses/MIT>, at your option. This file may not be // copied, modified, or distributed except accord...
use crate::core::CoinData; use console::{self, style, StyledObject, Term}; use prettytable::{Cell, Row, Table}; use url::{ParseError, Url}; pub fn clear_console() { let term = Term::stdout(); term.clear_screen().unwrap(); } pub fn parse_url(url: &str) -> Result<Url, ParseError> { match Url::parse(url) { ...
def unit_sort(text): if text.startswith("-"): return 0, text elif text.endswith("ns"): return 1, text elif text.endswith("us"): return 2, text elif text.endswith("ms"): return 3, text
Former New Orleans Police Officer Jeffrey Lehrmann was sentenced Wednesday to three years in federal prison for his part in the cover-up of the Danziger Bridge shootings, our partners at the New Orleans Times-Picayune reported today. Lehrmann is one of 11 officers who have been charged in the Sept. 4, 2005 incident, i...
/** * Generates a <code>Projection</code> to establish whether or not the * history contains an <code>Attachment</code> */ public class HasAttachmentsProjectionProvider implements ProjectionProvider { /** * JAVADOC Method Level Comments * * @param type JAVADOC. * @param bean JAVADOC. */ @Override publ...
def writeFace(self, val, what='f'): val = [v + 1 for v in val] if self._hasValues and self._hasNormals: val = ' '.join(['%i/%i/%i' % (v, v, v) for v in val]) elif self._hasNormals: val = ' '.join(['%i//%i' % (v, v) for v in val]) elif self._hasValues: ...
use super::{ BallPositionConstraint, BallPositionGroundConstraint, FixedPositionConstraint, FixedPositionGroundConstraint, PrismaticPositionConstraint, PrismaticPositionGroundConstraint, }; #[cfg(feature = "dim3")] use super::{RevolutePositionConstraint, RevolutePositionGroundConstraint}; #[cfg(all(feature = "d...
module Exchange where -- Type "Exchange" with value constructor "Euro/Real/Dollar" data Exchange = Dollar | Euro | Real deriving Show -- Type "Money" with value constructor "Money{value, cur}" data Money = Money {value :: Double, cur :: Exchange} deriving Show -- Function that receives a Money and convert it to Doll...
#include<iostream> #include<vector> #include<cstring> #define N 100010 using namespace std; int n,k,ch=0; int a[N],c[N]; vector<int> b[N],ans; void dfs(int x) { if(c[x]==2) return; c[x]=1; for(int i=0;i<b[x].size();i++) { int y=b[x][i]; if(c[y]==1) { ch=1; return; } dfs(y); } c[x]=2; ans.push_b...
#! /usr/bin/python __author__="Guillermo Candia Huerta" __date__ ="$24-05-2010 01:15:04 AM$" def resolver( n, m, a): b1 = (n/a) b2 = (m/a) rn = n%a rm = m%a b = b1 * b2 if rn != 0 and rm != 0: b += 1 + b1 + b2 if rn == 0 and rm != 0: b += b1 if rn != 0 and rm == 0: b ...
// NewWarningWriter returns an implementation of WarningHandler that outputs code 299 warnings to the specified writer. func NewWarningWriter(out io.Writer, opts WarningWriterOptions) *warningWriter { h := &warningWriter{out: out, opts: opts} if opts.Deduplicate { h.written = map[string]struct{}{} } return h }
<gh_stars>1-10 //! Handler which replaces output by fixed data //! it can be used e.g. to clear the sensitive data //! `"secred_password"` -> `"***" //! //! # Example //! ``` //! use streamson_lib::{handler, matcher, strategy::{self, Strategy}}; //! use std::sync::{Arc, Mutex}; //! //! let handler = Arc::new(Mutex::new...
//---------------------------------------------------------- -*- Mode: C++ -*- // $Id: KfsWrite.cc 163 2008-09-21 20:06:37Z sriramsrao $ // // Created 2006/10/02 // Author: <NAME> // // Copyright 2008 Quantcast Corp. // Copyright 2006-2008 Kosmix Corp. // // This file is part of Kosmos File System (KFS). // // Licensed...
<filename>src/component/leaf/Button/Button.tsx import React from "react"; import { Trans } from "react-i18next"; import { ReactNode } from "react-markdown"; export default class Button extends React.Component<{className?:string|(string|false)[],onInteract:()=>void,text:string,disabled?:boolean}> { onInteract():voi...
The Kingdom of Aksum (Tigrinya: ስልጣነ ኣኽሱም also known as the Kingdom of Axum, or the Aksumite Empire) was an ancient kingdom located in what is now Tigray Region (northern Ethiopia) and Eritrea.[2][3] Axumite Emperors were powerful sovereigns, styling themselves King of kings, king of Aksum, Himyar, Raydan, Saba, Salhen...
<filename>spring-cloud-gray-server/src/main/java/cn/springcloud/gray/server/dao/repository/UserRepository.java<gh_stars>100-1000 package cn.springcloud.gray.server.dao.repository; import cn.springcloud.gray.server.dao.model.UserDO; import org.springframework.data.jpa.repository.JpaRepository; import org.springframewor...
/** * Resolve the imports. * * @param resolver import resolver */ @Override public void resolveImports(Consumer<TypeInfo> resolver) { fields.forEach(f -> f.resolveImports(resolver)); methods.forEach(m -> m.resolveImports(resolver)); }
/** * Get the current sample rate on the module. * * This assumes one entry in the scan list. * This is a global setting for the module and effects all channels. * * @return Sample rate. */ float AnalogModule::GetSampleRate() { tRioStatusCode localStatus = NiFpga_Status_Success; uint32_t ticksPerConve...
Interaction of tyrosine-based sorting signals with clathrin-associated proteins. Tyrosine-based signals within the cytoplasmic domain of integral membrane proteins mediate clathrin-dependent protein sorting in the endocytic and secretory pathways. A yeast two-hybrid system was used to identify proteins that bind to ty...
/** * Copyright (C) 2004-2014 the original author or authors. See the notice.md file distributed with * this work for additional information regarding copyright ownership. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may...
import { DeviceEventEmitter } from 'react-native'; import HoneywellScanner from 'react-native-honeywell-scanner-v2'; const startReader = () => { if (HoneywellScanner.isCompatible) { return HoneywellScanner.startReader().then((claimed: any) => { console.log(claimed ? 'Barcode reader is claimed'...
<gh_stars>0 /************************************************************************ * * * Copyright (C) 2012 OVSM/IPGP * * * * This prog...
/** * Create and register a new singleton instance of the ScanManager * MBean in the given {@link MBeanServerConnection}. * @param mbs The MBeanServer in which the new singleton instance * should be created. * @throws JMException The MBeanServer connection raised an exception * ...
Policy wonks call it the “last mile” - the infrastructure needed to get high-speed internet down those long and sparsely populated country roads. It’s expensive, and private companies are unlikely to recoup that investment from just a couple of households. And while Virginia’s candidates for governor agree something n...
#include "bits/stdc++.h" using namespace std; int main(void) { string s; cin >> s; int iend = s.size(); for(int i=0;i<iend;i++) { s.pop_back(); if(s.size() % 2 == 0) { if(s.substr(0,s.size()/2) == s.substr(s.size()/2, s.size()/2)) break; } } cout << s.size() << endl; }
A waning boom in U.S. crop prices will cut annual farm profits 27 percent this year from a record, potentially denting demand for Deere & Co. tractors and Monsanto Co. chemicals, the government said. Agricultural net income will be $95.8 billion, down from a revised $130.5 billion last year, the U.S. Department of Agr...
<gh_stars>0 """ Module to select the most important features for a model. """ from typing import List import logging import pandas as pd import shap def select_features_with_shap(k: int, model, model_type: str, X: pd.DataFrame, y) -> List[str]: """ Select the most relevant features for the `model`. T...
import { initializeFocusRects } from './initializeFocusRects'; import { IsFocusHiddenClassName, IsFocusVisibleClassName, setFocusVisibility } from './setFocusVisibility'; import * as getWindow from './dom/getWindow'; describe('setFocusVisibility', () => { let classNames: string[] = []; // tslint:disable-next-line...
Endoscopic reversal of vertical banded gastroplasty: a novel use of electroincision. Vertical banded gastroplasty (VBG) was introduced in 1982 as a restrictive form of weight loss surgery through the creation of a pouch using a vertical staple line and outlet restriction with a silastic band . However, the popularity...
/// take draw function F and draw screen with it pub fn draw_screen( &self, mut drawer: impl FnMut(Positioned<Tile>) -> GameResult<()>, ) -> GameResult<()> { // floor => item & character self.dungeon.draw(&mut drawer)?; self.dungeon.draw_ranges().into_iter().try_for_each(|pat...
NEW YORK (AP) — The U.S. television audience plummeted for the World Cup draw without the presence of the Americans in the 32-nation field. English-language coverage Friday on Fox’s FS1 averaged 65,000 viewers from 10-11:05 a.m. EST, down 87 percent from a record average of 489,000 for the 2014 draw televised by ESPN2...
/// Initializes a new XIdleHookClient for a socket at the given path. pub fn new<P: AsRef<Path>>(path: P) -> Result<Self, io::Error> { let stream = UnixStream::connect(path)?; Ok(XIdleHookClient { stream }) }
Series-Connected Hybrid Outsert Coil Winding Hardware Design The National High Magnetic Field Laboratory (NHMFL) has designed and is constructing a Series-Connected Hybrid (SCH) magnet system in Tallahassee, FL. Before the construction of the magnet system can begin many obstacles have to be solved through hardware de...
// append a new node at the end not for this lab public void append ( any newData){ Node newNode = new Node(newData, null); if (head == null) { head = newNode; return; } Node last = head; while (last.next != null) last = last.next; last...
from subprocess import check_output import sys import re #Small script for auto-generating provider functionality from help command data = check_output(["multipass", "help"]).decode(sys.stdout.encoding) options = data.split("Available commands:")[1].strip() command_info = re.split("\s{2,}", options) commands = [c fo...
<gh_stars>1-10 /* this ALWAYS GENERATED file contains the definitions for the interfaces */ /* File created by MIDL compiler version 8.01.0622 */ /* @@MIDL_FILE_HEADING( ) */ /* verify that the <rpcndr.h> version is high enough to compile this file*/ #ifndef __REQUIRED_RPCNDR_H_VERSION__ #define __REQUIRED_RPC...
<reponame>Leyonce/SimpleWeatherStation /* * 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 sensorapp; import java.sql.SQLException; import sensorapp.station.ConcreteDisplay.Stati...
Dave Hause had it all figured out by his late 20s: he was the singer in a successful punk band, the Loved Ones; ran his own construction business in Philadelphia when he wasn’t touring; and was happily married. Then it all fell apart: the band petered out, construction work dried up when the economy tanked in 2009 and ...
def plr(self, polygon: Polygon, splitter: Segment) -> RootedPolygons: vertices_in_interval = cut(polygon.border, splitter.start, splitter.end) if len(vertices_in_interval) < 3: current_polygon_part ...
<reponame>PowerRocker/rpi_spark_examples # eye # pupil # Upper eyelid # Lower eyelid # nose # mouth # Upper lip # Lower lip # eyebrow from JMRPiSpark.Drives.Screen.SScreen import SSRect class Organ: # Screen Canvas _cavas = None # SSRect class _ssrect = None _ssrect_last = None def __init__(...
#include <bits/stdc++.h> #define all(x) x.begin(),x.end() #define rep(a, b, c) for (int a = b; a < c; a++) #define sz(x) (int)x.size() using namespace std; using ll = long long; using vi = vector<int>; using pii = pair<int, int>; const ll M = ll(1e9) + 7; vi num, st; vector<vector<pii>> ed; int Time; ...
<filename>ssgetpy/matrix.py import os import time import requests from tqdm.auto import tqdm from . import bundle from .config import SS_DIR, SS_ROOT_URL class MatrixList(list): def _repr_html_(self): body = "".join(r.to_html_row() for r in self) return f"<table>{Matrix.html_header()}<tbody>{bod...
/** * Tasks executor with a limited queue. */ public class LimitedServiceExecutor implements ServiceExecutor { private static final Logger LOG = LoggerFactory.getLogger(LimitedServiceExecutor.class); private final int queueLimit; private final ExecutorService delegate; private final AtomicInteger q...
/** * Updates the state and the state covariance matrix using a radar measurement. * @param {MeasurementPackage} meas_package */ void UKF::UpdateRadar(MeasurementPackage meas_package) { n_z_ = n_z_radar; R = R_radar; Zsig = MatrixXd(n_z_, 2 * n_aug_ + 1); for (unsigned int i = 0; i < 2 * n_aug_ + 1; i++) { ...
def build_report(self, file_path:str, title: str, results: dict) -> None: curdoc().theme = REPORT_THEME page_builder = PageBuilder() pages = [] for asset_class_id, asset_class_results in results.items(): pages.append(page_builder.build_page(asset_class_id, asset_class_results...
/* * Hair2 License * * Copyright (C) 2008 <NAME> * * This program 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 option) any later version. * * ...
<reponame>jtharris/chip8<gh_stars>10-100 package system import ( "github.com/nsf/termbox-go" "time" ) // TerminalRenderer renders a virtual machine to a terminal using termbox type TerminalRenderer struct { shouldQuit bool } // Start the render loop, terminating when the escape key is pressed func (t *TerminalRen...
<gh_stars>10-100 package amf3 const MaxInt int = 268435455 const MinInt int = -268435456 const UTF8Empty byte = 0x01 const ( TypeUndefined byte = 0x00 TypeNull = 0x01 TypeFalse = 0x02 TypeTrue = 0x03 TypeInteger = 0x04 TypeDouble = 0x05 TypeString = 0x06 TypeXmlDoc = 0x07 TypeDate = 0x08 TypeArray = 0x09 ...
/** * Base class for schedulers (pools) for Drillbits. Derived classes implement * various policies for node selection. This class handles the common tasks such * as holding the Drillbit launch specification, providing Drillbit- specific * behaviors and so on. * <p> * The key purpose of this class is to abstract ...
Investigation of concrete crack repair by electrochemical deposition Cracks in reinforced concrete structures are inevitable in the process of use. Cracks not only affect the aesthetics of the structure appearance, but also affect the overall performance of the structure and shorten its life. Traditional methods are l...
Australia’s national rail network will reportedly be privatised, possibly through a share market listing, under plans to be announced in the federal budget tomorrow night. Treasurer Joe Hockey will outline a plan to sell the Australian Rail Track Corporation as part of a suite of measures to shrink bureaucracy and pro...
/** * An {@link Iterable} and {@link Iterator} of {@link Part} instances from a * {@link HttpServletRequest}. * * @author Oliver Richers * @author Alexander Schmidt */ class AjaxFileUploadList implements Iterable<IDomFileUpload>, Iterator<IDomFileUpload> { private final Iterator<Part> iterator; private Part cu...
/// Create Transaction from UnsignedTransaction and an array of proofs in the same order as /// UnsignedTransaction.inputs pub fn from_unsigned_tx( unsigned_tx: UnsignedTransaction, proofs: Vec<ProofBytes>, ) -> Result<Self, TransactionError> { let inputs = unsigned_tx .inputs ...
"""IP fragments tests."""
// The providePathSuggestion provide filesystem completion func providePathSuggestion(args ...string) []prompt.Suggest { l := len(args) if l == 0 { return []prompt.Suggest{} } path := args[l-1] if !strings.HasSuffix(path, "*") { path = path + "*" } files, _ := filepath.Glob(path) var ret []prompt.Suggest f...
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DerivingStrategies #-} {-# LANGUAGE EmptyDataDecls #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE RecordWi...
/** * @license Use of this source code is governed by an MIT-style license that * can be found in the LICENSE file at https://github.com/cartant/rxjs-tslint-rules */ import { expect } from "chai"; import * as semver from "semver"; import { knownObservables, knownOperators, knownPipeableOperators, knownProto...
Analyses and redesign of a technological device for automated assembly, using Design for Manufacturing and Assembly approach This paper aims to present a theoretical approach and a case study within a research upon product and process design methods in terms of manufacturing and assembly – supported by DFMA (Design fo...
package com.couchbase.lite; import com.couchbase.lite.auth.AuthorizerFactory; import com.couchbase.lite.auth.AuthorizerFactoryManager; // https://github.com/couchbase/couchbase-lite-java-core/issues/41 import com.couchbase.lite.auth.BuiltInAuthorizerFactory; import java.util.ArrayList; /** * Option flags for Manage...
Other claims about Sessions’s record similarly dissolved under scrutiny. White House Chief of Staff Reince Priebus insisted Sessions “worked his heart out” to get a posthumous medal for the civil-rights activist Rosa Parks; Sessions did not even sponsor the bill, he was one of 82 co-sponsors. Trump allies ran ads prais...
<filename>daemons/node/node_hardware.py import multiprocessing import subprocess import os class NodeHardware(object): def __init__(self): self.waiting = [] def available_cpus( self, priority, active_cores ): cpus = multiprocessing.cpu_count() interruptable = 0 for key, coredat...
package cellsociety.grid; import cellsociety.cells.Cell; import cellsociety.cells.EmptyCell; import cellsociety.cells.FireCell; import cellsociety.cells.ForagerCell; import cellsociety.cells.GameOfLifeCell; import cellsociety.cells.Neighbors; import cellsociety.cells.PercolationCell; import cellsociety.cells.PredatorC...
/** * Modify a smart contract instance to have the given parameter values. * <p> * Any null field is ignored (left unchanged). * <p> * If only the contractInstanceExpirationTime is being modified, then no signature is * needed on this transaction other than for the account paying for the transaction itself. * <p...
/** * Passes on the event to a separate thread that will call * {@link #asyncCallAppenders(LogEvent)}. */ @Override protected void callAppenders(final LogEvent event) { populateLazilyInitializedFields(event); if (!delegate.tryEnqueue(event, this)) { handleQueueFull(event);...
/** * A {@link Configurator} is able to configure several internal instances like {@link JAXBContext} and {@link Marshaller}.<br> * <br> * To do this <b>override</b> any method available.<br> * <br> * Example: * * <pre> * new Configurator() * { * &#064;Over...
/** * MongoDB database migrations using MongoBee. */ package org.investhood.app.config.dbmigrations;
The separation properties for closures of toric orbits A subset X of a vector space V is said to have the"Separation Property"if it separates linear forms in the following sense: given a pair (a, b) of linearly independent forms on V there is a point x on X such that a(x)=0 and b(x) is not equal to 0. A more geometric...
/** * Add an item and all items which allow to navigate to him to show item * set. Return true if we have been able to find a path to this item. * * @param itemId * id of item to show * @return true if we have been able to find a path to this item. */ protected boolean addItemToShow(UUI...
// Delete is called when an exposed service is deleted // Clears the service form the todo list func (s *LoadBalancerStrategy) Delete(svc *v1.Service) error { delete(s.todo, fmt.Sprintf("%s/%s", svc.Namespace, svc.Name)) return nil }
Michel Ancel, creator of Rayman, has built a level for Super Mario Maker. The famed French developer can be seen experimenting with Nintendo's upcoming Mario level creator in the video below. He even uses graph paper! This guy knows his stuff. Which is unsurprising, really - Ancel has had a hand in designing every m...