content
stringlengths
10
4.9M
<filename>src/main/java/com/gmail/jannyboy11/customrecipes/api/crafting/CraftingRecipe.java package com.gmail.jannyboy11.customrecipes.api.crafting; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import org.bukkit.ChatColor; import org.bukkit.Material; import org.bukkit.World; import org....
declare class SDK { constructor(opts?: Options); base: string; token: string | (() => string); auth: string; repository: RepositoryAPI; issue: IssueAPI; pr: PrAPI; label: LabelAPI; ticket: TicketAPI; project: ProjectAPI; summary: SummaryAPI; staff: StaffAPI; wallet: WalletAPI; trade: Trade...
<filename>x/ibc/03-connection/types/connection_test.go package types import ( "testing" "github.com/stretchr/testify/require" commitmenttypes "github.com/cosmos/cosmos-sdk/x/ibc/23-commitment/types" ibctypes "github.com/cosmos/cosmos-sdk/x/ibc/types" ) var ( connectionID = "connectionidone" clientID = "...
<gh_stars>0 import {Component, OnInit} from '@angular/core'; import {Desafio, DesafioTentativaResposta} from '../shared/model/matematica-play.model'; import {MatematicaPlayService} from '../shared/service/matematica-play.service'; @Component({ selector: 'app-matematica-play', templateUrl: './matematica-play.compon...
/* * A recursive function that counts all paths from src to * dst. Keep track of the count in the parameter. */ void Graph::path_counter(int src, int dst, int& path_count, vector<bool> visited) { visited[src]=true; if (src == dst) { path_count++; } else { for (auto neighbour : m_neighbours[src]) { if(!visited[...
def collect_results(input_path, output_file=None, aws_key=None, aws_secret=None): print(f'Reading results from {input_path}') scores = read_csv_from_path(input_path, aws_key, aws_secret) scores = scores.drop_duplicates() if output_file: output = output_file else: output = f'{input_pa...
// Generated by Haxe 4.2.0-rc.1+354c24d30 #include <hxcpp.h> #ifndef INCLUDED_95f339a1d026d52c #define INCLUDED_95f339a1d026d52c #include "hxMath.h" #endif #ifndef INCLUDED_Std #include <Std.h> #endif #ifndef INCLUDED_dsHelper_flatInterleave__FloatColorTriangles_FloatColorTriangles_Impl_ #include <dsHelper/flatInterle...
. INTRODUCTION In Chile, hemophilia was incorporated into the System of Explicit Health Guarantees (GES), which ensures access to treatment and financial protection for these patients. To support patients and their families, educational programs have been proposed that focus on managing possible complications of the p...
#ifndef LIBIS_SOURCE_H #define LIBIS_SOURCE_H #include <libis.h> #include <stdbool.h> struct LibisSource_ { // Read single byte from source into *c. // If end of file is reached *eof sets to true and *c sets to '\0'. // Otherwise *eof sets to false and *c sets to the next byte in the source. LibisErro...
#include<stdio.h> #define fromleft 1 #define fromup 0 int out[2002],twos[1001][1001]={0},fives[1001][1001]={0},a[1001][1001],dp[1001][1001]={0},dp2[1001][1001]={0},path[1001][1001],path2[1001][1001]; int min(int a,int b){return a<b?a:b;} void solve(int q,int w,int e) { while(e%2==0) { twos[q][w]++; ...
export type ApiMethod = | "delete" | "get" | "GET" | "DELETE" | "head" | "HEAD" | "options" | "OPTIONS" | "post" | "POST" | "put" | "PUT" | "patch" | "PATCH" | "link" | "LINK" | "unlink" | "UNLINK"; export interface ApiResultObject<TPayload, TData, TError> { endpoint: string; me...
Ag2r La Mondiale into second place The UCI Pro Tour started in 2005 as a way of categorising the top teams in pro cycling and has since become the World Tour. Since this designation became many teams have enjoyed success and failure but we must go back to 2005 for the longest losing streak when Saunier Duval didn’t wi...
// Code generated by goa v2.0.0-wip, DO NOT EDIT. // // chatter HTTP client types // // Command: // $ goa gen goa.design/goa/examples/chatter/design -o // $(GOPATH)/src/goa.design/goa/examples/chatter package client import ( goa "goa.design/goa" chattersvc "goa.design/goa/examples/chatter/gen/chatter" chattersvcvi...
class Graph: """ Object holding the representation of the graph and some metrics """ def __init__(self): self.individuals = [] self.adj = [] self.encounters = [[[] for day in range(daysNotif)] for individual in range(nbIndividuals)] self.nbHealthy = 0 # number of healthy peopl...
use proconio::fastout; use whiteread::parse_line; #[fastout] fn main() { let a: usize = parse_line().unwrap(); let b: usize = parse_line().unwrap(); let c: usize = parse_line().unwrap(); let d: usize = parse_line().unwrap(); println!("{}", a.min(b) + c.min(d)); }
/** * Disposes of the operating system resources associated with the clipboard. * The data will still be available on the system clipboard after the dispose * method is called. * * <p>NOTE: On some platforms the data will not be available once the application * has exited or the display has been disposed.</p...
def _remove_excluded_lines(formatted, exclude): out = list() for line in formatted.splitlines(): for ex in exclude: badlines = BADLINES.get(ex, list()) if any(line.startswith(i) for i in badlines): break else: out.append(line) return "\n".j...
<gh_stars>10-100 package github import ( "time" "github.com/giantswarm/microerror" "github.com/giantswarm/micrologger" ratelimit "github.com/giantswarm/draughtsman/service/eventer/github/internal/ratelimit" "github.com/giantswarm/draughtsman/service/eventer/spec" httpspec "github.com/giantswarm/draughtsman/ser...
/** *\brief Prints the DAQ mapping loaded by TotemDAQMappingESSourceXML. **/ class PrintTotemDAQMapping : public edm::one::EDAnalyzer<> { public: PrintTotemDAQMapping(const edm::ParameterSet &ps); ~PrintTotemDAQMapping() override {} private: std::string subSystemName; void analyze(const edm::Event &e, const e...
/** * saves the current state image to a JPG */ public void ToJPG(String path) { if (active) { SetupScaledBuff(); File out = new File(path); try { ImageIO.write(scaledBuff, "jpg", out); } catch (IOException ex) { ex.printS...
def alloc_max_array(): collection = [] while True: try: collection.append(MEGA_STR) except MemoryError as error: log_exception(error) break except Exception as exception: log_exception(exception, False) print('Maximum array size:', len(...
topic "WithFactory"; [ $$0,0#00000000000000000000000000000000:Default] [i448;a25;kKO9; $$1,0#37138531426314131252341829483380:structitem] [l288;2 $$2,0#27521748481378242620020725143825:desc] [0 $$3,0#96390100711032703541132217272105:end] [i448;b42;O9;2 $$4,4#61672508125594000341940100500538:tparam] [b42;2 $$5,5#1...
from rest_framework.serializers import ( ModelSerializer, ) from apps.configs.models import ( Config, AbstractProduct, Chart, Type, Source, Unit, ) class ChartSerializer(ModelSerializer): class Meta: model = Chart fields = '__all__' class TypeSerializer(ModelSerialize...
/** * @param ignite Ignite instance. * @param partId Partition id. * @return File page store for given partition id. * @throws IgniteCheckedException If failed. */ private FilePageStore filePageStore(IgniteEx ignite, int partId) throws IgniteCheckedException { final PdsFolderSettings fo...
/** * Format and render the given time to the given surface. * @param target The surface to render to. * @param rect The area of the surface in which to render. * @param time_ms The time to render in milliseconds. */ void render_time(SDL_Surface *target, SDL_Rect rect, unsigned int time_ms) { int m = time_ms/6000...
def should_resume(self, data_container: DataContainer, context: ExecutionContext) -> bool: if not self.summary_checkpointer.checkpoint_exists(context.get_path(), data_container): return False current_ids = self.summary_checkpointer.read_summary( checkpoint_path=context.get_path()...
<reponame>CSM-TeachingProject/Exerc-cios package view; import control.CompraJpaController; import control.PessoaJpaController; import java.util.ArrayList; import java.util.Date; import java.util.List; import java.util.logging.Level; import java.util.logging.Logger; import model.Compra; import model.Pessoa; public cla...
When a human being's body temperature builds up, either because he is in a hot or because he has been exercising or working a great deal, he begins to perspire. When people sweat, it is fairly obvious. Everybody perspires, although some do more so than others. For some human beings their sweat is only visible under the...
# Implementing Tower of Hanoi c=0 def move_tower(height, from_pole, to_pole, with_pole): if height >= 1: move_tower(height-1, from_pole, with_pole, to_pole) move_disk(from_pole, to_pole) move_tower(height-1, with_pole, to_pole, from_pole) def move_disk(fp,tp): global c c+=...
<reponame>giniedp/glib<filename>apps/web/src/examples/graphics/basics/hello-triangle-colored/index.ts<gh_stars>1-10 import { DeviceGL, createDevice } from '@gglib/graphics' import { loop } from '@gglib/utils' // Create the graphics device and pass the existing canvas element from the DOM. const device = createDevice({...
#include <bits/stdc++.h> using namespace std; #define rep(i, a) for(int i = 0; i < a; i++) #define reps(i, a, b) for(int i = a; i < b; i++) #define MP(a, b) make_pair(a, b) int costa[100000]; int costb[100000]; int N; int A[100000]; int main() { cin >> N; rep(i, N) cin >> A[i]; int b = A[0]; costa[0] = abs(...
def box_to_rect(box, color, linewidth=3): box = box.asnumpy() return plt.Rectangle( (box[0], box[1]), box[2] - box[0], box[3] - box[1], fill=False, edgecolor=color, linewidth=linewidth)
/* eslint-disable import/no-anonymous-default-export */ import React, { useEffect, useRef } from 'react'; import axios from '../Requests/Axios'; import '../Styles/sRow.css'; import MovieTile from './MovieTile'; import ArrowBackIosIcon from '@mui/icons-material/ArrowBackIos'; import ArrowForwardIosIcon from '@mui/icons-...
def count_params(model): assert isinstance(model, nn.Module) count = 0 for child in model.children(): if is_leaf(child): if hasattr(child, "_mask"): count += child._mask.long().sum().item() else: for p in child.parameters(): ...
#include "HOI4World/Map/Hoi4Building.h" #include "gtest/gtest.h" #include <sstream> TEST(HoI4World_Map_Building, ConnectingSeaProvinceDefaultsToZero) { const HoI4::BuildingPosition position; const HoI4::Building building(1, "type", position, std::nullopt); std::stringstream output; output << building; std::st...
<gh_stars>0 /***************************************************** * * InstagramLoginActivity.java * * * Modified MIT License * * Copyright (c) 2010-2017 Kite Tech Ltd. https://www.kite.ly * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated docume...
def _sanitize(header_tuple): header, value = header_tuple if (header.lower().strip() == "Authorization".lower().strip() and "Bearer".lower().strip() in value.lower().strip()): return header, "Bearer <redacted>" else: return header_tuple
import math import itertools import operator primes = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97] def get_prime_mult(n): m = [0] * 25 if n < 2: return m sq = int(math.sqrt(n)) p = 0 while primes[p] <...
/** Initialise the view, letting it know the data it will have to display. */ @CallSuper public void bindDataSource(TileGroup tileGroup, TileRenderer tileRenderer) { mTileGroup = tileGroup; mTileRenderer = tileRenderer; }
import express from 'express'; import 'reflect-metadata'; import './database'; import routes from './routes'; import 'reflect-metadata'; // import bodyParser from 'body-parser'; import cors from 'cors'; import awsConfig from './config/aws'; const app = express(); var bodyParser = require('body-parser'); app.use(cors...
<gh_stars>0 package test; import main.com.mmj.dao.IUser; import main.com.mmj.entity.User; import org.apache.ibatis.session.SqlSession; import org.apache.ibatis.session.SqlSessionFactory; import org.apache.ibatis.session.SqlSessionFactoryBuilder; import java.io.InputStream; import java.util.List; /** * Created by Ma...
<filename>aiida/restapi/resources.py # -*- coding: utf-8 -*- ########################################################################### # Copyright (c), The AiiDA team. All rights reserved. # # This file is part of the AiiDA code. # # ...
/** * Adds additional data to the currently selected clipboard and Window * if it does not already exist. * * \param cliptype The Atom to set the data for. * \param data The data to set. * \param srclen The length of the data. */ static void _add_clip_data (Atom cliptype, char *data, int srclen) { Atom clip ...
//--------------------------------------------------------------------------- // // Member: CHTMLDlg::AccessAllowed() // // Synopsis: Checks if the dialog did not leave the original URL domain // (via redirection or META-REFRESH for example). This is to prevent // security hole ...
<gh_stars>1-10 import { bytesEqual } from '@rigidity/bls-signatures'; import { Program } from '../index'; import { Group } from './helpers'; const atomMatch = new TextEncoder().encode('$'); const sexpMatch = new TextEncoder().encode(':'); export function unifyBindings( bindings: Group, key: string, valueP...
/// Construct a set of room emotes from twitch. async fn emote_sets_from_twitch(&self, emote_sets: &str) -> Result<EmoteByCode, Error> { let result = self .inner .twitch .v5_chat_emoticon_images(emote_sets) .await?; let mut emotes = EmoteByCode::default();...
/** * This is the Accumulo implementation of the data store. It requires an AccumuloOperations instance * that describes how to connect (read/write data) to Apache Accumulo. It can create default * implementations of the IndexStore and AdapterStore based on the operations which will persist * configuration informat...
/** * Minimum value is 1 if included. */ public Discover page(Integer page) { if (page != null && page > 0) { params.put(AbstractTmdbApi.PARAM_PAGE, String.valueOf(page)); } return this; }
/** * This method initializes the arguments and calls the execute method. * * @throws AutomicException * exception while executing an action */ public final void execute() throws AutomicException { try { prepareCommonInputs(); client = HttpClientConf...
<reponame>aykutsahin98/ReCapProject-Frontend import { Injectable } from '@angular/core'; import {HttpClient} from "@angular/common/http"; import { Observable } from 'rxjs'; import { listResponseModel } from '../models/listResponseModel'; import { Rental } from '../models/rental'; import { RentalDto } from '../models/re...
t = int(input()) x = input().split(" ") test = [] police = 0 crimes = 0 for y in x: test.append(int(y)) for case in test: if case > 0: police += case else: if police > 0: police -= 1 else: crimes += 1 print(crimes)
<filename>src/header.h<gh_stars>1-10 #include <stdio.h> #include <unistd.h> #include <stdlib.h> #include <sys/socket.h> #include <sys/types.h> #include <sys/stat.h> #include <netinet/in.h> #include <string.h> #include <dirent.h> #include <time.h> #include <arpa/inet.h> #include <fcntl.h> #include <errno.h> #include <pt...
You must sign in or register to continue reading content. An Everett postal facility that serves communities from Lynnwood north to the Canadian border is still planned for closure. Just when that closure might happen isn’t clear. The Postal Service said it would hold off on shutting down any mail processing faciliti...
/** * Created by alfred on 3/13/16. */ public class CityDataStructure { private String cityName; private String countryName; private String cityID; // constructor public CityDataStructure(String cityId, String city, String country ) { this.cityName = city; this.countryName = coun...
def count(self, filter): counter = 0 for source in self.listing(): counter += source.count(filter) return counter
// CredentialsJSON returns an Option that authenticates API calls using the credentials file in jsonKey. func CredentialsJSON(jsonKey []byte) Option { return WithTokenSourceFactory(func(ctx context.Context, scopes ...string) (oauth2.TokenSource, error) { cfg, err := google.JWTConfigFromJSON(jsonKey, scopes...) if ...
import { useState } from "react"; import { Redirect } from "react-router-dom"; import { useSelector } from "../../redux/store"; import { auth, signInWithGoogle } from "../../api/firebase"; import { Container, Form, Heading, Input, Button, Link } from "./SignInStyles"; const SignIn = () => { const [userCredentials, s...
<reponame>MrCroxx/RunKV use std::collections::btree_map::{BTreeMap, Entry}; use std::sync::Arc; use async_trait::async_trait; use itertools::Itertools; use runkv_common::channel_pool::ChannelPool; use runkv_common::packer::Packer; use runkv_proto::wheel::raft_service_client::RaftServiceClient; use runkv_proto::wheel::...
-------------------------------------------------------------------------------- -- | -- Module : Data.Record -- Copyright : 2012-2013 <NAME> -- License : BSD3 -- Maintainer : <EMAIL> -- Stability : experimental -- -- Data.Record provides a "record transformer" -- implemented as a heterogenous -- linke...
/** * Saves all unsaved changes to the models to disk */ public synchronized void save(){ for (Entry<File, CachedModel> entry : models.entrySet()){ saveModel(entry.getKey(), entry.getValue()); } tidyUpModelCache(); }
package hurrycaneblurryname.ryde.View; import android.app.Dialog; import android.content.DialogInterface; import android.content.Intent; import android.content.res.Resources; import android.location.Address; import android.location.Geocoder; import android.support.v7.app.AppCompatActivity; import android.os.B...
There have been lots and lot of numbers thrown around over the past 24 hours, as every presidential candidate this side of Bobby Jindal and Lincoln Chafee declare themselves the winner of the third quarter of fundraising. (Reports of money raised and spent were due to the Federal Election Commission by midnight Thursda...
// NewUserContext returns a new *UserContext func NewUserContext() *UserContext { return &UserContext{ AARFlowStatsInterval: 30, AARProbeStatsInterval: 30, VSSFeatureEnabled: false, VSSStatsInterval: 30, MaintenanceModeEnabled: false, RbacEnabled: fals...
// WriteSettings commits any changes to the settings. func (*DatabaseSettings) WriteSettings(c context.Context, values map[string]string, who, why string) error { databaseSettings := &DatabaseSettings{ Server: values["Server"], Username: values["Username"], Password: values["Password"], Database: values["Dat...
<gh_stars>1-10 # Copyright 2018 <NAME> <<EMAIL>> # # 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...
/** * @author auto create * @version */ public class ListScenarioRequest extends RpcAcsRequest<ListScenarioResponse> { private String scenario; private String appId; private String name; private String sign; public ListScenarioRequest() { super("ARMS", "2019-08-08", "ListScenario"); setMe...
def collect_segments(target_dir): fregex = re.compile(r"^%s$" % (filename_pattern() % (r'(\d{3})', r'(\d{10})', 'records'))) res = {} for tdir, _, files in os.walk(target_dir): if tdir == target_dir: continue res[tdir] = {} for segfile in sorted(files): match ...
A lot of Jews have the physical qualities of prehistoric humans, such as a big face, big nose, short neck, and slanted forehead. Is this just a coincidence? Or are Jews more genetically similar to primitive savages than the rest of us? Is there such a thing as a " Napoleon Complex "? Some people have created the theor...
// PartialRange returns the range between the start and end positions where the // specified ends are partial. They can be Complete, Partial5, Partial3, or // PartialBoth. func PartialRange(start, end int, partial Partial) Ranged { if end <= start { panic(fmt.Errorf("Ranged bounds out of range [%d:%d]", start, end))...
def reproject_array( arr: xr.DataArray, spec: RasterSpec, interpolation: Literal["linear", "nearest"] = "nearest", fill_value: Optional[Union[int, float]] = np.nan, ) -> xr.DataArray: from_epsg = array_epsg(arr) if ( from_epsg == spec.epsg and array_bounds(arr) == spec.bounds ...
The RPOC long axis is a simple indicator for predicting the need of invasive strategies for secondary postpartum hemorrhage in either post-abortion or post-partum women: a retrospective case control study Background The retained products of conception (RPOC) and related conditions (RPOC-ARC) are the main cause of seco...
#include<bits/stdc++.h> using namespace std; queue<int>st[200007]; int main() { //while(1) { string s; cin>>s; int cnt=0; for(int i=1;i<=s.length();i++) { if(s[i-1]=='0'){ st[++cnt].push(i); } else{ if(!cnt){ ...
/* * Created by Orchextra * * Copyright (C) 2016 Gigigo Mobile Services SL * * 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...
/** * Creates a wew Sort instance to be used in a NoSQL query. * * @param name - the field name be used in a sort process * @param type - the way to be sorted * @return a sort instance * @throws NullPointerException when there are null parameters */ public static Sort of(String name, ...
def is_comment_end(line): stripped = line.strip() return not stripped.startswith('/*') and stripped.endswith('*/')
Left Cardiac Sympathetic Denervation in Long QT Syndrome: Analysis of Therapeutic Nonresponders Background—Long QT syndrome (LQTS) is a potentially lethal but highly treatable cardiac channelopathy. Treatment options include pharmacotherapy, device therapy, and left cardiac sympathetic denervation (LCSD). Here, we sou...
President Trump has offered the job of national security adviser to retired Vice Adm. Robert Harward following Michael Flynn's resignation earlier this week, according to reports. It wasn't immediately clear if Harward, who previously served as a Navy SEAL and as deputy commander of U.S. Central Command, had accepted ...
import cv2 from PyQt5.QtCore import QTimer class Camera(object): def __init__(self): self.device = 0 self.cap = cv2.VideoCapture() self.timer = QTimer() def stop(self): self.timer.stop() self.cap.release() return True def pause(self): self.timer.st...
/** * Generate an RRULE string for an array of GregorianCalendars, if possible. For now, we are * only looking for rules based on the same date in a month or a specific instance of a day of * the week in a month (e.g. 2nd Tuesday or last Friday). Indeed, these are the only kinds of * rules used in...
def fit_response(partab, toolparams): m = toolparams['m'] if 'weights' in partab.columns: sigmas = 1.0 / partab.weights.values else: sigmas = np.ones_like(partab.freq.values) fit_delta = lambda x, d, k: np.arccos((k - m * x*x) / np.sqrt(x*x*d*d + (k - m*x*x)**2)) popt_delta, pcov = c...
class Circle { int r=12; static float pi=3.14f; public static void main(String[] args) { area(); circum(); } static void area() { Circle c=new Circle(); System.out.println("Area:"+(pi)*(c.r)*(c.r)); } static void circum() { Circle c=new Circle(); System.out.println("Circumstance:"+2*pi*c.r); } }
<filename>hi_snex/src/asmjit/core/string.h // [AsmJit] // Machine Code Generation for C++. // // [License] // Zlib - See LICENSE.md file in the package. #ifndef _ASMJIT_CORE_STRING_H #define _ASMJIT_CORE_STRING_H #include "../core/support.h" #include "../core/zone.h" ASMJIT_BEGIN_NAMESPACE //! \addtogroup asmjit_su...
A simulation study on the choice of regularization parameter in ℓ2-norm ultrasound image restoration Ultrasound image deconvolution has been widely investigated in the literature. Among the existing approaches, the most common are based on ℓ2-norm regularization (or Tikhonov optimization) or the well-known Wiener filt...
/// The associated weight value specified; defaults to 1. pub fn weight(&self) -> u32 { use ReplacementValue::*; match self { String(..) => 1, Weighted(.., w) => *w, } }
def _handleSIGTERM( signalType: int, frame: FrameType, sim_session: SimulatorSession ) -> None: log.info("Handling SIGTERM.") sim_session.unregister() log.info("SIGTERM Handled, exiting.") sys.exit()
fn create () {} fn get () {} fn update () {} fn delete () {} fn connect () {} fn disconnect () {} fn send () {} fn recieve () {}
/* Parse a zFCP host device entry. */ static void parse_zfcp_host(struct fw_file *f, struct fw_dehdr *de, config_t config, struct util_list *objects) { struct fw_zfcp_host *zfcp_host = (struct fw_zfcp_host *) de; struct ccw_devid devid; struct device *dev; char *id; if (!check_de_size(f, de, sizeof(struct f...
import torch from torch import nn from torch.nn import functional as F from qytPytorch.modules.conv_layer import GlobalMaxPool1d class TextCNN(nn.Module): """ TextCNN文本分类. @params: vocab_size - 词典大小. labels_size - 标签个数. embed_dim - embed维度大小. kernel_sizes - 卷积核大...
/** * The method for check work threads with queue. * * @throws Exception - check any errors; */ @Test public void whenCheckWorkTwoThreads() throws Exception { int cycle = 10; ProducerConsumer pc = new ProducerConsumer(); pc.getProducer().start(); pc.getConsumer()...
AUG 1 2014 BY JAY COLE On Thursday, Tesla reported 2nd quarter earnings that mostly beat analyst expectations, earning 11 cents a share (ex-items) on revenues of $858 million dollars while delivering 7,579 Model S sedans (full details on the report can be found here). But historically, the real highlights happen on t...
<reponame>hiyouga/PY-Learning import numpy as np import json with open('docs.json', 'r') as f: docs = json.loads(f.read()) f.close() link_dict = {} ind2link = [] link_num = 0 for v in docs.values(): for ck in v.keys(): if ck not in ind2link: link_dict[ck] = link_num ind2li...
More than any other technical design or social institution, the railway stands for modernity. No competing form of transport, no subsequent technological innovation, no other industry has wrought or facilitated change on the scale that has been brought about by the invention and adoption of the railway. Peter Laslett o...
<gh_stars>0 // Author(s): <NAME>, <NAME> // Copyright: see the accompanying file COPYING or copy at // https://github.com/mCRL2org/mCRL2/blob/master/COPYING // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // /...
SAN FRANCISCO — Here is how the venture capital game used to be played around here: A friend calls a friend who knows a guy. A meeting is taken. Wine is drunk (at, say, Madera lounge in Menlo Park). A business plan? Sure, whatever. But how does it feel? This is decidedly not how Google, that apotheosis of our data-dr...
/* * MIT License * * Copyright (c) 2019 <NAME> * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, m...
//decide to support simultaneous events public class DFA { private LinkedHashMap<DFAState, DFATransition> transitions = new LinkedHashMap<DFAState, DFATransition>(); public DFAState I; private ArrayList<Atom> atoms = new ArrayList(); private DFAState violation = DFAState.get("violation"); ...
/* * General tests for things not covered directly in the specification. */ public class MQTT5Test extends MQTT5TestSupport { private static final Logger log = Logger.getLogger(MQTT5Test.class); public MQTT5Test(String protocol) { super(protocol); } /* * Ensure that the broker adds a timestam...
Credit: Sony Here’s a question for you hybrid comic book/professional sports fans – what usually happens when rumors of a struggling head coach being put on the chopping block, or a star player being put on the trade market begin surfacing in the sports media? The answer is those rumors have a way of often being … or...
/** * Rapture {@link UiPluginDescriptor} for {@code coreui-plugin}. * * @since 3.0 */ @Named @Singleton @Priority(Integer.MAX_VALUE - 100) // after nexus-rapture public class UiPluginDescriptorImpl extends UiPluginDescriptorSupport { public UiPluginDescriptorImpl() { super("coreui-plugin"); setN...
/* Runs 10 copies of WorkerThread in parallel. The address of a * shared volatile AtomicInt32 counter is passed to each thread. */ static void CheckAtomicityUnderConcurrency(void) { volatile AtomicInt32 counter = 0; pthread_t threads[NUM_THREADS]; int ii; workers_begin = 0; for (ii = 0; ii < ARRAY_SIZE(th...