content
stringlengths
10
4.9M
/** * Creates and returns a new list of updates for this model. * * @return the list of updates */ public List<Bson> toUpdates() { var updates = new ArrayList<Bson>(); appendUpdates(updates); return updates; }
/** * Generates a HMAC digest of the key and data by using the given * algorithm. */ static cbsasl_error_t HMAC_digest(cbsasl_auth_mechanism_t auth_mech, const unsigned char *key, unsigned int keylen, const unsigned char *data, unsigned int datalen, unsigned char *digest, ...
package com.retheviper.springbootsample.api.v1.controller.board; import com.retheviper.springbootsample.api.v1.form.board.CommentForm; import com.retheviper.springbootsample.api.v1.viewmodel.board.CommentViewModel; import com.retheviper.springbootsample.application.dto.board.ArticleDto; import com.retheviper.springboo...
def split_episodes(meas_file): f = open(meas_file, "rU") header_details = f.readline() header_details = header_details.strip().split(',') f.close() print (header_details) details_matrix = np.loadtxt(open(meas_file, "rb"), delimiter=",", skiprows=1) print (details_matrix) previous_pos = [...
#include "mpi.h" #include <iostream> void printArray(int* arr, int n) { for (int i = 0; i < n; i++) { std::cout << arr[i] << " "; } std::cout << std::endl; } void initArray(int* arr, int n) { for (int i = 0; i < n; i++) { arr[i] = rand() % 10; } } int main(int argc, char** argv) { int proc...
<reponame>zxc123zxc/mgit module Foreign.LibGit.Status ( GitStatusList(..), GitDiffFile(..), GitDiffDelta(..), GitStatusEntry(..), c_git_status_list_new_integr, c_git_status_byindex, c_git_status_list_entrycount, c_git_status_list_free ) where import System.IO (IO) import Text.Show (Show) import For...
// This helper method initializes services, apps, metrics and usages in the apisonator for the tests. func (suite *SingletonFlushTestSuite) initializeApisonatorState() { require.Eventually(suite.T(), func() bool { fmt.Printf("Creating service with service_id: %s, service_token:%s", suite.ServiceID, suite.ServiceToke...
import * as React from "react"; import { FiInfo } from "react-icons/fi"; import * as Bootstrap from "react-bootstrap"; export interface IInfoProps { id: string; title: string; detail: string | JSX.Element; } export default class Info extends React.Component<IInfoProps> { render() { return ( ...
def load_texture(filename): textureSurface = pygame.image.load(filename) textureData = pygame.image.tostring(textureSurface,"RGBA",1) width = textureSurface.get_width() height = textureSurface.get_height() ID = glGenTextures(1) glBindTexture(GL_TEXTURE_2D,ID) glTexParameteri(GL_TEXTURE_2D, G...
<gh_stars>0 /** * Copyright 2012 NetDigital Sweden AB * * 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 applic...
def check_vulnerabilities(banner, filename): with open(filename, 'r') as f: for line in f.readlines(): if line.strip('\n') in banner: print "[+] Server is vulnerable: {}".format(banner.strip('\n'))
/** * Test class for local ZigBee API. */ public class ZigBeeApiCc2531ImplTest { /** * The LOGGER. */ private final static org.slf4j.Logger LOGGER = LoggerFactory.getLogger(ZigBeeApiCc2531ImplTest.class); /** * Tests local ZigBee API. */ @Test @Ignore public void testZigB...
// Close closes the stream. // Calling methods on a closed stream may panic. func (r *RecordStream) Close() { r.c.c.Request(&proto.DeleteRecordStream{StreamIndex: r.index}, nil) r.running = false r.c = nil }
<gh_stars>10-100 package global import ( "github.com/TrashPony/Veliri/src/mechanics/factories/boxes" "github.com/TrashPony/Veliri/src/mechanics/gameObjects/boxInMap" "github.com/TrashPony/Veliri/src/mechanics/gameObjects/player" "github.com/TrashPony/Veliri/src/mechanics/globalGame" "github.com/TrashPony/Veliri/s...
/** * Tests editing a inventory item and giving it a productId that doesn't exist */ @Test void editItemInvalidProductId() throws Exception { Product product = productRepository.findById(new ProductId("p1", businessId)).orElseThrow(); InventoryItem item = new InventoryItem(product, 2, 2.00...
Note: This story was edited at 14.00hrs, to include some counter arguments to our angry rant. You can read them at the bottom of the story. Seven weeks ago, the Conservative party won Britain’s general election on a manifesto which pledged to rebalance Britain’s economy and turn the cities of England’s M62 corridor in...
#![no_std] pub mod config; pub mod measurement; /// Messages Overview /// Description Default Length Remark /// CAN-ID DLC /// IVT_Msg_Command 0x411 8 Function commands, SET and GET commands. A command-ID-byte is included for identification /// IVT_Msg_Debug 0x510 8 ...
import glob import os import click import pandas as pd import scphylo as scp from scphylo.ul._servers import cmd, write_cmds_get_main @click.command(short_help="Run mpileup.") @click.argument( "outdir", required=True, type=click.Path( exists=True, file_okay=False, dir_okay=True, readable=True, r...
/*--------------------------------------------------------------------------------------------- * Copyright (c) Bentley Systems, Incorporated. All rights reserved. * See LICENSE.md in the project root for license terms and full copyright notice. *----------------------------------------------------------------------...
/** * Non-API analysis data container; used to pass information about a single * analysis (detail) back and forth between the service and data factory */ public class AnalysisDetailWithUser extends AnalysisDetailImpl { private long _userId; public AnalysisDetailWithUser(ResultSet rs) throws SQLException { ...
def loadAudioFile(self, filePath): self.player.stop() fileData, self.sampleRate = sf.read(filePath, dtype = 'float32') self.audioLength = len(fileData) try: self.channels = len(fileData[0]) except: self.channels = 1 self.fileTrack.loadSamples(fileD...
/** * Sends message to chat * @param message * @param notTo can be null */ public void send(Message message,@Nullable ServerClient notTo) { history.add(message); if(message.isSystemMessage()) { server.getConnectedClients().forEach(c -> { if(c.SAFE_CONNECTION && c!= notTo) { c.sendPacket(new ...
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.peering.models; import com.azure.core.util.ExpandableStringEnum; import com.fasterxml.jackson.annotation.JsonCreator; import jav...
/** * This method is intended to be used when giving an item (focus) and a list * of potentially related items we need to know which of these other items * are already in a specific relationship with the focus item and, * by exclusion which ones are not yet related. * * @param typeId ...
import {deleteSchema, getJsonType} from "@tsed/common"; import {expect} from "chai"; describe("getJsonType()", () => { it("should return number", () => { expect(getJsonType(Number)).to.eq("number"); }); it("should return string", () => { expect(getJsonType(String)).to.eq("string"); }); it("should r...
<gh_stars>1-10 use super::{HitRecord, Hittable, AABB}; use crate::{FloatTy, Mat44, Pt3, Ray}; pub struct TransformHittable<H: Hittable> { inner: H, transform: Mat44, inverse: Mat44, } impl<H: Hittable> TransformHittable<H> { pub fn new(inner: H, transform: Mat44) -> Self { let inverse = transf...
/****************************************************************************//** * @file mc200_xflash.h * @brief XFLASH driver module header file. * @version V1.0.0 * @date 18-April-2012 * @author CE Application Team * * @note * Copyright (C) 2012 Marvell Technology Group Ltd. All rights reserved...
// Draws two copies of the format bits (with its own error correction code) based // on the given mask and error correction level. This always draws all modules of // the format bits, unlike drawWhiteFunctionModules() which might skip black modules. static void drawFormatBits(enum qrcodegen_Ecc ecl, enum qrcodegen_Mask...
package main import ( "bufio" "bytes" "context" "crypto/tls" "crypto/x509" "errors" "fmt" "io/ioutil" "math" "math/rand" "net" "net/http" "net/url" "os" "strings" "time" b64 "encoding/base64" "github.com/ShowMax/go-fqdn" "github.com/cyralinc/pushprox/util" "github.com/cyralinc/wrapper-utils/iploo...
<gh_stars>1-10 interface KoaContext { path: string, req: IncomingMessage, [propname: string]: any, }
# Copyright (C) 2020 FireEye, Inc. All Rights Reserved. import speakeasy.winenv.defs.nt.ddk as ddk from speakeasy.winenv.api import api class Usbd(api.ApiHandler): """ Implements the USB stack driver (USBD.sys) """ name = 'usbd' apihook = api.ApiHandler.apihook impdata = api.ApiHandler.impda...
Adam lived 930 years (Gen. 5:5)--"And all the days that Adam lived were nine hundred and thirty years: and he died." Seth lived 912 years (Gen. 5:8)--"And all the days of Seth were nine hundred and twelve years: and he died." Methuselah lived 969 years (Gen. 5:27)--"And all the days of Methuselah were nine hundred sixt...
// Pipe is a utility to pipe from the reader to the writer, and // writes the error to res (may be nil). func Pipe(reader, writer SSConn, buf *SSBuffer, res chan error) { var err error defer func() { res <- err }() for { if err = writer.SSWrite(buf); err != nil { return } err = reader.SSRead(buf) if err =...
# -*- coding: utf-8 -*- # Usage: py.test tests import sys import os import json import tempfile import shutil import collections import pytest from os import path from keyvi.compiler import JsonDictionaryCompiler, JsonDictionaryMerger from keyvi.dictionary import Dictionary from keyvi import loading_strategy_types ...
n=int(input()) hl=list(map(int,input().split())) c=0 mi=min(hl) c+=mi hdebug=hl[:] hdebug.append(0) if mi!=0: for i in range(len(hl)): hl[i]-=mi hl.append(0) for x in range(100): a=101 for i in range(len(hl)): if hl[i]!=0 and a>hl[i] and a==101: a=i if hl[i]==0 and a<i: mi2=min(hl[a:i]) ...
// Help methods for tesing pages with multiple showads snippets. GoogleString GetHtmlPageMultipleShowAds() { return GetPage( StrCat(GetShowAdsDataSnippetWithContent(GetShowAdsDataContent1()), kShowAdsApiCall, GetShowAdsDataSnippetWithContent(kShowAdsDataContentFormat2), kS...
Russia is not planning to supply Syria with any weapons beyond the current contracts that are nearing completion, Russian Foreign Minister Sergey Lavrov said refuting speculations that Moscow was going to sell S-300 air defense systems to Damascus. “Russia does not plan to sell,” Lavrov told reporters on being asked o...
package git import ( "fmt" "os/exec" "strings" ) var execCommand = exec.Command // Tags returns the list of git tags as a string slice func Tags() ([]string, error) { cmd := execCommand("git", "tag") out, err := cmd.Output() if err != nil { return nil, fmt.Errorf("fetching git tags: %v", err) } trimmed :=...
from sympy.core.basic import Basic from sympy.core.numbers import Rational from sympy.core.singleton import S, Singleton def test_Singleton(): global instantiated instantiated = 0 class MySingleton(Basic, metaclass=Singleton): def __new__(cls): global instantiated instantia...
/** * Update procedure from the view model in order to get new information * without the need to manually refresh. */ @Override public void update() { HashSet<Student> students = studentMaterialSelector .getCurrentlySelectedStudents(); HashSet<BorrowedMaterial> materials = studentMaterialSelector .ge...
// // PDLLayerDebuggerWindow.h // Poodle // // Created by Poodle on 15/10/2016. // Copyright © 2016 Poodle. All rights reserved. // #import "PDLScreenDebuggerWindow.h" @interface PDLLayerDebuggerWindow : PDLScreenDebuggerWindow @property (nonatomic, weak) CALayer *debuggingLayer; @end
/* BEGIN_ICS_COPYRIGHT5 **************************************** Copyright (c) 2015-2017, Intel Corporation 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 copyrig...
<reponame>edisonlee0212/UniEngine #pragma once #include <ISerializable.hpp> #include <IPrivateComponent.hpp> #include <Entity.hpp> namespace UniEngine { class Scene; struct EntityMetadata : public ISerializable { std::string m_name; unsigned m_version = 1; bool m_enabled = true; Entity m_parent = Entity...
<reponame>jamesrwhite/minicache package client import ( "net" log "github.com/Sirupsen/logrus" "github.com/jamesrwhite/minicached/store" ) type Client struct { Id string Connection net.Conn State uint8 Input string Command string Record *store.Record } const STATE_DEFAULT uint8 = 1...
def update_store_from_ical(): icspath = gconfig.get('Ical', 'path') logging.debug("Update meeting store from %s", icspath) levents = get_events(icspath, 90) counter = 0 uidlist = [] for e in levents : data = make_data_from_event(e) update_store_with_data(data) uidlist....
<reponame>YuKongEr/yRpc<filename>src/main/java/cn/yukonga/yrpc/server/annotation/EnableYRpcServer.java package cn.yukonga.yrpc.server.annotation; import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.Import; import org.springframework.core.annotation.AliasFor; impo...
Surviving the World A Photocomic Education by Dante Shepherd Lesson #903 - Slippery Slopes I'd actually written and prepped most of this comic before Maryland held its debate on the gay marriage bill on Friday, but considering how it turned out (and considering I'm currently living here), it feels appropriate to get ...
def _GSA(self, sentence): keywords = ['NMEA', 'Mode', 'FixStatus', 'SatelliteUsed01', 'SatelliteUsed02', 'SatelliteUsed03', 'SatelliteUsed04', 'SatelliteUsed05', 'SatelliteUsed06', 'SatelliteUsed07', 'SatelliteUsed08', 'SatelliteUsed09', ...
Melioidosis presenting with mediastinal lymphadenopathy masquerading as malignancy: a case report Introduction Melioidosis, endemic in Thailand and in the Northern Territory of Australia is an emerging infectious disease in India which can present with varied forms. A case of melioidosis, presenting as a rare anterior...
def load_data_nmt(batch_size, max_len, num_examples=1000): def preprocess_raw(text): text = text.replace('\u202f', ' ').replace('\xa0', ' ') out = '' for i, char in enumerate(text.lower()): if char in (',', '!', '.') and text[i-1] != ' ': out += ' ' ou...
/** Tags or untags all messages in the conversation. Persists the change * to the database and cache. If the conversation includes at least one * unread {@link Message} whose tagged state is changing, updates the * {@link Tag}'s unread count appropriately.<p> * * Messages in the conversat...
<reponame>matheuscscp/IDJ #include <iostream> #include <fstream> #include <ctime> #include "simplestructures.hpp" using namespace std; MainParam::MainParam (int argc, char** argv) : argc ( argc ), argv ( argv ) { } bool MainParam::find (const string& what) const { for ( int i = 0; i < argc; ++i ) { if ( what ==...
/** * Assigns timestamps to the elements in the data stream and generates watermarks to signal * event time progress. The given {@link WatermarkStrategy} is used to create a {@link * TimestampAssigner} and {@link WatermarkGenerator}. * * <p>For each event in the data stream, the {@link TimestampAssigner#extra...
def gen_training_dataset_part(dataset_root, idx_map, freq_counter, *passes, **kwargs): x_tmp = [] labels = [] dataset_names = sorted(iterkeys(idx_map)) for label, dataset_name in enumerate(dataset_names): idx_array = idx_map[dataset_name] idx_size = len(idx_array) for i, idx in e...
Mariano Rajoy, Spain's prime minister, steered the embattled nation towards a €300bn (£237bn) bailout yesterday as he said he was ready to act "in the best interests of the Spanish people". Mr Rajoy, who is struggling to convince dubious markets that he can bring Spain's deficit back under control, has already asked f...
<filename>cmd/cmd.go package cmd import ( "flag" "fmt" "log" "net/http" "os" "github.com/ouqiang/delay-queue/config" "github.com/ouqiang/delay-queue/delayqueue" "github.com/ouqiang/delay-queue/routers" ) // Cmd 应用入口Command type Cmd struct{} var ( version bool configFile string ) const ( // AppVersion...
/**************************************************************************** ** ** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the plugins of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL21$ ** Commercial License Usage ** Licensees hol...
w=input() k=w[0] sub=w[1:(len(w)+1)] if(len(w)==1 and w.islower()): print(w.upper()) else: if w.isupper(): print(w.lower()) elif(k.islower() and sub.isupper()): k=k.upper() sub=sub.lower() print(k+sub) else: print(w)
<gh_stars>10-100 import * as chai from 'chai'; import * as slimdom from 'slimdom'; import jsonMlMapper from 'test-helpers/jsonMlMapper'; import { evaluateXPathToMap } from 'fontoxpath'; let documentNode; beforeEach(() => { documentNode = new slimdom.Document(); }); describe('map constructor', () => { beforeEach(()...
def load_netcdf(files_list): Data = {} for j, file in enumerate(files_list): file_temp = netcdf.NetCDFFile(file, 'r', maskandscale=True) for key in file_temp.variables.keys(): if key not in Data.keys(): Data[key] = file_temp.variables[key][:] elif key not ...
def calc_ar_props( trace, ar_p, sn=None, g=None, noise_range=(0.25, 0.5), noise_method="mean", lags=5, fudge_factor=0.96, ): g, sn = estimate_parameters( trace, p=ar_p, sn=sn, g=g, range_ff=noise_range, m...
ip = input().split(' ') n = int(ip[0]) k = int(ip[1]) passwords = [] for x in range(n): passwords.append(input()) vanya = input() length = len(vanya) lengths = [] for y in passwords: lengths.append(len(y)) above = 0 below = 0 equal = 0 for x in range(len(lengths)): if lengths[x] < length: above += 1...
C99 selectively accumulates in vulnerable neurons in Alzheimer’s disease Introduction The levels and distribution of amyloid deposits in the brain does not correlate well with Alzheimer’s disease (AD) progression. Therefore, it is likely that Amyloid-precursor-protein proteolytic fragments other than beta-amyloid cont...
// Approach 1: Create Methods that Search for Persons that Match One Characteristic public static void printPersonsOlderThan(List<Person> roster, int age) { for (Person p : roster) { if (p.getAge() >= age) { p.printPerson(); } } }
<gh_stars>1-10 package peji import ( "bytes" "context" "strings" "sync" "time" "github.com/influx6/npkg/njson" "github.com/influx6/sabuhp" "github.com/influx6/sabuhp/mixer" "github.com/influx6/npkg/nerror" "github.com/influx6/npkg/nxid" "github.com/influx6/groundlayer/pkg/domu" "github.com/influx6/groun...
// GetTextChannel Returns a channel from which the text of a file is exported func GetTextChannel(filepath string) chan string { channel := make(chan string, 100) go getText(filepath, channel) return channel }
<reponame>xcomponent/ReactiveXComponent.js export class Utils { public static removeElementFromArray<T>(array: Array<T>, element: T): void { const index = array.indexOf(element); if (index > -1) { array.splice(index, 1); } else { throw new Error('Element to remove not...
Mulberry-Inspired Nickel-Niobium Phosphide on Plasma-Defect-Engineered Carbon Support for High-Performance Hydrogen Evolution. Bimetallic phosphate electrocatalysts on carbon-cloth support are among the most promising industry-relevant solutions for electrocatalytic hydrogen production. To address the persistent issue...
Quantification of the Influence of Deep Basin Effects on Structural Collapse Using SCEC CyberShake Earthquake Ground Motion Simulations This paper examines the effects of earthquake ground motions in deep sedimentary basins on structural collapse risk using physics-based earthquake simulations of the Los Angeles basin...
Adverse Outcomes of Interrupted Precordial Compression During Automated Defibrillation Background—Current versions of automated external defibrillators (AEDs) require frequent stopping of chest compression for rhythm analyses and capacity charging. The present study was undertaken to evaluate the effects of these inte...
/** * Performs cleanup of all statically referenced data used by Mountiplex. * This will clear all caches to allow for proper garbage collection and re-loading. */ public static void unloadMountiplex() { synchronized (unloaders) { for (Runnable unloader : unloaders) { ...
<gh_stars>1-10 # SPDX-License-Identifier: BSD-3-Clause # Copyright Contributors to the OpenDeliveryFormat Project. class ODFFileError(IOError): """ Exception relating to File reading errors within ODF """ pass class ODFValidationError(Exception): """ Exception relating to invalid information...
def to_top(self): self.set('Top', '')
Yesterday, HTC updated their HTC Camera application for devices with HTC Sense. Normally, this isn't worth discussing, but the changelog had an entry for RAW photography mode on the One M9. For those that are unfamiliar with what a RAW photo is, in essence it's exactly what would come to mind when it comes to somethin...
class Segments: """Class representing an `Adafruit 14-segment AlphaNumeric FeatherWing <https://www.adafruit.com/product/3139>`_. Automatically uses the feather's I2C bus.""" def __init__(self): self._segments = None def print(self, value): """ Print a number or text ...
/* * scf_decode32() is an implementation of Base32 decoding as described in * section 6 of RFC 4648 - "The Base16, Base32, and Base64 Data * Encodings". See http://www.ietf.org/rfc/rfc4648.txt?number=4648. The * input stream is divided into groups of 8 encoded characters. Each * encoded character represents 5 bi...
The beauty of the Taj Mahal is overshadowed by some of the world's ugliest poverty. Credit:AP It is against this backdrop that generations of western travellers have sought the authentic Indian experience. But with most taking the same well-worn route, the fast-paced, seemingly unregulated, and often unforgiving touris...
/*! Copyright (c) 2021, XAPPmedia */ import { RequestSlotMap, RequestSlotValues } from "stentor-models"; import { requestSlotValueToString } from "./requestSlotValueToString"; /** * Returns the slot value, if not found it returns undefined. * * @param slots * @param name * @returns */ export function getSlot...
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.io.OutputStream; import java.io.PrintWriter; import java.io.Reader; import java.util.Arrays; import java.util.Comparator; import java.util.StringTokenizer; import java.util.Tree...
/** * Utility class with factory methods to create different types of MQTT messages. */ public final class MqttMessageFactory { public static MqttMessage newMessage(MqttFixedHeader mqttFixedHeader, Object variableHeader, Object payload) { switch (mqttFixedHeader.messageType()) { case CONNECT: ret...
def _similarity(self, anchor: tuple, num_samples: int) -> Tuple[np.ndarray, np.ndarray]: return self.perturb_sentence( anchor, num_samples, **self.perturb_opts, )
/** * Cucumber reporter for ReportPortal that reports scenarios as test methods. * <p> * Mapping between Cucumber and ReportPortal is as follows: * <ul> * <li>feature - TEST</li> * <li>scenario - STEP</li> * <li>step - log item</li> * </ul> * <p> * Dummy "Root Test Suite" is created because in current impleme...
<reponame>luisvt-angular/ngx-dt-table<filename>projects/demo/src/app/pages/column-filter/column-filter.component.ts import { Component, OnInit } from '@angular/core'; import { DtTableComponent } from 'ngx-dt-table'; import { MatButtonToggleChange } from '@angular/material/button-toggle'; @Component({ selector: 'app-...
<reponame>pkdcryptos/https-github.com-alpaca-finance-alpaca-contract-1 import { ethers, upgrades, waffle } from "hardhat"; import { Signer, BigNumberish, utils, Wallet } from "ethers"; import chai from "chai"; import { solidity } from "ethereum-waffle"; import "@openzeppelin/test-helpers"; import { MockERC20, MockE...
/** * Copyright 2011-2016 Asakusa Framework Team. * * 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...
/** * An enumeration that represents action times * for an LDAP trigger specification. * * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a> */ public final class ActionTime { //public static final ActionTime BEFORE = new ActionTime( "BEFORE" ); /** The AFTER instance. */ ...
// This will process implicit route information received from another server. // We will check to see if we have configured or are already connected, // and if so we will ignore. Otherwise we will attempt to connect. func (s *Server) processImplicitRoute(info *Info) { remoteID := info.ID s.mu.Lock() defer s.mu.Unloc...
def handle_exception(exc_type, exc_value, exc_traceback): filename, line, dummy, dummy = traceback.extract_tb(exc_traceback).pop() filename = os.path.basename(filename) error = "%s: %s" % (exc_type.__name__, exc_value) msg = "<html>A critical error has occured.<br/> <b>%s</b><br/><br/>It occurred at <b>...
'Mad Max' fans descend on California desert for Wasteland Festival Think of it as Burning Man for die-hard fans of the cult film 'Mad Max' Festival goers attend the first day of Wasteland Weekend in the high desert community of California City in the Mojave Desert, California, where people are gathering for the world'...
from flask import request from . import bp @bp.route('/task', methods=['GET', 'POST']) def task(): if request.method == 'GET': pass elif request.method == 'POST': pass @bp.route('/task/<int:id>', methods=['GET', 'DELETE', 'PATCH']) def task_id(): if request.method == 'GET': pass...
/** * This event is raised when a new project resource is created * * @author Shane Bryzak */ public class NewResourceEvent { private ProjectResource resource; public NewResourceEvent(ProjectResource resource) { this.resource = resource; } public ProjectResource getResource() { retur...
We reported last week that David Green (Earth to Echo) would be replacing Jonathan Liebsman as director for Teenage Mutant Ninja Turtles 2, and we can now confirm some of the previous rumours surrounding new character additions. According to Omelete (via Collider), long-time adversaries Bebop and Rocksteady will appea...
class IngestionModel: """ This class wrapping ingestion process API's and provide direct bas functionality """ def __init__(self): self._ingestion_stack_url = config.INGESTION_STACK_URL self._ingestion_catalog_url = config.INGESTION_CATALOG_URL self._ingestion_job_service_url = ...
use crate::error::Error; use crate::rc_ref::RcRef; use crate::vm::value::Value; use crate::vm::value::symbol::{ SymbolRegistry, SymbolRegistryRef, }; use crate::vm::scope::{ Scope, ScopeRef, }; use std::rc::{ Rc, }; use std::cell::{ Cell, Ref, RefMut, RefCell, }; pub type IsolateRef = RcRef<Isolate>; #[derive(Debug...
// TestEspeak checks that media.ToAudio() creates the MP3 and OGG files after creating // the WAV files, and that the WAV file can be removed by media.RemoveWAV() // This function also tests media.ImageToVideo() and sets the filename for other tests func TestEspeakToAudio(t *testing.T) { espwav := &EspeakSpeech{"This ...
<gh_stars>0 import {DisplayManager} from "./display_manager"; import {Config} from "./config"; import * as p5 from "p5"; import {global} from "./index"; import {AccuracyEvent} from "./accuracy_event"; import {AccuracyUtil} from "./accuracy_util"; import {AccuracyObserver} from "./accuracy_observer"; import {Drawable} f...
Army Staff Sgt. Jackelyn Walker, right, is the aggressor as she fights Pfc. Gregory Langarica in the first round of the bantamweight championship of the finals of the Fort Hood Combative Championships in Killeen, Texas, February 16, 2012. Langarica wins the fight as the fight was called off in the second round. FORT H...
/** * Handles when the exit button is clicked. */ private class ExitButtonActionHandler implements ActionListener { @Override public void actionPerformed(ActionEvent a) { presenter.Exit(); } }
// NewDefault Create a new MTA server with a // socket protocol implementation. func NewDefault(c Config, h Handler) *DefaultMta { mta := &DefaultMta{ mta: New(c, h), } if mta == nil { return nil } return mta }
<gh_stars>1-10 /// <reference path="./selectFieldOptionMetadataModel.ts" /> /// <reference path="../../../models/core/fieldMetadataModel.ts" /> module Models { 'use strict'; export class SelectFieldMetadata extends FieldMetadata { constructor() { super('Select'); } public ...