content
stringlengths
10
4.9M
def intrinsic_impedance(er=1, ur=1): return sqrt((ur * u0) / (er * e0))
P = 10**9+7 fac = [1] ifac = [1] ff = 1 for i in range(1,200001): ff *= i ff %= P fac.append(ff) ifac.append(pow(ff, P-2, P)) def ncr(n, r): return (fac[n] * ifac[r] % P * ifac[n-r] % P); h,w,a,b = map(int,input().split()) s = 0 nC = b-1 kC = 0 nD = w-b-1+h-1 kD = h-1 for i in range(h-a): C = ncr(nC, kC) ...
/* ya.bot */ #include "..\bot\bot.h" #ifndef NO_EXPSCAN #ifndef NO_EXPSCANASN1 //botbotbotbotbotbotbotbotbotbotbotbotbot //Original code by ScriptGod //botbotbotbotbotbotbotbotbotbotbotbotbot #include <cmath> #include <string> class BitString { public: BitString(); BitString(const char *pszString); BitStr...
def port_is_in_bridge(bridge, interface_name) -> bool: if not interface_name or interface_name == "": return False dump1 = subprocess.Popen( ["ovs-ofctl", "show", bridge], stdout=subprocess.PIPE, ) for line1 in dump1.stdout.readlines(): if ...
package pos import "github.com/chewxy/lingo" // "log" func (p *Tagger) getSentences() { defer close(p.sentences) var sentence lingo.AnnotatedSentence sentence = append(sentence, lingo.RootAnnotation()) for lexeme := range p.Input { if lexeme.LexemeType != lingo.EOF { a := lingo.NewAnnotation() a.Lexeme...
<gh_stars>0 /** * */ package OctopusConsortium.Core.Transformers.RCS; import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.Date; import java.util.UUID; import javax.xml.bind.JAXBElement; import org.mule.api.transformer.TransformerException; import org.mule.tr...
<gh_stars>1-10 module Mima.Asm.Weed ( Weed , runWeed , transformErrors , critical , harmless , WeedError(..) , errorWith -- * Megaparsec compatibility , defaultPosState , asParseErrors , runWeedBundle ) where import qualified Data.List.NonEmpty as NE import Data.Monoid import qualifie...
<reponame>gacsoft/hiddenjournal<gh_stars>0 package com.gacsoft.hiddenjournal; import android.app.AlertDialog; import android.content.DialogInterface; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.View; import android.widget.AdapterView; import android.widget.ArrayAdapte...
<gh_stars>0 package factory import ( "designpattern-factorymethod-golang/product" concrete "designpattern-factorymethod-golang/product/impl" "fmt" ) func GetTransportType(quPassengers int) (product.ITransport, error) { if quPassengers >= 1 && quPassengers <=5 { return concrete.NewTaxi(), nil } if quPassenger...
def untransform_target(self, mix, predicted_mask, index): mix_slice = [self.chopper.chop_n_pad( channel, index, self.size) for channel in mix] mix_magnitude = np.abs(mix_slice) predicted_mask = np.clip(predicted_mask, 0, 1) predicted_mask_reshape = [predicted_mask[:, :, 0]] ...
def MakePulseDataRep(pulse_shape, filt_freq, delay=16, rep=1, numtype = sp.complex128): npts = len(filt_freq) multforimag = sp.ones_like(filt_freq) hpnt = int(sp.ceil(npts/2.)) multforimag[hpnt:] =- 1 tmp = scfft.ifft(filt_freq) tmp[hpnt:] = 0. filt_tile = sp.tile(filt_freq[sp.newaxis,:], (r...
package com.zlz.util; import java.util.*; public class UtilAlg { public static String getHint(String secret, String guess) { int bulls = 0; int cows = 0; int[] numbers = new int[10]; for (int i = 0; i < secret.length(); i++) { int s = secret.charAt(i) - '0'; ...
Introduction to the Special Issue on Authoritarian Resilience of Communist Regimes in Asia This special issue focuses on the resilience of the communist regimes in Laos, Cambodia, Vietnam, and China. Three decades after the collapse of the Soviet Bloc, all four not only survived a hostile post-communist world dominate...
def constructFunction( self, functionName, dll, resultType=ctypes.c_int, argTypes=(), doc = None, argNames = (), extension = None, deprecated = False, module = None, force_extension = False, error_checker = None, ): is_core = (not ext...
package org.jdesktop.swingx.search; import java.awt.event.ActionListener; import java.beans.PropertyChangeEvent; import javax.swing.JPopupMenu; import javax.swing.JTextField; import javax.swing.UIManager; import org.jdesktop.swingx.plaf.AbstractUIChangeHandler; import org.jdesktop.swingx.util.OS; /** * TODO: comme...
package osmedile.intellij.stringmanip.styles; public class ToHyphenCaseAction extends AbstractCaseConvertingAction { public ToHyphenCaseAction() { } public ToHyphenCaseAction(boolean b) { super(b); } @Override public String transformByLine(String s) { Style from = Style.from(s); if (from == Style.HYPHEN...
<gh_stars>0 import xxhash from django.apps import apps from django.conf import settings from django.core.exceptions import ValidationError from django.utils.translation import ugettext as _ __all__ = ('get_hash', 'get_photo_relations', 'validate_photo_file', 'serialize_photo', 'default_photo_serializer') def get_has...
/** * A data panel to plot data time series and xy charts. * * @author Jason P. Hanley * @author Drew Daugherty */ public abstract class ChartViz extends AbstractDataPanel { /** * The logger for this class. */ static Log log = LogFactory.getLog(ChartViz.class.getName()); /** the data pa...
package org.sonar.plugins.text.checks; import java.io.File; import java.io.IOException; import java.nio.charset.Charset; import java.nio.charset.StandardCharsets; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; import org.apache.commons.io.FileUtils; import org.junit.BeforeClass; im...
def f(df, C): geneNames = [] corrs = [] pvalues = [] for k, (geneName, row) in enumerate(df.iterrows()): myRankedExpr = row.sort_values() myRankedExpr = np.log10(myRankedExpr + 1) myY = myRankedExpr / max(myRankedExpr) corr, pvalue = scipy....
/* hc_convert_to_short -- Convert a set of skiplists to a simple linked list. */ static void hc_convert_to_short (HistoryCache_t *hcp) { Skiplist_t *handles = hcp->hc_handles; sl_free (hcp->hc_hashes); hcp->hc_inst_head = hcp->hc_inst_tail = NULL; sl_walk (handles, hc_cvt_fct, hcp); sl_free (handles); hcp->hc_ski...
<reponame>marksauter/musicode<filename>tests/interval_set.rs use musicode::IntervalSet; #[test] fn test_simple() { let mut set: IntervalSet = IntervalSet::new(); assert_eq!(set.insert(5), (0, true)); assert_eq!(set.insert(3), (0, true)); assert_eq!(set.insert(4), (1, true)); assert_eq!(set.insert(...
def split(self, jobs=None): if jobs is None: jobs = self.top.size (next, sub) = self.top.split(jobs) with self.pushed(sub): yield next
def git_init_and_tag(): directory_status = invoke_shell("git status", expected_error=True, print_output=False) if 'fatal' in directory_status: invoke_shell("git init") invoke_shell("git add .") invoke_shell( "git commit -m \"Initial commit after CMS Cookiecutter creation, ver...
/** Get locations for all outputs with automatic_location * * @param program Program object * @param program_interface Interface of program **/ void TextureTestBase::prepareFragmentDataLoc(Utils::Program& program, Utils::ProgramInterface& program_interface) { Utils::ShaderInterface& si = program_interf...
{-# OPTIONS_GHC -fglasgow-exts -fcontext-stack=30 #-} module Blog.Views where -- View functions and logic. The actual HTML is found in Templates, -- which has pure functions that generally return Html. import Blog.DB (connect) import Blog.Feeds import Blog.Formats (Format(..), getFormatter) import Blog.Forms import B...
// Return a JSON response of all the breaches in the database func ListBreaches(w http.ResponseWriter, r *http.Request) { mysess := mdb.Copy() c := mysess.DB("steamer").C("dumps") var results []string err := c.Find(nil).Distinct("breach", &results) if err != nil { fmt.Fprintf(os.Stderr, "breach search error: %v"...
#!/usr/bin/env python # -*- coding: utf-8 -*- import json from alipay.aop.api.constant.ParamConstants import * from alipay.aop.api.domain.IoTBPaaSKeyValue import IoTBPaaSKeyValue from alipay.aop.api.domain.IoTBPaaSKeyValue import IoTBPaaSKeyValue class IoTBPaaSMerchantOrderItemInfo(object): def __init__(self): ...
def generate_user_key_files(): gitolite_home = pagure_config.get("GITOLITE_HOME", None) if gitolite_home: users = pagure.lib.query.search_user(flask.g.session) for user in users: pagure.lib.query.update_user_ssh( flask.g.session, user, ...
<gh_stars>1-10 /* * Copyright 2019 Intel(R) Corporation (http://www.intel.com) * * 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 ...
// findGcd returns greatest common division for any number of numbers. func findGcd(values ...int32) int32 { switch len(values) { case 0: return 0 case 1: return values[0] } res := values[0] for i := 1; i < len(values); i++ { res = gcd(res, values[i]) } return res }
/// Creates a new egui window. pub fn create_egui_window( &self, label: String, app: Box<dyn epi::App + Send>, native_options: epi::NativeOptions, ) -> Result<()> { let proxy = self.context.proxy.clone(); send_user_message( &self.context, Message::CreateGLWindow(label, app, native_...
Evaluating the effectiveness of Situational Awareness dissemination in tactical mobile ad hoc networks Situational Awareness (SA) dissemination in tactical mobile ad hoc networks (MANETs) plays an essential role in command and control systems for military operations. This task is particularly difficult in highly dynam...
export {default as Day, Props as DayProps} from './Day'; export {default as Month, Props as MonthProps} from './Month'; export {default as Weekday, Props as WeekdayProps} from './Weekday';
/** * Delete user assistants. * * This function performs a `DELETE` to the `/users/{userId}/assistants` endpoint. * * Delete all assistants of the current user. For user-level apps, pass [the `me` value](https://marketplace.zoom.us/docs/api-reference/using-zoom-apis#mekeyword) instead of the `u...
a = 1 b = 2 a = a + b b = a - b a = a - b print(a) print(b)
// +build !ignore_autogenerated // Copyright 2021 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....
// RowCount returns the row count of model.Status entries. func (s *StatusRepository) RowCount() (int, error) { var count int64 s.db.Model(&model.Status{}).Count(&count) return int(count), nil }
import MomentUtils from '@date-io/moment' import { MuiPickersUtilsProvider, KeyboardTimePicker } from '@material-ui/pickers' import { makeStyles } from '@material-ui/core' import React from 'react' interface TimeProps { id: string label: string time: Date disabled: boolean onChange: (label: string, time: Dat...
Making prevention public: The co-production of gender and technology in HIV prevention research This paper brings together the study of transnational flows in global health and the gendering of technological artefacts. It does so through a case study of vaginal microbicides for HIV prevention, which have commonly been...
<filename>options.cpp<gh_stars>0 #include "options.h" #include "handler.h" #include <dirent.h> #include <string> #include <vector> #include <iostream> #include <QtQuick> #include <algorithm> const std::string configDir = "/opt/etc/draft"; // Create options and add them to the screen. Options::Options(MainView* mainVi...
export * from "fs/promises"; import { stat } from "fs/promises"; type PathLike = string | Buffer | URL; export async function exists(path: PathLike): Promise<boolean> { try { await stat(path); return true; } catch (e) { return false; } }
/** * Solve StringIndexOutOfBoundsException for some devices. * Without this, Selection.setSelection(...) will always return exception * and crashes the app. * * @param widget * @param buffer * @param event * @return <code>true</code> when the event is handles, <code>false</code>...
def print_multi_list(list_ch_info=None, sep=";"): if not list_ch_info or not isinstance(list_ch_info, (list, tuple)): print("Print information from a list of lists from multiple " "channels obtained from `ch_download_latest_multi`.") return False if len(list_ch_info) < 1: p...
/********************************************************************************** * linerarSearch() * This function performs a linear search on an integer array. The list array, * which has size elements, is searched for the number stored in value. If the * number is found, its array subscr...
package handler import ( "context" "google.golang.org/protobuf/types/known/timestamppb" "github.com/indrasaputra/aptx/entity" aptxv1 "github.com/indrasaputra/aptx/proto/indrasaputra/aptx/v1" "github.com/indrasaputra/aptx/usecase" ) // AptxService handles HTTP/2 gRPC request for URL aptx. // It implements gRPC ...
def pack(self, directory, out_asar, unpackeds=tuple()): with open(out_asar, "wb") as out_asarfile: fileinfos = self.__dir_to_fileinfos(directory, unpackeds=unpackeds) json_header = json.dumps(fileinfos, sort_keys=True, separators=(',', ':')) json_header_bytes = json_header.encode('utf-8') he...
Imaging through scattering medium from multiple speckle images using microlens array We propose and experimentally demonstrate a new method of seeing objects hidden in a scattering medium from multiple speckle images. The objects hidden between two biological tissues (chicken breast) are reconstructed from many speckl...
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; import { CdfModule } from './cdf.module'; platformBrowserDynamic().bootstrapModule(CdfModule);
<reponame>Greatpanc/mindspore_zhb<filename>mindspore/ccsrc/ps/core/cluster_config.h /** * Copyright 2021 Huawei Technologies Co., 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 * ...
/** * Generates all permutations of 0 .. n-1 without repetition with order * * @author Dr. Matthias Laux */ public class Permutations { private int[][] permutations; private int resultIndex = 0; /** * Generates all permutations of 0 .. n-1 without repetition with order. The * results are col...
// Called every time the scheduler runs while the command is scheduled. @Override public void execute() { m_IntakeSubsystem.IntakeIn(); m_IntakeSubsystem.MidtakeOn(); if(m_IntakeSubsystem.ballExist()){ m_LEDSubsystem.Lime(); } else{ m_LEDSubsystem.White(); } }
/** * Inicia todos os recursos da fila */ extern FilaEntrada *iniciaFila() { FilaEntrada *fila; fila = (FilaEntrada *)malloc(sizeof(FilaEntrada)); fila->head = NULL; fila->tail = NULL; fila->quantidade = 0; if (pthread_mutex_init(&fila->mutex, NULL) == -1) { logMessage("FLENT", "E...
/** * Performs a Consul transaction. * * PUT /v1/tx * * @deprecated Replaced by {@link #performTransaction(TransactionOptions, Operation...)} * * @param consistency The consistency to use for the transaction. * @param operations A list of KV operations. * @return A {@link Co...
/** * The base quartz job * * @author davitp */ public class QuartzExecutorJob implements Job { /** * Create and invoke corresponding executor by type * * @param context The execution context * @throws JobExecutionException Throws if something went wrong */ @Override public...
def process_requirement(self, requirement, cache=False): if requirement.is_valid: result = requirement.passes if cache: self.cache.merge(requirement.cache) return result log.debug("invalid requirement: %s - fail", self.content) return False
<filename>ncollide_procedural/polyline.rs use std::marker::PhantomData; use std::ops::{Index, IndexMut}; use na; use na::{Translate, Rotate, Transform, Dim}; use math::{Scalar, Point, Vect}; /// Shapeetric description of a polyline. #[derive(Clone)] pub struct Polyline<N, P, V> { /// Coordinates of the polyline ve...
class Maps: """Store data of several maps and implement operations on it.""" def __init__(self, df=None, template=None, Ni=None, Nj=None, Nk=None, affine=None, mask=None, atlas=None, groupby_col=None, ...
<reponame>butters-mars/definitions<filename>proto/storage/storage.pb.go // Code generated by protoc-gen-go. DO NOT EDIT. // source: storage.proto package def import ( context "context" fmt "fmt" _ "github.com/envoyproxy/protoc-gen-validate/validate" proto "github.com/golang/protobuf/proto" grpc "google.golang.or...
package io.onedev.server.web.page.admin.performancesetting; import org.apache.wicket.Component; import org.apache.wicket.markup.html.basic.Label; import org.apache.wicket.markup.html.form.Form; import org.apache.wicket.request.mapper.parameter.PageParameters; import io.onedev.server.OneDev; import io.onedev.server.en...
package definitions // swagger:route GET /api/v1/provisioning/policies provisioning stable RouteGetPolicyTree // // Get the notification policy tree. // // Responses: // 200: Route // description: The currently active notification routing tree // swagger:route PUT /api/v1/provisioning/policies provi...
def package_search_table(search_results): fields = OrderedDict([ ('NAME', lambda p: p['name']), ('VERSION', lambda p: p['currentVersion']), ('SELECTED', lambda p: p.get("selected", False)), ('FRAMEWORK', lambda p: p['framework']), ('DESCRIPTION', lambda p: p['description'] ...
// ExampleRegisterValidator register a custom validator with the name // `check_xyzUser`. It checks that the configuration value for route // `payment/serviceX/username` must be equal to string `xyzUser`. (boring // example) The validator `check_xyzUser` gets activated for route // `payment/serviceX/username` with even...
<reponame>poweretl/PowerETL<filename>etl-server/src/main/java/com/kollect/etl/controller/app/EmailSettingsController.java package com.kollect.etl.controller.app; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import ...
import * as _ from 'lodash' import * as T from './types' import * as Pg from 'pg' import * as P from './parser' import * as Util from './util' import * as Uuid from 'uuid' import { EventEmitter } from 'events' import * as E from './errors' import { parseSql } from 'tinypg-parser' import { createHash } from 'crypto' co...
def _fix_neg_log(self, path): paths = [] tail = path while tail: paths.append(tail) tail = tail.prev_path paths = paths[::-1] s = 1 max_step = False if max_step: s = max(s, len(paths) - 5) for i in range(s, len(paths)): ...
/** * @brief Write secondary output voltage value to SMPS_settings instance * @details @todo opis jak ustawic napiecie **/ inline void smps_out_voltage_write(volatile struct SMPS_settings* smps_sets, const struct SMPS_PID_reg smps_pid, float vout)...
<filename>src/config/constants.ts<gh_stars>0 // import { DATE_YEAR } from '@src/utils/date'; import { IS_DEVELOPMENT } from './settings'; export const DEBUG_MARKERS = IS_DEVELOPMENT ? { endColor: 'red', fontSize: '12px', startColor: 'green' } : undefined; export const CLIENT_ASSET_PATH = `https://s3-us-west-1.ama...
Inter-Core Crosstalk in Multicore Fibers: Impact on 56-Gbaud/{\lambda}/Core PAM-4 Transmission We experimentally demonstrate the impact of inter-core crosstalk in multicore fibers on 56Gbaud PAM-4 signal quality after 2.5-km transmission over a weakly-coupled and uncoupled sevencore fibers, revealing the crosstalk dep...
/** * Parses {@code List<String> ingredientNames} into a {@code List<IngredientName>}. */ public static List<IngredientName> parseIngredientNames(List<String> ingredientNames) { requireNonNull(ingredientNames); return ingredientNames.stream().map(IngredientName::new).collect(Collectors.toList(...
n = input() s = raw_input() out = [" "]*n if n%2 == 0: x = n/2-1 for i in xrange(0, n, 2): out[x] = s[i] x -= 1 x = n/2 for i in xrange(1, n, 2): out[x] = s[i] x += 1 else: x = n/2 for i in xrange(0, n, 2): out[x] = s[i] x += 1 ...
def convert_point_notation(tree: etree.Element): for coord in [c for c in tree.findall(".//{*}Coords") if not c.attrib.get("points")]: cc = [] for point in coord.find("./{*}Point"): cx = point.attrib["x"] cy = point.attrib["y"] coord.remove(point) cc.a...
<reponame>fossabot/jymfony declare namespace Jymfony.Component.Console.Output { export class ConsoleOutputInterface extends OutputInterface.definition { public static readonly definition: Newable<ConsoleOutputInterface>; /** * Output interface used for errors. */ public er...
// RandomID returns an 8 byte random string in hexadecimal. func RandomID() string { b := make([]byte, 8) n, _ := rand.Read(b) return fmt.Sprintf("%x", b[:n]) }
#include <bits/stdc++.h> #define FastIO ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); using namespace std; typedef pair<int, int> pii; typedef pair<string, int> psi; typedef pair<long long, long long> pll; typedef pair<char, int> pci; typedef pair<int, char> pic; typedef long long ll; #define MX 10000000...
<filename>xrpl_sdk_jsonrpc/src/api/account_lines.rs use crate::{client::RpcRequest, Client, Result}; use serde::{de::DeserializeOwned, Deserialize, Serialize}; #[derive(Default, Clone, Serialize)] pub struct AccountLinesParams { account: String, // #[serde(skip_serializing_if = "Option::is_none")] // ledge...
// This file is part of the dune-gdt project: // https://github.com/dune-community/dune-gdt // Copyright 2010-2018 dune-gdt developers and contributors. All rights reserved. // License: Dual licensed as BSD 2-Clause License (http://opensource.org/licenses/BSD-2-Clause) // or GPL-2.0+ (http://opensource.org/lice...
#!/usr/bin/env python import urwid # =========================================================================== def exit_on_q(key): if key in ('q', 'Q'): raise urwid.ExitMainLoop() # =========================================================================== colour_groups = [ # all colours ('b...
/** * Creates a new exponential family conditional distribution given the input list of parents. * @param parents the list of parents. * @param <E> the type of elements. * @return an exponential family conditional distribution. */ public <E extends EF_ConditionalDistribution> E newEFConditional...
/* Build a map suitable for use as parms for a bandwidth request to the agent manager. The agent bandwidth flow-mod generator takes a more generic set of parameters and the match/action information is "compressed". OVS doesn't accept DSCP values, but shifted values (e.g. 46 == 184), so we shift the DSCP value giv...
<reponame>devis12/ROS2-BDI // header file for Scheduler node #include "ros2_bdi_core/scheduler.hpp" // Inner logic + ROS PARAMS & FIXED GLOBAL VALUES for ROS2 core nodes #include "ros2_bdi_core/params/core_common_params.hpp" // Inner logic + ROS2 PARAMS & FIXED GLOBAL VALUES for Scheduler node #include "ros2_bdi_cor...
import React, { ReactNode, useEffect, useState } from 'react'; import {createContext} from 'react'; let countdownTimeout: NodeJS.Timeout; interface CountedownContextData{ seconds: number; minutes: number; isActive:boolean; hasFinished:boolean; handleCountedown:()=>void; resetCountedown:()=>vo...
// not for light-weight things like returning the player name. private void lazilyLoadGamerStub() { if (theClojureGamer == null) { try { RT.loadResourceScript(getClojureGamerFile() + ".clj"); Var gamerVar = RT.var("gamer_namespace", getClojureGamerName()); ...
/** * Add animated views to the superview so that it can animate them */ @Override public void addAnimatedViews() { AnimatedView frameAnimatedView = new AnimatedView(findViewById(R.id.picture_frame), 0, 0, AnimType.ALPHA, 2); frameAnimatedView.setStartDelay(0); frameAnimatedView.se...
/** * Base factory class responsible for creating all the {@link BlockView}s, {@link InputView}s, and * {@link FieldView}s for a given block representation. Complete view trees are constructed via * calls to {@link #buildBlockGroupTree} or {@link #buildBlockViewTree}. * <p/> * Subclasses must override {@link #bui...
import { remapAndPrintError } from "../source-map-support"; try { require('./parse'); } catch (err) { remapAndPrintError(err); }
import * as atomIde from 'atom-ide'; import Convert from '../convert'; import Utils from '../utils'; import { LanguageClientConnection, Location, ServerCapabilities, } from '../languageclient'; import { Point, TextEditor, Range, } from 'atom'; // Public: Adapts the language server definition provider to th...
/* Copyright 2018 Pressinfra SRL Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software d...
import { Container } from 'aurelia-dependency-injection'; import { Position, Range, TextEdit, WorkspaceEdit, } from 'vscode-languageserver'; import { TextDocument } from 'vscode-languageserver-textdocument'; import { getWordInfoAtOffset } from '../../common/documens/find-source-word'; import { isViewModelDocum...
#include<bits/stdc++.h> using namespace std; #define inf 1000000000 #define INF 1000000000000000 #define ll long long #define ull unsigned long long #define M (int)(1e9+7) #define P pair<int,int> #define PLL pair<ll,ll> #define FOR(i,m,n) for(int i=(int)m;i<(int)n;i++) #define RFOR(i,m,n) for(int i=(int)m;i>=(int)n;i-...
/** * @return {@literal true} if the token is renewable. */ protected boolean isTokenRenewable(VaultToken token) { return Optional.of(token).filter(LoginToken.class::isInstance) .filter(it -> { LoginToken loginToken = (LoginToken) it; return !loginToken.getLeaseDuration().isZero() && loginToken.isRe...
package modules import ( _ "hellclientswitch/modules/loggers" //Logger modules _ "hellclientswitch/modules/wsserver" ) //websocket modules
#include<bits/stdc++.h> using namespace std; typedef long long int ll; typedef long double ld; typedef pair<int,int> pi; typedef pair<ll,ll> pll; #define Max 1000001 #define inf INT_MAX #define llinf LONG_LONG_MAX #define fast ios_base::sync_with_stdio(false),cin.tie(NULL),cout.tie(NULL) #define pb push_back ...
<reponame>flex-office/flex-server import { MongoMemoryServer } from 'mongodb-memory-server'; import mongoose from 'mongoose'; import assert from 'assert'; import cloudinary from "cloudinary"; import * as model from "../models/model"; import Place from '../models/place'; jest.mock('cloudinary'); let mockDB; describe(...
import { AudioListener, Object3D, OrthographicCamera, PerspectiveCamera, Scene, XRFrame } from 'three' import type { UserId } from '@xrengine/common/src/interfaces/UserId' import { createHyperStore } from '@xrengine/hyperflux' import type { InputValue } from '../../input/interfaces/InputValue' import type { World } f...
/** * Updates the activity title. * Sets the title with a left and right title. * * @param rightText Right title part */ public void updateTitle(String rightText) { String timelinename = "??"; switch (mTimelineType) { case Tweets.TIMELINE_TYPE_FAVORITES: ...
/// <reference path="./SimpleEventDispatcher.d.ts" /> function makeOnce(listeners:ValidListener[],listener:ValidListener){ return function wrappedListener(arg:any){ runListener(listener,arg); removeListener(listeners,wrappedListener); } } export function isValidListener(listener:any):boolean{ return listener &...
// compareOUs checks for differences between localOUs and ldapOUs and creates tasks to sync LDAP target func compareOUs() error { var ( i int j int match bool task *actionTask ) sort.Slice(localOUs, func(i, j int) bool { return len(localOUs[i].dn) < len(localOUs[j].dn) }) sort.Slice(ldapOUs, fun...
1 Prepare the proper attire. Black is a bad idea. At all hours, you'll stick out like a sore thumb. Red attracts attention. Wear greys and greens. If the weather permits it, wear a hooded sweater or jacket. 2 Prepare disguises, fake glasses, caps, changes of clothes. if possible go into a shop to change outfit. 3 Car...
/** * Broadcast a message from the process with rank {@code root} * to all processes of the group. * <p>Java binding of the MPI operation {@code MPI_IBCAST}. * @param buf buffer * @param count number of items in buffer * @param type datatype of each item in buffer * @param root rank of broadcast root ...