content stringlengths 10 4.9M |
|---|
Station aggregation scheme considering channel interference for radio on demand networks
With the rapid growth of the Internet, deploying energy-efficient networking technology is an urgent matter. In particular, wireless LAN (WLAN), which is widely used due to its ease of deployment and low cost of installation, is a... |
def unhidehashlikerevs(repo, specs, hiddentype):
if not repo.filtername or not repo.ui.configbool('experimental',
'directaccess'):
return repo
if repo.filtername not in ('visible', 'visible-hidden'):
return repo
symbols = set()
for spe... |
/*
<NAME> 3^C Informatica
Questo programma ti permette di giocare al gioco del Master Mind.
In 10 tentativi bisogna indovinare un numero di 4 cifre pensato
dal computer. Saranno 4 cifre singole contenute in un vettore Int
di 4 posizioni. Ad ogni tiro il computer dovrà dire quante cifre sono
sta... |
/**
* Record a histogram by sending it to metrics service or add it to a pending list if the
* connection isn't ready yet. Bind the service only once on the first record to arrive.
*/
private void recordHistogram(HistogramRecord record) {
record = mRecordingDelegate.addMetadata(record);
s... |
import json
import re
import time
import networkx
import requests
from mininet.cli import CLI
from mininet.log import MininetLogger
from mininet.net import Mininet
from mininet.node import RemoteController
from mininet.topo import Topo
from upload import put_flow
class MininetSimulator(object):
def __init__(self... |
// Log prints string to stdout
func Log(format string, v ...interface{}) {
if !strings.HasSuffix(format, "\n") {
format += "\n"
}
fmt.Printf(format, v...)
} |
/**
* The tag reference object
*/
public class GitTag extends GitReference {
/**
* Prefix for tags ({@value})
*/
@NonNls public static final String REFS_TAGS_PREFIX = "refs/tags/";
/**
* The constructor
*
* @param name the used name
*/
public GitTag(@Nonnull String name) {
super(name);
... |
import re
import html
import itertools
from typing import Optional, Tuple
from datetime import date, timedelta
import requests
class NationalDietLibrary:
def __init__(self, offset: int = 30):
self.BASE_SRU_URL: str = "https://iss.ndl.go.jp/api/sru?operation=searchRetrieve&query={param}%3d%22{keyword}%22%... |
/**
* CSVCheckMapper check the content of csv files.
*/
public static class CSVCheckMapper extends Mapper<NullWritable, StringArrayWritable, NullWritable,
NullWritable> {
@Override
protected void map(NullWritable key, StringArrayWritable value, Context context)
throws IOException, Interrupte... |
/**
* Partitioned atomic cache metrics test.
*/
@RunWith(JUnit4.class)
public class GridCacheAtomicPartitionedTckMetricsSelfTestImpl extends GridCacheAtomicPartitionedMetricsSelfTest {
/** {@inheritDoc} */
@Override protected int gridCount() {
return 1;
}
/**
* @throws Exception If faile... |
declare namespace Jymfony.Bundle.SecurityBundle {
import Bundle = Jymfony.Component.Kernel.Bundle;
import ContainerBuilder = Jymfony.Component.DependencyInjection.ContainerBuilder;
/**
* Bundle
*/
export class SecurityBundle extends Bundle {
/**
* @inheritdoc
*/
... |
For more than 180 years, scientists had pulled these "monster" larvae from the guts of fish, wondering they looked like as grown-ups. Turns out, they are the baby version of a deep-sea shrimp. [
For nearly two centuries, scientists have pulled so-called "monster larva" from the guts of fish and wondered what these thi... |
def make_id_number(
date_of_birth: date, gender: Gender, citizenship: Citizenship
) -> str:
date_of_birth_digits = date_of_birth.strftime(DATE_OF_BIRTH_FORMAT)
gender_digits = generate_gender_digits(gender)
if citizenship == Citizenship.SA_CITIZEN:
citizenship_digit = SA_CITIZEN_DIGIT
else:
... |
package api
import (
"database/sql"
"testing"
"github.com/lovi-cloud/satelit/pkg/ganymede"
uuid "github.com/satori/go.uuid"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
"github.com/go-test/deep"
pb "github.com/lovi-cloud/satelit/api/satelit"
)
func TestSatelitServer_AddVirtualMachine(t *t... |
<gh_stars>1-10
import { AngularFireAuth } from 'angularfire2/auth';
import { AngularFireDatabase } from 'angularfire2/database';
import { Observable } from 'rxjs/Rx';
import { Injectable } from '@angular/core';
@Injectable()
export class HelloWorldService {
authState: any = null;
constructor(
private afAuth: ... |
Law of bounded dissipation and its consequences in turbulent wall flows
Abstract The dominant paradigm in turbulent wall flows is that the mean velocity near the wall, when scaled on wall variables, is independent of the friction Reynolds number $Re_\tau$. This paradigm faces challenges when applied to fluctuations bu... |
def fetch(config, engine, index, q, restricted=None):
if len(q) != index.schema.arity:
raise ValueError(f'Arity mismatch for index schema "{index.schema}"')
return _run_query(config, engine, index, q, restricted) |
<filename>psltdsim/plot/__init__.py
#import sys
#if sys.version_info[0] > 2:
# import matplotlib.pyplot as plt
# The above doesn't seem to perform as desired, as a result
# each function handles own import of matplotlib...
from .sysPePmF import sysPePmF
from .sysPePmFLoad import sysPePmFLoad
from .sysPQVF import s... |
import { useEffect } from "react";
import { useToggle } from "@react-md/utils";
const TEN_SECONDS = 10000;
interface ReturnValue {
toggle: () => void;
toggled: boolean;
disable: () => void;
}
export default function useTemporaryToggle(
duration: number = TEN_SECONDS
): ReturnValue {
const [toggled, , disab... |
import * as React from 'react';
import styles from '../GraphApiWebpartSimpleExample.module.scss';
import { IGraphApiWebpartSimpleExampleProps } from './IGraphApiWebpartSimpleExampleProps';
import { Environment, EnvironmentType } from '@microsoft/sp-core-library';
import { MSGraphClient } from "@microsoft/sp-http";
impo... |
def rpc_to_json(rpc_message):
return json.loads(protojson.encode_message(rpc_message)) |
/**
* Resets the configuration if two requests are made during 5s
* After reset the unit will reboot
*/
void funcResetConfirmTimeout() {
static unsigned long lastRequest = 0;
if (!lastRequest) {
Serial1.println("Config: Reset timer first call");
lastRequest = millis();
return;
}
if (millis() - la... |
<commit_msg>Add suppressing warnings for preferences activity.
Change-Id: I7808e8bbc080b65017dc273e423db51c9151d9f7
<commit_before>/* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of ... |
<filename>src/kv.cpp
#include <kv.hpp>
void kv::set(const name &owner,
const name &key,
const string &value,
const string ¬es)
{
require_auth(owner);
kv_table kv_t(get_self(), get_self().value);
if (exists(owner, key))
{
auto kv_itr = kv_t.find(get_id(owner... |
/**
* Configures the operation tests for Drools.
*
* @author Sizonenko
* @author El-Sharkawy
*/
public class GeneratedStats extends AbstractTest {
/**
* Creating a test instance.
*
* @param descriptor the test descriptor
*/
protected GeneratedStats(ITestDescriptor descriptor) {
... |
<reponame>ernasauer/zombiespbbg
import { FrameworkConfiguration } from 'aurelia-framework';
import { Config } from 'aurelia-api';
import { PersistenceUnit } from './persistence-unit';
import { PersistenceConfiguration } from './persistence-configuration';
/**
* Persistence feature configuration
*
* @export
* @par... |
<filename>src/Components/Organisms/DataTable/Common/FakeComponents/FakeColumns.tsx
import React, { ReactElement } from 'react';
import {
IColumnAmount,
IColumnBadge,
IColumnButton,
IColumnCheckbox,
IColumnCode,
IColumnCustom,
IColumnDate,
IColumnDescription,
IColumnDynamicSearch,
IColumnFile,
ICol... |
{-# LANGUAGE OverloadedStrings #-}
module Chainweb.Api.ChainTip where
------------------------------------------------------------------------------
import Data.Aeson
import Data.Text (Text)
------------------------------------------------------------------------------
data ChainTip = ChainTip
{ _tipHeight :: Int
... |
When Tertium Organum burst onto the New York literary scene its author, P. D. Ouspensky, was unaware of it. Piotr Demianovich Ouspensky, the most famous pupil of Greco-Armenian spiritual teacher George Ivanovitch Gurdjieff, had written Kluck Kzaradkam (the original title) in his native Russian and it had been published... |
/**
* Test expressions containing mathematical operations.
*/
public void testEvaluateMathematicalOperations() {
Evaluator evaluator = new Evaluator();
try {
/*
* These tests involve valid expressions.
*/
assertEquals("4.0", evaluator.evaluate("4"));
... |
//=========================================================================
// Copyright (C) 2012 The Elastos Open Source Project
//
// 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
//
// ... |
/**
* The terminal {@link InvocationContext} in the interception chain. It is passed to the last interceptor in the chain and calling {@link #proceed()} invokes
* the underlying business method.
*
* @author Jozef Hartinger
* @see NonTerminalAroundInvokeInvocationContext
* @see AroundInvokeInvocationContext
*
*/... |
Android drivers are returning to the Linux kernel. Kernel maintainer Greg Kroah-Hartman has retrieved the Android drivers removed from the staging area of Linux 2.6.33 in the spring of 2010 and put them back into his development branch for version 3.3 of the Linux kernel.
The plan is for a Linux 3.3 kernel to be able ... |
LEGENDARY South Australian winemaker Peter Lehmann - the Baron of the Barossa - has died at 82.
Lehmann suffered from kidney disease and reportedly died in hospital in Adelaide after surgery this week.
One of the nation's most respected winemakers, he is survived by his wife Margaret, their sons David and Philip, and... |
#include<iostream>
#include<cstdio>
#include<cstring>
#include<cmath>
#include<iomanip>
#include<algorithm>
#include<queue>
#include<stack>
#include<vector>
#define ri register int
using namespace std;
struct node{int a,b,c;};
struct inf{int to,val;};
node rel[100005];
int n,m,q,mod;
long long ans=1;
int prt[100005],de... |
<filename>service/src/test/java/my/company/service/svc/filter/FieldFilteringResponseFilterTest.java
package my.company.service.svc.filter;
import javax.ws.rs.container.ContainerRequestContext;
import javax.ws.rs.container.ContainerResponseContext;
import javax.ws.rs.core.MultivaluedHashMap;
import javax.ws.rs.core.Mul... |
<reponame>Noob-can-Compile/PySyft
import React from 'react'
import cn from 'classnames'
import { ReactNode } from 'react'
import { useTable, useRowSelect, useSortBy, useGlobalFilter } from 'react-table'
import { Checkbox, Text } from '@/omui'
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import { faS... |
<gh_stars>0
/**
* Daily Challenge #4 - Checkbook Balancing
* https://dev.to/thepracticaldev/daily-challenge-4-checkbook-balancing-hei
*
* You are given a small checkbook to balance that is given to you as a string.
* Sometimes, this checkbook will be cluttered by non-alphanumeric characters.
*
* The first line s... |
#pragma once
#include <iostream>
#include <fstream>
#include <array>
#include <string>
#include <vector>
#include <glm/glm.hpp>
#include "Chunk.h"
#include "World.h"
namespace Blocks
{
namespace FileHandler
{
bool WriteChunk(Chunk* chunk, const std::string& dir);
bool ReadChunk(Chunk* chunk, const std::string... |
Two fighter jets were scrambled to escort a plane after one of its passengers threatened to blow it up – because the duty-free items he wanted were not on sale.
The F-16s joined Sunwing Airlines flight 772 an hour after it took off from Pearson International Airport in Toronto as a ‘precaution’ following threats made ... |
import React, { useState, useEffect } from 'react'
import { useViewModel } from '@resolve-js/react-hooks'
import { Redirect } from 'react-router-dom'
import { getDecrypter } from '../../common/encryption-factory'
import Login from './Login'
import Loading from './Loading'
const ProfileWithViewModel = ({ userId }: { us... |
def on_disconnect():
nickname = session.get('nickname')
if nickname:
user = User.query.filter_by(nickname=nickname).first()
if user:
user.online = False
db.session.commit()
push_model(user) |
package com.example.dmp.enums;
/**
* @className: TencentGrantTypeEnum
* @description: 腾讯广告-授权认证请求类型
* @author: wangzb01
* @version: V1.0
* @since: V1.0
* @date: 2019/8/15 16:02
*/
public enum TencentGrantTypeEnum {
/**
* 授权认证请求类型
*/
authorization_code,
refresh_token
}
|
import os
import time
import socket
import requests
import base64
import yaml
from datetime import datetime, timedelta
from flask import Flask, request, g, render_template, jsonify, Response
app = Flask(__name__)
app.config.from_object(__name__) # load config from this file , flaskr.py
config = None
with open(os.ge... |
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <algorithm>
using namespace std;
#define LL long long
#define Inf 1e9
const int maxn=1010;
int n,m;
int Hash[maxn];
struct Node{
int v,pos;
bool operator < (const Node & a)const{
if(v!=a.v) return v>a.v;
return pos<a... |
def install(self):
url = 'https://github.com/nlohmann/json/releases/download/v3.6.1/json.hpp'
patch_paths = ['json/CMakeLists.txt', 'json/json-config.cmake']
self.install_single(url, 'json/json.hpp', patch_paths) |
import SocketServer
from tcp.tcpserver import Server
from utils import log
# from redistool import rclinet
# from urls.urldistributer import urldistributer
def main():
HOST,PORT = "localhost",23333
server = SocketServer.ThreadingTCPServer((HOST,PORT),Server)
log.info("start tcp server ,waiting for connection...")
... |
<gh_stars>0
use std::fmt::Debug;
use crate::parse::error::CbParseError;
#[derive(Debug, Clone)]
pub enum CbError {
Parse,
Io,
}
impl<I: Debug> From<nom::Err<CbParseError<I>>> for CbError {
fn from(err: nom::Err<CbParseError<I>>) -> Self {
log::error!("Parsing failed: {:?}", err);
CbError:... |
/**
* Created by IntelliJ IDEA.
* User: Paul
* Date: Nov 8, 2006
* Time: 12:01:32 PM
* To change this template use File | Settings | File Templates.
*/
public class PluginUtils {
private static final Map<String, String> FQCN_TO_BINARY_CLASS_NAME = new ConcurrentHashMap<String, String>();
public static St... |
def connect(self, username=None, passcode=None, wait=False, headers={}, **keyword_headers):
cmd = CMD_STOMP
headers = utils.merge_headers([headers, keyword_headers])
headers[HDR_ACCEPT_VERSION] = self.version
headers[HDR_HOST] = self.transport.current_host_and_port[0]
if self.tra... |
<filename>chapter10/start_here/providing-global-mocks-for-jest/src/app/components/counter/counter.component.ts<gh_stars>10-100
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-counter',
templateUrl: './counter.component.html',
styleUrls: ['./counter.component.scss'],
})
export class... |
/**
* MuTable represents the base class for all side-effectable tables. It provides the basic
* change protocol for tables. See MuSet.
*/
public abstract class MuTable extends ScruTable {
// protected static Signal AlreadyInTableSignal;
// protected static Signal NotInDomainSignal;
// protected static Signal Nu... |
<filename>src/test/java/com/ghgande/j2mod/modbus/utils/BitVectorTest.java<gh_stars>100-1000
package com.ghgande.j2mod.modbus.utils;
import com.ghgande.j2mod.modbus.util.BitVector;
import org.junit.Assert;
import org.junit.Test;
public class BitVectorTest {
@Test
public void testBitVector() {
for (int... |
def duration_grid(start=.01,stop=0.29,N=5):
dur_grid = np.linspace(start,stop,N)
return dur_grid |
Nanoparticles to Deal with Gastric Cancer
Nanomedicine has become a comprehensive field of medical science since the invention of nanoparticles namely nanotechnology. Uses of nanocarrier ease the way to deliver drugs more easily to deal with deadly diseases like cancer. Gastric cancer, another common form of cancer wo... |
import numpy
def LU_decomposition(a,b,c):
# for tridiagonal matrix
# a = main diagonal
# b = below diagonal
# c = above diagonal
# else all 0
# operation count 0(n)
n = len(a)
b.insert(0,0)
l = [0]*n
u = [0]*n
u[0] = a[0]
for i in range(1,n):
l[i] = b[i]/u[i-1]... |
<filename>hagia/utils/hthread.py
import threading
#class Thread(threading.Thread):
# def __init__(self,*args,**kwargs):
# super().__init__(*args,**kwargs)
Thread = threading.Thread
|
DiOC6 staining reveals organelle structure and dynamics in living yeast cells.
When present at low concentrations, the fluorescent lipophilic dye, DiOC6, stains mitochondria in living yeast cells . However, we found that the nuclear envelope and endoplasmic reticulum were specifically stained if the dye concentration... |
def open( self ):
self.sql_con = lite.connect( self.db_name ) |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vl = vector<ll>;
using vi = vector<int>;
using vvi = vector<vi>;
#define ote(x) cout<<(x)<<endl
#define all(x) (x).begin(),(x).end()
// #define allr(x) (x).rbegin(),(x).rend()
#define rp(i,s,e) for(int i=(s);i<(e);++i)
template<class T> T in(){T ... |
/**
* {@link RotateCommand} sets up the angle parameter and it will rotate turtle
* by the given angle, on which is on the peek of the {@link Context}.
*
* @author dario
*
*/
public class RotateCommand implements Command {
private double angle;
/**
* It constructs the {@link RotateCommand} with the angle as... |
def _printKclosest(arr,n,x,k):
a=[]
pq = PriorityQueue()
for neighb in range(k):
pq.put((-abs(arr[neighb]-x),neighb))
for neighb in range(k,n):
diff = abs(arr[neighb]-x)
p,pi = pq.get()
curr = -p
if diff>curr:
pq.put((-curr,pi))
c... |
<filename>src/master/src/be/ac/ulb/crashcoin/master/net/RelayListener.java<gh_stars>1-10
package be.ac.ulb.crashcoin.master.net;
import be.ac.ulb.crashcoin.common.Parameters;
import be.ac.ulb.crashcoin.common.net.AbstractListener;
import java.io.IOException;
import java.net.ServerSocket;
import java.net.Socket;
/**
... |
import java.util.Scanner;
public class se{
public static void main(String eww[]){
Scanner rm=new Scanner(System.in);
int a = rm.nextInt();
int z= (a*2)+1;
int h=z/2;
int o=z/2,x=z/2,count=0;
for(int i=0;i<z;i++){
for(int j=0;j<z;j++){
if(o<=j&&x>=j){
if(x==j){
p(count);
... |
LEGO Store at Providence Place to Build 8 ft Model of The Incredible Hulk
The LEGO Store at the Providence Place Mal l will construct an eight foot tall model of the Incredible Hulk starting on Friday, June 26 and finishing on Sunday, June 28. Kids and adults are invited to help a LEGO Master build the Hulk completely... |
Regularly using a mobile phone for at least four years seems to be associated with a doubling in the risk of developing chronic tinnitus (persistent ringing/roaring/hissing in the ear), indicates a small study published online in Occupational and Environmental Medicine.
The prevalence of chronic tinnitus is increasing... |
<filename>unused/crypto/enigma.cc
#include <stdio.h>
#include <time.h>
#include <string.h>
// enigma d simulator - three rotors, no plugboard
// Encryption equation:
// (p)KC(i)WC(-i)C(j)VC(-j)C(k)UC(-k)RC(k)UinvC(-k)C(j)VinvC(-j)C(i)WinvC(-i)Kinv = c
const char* Input= "abcdefghijklmnopqrstuvwxyz"... |
def UserAccessibleProjectIDSet():
return set(p.projectId for p in projects_api.List()) |
IoT based Framework for Smart Campus: COVID-19 Readiness
Internet of Things (IoT) plays an important role in connecting everything together and to the Internet through specific protocols for information exchange and communications. It helps in achieving use cases such as intelligent recognition, location, tracking, mo... |
/**
* A deployment configuration.
*/
@Deprecated
public class DeployConfiguration extends AbstractDescribableImpl<DeployConfiguration> {
private final String user;
private final String account;
private transient List<Deployable> deployables;
@Deprecated
@SuppressWarnings("deprecation")
pub... |
404 BC. Greece
I’ve seen my death, and it’s coming soon.
So, I need to tell you a story, not just about me, but also about my brave comrades who gave their lives fighting the monster Chaos.
If I don’t share what happened, the world will never hear of the epic fight waged between the cruel beast Chaos, and the Sparta... |
def yield_objs_from_json(json_text, pos=0, decoder=JSONDecoder(), cleaned=False):
if not cleaned:
json_text = _clean_obj_string_for_parsing(json_text)
if isfile(json_text):
with open(json_text, 'r') as fp:
json_text = fp.read()
while True:
match = RX_NOT_WHITESPACE.search... |
<reponame>mdblabs/ModEngine
//
// Created by <NAME> on 19/5/16.
//
#ifndef MODENGINE_AGENT_H
#define MODENGINE_AGENT_H
#include "Message.h"
class Agent
{
public:
Agent();
~Agent();
MessageBus *_msgBus;
virtual void handleMessage(Msg *msg);
};
#endif //MODENGINE_AGENT_H
|
//
// Decompiled by Procyon v0.5.36
//
package org.mudebug.prapr.reloc.commons.httpclient;
interface ResponseConsumedWatcher
{
void responseConsumed();
}
|
/**
* @license
* Copyright Workylab. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://raw.githubusercontent.com/workylab/materialize-angular/master/LICENSE
*/
// Angular
import '@angular/animations';
import '@angular/common';
... |
def _find_path(node, path, i):
node_index = node["index"]
info = {'node':node_index,'j':node["j_feature"],'thresh':node["threshold"]}
path.append(info)
if node_index == i:
return True
... |
About a week ago, CCP announced some tentative broad strokes about moon resource harvesting. The dev blog can be found here, and it’s worth reading before taking a look at the rest of this article.
Essentially, moon mining will change from a passive activity punctuated by someone emptying a silo or refueling a POS onc... |
/**
Constructs a new message-driven image loader.
Since it does some heavy-duty image processing it is best
to keep it low priority to improve the overall responsivness.
*/
ImageLoader::ImageLoader(const char *name):
BLooper(name, B_NORMAL_PRIORITY),
fItems(32, true),
fQueries(8, true),
fRunning(false),
fLoadOp... |
import socket
OPEN_PORTS = []
def get_host_ip_addr(target):
try:
ip_addr = socket.gethostbyname(target)
except socket.gaierror as e:
print(f"C'è stato un errore... {e}")
else:
return ip_addr
def scan_port(ip, port):
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
... |
/*
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
| Copyright (c) 1997-2008 The PHP Group |
+--------------... |
/*
AbstractJarAgent is base class for java agents used in AttachOnDemand tests
(tests against Attach API, API from package com.sun.tools.attach).
In all AttachOnDemand tests the same algorithm is used:
- java application where agent is loaded to (target application) based on
class nsk.share.aod.TargetApplica... |
#!/usr/bin/env runhaskell
{-
http://programmingpraxis.com/2016/01/22/entropy/
Shannon entropy is computed as H = -1 * sum(pi * log2(pi))
where pi is the frequency of each symbol i in the input
-}
module Entropy where
import Data.List (group,sort)
main :: IO ()
main = interact ((++"\n") . show . measureEntropy... |
from os.path import dirname, join
from cx_Freeze import Executable, setup
from setuptools import find_packages, setup
import usonic
NAME = 'usonic'
URL = 'https://github.com/Kneshal/project_usonic.git'
DESCRIPTION = 'A package to calculate ultrasonic parametres'
LICENCE = 'MIT'
AUTHOR = '<NAME>'
EMAIL = '<EMAIL>'
RE... |
def add_client(self, client):
self.driver.get(self.url)
self.wait_until_visible(type=By.ID, element=clients_table_vm.ADD_CLIENT_BTN_ID).click()
self.log('Select {0} from "CLIENT CLASS" dropdown'.format(client['class']))
member_class = Select(
self.wait_until_visible(type=By.I... |
// The feature should not be enabled if the origin is insecure, even if a valid
// token for the origin is provided
TEST_F(OriginTrialContextTest, EnabledNonSecureRegisteredOrigin) {
TokenValidator()->SetResponse(WebOriginTrialTokenStatus::kSuccess,
kFrobulateTrialName);
bool is_orig... |
//go:generate goyacc -o annotations.y.go -p annotations annotations.y
func init() {
annotationsErrorVerbose = true
setTokenName(_STRING_LIT, "string literal")
setTokenName(_RAW_STRING_LIT, "raw string literal")
setTokenName(_IDENT, "identifier")
setTokenName(_RUNE_LIT, "rune literal")
setTokenName(_INT_LIT, "int ... |
/* ************************************************************************** */
/* */
/* :::::::: */
/* make_width_base.c :+: :+: ... |
def check_existing_account(account_username):
return Credentials.account_exist(account_username) |
def er_partially_interconnected(nodes,ps,couplings=('categorical',1.0)):
assert len(nodes)==len(ps)
net=MultiplexNetwork(couplings=[couplings],fullyInterconnected=False)
for layer,lnodes in enumerate(nodes):
net.add_layer(layer)
single_layer_er(net.A[layer],lnodes,ps[layer])
return net |
Here is to alcohol: the cause of, and answer to, all of life’s problems- Mike Groening
The Nitish Kumar government banned alcohol in Bihar after coming to power. They promised this before they were voted in. They also promised to put all adult members of a household in jail if a bottle of liquor was found in their hou... |
// SetObjectId sets identifier of the object.
func (m *Object) SetObjectId(v *refs.ObjectID) {
if m != nil {
m.ObjectId = v
}
} |
04 6 v 3 2 0 Ju n 20 06 New models for a triaxial Milky Way Spheroid and effect on the microlensing optical depth to the Large Magellanic Cloud
We obtain models for a triaxial Milky Way spheroid based on data by Newberg and Yanny. The best fits to the data occur for a spheroid center that is shifted by 3kpc from the G... |
// Get the status of all migration scripts
func Get(DBFunc func() *sql.DB, dir string) ([]MigrationStatus, error) {
source := migrate.FileMigrationSource{
Dir: dir,
}
migrations, err := source.FindMigrations()
if err != nil {
return nil, err
}
records, err := migrate.GetMigrationRecords(DBFunc(), "postgres")
... |
<reponame>Jackzmc/zeko-v3
import { Client } from "discord.js";
import Logger from '../../Logger.js'
import { EventConfig } from '../../types/Event';
import Core from "../Core.js";
/**
@module core:types/CoreEvent
@desc The CoreEvent class, core events inherit
*/
export default class {
protected client: Client;
... |
/**
* Abstract, common implementation for all GitHub tests.
*
* @author Miroslav Stencel
*
*/
public class GitDvcs implements Dvcs
{
/**
* Map between test repository URI and local directory of this repository.
*/
private Map<String, Git> uriToLocalRepository = new HashMap<String, Git>();
... |
<reponame>netteydavid/aurora-node
import enum
class Status(enum.Enum):
none = 0
accepted = 1
rejected = 2
|
// Copyright (c) 2021, JFXcore. All rights reserved.
// Use of this source code is governed by the BSD-3-Clause license that can be found in the LICENSE file.
package org.jfxcore.compiler.ast.emit;
import javafx.beans.value.ObservableValue;
import javassist.CtClass;
import javassist.bytecode.MethodInfo;
import org.je... |
<reponame>XiaoyuGuo/DesignPatterns<gh_stars>1-10
package com.xiaoyu;
/**
* Created by gxytk on 2016/9/27.
*/
public class Product {
//Assume product is produced by step1, step2 and step3
// Step1 of product
private String step1;
// Step2 of product
private String step2;
// Step3 of produc... |
def _verify_facet_type(self, field, expected_type):
facet_info = self.facet_map.get(field)
if facet_info and facet_info.get_props()["type"] != expected_type:
return False, 'Column, "%s", is not %s facet' % (field, expected_type)
else:
return True, None |
Several Democratic senators said Tuesday night that they won’t support a filibuster against President Donald Trump’s nomination to the supreme court Neil Gorsuch.
Democratic Delaware Sen. Chris Coons said that he will “push for a hearing and I will push for a vote.” Democratic North Dakota Sen. Heidi Heitkamp similarl... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.