content stringlengths 10 4.9M |
|---|
<reponame>joelostblom/dash-docs
import dash_core_components as dcc
import dash_html_components as html
from dash_docs import tools
from dash_docs import styles
from dash_docs import reusable_components as rc
examples = tools.load_examples(__file__)
layout = html.Div([
rc.Markdown('''
# Building responsive C... |
/*
* FilmTime.h
*/
#ifndef SRC_FILMTIME_H_
#define SRC_FILMTIME_H_
#include "Film.h"
using namespace std;
class FilmTime {
unsigned hour;
Film *film;
unsigned roomID;
public:
FilmTime(unsigned h, Film *f, unsigned id);
virtual ~FilmTime();
unsigned getHour() const;
unsigned getRoomID() const;
Film* getFil... |
class DestinyCharacterCustomization:
"""Raw data about the customization options chosen for a character's face
and appearance.
You can look up the relevant class/race/gender combo in
DestinyCharacterCustomizationOptionDefinition for the character, and
then look up these values within the Customizat... |
/**
* Search for etl jobs that are ready to run and update the time for next run
* @param message
* @throws Exception
*/
@Override
public void onReceive(Object message) throws Exception {
if (message.equals("checking")) {
runDueJobs();
}
} |
<reponame>hernad/zimbra9
/*
* ***** BEGIN LICENSE BLOCK *****
* Zimbra Collaboration Suite Server
* Copyright (C) 2011, 2012, 2013, 2014, 2016 Synacor, Inc.
*
* 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 Soft... |
// toChunk finds a nonce so that when the given trojan chunk fields are hashed, the result will fall in the neighbourhood of one of the given targets
// this is done by iteratively enumerating different nonces until the BMT hash of the serialization of the trojan chunk fields results in a chunk address that has one of ... |
/**
* Handles the population of installed and uninstalled extensions on the "Core Types and Extensions" page.
* This method always tries to pick up newly registered extensions from the Registry.
* </br>
* Optionally, the user may have triggered synchronise action, which updates default vocabularies to use l... |
#include <IMGraph.h>
#include <tuple>
#include <cassert>
IMGraph::IMGraph(const std::vector<degree_t> °reeSequence) {
#ifndef NDEBUG
if (!std::is_sorted(degreeSequence.begin(), degreeSequence.end(), std::greater<degree_t>())) {
STXXL_MSG("WARNING: degree sequence is not sorted in descending order, perfo... |
May is usually the last “good” month in terms of new releases, it’s purpose to toss out a few more games to keep us occupied and out of the deadly summer sun until things pick back up around Aug-Sept. Around this time last year, I was eagerly waiting for a chance to be the bad guy for a bit by murdering fools as Jason ... |
from test.sdk_mock.mockSecuredWebsocketCore import mockSecuredWebsocketCoreNoRealHandshake
from test.sdk_mock.mockSecuredWebsocketCore import MockSecuredWebSocketCoreNoSocketIO
from test.sdk_mock.mockSecuredWebsocketCore import MockSecuredWebSocketCoreWithRealHandshake
from test.sdk_mock.mockSSLSocket import mockSSLSoc... |
/**
* Base netty SimpleChannelInboundHandler
*
* @param <V> Accepted Object-POJO
*
* @author ykalay
*
* @since 1.0
*/
public abstract class BaseNettyHandler<V> extends SimpleChannelInboundHandler<V> {
private static final Logger log = LoggerFactory.getLogger(BaseNettyHandler.class.getName());
private ... |
// NewPutLolChatV1SettingsByKeyParams creates a new PutLolChatV1SettingsByKeyParams object
// with the default values initialized.
func NewPutLolChatV1SettingsByKeyParams() *PutLolChatV1SettingsByKeyParams {
var ()
return &PutLolChatV1SettingsByKeyParams{
timeout: cr.DefaultTimeout,
}
} |
Soy versus cow's milk in infants with a biparental history of atopic disease: development of atopic disease and immunoglobulins from birth to 4 years of age
Forty‐eight children with a biparental history of atopic disease were followed from birth to 4 years of age. One group was fed soy and the other cow's milk from w... |
from dango import dcog, Cog
from .common import utils
from .common import extras
@dcog()
class UsesCommon(Cog):
def __init__(self, config):
self.b = utils.dummy()
|
<filename>src/lib/groupByType.ts
import type { ComponentClass, FunctionComponent, ReactNode } from 'react';
import { Children } from 'react';
import getElementName from './getElementName.js';
// eslint-disable-next-line max-lines-per-function
const groupByType = (
children: ReactNode | ReactNode[],
// eslint-disab... |
import numpy as np
def top_k(a, k, reverse=False):
flat = a.ravel()
if len(flat) <= k:
return np.arange(len(a))
if reverse:
top_k_inds = np.argpartition(flat, len(flat)-k)[-k:]
else:
top_k_inds = np.argpartition(flat, k)[:k]
return np.unravel_index(top_k_inds, a.shape)
|
/**
* A helper method that allows a lot of multidim data types to be filled with Infinite values
*
* @param alg
* @param a
*/
public static <T extends Algebra<T,U> & Infinite<U>, U, W extends RawData<U>>
void compute(T alg, W a)
{
U value = alg.construct();
alg.infinite().call(value);
Fill.compute(a... |
McKayla Maroney, 22, filed the lawsuit against USA Gymnastics on Wednesday
She claims officials paid her to sign a non-disclosure agreement to keep secret the allegations she was abused by team doctor Larry Nassar
Gold medalist revealed on Twitter in October that Nassar had allegedly molested her for seven years begi... |
def insert_documents(self, data_dir_path: str, latest=True):
dict_list = self.__get_data(data_dir_path)
transformed_data_list = self._transform_data(dict_list)
if latest:
latest_insert = self.__get_last_insert()
if latest_insert:
latest_index = self.__get_... |
def predict(self, df, summed=True):
test_df = self.add_time_day(df)
test_df = self.add_hdd(test_df)
test_df = self.add_cdd(test_df)
if 'energy' not in test_df:
test_df = test_df.assign(energy=[0.0 for xx in test_df['tempF']])
weekday_df = test_df.loc[test_df['day_of_w... |
import json
class GameStats():
def __init__(self, ai_game):
filename="saved_data.json"
try:
with open (filename) as f:
self.high_score=json.load(f)
except:
with open (filename, "w") as f:
json.dump(0,f)
self.settings=ai... |
import { Entity } from 'core/entities/entity';
import { MathUtils } from 'core/utils/math.utils';
// export interface GridEntity {
// id: number;
// }
export interface GridClient {
position: number[];
dimensions: number[];
cells: {
min: number[],
max: number[],
nodes: GridCell[... |
// runServe runs the main HTTP service
func runServe(cmd *cobra.Command, cmdArgs []string) error {
logrus.WithFields(logrus.Fields{
"groups": runSettings.LockGroups,
}).Debug("lock groups")
if runSettings == nil {
return errors.New("nil runSettings")
}
airlock := server.Airlock{*runSettings}
stopCh := make(ch... |
/**
* Looks for a classic macro a returns true if it finds the macro a and it is pair or unpaired (based on pair parameter).
*/
public static boolean checkPairMacro(PsiBuilder builder, int level, Parser parser) {
if (builder.getTokenType() != T_MACRO_OPEN_TAG_OPEN) return false;
PsiBuilder.Marker marker = build... |
// AddServiceAgreement adds a Service Agreement which includes a job that needs
// to be scheduled.
func (app *ChainlinkApplication) AddServiceAgreement(sa *models.ServiceAgreement) error {
err := app.Store.CreateServiceAgreement(sa)
if err != nil {
return err
}
app.Scheduler.AddJob(sa.JobSpec)
logger.ErrorIf(ap... |
OTTAWA — Struggling for relevance in the smartphone business, BlackBerry is turning to Google’s popular mobile software for a helping hand.
BlackBerry said on Friday that it would make a phone that runs the Android operating system, confirming a rumor that has been circulating for months. The company released another ... |
// downloadMetadataLegacy downloads a snapshot of the KV store from the server, and extracts
// a bucket manifest from the result. KV is written to a local file; the extracted manifest
// is tracked as a slice for additional processing.
//
// NOTE: This should _not_ be used against an InfluxDB instance running v2.1.0 o... |
def OnDropFiles(self, x, y, filenames):
try:
for file in filenames:
self._docManager.CreateDocument(file, wx.lib.docview.DOC_SILENT)
except:
msgTitle = wx.GetApp().GetAppName()
if not msgTitle:
msgTitle = _("File Error")
wx.... |
Acute blindness in a dog caused by an explosive blast.
A 3-year-old, intact male, mixed breed dog was presented with a complaint of acute blindness. Ten days previously, the area where the dog was walking came under a rocket attack, and a rocket landed and exploded 300 meters away from the dog. Physical examination wa... |
<filename>tower-web-macros/src/derive/attr.rs
use http::StatusCode;
use http::header::{HeaderName, HeaderValue};
use syn;
use quote::quote;
#[derive(Debug)]
pub(crate) struct Attribute {
pub kind: Kind,
pub source: syn::Attribute,
}
#[derive(Debug)]
pub(crate) enum Kind {
Status(Option<StatusCode>),
H... |
//
// TalkingDataEAuth.h
// TalkingDataSDK
//
// Created by Robin on 7/13/16.
// Copyright © 2016 TendCloud. All rights reserved.
//
#import <Foundation/Foundation.h>
typedef NS_ENUM(NSInteger, TDEAuthType) {
TDEAuthTypeApplyCode = 0, // 申请认证码
TDEAuthTypeChecker, // 检查账号是否已认证
TDEAuthTypePhon... |
Power Flow Calculation in Smart Distribution Network Based on Power Machine Learning Based on Fractional Differential Equations
Abstract Based on the theory of fractional differential equations, this paper proposes a simple recursive, iterative scheme for power flow calculation in pure radial networks. The paper deter... |
<reponame>Develop-MOPH/his-connection
/// <reference path="../../../typings.d.ts" />
import * as fastify from 'fastify';
const router = (fastify, { }, next) => {
fastify.get('/', async (req: fastify.Request, reply: fastify.Reply) => {
reply.send({
ok: true,
apiCode: 'RP506',
apiName: 'Report 50... |
A Time-Series Analysis of Firearm Purchasing After Mass Shooting Events in the United States
Importance Increased understanding of public response to mass shootings could guide public health planning regarding firearms. Objectives To test the hypothesis that mass shootings are associated with gun purchasing in the Uni... |
<reponame>sang89vh/springmvc-template
package com.faq.mbackend.dto.out;
/**
* Created by jack on 4/2/16.
*/
public class ParseSessionOutVO extends BaseOutVO {
private String objectId;
private String sessionToken;
private String user;
private String restricted;
private String expiresAt;
priva... |
// NumberInt is a helper function to convert an expected integer that is returned from a json Unmarshal as a Number,
// into an actual integer without returning any errors. If there is an error, it just returns 0. Use this when you absolutely
// know you are expecting an integer. Can convert strings too.
func NumberInt... |
Quantum studies of the vibrations in H3O2- and D3O2-.
The vibrations of H3O2- and D3O2- are investigated using diffusion Monte Carlo (DMC) and vibrational configuration-interaction approaches, as implemented in the program MULTIMODE. These studies use the potential surface recently developed by Huang et al. . The foc... |
package org.highmed.dsf.bpe.start;
import static org.highmed.dsf.bpe.start.ConstantsExampleStarters.TTP_DOCKER_FHIR_BASE_URL;
public class Ping3MedicFromTtpDockerExampleStarter extends AbstractPing3MedicFromTtpExampleStarter
{
// Environment variable "DSF_CLIENT_CERTIFICATE_PATH" or args[0]: the path to the client-c... |
A Improved Channel Access Algorithm for IEEE 802.15.4 WPAN
The IEEE 802.15.4 standard is able to achieve low power transmissions in low-rate and short-distance wireless personal area network (WPAN). The CSMA/CA algorithm is used for contention mechanism that collision and retransmission occur. If a collision occurs, C... |
//copy constructor clones itself, calls deepCopy on children
ParamNode::ParamNode(const ParamNode &node) :
XmlNode()
{
*this = node;
this->ClearChildren();
for (int i=0; i<node.GetNumChildren(); i++) {
ParamNode *child = node.GetChild(i);
ParamNode *newchild = child->deepCopy();
this->AddChild(newchild);
}
} |
/**
* Created by rachaelmahon on 12/04/2017.
*/
public class main_Menu {
private Book_Manager library;
void runMenu(){
displayOptions();
String selection = getInput();
interpretMenuSelection(selection);
}
void displayOptions() {
System.out.println("Main Menu - Please... |
import os
import numpy as np
import pandas as pd
import matplotlib as mpl
from matplotlib import pyplot as plt
from matplotlib import gridspec
from svphase.learn.features import PreloadFeatures
from svphase.analyze.compare_model_stats import get_model_and_version, main_per_class as compare_model_stats
from svphase.lea... |
import java.util.Scanner;
public class kantai {
public static void main(String[] args)
{
Scanner sc=new Scanner(System.in);
int n=sc.nextInt();
int k=2;
int val1 = n%4;
int val2=(n+1)%4;
int val3=(n+2)%4;
int max=-1;
if(val1==1)
{
System.out.println("0 A");
}
... |
<gh_stars>0
/**
* @(#)ClientLogger.java
*
*
*/
import java.io.BufferedWriter;
import java.io.FileWriter;
import java.io.IOException;
import java.util.Observable;
import java.util.Observer;
/**
* This class represents a client logger component which is responsible for storing text messages in
* log files. Show e... |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main()
{
ll n, cost[100005] , nor[100005], rev[100005];
string str[100005], revstr[100005];
cin>>n;
for (int i = 0; i < n; i++)
{
cin>>cost[i];
}
for (int i = 0; i < n; i++)
{
cin>... |
/**
* Factory to create the different mock object for the tests
*
* @author ssommerf
*
*/
public class Mockery {
public static Client createBeerClientMock() throws IOException {
Client client = mock(Client.class);
WebResource webResource = mock(WebResource.class);
when(client.resource("http://api.brewery... |
/**
* Keeps the first n elements of the original map, deletes the remaining
* elements and returns the sum of all deleted elements' values.
*/
public static <K> double removeAndSumUpAfter(Map<K, Double> input, int n) {
int length = Math.min(n, input.size());
Iterator<Entry<K, Double>> it = input.entrySet().it... |
def delete(self, request, id):
api.keystone.group_delete(request, id) |
// Check if the string has the character starting at offset
// By default, offset was set with 0 index
bool dataBase::haschar(char c, string s, int offset) {
for (unsigned int i = offset; i < s.length(); i++)
if (c == s[i])
return true;
return false;
} |
#include <iostream>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <queue>
using namespace std;
#define INF 0x3f3f3f
int n,k;
struct cookie{
int need;
int has;
bool operator < (const cookie &a)const{
return (a.has / a.need) < (has / need);
}
}cook[10010];
priority_queue<cookie>q;... |
import Vue from "vue";
import VueRouter, { NavigationGuardNext, Route, RouteConfig } from "vue-router";
import Home from "../views/Home.vue";
import store from "../store";
Vue.use(VueRouter);
const MAIN_URL = `//${process.env.VUE_APP_MAIN_URL}`;
const TENANT_URL = process.env.VUE_APP_FULL_TENANT_URL;
const routes: A... |
/// This takes the walker and turns it into a reference to the root
pub fn root_into_ref(mut self) -> &'a mut BasicTree<D, T> {
// go to the root
self.go_to_root();
let (tel, _, _) = self.destructure();
RecRef::into_ref(tel)
} |
def delete_command(
hass,
entity_id=ENTITY_MATCH_ALL,
device=None,
command=None,
):
data = {}
if entity_id:
data[ATTR_ENTITY_ID] = entity_id
if device:
data[ATTR_DEVICE] = device
if command:
data[ATTR_COMMAND] = command
hass.services.call(DOMAIN, SERVICE_DELET... |
// NewMessage returns a *ProtoMessage created from a
// *descriptor.DescriptorProto
func NewMessage(msg *descriptor.DescriptorProto) (*ProtoMessage, error) {
newMsg := ProtoMessage{}
newMsg.Name = *msg.Name
for _, field := range msg.Field {
newField := MessageField{}
newField.Number = int(field.GetNumber())
ne... |
/**
* Playback service control implementation
*/
public final class PlaybackServiceControlImpl implements PlaybackServiceControl {
private final Context context;
public PlaybackServiceControlImpl(@NonNull final Context context) {
this.context = context;
}
@Override
public void resendSta... |
#include<iostream>
#include<conio.h>
using namespace std;
const int n=100 ;
int s[n][3];
int main(){
int m;
cin>>m;
for(int i=0;i<m;i++){
for(int j=0;j<3;j++){
cin>>s[i][j];
}
}
int a,b,c;
a=0;
b=0;
c=0;
for(int i=0;i<n;i++){
a=a+s[i][0];
b=b+s[i][1];
c=c+s[i][2];
}
if(a==0&&b==0&&c==0){
... |
package models
import (
"time"
"go.mongodb.org/mongo-driver/bson/primitive"
)
// MODELS
type User struct {
ID primitive.ObjectID `json:"_id,omitempty" bson:"_id,omitempty"`
Name string `json:"name,omitempty" bson:"name,omitempty"`
Email string `json:"email,omitempty" bson:"... |
def is_wc_src_module(self, module_name, modules_conf):
return (module_name.split(" ")[0] in modules_conf["wildcard_src_modules"]) |
We’ve been on our current server setup for 14 months. We’ve not had a single unplanned outage to date until yesterday. Even before the majority of the country was awake and at their computers or browsing the web on their phones, Mark May’s demotion broke our servers.
I’m not going to hide from the fact that I’m an Ohi... |
<reponame>barrhaim/jruby
package java_integration.fixtures;
/**
* This simulates a the class side of a singleton/class pair.
* object ScalaSingleton { def hello = "Hello" }
* class ScalaSingleton { def hello = "Goodbye" }
*/
public final class ScalaSingleton {
public String hello() {
return "Goodbye";
... |
///
/// Reloads the styles so that the attached widget will show the changes
///
pub fn reload_if_needed(&mut self) {
if self.need_refresh {
// Refresh the stylesheet
let style_sheet = self.style_sheet();
self.style_provider.load_from_data(style_sheet.as_bytes()).unwrap();
... |
def kill(self, exception=GreenletExit, block=True, timeout=None):
timer = Timeout._start_new_or_dummy(timeout)
try:
while self.greenlets:
for greenlet in list(self.greenlets):
if greenlet in self.dying:
continue
... |
def dataset_ids(self):
if not hasattr(self, "_dataset_ids"):
self._dataset_ids = list(self.catalog)
return self._dataset_ids |
/**
* @author: crazycatzhang
* @date: 2020/8/4 7:26 PM
* @description: Realize the Tower of Hanoi through divide and conquer
*/
public class HanoiTower {
public static void main(String[] args) {
hanoiTower(5, 'A', 'B', 'C');
System.out.println(count);
}
private static int count = 0;
... |
// Puts the path in correct orientation for FreeCAD.
// The path is made to run clockwise around the positive Z-axis.
// The shape is also returned to the origin, and therefore must be shifted
// by the offset at a later stage.
void MODEL3D::three_dim_model::arrange_path(ClipperLib::Path &to_arrange, std::vector<int> &... |
/*
* Copyright (c) 2013 <NAME>
*
* This file is part of GamingAnywhere (GA).
*
* GA is free software; you can redistribute it and/or modify it
* under the terms of the 3-clause BSD License as published by the
* Free Software Foundation: http://directory.fsf.org/wiki/License:BSD_3Clause
*
* GA is distributed in... |
/* Copyright (C) <NAME>, 2003.
* All rights reserved worldwide.
*
* This software is provided "as is" without express or implied
* warranties. You may freely copy and compile this source into
* applications you distribute provided that the copyright text
* below is included in the resulting source code, fo... |
def is_valid_bst(self, node, lower=float('-inf'), upper=float('inf')):
if node is None:
return True
if (node.val <= lower or node.val >= upper):
return False
return self.is_valid_bst(node.left, lower, node.val) and self.is_valid_bst(node.right, node.val, upper) |
// Requires WIFI Extension 2.0 firmware 2.1.0.
//
// Returns the mesh configuration as set by SetWifi2MeshConfiguration.
//
// .. versionadded:: 2.4.2$nbsp;(Firmware)
func (device *MasterBrick) GetWifi2MeshConfiguration() (enable bool, rootIP [4]uint8, rootSubnetMask [4]uint8, rootGateway [4]uint8, routerBSSID [6]uin... |
#include <math.h>
#include <bits/stdc++.h>
using namespace std;
int main(int argc, const char * argv[]) {
// insert code here...
int N = 0 ;
cin >> N;
int t[N+1],x[N+1],y[N+1];
//initialize
t[0]= 0;
x[0]= 0;
y[0]= 0;
for(int i=0;i<N;i++){
cin >> t[i+1]>>x[i+1]>>y[i+1];
... |
/**
* A simple command to run the slice based component labeling and connecting on each slice first
*
* @param labeledImage
* @param neighborSize
* @param mKernel
* @return
*/
private static Tuple2<DTImg<long[]>, Long> scanAndMerge(DTImg<long[]> labeledImage,
... |
def load_state(self, state_dict: State, strict: bool = False) -> None:
missing_keys: List[str] = []
unexpected_keys: List[str] = []
error_msgs: List[str] = []
metadata = getattr(state_dict, '_metadata', None)
state_dict = state_dict.copy()
if metadata is not None:
... |
<filename>ci-droid-tasks-consumer-services/src/main/java/com/societegenerale/cidroid/tasks/consumer/services/eventhandlers/RebaseHandler.java
package com.societegenerale.cidroid.tasks.consumer.services.eventhandlers;
import com.societegenerale.cidroid.tasks.consumer.services.GitCommit;
import com.societegenerale.cidro... |
<reponame>folly-systems/amazon-chime-sdk-component-library-react<gh_stars>0
import SpeakerSelection from './SpeakerSelection';
import MicSelection from './MicSelection';
import CameraSelection from './CameraSelection';
import QualitySelection from './CameraSelection/QualitySelection';
export { SpeakerSelection, Mic... |
// Having appends a HAVING clause to the statement.
func (b *SelectBuilder) Having(exprOrMap interface{}, args ...interface{}) *SelectBuilder {
handleExprType(exprOrMap, args, func(expr string, args ...interface{}) {
expr, args = handleShortNotation(expr, args)
b.HavingFragments = append(b.HavingFragments, &whereF... |
/* Reset the manual failover state. This works for both masters and slavesa
* as all the state about manual failover is cleared.
*
* The function can be used both to initialize the manual failover state at
* startup or to abort a manual failover in progress. */
void resetManualFailover(void) {
if (server.cluste... |
def chain_without_block_validation(
base_db,
genesis_state):
overrides = {
'import_block': import_block_without_validation,
'validate_block': lambda self, block: None,
}
SpuriousDragonVMForTesting = SpuriousDragonVM.configure(validate_seal=lambda block: None)
klass = Mini... |
<reponame>polymerfi/bridge-v2
import {
Checkbox,
Divider,
FormControl,
FormControlLabel,
FormLabel,
Grid,
IconButton,
TextField,
Typography,
} from "@material-ui/core";
import { Solana } from "@renproject/chains-solana";
import React, {
FunctionComponent,
useCallback,
useEffect,
useMemo,
use... |
import type { NotLocalizedEndRoute } from '../routes';
import { createRouterBuilder } from './createRouterBuilder';
test('home', () => {
const builder = createRouterBuilder();
const ref = Symbol('ref');
builder.add('/', ref);
const router = builder.createRouter();
const rr = router.get('/') as NotLocalized... |
ST. LOUIS -- Blues goalie Jaroslav Halak departed Saturday night's game against the San Jose Sharks after a second-period collision with a teammate.Defenseman Barret Jackman crashed into Halak after a sliding attempt to break up a pass play to San Jose's Martin Havlat 1:07 into the second period in Game 2 of the Wester... |
<gh_stars>0
import numpy as np
from loguru import logger
from config import JOB_TRIGGER_CONFIG, JOBS_CONFIG, SYSTEM_CONFIG
class JobGenerator:
@staticmethod
def get_value(key):
def get_normal_value(key):
if isinstance(JOBS_CONFIG[key]["range"][-1], int):
value_size = (
... |
package datawave.query.testframework;
import datawave.ingest.csv.mr.input.CSVRecordReader;
import datawave.ingest.data.RawRecordContainer;
import datawave.ingest.data.TypeRegistry;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.io.SequenceFile;
import org.apache... |
/**
* Forces the tab pane associated with this list item to be shown
*
* @param fireEvents true=fire show/hide events, false=don't fire show/hide events
*/
public void showTab(final boolean fireEvents) {
showTab(anchor.getElement());
if (fireEvents) {
fireEvent(new TabSho... |
def story(self) -> Optional[HashtagStory]:
if not self._insta.authenticated:
raise AuthenticationRequired()
logger.info("Retrieving story of #{0}".format(self.tagname))
variables = {"tag_names": [self.tagname], "precomposed_overlay": False, "show_story_viewer_list": False}
da... |
Minimally invasive localization of light source in tissue with an equidistant measurement
Bioluminescence techniques permit a way of observing biological processes in vivo, and they are considered to have a promising application on guiding tumor resection. But now, the related techniques, like bioluminescent imaging a... |
#ifndef STATE_INCLUDES_H
#define STATE_INCLUDES_H
#include "BackgroundFadeInStateClass.h"
#include "LogoZoomInStateClass.h"
#include "StartButtonZoomInStateClass.h"
#include "LegendAppearStateClass.h"
#include "StartButtonWaitStateClass.h"
#include "LegendVanishStateClass.h"
#include "LogoAndStartButtonVanish... |
import FWCore.ParameterSet.Config as cms
from RecoVertex.BeamSpotProducer.BeamSpotNominalCollision2_cfi import *
|
<reponame>intensifier/NeoAxisEngine<gh_stars>0
// Copyright (C) NeoAxis Group Ltd. 8 Copthall, Roseau Valley, 00152 Commonwealth of Dominica.
#include "VHACD.h"
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
EXPORT VHACD::IVHACD* VHACD_Compute64(const d... |
<reponame>stulzq/sofa-registry<filename>server/server/session/src/test/java/com/alipay/sofa/registry/server/session/slot/SlotTableCacheImplTest.java<gh_stars>100-1000
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this... |
//Source: http://cryptography.wikia.com/wiki/Linear_feedback_shift_register
//This implementation has special optimization. It limit range of random
//Method return binary factor depends on the generator polynomial.
//numbers to near maximum power two.
void findShiftFactor()
{
byte result = 4;
m_shiftFactor =... |
// DeleteOffsets deletes offsets for the given group.
//
// Originally, offset commits were persisted in Kafka for some retention time.
// This posed problematic for infrequently committing consumers, so the
// retention time concept was removed in Kafka v2.1 in favor of deleting
// offsets for a group only when the gr... |
<gh_stars>100-1000
/** Copyright 2020 Alibaba Group Holding Limited.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable la... |
def batchmeanpsnr(truth, pred):
batchmean_psnr = 0
for i in range(len(pred)):
_, meanpsnr = lfpsnrs(np.uint8(truth[i]*255.), np.uint8(pred[i]*255.))
batchmean_psnr += meanpsnr
batchmean_psnr = batchmean_psnr / len(pred)
return batchmean_psnr |
<filename>_src/section_3/packtemr/src/main/java/com/tomekl007/EMR.java
package com.tomekl007;
import com.amazonaws.auth.AWSCredentials;
import com.amazonaws.auth.PropertiesCredentials;
import com.amazonaws.services.elasticmapreduce.AmazonElasticMapReduce;
import com.amazonaws.services.elasticmapreduce.AmazonElasticMap... |
The following blog post, unless otherwise noted, was written by a member of Gamasutras community.
The thoughts and opinions expressed are those of the writer and not Gamasutra or its parent company.
THE SHORT VERSION: When trying to select among many small objects with a ray, e.g. in VR games that employ a virtual l... |
// Frees all of the cached models
int ModelManager::freeAllModels(void)
{
std::map< ModelID, IModel* >::iterator i;
for(i = modelList.begin(); i != modelList.end(); ++i)
delete i->second;
modelList.clear();
modelIdList.clear();
numModels = 0;
return 0;
} |
<gh_stars>0
package org.smartregister.reveal.application;
import android.content.Intent;
import android.util.Log;
import org.smartregister.Context;
import org.smartregister.CoreLibrary;
import org.smartregister.configurableviews.ConfigurableViewsLibrary;
import org.smartregister.configurableviews.helper.JsonSpecHelpe... |
package com.oath.cyclops.jackson;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.equalTo;
import cyclops.container.control.Eval;
import org.junit.Test;
public class EvalTest {
Eval<Integer> some = Eval.now(10);
@Test
public void roundTrip() {
String js... |
Electronic shell structure in Ga12 icosahedra and the relation to the bulk forms of gallium.
The electronic structure of known cluster compounds with a cage-like icosahedral Ga(12) centre is studied by first-principles theoretical methods, based on density functional theory. We consider these hollow metalloid nanostru... |
<reponame>baoxuezhao/BaikalDB
// Copyright (c) 2018 Baidu, 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
/... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.