content
stringlengths
10
4.9M
Treatment of leber congenital amaurosis due to RPE65 mutations by ocular subretinal injection of adeno-associated virus gene vector: short-term results of a phase I trial. Leber congenital amaurosis (LCA) is a group of autosomal recessive blinding retinal diseases that are incurable. One molecular form is caused by mu...
import { Injectable } from '@angular/core'; import { DefaultBinaryConverter, DefaultStringConverter } from '@diplomatiq/convertibles'; import { RegisterUserV1RequestPasswordStretchingAlgorithmEnum } from '../../openapi/api'; import { ApiService } from './api.service'; import { CryptoService } from './crypto.service'; i...
/** * Add a new event to the google calendar and redirect to events page. * * @param calendarEvent * @return */ @PostMapping("/events") public String addNewEvent(@ModelAttribute CalendarEvent calendarEvent, Model model) { try { logger.info("Adding a new calendar event"); calendarService.createNewEve...
<filename>src/webparts/vikingTrainingSimulator/models/IUnit.ts export interface IUnit { id: string; firstName: string; lastName: string; xp: number; level: number; rank: string; dead: boolean; }
import * as mongoose from 'mongoose'; import { IS3File, IS3FilePublic, S3FileSchema } from '../../types/scheme'; import { DaoIds, DaoModelNames } from '../../types/constants'; import { IUserDocument } from '../../users/schemas/user.schema'; import { ITokenCollectionDocument } from '../../tokenCollections/schemas/token-...
def _construct_partial_parser(self): if hasattr(self._commands.get(self._command), Application.OPTIONS_ATTR): return self.command_parser(self._command) else: return self._main_parser().values(copy.deepcopy(self._option_values))
Influence of the Level of Renal Insufficiency on Endoscopic Changes in the Upper Gastrointestinal Tract Aim:Lesions of the gastrointestinal tract are frequent finding in uremic patients but their actual nature is not completely clear. The aim of this study was to detect any correlation between endoscopic lesions of pa...
// Copyright Materialize, Inc. and contributors. All rights reserved. // // Use of this software is governed by the Business Source License // included in the LICENSE file. // // As of the Change Date specified in that file, in accordance with // the Business Source License, use of this software will be governed // by ...
IRST: a key system in modern warfare A naval infra red search and track (IRST) system is a passive surveillance device capable of detecting and tracking air and surface threats in the region where electromagnetic sensors are less efficient, typically within a few degrees around the horizon. The evolution in anti ship ...
<gh_stars>0 package main import ( "fmt" "os" "github.com/gobwas/glob" ) type GlobFilter struct { include []glob.Glob exclude []glob.Glob } func NewGlobFilter(includePatterns, excludePatterns []string) (GlobFilter, error) { var globFilter GlobFilter for _, p := range includePatterns { g, err := glob.Compile...
Jesus’ apostles and other followers are clad in chic gray street wear and tumble and slide across the stage with impressive athleticism in the show’s opening minutes, presumably in flight from their black-leather-clad oppressors. The daily countdown to the Crucifixion is displayed on an electronic ticker of the kind th...
class YeelightScanner: """Scan for Yeelight devices.""" _scanner = None @classmethod @callback def async_get(cls, hass: HomeAssistant): """Get scanner instance.""" if cls._scanner is None: cls._scanner = cls(hass) return cls._scanner def __init__(self, hass...
<filename>src/Middleware/Drapo/js/DrapoDrag.d.ts declare class DrapoDrag { private _code; private _action; private _contextItem; private _tags; private _notify; private _onBefore; private _onAfter; private _dataKey; private _sector; private _custom; get Code(): string; se...
use indoc::indoc; use migration_core::json_rpc::types::*; use migration_engine_tests::test_api::*; use std::fmt::Write as _; // We need to test this specifically for mysql, because foreign keys are indexes, and they are // inferred as both foreign key and index by the sql-schema-describer. We do not want to // create/...
A comparative study of gland cells implicated in the nerve dependence of salamander limb regeneration Limb regeneration in salamanders proceeds by formation of the blastema, a mound of proliferating mesenchymal cells surrounded by a wound epithelium. Regeneration by the blastema depends on the presence of regenerating...
import React, { FC } from "react"; import { DOCS_CODELINE_CLASS } from "../utils"; import DocsTitle from "./DocsTitle"; interface ILocalizableProperty { name: string; type: string; } export interface IDocsLocale { localizableProps?: ILocalizableProperty[]; } const DocsLocale: FC<IDocsLocale> = ({ localizable...
/** * Test geometry wrapper holder. * * @throws Exception the exception */ @Test void testGeometryWrapperHolder() throws Exception { ObjectMapper objectMapper = new ObjectMapper(); Geometry geometry = GeometryUtils.createPoint(1., 2.); GeometryWrapper wrapper = new GeometryWrapper(geometry); ...
<filename>sharedcpp/audio_effect/libaudio_effect/audio_effect_processor/post/audio_effect_post_processor.h #ifndef AUDIOEFFECT_POST_PROCESSOR_H_ #define AUDIOEFFECT_POST_PROCESSOR_H_ #include "../../audio_effect/audio_effect.h" #include "../../audio_effect_filter/audio_effect_filter_chain.h" #include "../audio_effect_...
/** * Returns {@code true} if this exception indicates that guest language application was * cancelled during its execution. * * @deprecated Use {@link InteropLibrary#getExceptionType(Object)}. * @since 20.3 */ @Deprecated @Override public final boolean isCancelled() { retu...
import * as cdk from '@aws-cdk/core'; import { IResolvable, Duration, Size } from '@aws-cdk/core'; import { Resource } from './resource'; import * as lambda from '@aws-cdk/aws-lambda'; import * as gg from '@aws-cdk/aws-greengrass'; export declare namespace Functions { interface RunAs { /** * The li...
What are the roles and functions of the Attorney General? The Attorney General of Trinidad and Tobago has a dual role. He is a member of Government with two separate constitutional roles: a governmental role and a role as the guardian of the public interest. In his governmental role, he acts as a member of Government ...
Living Paradoxes: On Agamben, Taylor, and Human Subjectivity Over the last few decades, Giorgio Agamben and Charles Taylor have produced important and influential genealogical works on the philosophical and political conceptions of secularity—from Taylor's 900-page study of modern identity and secularity in A Secular ...
/** * Copyright (c) 2016-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #ifndef FASTTEXT_VECTOR_H #define FASTTEXT_VECTOR_H #include <cstdint> #include <ostream> #include "real.h" n...
""" oas3.objects.components.example ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ """ from marshmallow import fields from oas3.base import BaseObject, BaseSchema class Example(BaseObject): """ .. note: https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#exampleObject """ class Sche...
/* * Open the specified slave side of the pty, * making sure that we have a clean tty. */ static int cleanopen(char *lyne) { register int t; chown(lyne, 0, 0); chmod(lyne, 0600); # if !defined(CRAY) && (BSD > 43) revoke(lyne); # endif t = open(lyne, O_RDWR|O_NOCTTY); if (t < 0) return(-1); # ...
/** * The method will get triggered from Rule Engine with following parameters * * @param ruleParam * ************** Following are the Rule Parameters********* <br><br> * * ruleKey : check-for-unused-ebs-rule <br><br> * * threadsafe : if true , rule will be executed on multiple threads <br...
/** * Used to index incoming Tokens * * @since 0.9.2 * @author zzz */ class TokenKey extends SHA1Hash { public TokenKey(NID nID, InfoHash ih) { super(DataHelper.xor(nID.getData(), ih.getData())); } }
Spread the love On his first day as a senior at Hoover High School, Keyshawn found himself in a struggle with a Fresno Police officer who put his hands around the student’s neck, slammed him to the ground, and then employed a controversial chokehold — similar to that which killed Eric Garner — while his friend Johnny ...
/** * Checks for CopyTo actions and correctly sets the path for targetField by setting the indexes specified in each action */ private void applyCopyToActions(List<Field> sourceFields, Mapping mapping) { for (Field sourceField : sourceFields) { if (sourceField instanceof FieldGroup) { ...
Evaluation of Medicinal Effects of Isoxazole Ring Isosteres on Zonisamide for Autism Treatment by Binding to Potassium Voltage-Gated Channel Subfamily D Member 2 (Kv 4.2) Received: 19 October 2019 Revised: 13 December 2019 Accepted: 25 December 2019 Available online: 28 December 2019 K E Y W O R D S The present resear...
async def aggregate_weights(self, updates): update = await self.federated_averaging(updates) updated_weights = self.algorithm.update_weights(update) self.algorithm.load_weights(updated_weights)
/** * This class is generated by jOOQ. */ @Generated(value = { "http://www.jooq.org", "jOOQ version:3.10.6"}, comments = "This class is generated by jOOQ") @SuppressWarnings({ "all", "unchecked", "rawtypes"}) public class Tue4Championship extends TableImpl<ChampionshipRecord> { private static final long ...
A smart switchable module for the detection of multiple ions via turn-on dual-optical readout and their cell imaging studies. A module switchable as a function of multi-stimuli response has been designed. The module displays sequential logic gate-based detection of multiple ions (Fe(3+), Hg(2+), CN(-) and S(2-)) at pp...
/* * app-data-container.cpp * Copyright (C) 2010-2018 Belledonne Communications SARL * * 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, or (at your optio...
. One hundred and eighty eight outpatients with community acquired pneumonia have been treated by spiramycin in general practice. Community acquired pneumonia was defined by the association of fever > or = 38 degrees C, respiratory symptoms as cough, sputum production, dyspnea or thoracic pain, and pulmonary opacity o...
This section is intended for developers only (or the confident, adventurous user). Before reading you may want to read what other developers are doing at the XDA developer forum. Find below the Linux kernel source code packages. Package 1: Source code for the Linux kernel used on the Fairphone http://storage.googlea...
pub struct Player { pub player_id: i32, pub player_control_net_id: u32, pub player_physics_net_id: u32, pub player_transform_net_id: u32, }
def indices_from_symbol(self, symbol: str) -> Tuple[int, ...]: return tuple((i for i, specie in enumerate(self.species) if specie.symbol == symbol))
#include <iostream> #include <iomanip> #include <stdio.h> #include <cmath> #include <fstream> #include "../include/residuals.hpp" #include "../include/parameters.hpp" using namespace std; void getResiduals(int nb, int *nx, int *ny, int gp, int it, double t_total, int iter, double &resU, double &resUNorm, double &res...
// ConsumeByteSlice consumes a single string of raw binary data from the buffer. // A string is a uint32 length, followed by that number of raw bytes. // If the buffer does not have enough data, or defines a length larger than available, it will return ErrShortPacket. // // The returned slice aliases the buffer content...
<reponame>bangbang00/tidb // Copyright 2021 PingCAP, 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 app...
<reponame>malyvsen/snippeteer import functools import ast from .nodes import node_children def descend(ast_node, handlers, combiner=list.__add__, initial=[]): if isinstance(ast_node, str): raise TypeError("descend should only be used for parsed code, not strings") for node_type, handler in handlers.i...
/* If IN is a string that is >= MIN_COMPRESS_SIZE and the COMPRESSION_LEVEL is not SVN_DELTA_COMPRESSION_LEVEL_NONE, zlib compress it and places the result in OUT, with an integer prepended specifying the original size. If IN is < MIN_COMPRESS_SIZE, or if the compressed version of IN was no smaller than the...
/** * Called to get a user's existing payment method, if any. If your user already has an existing * payment method, you may not need to show Drop-In. * * Note: a client token must be used and will only return a payment method if it contains a * customer id. * * @param activity the cu...
<gh_stars>0 // svg/diving-scuba-tank-multiple.svg import { createSvgIcon } from './createSvgIcon'; export const SvgDivingScubaTankMultiple = createSvgIcon( `<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> <svg xmlns="http...
/** * Protect html input from Server-side Request Forgery (SSRF) attacks * Detects SSRF (Server-side request forgery) attacks and unsafe URL attacks from HTML text input, where attackers can attempt to access unsafe local or network paths in the server environment by injecting them into HTML. * @param va...
One of the worst-kept secrets of the technology industry is that the next big product category will be smartwatches, wearable computers that sources have all but confirmed will be released soon by Apple, Microsoft, Google and Samsung. But no matter how useful, how beautiful and how advanced these wristwatch-like device...
<reponame>srmagura/iti-react import moment from 'moment-timezone' /** * A configurable function for formatting a moment. * * @param mo any moment object * @param options * - `onlyShowDateIfNotToday`: when true, does not display the day if `mo` is today * - `convertToLocal`: if `mo` should be converted to local t...
/** * Opens the specified <tt>ChatPanel</tt> and optinally brings it to the * front. * * @param chatPanel the <tt>ChatPanel</tt> to be opened * @param setSelected <tt>true</tt> if <tt>chatPanel</tt> (and respectively * this <tt>ChatContainer</tt>) should be brought to the front; otherwise,...
<filename>packages/viewer/src/stores/url-parameters.ts /* * Copyright 2015 Trim-marks Inc. * Copyright 2019 Vivliostyle Foundation * * This file is part of Vivliostyle UI. * * Vivliostyle UI is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as p...
# 1283F - DIY Garland if __name__ == "__main__": n = int(input()) inp = input().rstrip().split(" ") assert len(inp) == n-1 for a in range(len(inp)): inp[a] = int(inp[a]) marked = {} edges = [[inp[i], None] for i in range(n-1)] next_largest_unseen = n # mark the root node: ...
// (2) Set setDisplayHomeAsUpEnabled to true on the support ActionBar @Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); this.setContentView(R.layout.activity_settings); this.getSupportActionBar().setDisplayHomeAsUpEnabled(true); ...
<reponame>vain0x/text-position<filename>src/position/composite_position.rs // LICENSE: CC0-1.0 use crate::{TextPosition, Utf16Position, Utf8Index, Utf8Position}; use std::{ cmp::Ordering, fmt::{self, Display, Formatter}, hash::{Hash, Hasher}, ops::{Add, AddAssign}, }; /// Text position represented by ...
def analyze(self, item): source = item.path if item.format not in ALLOWED_FORMATS: if config['echonest']['convert']: source = self.convert(item) if not source: log.debug(u'echonest: failed to convert file') return ...
package net.ninjacat.cql.shell; /** * Thrown when internal shell failure happened, usually invalid command syntax */ public class ShellException extends RuntimeException { public ShellException(final String message) { super(message); } public ShellException(final String message, final Throwable ...
<reponame>n01e0/ARIA<filename>tests/test_instruction.rs extern crate aria; #[cfg(test)] mod instruction { use aria::emulator:: { *, instruction::* }; #[test] fn instructions_name() { assert_eq!(instructions_with_name(0x01).1, "add_rm32_r32"); assert_eq!(instructions...
#include<iostream> using namespace std; int main() { long long n, a; cin>>n; n++; if(n==1) {cout<<0;return 0;} if(n%2) a=n; else a = n/2; cout<<a; }
Researchers in the US have made a graphene loudspeaker that has an excellent frequency response across the entire audio frequency range (20 Hz–20 kHz). While the speaker has no specific design, it is already as good as, or even better than, certain commercial speakers and earphones in terms of both frequency response a...
/** * {@link StackedAreaRenderer} that delegates tooltip generation to * a separate object. * * @author Ulli Hafner */ @edu.umd.cs.findbugs.annotations.SuppressWarnings("Eq") public class ToolTipAreaRenderer extends StackedAreaRenderer2 { /** Unique identifier of this class. */ private static final...
def db_create(self, name, type=DB_TYPE_DOCUMENT, storage=STORAGE_TYPE_PLOCAL): self.get_message("DbCreateMessage") \ .prepare((name, type, storage)).send().fetch_response() return None
def register_task_service(app: Flask) -> None: if os.environ.get("WERKZEUG_RUN_MAIN") != 'true': celery_app = create_celery_app(app) return None
async def visibility_service_handler(service): visible = service.data.get(ATTR_VISIBLE) tasks = [] for group in component.async_extract_from_service(service, expand_group=False): group.visible = visible tasks.appen...
/** * Builds instances of {@link RyaDetails}. */ @DefaultAnnotation(NonNull.class) public static class Builder { // General metadata about the instance. private String instanceName; private String version; private final List<String> users = new ArrayList<>(); // S...
James Myburgh on what the Trayvon Martin case says about the US media and judicial systems Introduction Last month's not guilty verdict in the trial of George Zimmerman on second degree murder and manslaughter charges for the killing of the black 17-year-old Trayvon Martin, in Sanford, Florida, on February 26 last ye...
def optimize(self, log, T, lambd, step, verbose=False): transitions_cnt = len([1 for i in log.flat_log for j in log.flat_log[i]]) \ + len(log.flat_log.keys()) ADS = ADS_matrix(log, T.T) N = len(log.activities) M = len([1 for a in...
/** * Test for single BridgeWriter used across two regions:If notify by * subscription is false , both the regions should receive invalidates for the * updates on server in their respective regions * */ public void testInvalidatesPropagateOnTwoRegionsHavingCommonBridgeWriter() throws Exception { ...
/** * @author Joe Walker [joe at getahead dot ltd dot uk] */ public class LoginRequiredException extends SecurityException { /** * @param s The exception message */ public LoginRequiredException(String s) { super(s); } }
/////////////////////////////// Test the end of HashTable Output ///////////////////////// @Test public void testHashReaderEmpty() throws IOException { assertEquals(Arrays.asList(), SourceTestUtils.readFromSource(hashTableSource, null)); }
<filename>src/record_stack.h // record_stack.h - Stack class deals with individual elements while // RecordStack class handles variable size records. Hence, // RecordStack is derived from Stack. // // ##Copyright## // // Copyright 2000-2016 <NAME> (<EMAIL>) // // Licensed under the Apache License, Version ...
// NewCreateOrderResponseBody builds the HTTP response body from the result of // the "create_order" endpoint of the "order" service. func NewCreateOrderResponseBody(res *order.CreateOrderResponse) *CreateOrderResponseBody { body := &CreateOrderResponseBody{} if res.Order != nil { body.Order = marshalOrderOrderToOr...
use std::env; use term::terminfo::TermInfo; #[derive(PartialEq, Clone, Copy)] pub enum Color { Reset, Red, Green, Gray, Yellow, Orange, Blue, Purple, Cyan, RedBG, YellowBG, OrangeBG, NonText, Invert, } impl Color { pub fn has_bg_color(self) -> bool { ...
import * as utils from "./utils"; function transformRequest(data) { if ( utils.isArrayBuffer(data) || utils.isBuffer(data) || utils.isStream(data) || utils.isBlob(data) ) { return data; } // Object and Array: returns a deep copy if (utils.isObjectOrArray(data)) { return JSON.parse(JS...
// angular import { NgModule } from '@angular/core'; import { CommonModule as CommonAngularModule } from '@angular/common'; import { FormsModule } from '@angular/forms'; // app import { MaterialModule } from '~/app/framework/material'; // module import { LoadingOverlayComponent } from './components/loading-overlay/lo...
package uk.gov.hmcts.probate.service.template.printservice; import org.junit.Before; import org.junit.Test; import org.mockito.InjectMocks; import org.mockito.Mock; import org.springframework.test.util.ReflectionTestUtils; import uk.gov.hmcts.probate.insights.AppInsights; import uk.gov.hmcts.probate.model.ApplicationT...
/** * @author mzawirsk * @param <V> */ public class AddOnlySetCRDT<V> extends BaseCRDT<AddOnlySetCRDT<V>> { private Set<V> elements; // Kryo public AddOnlySetCRDT() { } public AddOnlySetCRDT(CRDTIdentifier id) { super(id); elements = new HashSet<V>(); } private AddOnlyS...
<filename>tools/onni/Interpreter.h //===- Interpreter.h ------------------------------------------------------===// // // The ONNC Project // // See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// #ifndef ONNC_INTERPRETER_INTERPRET...
Image caption Bleddyn King filmed himself stamping upon David Evans's face An 18-year-old man who stabbed a 64-year-old widower 72 times in his bungalow after meeting him on a website has been jailed for life for murder. After Bleddyn King was told he will serve at least 28 years, his family and police warned of the ...
/** * Translate a region by a specified offset. * * @param rgn The region to translate. * @param x The X offset. * @param y The Y offset. */ void GdOffsetRegion(MWCLIPREGION *rgn, MWCOORD x, MWCOORD y) { int nbox = rgn->numRects; MWRECT *pbox = rgn->rects; if(nbox && (x || y)) { while(nbox--) { pbox->left...
/** * This is the implementation of the "rl" command. * * @author austin.brehob */ public class RLCommand extends PicocliSoarCommand { public static class Provider implements SoarCommandProvider { @Override public void registerCommands(SoarCommandInterpreter interp, Adaptable context) { interp.addCo...
/** * Initialize a specific device. * * The parent should be initialized first to avoid having an ordering problem. * This is done by calling the parent's init() method before its childrens' * init() methods. * * @param dev The device to be initialized. */ static void init_dev(struct device *dev) { if (!dev->e...
<filename>src/main/java/org/apache/commons/text/similarity/CosineSimilarity.java /* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses th...
def _get_gene_indices(self): end_indices = list(accumulate(self.lengths)) start_indices = [0] + end_indices[: -1] return list(zip(start_indices, end_indices))
import { Injectable } from '@angular/core'; import { HttpClient } from '@angular/common/http'; import { Observable } from 'rxjs'; import { IUserLikeData } from './like-button.interface'; export interface ILike { entityId: string; entityType: string; } export interface IAddLikeRequest extends ILike { } export inte...
Millennials now make up the largest portion of the workforce of any generation. With approximately 73 million members, the Millennial generation – defined roughly as those born between 1980 and 1996 – has surpassed the Baby Boomers as the largest age-determined demographic in America. What’s more, according to an exte...
#include <iostream> #include <vector> using namespace std; vector<vector<char> > grid; vector<vector<int> > vi; void move_robot(const char& o, int& x, int& y, int& obj); void change_direction(const char & d, char& o); int main() { int n, m, s, x, y, obj; char o, d; while(cin >> n >> m >> s && n && m &...
<gh_stars>0 from tkinter import * import string root=Tk() root.geometry("500x700") topFrame=Frame(root) topFrame.pack() KeyBox=Entry(topFrame,width=40) KeyBox.pack() MessageBox=Text(topFrame, height=15, width=50) MessageBox.pack() ResultBox=Text(topFrame, height=15, width=50) ResultBox.pack() key='' def encryption(...
/// Deserializes the given type from binary NBT data. /// /// The NBT data must start with a compound tag and represent the type `T` correctly, else the /// deserializer will return with an error. pub fn deserialize<T: DeserializeOwned>( bytes: &[u8], flavor: Flavor, ) -> Result<(T, String), NbtIoError> { d...
/** * Writes this class into a <b>XML</b> string that is ready * to be published or sent to a queue or topic. * @return A String of <b>XML</b> with * variables as <b>XML</b> elements. * @throws JAXBException Thrown when there was an error in * converting the {@link Event} class into <b>XML...
import * as base62 from './utils/base62'; import type * as G from './game'; const reverseMapping = <T>(map: T[]) => { const ret: any = {}; for (let index = 0; index < map.length; index++) { ret[map[index]] = index; } return ret as T extends number ? { [index: number]: number } : { [index: string]: number }...
/** * Object containing the elements of an HTTP request to the Talk2M/M2Web APIs. * * @author HMS Networks, MU Americas Solution Center */ public class TMHttpRequest { /** HTTP request URL */ private final String url; /** HTTP request headers */ private final Map<String, String> headers; /** HTTP reque...
<reponame>uk-gov-mirror/hmcts.cmc-citizen-frontend import { InterestBreakdown } from 'claims/models/interestBreakdown' import { InterestDate } from 'claims/models/interestDate' import { Moment } from 'moment' import { MomentFactory } from 'shared/momentFactory' export class Interest { constructor (public type?: str...
// NOTE: Assumes that Xattribute is present func StripXattrAndGetBody(bodyWithXattr []byte) ([]byte, error) { xattrSize, err := GetXattrSize(bodyWithXattr) if err != nil { return nil, err } return bodyWithXattr[xattrSize+4:], nil }
N = int(input()) X = list(map(int, input().split())) def calc_power(p): P = list(map(lambda x: (x-p)**2, X)) return sum(P) power = [] _min = min(X) _max = max(X) if _min != _max: for p in range(_min, _max): power.append(calc_power(p)) print(min(power)) else: power = calc_power(_min) print(power)
''' weapon component (for items) base weapons ''' import pygame import random import assets import item pygame.init() #with open('docs/weapon table.csv', newline='') as csvfile: # weapon_reader = csv.reader(csvfile, delimiter=' ', quotechar='|') # for row in weapon_reader: # print(', '.join(row)) class...
Shape and fatigue life prediction of chip resistor solder joints In order to increase the fatigue life of chip resistor, it is necessary to optimize the shape of solder joints. Shape and fatigue life of chip resistor solder joint were predicted by using finite element analysis methods. Through changing the solder volu...
/** * Returns a new {@code CallOptions} with the given call credentials. */ @ExperimentalApi("https//github.com/grpc/grpc-java/issues/1914") public CallOptions withCallCredentials(@Nullable CallCredentials credentials) { CallOptions newOptions = new CallOptions(this); newOptions.credentials = credential...
<gh_stars>0 import { Refine, Resource } from "@pankod/refine"; import "@pankod/refine/dist/styles.min.css"; import { authProvider, dataProvider, useI18nProvider } from "providers"; import { AppFooter, AppHeader, AppSider, AppTitle } from "components"; import { Login } from "pages/login"; import { PostList, PostCreat...
class Solution: def maxProfit(self, prices: List[int]) -> int: if not prices: return 0 dp = [0]*len(prices) dp2 = [0]*len(prices) for i in range(len(prices)-2,-1,-1): for j in range(len(prices)-1, i, -1): dp[i] = max(dp[i], prices[j]-pric...
def _pid_time(self, pid, time): if not self.want_pid_time: return '' try: i = self._thread_id() % 99999 return '{:%b %d %H:%M:%S} {:5d} {:5d} '.format(time, pid, i) except Exception: self.exception_count += 1 self._err('error formatting...
//============================================================================== // // Copyright (c) 2013- // Authors: // * Ernst Moritz Hahn <emhahn@cs.ox.ac.uk> (University of Oxford) // //------------------------------------------------------------------------------ // // This file is part of PRISM. // // PRISM ...