content stringlengths 10 4.9M |
|---|
Implications of Implant Framework Misfit: An Animal Study on an Ovine Model.
Although clinicians routinely aim to provide prosthesis with accurate fit on implants, a degree of prosthesis misfit is inevitable. This exploratory animal study evaluated the effects of framework vertical misfit and the timing of implant loa... |
Piously posturing as the savior of Medicare, President Obama lashed out at the House Republicans for embracing the budget proposed by Budget Committee Chairman Paul Ryan Paul Davis RyanBrexit and exit: A transatlantic comparison Five takeaways from McCabe’s allegations against Trump The Hill's 12:30 Report: Sanders set... |
// Copyright © 2022, Cisco Systems Inc.
// Use of this source code is governed by an MIT-style license that can be
// found in the LICENSE file or at https://opensource.org/licenses/MIT.
package skel
import (
"github.com/iancoleman/strcase"
"path"
"strings"
)
const (
inflectionAppTitle = "App Title"
i... |
package org.ggp.base.player.gamer.statemachine.sample;
import org.ggp.base.util.statemachine.MachineState;
import org.ggp.base.util.statemachine.Move;
import org.ggp.base.util.statemachine.Role;
import org.ggp.base.util.statemachine.StateMachine;
import org.ggp.base.util.statemachine.exceptions.GoalDefinitionException... |
<filename>src/pkg/fetch/fetch_test.go
package fetch
import (
"gospec"
// . "gospec"
)
func FetchSpec(c gospec.Context) {
// TODO: Figure out what to put here
}
|
def add_constraint(self, type, column, check_clause=None):
if type == 'CHECK' and check_clause and 'NOT NULL' in check_clause:
sql = self.commands.add_check_not_null(self.name, check_clause.split(' ')[0])
elif type == 'CHECK':
if check_clause and 'VALUE' in check_clause and colum... |
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<ll,ll> PII;
const ll mx = 3e5+10;
map<ll,ll>mp;
void solve()
{
ll n ;
cin>>n;
ll Ans = 0 ;
mp.clear();
ll Ar[n+5],Mn,Mx;
for(int i=0; i<n; i++) cin>>Ar[i];
for(int i=0; i<n;... |
<filename>packages/engine/src/renderer/materials/constants/VoronoiClouds.mat.ts
import { ShaderMaterial } from 'three'
import { Entity } from '@xrengine/engine/src/ecs/classes/Entity'
import { defineAction } from '@xrengine/hyperflux'
import { MaterialParms } from '../MaterialParms'
export const vertexShader = `
var... |
<filename>rest/asio_peer_connection.cc
// This file is part of MLDB. Copyright 2015 mldb.ai inc. All rights reserved.
/* asio_peer_connection.cc -*- C++ -*-
<NAME>, 2 June 2014
Copyright (c) 2014 mldb.ai inc. All rights reserved.
*/
#include "asio_peer_connection.h"
#in... |
Tim Sherwood is about to have his photograph taken when he spies an offensive image on the wall behind. He winces. ‘Oh, get that down, I can’t have that in the background,’ Sherwood insists. The insulting item is swiftly removed from his office. ‘It’s not like it’s a trophy,’ he says. ‘You can’t have an open top parade... |
package org.ml4j.tensor;
import org.apache.commons.lang3.tuple.ImmutablePair;
import org.apache.commons.lang3.tuple.Pair;
import org.jvmpy.symbolictensors.MultiplicationRules;
import org.jvmpy.symbolictensors.Size;
import org.ml4j.autograd.AutogradValue;
import org.ml4j.autograd.Value;
import org.ml4j.autograd.arithme... |
<gh_stars>0
#!/usr/bin/env python
#
# VMAccess extension
#
# Copyright 2014 Microsoft 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/LICENS... |
Induction with Lopinavir-Based Treatment Followed by Switch to Nevirapine-Based Regimen versus Non-Nucleoside Reverse Transcriptase Inhibitors-Based Treatment for First Line Antiretroviral Therapy in HIV Infected Children Three Years and Older
Background The World Health Organization recommends non-nucleoside reverse ... |
<filename>deep_utils/dummy_objects/augmentation/__init__.py
from .cutmix import *
|
import s from 'underscore.string';
import * as colors from 'colorette';
// force enable colors on dev env
if (process.env.NODE_ENV !== 'production') {
colors.options.enabled = true;
}
type LogColors = 'white' | 'blue' | 'green' | 'magenta' | 'red';
export function showBox(title: string, message: string, color?: Log... |
from railrl.data_management.replay_buffer import ReplayBuffer
class ProxyBuffer(ReplayBuffer):
def __init__(self, replay_buffer):
self._wrapped_buffer = replay_buffer
def add_sample(self, *args, **kwargs):
self._wrapped_buffer.add_sample(*args, **kwargs)
def terminate_episode(self, *args,... |
<gh_stars>1-10
//
// Generated by class-dump 3.5 (64 bit).
//
// class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by <NAME>.
//
#import "WebviewJSEventHandlerBase.h"
#import "IWCShareCardPkgExt.h"
#import "WCNewShareCardConsumedViewDelegate.h"
@class NSString, WCNewShareCardConsumedView;
@interfa... |
/**
* Simple tests for the hamster API.
* @author Steffen Becker
*
*/
@TestInstance(Lifecycle.PER_CLASS)
public class TerritoryInitTests {
/**
* Size used in this test for both, colums and rows.
*/
private static final int TERRITORY_SIZE = 4;
/**
* Example territory.
*/
privat... |
#include<stdio.h>
#include<vector>
#include<algorithm>
#define SIZE 131072
using namespace std;
typedef long long ll;
ll mod=1000000007;
ll powsum[SIZE+1][6];
void calcpow()
{
ll now[6];
fill(now,now+6,0);
for(int i=1;i<=SIZE;i++)
{
ll pl=1;
powsum[i][0]=i;
for(int j=1;j<=5;j++)
{
pl=pl... |
a = input()
i = int(a)
n = 0
lst2 = []
while n<i :
n+=1
b = input()
lst = b.split(" ")
for j in b :
lst2+=j
x = lst2[-1]
if x == "o" :
print("FILIPINO")
if x == "u" :
print("JAPANESE")
if x == "a" :
print("KOREAN") |
// Copyright 2020 <NAME>
// 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, sof... |
/**
* Runtime: 0 ms, faster than 100.00% of Java online submissions for Reverse Linked List.
*
* Memory Usage: 38 MB, less than 6.48% of Java online submissions for Reverse Linked List.
*/
public ListNode reverseList(ListNode head) {
if (Objects.isNull(head)) {
return null;
... |
Dream Big by /u/youngluck
“Think left and think right
Think low and think high.
Oh, the thinks you can think up if only you try!”
One thing that never fails to surprise us is the limitless potential of the reddit community. Like this example of art imitating life. This is why we wanted to highlight the creative sid... |
def time_differences() -> typing.List[float]:
ties = create_time_ties()
ret = [tie[0].time - tie[1].time for tie in ties]
return ret |
package com.miotech.kun.workflow.executor;
import com.google.common.collect.Iterables;
import com.google.common.eventbus.EventBus;
import com.google.common.eventbus.Subscribe;
import com.miotech.kun.commons.db.DatabaseOperator;
import com.miotech.kun.commons.pubsub.event.Event;
import com.miotech.kun.commons.pubsub.pu... |
Sparts Campaigning.
Spartacist League Forms Syrian Battalion in Support of ISIS
RAQQAH, SYRIA – Marking the first time since the Bolivian National Revolution that Trotskyists have rallied in armed defence of their values, members of the Spartacist League of Britain have travelled to “the Caliphate” in order to defend... |
About
I had a dream in 2007 during a nap in Nebraska. I saw the USSR's footage they commanded be shown everytime they were talked of on tv. Before 1983.
I will redo this footage with the kickstarter money.
THE VIDEO - I saw two women. The petite one was sitting and wore a grey wool sweater. It had a black oval on th... |
<gh_stars>0
package com.example.songthrush;
import retrofit2.Retrofit;
import retrofit2.converter.gson.GsonConverterFactory;
public class RetrofitX {
private Retrofit retrofit;
private APIInterface apiInterface;
private String BASE_URL = "https://50857eed2072.ngrok.io";
public APIInterface init() {
... |
// This is the source file for the standalone command line interpreter. It is
// not needed if you are embedding Wren in an application.
static void failIf(bool condition, int exitCode, const char* format, ...)
{
if (!condition) return;
va_list args;
va_start(args, format);
vfprintf(stderr, format, args);
va_... |
/**
* Label provider for {@link ApplicationLeaf} instances.
*
* @author Alexander Wert
*
*/
public class ApplicationLabelProvider extends StyledCellIndexLabelProvider {
/**
* Empty.
*/
private static final StyledString EMPTY = new StyledString();
/**
* {@inheritDoc}
*/
@Override
protected StyledStrin... |
Manganese Dioxide (α-MnO₂) and Graphene Oxide (GO) Nanocomposites: An Efficient Promotor for the Oxidative Deprotection of Trimethylsilyl, Tetrahydropyranyl and Methoxymethyl Ethers.
Manganese dioxide (α-MnO₂) and graphene oxide (GO nanocomposites were prepared and successfully characterized using Fourier-transform in... |
import { getStaticGetter, transpileModule } from './transpile';
describe('parse props', () => {
it('prop optional', () => {
const t = transpileModule(`
@Component({tag: 'cmp-a'})
export class CmpA {
@Prop() val?: string;
}
`);
expect(getStaticGetter(t.outputText, 'properties')).to... |
For as much as Kevin Love has publicly resisted the discussion of free agency this season, it has been on his mind. He has never been completely comfortable in Cleveland, with his role, nor his connection to those around him. Throughout the year, league sources say, one destination grew in possibility as his exit strat... |
ESPN’s Dave Schoenfield, custodian of the SweetSpot blog, recently pointed out a remarkable statistic: in exactly one fewer plate appearance, David Ortiz struck out 62 fewer times in 2011 than 2010. Incredibly, there is very little precedent for such a decline.
Besides Ortiz, only one other player in baseball history ... |
int main(void) {
int a, b, c, d, e;
a = nondet();
b = nondet();
c = nondet();
d = nondet();
e = nondet();
while (a < 0 || b < 0 || c < d || e < 0) {
if (a < 0) {
a = -a;
b -= a;
e -= a;
} else if (b < 0) {
b = -b;
a -= b;
c -= b;
} else if (c < 0) {
c = -c;
b -... |
import * as F from "../src/bacon"
import { run, Sync } from "./_base"
describe("EventStream.delay", () => {
it("results in EventStream", () => {
expect(F.once(1).delay(1)).toBeInstanceOf(F.EventStream)
})
it("delays all events the given amount milliseconds", () => {
const recording = run((record, _, now... |
/*
* Wait for capture to stop and all in-flight buffers to be finished with by
* the video hardware. This must be called under &priv->lock
*
*/
static void rcar_vin_wait_stop_streaming(struct rcar_vin_priv *priv)
{
while (priv->state != STOPPED) {
if (priv->state == RUNNING)
rcar_vin_request_capture_stop(priv... |
<filename>service/secretsmanager/api_op_ListSecretVersionIds.go
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package secretsmanager
import (
"context"
"github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/aws-sdk-go-v2/internal/awsutil"
)
type ListSecretVersionIdsInput struct {
_ struct{} `... |
.
Many mechanisms of different nature-hemodynamic, metabolic and reflex-may cause syncope. We have studied all patients referred for syncope to the Divisions of Cardiology and Neurology of our Hospital, focusing five end-points: standardize a diagnostic protocol; evaluate the diagnostic value of the different tools in... |
Suspect Shot, Taken Into Custody Following Barricade Situation At FOX 45
A young man in an animal costume and surgical mask who walked into Baltimore TV station WBFF FOX 45 Thursday claiming to have a bomb was shot and wounded by police, who determined that his alleged explosive consisted of aluminum-wrapped chocolate... |
import { Injectable } from '@nestjs/common';
import { Response } from 'express';
import {
blockchain,
pubsub,
transactionMiner,
transactionPool,
wallet,
} from '../coin';
import Wallet from '../coin/wallet';
export type mineBlock = {
data: any;
};
export type transact = {
amount: number;
recipient: s... |
<gh_stars>0
package com.rutar.apfloat_point;
import org.apfloat.*;
import static org.apfloat.Apfloat.ZERO;
// ............................................................................
public class ApfloatPoint {
/**
* Значення координати X
*/
public Apfloat x = null;
/**
* Значення координати Y
*/
public A... |
//InitEchoWebApp initialize the echo web framework for serving a web application
func InitEchoWebApp(appEnv *env.AppEnv) *echo.Echo {
e := echo.New()
e.HideBanner = true
if config.IsServerDebug() {
e.Debug = true
}
e.Renderer = template.NewRenderer(appEnv.TStore)
e.HTTPErrorHandler = common.LoggingDefaultHTTPEr... |
t = int(input())
for _ in range(t):
n = int(input())
bracket_arr = list(input())
#print(bracket_arr)
balance_arr = [False]*n
balancing_dict = {}#unbalanced_val:index
curr = 0
for i in range(n):
if bracket_arr[i] == "(":
curr += 1
balancing_dict[curr... |
/*************************************************************
*
* Copyright (c) 2021-2021 The MathJax Consortium
*
* 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://w... |
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import matplotlib.pyplot as plt
import sys
import tensorflow as tf
import numpy as np
# Fix Python 2.x.
try: input = raw_input
except NameError: pass
from utils.tfrecordfeatures import *
from preprocess impor... |
Computational Fluid Dynamic Analysis of Notched Canard Arrangement in Cruise Missiles at Supersonic Flows
This paper tells about the CFD analysis of 2D Canard arrangement in supersonic cruise missiles. High heat dissipation rate causes the Canards to reduce its primary work of providing rotational stability to missile... |
def handle_input():
userChoice = input()
if userChoice == "1":
clear()
menus.select_paths_menu()
clear()
menus.specify_client_matter_menu()
print(msg)
get_json_and_pdfs()
elif userChoice == "2":
clear()
... |
///<reference path='..\..\..\src\compiler\core\environment.ts'/>
///<reference path='..\..\..\src\compiler\io.ts'/>
///<reference path='..\..\..\src\compiler\tsc.ts'/>
module TypeScript.WebTsc {
declare var RealActiveXObject: { new (s: string): any };
function getBrowserIO(env: IEnvironment, fso:... |
Mechanisms underlying T-lymphocyte activation: mitogen initiates and IL-2 amplifies the expression of transferrin receptors via intracellular iron level.
Peripheral blood mononuclear cells (PBM) pulsed with lectin (PHA or Con A for 0.25-3 hr) show a low expression of interleukin-2 and transferrin receptors (IL-2Rs, Tf... |
Ocular perforation and phthisis bulbi secondary to strabismus surgery.
We present our ocular clinicopathologic findings of a child who suffered bilateral perforation of the globe during medial rectus recession bilaterally for congenital esotropia. The right eye progressed to a painful phthisis bulbi and subsequently r... |
<gh_stars>10-100
package org.openstack.android.summit.common;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.openstack.android.summit.common.utils.HtmlTextParser;
@RunWith(AndroidJUnit4.class)
public class UtilTest {
... |
<gh_stars>0
/*
* 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 this file
* to you under the Apache License, Version 2.0 (the
* "Lic... |
// Conf returns a copy of the Config used by the proxy.
// Any modifications will not affect the original Config.
func Conf() Config {
configMu.RLock()
defer configMu.RUnlock()
return config
} |
def start_job(job, hal_id, refGenome, opts):
hal = hal_id
newick_string = get_hal_tree(hal)
job.fileStore.logToMaster("Newick string: %s" % (newick_string))
tree = newick.loads(newick_string)[0]
rerooted = reroot_tree(tree, refGenome)
job.fileStore.logToMaster("Rerooted newick string: %s" % (new... |
"Instead of agitating for reform to outlaw certain tactics, why can't employers just say no?" He made the speech at the Gallipoli Club, but those words will be ringing in his ears as he delves into his own difficult and drawn out campaign. Private sector bosses sit on the sidelines egging him but on with grins that say... |
def make_region_beds(normal_bams, seq_method, fasta, baits, annotation,
exclude_access, antitarget_avg_size, target_avg_size):
if seq_method != 'amplicon':
fa_fname = maybe_gunzip(download_link(fasta), "ref", "fa")
access_bed = safe_fname("access", "bed")
cmd = ['access', fa_fname, '... |
/**
* Stock chart class.<br/>
<b>Note:</b> Use {@link anychart#stock} method to get an instance of this class.
*/
public class ChartsStock extends Chart {
protected ChartsStock(String name) {
super(name);
js.setLength(0);
js.append(String.format(Locale.US, "chart = %s();", name));
... |
def errBarPlot(
dataFrame,
meanKey="mean",
sDevKey="sDev",
xKey="nBinSize",
rowKey="observable",
colKey="nX",
colorKey="nSamples",
errBarKwargs=None,
shareY=False,
):
for key in [rowKey, colKey, xKey, meanKey, sDevKey, colorKey]:
if not key in dataFrame.columns:
raise Key... |
//! Benchmarking setup for pallet-faucet
use super::*;
use crate::Pallet as Faucet;
use frame_benchmarking::{Box, benchmarks, impl_benchmark_test_suite, whitelisted_caller, account};
use frame_system::RawOrigin;
use scale_info::prelude::format;
use scale_info::prelude::string::String;
const UNIT: u128 = 1_000_000_000... |
package com.arif.hibernet.demo;
import org.hibernate.cfg.Configuration;
import org.hibernate.Session;
import org.hibernate.SessionFactory;
import com.arif.hibernet.entity.Instructor;
import com.arif.hibernet.entity.InstructorDetails;
import com.arif.hibernet.entity.Student;
public class DeleteDemo {
public static ... |
/**
* @file algol.ts
*
* Constant determining the algorithm
*/
/**
* Number of sentences which are not used
*/
export const Cutoff_Sentences = 120;
export const RANKING_EPSILON = 0.000000001;
/*
try 4, 1.2
instead of 8, 1.5
*/
export const calcDist = {
lengthDelta1 : 15,
}
/**
* levenshtein distanc... |
New Mix: Real Estate, Actress, Wax Fang, More
toggle caption Courtesy of the artists
On any given day, All Songs Considered host Bob Boilen bombards co-host Robin Hilton with a running list of new ideas for the show. Most of them never see the light of day. But on this week's program Bob explains his latest idea, one... |
/// Implementation of the Opus range encoder.
pub mod opus {
/// A c2rust-ified version of the Opus range decoder.
mod imported_decode;
mod imported_encode;
mod decode;
mod encode;
pub use self::decode::Reader;
pub use self::encode::Writer;
} |
// Copyright 2014 Google Inc. All Rights Reserved.
//
// 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... |
/**
* Information about adverse reactions and/or propensity to adverse reaction of
* the patient (including allergies and intolerances), and any relevant reaction
* details.
*
*/
public class AdverseReactionImpl implements AdverseReaction {
private List<? extends Manifestation> mfsts;
private Coded agent;
pri... |
// TODO(todd): this is an obvious spot to add codegen - there's a ton of branching
// and such around the comparisons. A simple experiment indicated there's some
// 2x to be gained.
Status MergeIterator::MaterializeBlock(RowBlock *dst) {
dst->selection_vector()->SetAllTrue();
for (size_t dst_row_idx = 0; dst_row_id... |
package notification
import (
"fmt"
"io/ioutil"
"time"
"github.com/authelia/authelia/internal/configuration/schema"
)
// FileNotifier a notifier to send emails to SMTP servers.
type FileNotifier struct {
path string
}
// NewFileNotifier create an FileNotifier writing the notification into a file.
func NewFileN... |
<reponame>darmstrong1/filecopier<filename>filecopier-gui/src/main/java/net/sf/fc/gui/factory/MVCFactory.java<gh_stars>0
package net.sf.fc.gui.factory;
import javax.swing.undo.UndoManager;
import javax.xml.bind.JAXBException;
import net.sf.fc.cfg.AppFactory;
import net.sf.fc.cfg.DirPath;
import net.sf.fc.gui.c.... |
n = int(raw_input())
string = list(raw_input().lower())
check = len(list(set(string)))
if check < 26:
print "NO"
else:
print "YES"
|
blade55555 Profile Blog Joined March 2009 United States 17354 Posts Last Edited: 2012-08-21 07:22:45 #1 and the timings I use are probably very similar).
This guide will have plenty of replays (5 to start out with more being added within the week) and will show many different scenarios, roach/ling/bane aggression, roa... |
def output_story(self):
is_succeeded = True
options = self._options
filename = self._filename
pri_filter = options.pri
formattype = options.format
is_debug = options.debug
is_comment = options.comment
story_converted = story_tag_replaced(
... |
GUY Sebastian has come a long way since winning Australian Idol in 2003.
Then, he was the country's most talked-about virgin and a devout Christian. Now, Sebastian is a happily married dad and yesterday revealed his religious beliefs had also changed.
A song on Sebastian's new Armageddon album, called Get Along, high... |
// See documentation for RollCLImpl.
func (r *TestRollCLImpl) RetryCQ(ctx context.Context) error {
r.isDryRun = false
r.normalResult = ""
r.attempt++
return nil
} |
/**
* Simple RN native module to modify some functionality of Mapbox to better support Forest Watcher requirements
*/
public class FWMapboxPackage implements ReactPackage
{
@Override
public @NotNull List<NativeModule> createNativeModules(@NotNull ReactApplicationContext reactContext)
{
return Arrays.<NativeModul... |
Study of the Mechanical Properties of a CMDB Propellant Over a Wide Range of Strain Rates Using a Group Interaction Model
Composite modified double base (CMDB) propellants are heterogeneous propellants in which properties are significantly improved by adding solid particles into the polymer matrix. A molecular group i... |
<gh_stars>1-10
// expose all existing models
export * from './user.model';
export * from './info-graph.model';
export * from './info-graph-category.model';
export * from './info-graph-meta.model';
export * from './node.model';
export * from './edge.model';
|
export interface IBook {
id: number
name: string
price: number
}
|
/**
* This is basic FTS configuration. It acts as PoC for how Lucene is working and shows several concepts and
* pitfalls that should be taken into account.
*
* User: denispavlov
* Date: 31/03/2017
* Time: 17:34
*/
public class FTSLuceneImplTest {
private LuceneIndexProviderImpl provider;
private Generi... |
// Copyright (C) 2014 National ICT Australia (NICTA)
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
// ----------------------------------------------------------... |
/* helper to write a pmic register */
static int qpnp_wled_write_reg(struct qpnp_wled *wled, u16 addr, u8 data)
{
int rc;
mutex_lock(&wled->bus_lock);
rc = regmap_write(wled->regmap, addr, data);
if (rc < 0) {
dev_err(&wled->pdev->dev, "Error writing address: %x(%d)\n",
addr, rc);
goto out;
}
dev_dbg(&wled... |
def simpleMerge(a, b):
total = len(a) + len(b)
j, k = 0, 0
c = list()
for i in range(total):
if (k == len(b) or (j < len(a) and a[j] < b[k])):
c.append(a[j])
j += 1
else:
c.append(b[k])
k += 1
return(c)
aSize, bSize = map(int, inpu... |
/**
* Unchecked instantiation of a class
* @param clazz the class to instantiate
* @return the instantiated object
*/
public static <T> T newInstance(Class<T> clazz) {
try {
return clazz.newInstance();
} catch (InstantiationException | IllegalAccessException e) {
throw new RuntimeException(e);
}
} |
/// Swap a value at given index with the top value
pub fn swap(&mut self, no_from_top: usize) -> Result<(), ExitError> {
if self.data.len() <= no_from_top {
return Err(ExitError::StackUnderflow);
}
let len = self.data.len();
let a = len - no_from_top - 1;
let b = len - 1;
self.data.swap(a, b);
Ok(())
... |
/*
* Copyright 2015-2017 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 ap... |
import React, { useState, useEffect } from 'react';
import { apiClient } from '../../../api/Client';
import { trackGoal } from '../../../utils';
import { RepositoryResponse, RepositoriesResponse } from '../../../api/openapi';
import { ListItem, ListItemIcon, ListItemText, IconButton, ListItemSecondaryAction, List, Typo... |
#include <stdio.h>
#include <stdint.h>
#include <bits/stdc++.h>
#include <iostream>
#include <vector>
#include <string.h>
using namespace std;
typedef long long int LL;
int main()
{
LL num,t,p,q,count=0;
LL a,b;
LL c=0;
cin>>num>>a>>b;
// LL arr[num];
LL i=0;
for(i=0;i<num;i++)
{
... |
async def webserver(loop, view, addr, port, path='/', method='POST'):
app = web.Application(loop=loop)
app.router.add_route(method, path, view)
srv = await loop.create_server(app.make_handler(),
addr, port)
return srv |
Protesters outside an Apple store in Boston last month. (Steven Senne/AP)
The feud between Apple and the Justice Department took another turn Tuesday, as the technology giant used a new court filing to say that the Founding Fathers “would be appalled” with the government’s stance.
Apple argued that if the government ... |
/** TODO: refactor this out into a data access layer */
public void populate(Result result) {
NavigableMap<byte[], byte[]> infoValues = result.getFamilyMap(Constants.INFO_FAM_BYTES);
this.jobId = ByteUtil.getValueAsString(JobHistoryKeys.KEYS_TO_BYTES
.get(JobHistoryKeys.JOBID), infoValues);
this.u... |
/**
* Returns object with the given {@code key} from the storage or {@code null} if object does not exist.
* <br>
* TODO: Consider returning {@code Optional<V>} instead.
* @param key Key of the object. Must not be {@code null}.
* @return See description
* @throws NullPointerException if th... |
// Finish signals that the word model is finished and ready to be used.
func (m *WordModel) Finish() {
m.finder = m.builder.Finish()
log.Printf("Model has %v words, %v edges", m.finder.NumAdded(), m.finder.NumEdges())
var sum float64
for _, freq := range m.frequencies {
sum += float64(freq)
}
log.Printf("freq s... |
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
module Api.Response where
import Data.Aeson
import GHC.Generics
import qualified Data.Text as T
import Control.Applicative
data Answer
= Answer { ts :: T.Text,
u... |
A Brief History of Chinese DotA, Part 1 February 17th, 2013 22:11 GMT Text by Kupon3ss Graphics by shiroiusagi
A Brief History of Chinese DotA: Part 1 Table of Contents
Victory Above All Else
An Introduction to Chinese DotA
The Rise of a Great Power
Chinese DotA Emerges
Dominion over Heaven and Earth
The Romance... |
export { default as breakpoints } from "./breakpoints";
export { default as getImageId } from "./getImageId";
export { default as getVideoId } from "./getVideoId";
export { default as getVideoImage } from "./getVideoImage";
export { default as isVideoValid } from "./isVideoValid";
export { default as isTicketValid... |
import React from 'react';
import { expect } from 'chai';
import { FormattedMessage, IntlShape } from 'react-intl';
import sinon from 'sinon';
import behandlingType from 'kodeverk/behandlingType';
import behandlingStatus from 'kodeverk/behandlingStatus';
import fagsakYtelseType from 'kodeverk/fagsakYtelseType';
import... |
package auth
import "gopkg.in/square/go-jose.v2/jwt"
type Claims struct {
jwt.Claims
Scope string `json:"scope,omitempty"`
PreferredUsername string `json:"preferred_username,omitempty"`
RealmAccess realmAccess `json:"realm_access,omitempty"`
ResourceAccess resourceAccess ... |
// Find the n adjacent digits that have the greatest product.
pub mod p008 {
use crate::useful_func::digits::num_to_digits;
use crate::useful_func::other_func::get_substring;
use std::cmp::max;
pub fn v1(win_size: usize, num_string: &str) -> u32 {
let mut max_prod: u32 = 0;
let n = num_... |
// EduPeriod.java
/*
* Copyright (c) 2008, Gennady & <NAME>
* 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, ... |
<filename>pages/custom/[slug].tsx<gh_stars>1-10
import { GetStaticProps, GetStaticPaths } from 'next';
import { ParsedUrlQuery } from 'querystring';
import Link from 'next/link';
const contentPath = {
path1: 'content of path1 to illustrate the mapping',
path2: 'another content here for the second path2',
};
const... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.