content
stringlengths
10
4.9M
<gh_stars>10-100 package party.detection.unknown.util; /** * Utility for generating and getting data from integer colors. * * @author GenericSkid * @since 1/3/2018 */ public class Colors { public static int getColor(int red, int green, int blue) { return getColor(red, green, blue, 255); } /** * Encode gi...
<filename>tests/unit/test_charm.py # Copyright 2020 Canonical Ltd. # See LICENSE file for licensing details. import hashlib import json import re import unittest import yaml from ops.testing import Harness from charm import CONFIG_PATH, DATASOURCES_PATH, PROVISIONING_PATH, GrafanaCharm MINIMAL_CONFIG = {"grafana-im...
def deltalogp_spline(Flux, Variance, params_transitions, r): spline = func.prepare_shape(r) params_transitions = func.planet_fit(params_transitions, Time, Flux, Variance, spline, r) flux_planets = func.profile_with_spline(Time, *params_transitions, spline, r) logp = func.negative_2loglikelihood(Flux, Va...
After years of promoting the theory that President Barack Obama was born in a foreign country -- one that has been consistently debunked by fact-checkers -- Donald Trump reversed course on Sept. 16, 2016, and said Obama was born in the United States. "President Barack Obama was born in the United States. Period," Trum...
// InitFlags creates logging flags which update the given variables. The passed mutex is // locked while the boolean variables are accessed during flag updates. func InitFlags( mu sync.Locker, toStderr *bool, logDir flag.Value, nocolor *bool, verbosity, vmodule, traceLocation flag.Value, ) { *toStderr = true fl...
Book reviews : Dunne, T. and Leopold, L .B. 1978: Water in environmental planning. San Francisco: W. H.| Freeman. xxvii + 818 pp. £17.40 A is misquoted in which the log of the x-terms should be summed, not the log of the mean of the x-terms. This is a very readable book, well illustrated and well referenced. Most of t...
/** * This class is exposed to SpEL parsing through the variable <code>#{@value SPEL_PREFIX}</code>. Use the attributes * in your SpEL expressions: {@link #selectEntity}, {@link #fields}, {@link #bucket} and {@link #filter}. */ public static final class N1qlSpelValues { /** * <code>#{{@value SPEL_SELECT_FRO...
class WorkflowInfo: """Workflow info adapter""" def __init__(self, context): self.context = context self.wf = get_utility(IWorkflow, name=self.name) # pylint: disable=invalid-name @property def parent(self): """Workflow managed content getter""" return get_parent(self....
UFC 164's fight card isn't quite above reproach, but it is very, very good. The key consideration, though, is not whether it's good or bad. Rather, it's whether FOX exposure leads to increased pay-per-view sales. UFC CEO Lorenzo Fertitta famously told the press before the first FOX fight if the seven-year deal resulte...
<filename>src/container/HomeContainer/actions.tsx export function listIsLoading(bool: boolean) { return { type: "LIST_IS_LOADING", isLoading: bool, }; } export function fetchListSuccess(list: Object) { return { type: "FETCH_LIST_SUCCESS", list, }; } export function checkLogout(bool: boolean) { return { t...
<reponame>TheSilverEcho/ZeroPointAPI<filename>src/main/java/me/thesilverecho/zeropoint/api/module/ClientModule.java package me.thesilverecho.zeropoint.api.module; import org.lwjgl.glfw.GLFW; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; im...
<gh_stars>1-10 export enum ProfileRole { Admin = 'ADMIN', Coordinator = 'COORDINATOR', Crew = 'CREW', FleetManager = 'FLEET MANAGER', Member = 'MEMBER', Skipper = 'SKIPPER', None = 'NONE' }
/* * is_present - returns TRUE if tag is already present on the stack. */ int html_text::is_present (HTML_TAG t) { tag_definition *p=stackptr; while (p != NULL) { if (t == p->type) return TRUE; p = p->next; } return FALSE; }
<filename>ferrite-session/src/internal/session/channel/receive.rs use tokio::{ task, try_join, }; use crate::internal::{ base::{ once_channel, unsafe_create_session, unsafe_run_session, AppendContext, Context, ContextLens, Empty, PartialSession, Protocol, }, functional::Na...
/** * Add a new Meme * * @param meme Meme object contains name, url, caption * @return created Meme id */ @ApiOperation(value="Add a Meme post", notes="returns the id") @PostMapping public ResponseEntity<Object> AddMeme(@Valid @RequestBody Meme meme) { if (memeService.alreadyEx...
Signal/Noise and Sensitometry Limitations in Chest Radiography: Implications of Regional Exposure Control The field of medical imaging has experienced many significant advances in recent years with the evolution of a host of computer assisted imaging methods. This growth has also been evident in the areas of more conv...
import { Component, Input } from '@angular/core'; import { InvoiceService } from '../../invoice.service'; import { PrintService } from '../../../../services/print.service'; import { OrganizationService } from '../../../organization/organization.service'; import 'rxjs/add/operator/take'; @Component({ selector: ' susp...
/** * A Graph-wrapper to use as base in a {@link #getWorkModel() working model}. * <p> * Created by @ssz on 01.03.2019. */ public static class TrackedGraph extends WrappedGraph { public TrackedGraph(Graph base) { super(Objects.requireNonNull(base)); } @Override ...
Better policing, extra help for single mothers and incentives for companies to recruit from poor districts are among Macron's plans for tackling stubborn deprivation away from the bright lights in the centre of big cities. "I want the face of our neighbourhoods to have changed by the end of my term," the French leader...
/* * Set a default IPv6 address for a 6to4 tunnel interface 2002:<tsrc>::1/16 */ static void ipif_set6to4addr(ipif_t *ipif) { ill_t *ill = ipif->ipif_ill; struct in_addr v4phys; ASSERT(ill->ill_mactype == DL_6TO4); ASSERT(ill->ill_phys_addr_length == sizeof (struct in_addr)); ASSERT(ipif->ipif_isv6); if (ipif-...
<reponame>afizsavage/Mide-Ice-Cream-SIte import React, { useState, useEffect, useRef } from "react" import { Nav } from "react-bootstrap" import { Link } from "gatsby" interface Iprops { lists: Array<string> path: string name: string } interface IListItemProps { LinkName: string key: number } const ListIte...
<filename>angular-libs/projects/angular-reactive-message/src/lib/angular-reactive-message.service.ts import { Injectable } from '@angular/core'; import { BehaviorSubject } from 'rxjs'; export enum MessageType { warning = 'warning', info = 'info', error = 'danger' } @Injectable() export class AngularReactiveMess...
//------------------------------------------------------------------------------------------------------- // Copyright (C) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE.txt file in the project root for full license information. //---------------------------------------------------------...
/** * If the model is not fit this classifier, it will be error. * <p>CreateTime : 2014-11-19 * @author xiaoxiao * */ public class ModelException extends Exception{ public ModelException(){} public ModelException(String msg){ super(msg); } }
Translating lifestyle intervention to practice in obese patients with type 2 diabetes: Improving Control with Activity and Nutrition (ICAN) study. OBJECTIVE To assess the efficacy of a lifestyle intervention program that can be readily translated into clinical practice for obese patients with type 2 diabetes. RESEAR...
def cmu_mocap(subject, train_motions, test_motions=[], sample_every=4, data_set='cmu_mocap'): subject_dir = os.path.join(data_path, data_set) all_motions = train_motions + test_motions resource = cmu_urls_files(([subject], [all_motions])) data_resources[data_set] = data_resources['cmu_mocap_full'].copy(...
// UnmarshalBytes implements marshal.Marshallable.UnmarshalBytes. func (s *Sembuf) UnmarshalBytes(src []byte) { s.SemNum = uint16(hostarch.ByteOrder.Uint16(src[:2])) src = src[2:] s.SemOp = int16(hostarch.ByteOrder.Uint16(src[:2])) src = src[2:] s.SemFlg = int16(hostarch.ByteOrder.Uint16(src[:2])) ...
<reponame>IBM/FHIR /* * (C) Copyright IBM Corp. 2021 * * SPDX-License-Identifier: Apache-2.0 */ package com.ibm.fhir.operation.cpg; import static com.ibm.fhir.cql.helpers.ModelHelper.fhircode; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertNotNull; import static org.mockito.Moc...
// Give an example of Switch case statement in JAVA Program. public class switcheg { public static void main (String[] args){ char ch = 'o'; switch (ch){ case 'a': System.out.println ("Vowel"); break; case 'e': System.out.println ("Vowel"); break; case 'i': System.out.printl...
//------------------------------------------------- // view_notify - handle notification of updates // to cursor changes //------------------------------------------------- void debug_view_disasm::view_notify(debug_view_notification type) { if((type == VIEW_NOTIFY_CURSOR_CHANGED) && (m_cursor_visible == true)) adj...
Method and system for microfluidic imaging and analysis In this specification, the sample, using the image from a device such as a consumer's cell phone, the method and device for assessing the presence of disease or organism are disclosed. A method for creating a sample data, a i) a series of photons from a light sou...
#!/usr/bin/env python n, k = list(map(int, input().split(' '))) nums = list(map(int, input().split(' '))) pebbles = [[] for i in range(len(nums))] smallest = min(nums) prefix = smallest * [1] nums = list(map(lambda x: x - smallest, nums)) for c in range(1, k+1): for i, e in enumerate(nums): if e != 0: ...
/** * {@link EventHandlers} is a component that allows to register custom event handlers for {@link Requester} specific events. */ public class EventHandlers<T> { private BiConsumer<Acknowledge, MessageContext> onAcknowledge = (acknowledge, msgContext) -> {}; private BiConsumer<T, MessageContext> onResponse ...
import { Component, OnInit } from '@angular/core'; import { AuthenticationService, RegionService, LanguageService, ProfileService, GameService } from '../../_services'; import { FormGroup, FormBuilder, Validators, AbstractControl } from '@angular/forms'; import { PublicUser } from 'src/app/data_objects/publicuser'; im...
import { Injectable } from '@nestjs/common'; import { ElasticsearchService } from '@nestjs/elasticsearch'; const axios = require('axios'); @Injectable() export class SearchService { constructor(private readonly elasticsearchService: ElasticsearchService) {} async search(queryBuilder) { console.log("queryBuild...
Isolation of Mesophyll Protoplast and Establishment of Gene Transient Expression System in Cotton This paper aimed to set up a stable and efficient transient expression system based on cotton mesophyll protoplasts produced from cotyledon. We analyzed the key factors related to isolating effectively cotton mesophyll pr...
// New returns a new K-D tree built using the given nodes. // Building a new tree with nodes that are already members of // K-D trees invalidates those trees. func New(nodes []*T) *T { if len(nodes) == 0 { return nil } return buildTree(0, preSort(nodes)) }
<gh_stars>1-10 # pylint: disable=no-self-use,redefined-outer-name from io import StringIO import sys import pytest from mock import patch from flashback.debugging import caller @pytest.fixture def output(): return StringIO() class TestCaller: def test_execution(self, output): caller_instance = ca...
def nb_to_html_cells(nb) -> list: html_exporter = HTMLExporter() html_exporter.template_file = 'basic' (body, resources) = html_exporter.from_notebook_node(nb) return BeautifulSoup(body, 'html.parser').findAll('div', class_='cell')
/** * @author monty * * * Concerns: * - Manages Sectors and Players in those sectors * - Game events management */ public class GameEngine implements Runnable { private GameWorld world; private int timeStep; private GameEngineListener listener; private GameDelegate delegate; private GameAudioManager audi...
Comedian and television host Chelsea Handler tends not to sugarcoat things. As Jenny McCarthy once told the New York Times, “If you’re going to get your lip injected 12 times, Chelsea Handler is going to be the first person to point it out.” I need auto correct for my mouth. — Chelsea Handler (@chelseahandler) Novembe...
def down(self, argv): res = self._dbg.go_down() if res: self._print(res) self._reset_namespace()
<reponame>JacobAlbus/songster<filename>scripts/pull_data.py # Imports import lyricsgenius import json import argparse from pathlib import Path import os # Constants DATA_DIR = Path('../data/') SECRETS = Path('./secrets.json') """ This script downloads song data corresponding to the passed parameters Exam...
#!/usr/bin/env python # encoding: utf-8 # package ''' @author: yuxiqian @license: MIT @contact: <EMAIL> @software: electsys-api @file: electsysApi/interface/__init__.py @time: 2019/1/9 ''' from .interface import * __all__ = ['ElectCourse', 'PersonalCourse', 'PersonalExam', 'PersonalScore']
The attorney representing the family of Ernesto Duenez has presented a graphic video of the police officer shooting him 11 times, just one day after the said officer was cleared of wrongdoing. Duenez was wanted for a domestic violence incident and several police officers in patrol cars were waiting for him to come hom...
// Test 6 - CreateTrafficQueues-Upstream FIXED_QUEUE failure case TEST_F(TestCreateTrafficQueues, CreateUpstreamFixedQueueFailure) { traffic_queues->set_uni_id(0); traffic_queues->set_port_no(16); traffic_queue_1->set_direction(tech_profile::Direction::UPSTREAM); bcmos_errno olt_cfg_set_res = BCM_ERR_IN...
//Takes the data from the old hash table and inserts it into the new hash table public void rehash(String[] oldTable, String[] newTable) { for (int i = 0; i < oldTable.length; i++) { if (oldTable[i] != null) { int hashVal = hash(oldTable[i], newTable.length); if (newTable[hashVal] == null) newTable[hashVa...
/** * The class Comment - wrapper for Item. * * @author Pavlov Artem * @since 21.07.2017 */ public class Comment { /** * The comporator for sort comment to date and time. */ private Comparator<Comment> sortDate = new Comparator<Comment>() { @Override public int compare(Comment com...
def move_geo(self, oname=None, oindex=0, dx=0, dy=0, dz=0): if not self.valid: return None geo = self.get_top_geo() if oname is None else self.get_geo(oname, oindex) return geo.move_geo(dx, dy, dz)
export function toCamelCase(v: any): any { return toSomeCase(v, (s) => s.replace(/_[a-z]/g, (match) => match.charAt(1).toUpperCase())); } export function toSnakeCase(v: any): any { return toSomeCase(v, (s) => s.replace(/[A-Z]/g, (match) => '_' + match.toLowerCase())); } function toSomeCase(v: any, fn: (s: string)...
def add_task_name_and_id_to_log_messages( task_id, task, *_args, **_kwargs ): root_loggers_handler = logging.getLogger().handlers[0] root_loggers_handler.setFormatter( logging.Formatter( "[%(asctime)s: %(levelname)s/%(processName)s] " + f"{task.name}[{task_id}] " ...
An Upstate New York high school student wants his classmates to remember him as someone who loves cats. And lasers. Schenectady High School senior Draven Rodriguez has started a petition to get his unusual photo featured in the yearbook as his senior portrait. "I'm hoping that with enough signatures, my school simply ...
<gh_stars>1-10 package net.minecraft.profiler; import com.google.common.collect.Maps; import java.lang.management.ManagementFactory; import java.lang.management.RuntimeMXBean; import java.net.MalformedURLException; import java.net.URL; import java.util.HashMap; import java.util.Iterator; import java.util.LinkedHashMap...
package be.ida_mediafoundry.jetpack.patchsystem.servlets; import be.ida_mediafoundry.jetpack.patchsystem.JetpackConstants; import be.ida_mediafoundry.jetpack.patchsystem.executors.JobResult; import be.ida_mediafoundry.jetpack.patchsystem.services.PatchSystemJobService; import com.google.gson.Gson; import org.apache.sl...
<gh_stars>0 import tensorflow as tf import os # load model config def load_config(config_path="config.json", verbose=1): import json with open(config_path, "r") as config_file: config_data = json.load(config_file) # show content of config if verbose: print(json.dumps(config_data, inden...
// GetPreference returns the Preference Option value, as described in RFC 3315, // Section 22.8. // // The integer preference value is sent by a server to a client to affect the // selection of a server by the client. func GetPreference(o dhcp6.Options) (Preference, error) { v, err := o.GetOne(dhcp6.OptionPreference) ...
<filename>components/application-operator/pkg/controller/reconciler_test.go<gh_stars>0 package controller import ( "context" "testing" "github.com/kyma-project/kyma/components/application-operator/pkg/controller/mocks" helmmocks "github.com/kyma-project/kyma/components/application-operator/pkg/kymahelm/remoteenvi...
/** * @author Anton Katilin * @author Vladimir Kondratyev */ final class ShowHintAction extends AnAction { private final QuickFixManager myManager; public ShowHintAction(@Nonnull final QuickFixManager manager, @Nonnull final JComponent component) { myManager = manager; registerCustomShortcutSet(ActionManager...
def crypto_onetimeauth(message, key): if len(key) != crypto_onetimeauth_KEYBYTES: raise ValueError('Invalid secret key') tok = ctypes.create_string_buffer(crypto_onetimeauth_BYTES) _ = nacl.crypto_onetimeauth( tok, message, ctypes.c_ulonglong(len(message)), key) return tok.raw[:crypto_on...
use std::io::{Write, Read}; use crate::{RpcValue, MetaMap, Value, Decimal, DateTime}; use std::collections::BTreeMap; use crate::writer::{WriteResult, Writer, ByteWriter}; use crate::metamap::MetaKey; use crate::reader::{Reader, ByteReader, ReadError}; use crate::rpcvalue::{Map}; pub struct CponWriter<'a, W> where...
<commit_msg>Use BaseCommand instead of NoArgsCommand <commit_before>from django.core.management.base import NoArgsCommand class Command(NoArgsCommand): def handle_noargs(self, **options): from symposion.proposals.kinds import ensure_proposal_records ensure_proposal_records() <commit_after>from d...
<filename>2 sem/cw7/vector_d.c #include <stdlib.h> #include <stdbool.h> #include "vector_d.h" void d_create(vector_d* v){ v->size = 0; v->capacity = 0; v->buffer = NULL; } void d_destroy(vector_d* v){ v->size = 0; v->capacity = 0; free(v->buffer); v->buffer = NULL; } int d_siz...
/** * Copyright 2015 Red Hat, Inc. and/or its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, s...
<reponame>LevyForchh/mac-branch-deep-linking /** @file BNCApplication.h @package Branch @brief Current application and extension info. @author <NAME> @date January 8, 2018 @copyright Copyright © 2018 Branch. All rights reserved. */ #import "BranchHeader.h" NS_ASSUME_N...
On March 30, theaters across the U.S. will, for one night only, will screen a movie comprised of concert footage from throughout Led Zeppelin 's career. Now we know what songs we can expect to hear. The 13 songs, listed below, are all taken from the 2003 Led Zeppelin DVD and run in chronological order of their perform...
/** * Fail entries matching a specified ExchangeContext. * * @param[in] ec A pointer to the ExchangeContext object. * * @param[in] err The error for failing table entries. * */ void ChipExchangeManager::FailRetransmitTableEntries(ExchangeContext * ec, CHIP_ERROR err) { for (int i = 0; i < CHIP_...
///// \file python_module_interaction.cpp ///// ///// \brief ///// ///// \authors maarten ///// \date 2020-11-27 ///// \copyright Copyright 2017-2020 The Institute for New Economic Thinking, ///// Oxford Martin School, University of Oxford ///// ///// Licensed under the Apache Licens...
//ExecuteState define the current_state using argument name in the user's data. // //If exists callback in user's data (state_with_callback), execute it first with the executeCallback method. //Terminates execution if callback returns false. // //If there is no callback, the flow continues and if the current state has ...
package org.travlyn.shared.model.api; import com.fasterxml.jackson.annotation.JsonProperty; import io.swagger.annotations.ApiModelProperty; import org.springframework.validation.annotation.Validated; import org.travlyn.shared.model.db.StopEntity; import org.travlyn.shared.model.db.StopRatingEntity; import javax.valid...
Yahoo CEO Marissa Mayer stands to make $55 million if the struggling company gets sold -- and she gets booted. The company revealed Mayer's severance package and her 2015 pay when it updated its annual report on Friday evening. Mayer's golden parachute would be a huge payout for a chief executive who hasn't been able...
def menu_option_load(config, config_list): print("List of available saved configurations:") print(config_list) while True: config_name = input("Enter a name of a configuration to load (enter \"end\" to return to the menu): ") if config_name == "end": break elif configurat...
// /src/content/bolt/materialiconstwotone/24px.svg import { createSvgIcon } from './createSvgIcon'; export const SvgBoltTwotone = createSvgIcon( `<svg xmlns="http://www.w3.org/2000/svg" enable-background="new 0 0 24 24" height="24" viewBox="0 0 24 24" width="24"> <g> <rect fill="none" height="24" width="...
Austin, Texas. Shutterstock In the wee hours of the morning on Sunday, the mighty state of Texas was asleep. The honky-tonks in Austin were shuttered, the air-conditioned office towers of Houston were powered down, and the wind whistled through the dogwood trees and live oaks on the gracious lawns of Preston Hollow. Ou...
#ifndef CYFRE_TRANSPOSE_CPP #define CYFRE_TRANSPOSE_CPP #include <iostream> #include "../classes/matrix_class.hpp" namespace cyfre { /// transpose self template<class T> void mat<T>::transpose() { #ifdef DISPLAY_FUNC_CALLS auto start = std::chrono::high_resolution_clock::now(); ...
<reponame>COHRINT/pnt-ddf<gh_stars>0 import re from copy import copy import numpy as np from bpdb import set_trace from numpy import sqrt from numpy.linalg import cholesky, inv, norm from scipy.linalg import block_diag from scipy.optimize import least_squares from scipy.spatial.distance import mahalanobis from scipy.s...
<reponame>ericmillin/client // Copyright © 2019 The Knative 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 requi...
#ifndef vtkTestingColors_h #define vtkTestingColors_h // Standard colors used by many vtk scripts static float vtk_antique_white[3] = { 0.9804, 0.9216, 0.8431 }; static float vtk_azure[3] = { 0.9412, 1.0000, 1.0000 }; static float vtk_bisque[3] = { 1.0000, 0.8941, 0.7686 }; static float vtk_blanched_almond[3] = { 1.0...
def run_all(directory='.'): results = [] for file in _findfiles(directory): results.append(run_one(file)) return results
<filename>src/components/header.tsx import React from "react"; import { Link } from "gatsby"; import "../styles/components/header.scss"; type HeaderState = { showDropdown: boolean; }; type HeaderProps = { title: string; links: Array<{ name: string; path: string }>; }; class Header extends React.Component<Header...
<filename>Pro5/src/com/cn/test1.java package com.cn; import java.io.*; public class test1 { /** * @param args */ public static void main(String[] args) { BufferedReader br1 = null; BufferedReader br2 = null; BufferedWriter bw = null; // TODO Auto-generated method stub try { br1 = new Buffer...
A New Algorithm for Real-time Implementation of Order-statistic Filters In this paper we introduce a new algorithm for implementing Ll-lters which are special nonlin-ear digital lters generalizing and combining L-lters and FIR lters in an optimal way. Although the proposed algorithm requires quite more comparisons tha...
// The util message of basic DPOP. // For each *valid* value combination of the boundary variables it stores the // utility value associated to such value combination and the the best value // combination of its private variables. // // @note: // The values are hence retrieved in the value propagation phase, either ...
<reponame>nilye/nib import {Editor, Path, Node, Root} from "../.."; export const NodeStep = { insert( root: Root | Node, path: Path, node: Node ){ let index = path.pop(), parent = Node.get(root, path) as Node parent.nodes.splice(index, 0, node) }, re...
/* a specialized version of the standard ngx_conf_parse() function */ char * ngx_stream_lua_conf_lua_block_parse(ngx_conf_t *cf, ngx_command_t *cmd) { ngx_stream_lua_block_parser_ctx_t ctx; int level = 1; char *rv; u_char *p; size_t len; n...
<reponame>cgreencode/Nimbus """ Rename this file to 'secret.py' once all settings are defined """ SECRET_KEY = "..." HOSTNAME = "example.com" DATABASE_URL = "mysql://<user>:<password>@<host>/<database>" AWS_ACCESS_KEY_ID = "12345" AWS_SECRET_ACCESS_KEY = "12345"
#include <stdio.h> #include "optin.h" int main(int argc, char** argv) { int ret, i; optin* o; /* Option variables */ int test = -1; int ival1 = 10; int ival2 = 0; float fval1 = 0.7f; float fval2 = 0.0f; int flagval1 = 0; int flagval2 = 0; char* strval1; char* strva...
// GetListCatalogPrivateEndpointsSortOrderEnumValues Enumerates the set of values for ListCatalogPrivateEndpointsSortOrderEnum func GetListCatalogPrivateEndpointsSortOrderEnumValues() []ListCatalogPrivateEndpointsSortOrderEnum { values := make([]ListCatalogPrivateEndpointsSortOrderEnum, 0) for _, v := range mappingLi...
The USACECOM Digital Integrated Lab infrastructure The US Army Communications-Electronics Command (CECOM) Research and Engineering Center (RDEC) has developed at Fort Monmouth, New Jersey an integrated advanced research environment known as the Digital Integrated Laboratory (DIL). The DIL allows users to rapidly creat...
def aboutToShowContextMenuEvent(self): if len(self._items) > 0: self._popupMenu.clear() itemSelected = self.selectedItems()[0] if id(itemSelected) in self._items: for action in self._items[id(itemSelected)]: self._popupMenu.addAction(action)
def print(*objects, sep=None, end=None): if sep is None: sep = ' ' if end is None: end = '\n' array = map(str, objects) printed = sep.join(array)+end try: if objects[0].__class__ is str: printed = objects[0] except: pass try: PyOutputHelper...
class Undirected_Graph_Node: """ Undirected Graph Node object """ def __init__(self, val=0, neighbors=None): self.val = val self.neighbors = neighbors if neighbors is not None else []
/* estimate the cost-saving if object o from IC p is placed in register r */ int cost_savings(struct IC *p,int r,struct obj *o) { int c=p->code; if(o->flags&VKONST){ return 0; } if(o->flags&DREFOBJ) return 4; if(c==SETRETURN&&r==p->z.reg&&!(o->flags&DREFOBJ)) return 3; if(c==GETRETURN&&r==p->q1.r...
Natural Medicines for Psychotic Disorders Abstract Patients with psychotic disorders regularly use natural medicines, although it is unclear whether these are effective and safe. The aim of this study was to provide an overview of evidence for improved outcomes by natural medicines. A systematic literature search was ...
// ConvertFunction returns the right GDNative 'As<Type>' function for this param kind as a string func (rmp *registryMethodParam) ConvertFunction() string { conversions := map[string]string{ "bool": "AsBool()", "uint": "AsUint()", "int": "AsInt()", "float64": "...
/** * * @author Kevin R. Dixon */ public class DefaultWeightedPairTest extends DefaultPairTest { public DefaultWeightedPairTest(String testName) { super(testName); } /** * Test of getWeight method, of class gov.sandia.cognition.util.DefaultWeightedPair. */ public void testGetW...
// UnmarshalString parses given string and constructs a Token from it or fails // with an error. func UnmarshalString(s string) (Token, error) { var t Token data, err := unescapeSplit(s, 4) if err != nil { return t, wrap("token", err) } t.rawPayload = []byte(data[0]) t.Email = data[3] payload, err := unescapeS...
/* processes deferred events and flush wmem */ static void mptcp_release_cb(struct sock *sk) { for (;;) { unsigned long flags = 0; if (test_and_clear_bit(MPTCP_PUSH_PENDING, &mptcp_sk(sk)->flags)) flags |= BIT(MPTCP_PUSH_PENDING); if (test_and_clear_bit(MPTCP_RETRANSMIT, &mptcp_sk(sk)->flags)) flags |= BIT...
/** * Tests the given argument values against the local preconditions, which are the {@link * ExecutableBooleanExpression} objects in {@link #preExpressions} in this {@link * ExecutableSpecification}. * * @param args the argument values * @return false if any local precondition fails on the argument v...
chars = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'] #<Z_Len(chars),+> algebra s = raw_input() def get_index(a_list, elem): for i in range(0, len(a_list)): if elem == a_list[i]: return i def get_smallest_dist_mod(a,b,mod): #Length to fill the...
#pragma once #include "../Core/Defs.hpp" #include "SoundCore.hpp" namespace doll { DOLL_FUNC detail::ISoundHW *DOLL_API snd_xa2_initHW(); }