content
stringlengths
10
4.9M
/** * Validate if a NodeTemplate is from a specific type * * @param node */ public void verifyNode(PaaSNodeTemplate node, String type) { IndexedNodeType indexedNodeType = node.getIndexedToscaElement(); if (!ToscaUtils.isFromType(type, indexedNodeType)) { throw new Resourc...
cases=int(input()) answers=[0]*cases for i in range(cases): amount=int(input()) candiesR=input().split() orangesR=input().split() candies=[0]*amount oranges=[0]*amount for j in range(amount): candies[j]=int(candiesR[j]) oranges[j]=int(orangesR[j]) for j in range(amount): answers[i]...
// Get or create a tag func GetOrCreateTag(tagRequest TagRequest) Tag { if tagRequest.Name == "" { return Tag{} } tag := Tag{ Name: tagRequest.Name, } DB.Where("name=?", tag.Name).FirstOrCreate(&tag) return tag }
def send_note(bird, prob): req = {"req": "note.add"} req["file"] = "bird.qo" req["start"] = True req["body"] = {"bird": bird, "prob": prob, "from": sms_from, "to": sms_to} rsp = card.Transaction(req)
def remove_stress( word_pron: WordPronunciation, keep_stress: bool = False ) -> WordPronunciation: if keep_stress: return word_pron word_pron.phonemes = [REGEX_STRESS.sub("", p) for p in word_pron.phonemes] return word_pron
"I hope to show those who don't believe you can be an LGBT person of faith that there are many of us doing just that." A new photoseries from columnist/speaker Eliel Cruz highlights queer people of faith within our community. #FaithfullyLGBT is a place for LGBT people of faith, any faith, to share news stories, their...
def spark_session(example_repo_path: str) -> SparkSession: repo_config = load_repo_config(repo_path=Path(example_repo_path)) return get_spark_session_or_start_new_with_repoconfig( store_config=repo_config.offline_store, )
import test from "ava" import { nameToWords, wordsToName } from "./words" test("nameToWords", t => { t.deepEqual(nameToWords("Foo_Bar_Baz32"), ["foo", "bar", "baz32"]) }) test("wordsToName", t => { t.deepEqual(wordsToName(["foo", "bar", "baz32"]), "Foo_Bar_Baz32") })
def check_interval(self, interval, value, include=True): if interval is None: return True else: if include: return (value >= interval[0]) and (value <= interval[1]) else: return (value < interval[0]) or (value > interval[1])
<reponame>BezzubovEgor/react-router-navigation-confirm<filename>example/src/demo/components/HandlersExample.tsx import * as React from 'react'; import { HistoryListener, NavigationConfirmModal } from 'react-router-navigation-confirm'; import { ExampleBlock, ExampleRoutes, InlineCode } from 'src/common/components'...
<filename>src/sodium/include/sodium/crypto_stream_aes256estream.h #ifndef crypto_stream_aes256estream_H #define crypto_stream_aes256estream_H /* * WARNING: This is just a stream cipher. It is NOT authenticated encryption. * While it provides some protection against eavesdropping, it does NOT * provide any securi...
def meta(self, page_type): meta_alternate = '<link rel="alternate" type="application/rss+xml" href="%s/atom.xml" />\n' meta_stylesheet = '<link rel="stylesheet" type="text/css" href="%s">\n' meta_description = '<meta name="description" content="%s">\n' meta_html = '<title>%s</title>\n' %...
export const routes = { HOME: "/", ABOUT: "/about", NO_PAGE_FOUND: "/no-page", AUTH: "/auth", START_PARTY: "/start-party", SELECT_VIDEO: "/select-video", CREATE_ROOM: "/create-room", CREATE_LINK_FOR_LATER: "/create-link-for-later", SELECT_STREAMING_SERVICE: "/select-streaming-service", JOIN_ROOM: "/...
<reponame>mik2k2/dendrite<filename>syncapi/storage/sqlite3/send_to_device_table.go // Copyright 2019-2020 The Matrix.org Foundation C.I.C. // // 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 ...
<gh_stars>1-10 package main import ( "context" "flag" "time" format "github.com/cloudevents/sdk-go/binding/format/protobuf/v2" cloudevents "github.com/cloudevents/sdk-go/v2" "github.com/cloudevents/sdk-go/v2/event" "github.com/vorteil/direktiv-knative-source/pkg/direktivsource" igrpc "github.com/vorteil/direk...
Andrew Coyne marshals an impressive range of statistics to make the case that rising income inequality is not a serious issue. A careful reading of his article shows that this is not the case. As Coyne himself agrees, top incomes (incomes of the top 20%) rose much faster than those of middle and lower income groups fo...
<reponame>stuliveshere/Seismic-Processing-Prac3<filename>prac3/exercise4.py #spherical divergence correction import toolbox import numpy as np import pylab pylab.rcParams['image.interpolation'] = 'sinc' #-------------------------------------------------- # useful functions #-------------------------------------...
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you...
/** * Created by qiunet. * 18/1/30 */ public class TestPlayerInfo extends BaseStringLogicTestCase { @Override protected int getRequestID() { return 1004; } @Override protected String requestBuild(Robot robot) { return robot.getToken(); } @Override protected void responseData(Robot robot, String s) { ...
Mobilizing Mothers for War Studies document that in wartime, states often employ maternal imagery and mobilize women as mothers.Yet we know relatively little about when and why states and their opposition do so. This study seeks to build theory for this phenomenon through frame analysis of the Nicaraguan Contra War. T...
// CheckVersion set version and supportGeneratedColumn func (db *DB) CheckVersion() error { verGeneratedColumn, err := version.Parse(MinMysqlVersion) if err != nil { return errors.WithStack(err) } var v string row := db.db.QueryRowx(`SELECT version();`) if err := row.Scan(&v); err != nil { return errors.WithS...
def make_createblockdevicedataset_mixin(profiled_api): class Mixin(CreateBlockDeviceDatasetImplementationMixin, TestCase): def setUp(self): super(Mixin, self).setUp() if profiled_api: self.api = fakeprofiledloopbackblockdeviceapi_for_test( ...
/** * Constructor * * @param tx the pin instance to use for transmission * * @param rx the pin instance to use for reception * **/ SAMDSerial::SAMDSerial(Pin& tx, Pin& rx) : Serial(tx, rx) { this->instance_number = 255; this->baudrate = CODAL_SERIAL_DEFAULT_BAUD_RATE; memset(&USART_INSTANCE, 0, sizeo...
Santa Clara County officials have declared a local emergency after they said someone intentionally cut an underground fiber optic cable in south San Jose, causing a widespread phone service outage in southern Santa Clara and Santa Cruz counties today that included disruption to 911 emergency phone service. John Britto...
def compute_image_histogram(infile, nbins=100, threshold=0.0): import numpy as np import nibabel as nb data = nb.load(infile).get_data().ravel() if threshold > 0: data = data / max(data) data = data[data >= threshold] histogram_values, bin_edges = np.histogram(data, bins=nbins) r...
Hat tip to my friend Mike for the excellent Photoshop. With an uncertain future on Long Island, the Islanders, and owner Charles Wang, are looking at all available options to keep the once-great franchise in the greater New York area. It’s almost certain that the Islanders will leave Nassau Coliseum when their lease e...
Effects at a Linear Collider with Polarized Beams 1 The four-fermion contact-interaction searches in the process ee → μμ at a future ee Linear Collider with c.m. energy √ s = 0.5 TeV and with both beams longitudinally polarized are studied. We evaluate the corresponding model-independent constraints on the coupling co...
/** * This class implements a simple HTTP server. A HttpServer is bound to an IP address * and port number and listens for incoming TCP connections from clients on this address. * The sub-class {@link HttpsServer} implements a server which handles HTTPS requests. * <p> * One or more {@link HttpHandler} objects mus...
President-elect Donald Trump will begin to dismantle the Affordable Care Act almost immediately when he takes office this month through a series of executive orders, Mike Pence reportedly told House Republicans in a meeting on Capitol Hill on Wednesday morning. Rep. Chris Collins (R-NY), a steadfast Trump ally in the l...
// // Ingest and process data from RRD files // func (tr *Transformer) Run() error { Create or open data repository var r *repository.BadgerRepo var err error if tr.forceIngest { r, err = repository.NewBadgerRepo("./kv/") if err != nil { return err } tr.repository = r } if tr.skipIngest { fmt.Printl...
def _extract_property_info(self,prop_addr): size_byte = self.game_memory[prop_addr] property_number = size_byte & 0x1F property_size = ((size_byte & 0xE0) >> 5) + 1 return property_number,property_size
//-------------------------------------------------------------------------- // Reload config - indirectly called from SIGHUP handler void Shell::reload() { Log::Streams log; log.summary << "SIGHUP received\n"; if (config.read(config_element)) application.read_config(config); else log.error << "Failed t...
<gh_stars>10-100 package com.hbm.items.gear; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemHoe; import net.minecraft.item.ItemStack; public class HoeSchrabidium extends ItemHoe { public HoeSchrabidium(ToolMaterial p_i45343_1_) { super(p_i45343_1_); } @Override public Enum...
Béla I, (born c. 1020—died September 1063), king of Hungary (1060–63) who fought a successful war against the Holy Roman emperor Henry III to defend his country’s independence. His father, Prince Vazul (also called Basil or Vászoly), was a nephew of King Stephen I. On the death of his son Imre, Stephen declared not Va...
<reponame>13765155217/huangz package io.github.biezhi.elves.request; import io.github.biezhi.elves.response.Result; import io.github.biezhi.elves.response.Response; /** * 解析器接口 * * @author biezhi * @date 2018/1/12 */ public interface Parser<T> { Result<T> parse(Response response); }
def _setup(self, config_path): config = read_yaml(config_path) self.check_interval = config.get('check_interval', 30) self.monitors = [ Monitor( mon, counter=self._monitor_counter, logger=self._logger, ) for mon ...
<filename>Data/Copointed.hs module Data.Copointed where import Control.Comonad import Data.Default import Data.Functor.Identity import Data.Functor.Compose import Data.Functor.Coproduct import Data.Tree import Data.Semigroup as Semigroup import Control.Monad.Trans.Identity import qualified Control.Monad.Trans.Writer....
<filename>src/interlocked.h // Copyright (c) 2004-2020 <NAME> / LittleWing Company Limited. // See LICENSE file for terms and conditions of use. #ifndef INTERLOCKED_H_INCLUDED #define INTERLOCKED_H_INCLUDED #include "core.h" inline int32_t interlocked_exchange_int32(volatile int32_t* target, int32_t value) { __a...
<reponame>zealoussnow/chromium<gh_stars>100-1000 // Copyright 2021 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. #ifndef THIRD_PARTY_BLINK_RENDERER_CORE_SPECULATION_RULES_DOCUMENT_SPECULATION_RULES_H_ #define THIRD_PAR...
// GetGinAccounts returns a gin.Accounts struct with values pulled from a Config struct func GetGinAccounts(config *Config) gin.Accounts { a := make(gin.Accounts) for _, user := range config.Users { a[user.Name] = user.Password } return a }
In 2006, Ron Suskind published “The One Percent Doctrine,” a book about the U.S. war on terrorists after 9/11. The title was drawn from an assessment by then-Vice President Dick Cheney , who, in the face of concerns that a Pakistani scientist was offering nuclear-weapons expertise to Al Qaeda , reportedly declared: “If...
def create_neurons(self, n: int, row: int, x_sep: int, diameter: int) -> list: out = [] if n % 2 == 0: num_on_each_side = n / 2 - 1 offset = x_sep * num_on_each_side offset += diameter + ((x_sep - diameter) / 2) else: num_on_...
/** createDictFromFiles() : * Based on type of param given, train dictionary using the corresponding algorithm * @return dictInfo containing dictionary buffer and dictionary size */ dictInfo* createDictFromFiles(sampleInfo *info, unsigned maxDictSize, ZDICT_random_params_t *randomParams, ZDICT_co...
/** * Git History generates an event when it is installed, updated, or uninstalled, that is anonymous, non-personal, and cannot be correlated. * - Each event only contains the Git History and Visual Studio Code version numbers, and a 256 bit cryptographically strong pseudo-random nonce. * - The two version number...
/** * author: lx * date: 15-8-27 * * request using volley, with returned data parsed into a JsonHolder object. */ public class VolleyJsonRequest<T> extends VolleyStringRequest<T> { private static Gson sGson = new Gson(); private TypeToken<T> mTypeToken; public VolleyJsonRequest(String url, Map<Strin...
from django.db import models from rdmo.core.managers import (AvailabilityManagerMixin, AvailabilityQuerySetMixin, CurrentSiteManagerMixin, CurrentSiteQuerySetMixin, GroupsManagerMixin, Groups...
CLOSE The Fairfield brewery will hold an anniversary celebration this weekend. 10/13/16 Michael Izzo Anniversary celebration this weekend at brewery Buy Photo Cricket Hill Brewing in Fairfield celebrates their 15th anniversary. Founder Rick Reed and co-owner Ed Gangi talk about the milestone and the beer. MOR 1015 Cr...
/* Copyright 2016 The Kubernetes Authors All rights reserved. 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 ag...
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
def as_location(self): long_location = self.get_parent_atlas()._get_nodeLocations().elements[self.index] return pyatlas.geometry.location_from_packed_int(long_location)
<gh_stars>0 #include <stdio.h> int main() { short n[3], nn[4]; short i, j, flag; nn[0] = 123; LOOP: if ((nn[1]=nn[0]++) > 329) goto EXIT; nn[2] = 2 * nn[1]; nn[3] = 3 * nn[1]; flag = 1; for (i = 1; i < 4; i++) { for (j = 0; j < 3; j++) { n[j] = nn[i] % 10; if (!(flag&(1<<n[j]))) flag |= (1<<n[j]); ...
// Fills the 'buffer' with maximum of 'count' bytes. Actual number of bytes copied into the buffer // is returned. // If local cache buffer doesn't contain enough bytes, then a request to the service for 'count' bytes is sent, // (blocking while receiving response), and the 'buffer' is filled with the returned data (r...
def to_spark(self, flatten=True): t = self.expand_types() if flatten: t = t.flatten() return pyspark.sql.DataFrame(t._jt.toDF(Env.hc()._jsql_context), Env.sql_context())
Professional Preparation of Future Teachers of Vocational Training in the Transport Area of Expertise with Use of the Author's Educational Application : The paper presents the content, as well as approaches to the use in the educational process of the author’s Electronic educational methodical complex (EEMC) “Construc...
/** * The Address parser should parse an address with a street name, a building * number, and a city name. */ @Test public void testCityParsing() { Address a1 = Address.parse("1234 Foo"); assertNotNull(a1); assertEquals("1234", a1.postcode()); assertEquals("Foo", a1.city()); Address a2 = ...
<reponame>TheDayC/ecommerce-microservice import { NextFunction, Request, Response } from 'express'; import {IProduct} from './db'; export interface CustomRequest extends Request { products?: IProduct[]; } export type ExpressFunc = (req: CustomRequest, res: Response, next: NextFunction) => void;
// hexFile reads the given file and decodes the hex data contained in it. // Whitespace and any lines beginning with the # character are ignored. func hexFile(file string) []byte { fileContent, err := ioutil.ReadFile(file) if err != nil { panic(err) } var text []byte for _, line := range bytes.Split(fileContent,...
<reponame>manifoldco/component-plan-matrix<gh_stars>1-10 import { displayTierCost } from './cost'; describe('displayTierCost', () => { it('very cheap', () => { expect(displayTierCost(8000, 'email')).toBe('$0.08 / 10k emails'); }); it('somewhat cheap', () => { expect(displayTierCost(800000, 'email')).toB...
Yet another security researcher is poking holes in the security of Mega, this time by pointing out that the confirmation messages e-mailed to new users can in many cases be cracked to reveal their password and take over their Mega accounts. Steve "Sc00bz" Thomas, the researcher who uncovered the weakness, has released...
Stable heat and particle flux detachment with efficient particle exhaust in the island divertor of Wendelstein 7-X The island divertor concept is an innovative and promising idea to handle heat and particle exhaust in stellarators. At the Wendelstein 7-X (W7-X) stellarator, this divertor concept plays a central role i...
<reponame>githayu/nicofinder-extension<filename>src/background/getNicoUserSession.ts export async function getNicoUserSession(): Promise<string | void> { return new Promise((resolve) => chrome.cookies.getAll( { domain: 'nicovideo.jp', name: 'user_session', }, (cookies) => { ...
/** @module index */ export * from './auth'; export * from './build'; export * from './cache'; export * from './config'; export * from './connect'; export * from './count'; export * from './lock'; export * from './log'; export * from './info'; export * from './test'; export { Component } from './Component'...
Application of query-based learning to power system static security assessment A query-based learning and inverted neural network methods are developed for static security assessment of power system. By the proposed method, the demand for huge amounts of data to evaluate the security of the power system can be conside...
// 그룹 멤버들의 이름을 저장하고 원하는 이름을 알려줌 public class ManageName { private final String ONE = "최현정"; private final String TWO = "장해솔"; private final String THREE = "박재민"; private final String FOUR = "고동영"; private final String FIVE = "이정현"; private final String SIX = "류슬기"; private final String SEVEN...
<filename>src/Estimators/OperatorEstBase.h ////////////////////////////////////////////////////////////////////////////////////// // This file is distributed under the University of Illinois/NCSA Open Source License. // See LICENSE file in top directory for details. // // Copyright (c) 2020 QMCPACK developers. // // Fi...
/* * IMPORTANT: Method's calls order is crucial. Change it (or not) carefully. */ @Override public void dispose() { super.dispose(); defineMandatoryBorderSpacing(mInnerChartTop, mInnerChartBottom); defineLabelsPosition(mInnerChartTop, mInnerChartBottom); }
def ptr(c_type, val, shape=None): if isiterable(shape) and len(shape) == 2: ptr_obj = ptr_typ(c_type, shape)() for i, row in enumerate(val): for j, element in enumerate(row): ptr_obj[i][j] = val[i][j] return ptr_obj elif isiterable(val): return (c_type...
import Queue from 'bull'; interface Payload { postId: string; } const expirationQueue = new Queue<Payload>( 'post:expiration', { redis: { host: process.env.REDIS_HOST } } ); expirationQueue.process( async ( job ) => { console.log( 'I want to publish and expiration:complete event for postId', job.data.pos...
#include "bwa_wrapper.h" #include "Pipeline.h" #include "util.h" #include "TestCommon.h" TEST_F(UtilTests, SeqTest) { int test_num = batch_num > 4096 ? 4096 : batch_num; uint64_t start_ts = getUs(); std::stringstream ss; for (int i = 0; i < test_num; i++) { serialize(ss, seqs[i]); } ASSERT_LT(0, ss.str...
/** * Takes in an instance of {@link CloudTask}, generates and triggers a * {@link org.apache.reef.runtime.common.driver.resourcemanager.ResourceStatusEvent}. * * @param cloudTask and instance of {@link CloudTask}. */ public void onAzureBatchTaskStatus(final CloudTask cloudTask) { ResourceStatusEvent...
/// Returns the byte offset corresponding to the line `line`. pub fn offset_of_line(&self, text: &Rope, line: usize) -> usize { match self.breaks { Some(ref breaks) => { breaks.convert_metrics::<BreaksMetric, BreaksBaseMetric>(line) } None => text.offset_of_li...
from __future__ import division import numpy as np import matplotlib.pyplot as plt from matplotlib.patches import Arc C = np.array( [ [1, -1j], [1, 1j] ] ) Cinv = np.array( [ [1/2, 1/2], [1/2*1j, -1/2*1j] ] ) Tstar = np.array( [ [1+1/2*1j, -1/2*1j], [1/2*1j, 1-1/2*1j] ] ) Sstar = np.array( [ [-1j, 0], [0, 1j] ] ) # d...
/* * Copyright (c) 2010-2015 Pivotal Software, Inc. All rights reserved. * * 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 req...
//////////////////////////////////////////////////////////////////////////////// // Load heightmap chunk from VMSH file // // return : True if the heightmap chunk is successfully loaded // /////////////////////////////////////////////////////////////////////////////...
def loss(logits, labels): with tf.name_scope('Loss'): cross_entropy = tf.reduce_mean( tf.nn.sparse_softmax_cross_entropy_with_logits( logits=logits, labels=labels, name='cross_entropy')) loss = cross_entropy + tf.add_n(tf.get_collection( tf.GraphKeys.REGULARIZ...
<filename>querydsl-core/src/main/java/com/querydsl/core/SimpleQuery.java /* * Copyright 2015, The Querydsl Team (http://www.querydsl.com/team) * * 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 Licens...
#include <iostream> #include <algorithm> #include <cmath> #include <vector> #include <string> #include <map> #include <queue> #include <set> using ll = long long; using graph = std::vector<std::vector<ll>>; using wGraph = std::vector<std::vector<std::pair<ll,ll>>>; #define rep(i,n) for (int i=0; i < int(n); i++) using...
// Code generated by truss. // Rerunning truss will overwrite this file. // DO NOT EDIT! // Package grpc provides a gRPC client for the Rello service. package grpc import ( "github.com/pkg/errors" "golang.org/x/net/context" "google.golang.org/grpc" "google.golang.org/grpc/metadata" "github.com/go-kit/kit/endpoi...
YOU DID IT! We surpassed our goal of 100,000 missions completed for Military Appreciation Month! It was a resounding success because of you, our players, helping to contribute to this great cause. Every single day we’re humbled and honored to have such a great community. When we first thought of this program, we neve...
The role of endothelial lipase in lipid metabolism, inflammation, and cancer. Endothelial lipase (LIPG) plays a critical role in lipoprotein metabolism, cytokine expression, and the lipid composition of cells. Thus far, the extensive investigations of LIPG have focused on its mechanisms and involvement in metabolic sy...
/* * Copyright (c) 2002-2021 Gargoyle Software Inc. * * 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...
def os_wget(fileurl, targetdir, num_tries=3, secsbetweentries=10, wgetparams=""): check_param_type("fileurl", fileurl, str) check_param_type("targetdir", targetdir, str) check_param_type("num_tries", num_tries, int) check_param_type("secsbetweentries", secsbetweentries, int) check_param_type("wgetpa...
import { Component, useEffect, useState } from 'react'; import Head from 'next/head'; import keyGen from '../../utils/key'; import SyntaxHighlighter from 'react-syntax-highlighter'; import SyntaxStyle from 'react-syntax-highlighter/dist/cjs/styles/hljs/vs2015'; import styles from '../../styles/function.key.module.sc...
Photo: Bo Rader/The Wichita Eagle/AP During the presidential campaign, some imagined that the more overtly racist elements of Donald Trump’s platform were just talk designed to rile up the base, not anything he seriously intended to act on. But in his first week in office, when he imposed a travel ban on seven majori...
// Run compiles and executes a statement list. It returns, if applicable, a // RecordSet slice and/or an index and error. // // For more details please see DB.Execute // // Run is safe for concurrent use by multiple goroutines. func (db *DB) Run(ctx *TCtx, ql string, arg ...interface{}) (rs []Recordset, index int, err...
def ap_extract(data, trace_spl, sigma_spl, apwidth=2, skysep=1, skywidth=2, skydeg=0, sky_subtract=True): y_size, x_size = data.shape y_indices, x_indices = np.indices(data.shape) y_bins = np.arange(y_size) x_bins = np.arange(x_size) x_centers = trace_spl(y_bins) x_sigmas = sigma_...
<filename>packages/trainee/src/modules/module3.ts import m from 'mithril'; import '../../css/module3.css'; import { sessionSvc, state } from '../global'; import help from './components/help'; import hud from './components/hud'; const updateSession = () => sessionSvc.update(state.session); const MODULE3 = { oninit: ...
#include<bits/stdc++.h> #define pb push_back #define f first #define s second using namespace std; int main() { int n,b,m,b1; cin >> n >> b; vector<int >v,v1; for(int i=0;i<n;i++) { int r; cin >> r; v.pb(r); } cin >> m >> b1; for(int i=0;i<m;i++) { int r; cin >> r; ...
/* Arguments: in starting address of input data on this proc out starting address of where output data for this proc will be placed (can be same as in) flag 1 for forward FFT, -1 for inverse FFT plan plan returned by previous call to fft_3d_create_plan *...
// ReloadSchemaShard is part of the vtctlservicepb.VtctldServer interface. func (s *VtctldServer) ReloadSchemaShard(ctx context.Context, req *vtctldatapb.ReloadSchemaShardRequest) (*vtctldatapb.ReloadSchemaShardResponse, error) { logger, getEvents := eventStreamLogger() var sema *sync2.Semaphore if req.Concurrency >...
/** * @param storey Apache Jena Resource RDF node that refers to an * #IfcBuildingStorey ifcOWL element * @param ifcOWL The ifcOWL namespace element. * @return The list of all corresponding space ifcOWL elements under the storey * element */ public static List<RDFNode> listStoreySpaces...
import {CLEAR_CONNECTED_MEMBER, SET_CONNECTED_MEMBER} from './actions'; import {ConnectedMemberState} from './types'; const INITIAL_STATE = null; export default function reducer( state: ConnectedMemberState = INITIAL_STATE, action: any ) { const {type, ...payload} = action; switch (type) { case SET_CONNE...
// API users.list: Lists all users in a Slack team. func (sl *Slack) UsersList() ([]*User, error) { uv := sl.urlValues() body, err := sl.GetRequest(usersListApiEndpoint, uv) if err != nil { return nil, err } res := new(UsersListAPIResponse) err = json.Unmarshal(body, res) if err != nil { return nil, err } ...
import { assert, IsExact } from 'conditional-type-checks'; import { MultiUint } from './multi'; // 1 * 1 = 1 assert<IsExact<MultiUint<[1], [1]>, [1, 0]>>(true); // 12 * 345 = 4140 assert< IsExact< MultiUint<[0, 0, 1, 1], [1, 0, 0, 1, 1, 0, 1, 0, 1]>, [0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1] > >(true); // 34...
def check_parent(self): self.all_joints = pm.ls(type="joint") joint_under_world = [] for joint in self.all_joints: if joint == "World": return om.MGlobal.displayError("This file already have world joint under world, please check it") joint_parent = pm.list...
Republicans like Paul Ryan, Jeb Bush, Grover Norquist, et al. who insist that the House GOP pass Chuck Schumer’s amnesty bill are saying that Obama can be trusted to enforce whatever new immigration laws we come up with. As if there weren’t already abundant evidence of the absurdity of such trust, a Buzzfeed story adds...
#!/usr/bin/env python # -*- coding: utf-8 -*- __version__ = '0.0.2' from .loggers import BaseLoggers, Loggers from .datamodule import BaseDataModule, DataModule from .module import Module from .trainer import BaseTrainer, Trainer __all__ = ('__version__', 'Loggers', 'DataModule', 'Module', 'Trainer')
import asyncio import time from aiohttp import web from autorc.nodes import AsyncNode class MjpegStreamer(AsyncNode): ''' Stand alone mjpeg streamer (for testing only) ''' def __init__(self, context, *, inputs=('cam/image-jpeg', ), host='0.0.0.0', port=8888, frame_rate=24, **kwargs): ...
<reponame>toshok/echojs<gh_stars>100-1000 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * vim: set ts=4 sw=4 et tw=99 ft=cpp: */ #ifndef _ejs_h_ #define _ejs_h_ #include <stdio.h> #include <stdlib.h> #ifndef __has_builtin #define __has_builtin(x) 0 #endif #if __cplusplus #define EJS...
#include <stdio.h> #include <stdlib.h> #include <string.h> //#define DEBUG int main(void) { FILE *fpin; #ifdef DEBUG fpin=fopen("input.txt","r"); #else fpin=stdin; #endif while(feof(fpin)==0){ char buf[256]; int data[10]; fscanf(fpin,"%s\n",buf); int i; for(i=...