content stringlengths 10 4.9M |
|---|
import {browser, by, element} from 'protractor';
import {getElementFinder, load} from '../protractor';
import {MainComponentHarness} from './harnesses/main-component-harness';
describe('Protractor Helper Test', () => {
let harness: MainComponentHarness;
beforeEach(async () => {
await browser.get('/component-... |
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import time
from odoo import api, fields, models
class HolidaysSummaryEmployee(models.TransientModel):
_name = 'hr.holidays.summary.employee'
_description = 'HR Time Off Summary Report By Employee'
date_f... |
<filename>znet/evloop/evloop.h
#ifndef BTPD_EVLOOP_H
#define BTPD_EVLOOP_H
#include <sys/time.h>
#include <stdint.h>
#include "timeheap.h"
#define EV_READ 1//0x01
#define EV_WRITE 2//0x02
#define EV_TIMEOUT 4//0x04
typedef void (*evloop_cb_t)(int fd, short type, void *arg);
#if defined(EVLOOP_EPOLL) || define... |
def delete_locks_on_depth_commit(sbox):
sbox.build()
wc_dir = sbox.wc_dir
svntest.actions.run_and_verify_svn(None, [], 'lock',
'-m', 'All files',
*(sbox.ospath(x)
for x in ['iota', 'A/B/E/alpha',
... |
module Common.Error where
type ErrorMessage = String
type FormError = String
type FieldError = (String, String)
data AppError
= ValidationError ErrorMessage
[FormError]
[FieldError]
| NotExistsError ErrorMessage
| DatabaseError ErrorMessage
| MigratorError ErrorMessag... |
// MoveToNextAttribute moves the YangNodeNavigator to the next attribute on current node.
func (x *YangNodeNavigator) MoveToNextAttribute() bool {
if x.curr.IsList() && x.curr.Key != "" {
keys := strings.Split(x.curr.Key, " ")
x.curr = x.curr.Dir[keys[0]]
return true
} else if x.curr.Parent != nil && x.curr.Par... |
/**
* Oracle 12c and later PL/SQL.
*/
public class Oracle extends Generic {
private final OracleIdentityColumnDefinition generatedColumn;
private final UpsertMergeDefinition upsertMergeDefinition;
public Oracle() {
generatedColumn = new OracleIdentityColumnDefinition();
upsertMergeDefini... |
# Convenience functions to perform Image Magicks
from subprocess import run, PIPE
from glob import glob
from neuralstyle.utils import filename
def convert(origin, dest):
"""Transforms the format of an image in a file, by creating a new file with the new format"""
if ismultilayer(origin):
raise ValueEr... |
/// Gather understanding of our cargo-task location.
/// Translate it all into environment variables that CTEnv can read.
pub fn load() -> Result<(), &'static str> {
clear();
// cargo binary path
let cargo_path = std::env::var_os("CARGO")
.map(PathBuf::from)
.unwrap_or_else(|| PathBuf::from(... |
def ansi(self, i):
return f"\033[1;30;{40+i}m {str(i)} \033[0m" |
def add_properties_to_class(cls, class_id: int, property_list: [str]) -> int:
assert type(class_id) == int, "Argument `class_id` in add_properties_to_class() must be an integer"
assert type(property_list) == list, "Argument `property_list` in add_properties_to_class() must be a list"
assert cls.... |
// Run runs a series of commands on remote host and waits for exit
func (client *SSHClient) Run(cmds []string) error {
log := cfg.Config.Log
for _, cmd := range cmds {
if err := func(cmd string) error {
session, err := client.NewSession()
if err != nil {
return err
}
defer session.Close()
modes :... |
<filename>micro-infra-spring-base/src/main/java/com/ofg/infrastructure/metrics/config/EnableMetrics.java
package com.ofg.infrastructure.metrics.config;
import org.springframework.context.annotation.Import;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.Rete... |
def calc_bolumetric_luminosity(self):
spectrum = self.spectrum()
return np.trapz(spectrum[:, 1], spectrum[:, 0]) |
pub mod runtime;
pub mod server;
use deno_core::v8;
use tokio::time::{Duration, Instant};
use runtime::Runtime;
use deno_core::{
anyhow::Error,
v8::{Global, Value},
JsRuntime,
};
async fn execute_with_timeout(
rt: &mut JsRuntime,
code: &str,
timeout: Duration,
) -> Result<Global<Value>, Erro... |
def _load_from_rec(self, rec):
for (k, v) in rec.items():
if k == 'notes':
self._other = {
'notes': v
}
elif k == 'summary':
self._summary = json.loads(v) if v else None
else:
self.__dict__['_'+k] = v |
I have a lot of fond memories of Chicago.
Longtime readers may remember that I was there back in 2012, where I went to C2E2 with my partner at the time, hung out with a few of my friends (some from Chicago, others from NYC), and tried a LOT of fantastic beers. 3 Floyd’s Arctic Panzer Wolf, the many amazing selections ... |
/**
* A placeholder class to call native functions.
**/
@JNINamespace("shell")
public class ShellService extends Service {
private static final String TAG = "ShellService";
// Name of the intent extra used to hold the application url to start.
public static final String APPLICATION_URL_EXTRA = "applicati... |
Stella Adongo with her twins
A 20-year-old mother who gave birth to twins five months ago is still being held hostage at Bishop Ceaser Asili Memorial hospital in Luweero town over unpaid medical bills.
The mother, identified as Stella Adongo, a resident of Kizito zone in Luweero district, was admitted at the facility... |
// ProductHandler will receive request and return response
func (h *Handler) ProductHandler(w http.ResponseWriter, r *http.Request) {
var (
resp *response.Response
result interface{}
metadata interface{}
err error
errRes response.Error
)
resp = &response.Response{}
defer resp.RenderJSON(w, r)... |
Optical coherence tomography as a biomarker in multiple sclerosis.
INTRODUCTION
Multiple sclerosis (MS) is a disease of the central nervous system (CNS) that leads to axonal dysfunction and neuronal loss and often presents optic neuritis (ON). Decreased thickness of the retinal nerve fiber layer (RNFL) is a classic fi... |
// registerClusterHandlers registers the cluster message handlers that are handled by the server.
func (s *Server) registerClusterHandlers() {
s.Cluster.RegisterClusterMessageHandler(model.CLUSTER_EVENT_PUBLISH, s.clusterPublishHandler)
s.Cluster.RegisterClusterMessageHandler(model.CLUSTER_EVENT_UPDATE_STATUS, s.clus... |
<filename>app/core/config.py
# Standard Library Imports
# None
# 3rd-Party Imports
# None
# App-Local Imports
# None
from pydantic import BaseSettings
# READ: https://fastapi.tiangolo.com/advanced/settings/#settings-and-testing
# import os
# print(os.environ.get('TESTING'))
class Settings(BaseSettings):
API_V... |
/**
* Class for storing a project schema
* @author CWOLF
*/
public class ProjectSchema implements Serializable
{
/** Stores the schema id */
private Integer id;
/** Stores the schema name */
private String name;
/** Stores the schema model */
private String model;
/** Constructs a default ... |
interface IMap<K, V> {
clear(): void;
delete(key: K): boolean;
forEach(callbackfn: (value: V, key: K, map: IMap<K, V>) => void, thisArg?: any): void;
get(key: K): V | undefined;
has(key: K): boolean;
set(key: K, value: V): boolean;
readonly size: number;
}
class ValuePair<K, V> {
key: K... |
In the middle of one of the busiest and fastest growing cities, lies Shanghai’s former French Concession. With tree-lined avenues, small cafes, boutique shops, parks, and quiet residential streets, the area is markedly different from many of the surrounding areas of immense residential towers and offices. Not only is t... |
/**
* Invoked when an exception occured. This method just log a warning.
*/
static void unexpectedException(final Class<?> classe,
final String method,
final SQLException exception)
{
Logging.unexpectedException(cl... |
/**
* Cascading sub-assembly that generates TF*IDF values for every unique term.
*
* The <termsPipe> passed to the constructor must contain tuples with the following fields:
*
* - a "doc" field, which is a string with a document identifier.
* - a "term" field, which is a string.
* - a "termcount" field, whi... |
// GetCompoundedIndex returns the compounded index over the maximal period of existence of @symbol
func (db *DB) GetCompoundedIndex(symbol string, date time.Time, daysPerYear int, rounding int) (*InterestRate, error) {
dateInit, err := db.GetFirstDate(symbol)
if err != nil {
return &InterestRate{}, err
}
return d... |
/*
New simpler method: just standard Gaussian Elimination
*/
void matrixElimStd(int** matrix, unsigned trans, unsigned places)
{
#ifdef DEBUG_ELIMINATION
cout << "Starting Gaussian Elimination on matrix:\n";
dumpMatrix(matrix, places, trans, places);
#endif
unsigned col;
unsigned row = 0;
for (col=0; col<... |
module gui{
requires javafx.graphics;
requires javafx.controls;
exports com.packt;
} |
At least two people have reportedly turned down the chance to become Donald Trump’s White House communications director - a position that has been vacant since he was sworn in as President last month.
The White House's Chief of Staff, Reince Priebus, has been tasked with filling the vacancy.
But his approaches to com... |
<filename>network/src/modules/operation.py<gh_stars>100-1000
import chainer
import numpy as np
import env
from env import xp
def mul(mask, compressed):
if env.AUDIO_CHANNELS == 1:
# simple mul
return mask * compressed
elif env.AUDIO_CHANNELS == 2:
# complex_mul
real = mask[:,... |
n=int(input())
s=input()
t=True
for i in range(1,n-1):
if (s[i]=="1" and s[i-1]=="1") or (s[i]=="1" and s[i+1]=="1"):
t=False
break
if (s[i]=="0" and s[i-1]=="0" and s[i+1]=="0") or (s[i]=="0" and s[i-1]=="0" and i-2==-1) or(s[i]=="0" and s[i+1]=="0" and i+2==n):
t=False
t1=Tr... |
<reponame>Lyken17/tinyml
import argparse
import copy
import os
import time
import warnings
from typing import Dict, Optional
import numpy as np
import torch
import torch.nn as nn
import yaml
from torchpack import distributed as dist
from tqdm import tqdm
from models.netaug import reset_bn
from setup import augemnt_mo... |
/**
* Created by rakhmetov on 01.06.17.
*/
public class IdGenerator {
//ATTENTION!!! DON"T CHANGE THAT OR EVERYTHING WILL CRASH!!! When try to id generate
private final static long CREATION_YEAR = 2017;
private final static ThreadLocalRandom random = ThreadLocalRandom.current();
/**
* generate ... |
from datetime import date, datetime, timedelta
from typing import Tuple
def date_to_datetime(
dt: date, hour: int = 0, minute: int = 0, second: int = 0
) -> datetime:
return datetime(dt.year, dt.month, dt.day, hour, minute, second)
# returns start date, end date, string representing time range
def use_time... |
//RegisterLogger registers a logger. If the tag parameter is not given, then logger becomes the global default.
func RegisterLogger(logger Logger, tag ...string) {
if tag == nil {
globalLogger = logger
return
}
if loggers == nil {
loggers = make(map[string]Logger)
}
loggers[tag[0]] = logger
} |
<gh_stars>0
import React, { FC } from "react";
import AppAppBar from "./index";
import { MuiThemeProvider } from "@material-ui/core";
import theme from "../../libs/theme";
// eslint-disable-next-line import/no-default-export
export default { title: "AppBar", component: AppAppBar };
export const Theme1: FC = () => (
... |
//function to return matrix from just the 'name' and root
matrix *findMatrix(char name, matrix *ptr) {
while (ptr->name != name && ptr != NULL) {
ptr = ptr->next;
};
return ptr;
} |
def make_batch(self, batch: Sequence[torch.Tensor]) -> torch.Tensor:
return pad_sequence(
batch,
padding_value=self.embedding.padding_idx,
batch_first=True,
) |
<reponame>Mootss/Koro
import discord, time
from discord.ext import commands
from datetime import datetime, timedelta
# some variables
KoroVersion = "Koro-V0.2.0"
KoroIcon = "https://cdn.discordapp.com/avatars/784747681632485400/e0fc7f04a257b63cd9f745f6831203d2.png?size=1024"
AdminInvite = "https://discord.co... |
Natural attenuation of chloroethenes: identification of sequential reductive/oxidative biodegradation by microcosm studies.
A different lines of evidence approach for investigation of biodegradation processes at a chloroethene contaminated site showed well corresponding results of pollutant profiles, redox zonation, c... |
/**
* @author Tadaya Tsuyukubo
*/
@RunWith(Parameterized.class)
public class ClientStoreMethodInterceptorWithExceptionTest {
private Exception original;
private Exception expected;
@Parameters
public static Collection<Object[]> data() {
EDAMUserException edamUserException = new EDAMUserException();
EDAMSyst... |
from ..date_handler import DatesHandler as datesHand
class Create:
""" Class to create diff links for TOMO data """
def __init__(self) -> None:
self.link_base = "https://markets.newyorkfed.org/read?productCode=70&startDt=2000-07-01"
self.today = datesHand().today().date()
self.link_ba... |
<reponame>deatil/lakego-admin
package permission
import (
"github.com/casbin/casbin/v2"
"github.com/deatil/lakego-admin/lakego/permission/interfaces"
)
/**
* 权限
*
* rbac_model.conf 中 matchers 内置可用函数:
* keyMatch [匹配*号], keyMatch2 [匹配 :file]
* regexMatch [正则匹配], ipMatch [IP地址或者CIDR匹配]
*
* @create 2021-9... |
/**
* Holds a read/takeByIds operation's exception result.
*
* @author idan
* @since 7.1.1
*/
@com.gigaspaces.api.InternalApi
public class ReadTakeByIdResult implements Externalizable {
private static final long serialVersionUID = 1L;
protected Object _id;
protected Object _readObject;
protected T... |
A rare photo of Lenin's body taken in 1991. Image Credit: Getty Images
Keeping a 92-year-old corpse looking fresh isn’t cheap. Former Soviet Union leader Vladimir Lenin has been on display to the public in Moscow since shortly after his death in 1924, but you can’t just leave an embalmed body out for decades and expec... |
//
// Destory
// Called to kill and cleanup the dialog
//
//
BOOL
CAutoReconnectDlg::Destroy()
{
DC_BEGIN_FN("Destroy");
ARC_DBG_SETINFO(ARCDLG_DEBUG_DESTROYCALLED);
if (!DestroyWindow(_hwnd)) {
TRC_ERR((TB,_T("DestroyWindow failed: 0x%x"),
GetLastError()));
}
else {
... |
A 2-year-old male grizzly bear threatening a North Idaho family was shot and ultimately killed on Tuesday. Now Barbara Casey, who shot the bear, is worried she’s in trouble for killing a federally protected species.
“I don’t want to go to prison for saving my family and my animals,” Casey said.
Lucas Swanson, the Ida... |
/**
* Exits the entire trigger, preventing all upcoming statements to not get triggered.
* There's also a possibility to only exit certain sections. If more sections are exited
* than the total amount of nested sections, the trigger will stop.
* Note that stopping loops also stops while-loops.
*
* @name Exit
* @... |
<gh_stars>1-10
#include "IRMA.hpp"
void IRMA::CalibCaptureBoard(){
if(sysmomentum._frames_board_captured.size() < sysboard.ncaptures){
std::vector<cv::Point3f> objectCorners;
std::vector<cv::Point2f> imageCorners;
std::vector<cv::Mat> currentcaptures;
for(int i=0; i< _cameras.size(); i++){
... |
def validate_settings(instance, **kwargs):
try:
instance.full_clean()
except ValidationError, error:
if hasattr(error, 'message_dict') and \
error.message_dict.keys() == ['id']:
return
raise |
package com.nepxion.skeleton.framework.aop;
/**
* <p>Title: Nepxion Skeleton</p>
* <p>Description: Nepxion Skeleton For Freemarker</p>
* <p>Copyright: Copyright (c) 2017-2050</p>
* <p>Company: Nepxion</p>
* @author <NAME>
* @version 1.0
*/
import java.util.HashMap;
import java.util.Map;
import org.springframe... |
// eventListenerReady returns a function that checks if all conditions on the
// specified EventListener are true and that the deployment available condition
// is within this set
func eventListenerReady(t *testing.T, c *clients, namespace, name string) wait.ConditionFunc {
return func() (bool, error) {
el, err := c... |
<reponame>alexrios/utevo-lux
package simple
const DummyHandler = `package api
import (
domain "{{.Module}}"
"net/http"
)
type DummyHandler struct {
service domain.DummyService
}
func (h *DummyHandler) index(w http.ResponseWriter, _ *http.Request) {
w.Write([]byte("It Works"))
}
`
const Routes = `package api
i... |
Clinical Features, Gene Alterations, and Outcomes in Prefibrotic and Overt Primary and Secondary Myelofibrotic Patients
Simple Summary The final stages of myeloproliferative neoplasms (MPNs) are related to myelofibrosis (MF). This study aimed to compare secondary myelofibrosis (SMF), overt (PMF), and prefibrotic prima... |
import * as React from 'react';
import MainParagraph from '../MainParagraph';
import Headline from '../Headline';
import Counter from '../Counter';
import Button from '../Button';
import Section from '../Section';
import CurrentValue from './CurrentValue';
import Panel from './Panel';
import PanelRow from './PanelRow'... |
/// An EmptyOrganism is used as a placeholder in an empty cell in a population.
class EmptyOrganism : public Organism {
public:
EmptyOrganism(OrganismManager<EmptyOrganism> & _manager) : Organism(_manager) { ; }
emp::Ptr<OrgType> Clone() const override { emp_error("Do not clone EmptyOrganism"); return nullptr... |
It almost sounds like the set up for a joke, “A sorcerer, a wizard and an alchemist (well, at least a chemist) walk into a television show and sit on a couch…”. There is so much magic in films right now. Marvel’s Doctor Strange drops on November 4th and J.K. Rowling’s Fantastic Beasts and Where to Find Them flies into ... |
Systemic Absorption of Lidocaine from Continuous Erector Spinae Plane Catheters After Congenital Cardiac Surgery: A Retrospective Study.
OBJECTIVES
To examine postoperative serum lidocaine levels in patients with intermittent lidocaine bolus erector spinae plane block (ESPB) catheters after cardiac surgery with or wit... |
// Copyright 2018 The gVisor 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 agree... |
Image caption The high resolution of 8K screens means you can stand very close to them without seeing the individual pixels
Sharp has announced plans to sell an 8K television screen from October.
Although several companies have developed "super hi-vision" resolution test models, this is the first such TV to be made c... |
f,s = 0,0
for i in input():
if i=='4':
f += 1
elif i=='7':
s += 1
if f+s==4 or f+s==7:
print("YES")
else:
print('NO') |
/**
* Database configuration file helper class that is used to write a configuration file into the raw resource
* sub-directory to speed up DAO creation.
*
* <p>
* With help from the user list and especially Ian Dees, we discovered that calls to annotation methods in Android are
* _very_ expensive because Method... |
package it.polimi.ingsw.PSP33.controller.rules.tools;
import it.polimi.ingsw.PSP33.utils.Coord;
import java.util.ArrayList;
import java.util.List;
/**
* Class to bank data for different usage in the TurnFlow, simple version of data memory
*
*/
public class DataBuffer {
private List<Coord> coordList;
priv... |
/**
*
* @param exportVersion
* @param xml
* @return the object from xml
*/
public static XmlExportAttributeDefScope fromXml(
@SuppressWarnings("unused") GrouperVersion exportVersion, String xml) {
XStream xStream = XmlExportUtils.xstream();
XmlExportAttributeDefScope xmlExportAttribut... |
package com.moriarty.morimvcandroid.database;
import android.content.Context;
import com.moriarty.morimvcandroid.db.DaoMaster;
import com.moriarty.morimvcandroid.db.DaoSession;
import com.moriarty.morimvcandroid.db.FunctionBeanDao;
import com.moriarty.morimvcandroid.model.entities.FunctionBean;
import org.greenrobot... |
<gh_stars>0
# -*- coding: utf-8 -*-
"""
References:
http://deeplearning.net/software/theano/library/config.html
Check Settings:
python -c 'import theano; print theano.config' | less
"""
from __future__ import absolute_import, division, print_function, unicode_literals
import utool as ut
import os
from os.path ... |
#ifndef IOPool_Streamer_StreamerInputModule_h
#define IOPool_Streamer_StreamerInputModule_h
#include "IOPool/Streamer/interface/StreamerInputSource.h"
#include "FWCore/Utilities/interface/DebugMacros.h"
#include "FWCore/Utilities/interface/propagate_const.h"
#include <memory>
#include <string>
#include <fstream>
#in... |
<reponame>mmitteregger/cuke-runner
use std::time::SystemTime;
use gherkin::cuke::{Cuke, Tag};
use crate::error::Error;
use crate::runner::EventPublisher;
use crate::api::{TestResult, TestResultStatus};
use crate::api::event::Event;
use crate::glue;
#[derive(Debug)]
pub struct Scenario<'a, 'b> {
test_results: Vec... |
In September 2012 the Library Board of Pulaski County, Kentucky raised property taxes $1 per year for a typical homeowner to maintain the existing level of services in its five libraries. Voters were not given the opportunity to reject the increase; in 2006 however, they were and resoundingly approved a much larger inc... |
//
// TBEmotion.h
// ENTBoostLib
//
// Created by <NAME> on 15/12/11.
// Copyright © 2015年 entboost. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <CoreData/CoreData.h>
@interface TBEmotion : NSManagedObject
@property (nonatomic, retain) NSString *cmAddress;
@property (nonatomic, retain) NSSt... |
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""
Created on Sun Feb 5 23:00:34 2017
@author: shenda
"""
from collections import Counter
import numpy as np
import FeatureExtract
import MyEval
import ReadData
import dill
import features_all
import challenge_encase_mimic
##############
#### load classifier
#########... |
/**
*
* @author Martin Kouba
*/
@SuppressWarnings("serial")
@SpecVersion(spec = "cdi", version = "2.0")
public class RawBeanTypeParameterizedRequiredTypeTest<T, X extends Number> extends AbstractTest {
private final TypeLiteral<Foo<T>> FOO_UNBOUNDED_TYPE_VARIABLE_LITERAL = new TypeLiteral<Foo<T>>() {
};
... |
// Reply to a help command with help information
func handleHelp(msg *Message) {
var body bytes.Buffer
fmt.Fprintf(&body, commandInfo())
reply := msg.Reply()
reply.From = gConfig.CommandAddress
reply.Body = body.String()
reply.Send([]string{msg.From})
log.Printf("HELP_SENT To=%q", reply.To)
} |
// SecondaryArgs validates that the secondary arguments are correct
func (sa *SecondaryArgs) SecondaryArgs() {
if sa.PrimaryAddr == "" {
zap.L().Error("primary information not provided")
os.Exit(1)
}
if sa.BenchConfigPath == "" {
zap.L().Error("benchmark configuration not provided")
os.Exit(1)
}
if sa.Chai... |
The price of bitcoin offshoot bitcoin cash jumped higher, while bitcoin slid lower after rising above the $8,000 level to fresh record highs earlier this week.
On the U.S.-based Bitfinex exchange, surged 21.58% to $1,577.00 by 05:46 AM ET (10:46 AM GMT).
Prices were boosted after the bitcoin alternative was integrate... |
<reponame>pbondoer/bananacat-bot
import {
getLevel,
getPoints,
getExperience,
getHasStreak,
formatStreakMultiplier,
formatExp,
formatPoints,
} from '~/hooks/level';
export default {
name: 'level',
description: 'check ur level',
handler: message => {
const user = message.author;
let str = `... |
/*
* Unshare a filedesc structure, if necessary by making a copy
*/
void
fdunshare(struct thread *td)
{
struct filedesc *tmp;
struct proc *p = td->td_proc;
if (p->p_fd->fd_refcnt == 1)
return;
tmp = fdcopy(p->p_fd);
fdescfree(td);
p->p_fd = tmp;
} |
/**
* Helper method to get the path of the vertices taken from stratingPoint to
* destination
*
* @param destination
* @return array
*/
public String[] printPath(String destination) {
if (!graph.containsKey(destination)) {
throw new IllegalArgumentException("Invalid Destination, " + destination);
} ... |
A history of opioid abuse: Why buprenorphine is superior for the management of opioid use disorder and pain.
Opioid abuse represents a public health crisis that has significant associated morbidity and mortality. Since beginning in the early 1990's, the opioid abuse epidemic has been difficult to control due to regula... |
<reponame>tjzhou23/profilo<filename>java/main/com/facebook/profilo/core/GenericRegistry.java
/**
* Copyright 2004-present, Facebook, Inc.
*
* <p>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
... |
/**
* Parse Solr facet intersection.
*
* @param intersection String containing the facet intersection
* @param solrQuery Solr query
*/
public void parseSolrFacetIntersections(String intersection, SolrQuery solrQuery) {
boolean error = true;
String[] splitA = intersection.spli... |
#include <stdio.h>
typedef long long int ll;
int main()
{
int t = 0;
scanf("%d", &t);
while (t--)
{
ll n, m;
scanf("%lld", &n);
ll i = 0, inp;
ll countOdd1 = 0, countOdd2 = 0, countEven1 = 0, countEven2 = 0;
while (i < n)
{
scan... |
<filename>stories/ConfigProvider.story.tsx
/* eslint-disable no-console */
import React, { useState } from 'react';
import {
ConfigProvider,
Radio,
Pagination,
DatePicker,
TimePicker,
Popconfirm,
Button,
Modal,
} from '@self';
// @ts-ignore
import zhCN from '@self/locale/zh-CN';
// @ts-ignore
import en... |
The Baltimore 10-Miler course is a loop course that starts and finishes at the scenic Druid Hill Park, home of the Maryland Zoo. There is plenty of on-site parking, and those who plan their travels and arrive early will enjoy the sweet sounds of summer in the park as they arrive and prep for the start.
Runners have 3 ... |
Developing Statistical Optimization Models for Urban Competitiveness Index: Under the Boundaries of Econophysics Approach
The purpose of this research was to establish the urban competitiveness index (UCI) by using the statistical optimization method for the econophysics approach. With this technique, economic data re... |
// IsKeyValuePairDoesNotExistInSnapshotError is a utility method to check if the error
// is due to key-value pair not existing in snapshot
func IsKeyValuePairDoesNotExistInSnapshotError(err error) bool {
if err == nil {
return false
}
_, ok := err.(*KeyValuePairDoesNotExistInSnapshotError)
return ok
} |
// NewGetLolStoreV1CatalogParams creates a new GetLolStoreV1CatalogParams object
// with the default values initialized.
func NewGetLolStoreV1CatalogParams() *GetLolStoreV1CatalogParams {
var ()
return &GetLolStoreV1CatalogParams{
timeout: cr.DefaultTimeout,
}
} |
/**
* Class used to read .container files from Volume and build container map.
*/
public class ContainerReader implements Runnable {
private static final Logger LOG = LoggerFactory.getLogger(
ContainerReader.class);
private HddsVolume hddsVolume;
private final ContainerSet containerSet;
private final O... |
def normalCheck(meshList=[]):
meshList = cleanup.getMeshList(meshList)
if not meshList: return []
normalSG = 'normalCheckSG'
normalShader = 'normalCheckShader'
if not mc.objExists(normalShader):
normalShader = mc.shadingNode('lambert',asShader=True,n=normalShader)
normalSG = mc.sets(renderable=True,noSurfaceSh... |
def range_table(self):
range_table_base = [
len(self.filter_num1), len(self.repeat1), len(self.filter_num2),
len(self.repeat2), len(self.filter_num3), len(self.repeat3),
len(self.filter_num4), len(self.repeat4)
]
return range_table_base |
<gh_stars>1-10
export const typeOf = (obj: any) => {
return Object.prototype.toString.call(obj).slice(8, -1);
};
export const TYPE = {
string: 'String',
object: 'Object',
array: 'Array'
};
export const isString = (v: any): v is string => typeOf(v) === TYPE.string;
export const isObject = (v: any): v i... |
/**
* Created by tangcheng on 4/29/2017.
*/
@RestController
@RequestMapping("quartz")
@Api(tags = "Quartz接口", description = "测试接口详细描述")
public class QuartzController {
public static final String SUCCESS = "success";
private static final String NAME = "demo";
private static final String GROUP = "demoGrou... |
<gh_stars>0
#pragma once
#ifndef SPRITE_H
#define SPRITE_H
#include "Types.h"
class Texture;
class Sprite
{
public:
Sprite();
~Sprite(void);
private:
Texture *mp_Texture;
Rect m_Area;
}; // Sprite
#endif // SPRITE_H |
Promoting remyelination in multiple sclerosis
The greatest unmet need in multiple sclerosis (MS) are treatments that delay, prevent or reverse progression. One of the most tractable strategies to achieve this is to therapeutically enhance endogenous remyelination; doing so restores nerve conduction and prevents neurod... |
/**
* Copyright (c) 2000-present Liferay, 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 requ... |
/**
* This is used to verify that the value retrieved from the region are equal to the value retrieved from the
* BlackBoard Throws a TestException to indicate failure.
*
* @param key - the String that was used to retrieve the objects
* @param valueFromRegion - the Object that was retrived fr... |
6B-6 An Ultra Small SAW RF Filter using Wafer Level Packaging Technology
Since a multitude of surface acoustic wave (SAW) filters are the key components for wireless communications, they play an important role in today's mobile phone evolution. Increasing the levels of functional integration and size reduction are the... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.