content stringlengths 10 4.9M |
|---|
<gh_stars>10-100
export interface IRouletteItem {
id: number;
title?: string;
subtitle?: string;
image?: string;
}
|
/**
* Race to create the persistent nodes.
*/
public static void createPersistentZKNodes(ZooKeeper zk) {
LinkedList<ZKUtil.StringCallback> callbacks = new LinkedList<ZKUtil.StringCallback>();
for (int i=0; i < VoltZK.ZK_HIERARCHY.length; i++) {
ZKUtil.StringCallback cb = new ZKUtil... |
/**
* Checks if the message should be broadcasted among regions or not.
* @param message target
* @return flag
*/
public static boolean isBroadcast(Message message) {
if (message instanceof CommandMessage) {
CommandData commandData = ((CommandMessage) message).getData();
... |
// Parse parses the tracked item
func (m *sankakuComplex) Parse(item *models.TrackedItem) error {
downloadQueue, err := m.parseGallery(item)
if err != nil {
return err
}
return m.processDownloadQueue(downloadQueue, item)
} |
/**
* List of all processes running on the device.
*
* @since TR181 v2.0
*/
@CWMPObject(name = "Device.DeviceInfo.ProcessStatus.Process.{i}.", uniqueConstraints = {@CWMPUnique(names = {"PID"})})
@XmlRootElement(name = "Device.DeviceInfo.ProcessStatus.Process")
@XmlType(name = "Device.DeviceInfo.ProcessStatus.Pr... |
def loadCRC(verbose=False):
rawHTML = get(CRC_URL).text
soup = BeautifulSoup(rawHTML, 'html.parser')
allTimeCards = soup.find_all("div", class_="caption program-schedule-card-caption")
openings = dict()
if (len(allTimeCards) != 0):
for timeCard in allTimeCards:
date = timeCar... |
/// Consumes the builder and constructs a [`DescribeDBSubnetGroupsOutput`](crate::output::DescribeDBSubnetGroupsOutput)
pub fn build(self) -> crate::output::DescribeDBSubnetGroupsOutput {
crate::output::DescribeDBSubnetGroupsOutput {
marker: self.marker,
db_subnet_groups: sel... |
def MakeSyncCall(self, service, call, request, response):
rpc = self.CreateRPC()
rpc.MakeCall(service, call, request, response)
rpc.Wait()
rpc.CheckSuccess() |
/*
* Copyright 2014-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 copyright
* notice, this list of conditions and ... |
package bungieapigo
// Mostly for historical purposes, we segregate Faction progressions from other progressions.
// This is just a DestinyProgression with a shortcut for finding the DestinyFactionDefinition
// of the faction related to the progression.
type DestinyFactionProgression struct {
// The hash identifier ... |
package scavenger
import (
"fmt"
"github.com/PuerkitoBio/goquery"
)
var (
JobQueue chan Job
Quit chan bool
Result chan interface{}
)
type (
Parser func(doc *goquery.Document) interface{}
Job struct {
URL string
Parser Parser
}
Scavenger struct {
WorkerPool chan chan Job
maxWorkers int
}... |
<reponame>hnord-vdx/wallet-core<filename>src/Cosmos/Entry.cpp
// Copyright © 2017-2020 Trust Wallet.
//
// This file is part of Trust. The full Trust copyright notice, including
// terms governing use, modification, and redistribution, is contained in the
// file LICENSE at the root of the source code distribution tree... |
#ifndef IWBC_DAMAGE_CONTROLLER_HPP
#define IWBC_DAMAGE_CONTROLLER_HPP
#include <inria_wbc/controllers/talos_pos_tracker.hpp>
namespace inria_wbc {
namespace tasks {
// contacts cannot be in the same factory
std::shared_ptr<tsid::contacts::Contact6dExt> make_contact_task(
const std::sha... |
/*
* Copyright (C) 2018 Open Source Robotics 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
*
* Unless required by appl... |
/// Creates a curve25519 key from an ed25519 public key.
///
/// Used to derive the public key for DH key exchange.
///
/// # Example
/// ```
/// use ursa::signatures::ed25519::Ed25519Sha512;
/// use ursa::signatures::SignatureScheme;
///
/// let (pk, sk) = Ed25519Sha512::new().keypair(None).unwrap();
/// let curve_pk ... |
def plot_metrics(self):
metrics = ['Reward', 'Transmitted packets', 'Dropped packets', 'Buffered packets']
for df, baseline in zip(self.df_list, self.titles):
df = self._episode(df, self.eps[0])
fig, ax = plt.subplots(nrows=4, ncols=1, figsize=(8, 8))
ax[0].set_title(... |
/**
* @author Alexander Shakhov
*/
@Getter
@Setter
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "GlobalType", propOrder = {"metadataGroupList", "metadataList", "graphParameters", "dictionary"})
public class Global {
@XmlElement(name = "MetadataGroup")
private List<MetadataGroup> metadataGroupList;
... |
def switchNumber(a: str):
temp = a[2:]
temp += a[1:2]
temp += a[0:1]
return temp
S1, S2 = input().split()
newS1 = switchNumber(S1)
newS2 = switchNumber(S2)
print(max(int(newS1), int(newS2))) |
<filename>src/main/java/org/helm/notation2/MoleculeProperty.java
/*--
*
* @(#) MoleculeInfo.java
*
*
*/
package org.helm.notation2;
/**
* MoleculeInfo
*
* @author hecht
*/
public class MoleculeProperty {
private double molecularWeight;
private String molecularFormula;
private double ... |
/**
* Manage {@link org.rythmengine.extension.ICodeType template language} implementations
*/
public class CodeTypeManager {
private List<ICodeType> _codeTypeList = new ArrayList<ICodeType>();
public CodeTypeManager registerCodeType(ICodeType type) {
_codeTypeList.add(type);
return this;
... |
<reponame>MasseGuillaume/scala-java8-compat<gh_stars>0
package scala.compat.java8.runtime;
// No imports! All type names are fully qualified to avoid confusion!
public class CollectionInternals {
public static <A> Object[] getTable(scala.collection.mutable.FlatHashTable<A> fht) { return fht.hashTableContents().ta... |
<gh_stars>1-10
package com.projectseptember.RNGL;
import com.facebook.react.bridge.ReadableArray;
import com.facebook.react.bridge.ReadableMap;
import java.util.ArrayList;
import java.util.List;
public class GLData {
final Integer shader;
final ReadableMap uniforms;
final Double width;
final Double ... |
/**
* Swaps 2 elements in the column defs array.
* @param columnDefs reference to the column defs array
* @param i first index to swap
* @param j second index to swap
*/
private static void swap( final ColumnDef[] columnDefs, final int i, final int j ) {
final ColumnDef stored = colum... |
/**
* Utility class which has all the helper methods used across the application.
*
* @author abuabdul
*
*/
public class FourTUtils {
private static final DateFormat dd_MM_YYYY = new SimpleDateFormat("dd/MM/yyyy");
public static String simpleDateStringWithDDMMYYYY(Date date) {
if (date != null) {
return ... |
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "ash/shelf/shelf_layout_manager.h"
#include <memory>
#include <utility>
#include "ash/accelerators/accelerator_controller.h"
#include "ash/... |
class Access:
"""A generic access to the database."""
def __init__(self, inner: RawIndexAccess):
self._inner = inner
self._valid = False
def __enter__(self) -> "Access":
self._valid = True
return self
def __exit__(self, exc_type: Optional[type], exc_value: Optional[An... |
Sustainable Leadership Supporting Educational Transformation
The world, influenced by 21st century technologies and ecological challenges, has rapidly changed with more ability to “connect” locally and globally and more opportunities to learn from a range of sources. As a result, our learners and their needs have chan... |
// writePythonConfig writes the .netrc contents for authenticating to AR.
func writePythonConfig(wr io.Writer, tok string) error {
const pythonConfig = `
{{- range $entry := .Hosts}}
machine {{$entry}} login oauth2accesstoken password {{$.Token}}
{{- end}}
`
type authEntry struct {
Token string
Hosts []string
}
... |
It takes a certain kind of human — a superhuman, perhaps — to take on a challenge as daunting as running seven marathons in seven days on seven continents.
Calgary accountant and runner Stephen Park, 44, said he’d always dreamed of running a marathon on every continent, but when he signed up for the Triple 7 Quest run... |
The Promethean biohacker: on consumer biohacking as a labour of love
ABSTRACT Just as the mythical Greek Titan Prometheus created humans and brought them the technology of fire, the biohackers studied here seek to recreate humanity and bring us technologies that make us god-like. In this paper, we explore how and why ... |
WASHINGTON (AP/The Huffington Post) -- Massachusetts Sen. Scott Brown blamed his staff Thursday for passages about his upbringing on his official Senate website that were lifted word for word from a 2002 speech by former senator and presidential candidate Elizabeth Dole.
“It was a summer intern that put together the s... |
Marine Who Survived Beirut Bombing Sends Powerful Letter On Behalf of Sgt. Derrick Miller
Marine Who Survived Beirut Bombing Sends Powerful Letter On Behalf of Sgt. Derrick Miller
In prior posts we have brought you the infuriating details about the injustice facing our American son, Sgt. Derrick Miller.
Sgt. Miller ... |
// Code generated by go-swagger; DO NOT EDIT.
package associations
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"fmt"
"io"
"github.com/go-openapi/runtime"
"github.com/go-openapi/strfmt"
"github.com/form3tech-oss/t... |
/**
* Called from the block tracker to filter the detected signs based on the skip settings.
* The signs specified should contain all signs known to the minecart for proper functioning.
*
* @param signs (modifiable!)
*/
public void filterSigns(List<TrackedSign> signs) {
if (!this.isLoa... |
Deep beneath Las Vegas’ famous strip of glittering lights lies a sinister labyrinth of underground flood tunnels. The 200+ miles of flood tunnels are home to a secret community of over 1,000 homeless people who eke out a living in the strip’s dark underbelly. They’ve turned this way of living into their way of life, an... |
def lookup_eigentumsform(self, eigentumsform):
return self.EIGENTUMSFORM_LOOKUP.get(eigentumsform, eigentumsform) |
Optimal Design of Passive Permanent Magnet Bearings
In this paper, for optimal using of magnetic materials in passive magnetic bearings, two modifications in passive magnetic bearing structure are investigated. These modifications include using arbitrary size PMs and air intervals between them. Two configurations of o... |
def serialize_spec(spec: List[Union[Optional, Required]]) -> str:
return "\n\n".join(
[
"# Config options for unicorefuzz\n"
"# Values tagged as [Optional] are autofilled by ucf if not set explicitly."
]
+ [stringify_spec_entry(x) for x in spec]
) |
/**
* @author mattmann
* @version $Revision$
*
* <p>
* A {@link WorkflowTaskConfiguration} that preserves whether or not a task config
* property was envReplace'd or not.
* </p>.
*/
public class EnvSavingConfiguration extends WorkflowTaskConfiguration {
private Properties envReplaceMap;
public EnvSav... |
/*
* Callback invoked immediately prior to starting a debugnet connection.
*/
void
debugnet_mbuf_start(void)
{
MPASS(!dn_saved_zones.dsz_debugnet_zones_enabled);
dn_saved_zones = (struct debugnet_saved_zones) {
.dsz_debugnet_zones_enabled = true,
.dsz_mbuf = zone_mbuf,
.dsz_clust = zone_clust,
.dsz_pack = z... |
// NewVertex returns a new vertex which is ready to use.
func (g *Graph) NewVertex() Vertex {
newVertex := &vertex{VertexID: g.generateID()}
newVertex.container = Vertex{
vertex: newVertex,
Value: new(interface{}),
}
g.vertices[newVertex.VertexID] = newVertex
return newVertex.container
} |
<gh_stars>10-100
/**
* Copyright 2020 Google Inc. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required b... |
import { useEffect } from 'react';
import { BrowserQRCodeReader } from '@zxing/library';
import { getDeviceId } from './utils';
import { UseQrReaderHook, CodeReaderError } from '../types';
// TODO: implement dependencies in a way that video stream doesn't flashback
export const useQrReader: UseQrReaderHook = ({
fac... |
<gh_stars>1-10
import * as fs from 'fs';
import ContentSearch from '../models/content-search.interface';
const contentFilePath = './content.json';
function save(content: ContentSearch) {
const contentString = JSON.stringify(content);
return fs.writeFileSync(contentFilePath, contentString);
}
function load(): Cont... |
A CRISPR-based approach for proteomic analysis of a single genomic locus
Any given chromosomal activity (e.g., transcription) is governed predominantly by the local epiproteome. However, defining local epiproteomes has been limited by a lack of effective technologies to isolate discrete sections of chromatin and to id... |
package com.cloudbees.jenkins.plugins.advisor.casc;
import com.cloudbees.jenkins.plugins.advisor.AdvisorGlobalConfiguration;
import com.cloudbees.jenkins.plugins.advisor.client.model.Recipient;
import io.jenkins.plugins.casc.ConfigurationContext;
import io.jenkins.plugins.casc.ConfiguratorException;
import io.jenkins.... |
<reponame>kawu/concraft-pl<gh_stars>1-10
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TupleSections #-}
{-# LANGUAGE LambdaCase #-}
-- | DAG-aware morphosyntax data layer in Polish.
module NLP.Concraft.Polish.DAG.Morphosyntax
(
-- * Tag
Tag
-- * Edge
-- , Edge (..)
, Word (..)... |
<filename>src/domain/Seat.ts
import { SeatName } from "./SeatName";
import Card from "./Card";
export class Seat {
seatName: SeatName;
playCard?: Card;
faceCards: Card[] = [];
hands: Card[] = [];
score = 0;
isAide = false;
isLastLapWinner = false;
constructor(
seatName: SeatName,
playCard?: Ca... |
module Frenetic.Z3
( -- * Data types and constructors for running Z3
Z3Input (..)
, setUp
, DeclConst (..)
, Const (..)
-- * Z3 formula components
, Z3Packet (..)
, Z3Int (..)
, BoolExp (..)
, IntExp (..)
, nAnd
, nOr
-- * Tools to run Z3
, check
, checkBool
) where
import Data.List
i... |
/**
* Sets the JDBC connection to use with the handler.
* @param conn The connection
* @return This object
*/
public Builder withConnection(JDBCDatabaseConnection conn)
{
handler.setConnection(conn);
return this;
} |
/**
* Sends a message.
*
* @param message A array of byte to send.
*/
private void sendMessage(byte[] message) {
if (mBluetoothService.getState() != BluetoothService.STATE_CONNECTED) {
Toast.makeText(this, "You are not connected to a device", Toast.LENGTH_SHORT).show();
... |
def convert_wiki(df: pd.DataFrame, proc_index: int = 0) -> pd.DataFrame:
df['tmp'] = f"wiki_{proc_index}_" + df.index.astype(str)
df = df.rename({'id': 'wikipedia'}, axis=1)
df['wikipedia'] = df['wikipedia'].astype(str)
df = collapse_id_list(df, 'ID_list', ['tmp', 'wikipedia'], do_not_drop={'tmp'})
... |
N=int(input())
A=[[tuple(map(int,input().split(' ')))for j in range(int(input()))] for i in range(N)]
say_map=[[-1 for i in range(N)] for j in range(N)]
ans = 0
for n,i in enumerate(A):
for j,k in i:
say_map[n][j-1]=k
for i in range(2**N):
i_bin=format(i,'0{}b'.format(N))
flg = True
tmp = 0
... |
Art by Todd Lockwood
Ever since I was a little kid, I’ve loved to be out in nature. Whether I’m hiking, sketching trees, observing frog spawn, or just relaxing to the sounds of birds and running water, it never fails to inspire my imagination. In fact, the ideas for several of my stories came to me while trekking thro... |
Key evolution-based tamper resistance: a subgroup extension
The number and magnitude of hostile attacks against software has drastically increased. One class of attacks of particular concern to the software industry is tampering to circumvent protection technologies such as license checks. A variety of hardware- and s... |
Anthony Hopkins Lives Out A Long-Deferred Musical Dream
Enlarge this image toggle caption Courtesy of the artist Courtesy of the artist
Hear The Music Bracken Road And The Waltz Goes On
Anthony Hopkins has been knighted by Queen Elizabeth II, and has played Richard I, Richard Nixon, monarchs, statesmen, geniuses and... |
def table_query(
self,
table: pd.DataFrame,
aggregator: Optional[callable] = None,
k: Optional[int] = None,
verbose: bool = False,
) -> Union[Iterable[Tuple], Tuple[Iterable[Tuple], Iterable[Tuple]]]:
extended_table_results = None
score_distributions = {}
... |
/**
* Greet the customer
* @param name
* @return String
*/
public String greet(String name) {
try {
MyWebService myService = service.getPort(MyWebService.class);
String message = myService.greetCustomer(name);
System.out.println(message);
return message;
} catch (Exception exception) {
ex... |
export * from "./src/pkce.ts";
|
import { server } from './http';
import './websocket/ChatService';
server.listen(3333, () => console.log('Server Started on Port 3000.'));
|
Metacarpophalangeal pattern profiles in the evaluation of skeletal malformations.
Metacarpophalangeal pattern profile analysis is a graphic method of depicting lengthening and shortening of the tubular bones of the hand and their relationship to one another. The lengths of the tubular bones are plotted in terms of sta... |
/**
* Test config data
*/
public class TestConfig {
public static final String TESTS_FOLDER;
static {
String tmpDir = System.getProperty("java.io.tmpdir");
if (!tmpDir.endsWith(File.separator)) {
tmpDir = tmpDir.concat(File.separator);
}
TESTS_FOLDER = tmpDir.conca... |
<reponame>Phorkyas/advent-of-code2021<filename>day4/bingo.py
#!/usr/bin/env python3
numbers = []
with open('numbers', 'r') as data:
numbers = data.read().split(',')
boards = []
with open('boards', 'r') as data:
stuff = data.read()
boardsplit = stuff.split("\n\n")
for board in boardsplit:
intb... |
def enter_button(self):
if self.system == "Windows":
self.configure(background="DimGrey")
self.v_link["var_status"].set(self.tip) |
// NewShiba returns a new instance of Shiba.
func NewShiba(client kubernetes.Interface, nodeName, cniConfigPath string, options ShibaOptions) (*Shiba, error) {
shiba := &Shiba{
client: client,
cniConfigPath: cniConfigPath,
nodeName: nodeName,
nodeMap: make(model.NodeMap),
nodeGatewa... |
/**
Look up the user and return if they were found
*/
func (repo *RepoMemory) GetUserByEmail(email string) (User, error) {
for _, v := range repo.usersList {
if v.Email() == email {
return v, nil
}
}
return nil, errors.New("no user with email")
} |
// GetDateAdded returns the DateAdded field value
func (o *EnabledProviderAccount) GetDateAdded() string {
if o == nil {
var ret string
return ret
}
return o.DateAdded
} |
/**
* Uses a given tensorFlow model as input from assets, takes a RGB array of an image and returns
* a json array with the corresponding weights the model returns.
*/
public class TensorWeights extends TensorFlowInferenceInterface {
// Note: Only supports armeabi-v7a as pr
// https://github.com/miyosuda/Ten... |
#include "application.h"
#include "view.h"
#include <Awesomium/WebCore.h>
#include <Awesomium/STLHelpers.h>
#ifdef _WIN32
#include <Windows.h>
#endif
using namespace Awesomium;
class TutorialApp : public Application::Listener {
Application* app_;
View* view_;
public:
TutorialApp()
: app_(Application::Crea... |
S = input()
keyence = "keyence"
answer = 'NO'
if keyence in S:
if S[:7] == keyence:
answer = "YES"
elif S[-7:] == keyence:
answer = "YES"
else:
for i in range(6):
if (S[:i+1] == keyence[:i+1]) & (S[-6+i:] == keyence[-6+i:]):
answer = "YES"
print(answer)
|
package config
import (
"errors"
"fmt"
"strings"
)
// SchemaConfig defines the schema migration resources
// configurations.
type SchemaConfig struct {
Directory string `toml:"directory"`
Sequence []string `toml:"sequence"`
}
func (c *SchemaConfig) validate() error {
if c.Directory == "" {
return errors.N... |
/// Creates a symlink to a dotfile.
pub fn build(dotfile: &Dotfile, config: &Config) -> Result<(), Error> {
let dest_path = self::path(dotfile, config);
if dest_path.exists() {
if dest_path.is_dir() {
warn!("there is an existing directory at '{}', will not create symlink", dest_path.display(... |
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
import { Error404 } from '@dassana-io/web-components'
import Layout from '@theme/Layout'
import styles from './NotFound.module.css'... |
import copy
import torch.nn as nn
from torchvision.models.feature_extraction import get_graph_node_names
from torchvision.models.feature_extraction import create_feature_extractor
from torch.nn import functional as F
class McdWrapper(nn.Module):
def __init__(self, model):
super().__init__()
self.... |
# -*- coding: latin-1 -*-
# Copyright (c) 2008 Pycircuit Development Team
# See LICENSE for details.
import circuit
import pycircuit.utilities.param as param
import sympy
import sympy.printing.lambdarepr
import numpy as np
import inspect
from copy import copy
class Node(circuit.Node):
@property
def V(self):... |
/**
*
* @author Frank Appiah
*/
public class EPSHortnetq implements IEPSHornetq{
private HornetQServer hornetQServer;
private IEPSMSQConfig hornetqConfig;
private Configuration configuration;
private Main jniServer;
private InitialContext initialContext;
private TransportConfiguration transp... |
/*
* Call SearchSelect to call callbacks, and put cursor back in original
* position if putback_cursor is set.
*/
static void Select (Widget w, XEvent *event, String *params, Cardinal *num)
{
MenuShellWidget msw = (MenuShellWidget) w;
(void)_Search_Select(msw);
if (msw->menu.putback_cursor)
XWarpPoi... |
/*
* Change the owner of a type.
*/
void AlterTypeOwner(List* names, Oid newOwnerId, ObjectType objecttype)
{
TypeName* typname = NULL;
Oid typeOid;
Relation rel;
HeapTuple tup;
HeapTuple newtup;
Form_pg_type typTup;
AclResult aclresult;
rel = heap_open(TypeRelationId, RowExclusiveLock... |
A group of French conservationists have reached out to good Samaritans in the US to help them save Paris's Notre Dame Cathedral – one of France’s most visited monuments, which requires urgent repair work.
ADVERTISING Read more
Turning 854 years this year, Notre Dame de Paris is one of the largest and most well-known ... |
<reponame>nanogiants/vue3-packages
export { vVisible } from './v-visible';
|
n,s=map(int,input().split())
a=[]
for i in range(n):
q=list(map(int,input().split()))
a.append(q[0]*60+q[1])
if a[0]>s:
print(0,0)
exit()
for j in range(1440):
for i in range(n-1):
if a[i]+s<j<a[i+1]-s:
print(j//60,j%60)
exit()
j=a[n-1]+s+1
print(j//60,j... |
package org.springframework.samples.petclinic.product;
import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.Mockito.verify;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import org.mockito.Mockito;
import org.springframework.beans.factory.annotation.Autowir... |
/**
* ipa_sps_irq_tx_no_aggr_notify() - Callback function which will be called by
* the SPS driver after a Tx operation is complete.
* Called in an interrupt context.
* @notify: SPS driver supplied notification struct
*
* This function defer the work for this event to the tx workqueue.
* This event will be later... |
//=============================================================================
// e3group_display_ordered_countobjectsoftype :
// Ordered Display count objects of type method.
//-----------------------------------------------------------------------------
static TQ3Status
e3group_display_ordered_countobjectsoft... |
package controllers
import (
"github.com/zenazn/goji/web"
"gopkg.in/mgo.v2"
)
// InitControllers initialize all controllers
func InitControllers(mux *web.Mux, database *mgo.Database) {
NewTokenController(mux, database)
}
|
package com.tenda.json.pojo;
import java.io.Serializable;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;
import org.apache.commons.lang3.builder.ToStringBuilde... |
CLEVELAND, Ohio -- The jury that convicted East Cleveland serial killer Michael Madison began hearing evidence Thursday as it is now tasked with deciding whether to recommend his execution.
The jury will hear from three psychologists who will describe how Madison's troubled childhood influenced his killing of three yo... |
import { Component, DebugElement, Input } from '@angular/core';
import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing';
import { By } from '@angular/platform-browser';
import { CmsNavigationComponent } from '@spartacus/core';
import {
CmsComponentData,
NavigationNode,
NavigationService,
}... |
/**
* This class tests the {@link BasicTokenBasedUrlGenerator} class.
*/
public class BasicTokenBasedUrlGeneratorTest {
private Context context = InstrumentationRegistry.getTargetContext();
/**
* Tests the {@link BasicTokenBasedUrlGenerator#createInstance(Context)} method. Validates
* that the ins... |
def notify_spool():
while True:
with self._notify.get_direct() as msg:
notification = return_packer.unpack(msg)
if len(notification) == 3:
with self._open_reqs() as open_reqs:
req_id, dtyp... |
//! Definitions for supported Continuous Integration environments
use crate::Context;
mod circle;
mod travis;
impl Context {
/// Try to generate a Context by sniffing the environment
///
/// This will call the available CI sniffers in turn.
pub fn from_env() -> Option<Self> {
if let Some(travis) = travis... |
0:33 Intro. [Recording date: September 29, 2014.] Russ: You're often credited with launching growth theory, a claim you modestly dismiss. But, talk about your papers a long time ago in the 1950s, that at least launched, if not growth theory, your contributions to that theory. What were you trying to achieve, and what c... |
<filename>tests/worker/tests_api.py
import mock
import unittest
from tests.tests_data import fake_talk_json
from tests.tests_data import fake_empty_talk_json
from worker.api import API
def mocked_requests_get(*args, **kwargs):
class MockResponse:
def __init__(self, json_data, status_code):
se... |
# Copyright 2021 UW-IT, University of Washington
# SPDX-License-Identifier: Apache-2.0
from sis_provisioner.views.admin import RESTDispatch
from sis_provisioner.dao.term import get_current_active_term, get_term_after
class TermListView(RESTDispatch):
""" Retrieves a list of Terms.
"""
def get(self, reque... |
/**
A JPanel for displaying and editing kernel startup options.
*/
public class KernelStartupPanel extends JPanel {
private static final String AUTO_SUFFIX = ".auto";
/**
Create a kernel launch GUI.
@param config The system configuration.
@param options The kernel startup options.
*... |
Beer bottles are seen at the brewhouse of the brewery Schlossbrauerei Au-Hallertau in Au-Hallertau on July 12, 2013. (CHRISTOF STACHE/AFP via Getty Images)
It is widely known that Germans love their beer. But their appreciation for the alcoholic beverage extends far beyond Munich Oktoberfest.
Today, alcohol-related t... |
use endpoint_plugin::{
AssetNode,
FileNode,
IAssetNode,
IFileNode,
IProcessNode,
ProcessNode,
};
use rust_proto::graph_descriptions::*;
use sysmon::FileCreateEvent;
use crate::{
generator::SysmonGeneratorError,
models::{
get_image_name,
strip_file_zone_identifier,
... |
#[doc = r" Register block"]
#[repr(C)]
pub struct RegisterBlock {
#[doc = "0x00 - Start Timer"]
pub tasks_start: TASKS_START,
#[doc = "0x04 - Stop Timer"]
pub tasks_stop: TASKS_STOP,
#[doc = "0x08 - Increment Timer (Counter mode only)"]
pub tasks_count: TASKS_COUNT,
#[doc = "0x0c - Clear tim... |
def stream_result_event(input_query: InputTimePeriodQuery,
authorization: str = Header(None),
processor: Processor = Depends(get_processor)):
log.info(f'Entering /data/event/stream with input query: {input_query}')
user_id = authorize_user(authorization)
log.i... |
On the algebraic dimension of twistor spaces over the connected sum of four complex projective planes
We study the algebraic dimension of twistor spaces of positive type over $4\bbfP^2$. We show that such a twistor space is Moishezon if and only if its anticanonical class is not nef. More precisely, we show the equiva... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.