content
stringlengths
10
4.9M
#include "test.h" /** Question no 1373 hard Maximum Sum BST in Binary Tree * Author : Li-Han, Chen; 陳立瀚 * Date : 8th, March, 2020 * Source : https://leetcode.com/problems/maximum-sum-bst-in-binary-tree/ * * Given a binary tree root, the task is to return the maximum sum of all keys of any sub-tree which is also...
<gh_stars>0 import React from 'react'; import BlindMain from '../components/BlindMain'; const NotFound: React.FC = () => ( <BlindMain type="404" /> ); export default NotFound;
<gh_stars>0 import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayDeque; import java.util.Arrays; import java.util.Collections; import java.util.Deque; import java.util.stream.Collectors; public class LittleAlchemy { public static void main(String[] args...
Parents are giving their children cannabis to treat serious diseases, and they're resorting to growing their own plants or importing them illegally from overseas. At least three New Zealand customers order liquid cannabis products from Mulaways Medicinal Cannabis in Kempsie, about 400km north of Sydney in rural New So...
def delete_annotation( self, key: str, column_id: Optional[int] = None, row_id: Optional[int] = None ): doc = self.read(column_id=column_id, row_id=row_id) if key in doc: del doc[key] self.write(doc=doc, column_id=column_id, row_id=row_id)
/* * Copyright (C) 2020 The zfoo 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...
<filename>twitoff/predict.py """prediction for user based on tweets""" import numpy as np from sklearn.linear_model import LogisticRegression from .models import User from .twitter import vectorize_tweet def predict_user(user0_name, user1_name, hypo_tweet_text): """ Determine and returns which user is more li...
class Content: # pylint: disable=too-few-public-methods, too-many-instance-attributes """Content Data Class.""" def __init__(self): # type: () -> None """Init for data.""" self.message_type = "" # type: Text self.protocol_version = "" # type: Text self.connection_u...
<gh_stars>0 package ioc.context; import ioc.factory.impl.DefaultListableBeanFactory; import ioc.support.reader.XmlBeanDefinitionReader; /** * 子类,提供加载BeanDefinition功能 */ public abstract class AbstractXmlApplicationContext extends AbstractRefreshableApplicationContext { @Override protected void loadBeanDefin...
package org.camunda.bpm.demo.cockpit.plugin.kpi.dto; public class ProcessInstanceCountDto { private String processDefinitionKey; private int runningInstanceCount; private int endedInstanceCount; private int failedInstanceCount; public String getProcessDefinitionKey() { return processDefinitionKey; ...
#include <cstdio> #include <cmath> #include <cstring> #include <cstdlib> #include <algorithm> using namespace std; const int MaxN = 2e5; typedef long long LL; int n, k; int dur[MaxN + 5], afr[MaxN + 5], pri[MaxN + 5]; struct PP { int pri, pos; }pp[MaxN + 5]; int cmp(PP x, PP y) {return x.pri < y.pri;...
export const cyrillicPattern = /[а-яА-ЯЁё]/;
<reponame>pchrszon/rbsc<filename>src/Rbsc/TypeChecker/ModelInfo.hs {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeOperators #-} -- | Construction of the symbol table and evaluation of ...
Analysis of the Impact of the Presence of Phylum Cyanobacteria in the Microbiome of Patients with Breast Cancer on Their Prognosis Cyanobacterial blooms caused by Cyanobacteria adversely affect the health of the people living in their vicinity. We elucidated the effect of Cyanobacteria in patients with breast cancer. ...
<filename>interp/src.go package interp import ( "fmt" "io/fs" "path/filepath" "strings" "golang.org/x/tools/go/packages" ) // importSrc calls global tag analysis on the source code for the package identified by // importPath. rPath is the relative path to the directory containing the source // code for the pack...
/** * Remove the old log file and create a new one. */ public void removeAndCreateNewLog() { logMgrLock.lock(); try { VanillaDb.fileMgr().delete(logFile); lastLsn = LogSeqNum.DEFAULT_VALUE; lastFlushedLsn = LogSeqNum.DEFAULT_VALUE; appendNewBlock(); } finally { logMgrLock.unlock(); } }
def input_s(): return raw_input() def input_i(): return int(raw_input()) def input_2_i(): arr = map(int, raw_input().split()) return arr[0], arr[1] def input_3_i(): arr = map(int, raw_input().split()) return arr[0], arr[1], arr[2] def input_i_array(): return map(int, raw_input().split()...
/** * CacheClient : Class used to request the segments cache */ public class CacheAccessClient<K, V> { /** * List of segments */ private List<K> segmentList = new ArrayList<>(CarbonCommonConstants.DEFAULT_COLLECTION_SIZE); private Cache<K, V> cache; public CacheAccessClient(Cache<K, V> cache) { th...
Syndicate will not use the controversial Online Pass, EA has confirmed. EA Partners executive producer Jeff Gamon told Eurogamer the decision was made in an effort to encourage all players to play the shooter, which includes a co-op component. "We want as little resistance or barriers to entry as possible," Gamon sai...
National Institutes of Health seek to speed up therapeutic innovations These are exciting times in medical research, no doubt. Too often, that excitement peters out long before the fruits of the laboratory ever become a treatment or a cure. Now, aiming to break a bottleneck between the test tube and the drug store, d...
Former Nauru security guard stands by water-boarding claim, but admits he never saw it happen Updated A former Australian security guard at the Nauru detention facility, who claimed refugees had been water-boarded, has been forced to concede he never saw it taking place. A Senate committee is investigating claims of...
use sabi_serialize::{deserialize, Deserialize, Serialize}; use crate::{ implement_node, implement_pin, LogicContext, LogicData, Node, NodeExecutionType, NodeState, NodeTrait, NodeTree, PinId, }; use sabi_serialize::typetag; #[derive(Serialize, Deserialize, Copy, Clone)] #[serde(crate = "sabi_serialize")] pub ...
def wait_for_vms(session, vm_refs, power_state, timeout=60): log.debug("wait_for_vms: %s to reach state '%s'" % (vm_refs, power_state)) vms = list(vm_refs) start = time.time() while vms and not should_timeout(start, timeout): vm = vms.pop()...
1895 - 1896 - 1897 - 1898 *click images for full view May May 5, 1895 At the Circus in Hogan's Alley New York World May 19, 1895 A New Restaurant in Casey's Alley New York World July July 7, 1895 The Day After "The Glorious Fourth" Down Hogan's Alley New York World September September 22, 1895 The Great Cup...
Stability of the double gyroid phase to nanoparticle polydispersity in polymer-tethered nanosphere systems Recent simulations predict that aggregating nanospheres functionalized with polymer “tethers” can self-assemble to form the double gyroid (DG) phase seen in block copolymer and surfactant systems. Within the stru...
import { Component, OnInit } from '@angular/core'; import { LocalDataSource } from 'ng2-smart-table'; import { Router } from '@angular/router'; import { DatePipe } from '@angular/common'; import { Http } from '@angular/http'; import { FormBuilder, FormGroup, Validators, FormControl } from '@angular/forms'; import {Deal...
Differential algebraic fast multipole-accelerated boundary element method for nonlinear beam dynamics in arbitrary enclosures A novel method is developed to take into account realistic boundary conditions in intense nonlinear beam dynamics. The algorithm consists of three main ingredients: the boundary element method ...
<reponame>LeonNOV/BiuVideo<filename>app/src/main/java/com/leon/biuvideo/values/DanmakuType.java package com.leon.biuvideo.values; /** * @Author Leon * @Time 2021/4/17 * @Desc 弹幕类型,暂不支持高级弹幕、代码弹幕、BAS弹幕 */ public enum DanmakuType { /** * 普通弹幕 */ NORMAL_DANMAKU(0), /** * 底部弹幕 */ B...
import { Injectable } from '@nestjs/common'; import { BuildMongestService } from '../../src/BuildMongestService'; import { Cat } from './cat.entity'; @Injectable() export class CatsService extends BuildMongestService(Cat) { async findByName(name: string): Promise<Cat | null> { const doc = await this.findOne({ na...
/** * Test case for all {@link ActivitiEvent}s related to historic process instances. * * @author Daisuke Yoshimoto */ public class HistoricProcessInstanceEventsTest extends PluggableActivitiTestCase{ private TestActivitiEntityEventListener listener; /** * Test create, update and delete events of historic p...
/** * Loads the specified XML file and returns it as a string. * * <p>The XML returned is wrapped in the following XML: * <pre>{@code <psml-file name="[filename]" base="[basedir]" status="[status]"> ... </psml-file>}</pre> * * @param psml The PSML file to load * * @return the content of the XML...
package leetcodetests func removePalindromeSub(s string) int { l := len(s) if l == 0 { return 0 } for i := 0; i < l-1; { if s[i] != s[l-1] { return 2 } i++ l-- } return 1 }
/** Tests adding a chain which is called every time new data is added to a data list */ @SuppressWarnings("unchecked") @Test public void testStreamingData() throws InterruptedException, ExecutionException, TimeoutException { StreamProcessor streamProcessor = new StreamProcessor(); Chain<Processo...
#! /usr/bin/env python # -*- coding: utf-8 -*- """ Copyright (c) 2014-2017 <NAME> Released under the MIT license http://opensource.org/licenses/mit-license.php """ import sys #コマンドラインオプション解析用 import argparse #正規表現を使用 import re def chWord(line): ret = ord(line[0])+ord(line[1])*256 return ret d...
from django.shortcuts import render def page_not_found(request): return render(request, '404.html') def page_error(request): return render(request, '500.html') def permission_denied(request): return render(request, '403.html')
// Run gets records by scope ID and name (optional) func (params *GetRecordsParams) Run(ctx sdk.Context, keeper keeper.Keeper) ([]byte, error) { scopeID, err := types.MetadataAddressFromBech32(params.ScopeID) if err != nil { return nil, fmt.Errorf("wasm: invalid scope ID: %w", err) } records, err := keeper.GetRec...
CLOSE USA Today Sports' Tom Pelissero recaps the biggest takeaways from Sunday's games in Week 6 of the NFL. USA TODAY Sports New York Jets wide receiver Brandon Marshall (15) reacts in the fourth quarter against the Arizona Cardinals at University of Phoenix Stadium. (Photo: Mark J. Rebilas, USA TODAY Sports) HOUSTO...
def ex_get_control_access(self, node): res = self.connection.request( '%s/controlAccess' % get_url_path(node.id)) everyone_access_level = None is_shared_elem = res.object.find( fixxpath(res.object, "IsSharedToEveryone")) if is_shared_elem is not None and is_share...
Stuxnet and Aurora utilized design features of the system or controllers to attack physical systems. Stuxnet and Aurora are not traditional network vulnerabilities and cannot be found or mitigated by using traditional IT security techniques. May 19th I attended a lecture by Rebecca Slayton at Stanford’s Center for Int...
// serveBoth binds to the HTTP and HTTPS ports, redirecting all HTTP requests to HTTPS func (s *Server) serveBoth(httpsAddr, httpAddr string) error { baseURI := s.GetConf("BASEURI") if baseURI == "" { return errors.Errorf("%s_BASEURI must be set to redirect from HTTP to HTTPS", s.envPrefix) } var httpsErr, httpEr...
Congenital hereditary lymphedema caused by a mutation that inactivates VEGFR3 tyrosine kinase. Hereditary lymphedema is a chronic swelling of limbs due to dysfunction of lymphatic vessels. An autosomal dominant, congenital form of the disease, also known as "Milroy disease," has been mapped to the telomeric part of ch...
package state import ( "encoding/json" "io/ioutil" "os" "testing" "github.com/stretchr/testify/assert" "github.com/wavesplatform/gowaves/pkg/proto" "github.com/wavesplatform/gowaves/pkg/settings" "github.com/wavesplatform/gowaves/pkg/util/common" ) func testIterImpl(t *testing.T, params StateParams) { dataD...
<filename>src/main/java/com/cy/intercept/InterceptTest.java package com.cy.intercept; public class InterceptTest { }
Radio-Factor Authentication: Identity Management over the 900MHz Band Highly sensitive information systems need a simple and secure method of authentication. To supplement standard login procedures, we can implement multiple variations of two-factor authentication through radio waves, based on specific use cases. This...
class Search_Space: """ The Search_Space consisting of name, the initial state (starting number) and the goal. The stop-variable is for the purpose if the Search_Space reaches the 10, no further successor states are produced. This was necessary because no duplication detection was possible for this ...
/** * * @author Suraj Singh */ public class UnionFind { int objects[]; public UnionFind(int n) { objects = new int[n]; for(int i =0;i<n;i++) objects[i] = i; System.out.println("List of elements "); for(int i =0;i<n;i++) System.out.print(" "+objects[...
/** * Test Class for the "Parse through diagrams project" * * TODO list: * - STAY SCANNERLESS * - PARSE FOREST * - SEPARATE * - FORMATS (MAKE EBNF) * - RECOGNISERS/PARSERS (USE LALR IF GRAMMAR ALLOWS IT, A GENERAL ONE IN OTHER CASES) * - ERROR REPORTERS (IF NOT RECOGNISED) * - GENERATORS * - Tell m...
<reponame>lucaseverini/fuse-alto<gh_stars>0 #include "fileinfo.h" afs_fileinfo::afs_fileinfo() : m_parent(0), m_name(), m_st(), m_leader_page_vda(0), m_deleted(true), m_children() { } afs_fileinfo::afs_fileinfo(afs_fileinfo* parent, std::string name, struct stat st, int vda, bool deleted) : ...
from sys import stdin from collections import defaultdict input = stdin.readline # ~ T = int(input()) T = 1 for t in range(1,T + 1): n,k = map(int,input().split()) _input = [] for i in range(n): _input.append(int(input())) _input.sort() min_ans = 10000000000 for i in range(k - 1,len(_input)): min_ans = min(mi...
def install(self) -> None: self.waitfordevicelocal() netns = str(self.node.pid) self.net_client.device_ns(self.localname, netns) self.node.node_net_client.device_name(self.localname, self.name) self.node.node_net_client.device_up(self.name)
Trump explains why he didn’t cancel NAFTA, and still could if he wants to U.S. President Donald Trump insists he wasn’t bluffing about threatening to pull out of NAFTA this week. He says he was two or three days away from doing it — really. But he also says he had a change of heart during phone calls with the leaders ...
// Get returns a specific OID from the set. The memory will be released when the // set itself is released. func (s *OIDSet) Get(index int) (*OID, error) { if s == nil || index < 0 || index >= int(s.C_gss_OID_set.count) { return nil, fmt.Errorf("index %d out of bounds", index) } oid := s.NewOID() oid.C_gss_OID = ...
<reponame>Orion992-cpu/api_database<filename>src/api2/api2.module.ts import { Module } from '@nestjs/common'; import { DatabaseModule } from 'src/database/database.module'; import { api2Providers } from './api2.providers'; import { Api2Service } from './api2.service'; import { Api2Controller } from './api2.controller';...
/* Copyright (c) 1999 - 2010, Vodafone Group Services Ltd All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of condit...
def _parse_course_data(raw_page: str) -> [{str: str}]: l_headers = d('th').contents() d_headers = {item.lower(): l_headers.index(item) for item in l_headers} course_data = [] for q_list in q_listings.items(): data = {k: q_list('td').eq(v).text() for k, v in d_headers.items()} if 't...
// count number of reference list in this object func (o *Object) countRefList() int { for i, ref := range o.ReferenceList { if isNilReference(ref) { return i } } return len(o.ReferenceList) }
#include<bits/stdc++.h> using namespace std; int main() { int n,i,j,k,l; while(scanf("%d",&n)==1) { char x[n+1],kk; k=0; l=0; scanf("%s",x); kk=x[0]; for(i=1; i<=n; i++) { if(x[i]==kk) { k++; ...
/** * Run Mercurial command. * * @param reposRoot directory of the repository root * @param args {@code hg} command arguments */ static public void runHgCommand(File reposRoot, String ... args) { List<String> cmdargs = new ArrayList<>(); MercurialRepository repo = new MercurialR...
#include<iostream> #include<cstring> #include<cstdio> #include<algorithm> using namespace std; int main(){ char s[100],t[100]; scanf("%s%s",s,t); sort(s,s+strlen(s)); if(strlen(s)!=1) if(s[0]=='0') swap(s[0],s[1]); if(!strcmp(s,t)) cout<<"OK"<<endl; else cout<<"WRONG_ANSWER"<<endl; }
Without a doubt, the Mona Lisa painting by Leonardo Da Vinci is the most well known painting of all time. While I do like the painting and I am a huge fan of Leonardo, I think this Klingon version of the Mona Lisa is more my taste. I think she looks much better with the cranial ridges than she does without them. Now, t...
def _id(self) -> int: return int(self.comment['data-comment-id'])
/** * Copyright (c) 2011, 2012 * Claudio Kopper <claudio.kopper@icecube.wisc.edu> * and the IceCube Collaboration <http://www.icecube.wisc.edu> * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice ...
<filename>LeetCode/C++/1566. Detect Pattern of Length M Repeated K or More Times.cpp //Brute force //Runtime: 4 ms, faster than 50.00% of C++ online submissions for Detect Pattern of Length M Repeated K or More Times. //Memory Usage: 8.8 MB, less than 25.00% of C++ online submissions for Detect Pattern of Length M Repe...
def main(): config = Config.azrael() logging.basicConfig( filename=config.get_log_filename(), level=logging.INFO, format="%(relativeCreated)6d %(process)d %(message)s", ) extractor = Process(target=extract_and_load, args=[config]) transformer = Process(target=transform_and_lo...
import { AutocompleteState } from './autocomplete.state'; import { FilterState } from './filter.state'; import { PlacesState } from './places.state'; export const states = [PlacesState, FilterState, AutocompleteState];
<gh_stars>1-10 /* * Licensed to The Apereo Foundation under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * The Apereo Foundation licenses this file to you under the Apache License, * Version 2.0 (the "Lic...
<filename>api-go/parsers/flipparser/flipParser.go package flipparser import ( "context" "encoding/hex" "encoding/json" "fmt" "math/big" "strings" "time" "github.com/mohae/deepcopy" "../../contracts" "../../db" "../../eth" "../../global" "../../util" "github.com/ethereum/go-ethereum" "github.com/ethere...
<gh_stars>1-10 import { expect } from 'chai' import { repeat } from '../../../Implementation/StringHelpers' import * as Up from '../../../Main' import { insideDocumentAndParagraph } from '../Helpers' // For context, please see: http://stackstatus.net/post/147710624694/outage-postmortem-july-20-2016 const lotsOfSpaces...
/** * An internal method for closing the open window and notifying the * listener, but not sending any events. */ private void closeAndNotify() { amountListener = null; interfaces.remove(InterfaceType.WINDOW); if (listener != null) { listener.interfaceClosed(); listener = null; } }
When a player hitting .172 with a .232 on base percentage is traded for an A-ball pitching prospect, it usually doesn’t generate big headlines. So, you can be forgiven if you haven’t paid a ton of attention to the most recent trade between the Nationals and Cubs, which sent outfielder Scott Hairston to Washington and I...
/** * @brief Game::ai_move: Get a move from the ai, execute it, evaluate board, proceed with ai or human */ void Game::ai_move(){ std::mutex huMu; std::unique_lock<std::mutex> aiLock(huMu); m_aiPlayer.wait(aiLock,[this]{return (m_current_player == 1 && m_p1_is_ai) || (m_current_player == 2 && m_p2_is_ai);...
An ultra-Orthodox Jewish man stabbed participants at a Jerusalem Gay Pride parade, killing a 16-year-old girl and wounding others. (Representational Image) An Israeli court today sentenced an ultra-Orthodox Jewish man to life in prison for killing a 16-year-old girl and wounding others during a stabbing spree at a Jer...
def args_extractor(f, merge_defaults=False): spec = inspect.getfullargspec(f) if spec.defaults: param_defaults = dict(zip(spec.args[-len(spec.defaults):], spec.defaults)) else: param_defaults = {} named_param_defaults = spec.kwonlydefaults or {} default_dicts = {} num_named_args ...
import {ChildProcess} from 'child_process'; import {SpawnOptions2} from "../custom-typings"; export interface ChildProcessSpawn{ spawn(command: string, args?: string[], options?: SpawnOptions2): ChildProcess; }
#include <bits/stdc++.h> typedef long long ll; using namespace std; int main(){ ios::sync_with_stdio(0); cin.tie(0); ll n, m; cin>>n>>m; if(n-(2*m) <= 0){ cout<<0<<" "; }else{ cout<<n-(2*m)<<" "; } ll mx = (n*(n-1))>>1; if(m == 0) cout<<n<<"\n"; else if(m >= mx) ...
def solution(a): c=0 for i in range(len(a)): if a[i]=="X++" or a[i]=="++X": c+=1 elif a[i]=="--X" or a[i]=="X--": c-=1 print(c) l=[] for i in range(int(input())): l.append(input()) solution(l)
<gh_stars>1-10 use super::super::room::Room; use crate::api::effect::Effect; use crate::api::object_id::ObjectId; use crate::api::{array::ScreepsArray, room_position::RoomPosition}; use wasm_bindgen::prelude::*; #[wasm_bindgen] extern "C" { #[wasm_bindgen] pub type Controller; #[wasm_bindgen(method, gett...
Surveying the History of Science Writing survey books is often a thankless task. Most of us don't want to do it, and we find it easy to criticize those who do undertake such work for what they have not included as much as for the sin of approaching the subject in any way different from our own, were we to take on this...
use futures::{Async, Future}; use std::cell::{Ref, RefCell}; use std::fmt; use std::fmt::Debug; use std::mem; use engine::asset::loader; use engine::asset::{AssetError, AssetResult}; impl<T> Debug for ResourceKind<T> where T: Debug + loader::Loadable, { fn fmt(&self, f: &mut fmt::Formatter) -> fm...
<filename>python/desligaLuzQuarto.py import RPi.GPIO as GPIO GPIO.setmode(GPIO.BCM) GPIO.setup(3, GPIO.OUT) GPIO.output(3,1) print('ok')
Enhancing Disease Diagnosis: Biomedical Applications of Surface-Enhanced Raman Scattering Surface-enhanced Raman scattering (SERS) has recently gained increasing attention for the detection of trace quantities of biomolecules due to its excellent molecular specificity, ultrasensitivity, and quantitative multiplex abil...
<reponame>BirWri/CS50BirWri import { Processor } from '@ephox/boulder'; import * as Behaviour from '../../api/behaviour/Behaviour'; import { AlloyComponent } from '../../api/component/ComponentApi'; export interface ReceivingBehaviour extends Behaviour.AlloyBehaviour<ReceivingConfigSpec, ReceivingConfig> { config: ...
Inhibition of ULK1 and Beclin1 by an α-herpesvirus Akt-like Ser/Thr kinase limits autophagy to stimulate virus replication Significance As a catabolic program that maintains homeostasis during adversity, autophagy is an immune defense restricting pathogenesis of viruses, including HSV-1. While HSV-1 ICP34.5 interferes...
/*! * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. */ import { expect } from 'chai'; import { v4 as uuidv4 } from 'uuid'; import { DetachedSequenceId, NodeId, TraitLabel } from '../Identifiers'; import { Change, StableRange, Side, ChangeType, ConstraintEffect, Ed...
L‐6: Late‐News Paper: Development of the Novel Transflective LCD Module Using Super‐Fine‐TFT Technology Adopting the new structure of planarization layer on the rough reflector and designing the new optical compensation with large cell gap margin, we developed the wide viewing angle transflective LCD module with our p...
/** * This call provides the server with the opportunity to close this session and * redirect the PSU to the TPP or close the application window. * <p> * In any case, the session of the user will be closed. * * @param encryptedPaymentId ID of Payment * @param authorisationId ID of ...
<filename>suda/0331/g.cpp #include <bits/stdc++.h> using namespace std; int main() { int n, a, b, c, d, m, mm; long long ans = 0; cin >> n >> a >> b >> c >> d; m = n + min(min(a+b, a+c), min(b+d, c+d)); mm = max(max(a+b, a+c), max(b+d, c+d)); ans += 1LL * max(0, m-mm) * n; cout << ans << endl; return 0; }
<gh_stars>0 export { default as Glyph } from './glyphs/Glyph'; export { default as GlyphDot } from './glyphs/GlyphDot'; export { default as GlyphCross } from './glyphs/GlyphCross'; export { default as GlyphDiamond } from './glyphs/GlyphDiamond'; export { default as GlyphStar } from './glyphs/GlyphStar'; export { defaul...
/** * Class to keep information about the definition of a property: Its name, its type and the type * of its parent in case the property is a nested object. */ @Data @NoArgsConstructor @AllArgsConstructor public class PropertyDefinition { private String name; private Class<?> type; private Class<?> paren...
/** * * * @return list; RFS plus all the transitive subrfs of all rfs in RFS. */ public static final SubLObject rfs_closure(SubLObject rfs) { { SubLObject more_rfs = NIL; SubLObject cdolist_list_var = rfs; SubLObject rf = NIL; for (rf = cdolist_list_var.first(); NIL != cdolist_list_var; cdolist_li...
package edu.kit.scc.dem.wapsrv.model.rdf; import org.apache.commons.rdf.api.BlankNodeOrIRI; import org.apache.commons.rdf.api.Dataset; import org.apache.commons.rdf.api.IRI; import org.apache.commons.rdf.api.Literal; import edu.kit.scc.dem.wapsrv.exceptions.InvalidContainerException; import edu.kit.scc.dem.waps...
def make_list_unique(in_list): vals_dict = {} out_list = [] for val in in_list: if val in vals_dict: continue out_list.append(val) vals_dict[val] = 1 return out_list
import calendar import json import os import sys from datetime import datetime, timedelta times = [[10, 23], [10, 23], [10, 23], [10, 23], [10, 23], [9, 22], [9, 22], [9, 22]] def dummydays(Stadt): if not os.path.exists(f'days/{Stadt}'): os.mkdir(f'days/{Stadt}') for my_date in range(0, 7): d...
SSUES A SSOCIATED WITH B IG DATA IN C LOUD C OMPUTING In this paper, we discuss security issues for cloud computing, Big data, Map Reduce and Hadoop environment. The main focus is on security issues in cloud computing that are associated with big data. Big data applications are a great benefit to organizations, busine...
<filename>src/human_lambdas/user_handler/tests/test_forgotten_password.py import logging from django.test.utils import override_settings from django.utils import timezone from rest_framework import status from rest_framework.test import APITestCase from human_lambdas.user_handler.models import ForgottenPassword, User...
import pytest from discovery import api def list_services_response(): return { "redis": { "ID": "redis", "Service": "redis", "Tags": [], "TaggedAddresses": { "lan": {"address": "127.0.0.1", "port": 8000}, "wan": {"address": "...
<reponame>mnimidamon/mnimidamon-backend package testsuites import ( "errors" "mnimidamonbackend/domain/model" "mnimidamonbackend/domain/repository" "testing" ) type ComputerRepositoryTester struct { Repo repository.ComputerRepository URepo repository.UserRepository Owner *model.User Computer *model.Compu...
Classifying “Micro” Routine Activities of Street-level Drug Transactions Objectives: Routine activities theory attempts to link the intersection of individuals’ everyday routine activities to crime events at particular places. This study examines crime events not just as the product of intersecting macroroutine activi...
/** * Regression description: * </p> * MasterPage from library can't be restored to modify * </p> * Test description: * <p> * Extends a lib.masterpage without modification, can't restore. If any property * change, restore is enabled * </p> */ public class Regression_142432 extends BaseTestCase { private Str...
Don Payne, whose screenwriting credits include 2011’s Thor, Fantastic Four: Rise Of The Silver Surfer and My Super Ex-Girlfriend, and who was an award-winning writer/producer on The Simpsons, has died. He had been battling cancer. Payne started out in TV, hooking up with writing partner John Frink before graduating wit...