content
stringlengths
10
4.9M
def plotVectorSectionsOctree( mesh, m, normal='X', ind=0, vmin=None, vmax=None, subFact=2, scale=1., xlim=None, ylim=None, vec='k', title=None, axs=None, actvMap=None, contours=None, fill=True, orientation='vertical', cmap='pink_r' ): normalInd = {'X': 0, 'Y': 1, 'Z': 2}[normal] antiNormalIn...
CHARACTERISTICS OF FREE RADICAL LIPID PEROXIDATION AND ITS CONNECTION WITH IRON EXCHANGE IN EXPERIMENTAL HEPATITIS THERAPY The purpose of the work is to study the processes of free radical lipid peroxidation, antioxidant system activity and their connection with the iron metabolism in white rats with experimental hepa...
// DecodeHistory decodes the records in a page of data and // returns them in reverse chronological order (most recent first), // to match the order of the history pages themselves. func DecodeHistory(data []byte, family Family) (History, error) { var results History var r HistoryRecord var err error for !allZero(d...
def remove_character(cls, character_id): cls.storage.delete_category(character_id)
import React from 'react'; import Box from '@material-ui/core/Box'; import Typography from '@material-ui/core/Typography'; import Button from '@material-ui/core/Button'; import { Link, LinkProps } from 'react-router-dom'; const AdapterLink = React.forwardRef<HTMLAnchorElement, LinkProps>( (props, ref) => <Link inn...
/** * Configuration that is read from config.json * * @author Fritz Windisch */ public class Configuration { String workspaceDir; long crawlInterval; public Configuration(String workspaceDir, long crawlInterval) { this.workspaceDir = workspaceDir; this.crawlInterval = crawlInterval; ...
class ExtraTaskAttacher: '''Decorator factory to insert extra tasks before and after method calls.''' wrapper_prefix = 'wrap_' len_wrapper_prefix = len(wrapper_prefix) def __call__(self, wrapped_class): '''Wrap methods in wrapped_class with corresponding wrapper in self.''' for self_a...
Europe cannot afford to let New Ukraine die, and the élan of a people fighting to join Europe should be an inspiration to Europe’s old guard to build a New Europe too. Ukraine was already falling off the West’s radar last summer. In east Ukraine, major military offensives were prepared and trip-wires almost crossed; b...
import pydicom from pydicom.dataset import Dataset from pydicom.sequence import Sequence import base64 import pandas as pd import json def df2dicom(df, outdir): """ Fill up a directory with DICOMs initially contained in a dataframe @param dataframe : data structure containing the information needed to reconstr...
<filename>src/case.hs head' :: [a] -> a head' [] = error "No head for empty list" head' (x:_) = x head1 :: [a] -> a head1 xs = case xs of [] -> error "No head for empty list" (x:_) -> x fibonacci :: Int -> Int fibonacci 0 = 0 fibonacci 1 = 1 fibonacci x = fibonacci (x - 1) + fibonacc...
import React from 'react'; import { Story, Meta } from '@storybook/react'; import { Field, Props } from './Field'; import { randomFill } from './filling'; export default { component: Field, title: 'Display/Display', } as Meta; const Template: Story<Props> = (args) => <Field {...args} />; export const DisplayExa...
<filename>src/core/datasource.cpp #include "datasource.h" #include "data/entity.h" #include "data/entitydatapool.h" namespace SUCore { DataSource_I::DataSource_I(const EntityDataBank_C &m_dataBank) : m_dataBank(m_dataBank) { } void DataSource_I::addEntity(EntityDataBank_C::EntityType type, std::unique_ptr<SUDa...
<reponame>jdxj/kiwivm-sdk-go package kiwivm_sdk_go type PrivateIPGetAvailableIPsRsp struct { Status } // PrivateIPGetAvailableIPs Returns all available (free) IPv4 addresses which you can activate on VM // todo: test func (c *Client) PrivateIPGetAvailableIPs() (*PrivateIPGetAvailableIPsRsp, error) { call := "/priva...
/* * sldevice.c */ #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include <signal.h> #define LOG_TAG "sldevice" #include "base/sl_log.h" #include <base/sl_mutex.h> #include <base/sl_cond.h> #include <base/sl_thread.h> #include <base/sl_time.h> #include <base/sl_utils.h> #include ...
<reponame>micheltobon/stencil-connect-4 import { newSpecPage, SpecPage } from '@stencil/core/testing'; import { MtBoardSlot } from './mt-connect-slot'; import { chip } from '../../../helpers/model' describe('<mt-connect-slot>', () => { let page: SpecPage; let boardSlot; beforeEach(async () => { page = await...
/** * This method attempts to adjust MHP information locally, if that can be done, * to model the effect of addition of * {@code node} If successful, it returns {@code true}. * * @param node * the node that has been added to the program, for which MHP * information needs to be stab...
def forecast_made_utc_offset_seconds(self) -> int: offset = self.forecast_made_datetime.utcoffset() if offset: return int(offset.total_seconds()) return 0
// ag-grid-enterprise v17.1.1 import { Component } from "ag-grid/main"; import { IToolPanel } from "ag-grid"; export declare class ToolPanelComp extends Component implements IToolPanel { private context; private eventService; private gridOptionsWrapper; private buttonComp; private columnPanel; p...
Records, posters and toys are among the items in the New York home of a man who said he is making progress in controlling his hoarding. (Seth Wenig/AP) Sandy Stark always loved pretty things. When she was a girl, she collected unusual rocks, birds’ nests, crooked sticks and dolls. As an adult, she gravitated to white ...
package metronome import ( "bytes" "crypto/tls" "encoding/json" "errors" "fmt" "io/ioutil" "net/http" "net/http/httputil" "net/url" "path" "strings" "time" log "github.com/behance/go-logrus" ) // Constants to represent HTTP verbs const ( HTTPGet = "GET" HTTPPut = "PUT" HTTPDelete = "DELETE" HT...
<filename>src/main/java/io/streams/classes/highLevel/BufferedWriters.java package io.streams.classes.highLevel; import java.io.BufferedWriter; import java.io.File; import java.io.FileWriter; import java.io.IOException; public class BufferedWriters { public static void main(String[] args) throws IOException...
// SubCmd prints the usage of a subcommand func SubCmd(name, signature, description string) *flag.FlagSet { flags := flag.NewFlagSet(name, flag.ContinueOnError) flags.Usage = func() { fmt.Fprintf(os.Stderr, "\nUsage: mirrorbits %s %s\n\n%s\n\n", name, signature, description) flags.PrintDefaults() } return flags...
import Driver from '../src/Driver'; import ExecuteDriverRoutine from '../src/ExecuteDriverRoutine'; import RunCommandRoutine from '../src/execute/RunCommandRoutine'; import DriverContext from '../src/contexts/DriverContext'; import { getFixturePath, createDriverContext, createTestDebugger, createTestDriver, c...
<filename>java-17/target/generated-sources/annotations/com/github/howaric/java17/java12/jmh_generated/T1_TestJMH2_jmhType.java package com.github.howaric.java17.java12.jmh_generated; public class T1_TestJMH2_jmhType extends T1_TestJMH2_jmhType_B3 { }
////////////////////////////////////////////////////////////////////////////// // // This file is part of the Corona game engine. // For overview and more information on licensing please refer to README.md // Home page: https://github.com/coronalabs/corona // Contact: <EMAIL> // ///////////////////////////////////////...
def play_tone_sequence_nonblocking(self, tones): self.tone_maker.play_tone_sequence_nonblocking(tones)
<reponame>HappyFacade/komet<gh_stars>1-10 /******************************************************************************* * Copyright (c) 2015 BestSolution.at and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * wh...
def stop(self): if not self._is_started: raise RuntimeError('stop called on unstarted tf_file_io_proxy') if self.mock_gcs: self.patched_file_io.stop() self._is_started = False
<filename>gopher_types.ts export const TYPE_TEXT = '0'; export const TYPE_MENU = '1'; export const TYPE_CCSO_NAMESERVER = '2'; export const TYPE_ERROR = '3'; export const TYPE_BINHEX_FILE = '4'; export const TYPE_DOS_FILE = '5'; export const TYPE_UUENCODED_FILE = '6'; export const TYPE_FULL_TEXT_SEARCH = '7'; export co...
Serial pay-it-forward incidents involving between 4 and 24 cars have been reported at Wendy’s, McDonald’s, Starbucks, Del Taco, Taco Bell, KFC and Dunkin’ Donuts locations in Maryland, Florida, California, Texas, Louisiana, Pennsylvania, Oklahoma, Georgia, Alabama, North Dakota, Michigan, North Carolina and Washington....
/** * Converts big-endian integer to byte array. * @param integer Interger value (4-bytes) * @return Byte array of length 4 created from parameter */ protected static byte[] intToByteArray(final int integer) { byte[] byteArray = new byte[4]; for (int i = 0; i < 4; ++i) ...
/** * A DTO for the Project entity. */ public class ProjectDTO implements Serializable { private static final long serialVersionUID = 1L; public static final String EXTERNAL_PROJECT_URL_KEY = "External-project-url"; public static final String EXTERNAL_PROJECT_ID_KEY = "External-project-id"; public st...
use rt::{Force, ForceRef, IntBlocker}; use lists::{DList, SortedList}; use event::{Event, EventQueue}; use core::cmp::Ordering; use core::iter::FromIterator; use core::ptr::Shared; pub type TimerId = u16; pub enum TimerHandler { Unset, Queue(ForceRef<EventQueue>), Callback(fn(TimerId) -> ()) } pub struct...
/* * ======== LoggerSM_setFilterLevel ======== * Sets the filter level for the given diags level. * * LoggerSM maintains a separate filter level for every diags category. * This is accomplished by maintaining three masks, one for each of the levels * 1 - 3, wich store the diags categories which are currently...
<gh_stars>1-10 import React, { useRef, useEffect } from 'react' import { LocalVideoTrack, RemoteVideoTrack, Track } from 'twilio-video' import useMediaStreamTrack from './useMediaStreamTrack' import useVideoTrackDimensions from './useVideoTrackDimensions' interface VideoTrackProps { track: LocalVideoTrack | RemoteV...
/* * Refreshes the context with properties satisfying to invoke update. */ private void forceUpdate() { changeProperty("eureka.client.use-dns-for-fetching-service-urls=false", "eureka.client.region=unavailable-region"); this.context.publishEvent( new EnvironmentChangeEvent(Collections.singleton("eureka...
def _random_uniform(shape, dtype, seed=None, seed2=None, name=None): result = _op_def_lib.apply_op("RandomUniform", shape=shape, dtype=dtype, seed=seed, seed2=seed2, name=name) return result
Human development index modelling in South Kalimantan province using panel regression Human development is a paradigm and becomes the focus and target of all development activities. Development is a way to improve welfare and a better quality of life. The Human Development Index (HDI) is one indicator to measure the s...
// GetClusters returns the cluster instances for an organization ID. func (m *Manager) GetClusters(ctx context.Context, organizationID uint) ([]CommonCluster, error) { logger := m.getLogger(ctx).WithFields(logrus.Fields{ "organization": organizationID, }) logger.Debug("fetching clusters from database") clusterMod...
// Intercept Runtime.getRuntime().exit, and check if the caller is allowed to use it, if not wrap it in a ExitTrappedException public static void runtimeExitCalled(Runtime runtime, int status) { ExitVisitor.checkAccess(); runtime.exit(status); }
package io.pivotal.labs.matchers; import org.hamcrest.Matcher; public class JsonArrayMatcher extends CastingMatcher<Iterable> { public static Matcher<Object> jsonArray() { return new JsonArrayMatcher(null); } public static Matcher<Object> jsonArrayWhich(Matcher<? extends Iterable> elementsMatche...
// 二叉排序树 #include <iostream> #include <stack> using namespace std; typedef int KeyType; typedef struct { KeyType key; // 关键字域 int count; // 元素个数 } ElemType; typedef struct BiTNode{ ElemType data; //数据元素 struct BiTNode *lchild, *rchild; } BiTNode, *BiTree; // 初...
<gh_stars>0 import * as React from "react"; import { connect } from "react-redux"; import { actionCreators, AppState } from "../../state-management"; import Button from "../common/Button"; interface Props { goto: typeof actionCreators.goto; currentPlace: AppState["currentPlace"]; done: () => void; } interface ...
<reponame>mingmoe/UtopiaServer-Cpp //* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // The PacketClassifier.java is a part of project utopia, under MIT License. // See https://opensource.org/licenses/MIT for license information. // Copyright (c) 2021 moe-org All rights reserved. //* * * * * *...
// extractS3cred tries to extract AWS access key and secret // from an already parsed cred string func extractS3cred() (accessKeyID string, secretAccessKey string) { for _, p := range brf.Creds.Params { if p.Key == "ACCESS_KEY_ID" { accessKeyID = p.Value } if p.Key == "SECRET_ACCESS_KEY" { secretAccessKey ...
/** * Writes the table record to the output stream or writer. * * @param record the <code>TableRecord</code> object * @throws IOException */ public void write(TableRecord record) throws IOException { if (adapter instanceof TableDelimitedAdapter) { csvWriter.writeNext(((DelimitedTableRecord) record).getR...
/** * Tests the behavior of {@link Node#removeChild(Node)} on an element that has not been built * completely. */ public class TestRemoveChildIncomplete extends AxiomTestCase { public TestRemoveChildIncomplete(OMMetaFactory metaFactory) { super(metaFactory); } protected void runTest() throws Thr...
<gh_stars>0 use std::io::{BufReader, Read}; use crate::convert_path_buf; use crate::{Error, Result}; use regex::Regex; use std::collections::HashSet; use std::iter::FromIterator; use std::path::PathBuf; use std::str::FromStr; // Consider using a parser combinator instead of regexes here, like Nom: https://crates.io/c...
package com.davidmogar.quizzer.utils; import org.junit.Test; import java.io.IOException; import java.net.MalformedURLException; import java.net.URISyntaxException; import java.net.URL; import static org.junit.Assert.*; public class UrlReaderTest { @Test public void testGetStreamAsString() throws Exception ...
def __parse_row(self, row_string, column_types, column_labels): column_values = list() if not row_string: return column_values string_val = None current_column = 0 for i, col_val in enumerate(self.__tokenize_row(row_string)): assert current_column < len(column_types),\ 'Number ...
def generate_index( index: "faiss.Index", embeddings: npt.NDArray, ) -> "faiss.Index": dimensions = embeddings.shape[1] index = index(dimensions) index.add(embeddings) return index
Temple of the Silent Storm With this week’s patch, you will be able to play a beta version of our new PvP map – Temple of the Silent Storm. We’re really trying to push the verticality of the map. Taking inspiration from many of the shooting games that we’ve enjoyed, we created a map that has some of the vertical play...
You read that correctly. This isn’t The Onion. Fox NFL Sunday has issued an open casting call for Rams fans to come out for the pregame show, possibly (probably) due to fear the visiting Eagles will be better represented than the 9-3 home team. Southern California wild fires have been an issue lately, but Rams attend...
<filename>src/components/RFVideo.tsx import React from 'react' import bgVideo from "../video/bubble-video.mp4" const RFVideo = () => { return ( <video id="rfVideo" autoPlay muted loop> <source src={bgVideo} type="video/mp4"/> </video> ) } export default RFVideo
/** * Converts a RelBuilder into a sql string. * * @param sqlWriter The writer to be used when translating the {@link org.apache.calcite.rel.RelNode} to sql. * @param relToSql The converter from {@link org.apache.calcite.rel.RelNode} to * {@link org.apache.calcite.sql.SqlNode}. * @param ...
import math s = raw_input("") s = s.split(" ") n = int(s[0]) m = int(s[1]) a = int(s[2]) print(str(int(math.ceil(float(n) / a)) * int(math.ceil(float(m) / a))))
def fit_model(self, all_parents, tau_max=None): self.fit_results = self.get_fit(all_parents=all_parents, selected_variables=None, tau_max=tau_max) coeffs = self.get_coefs() self.phi = self._get_phi(coeffs) se...
<reponame>kuujo/onos-ran // Copyright 2020-present Open Networking Foundation. // // 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 // // U...
s=input().strip() an=0 m=10**9 m+=7 p=0 for v in s: if v=='a': p=p+1 elif v=='b': if p>0: q=p*((an+1)%m) an=(an+q)%m p=0 #print(an) if p>0: q=p*((an+1)%m) an=(an+q)%m print(an%m)
Visitors are searched at the music festival Rock am Ring in Nuerburg, Germany, on June 3. German authorities allowed the popular rock festival to go ahead after a scare over people with suspected links to Islamic extremism prompted them to curtail its opening night. (Photo11: AP) BERLIN — Germany's Family and Youth Mi...
def add_loss_op(self, preds): loss = tf.nn.sparse_softmax_cross_entropy_with_logits(logits=preds,labels=self.labels_placeholder) loss = tf.reduce_mean(tf.boolean_mask(loss, self.mask_placeholder)) return loss
The crowd mingles at the party sponsored by NJOY at The Jane Hotel. New York's Smoke-Free Air Act of 2002 does not address electronic cigarette smoking (Owen Kolasinski / BFAnyc.com) At a private party inside The Jane Hotel's posh nightclub last month, a giddy procession of well-lubricated influencers snapped Instagra...
package net.serenitybdd.core.webdriver.driverproviders; import net.thucydides.core.util.EnvironmentVariables; import net.thucydides.core.webdriver.appium.AppiumConfiguration; import org.openqa.selenium.remote.DesiredCapabilities; public class AppiumDriverCapabilities implements DriverCapabilitiesProvider { priva...
Domain Transfer Learning for Hyperspectral Image Super-Resolution A Hyperspectral Image (HSI) contains a great number of spectral bands for each pixel; however, the spatial resolution of HSI is low. Hyperspectral image super-resolution is effective to enhance the spatial resolution while preserving the high-spectral-r...
In Vitro Activity of Trovafloxacin against Bacteroides fragilis in Mixed Culture with either Escherichia coli or a Vancomycin- Resistant Strain of Enterococcus faecium Determined by an Anaerobic Time-Kill Technique ABSTRACT To determine the efficacy of trovafloxacin as a possible treatment for intra-abdominal abscesse...
/** * Constructs a {@link Date} object from the given string. <br /> * The String must be in the format: YYYY-MM-DDTHH:MM:SS. * * @param date String representing the date. */ public void fromString(String date) { Pattern pattern = Pattern.compile("(\\d{4})-(\\d{2})-(\\d{2})T(\\d{2}):(\\d{2}):(\\d{2})"); ...
// Package vedicextensions // Block: Vedic Extensions // Range: 1CD0..1CFF package vedicextensions const ( // VedicToneKarshana VEDIC TONE KARSHANA // Codepoint: U+1CD0 // Category: Mark, Nonspacing // String: ᳐ VedicToneKarshana = '\u1cd0' // VedicToneShara VEDIC TONE SHARA // Codepoint: U+1CD1 // Cate...
def read_geometry(self, group): if group.attrs['grid_type'].decode('utf-8') != 'sph_pol': raise ValueError("Grid is not spherical polar") self.set_walls(group['walls_1']['r'], group['walls_2']['t'], group['walls_3']['p']) if group.attrs['...
<reponame>pecigonzalo/kpt<filename>pkg/live/preprocess/process.go<gh_stars>1-10 // Copyright 2021 Google LLC. // SPDX-License-Identifier: Apache-2.0 package preprocess import ( "fmt" apierrors "k8s.io/apimachinery/pkg/api/errors" "sigs.k8s.io/cli-utils/pkg/common" "sigs.k8s.io/cli-utils/pkg/inventory" "sigs.k8s...
rd = lambda : map(int, raw_input().split()) n = input() a = sorted(rd()) d = {} c = {} for i in range(1, len(a)): d[a[i] - a[i - 1]] = a[i - 1] if not a[i] - a[i - 1] in c: c[a[i] - a[i - 1]] = 0 c[a[i] - a[i - 1]] += 1 if len(d) == 0: print -1 elif len(d) == 1: dist = d.keys()[0] if dis...
// SharedLock takes a co-operative (shared) lock on a directory. // It will block if an exclusive lock is already held on the directory. func SharedLock(dir string) (DirLock, error) { l, err := newLock(dir) if err != nil { return nil, err } err = syscall.Flock(l.fd, syscall.LOCK_SH) if err != nil { return nil,...
<reponame>AwesomestCode/DiscordBotPython import discord msgtable = { "hi": "Hello, world!", "ping": "Pong!", "about": "[Your about message here]", "customcmd": "Hey, why aren't you customizing me?" } import discord class MyClient(discord.Client): async def on_ready(self): print('Logged on as', self.use...
// String implements the Expression String interface. func (da *DateArith) String() string { var str string if da.isAdd() { str = "DATE_ADD" } else { str = "DATE_SUB" } return fmt.Sprintf("%s(%s, INTERVAL %s %s)", str, da.Date, da.Interval, strings.ToUpper(da.Unit)) }
/** * Event that signals that an object idtentified through the id should be * reneamed * * @author Alexander Lex * */ public class RenameEvent extends AEvent { private Integer id; /** * */ public RenameEvent() { } public RenameEvent(Integer id) { this.id = id; } /** * @param id * ...
<gh_stars>10-100 import { beforeEachProviders, it, describe, expect, inject, fakeAsync, tick } from '@angular/core/testing'; import { MockBackend } from '@angular/http/testing'; import { provide } from '@angular/core'; import { Http, ConnectionBackend, BaseRequestOptions, Response, ResponseOptions } from ...
/******************************************************************************* * * Pentaho Big Data * * Copyright (C) 2002-2019 by <NAME> : http://www.pentaho.com * ******************************************************************************* * * Licensed under the Apache License, Version 2.0 (the "License"...
def box(self, start, end, offset=(0, 0), color='b'): ax = gca() x = offset[0] - 0.5 + start y = offset[1] - 0.5 r1 = Rectangle((x, y), end - start + 1, 1, facecolor='none', ls='--', lw=2, edgecolor=color) ax.add_patch(r1)
package sparqles.core; import static org.junit.Assert.*; import java.util.HashMap; import java.util.Map; import org.apache.avro.specific.SpecificRecordBase; import org.junit.After; import org.junit.Before; import org.junit.Test; import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class LogTest { priv...
Scalable Spherical Harmonics Hierarchies Scalable Spherical Harmonics Hierarchies (SSPHH) is a real-time rendering solution to the global illumination problem. Our novel method is a system of components that enables the computation of light probes and the conversion to spherical harmonics coefficients, which are used ...
/// consume the event to /// - maybe change the input /// - build a command /// then redraw the input field pub fn on_event( &mut self, w: &mut W, event: Event, con: &AppContext, sel: Selection<'_>, ) -> Result<Command, ProgramError> { let cmd = self.get_command(event...
// findColumn searches the in-memory loaded column map using the specified parameters. func findColumn(columns []ColumnMapper, columnName, tableName, schemaPrefix, schema, dataType string) (col ColumnMapper) { for _, col = range columns { if col.ColumnName == columnName && col.TableName == tableName && col.TableSch...
<reponame>panyuan5056/flybeat<gh_stars>0 package plug import ( "bytes" "context" "encoding/json" "flybeat/core/topology" "flybeat/pkg/logging" "fmt" "runtime" "strings" "time" "github.com/elastic/go-elasticsearch/v7" "github.com/elastic/go-elasticsearch/v7/esutil" ) func NewElasticsearchOutput(config map[...
def run_term_query(self, search_term: str): __log__.info("starting term query: search_term: {}".format(search_term)) if search_term.endswith("%"): __log__.debug("wildcard detected in search_term: {}".format(search_term)) base_term = search_term[:-1] searching_terms = ...
//NewAPIController create new instance of BaseController func NewAPIController(c interface{}, name string, v *web.APIVersion) *APIController { b := APIController{} b.Name = name b.APIVersion = v return &b }
def iterate_one_material(rootDirr, material, maxError, maxIterations, energyMesh=None, fluxDict=None, verbosity=False): sig0Vec = None if verbosity: print 'Performing Bondarenko iteration for material {0}'.format(material.longName) ZAList = sorted(material.ZAList) readerOpt = 'gendf' totalXS...
/** * Abstract service controller implementation. */ public abstract static class ApiConnection extends ConnectionBase { @Override protected void onBaseConnected(IBinder service) { onConnected(IPositioningServiceControl.Stub.asInterface(service)); } /** *...
/** * Generates SQL to modify a column in a table * * @param string $tableName * @param string $schemaName * @param Phalcon\Db\ColumnInterface $column * @return string */ PHP_METHOD(Phalcon_Db_Dialect_Oracle, modifyColumn){ zval *table_name, *schema_name, *column; phalcon_fetch_params(0, 3, 0, &table_name, &sc...
// delete remove an item from the cache. It's not thread-safe. // Only other functions of the bindCache can use this function. func (c *bindCache) delete(key bindCacheKey) bool { bindRecords := c.get(key) if bindRecords != nil { mem := calcBindCacheKVMem(key, bindRecords) c.cache.Delete(key) c.memTracker.Consum...
WORCESTER, Mass. (AP) — According to recently filed court documents, a Massachusetts school is alleging that a student who was raped overseas is partially responsible because she was drinking that night and chose to follow a stranger onto a dark rooftop. The Boston Globe reports (http://bit.ly/25JPPnw ) Worcester Poly...
package com.nosvisuals.engine; import processing.core.*; import java.util.*; public class VisualEngineParameter { public String name; public String type; public int index; public float min; public float max; public float value; public float valuePre; public String label; public ArrayList<control...
package org.motechproject.event.it; import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.motechproject.event.MotechEvent; import org.motechproject.event.listener.impl.EventListenerRegistry; import org.motechproject.event.listener.impl.ServerEventRelay; import org.springframework....
package org.wikipedia.analytics; import android.support.annotation.NonNull; import org.json.JSONObject; import org.wikipedia.WikipediaApp; import org.wikipedia.dataclient.WikiSite; public class RandomizerFunnel extends TimedFunnel { private static final String SCHEMA_NAME = "MobileWikiAppRandomizer"; private...
/** * Utility class consisting of static methods that generate various generally * useful messages that can be sent to the client. These messages are sent by * a number of different classes, including, potentially, application-defined * {@link Mod} classes, so the methods to construct these messages don't * natur...
<gh_stars>0 package comm import ( "net/rpc" ) type Sender struct { Addr []string } func (s *Sender) RequestVote(addr string, args VoteArgs, result *VoteResult) error { err := rpcRequest(addr, "Service.RequestVote", args, result) return err } func (s *Sender) AppEntries(addr string, args AppEntryArgs, result *Ap...
Obedience to normalcy is what lobotomies are for.—Crass Someone sent me a link to Tricycle magazine’s “Daily Dharma” for February 3-10. My first response, when I get such links from the Buddhist glossies is to hit delete. Ready for some procrastination, though, I read this one. The advice distilled in this “Wisdom Co...
<reponame>WambuaSimon/RoadQualityLab package com.softteco.roadqualitydetector.sqlite.dao; import android.content.ContentValues; import android.content.Context; import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; import android.util.Log; import com.softteco.roadqualitydetector.sqlite...
package user import ( "testing" "fmt" "strings" ) func TestInsertandValidateUser(t *testing.T){ u, err := InitUser("../sdk.json", "Database") if (err != nil){ t.Fatalf("%v\n",err) } fmt.Println("Successfully loaded!") var um UserModel um.Fullname = "<NAME>" um.Email = "<EMAIL>" um.Pass...
// TestAuthCmd tests the auth command. Therefore, this test assumes a file "~/keptn/.keptnmock" containing // the endpoint and api-token. func TestAuthCmd(t *testing.T) { credentialmanager.MockAuthCreds = true endPoint, apiToken, err := credentialmanager.GetCreds() if err != nil { t.Error(err) return } buf := ...
/* SPDX-License-Identifier: GPL-2.0 */ /* * Copyright 2020 Google LLC */ #ifndef __ASM_ACPI_VBNV_LAYOUT_H__ #define __ASM_ACPI_VBNV_LAYOUT_H__ #define VBOOT_VBNV_BLOCK_SIZE 16 /* Size of NV storage block in bytes */ /* Constants for NV storage, for use with ACPI */ #define HEADER_OFFSET 0 #define HEADER_MASK 0...
/** * An in-container test checking your application while it's executing. */ public class InContainerIT extends WisdomTest { /** * First inject your controller. The @Inject annotation is able to * inject (in tests) the bundle context, controllers, services and * templates. */ @Inject ...