content
stringlengths
10
4.9M
<filename>servlet-source/src/main/java/javax/el/ELUtil.java /* */ package javax.el; /* */ /* */ import java.lang.reflect.Array; /* */ import java.lang.reflect.Constructor; /* */ import java.lang.reflect.InvocationTargetException; /* */ import java.lang.reflect.Method; /* */ import java.lang...
if __name__ == '__main__': s = input().rstrip().split(' ') r = int(s[0]) D = int(s[1]) xinit = int(s[2]) x = xinit for i in range(10): x = r*x-D print(x)
def main(): parser = CustomArgumentParser() parser.add_argument("-s", "--simon-sez", help="Really, Simon sez copy the data!", action="store_true") parser.add_argument("-r", "--src-directory", help="Copy metadata from files in this directory.") parser.add_argument("-d", "--dst-dir...
<filename>module_home/src/main/java/com/zte/zakker/home/mvvm/viewmodel/NewsDetailViewModel.java package com.zte.zakker.home.mvvm.viewmodel; import android.app.Application; import android.databinding.ObservableField; import android.support.annotation.NonNull; import com.zte.zakker.api.dto.RespDTO; import com.zte.zakker...
def complex_pizza_order(): return """ <h1>Welcome to PIZZA PIZZA ordering</h1> <p>We deliver your pizza in 40 minutes max. If not - Pizza's on us!</p> <p>Your details:</p> <form action="/complex_results", method="POST"> <p> <label for="email">Email:</label><br> <input type="email...
--- common/platform.cpp.orig 2019-07-19 12:56:20 UTC +++ common/platform.cpp @@ -52,6 +52,8 @@ namespace oidn { #if defined(__linux__) name = "Linux"; + #elif defined(__DragonFly__) + name = "DragonFly"; #elif defined(__FreeBSD__) name = "FreeBSD"; #elif defined(__CYGWIN__)
import {Router} from 'express'; import { createUserController } from "./userCases/CreateUser"; const routes = Router(); routes.post('/users',(request, response) => { return createUserController.handle(request, response); }); export {routes};
import { BreedEntity } from '../breed.entity'; import { EntityRepository, Repository } from 'typeorm'; import { BreedDto } from '../dto/breed.dto'; @EntityRepository(BreedEntity) export class BreedRepository extends Repository<BreedEntity> { async createBreed(breedDto: BreedDto) { return await thi...
STATUS OF HEPATITIS A VIRUS (HAV) AND HEPATITIS E VIRUS (HEV) INFECTION IN THE PATIENTS PRESENTING WITH ACUTE VIRAL HEPATITIS ATTENDING A TERTIARY CARE HOSPITAL IN JHALAWAR, RAJASTHAN Viral hepatitis refers to a primary infection and inflammation of the liver by any of the heterogenous group of hepatitis virus types A...
As the Conservative caucus hosts Iran Accountability Week on Parliament Hill, we are concerned that the Liberal government will pursue policies with Iran that jettison Canada’s values and interests. In recent days alone, there have been worrisome signs that any rush to embrace Iran remains ill-advised and dangerous. T...
// Reconcile inspects a trial to see if the patched objects are ready for the trial job to start func (r *ReadyReconciler) Reconcile(req ctrl.Request) (ctrl.Result, error) { ctx := context.Background() now := metav1.Now() t := &optimizev1beta2.Trial{} if err := r.Get(ctx, req.NamespacedName, t); err != nil || r.ign...
<gh_stars>100-1000 #ifndef GENMEM_NVDLA_MEMORY_H #define GENMEM_NVDLA_MEMORY_H #include "genmem/Memory.hpp" #include "genmem/header.hpp" namespace genmem { class NvDlaMemory : public Memory { public: struct MleInfo { int size; int mid; int start_entry_id; bool should_alloc; // should be alloce...
<gh_stars>0 package org.zalando.tarbelaproducer.service.exception; public class UnknownEventIdException extends RuntimeException { private final Integer eventId; public UnknownEventIdException(final Integer eventId) { this.eventId = eventId; } @Override public String getMessage() { ...
def cheb_mde_core_etdrk4(w, v, L, Ns, h, q=None, algo=1, scheme=1): M = 32 R = 15. if scheme == 0: if algo == 0: E, E2, Q, f1, f2, f3 = etdrk4_coeff_nondiag(L, h, M, R) elif algo == 1: E, E2, Q, f1, f2, f3 = etdrk4_coeff_contour_hyperbolic(L, h, M) elif algo =...
#define CMake_VERSION_MAJOR 3 #define CMake_VERSION_MINOR 16 #define CMake_VERSION_PATCH 3 #define CMake_VERSION "3.16.3"
export { updateDispositifReactions } from "./updateDispositifReactions";
export * from './types' export * from './History' export * from './CaptureClicks' export { Location, Path, Hash, State, Queries } from 'prehistoric'
/** * @author Piotr 'pitrecki' Nowak * Created by Pitrecki on 2016-12-24. */ class AlgorithmsTest { @Test @DisplayName("Negative values should return same gcd value") void testNegativeArgumentsInGCDMethod() { double expected = 12; assertSoftly(softly -> { assertThat(Algorithm...
<reponame>gottenwit/vue3-datepicker-lite import DatepickerLite from './components/DatepickerLite.vue'; export default DatepickerLite;
// GetDB returns a GORM database object. func GetDB() *gorm.DB { config := getStaticDBConfig() db, err := gorm.Open("postgres", config.String()) if err != nil { msg := fmt.Sprintf("Failed to connect database. Reason: %s", err) panic(msg) } return db }
<filename>src/lib/weights.ts<gh_stars>1-10 let weights: Map<number, number> = new Map(); weights.set(1, 2); weights.set(2, 4); weights.set(3, 8); weights.set(4, 5); weights.set(5, 10); weights.set(6, 9); weights.set(7, 7); weights.set(8, 3); weights.set(9, 6); export default weights;
Ontological Knowledge for Rhetorical Move Analysis Scholarly writing in the experimental biomedical sciences follows the IMRaD (Introduction, Methods, Results, and Discussion) structure. Many Biomedical Natural Language Processing tasks take advantage of this structure. Recently, a new challenging information extracti...
def rotate_errors(a,d,pmra_e,pmdec_e,pmcorr): ricrs = return_ricrs(a,d) picrs = return_picrs(a,d) qicrs = return_qicrs(a,d) rgal = np.dot(return_gaia_Agprime(),ricrs) ell = np.arctan2(rgal[1],rgal[0]) b = np.arctan2(rgal[2],np.sqrt(rgal[0]*rgal[0]+rgal[1]*rgal[1])) ...
package com.examind.wps.api; import org.opengis.parameter.ParameterDescriptorGroup; import org.opengis.parameter.ParameterValueGroup; /** * Describes a type of {@link WebProcessingComponent}, and allow for creation of * components of the described type by providing a managed configuration. * * The aim is that con...
Targeted Immunotherapies in Gastrointestinal Cancer: From Molecular Mechanisms to Implications Gastrointestinal cancer is a leading cause of cancer-related mortality and remains a major challenge for cancer treatment. Despite the combined administration of modern surgical techniques and chemoradiotherapy (CRT), the ov...
# Copyright 2020 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
/** * Throws a SyntaxError if the given string was not a valid attribute name * @param line * @param attr * @throws SyntaxError */ public static void acceptAttributeName(int line, String attr) throws SyntaxError { for (int i = 0; i < attr.length(); ++i) { char ch = attr.charAt(i); if ((i ...
A porn producer has addressed allegations of abuse made against him by adult video veteran Nikki Benz for the first time. The Ukrainian Canadian actress claimed last month that during a "horrific" shoot she was stomped on and Tony T was choked her and failed to stop the filming after she shouted "cut" She later tweet...
/** * Method to get restaurants based on the city name entered in cityname edit text * or the location got from current user location */ private void performSearch() { progressLayout.setVisibility(View.VISIBLE); HashMap<String, String> params = new HashMap<>(); params.put(Consts.Q...
<filename>src/PE3.hs module PE3 (go) where import Data.Numbers.Primes go :: Integer -> Integer go = maximum . primeFactors
<filename>src/main/java/info/u_team/u_team_core/gui/elements/WidgetTextureProvider.java package info.u_team.u_team_core.gui.elements; import java.util.function.Function; import net.minecraft.client.gui.widget.ClickableWidget; import net.minecraft.util.Identifier; import info.u_team.u_team_core.api.gui.TextureProvider;...
/** * Event describing a change in sorting of a {@link DataProvider}. Fired by * {@link SortNotifier SortNotifiers}. * * @see SortOrder * @param <T> * the event source type * @param <S> * the type of the sorting information * * @author Vaadin Ltd * @since 1.0 */ public class SortEvent<...
def _add_bias(self, input=None, params=None): bias_shape = input.shape[-1].value bias = self._cpu_variable_init('bias', shape=bias_shape, initializer=tf.zeros_initializer()) output = tf.nn.bias_add(input, bias) self.num_weights += bias_shape self.mem += bias_shape*self.bytesize /...
Infusing Standard Precautions for Infection Control in Occupational Therapy Telehealth With Children The COVID-19 pandemic has caused a profound effect on the health and well-being of individuals worldwide. In the Philippines, the withstanding quarantine protocols have affected the occupational therapy practice, which...
<reponame>melvinalmonte/some_gatsby_typescript- import * as React from 'react' import PropTypes from 'prop-types' class PassToken extends React.Component{ static propTypes = { token: PropTypes.string, } static defaultProps = { token: '', } render() { return ( <p>{this.props.token}</p> ...
// kinc_g4_set_texture_minification_filter function as declared in graphics4/graphics.h:109 func kinc_g4_set_texture_minification_filter(unit kinc_g4_texture_unit, filter kinc_g4_texture_filter) { cunit, cunitAllocMap := unit.PassValue() cfilter, cfilterAllocMap := (C.kinc_g4_texture_filter_t)(filter), cgoAllocsUnkno...
/* JAI-Ext - OpenSource Java Advanced Image Extensions Library * http://www.geo-solutions.it/ * Copyright 2021 GeoSolutions * * 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 * * h...
<reponame>jojoman3/Test enum { // en_US LAYER_EN_US_IT = 13, LAYER_EN_US_IS = 14, LAYER_EN_US_A = 15, LAYER_EN_US_FIVE = 16, LAYER_EN_US_TEN = 17, LAYER_EN_US_QUARTER = 18, LAYER_EN_US_HALF = 19, LAYER_EN_US_TWENTY = 20, LAYER_EN_US_PAST = 21, LAYER_EN_US_TO = 22...
def solve(b): sum=0 a=[] for i in b: if (sum!=(int(i)+1)): sum=int(i)+1 a.append(1) else: sum=int(i)+0 a.append(0) t='' for i in a: t+=str(i) print(t) for _ in range(int(input())): n=int(input()) b=in...
#ifndef TOKENIZER_H #define TOKENIZER_H #include <QString> #include <QStringList> class Tokenizer { public: Tokenizer(); Tokenizer(QString string, QString delimiters=" .-+=|\\/!??\t\r\n‌"); QString nextToken(); QString seeNextToken(); QStringList getAllTokens(); void forward(int steps); bool...
<gh_stars>1-10 import _ = require("lodash") import { join } from "path" import { ExtensionContext, window } from "vscode" import { setExtTo } from "." import { book, getPageText, newBook } from "../book" import { showMainMenu } from "../library" import { getBook, updateBook } from "./bookList" import { getConfig } from...
package org.instantlogic.designer.dataexplorer; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import org.instantlogic.fabric.Instance; import org.instantlogic.fabric.model.Entity; import org.instantlogic.fabric.model.Relation; import org.instantlogic.interaction.fl...
import atexit import io import sys # input = sys.stdin.readline _OUTPUT_BUFFER = io.StringIO() sys.stdout = _OUTPUT_BUFFER @atexit.register def write(): sys.__stdout__.write(_OUTPUT_BUFFER.getvalue()) def array_to_string(a): s = "" for i in a: s += str(i) return s n = int(i...
<filename>core/rollup/src/utils/tsconfig/index.ts<gh_stars>1-10 import path from 'path'; import { isFile, fs } from '@walrus/build-utils'; import tsModule from 'typescript'; /** * tsconfig.json is not valid json file * https://github.com/Microsoft/TypeScript/issues/20384 */ export function parseTsconfig(configPath:...
// tslint:disable-next-line:variable-name export let MitterConstants = { // MitterApiUrl: 'https://api.mitter.io', MitterApiUrl: 'https://api.mitter.io', WeaverUrl: 'wss://weaver.mitter.io/', MitterApiStagingUrl: 'https://api.staging.mitter.io', Api: { VersionPrefix: '/v1' } }
// Bot.java import java.util.ArrayList; import java.util.List; public class Bot { public Bot () {} /** * Bot用selectMove -- 着手を選択する * @param: * Field field -- 盤情報とメソッド * String next -- 次の手番( 黒 / 白 ) */ public Action selectMove ( Field field, String next ) { ArrayList <...
def monitoring_onaccept(form): formvars = form.vars try: record_id = formvars.id except AttributeError: return db = current.db s3db = current.s3db ctable = s3db.disease_case mtable = s3db.disease_case_monitoring case_id = None ...
def _inlet_depth_hl_min(self): inlet_chan_hl_depth = pc.horiz_chan_h( self.q, self.inlet_w_pre_weir, self.inlet_hl_max, self.l, pc.viscosity_kinematic_water(self.temp), mat.CONCRETE_PIPE_ROUGH, False) return inlet_chan_h...
def compute_co_occurrence_matrix(corpus, window_size=4): words, num_words = distinct_words(corpus) M = None word2Ind = {} flattened_corpus = [y for x in corpus for y in x] for index, word in enumerate(words): word2Ind[word] = index M = np.zeros((len(words),len(words))) for index, wor...
def vcoord(filename): na=np.newaxis a = mygis.read_nc(filename,"a").data[na,:,na,na] b = mygis.read_nc(filename,"b").data[na,:,na,na] p0= mygis.read_nc(filename,"p0").data ps= mygis.read_nc(filename,"ps").data[:,na,:,:] p= a*p0+b*ps return p
/** * isCacheState checks the local in-memory cache to see if a record exists for this family. If the record does exist * it checks to see when the last time the container properties were checked. This purpose of this check is to make sure * that every request for a container doesn't require a database c...
Phosphorus speciation in temperate basaltic grassland soils by solution 31P NMR spectroscopy Phosphorus (P) speciation in 21 basaltic and four non‐basaltic Irish grassland soils was determined by NaOH–EDTA extraction and 31P NMR spectroscopy. Organic P in basaltic soils ranged between 30 and 697 mg P kg−1 and consiste...
/** * Create a new <code>NodeState</code> and subsequently retrieves the * corresponding <code>Node</code> object. * * @param nodeName name of the new node * @param nodeTypeName name of the new node's node type or <code>null</code> * if it should be determined autom...
// Set implements flag.Value. func (e *Encoding) Set(s string) error { switch s { case "0": *e = Delta case "1": *e = DoubleDelta case "2": *e = Varbit default: return fmt.Errorf("invalid chunk encoding: %s", s) } return nil }
/* * Copyright (C) 2008, 2009 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of c...
<gh_stars>0 use super::{configure, models, GlobalState}; use crate::models::*; use actix_web::web::Data; #[cfg(test)] use actix_web::{test, App}; #[actix_rt::test] async fn quote_v1_not_found_status() { let mut app = test::init_service(App::new().app_data(Data::new(GlobalState::new())).configure(configure)).await...
#include <map> #include <set> #include <vector> #include <iostream> #include <algorithm> #include <string> #include <utility> #include <unordered_map> #include <unordered_set> using namespace std; template<class T> void getInput(std::vector<T> &v, int count) { v.resize(count); for (int i = 0; i < co...
A hybrid learning system proposal for PLC wiring training using AR With rapid developments in the manufacturing industry, there has been increasing attention on PLC training for implementing factory automation. In order to meet the increasing demand for PLC training, this paper proposes a PLC wiring training system us...
In vitro Evaluation of Antioxidant properties of Hodgsonia heteroclita (Cucurbitaceae) fruit Hodgsonia heteroclita fruits have been used as traditional drug for antidiabetic in Western Assam, India. The study aimed to investigate antioxidant activity of methanolic fruit extract of H. heteroclita. The antioxidant activ...
import { Injectable } from '@angular/core'; import { Student } from './student'; import { STUDENTS } from './mock-students'; import {Observable, of } from 'rxjs'; import { MessageService } from './message.service'; @Injectable({ providedIn: 'root' }) export class StudentService { // this is a basic get function...
<gh_stars>0 // Copyright 2021 The Rode 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 applicable la...
import { InlineDateArg } from "../types/function"; import { TFormatBlockColor } from "../types/types"; export function inlineDate(arg: InlineDateArg) { const text: [[string, any[][]]] = [["‣", [["d", arg]]]]; return { text, add(title: string) { text.push([title, [[""]]]); return new chunk(text)...
-- Copyright (c) 2020 Microsoft Corporation. All rights reserved. -- Released under Apache 2.0 license as described in the file LICENSE. -- Authors: <NAME>, <NAME>, <NAME>. {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE StrictData #-} module Search.SearchT where import Control.Mona...
<filename>Mobile/Oasis/android/support/v4/app/DialogFragment.java package android.support.v4.app; import android.app.Activity; import android.app.Dialog; import android.content.DialogInterface; import android.content.DialogInterface.OnCancelListener; import android.content.DialogInterface.OnDismissListener; import and...
/** * @param clazz the clazz * @param object the object * @return string * @throws JAXBException the jaxb exception */ public static String java2XmlStr(Class<?> clazz, Object object) throws JAXBException { JAXBContext jaxbContext = JAXBContext.newInstance(clazz); Marshaller mar...
/** * Performs an HTTP request. */ public abstract class HttpRequestBuilder { private static final String DEFAULT_SCHEME = "http"; protected List<NameValuePair> headers = new ArrayList<>(); protected List<NameValuePair> params = new ArrayList<>(); protected ResponseHandler<String> responseHandler; ...
/** * Installs an action located at given URL * @param url Location of script to install * @return true if successful, false otherwise */ public boolean installFromUrl(final String url) { String script = Reader.readRemoteString(url); HashMap<String, String> vals = ActionStore.par...
The Creators Update for the Xbox One, which rolled out to the consoles last week, listed bitstream pass-through among its list of enhancements. But as Microsoft noted in its blog post, the feature was due to be made available later, and the company has now made good on its promise by releasing the functionality to Xbox...
#include <bits/stdc++.h> #define ll long long #define ld long double using namespace std; vector<vector<int>> tree; vector<int> c; void dfs(int u, int p, int& idx, vector<int>& ans) { idx++; ans[u] = c[idx]; for (int v : tree[u]) { if (v == p) { continue; } dfs(v, u, id...
When you agree to give someone billions of dollars, you want to be pretty sure you know what you’re getting in return, right? But donors who doled out US$15.2 billion in aid to Afghanistan seemed to have failed to do just that when it came to the critical issue of the participation of women in the peace process. Expa...
def create_tables(self, connection: Connection, drop: bool = False) -> None: cursor = connection.cursor() with connection: cursor.execute("""CREATE TABLE IF NOT EXISTS users ( id INTEGER PRIMARY KEY AUTOINCREMENT, name TEXT, user_id...
def _crc8_131(self, data): crc = 0xFF for i in [0, 1]: crc = (crc & 0xFF) ^ data[i] for j in range(8): if (crc & 0x80): crc = (crc << 1) ^ 0x31 else: crc = (crc << 1) return crc & 0xFF
#include "WiFiComm.h" //#if defined(ARDUINO_ARCH_MEGAAVR) #if defined(AVR_UNO_WIFI_REV2) WiFiComm::WiFiComm () { server = WiFiServer(80); } void WiFiComm::init(int led, const char *ssid, const char *pass){ //while (!Serial) {;} // wait for serial port to connect. Needed for native USB port only Serial.print...
<filename>Python/Module/JoyStick.py # JoyStick # # Copyright (c) 2021 <NAME> # # Released under the MIT license. # see https://opensource.org/licenses/MIT import pygame from pygame.locals import * import Repeater JOY_MAX_TRIGGER = 16 JOY_NOINPUT = 0 JOY_UP = 0x1 << JOY_MAX_TRIGGER JOY_RIGHT = 0x2 << JOY_MAX...
/** * Enqueue a read * @param completionHandler callback on completed read */ protected final void write(ByteBuffer b ,CompletionHandler<Integer, ? super ByteBuffer> completionHandler) { if (!channel.isOpen()) { return; } channel.write(b, b, completionHandler); ...
/** * Parses element name in any form - namespaced, member or single identifier. If the next token is * a tag-end token, {@code null} is returned; this happens with fragments. */ private IJSXName jsx_parseElementName() { if (this.type == jsxTagEnd) return null; Position startPos = this.startLoc; IJ...
#ifndef _ASM_IA64_PAGE_H #define _ASM_IA64_PAGE_H /* * Pagetable related stuff. * * Copyright (C) 1998, 1999, 2002 Hewlett-Packard Co * David Mosberger-Tang <davidm@hpl.hp.com> */ #include <asm/intrinsics.h> #include <asm/types.h> /* * The top three bits of an IA64 address are its Region Number. * Different re...
import numpy as np import torch from torchvision import transforms _task = transforms.Compose([ transforms.ToTensor(), transforms.Normalize( [0.5], [0.5] ) ]) from torchvision.datasets import MNIST # 数据集加载 mnist = MNIST('./data', download=True, train=True, transform=_task) # 训练集和验证集划分 from ...
// Glob returns the names of all files matching pattern, providing an implementation // of the top-level Glob function. func (fsys *MemFS) Glob(pattern string) ([]string, error) { fsys.mutex.Lock() defer fsys.mutex.Unlock() keys, err := fsys.store.prefixGlobKeys(fsys.dir, pattern) if err != nil { return nil, err ...
/* Copyright 2016 The Kubernetes 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 applicable law or agreed to in writing, ...
The suspects in the beating of a man at Northeast Philadelphia supermarket recorded the incident on video and Action News found it. It's only 36 seconds long, but cell phone video discovered by Action News on YouTube shows a vicious attack on a Northeast Philadelphia man inside the Franklin Mills Boulevard Pathmark. ...
def _parse_slices(self, item): return slice(item, item+1) if isinstance(item, int) else item
/* * Using local methods to ensure proper translation of items. ie: File name * needs to include a file extension. */ public ConfigBuilder file(File file) { folder(file.getParent()); fileName(file.getName()); return this; }
package start import ( "context" "encoding/json" "flag" "fmt" "io/ioutil" "net/http" "net/http/httptest" "net/url" "os" "path/filepath" "reflect" "regexp" "strings" "runtime" "testing" "time" "github.com/google/uuid" v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apim...
def copy_template(template_name, templates, paths, check_exsits=True, new_name=None, open_editor=False, editor=None): if not template_name in templates.keys(): print(f'COPY ERROR: the template {template_name} is not found in {paths["templates_config"]}') exit() if new_name is None: new_name = templates[template...
package info.jdavid.ok.server.handler; import java.io.File; import java.io.IOException; import java.io.RandomAccessFile; import java.util.Collections; import java.util.concurrent.TimeUnit; import info.jdavid.ok.server.HttpServer; import info.jdavid.ok.server.Https; import info.jdavid.ok.server.HttpsTest; import info....
/** * Non-thread-safe classes must not be used in a shared environment. * * @return predicate */ @ProbableError("Not thread-safe class") @Scopes({"static", "singleton", "session"}) public Predicate<Reference> unsafe_class() { return and( referenceTypeIsNot( ...
package main import ( "fmt" "sort" ) func main() { fmt.Println(minOperations([][]int{ {1, 2}, {3, 4}, }, 1)) } func minOperations(grid [][]int, x int) int { if len(grid) == 1 && len(grid[0]) == 1 { return 0 } arr := make([]int, len(grid)*len(grid[0])) index := 0 sum := 0 for i := range grid { for j...
def query_radius_prealloc( X: FloatArray, r: float, dists: FloatArray, indices: IntArray, counts: IntArray, data: FloatArray, idx_array: IntArray, idx_start: IntArray, idx_end: IntArray, is_leaf: BoolArray, node_data: NodeDataArray, rdist: RDist, min_max_rdist: MinMax...
def Tderiv(self, n): if n not in self._Tderiv: self._Tderiv[n] = [self._create_Tderiv(k, n) for k in range(self._num)] return self._Tderiv[n]
Namibia’s military-owned August 26 (Pty) Limited company and its National Central Intelligence Service (NCIS) have emerged as key players in continued violations of United Nations Security Council sanctions against North Korea in the southern African nation. A visit by NK News revealed that August 26 is currently usin...
post response: +60 post response: +193 post response: +36 post response: +76 it's BTS' Jungkook,Kim Jongkook was trying to move him and lifted his shirt revealing his abswe bow down in gratefulnessㅋㅋㅋJongkook mansae!!!original post: here 1. Ha... I'm deeply thankful...2. I was shocked when I saw this scene... Thank...
<filename>01_NeuralNetwork_MNIST.py #!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Mon Jan 22 07:48:53 2018 @author: magalidrumare copyright : https://github.com/fchollet/deep-learning-with-python-notebooks """ # Classify grayscale image of handwritten digit 28x28 into 10 categories (O to 9) # MNIST da...
// license:BSD-3-Clause // copyright-holders:<NAME> /*************************************************************************** Apple II bus slot cards All of these cards are electrically compatible, but for compatibility reasons we divide them by machine type. ******************************************...
/** * @param nStartIndex an intex within the current group * @return An index to the space following nStartIndex, or the length of * the buffer if there isn't a space following nStartIndex */ protected int currentGroupEnd(int nStartIndex) { if (nStartIndex >= g_nBufferLength) ret...
// PUT request to SD store func (s *sdStore) put(url *url.URL, bodyType string, payload io.Reader, size int64) (*http.Response, error) { req, err := http.NewRequest("PUT", url.String(), payload) if err != nil { return nil, err } req.Header.Set("Authorization", tokenHeader(s.token)) req.Header.Set("Content-Type",...
/*************************************************************************** Desc: Get the Container given a container number. ****************************************************************************/ RCODE fdictGetContainer( FDICT * pDict, FLMUINT uiContNum, LFILE ** ppLFile) { ITT * pItt; if( pDict && ...
class Truss: """Class to create a truss. Automatically removes repeated bars, but allows overlapping bars. Args: bars (list or tuple): List of bars that form the truss. """ def __init__(self, bars): """Class to define a truss""" # remove duplicated bars self.bars ...
Tech capital is first major US city to require all new buildings of 10 storeys or under to have solar panels, reports BusinessGreen San Francisco has this week passed landmark legislation requiring all new buildings under 10 storeys in height to be fitted with rooftop solar panels. The city’s San Francisco Board of S...
/************************************************************************** * FILE: binary-search.h * AUTHOR: <NAME> * CREATE DATE: 24-August-2009 * PROJECT: shared * COPYRIGHT: 2009, UQ * VERSION: $Revision: 1.0 $ * DESCRIPTION: Finds the index of an item, or place to insert in a sorted list. * Implements b...