content
stringlengths
10
4.9M
#include "config.h" #include "bformatdec.h" #include <algorithm> #include <array> #include <cmath> #include <utility> #include "almalloc.h" #include "alnumbers.h" #include "filters/splitter.h" #include "front_stablizer.h" #include "mixer.h" #include "opthelpers.h" BFormatDec::BFormatDec(const size_t inchans, cons...
def convert_to_human_readable(id_to_word, arr, max_num_to_print): assert arr.ndim == 2 samples = [] for sequence_id in xrange(min(len(arr), max_num_to_print)): buffer_str = ' '.join( [str(id_to_word[index]) for index in arr[sequence_id, :]]) samples.append(buffer_str) return samples
/* Copyright 2021 Gravitational, 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 http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, soft...
def readResults(filename): resultfile = open(filename, 'r') lines = resultfile.readlines() labels = lines[0].split() resultlist = [[label] for label in labels] lines = lines[1:] for line in lines: templist = line.split() if not templist: continue for col in r...
<gh_stars>0 package types import ( "encoding/base64" "encoding/json" "fmt" "time" "github.com/KuChainNetwork/kuchain/chain/constants" "github.com/KuChainNetwork/kuchain/singleton" abci "github.com/tendermint/tendermint/abci/types" "github.com/tendermint/tendermint/libs/kv" chaintype "github.com/KuChainNetwo...
<reponame>ridoo/IlwisCore #ifndef MATHHELPER_H #define MATHHELPER_H namespace Ilwis { struct KERNELSHARED_EXPORT Coefficient{ Coefficient(double x=0, double y=0) : _x(x), _y(y){} double _x,_y; }; class KERNELSHARED_EXPORT MathHelper { public: MathHelper(); static bool findOblique(int iPoints, const s...
/* * This function initializes address handle attributes from the incoming packet. * Incoming packet has dgid of the receiver node on which this code is * getting executed and, sgid contains the GID of the sender. * * When resolving mac address of destination, the arrived dgid is used * as sgid and, sgid is used ...
The American Civil Liberties Union believes the death penalty inherently violates the constitutional ban against cruel and unusual punishment and the guarantees of due process of law and of equal protection under the law. Furthermore, we believe that the state should not give itself the right to kill human beings – esp...
/** * Created by melanieh on 1/19/17. */ public class MovieProvider extends ContentProvider { public static final String favoritesTable = FavoriteEntry.TABLE_NAME; // This cursor will hold the result of the query Cursor cursor; /** {@link MovieProvider} */ /** Tag for the log messages */ pu...
<reponame>DarkPathUnderTheSun/FIME-various-assignments<filename>ProgLangsExam/c/Actividad2/programa8.c<gh_stars>0 //Programa 8 #include<stdio.h> void main() { int x,yy,a,b,c,d; x = 1; yy = 1; a = 3; b = 4; c = -1; d = 1; if (a != b) if (c == d) yy = 1; else y...
/* * linux/arch/arm/mach-integrator/integrator_cp.c * * Copyright (C) 2003 Deep Blue Solutions Ltd * * 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 2 of the License. */...
Close A new research reveals that women with post-traumatic stress disorder (PTSD) are more likely to develop food addiction. Scientists suggest PTSD is a psychiatric disorder, which can develop when a person witnesses a life-threating event or trauma such as war, sexual abuse, serious accident and more. Emergency wo...
def result_type(*arrays_and_dtypes: Union[array, dtype]) -> dtype:
Doing Fence Sitting A growing body of research indicates that the way health care professionals conceptualize mental health might have important clinical implications. We adopted a discursive psychology approach to explore clinical psychologists’ accounts of mental health and its effects. Semistructured interviews wer...
/** * Since snapshots need to be uniquely named, this method will resolve any date math used in * the provided name, as well as appending a unique identifier so expressions that may overlap * still result in unique snapshot names. */ public String generateSnapshotName(Context context) { List...
/** * Node class for this BST Node is only capable of storing RestStop objects as * its data. * * @author Joshua Forlenza * */ private class BSTNode implements Comparable<BSTNode> { RestStop data; int height; BSTNode left; BSTNode right; /** * Creates new BSTNode with specified RestStop dat...
<gh_stars>1-10 import { Compass } from "./compass.ts"; import { assertEquals } from "https://deno.land/std/testing/asserts.ts" Deno.test("Test define and find",()=>{ let c = new Compass(); c.define("/"); c.define("/name_of"); c.define("/name_of/app/compass"); c.define("/name_of/:usrname/info"); ...
import re from typing import Union, Tuple, Iterator, Optional from rdflib import URIRef, BNode, Literal, Graph # This document assumes an understanding of the ShEx notation and terminology. # # ShapeExpression: a Boolean expression of ShEx shapes. # focus node: a node, potentially in an RDF graph, to be insp...
The Sun in Leo forms a royal and powerful “finger of God” aspect. We have a powerful yod or”finger of God” bringing us into the weekend, between Pluto, Neptune and the Sun in Leo, with the Sun in Leo at the apex. The Yod is amping up, the positive effects of the recent New Moon in Leo 2nd August the 2nd August in ful...
// DuplicateListenerName is checks whether the same thing is set in each listener's name func (l *Listeners) DuplicateListenerName() bool { m := map[string]bool{} for _, v := range *l { if !m[v.Name] { m[v.Name] = true } else { return true } } return false }
High efficiency oxide confined vertical cavity surface emitting lasers Structures based on aluminum-oxide layers have led to dramatic improvements in VCSELs such as power conversion efficiencies in excess of 50% and threshold currents below 10 /spl mu/A. The low index, insulating aluminum-oxide, formed by selective we...
/** prints the header with source file location for an error message using the static message handler */ void SCIPmessagePrintErrorHeader( const char* sourcefile, int sourceline ) { char msg[SCIP_MAXSTRLEN]; (void) snprintf(msg, SCIP_MAXSTRLEN, "[%s:%d] ERRO...
Assessing the risk of airborne spread of foot‐and‐mouth disease: A case study Foot-and-mouth disease (FMD) is a highly infectious viral disease of cloven-hoofed animals, both domestic and wild. In 2001 it had a dramatic effect on the UK farming community and tourism, when the country experienced one of its worst epide...
/* Copy a component time. This function is provided so that tocomp() can be used for both types. cnew = c.torel([calendar])*/ static PyObject * PyCdComptime_Tocomp(PyCdComptimeObject *self, PyObject *args) { cdCalenType calentype; calentype = GET_CALENDAR; if (!PyArg_ParseTuple(args, "|i", &calentype)) ...
<commit_msg>Add ui test of mutable slice return from reference arguments <commit_before>mod ffi { extern "Rust" { type Mut<'a>; } unsafe extern "C++" { type Thing; fn f(t: &Thing) -> Pin<&mut CxxString>; unsafe fn g(t: &Thing) -> Pin<&mut CxxString>; fn h(t: Box<Mut...
//! The "lobby" actor here maintains a roster of connected clients, and supports a simple messaging //! system for clients to relay messages to each other. use std::collections::HashMap; use actix::prelude::*; use names; use client::{ClientMessage,Roster,RosterClient}; const MAX_CLIENTS: usize = 10; /// A single c...
<filename>go/vt/vtctl/vtctl.go // Copyright 2012, Google Inc. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package vtctl import ( "errors" "flag" "fmt" "io/ioutil" "net" "os" "sort" "strings" "time" log "github.com/golang/glog"...
//================================================================ // Fast gates on uint32 //================================================================ func mpcZ2XorFast(x, y []uint32, c *Circuit) (z []uint32) { z = []uint32{0, 0, 0} z[0] = x[0] ^ y[0] z[1] = x[1] ^ y[1] z[2] = x[2] ^ y[2] return }
<reponame>etoile/EtoileUI /* Copyright (C) 2013 <NAME> Author: <NAME> <<EMAIL>> Date: December 2013 License: Modified BSD (see COPYING) */ #import <Foundation/Foundation.h> #import <EtoileUI/ETGraphicsBackend.h> #import <EtoileFoundation/EtoileFoundation.h> #import <EtoileUI/ETLayoutItemFactory.h> @interfac...
import React from "react" import Icon from "../Icon" import { Spacer } from "../Layout" import { Paragraph, ParagraphBase } from "../Typography" function PuzzleInfoContent() { return ( <div className="relative pb-8"> <Paragraph.Base> Hover the image to discover each piece of work and to explore the...
import { HttpService } from '@nestjs/axios'; import { HttpException, HttpStatus, Injectable } from '@nestjs/common'; import { Octokit } from '@octokit/core'; require('dotenv').config(); const GITHUB_TOKEN = process.env.GITHUB_TOKEN; const octokit = new Octokit({ auth: GITHUB_TOKEN }); @Injectable() export class AppSer...
// NewRichTextItalic creates a new RichTextItalic // // @param text Text func NewRichTextItalic(text RichText) *RichTextItalic { richTextItalicTemp := RichTextItalic{ tdCommon: tdCommon{Type: "richTextItalic"}, Text: text, } return &richTextItalicTemp }
import { GetServerSideProps, NextPage } from "next"; import React, { useEffect } from "react"; import { Layout } from "../components/UI/Layout"; import { LoadingSpinner } from "../components/UI/LoadingSpinner"; import { confirmAccount } from "../crud/users"; const ConfirmEmailPage: NextPage = () => { // useEffect(()...
/** * Helper function for service add and check functions: * check if the given service can be decoded with the parameters in rd; * if yes, return TRUE and line start and count for both fields within * the range limits of rd. */ static vbi_bool vbi_raw_decoder_check_service(const vbi_raw_decoder *rd, int srv_i...
<filename>src/pages/dashboard/status/index.tsx import React, { useEffect, useState } from "react" import Box from "../../../components/Box" import Breadcrumb from "../../../components/Breadcrumb" import LabelValue from "../../../components/LabelValue" import Panel from "../../../components/Panel" import Tag from "../.....
<filename>src/common/clazz/release.ts import * as core from '@actions/core' import {GithubKit} from './github-kit' import {IRelease} from '../interface/release' import {IReleaseAsset} from '../interface/asset' import {IsoDateString} from '../types/iso-date-string' import {Podcast} from '../types/podcast' export class ...
/* * Copyright 2013-2014 the original author or authors. * * 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 applica...
<reponame>tittoassini/router-api<gh_stars>1-10 {-# LANGUAGE DeriveFoldable #-} {-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE DeriveGeneric #-} module Data.Pattern( Pattern(..),WildCard(..) ,patternQ,filterPatternQ,prefixPattern,onlyWildCards,HVar(..) ) where import qualified Data.BitVector as V impo...
// NewCreateTechRequestBody builds the HTTP request body from the payload of // the "createTech" endpoint of the "hy_tech" service. func NewCreateTechRequestBody(p *hytech.CreateTechPayload) *CreateTechRequestBody { body := &CreateTechRequestBody{ Name: p.Name, } return body }
/* * Test for getting form fields without node path. */ @Test public void testGetFormFieldsWithoutNodePath() throws ApiException, MessagingException, IOException { String remoteFileName = "TestGetFormFieldsWithoutNodePath.docx"; TestInitializer.UploadFile( PathUtil.get(Test...
<reponame>Shimingli/hement package com.shiming.network.retrofit; import android.content.Context; import com.shiming.network.BuildConfig; import com.shiming.network.cookie.PersistentCookieJar; import com.shiming.network.cookie.cache.SetCookieCache; import com.shiming.network.cookie.persistence.SharedPrefsCookiePersis...
<gh_stars>10-100 import { Stack, StackProps, Construct, App, Duration } from "@aws-cdk/core"; import { StringParameter } from "@aws-cdk/aws-ssm"; import { CdkPasswordless } from "../lib/index"; import { Function, Runtime, Code } from "@aws-cdk/aws-lambda"; class myStack extends Stack { constructor(scope: Construct, ...
Smart City Security Issues: Depicting Information Security Issues in the Role of an Urban Environment For the first time in the history of humanity, more them half of the population is now living in big cities. This scenario has raised concerns related systems that provide basic services to citizens. Even more, those ...
import * as data from "../data"; import { expect } from "chai"; // describe("Trailing Stop Trigger Tests", async function() { // let trigger, trade; // it("check & validate for trailing stop trigger", done => { // trigger = { // ...data.default.trigger, // params: '{ "intialPrice": "0.9", "trail"...
Protectivity and safety following recombinant hepatitis B vaccine with different source of bulk compared to hepatitis B (Bio Farma) vaccine in Indonesia Purpose Indonesia, a high populous and the second-highest country in epidemicity of hepatitis B in South-East Asia require maintaining its capacity of monovalent hepa...
package test.vetjobs.oa; import com.viaoa.object.*; import com.viaoa.hub.*; import com.viaoa.annotation.*; import com.viaoa.util.OADate; @OAClass( shortName = "job", displayName = "Job" ) @OATable( indexes = { @OAIndex(name = "JobState", columns = {@OAIndexColumn(name = "State")}), @OA...
In 2008, union thugs and members of the New Black Panthers showed up at certain polling places in Ohio and Philadelphia to intimidate Republican voters. To be clear, they didn’t say they were there for that reason. Rather, they said they were there to be sure everyone got to vote (wink, wink, nod, nod.) Members of the...
import fs from 'fs'; import path from 'path'; import {expect} from 'chai'; import {FileCleanner, FilePiper} from '../src/piper'; import {MakeDirs} from '../src/piper/utils'; import Analyse from '../src/piper/analyse'; describe('piper文件中转功能单元测试', () => { describe('FileCleanner()清除文件方法测试', () => { let tmpDir...
/* * Copyright (c) 2021 - <NAME> - https://www.yupiik.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 required by applica...
/*BEGIN_LEGAL Copyright (c) 2018 Intel Corporation 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 a...
<filename>src/validator/ValidatorHandlers.ts /* eslint-disable */ import * as vscode from "vscode"; import setState, { ValidatorSelectionStateRequest, } from "../binary/requests/setState"; import CompletionOrigin from "../CompletionOrigin"; import { StatePayload } from "../globals/consts"; import { VALIDATOR_IGNORE_R...
import displayio from adafruit_macropad import MacroPad from bongo.bongo import Bongo # Create macropad and bongo macropad = MacroPad() bongo = Bongo() # Create a group and add bongo to it group = displayio.Group() group.append(bongo.group) # Show the group macropad.display.show(group) # Main loop while True: k...
<gh_stars>0 import numpy as np import server.game_pb2 as game__pb2 from server.game_pb2 import ScoreType from server.game_pb2 import Action from server.YahtzeeGameInterface import YahtzeeGameInterface from server.Judger import Judger class YahtzeeGame(YahtzeeGameInterface): def __init__(self, seed): self....
// Copyright 2015 Open Source Robotics Foundation, 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 // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by appli...
/** * A cache for charts data, implemented as a singleton. * @author Laurent Cohen */ public final class ChartDataCache { /** * The singleton instance of this cache. */ private static final ChartDataCache instance = new ChartDataCache(); /** * Mapping of fields to their collection of values. */ p...
def countdownDownload(timerDownload, timerupdate, count): stu = timerupdate listwallpaper = returnwallpaper() removeUnwantedPhotos(listwallpaper) listwallpaper = returnwallpaper() WallpaperCount = len(listwallpaper) setwallpaper(listwallpaper, count) count += 1 while timerDownload: ...
Parameterless Transductive Feature Re-representation for Few-Shot Learning Recent literature in few-shot learning (FSL) has shown that transductive methods often outperform their inductive counterparts. However, most transductive solutions, particularly the meta-learning based ones, require inserting trainable paramet...
<reponame>cisco-ie/cisco-proto /* Copyright 2019 Cisco Systems 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 a...
def execute_command_with_pipe(command, source_file_to_pipe=None, destination_file_to_pipe=None): if (source_file_to_pipe is None and destination_file_to_pipe is None) or \ (source_file_to_pipe is not None and destination_file_to_pipe is not None): raise ValueError("Either source is specified, or...
#include <iostream> #include <QtCore/QFile> #include <QtCore/QDir> #include <QtCore/QDirIterator> #include <QtCore/QFileInfo> #include <QtCore/QString> #include <QtCore/QStringList> #include <QtCore/QtDebug> #include "TestFileLocations.h" // ------------------------------------------------------------------------...
def bucket_stats(buckets): bucket_dist = np.array([len(x) for x in buckets.values() if len(x) > 1], dtype=np.uint64) comparisons_dist = np.array([x*(x-1)//2 for x in bucket_dist], dtype=np.uint64) mean_bucket_size = np.mean(bucket_dist) median_bucket_size = np.median(bucket_dist) num_pairwise_compar...
/* * Copyright 2018 Karlsruhe Institute of Technology. * * 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 require...
Most often we see dash cam footage of people doing the craziest things in traffic, but this time we have an extraordinary video! This lady’s dash cam actually captured two idiot who attempted to rip her off her insurance by staging a traffic accident! This is just hilarious. Two guys stand on the side of the street an...
The De Wet Apostle paintings in the chapel at Glamis Castle SUMMARY The paintings in the chapel at Glamis Castle were commissioned from the Dutch artist Jacob de Wet in 1688 by Patrick, first earl of Strathmore. De Wet created a successful decorative scheme in the chapel as stipulated by the earl by the combination of...
Image caption Lionel Messi's No.10 shirt is a favourite among young Palestinians Gaza football fans have defied a Hamas order not to watch a match between Spanish giants Barcelona and Real Madrid. Hamas, which governs Gaza, is angry that an Israeli soldier attended the game. But thousands watched the 2-2 draw on TV. J...
Put this chart down for one that helps support that narrative that all millennials are losers that live in their parents' basement. Via Deutsche Bank's Torsten Sløk, we find that nearly 20% of men between the ages of 25 and 34 live at home. As a point of comparison, about 12% of women this age are living at home. It'...
<gh_stars>0 /* * Copyright 1999-2018 Alibaba Group Holding 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 * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless require...
// NewBpeFromFiles create BPE model from vocab and merges files func NewBpeFromFiles(vocab, merges string) (*BPE, error) { b := NewBpeBuilder() b.Files(vocab, merges) return b.Build() }
<filename>instant/econ/gdp/worldbank_test.go package gdp import ( "net/http" "reflect" "testing" "time" "github.com/jarcoal/httpmock" "github.com/jivesearch/jivesearch/instant/econ" ) func TestFetch(t *testing.T) { httpmock.Activate() defer httpmock.DeactivateAndReset() type args struct { country string ...
/** * This plugin creates a panel which allows testing of custom QML dialogs * * @ingroup plugins * @image html plg_dialog_test.png * @note Requires Plugins: * - @ref coreplugins */ class DialogTestPlugin : public PluginMain, public Depends<IViewCreator> { public: bool PostLoad(IComponentContext& context) { a...
Obviously it's very unlikely that Sony would use any cast members from Sam Raimi's original Spider-Man flicks in their rebooted franchise, but if it was ever on the table, it sounds like the awesome Alfred Molina would grab the opportunity with eight hands.. “That was the most fun I think I’ve ever had on a movie of t...
from pyQuARC.code.checker import Checker from .fixtures.checker import FUNCTION_MAPPING from .common import read_test_metadata class TestChecker: """ Test cases for the Checker script in checker.py """ def setup_method(self): self.checker = Checker() self.test_metadata = read_test_me...
Psychotherapy and transsexualism We questioned whether transsexuals always require the psychotherapy demanded by the health insurance system in Germany. For this purpose, we examined 430 transsexuals who came to our facility between 1988 and 2006. At the first consultation after the history was taken, they filled out ...
/** * Delete the entities with the given keys asynchronously. * * @param keys Keys of the entities to delete. * @return Callback that can be used to complete the delete operation later. */ @Nonnull @SuppressWarnings("unchecked") default Runnable deleteByKeyAsync(Key<E>... keys) { ...
/** * Given an array of WordNet nouns, return an outcast. * * @param nouns array of nouns. * @return Furthest noun to the rest of nouns. */ public String outcast(String[] nouns) { int maxDistance = -1; int maxDistanceIdx = -1; for (int i = 0; i < nouns.length; i++) { ...
MOLECULAR DIAGNOSIS AND EVOLUTIONARY RELATIONSHIP ANALYSIS OF PLANT PARASITIC TEA GARDEN NEMATODES FROM DIFFERENT TEA ESTATES IN SYLHET REGION OF BANGLADESH Nematodes from plant-parasitic sources are ever-present and incidental to plant growth as well as crop production. The damage of tea gardens caused by nematode is...
package ru.spbau.tinydb.queries; import org.jetbrains.annotations.NotNull; import ru.spbau.tinydb.common.DBException; import ru.spbau.tinydb.engine.IDataBase; /** * @author adkozlov */ public interface IQuery<R> { @NotNull R execute(@NotNull IDataBase instance) throws DBException; }
<filename>pkg/jsonstream/types.go package jsonstream import ( "time" ) // JSONError wraps a concrete Code and Message as error. type JSONError struct { Code int `json:"code,omitempty"` Message string `json:"message,omitempty"` } // Error implement the error interface. func (e *JSONError) Error() string { r...
<reponame>Swagger-Ranger/JavaSrc<filename>javaSE/src/main/java/com.silinx/source/swaggerranger/JavaCore/socket/ListeningThread.java package com.silinx.source.swaggerranger.JavaCore.socket; import java.io.IOException; import java.net.ServerSocket; import java.net.Socket; import java.util.Vector; /** * 监听类 * 继承Thread...
<gh_stars>1-10 /*********************************************************************************************************************** * OpenStudio(R), Copyright (c) 2008-2018, Alliance for Sustainable Energy, LLC. All rights reserved. * * Redistribution and use in source and binary forms, with or without modific...
n=int(input()) if n<=3: if n==3: mensaje="7" if n==2: mensaje="1" else: if n<=7: if n==4: mensaje="11" if n==5: mensaje="71" if n==6: ...
// Generated by cdk-import import * as cdk from 'aws-cdk-lib'; import * as constructs from 'constructs'; /** * Schema for Module Fragment of type JFrog::Xray::EC2Instance::MODULE * * @schema CfnEc2InstanceModuleProps */ export interface CfnEc2InstanceModuleProps { /** * @schema CfnEc2InstanceModuleProps#Param...
import React from 'react' import styles from './styles.module.scss' // ___________ // type BlockContainerProps = { gap?: number | string } // ___________ // const BlockContainer: React.FC<BlockContainerProps> = ({ gap, children }) => { return ( <div className={styles.blockContainer} style={{ gap: gap || '12p...
/** * Converts pde line number to java line number * @param pdeLineNum - pde line number * @return */ protected int pdeLineNumToJavaLineNum(int pdeLineNum){ int javaLineNumber = pdeLineNum + errorCheckerService.getPdeImportsCount(); int codeIndex = editor.getSketch().getCodeIndex(editor.getCurrentTa...
from collections import Counter n=int(input()) l=list(input().split()) c=Counter(l) if c['100']%2==0 and c['200']%2==0: print("YES") elif c['100']%2==0 and c['100']>0: print("YES") else: print("NO")
package olie; /** * @Auther: niexianglin you can mail to <EMAIL> * @Date: 2018/7/11 11:04 * @Description: */ public class _SelectIn { /** * Slect IN : 在什么位置打开当前处于编辑状态的文件。Alt + F1 * 最常用的地方:在项目结构中打开文件 Alt + F1 -> 1 */ /** * 操作路径:Navigate -> Select In */ /** * 感受:实用价值还可以,...
package main import ( "context" "encoding/json" "github.com/go-redis/redis/v8" "time" ) type ClientMarshalerInterface interface { Get(key string, returnObj interface{}) (interface{}, error) Set(key string, object interface{}, expiration time.Duration) error } type ClientMarshaler struct { client redis.Cmdabl...
#pragma once #include <catboost/idl/pool/proto/quantization_schema.pb.h> #include <catboost/idl/pool/proto/metainfo.pb.h> #include <catboost/libs/helpers/exception.h> #include <catboost/private/libs/options/enums.h> #include <util/generic/yexception.h> #include <util/system/types.h> namespace NCB { namespace N...
import Joi from 'joi'; export default { guid: Joi.alternatives() .try( Joi.any().only().allow(null), Joi.string().trim(false).length(24).hex() ) .required(), cdate: Joi.alternatives() .try(Joi.any().only().allow(null), Joi.number()) .required(), mdate: Joi.alternatives() .try(...
package order import ( "encoding/json" "fmt" "strings" ) // SuppressionListField client suppression list order field. type SuppressionListField int8 const ( // BySuppressedEmailAddress email address. BySuppressedEmailAddress SuppressionListField = iota // BySuppressionDate suppression date. BySuppressionDate ...
#include <stdio.h> #include <stdlib.h> #include <string.h> int main() { char *a; char *b; a=(char *)malloc(200005*sizeof(char)); b=(char *)malloc(200005*sizeof(char)); scanf("%s",a); scanf("%s",b); long l1=strlen(a); long l2=strlen(b); long i=0; long arr2[26][2]; ...
<filename>src/ch04/ch04.exercises.hs myConcat :: [[a]] -> [a] myConcat xs = foldr (\acc x -> acc ++ x) [] xs recursiveTakeWhile :: (a -> Bool) -> [a] -> [a] recursiveTakeWhile cond [] = [] recursiveTakeWhile cond (x:xs) = if not (cond (x)) then [] else x : (recursiveTakeWhile cond xs) myTakeWhile :: (a -> B...
#include <bits/stdc++.h> using namespace std; typedef long long ll; const ll M = 1000000007; int main() { ll p, k, ans; cin >> p >> k; if (k % p == 1) { /* * anything goes. * ans = p^p */ ans = 1; for (int i = 0; i < p; i++) { ans = (ans*p) % M; } } else { /* * ...
/** * Request a permission and optionally register a callback for the current activity * * @param requestedPermissions Array of permissions as defined in Manifest * @param permissionCallback function called with result of permission prompt * @param requestCode - 8 Bit value to associate callback with request...
/** * @author Gleb Bondarchuk * Created on 04, 22 2018. */ public class ShadowQueryTest { @Test public void shadowQueryTest() { Javers javers = JaversBuilder .javers() .withCommitIdGenerator(CommitIdGenerator.RANDOM) .build(); Employee ryan = ...
<reponame>sousa-andre/ipvcEI-Bot import fetch from 'node-fetch' export interface Stock { symbol: string displayName: string regularMarketPrice: string } export const getStock = async (stockTicker: string) => { let req = await fetch( `https://stock-data-yahoo-finance-alternative.p.rapidapi.com/...
<reponame>lukasz-okuniewicz/custom-pixi-particles export default { ANGULAR_BEHAVIOUR: 'AngularVelocityBehaviour', LIFE_BEHAVIOUR: 'LifeBehaviour', COLOR_BEHAVIOUR: 'ColorBehaviour', POSITION_BEHAVIOUR: 'PositionBehaviour', SIZE_BEHAVIOUR: 'SizeBehaviour', EMIT_DIRECTION: 'EmitDirectionBehaviour', ROTATION...
import { Component, Input, Output, EventEmitter, OnInit, OnChanges, ElementRef } from '@angular/core'; @Component({ selector: 'my-checkbox-switchery-double', template: ` <div class="checkbox checkbox-switchery switchery-{{ size }} switchery-double" style="margin-left: 15px;"> <label>...
package pgxschema import ( "context" "fmt" "math/rand" "sync" "testing" "time" "github.com/jackc/pgx/v4/pgxpool" ) // TestCreateMigrationsTable ensures that each test datbase can // successfully create the schema_migrations table. func TestCreateMigrationsTable(t *testing.T) { withEachDB(t, func(db *pgxpool....
Former US secretary of state stokes speculation of presidential campaign on New Hampshire visit with Democratic Senate candidate Jeanne Shaheen Hillary Clinton defended Democrats’ focus on women’s rights on Sunday, as she returned to her old redoubt of New Hampshire to help the party keep hold of a crucial US Senate s...