content stringlengths 10 4.9M |
|---|
// Set the logfile header and footer (chainable). Must be called before the first log
// message is written. These are formatted similar to the FormatLogRecord (e.g.
// you can use %D and %T in your header/footer for date and time).
func (w *FileLogWriter) SetHeadFoot(head, foot string) *FileLogWriter {
w.header,... |
#include <stdio.h>
int main()
{
int i,a,n,k,z,l,j,sum=0,p=0,d=0,r,temp;
scanf ("%d" , &n);
int ar[101];
for (l=0;l<n;l++)
{
scanf("%d", &ar[l]);
}
for (k=0; k<n; k++)
sum+=ar[k];
for (i = 0; i < n; ++i)
{
for (j = i + 1; j < n; ++j)
{
if (ar[i] < ar[j])
{
a = ar[i];
a... |
<reponame>errord/sputnik
#-*- coding: utf-8 -*
#
# Copyright 2011 shuotao.me
# by <EMAIL>
# 2011-11-3
#
# Sputnik File System (IFS)
#
# ToDoList:
#
import random
import os
from SpuDateTime import SpuDateTime
from SpuDebug import *
from SpuLogging import *
_fs = {}
def createSpuFS(type, cfg, fs_name = 'fs_default'):... |
<filename>reactive-banana-playground/josephus/src/Main.hs<gh_stars>0
module Main
( main
)
where
import Control.Concurrent.Async
import Control.Concurrent
import Control.Monad
import Data.Function
import Data.List
{-
(WIP) Simulation of Josephus problem (https://en.wikipedia.org/wiki/Josephus_problem)
with rea... |
<reponame>ExaByt3s/hack_scripts
#ifndef __ETHERNET_F_H_
#define __ETHERNET_F_H_
err_t ethernetif_init(struct netif *netif);
#endif //__ETHERNET_F_H_ |
/**
* A {@link com.adito.table.TableItem} implementation used by displaying
* certificates or keys in a {@link com.adito.boot.KeyStoreManager}.
*/
public class CertificateItem implements TableItem {
// Private instance variables
/**
* Constant for the if the selected item is a key.
*/
... |
Cancer genetics of sporadic colorectal cancer: BRAF and PI3KCA mutations, their impact on signaling and novel targeted therapies.
Novel activating mutations in sporadic colorectal cancer (CRC) have recently been identified on major kinase encoding genes such as BRAF and PI3KCA. The presence of these activating point m... |
# Table of Contents
1. Cover
2. Title Page
3. Copyright
4. Dedication
5. Preface
6. Chapter 1: ARM® CORTEX®-M4 Development Systems
1. 1.1 Introduction
2. Reference
7. Chapter 2: Analog Input and Output
1. 2.1 Introduction
2. 2.2 TLV320AIC3104 (AIC3104) Stereo Codec for Audio Input and O... |
/**
* EmailTemplate is an email template, though it could actually be used for anything,
* identified by a unique key and set to be locale specific if desired
*/
@Root
@Entity
@Table(name = "EMAIL_TEMPLATE_ITEM",
uniqueConstraints = {@UniqueConstraint(columnNames = {"TEMPLATE_KEY", "TEMPLATE_LOCALE"})},
... |
/// Executes the `create2` operation for a given contract with the given value
/// and salt.
pub fn create2(
contract: &Contract,
value: yul::Expression,
salt: yul::Expression,
) -> yul::Expression {
let name = literal_expression! { (format!("\"{}\"", contract.name)) };
expression! {
contrac... |
// After taking a lock on the table for the given bucket, this function will
// check the hashpower to make sure it is the same as what it was before the
// lock was taken. If it isn't unlock the bucket and throw a
// hashpower_changed exception.
inline void check_hashpower(const size_t hp, const size_t lock) const {
... |
import { Me } from '@codement/ui/lib/containers/Me.container';
import { Loader } from '@codement/ui';
import React from 'react';
import { useHistory } from 'react-router';
import styles from './Dashboard.module.css';
import { ModuleTree } from '../../components/ModuleTree/ModuleTree';
import { LeaderboardWidget } from... |
// GetDataChannelStats is a helper method to return the associated stats for a given DataChannel
func (r StatsReport) GetSCTPTransportStats(st *SCTPTransport) (SCTPTransportStats, bool) {
stats, ok := r["sctpTransport"]
if !ok {
return SCTPTransportStats{}, false
}
stStats, ok := stats.(SCTPTransportStats)
if !... |
Kentucky’s chapter of College Republicans have dug up one of the weakest “gotcha” moments in recent political memory.
The group posted cell phone video of Democratic Senate candidate Alison Lundergan Grimes being picked up by her husband at what appears to be Lexington’s Blue Grass Airport.
The video shows Grimes, wh... |
/**
* Provided schedule is started.
*
* @param schedule
* the schedule to start
* @return returns true if schedule was started
*/
public boolean start(Schedule schedule) {
boolean ret = false;
if (schedule != null) {
if (!isScheduleActive(schedule.getName())) {
if (schedule instanceof... |
<reponame>mahdiyarsoft/TIc-Tac-Toe
(() => {
const pos: NodeListOf<Element> = document.querySelectorAll('.row');
let option: string = "O";
pos.forEach(pos => pos.addEventListener("click", () => {
CHECKoption();
if (pos.innerHTML == "") {
const x = document.createElement("h1");
... |
Down syndrome and breastfeeding: A systematic review
Several conditions related to serious difficulty in initiating and maintaining breastfeeding in neonates with Down syndrome are described in the literature. This study aimed to investigate the frequency of breastfeeding in neonates with Down syndrome, as well as the... |
/**
* A generic RecyclerView adapter that uses Data Binding
* @author lipeiyong
*/
public abstract class BaseDataBoundAdapter<DataType, V extends ViewDataBinding> extends RecyclerView.Adapter<DataBoundViewHolder<V>> implements DataBoundAble<DataType> {
public BaseDataBoundAdapter() {
}
public BaseData... |
<reponame>AriaMinaei/leva
import { useRef } from 'react'
import create from 'zustand'
import shallow from 'zustand/shallow'
import { normalizeInput, pick, getKeyPath, join } from './utils'
import { warn, LevaErrors } from './utils/log'
import { Data, FolderSettings, Folders, SpecialInputTypes } from './types'
type Sta... |
// formatSetValuesAsArgs formats the given values as command line args for helm using the given flag (e.g flags of
// the format "--set"/"--set-string" resulting in args like --set/set-string key=value...)
func formatSetValuesAsArgs(setValues map[string]string, flag string) []string {
args := []string{}
keys := colle... |
/**
* Implementation of the PageMessage Interface.
*
* @version JSR281-PUBLIC-REVIEW (subject to change).
*
* @author Cheambe Alice <alice.cheambe@fraunhofer.fokus.de>
* @author Andreas Bachmann <andreas.bachmann@fraunhofer.fokus.de>
*
*/
public class PageMessageImpl extends ServiceMethodImpl implements Page... |
Between Isolation and Integration: Religion, Politics, and the Catholic Irish in Preston, C.1829-1868
ABSTRACT Since the 1970s, case-studies have highlighted specific local contexts which informed variegated Irish migrant experience across nineteenth-century Britain. This article scrutinises how the Catholic Irish in ... |
DRD Tactical’s new Paratus is a semi-automatic take-down .308 Win. rifle designed to meet the military’s Clandestine Break-Down Semi-Automatic Rifle (CSR) proposal specifications. When broken down it fits inside an attaché case and can be assembled and ready to fire in under 60 seconds as demonstrated in the video belo... |
/**
* Contains information about a datapoint on an ROC curve
*/
public static class DataPoint
extends AbstractCloneableSerializable
{
/**
* Binary classifier used to create the corresponding ConfusionMatrix,
* which is really a wrapper for the threshold
... |
/**
* Test of getTargetNamespace method, of class XMLUtil.
*/
@Test
public void testGetTargetNamespace() throws Exception {
System.out.println("getTargetNamespace");
File xsdFile = new File("src/test/resources/xsd/mets.xsd");
Document document = JaxenUtil.getDocument(xsdFile);
String expResult =... |
#include "pigeon.h"
#include "utils.h"
#include "client.h"
int NewSocket() {
int sockfd = socket(AF_INET, SOCK_STREAM, 0);
setsockopt(sockfd, SOL_SOCKET, SO_REUSEADDR, NULL, sizeof(int));
if (sockfd <= 0) {
err_quit("NewSocket failed!");
}
return sockfd;
}
struct sockaddr_in *NewServerAddr... |
<filename>src/app/utilities/mockdata.ts
import { Participants } from '../interfaces/participants';
import { Tournament } from '../interfaces/tournament';
export class MockData {
public static getTournaments(): Tournament[] {
return [
{
id: '378426939508809728',
discipline: 'my_discipline',
... |
<gh_stars>1-10
package org.mark.mobile.ctrl;
/**
* Created by mark on 2019/8/5
*/
public class KeyIndex {
public static final String SPEED = "config_speed";
}
|
/**
* @param item desired element for searching.
* @return reference of node of item if item is present in the tree.
*/
public Node<E> postOrderSearch(E item,int option) {
if(root == null) return null;
Stack<Node<E>> tree = new Stack<>();
Node<E> temp = root;
while(!tr... |
Blue noise digital color halftoning with multiscale error diffusion
Abstract. A recent trend in color halftoning is to explicitly control color overlapping, dot positioning, and dot coloring in different stages of the halftoning process. As feature-preserving multiscale error diffusion (FMED) shows its capability and ... |
<reponame>parduino/MDOF<filename>Model.cpp
#include "Model.h"
#include <QDebug>
Model::Model(QObject *parent) :
QObject(parent)
{
}
void
Model::setNumFloors(int num){
numFloors = num;
if (mass != 0 || numFloors != num) {
delete [] mass;
}
mass = new double[num];
qDebug(... |
/// Some cycleways intersect footways with detailed curb mapping. The current rules for figuring
/// out which walking paths also allow bikes are imperfect, so we wind up with short dead-end
/// "stubs." Trim those.
///
/// Also do the same thing for extremely short dead-end service roads.
pub fn trim_deadends(raw: &mu... |
/**
* A simple application that uses MongoDB to store and manage User details.
*
* @author gazbert
*/
@SpringBootApplication
public class Application implements CommandLineRunner {
private UserService userService;
private RegistrationService registrationService;
@Autowired
public Application(UserService u... |
k,n = [int(kn) for kn in raw_input().split(" ")]
t = [int(ti) for ti in raw_input().split(" ")]
ans = 0
for b in range(n):
m = 0
o = 0
# if b > 0:
# print
# print b
for i in range(k):
if ((i-b)%n) == 0:
pass
# print '..',
else:
if t[i] == -1:
m += 1
elif t[i] == 1:
o += 1... |
/*
* Create the final wieghted (Gmm) combined curve. The Gmm curves were
* scaled by their weights while building (above).
*/
private void computeFinal() {
double sourceSetWeight = sourceSet.weight();
for (Entry<Imt, Map<Gmm, ArrayXY_Sequence>> entry : curveMap.entrySet()) {
Imt imt = entry.getKey();... |
def format_for_post(self):
records = []
now = datetime.datetime.now()
for app, sessions in self._apps.iteritems():
for session in sessions:
start = session[0]
end = session[1] or now
records.append(self.DATA_SEPARATOR.join((app, start.isoformat(), end.isoformat())))
return self.RECORD_SEPARATOR.j... |
// This file has been automatically generated by writeMessageClasses.js
import { UUID } from '../UUID';
import { Vector3 } from '../Vector3';
import { MessageFlags } from '../../enums/MessageFlags';
import { MessageBase } from '../MessageBase';
import { Message } from '../../enums/Message';
export class UserReportMes... |
<filename>bath_fitting/SDR_fitting.py
import cvxpy as cp
import numpy as np
import mosek
def delta_eval(poles, z, X):
# compute \sum \frac{X_j}{z_i - \lambda_j }
# output =
K = poles.shape[0]
L = X[0].shape[0]
assert X[0].shape[1] == L
diff = 1/(np.reshape(z, (-1, 1, 1, 1)) - np.reshape(po... |
#pragma GCC optimize("O3")
#include<bits/stdc++.h>
#define rc(x) return cout<<x<<endl,0
#define pb push_back
#define in insert
#define er erase
#define fr first
#define sc second
const int inf=INT_MAX;
const int nmax=1e5+5;
const int mod=1e9+7;
typedef long long ll;
using namespace std;
int n,k,i,a[123],j;... |
def predict(self, num_points=50):
if self.modeltype == 'Numpy':
pred_r = prediction.rec_forecast_np(y=self.df,
model=self.model,
window_length=self.window_length,
... |
<filename>src/app/modules/shared/root-components/components/responsive-sidenav/responsive-sidenav.component.ts
import {
Component,
Input,
ViewChild,
OnInit,
OnDestroy,
ChangeDetectionStrategy,
ChangeDetectorRef,
} from '@angular/core';
import { MatSidenav } from '@angular/material/sidenav';
... |
<reponame>zyx-team/zyx-news-service
package com.zyx.grace.result;
/**
* 响应结果枚举,用于提供给GraceJSONResult返回给前端的
* 本枚举类中包含了很多的不同的状态码供使用,可以自定义
* 便于更优雅的对状态码进行管理,一目了然
*/
public enum ResponseStatusEnum {
SUCCESS(200, true, "操作成功!"),
FAILED(500, false, "操作失败!"),
// 50x
UN_LOGIN(501,false,"请登录后再继续操作!"),
T... |
/**
* Creates the Shape_c subtype if it doesn't exist
* already, this method also fixes it's own inconsistency
* by removing the additional subtype (the method originally
* created a new subtype even if a ContainingShape_c subtype
* already existed)
*/
public void createShapeSubtypes(Ooaof... |
In the previous part of VivaGlobetrotting you will have found out that Alejandro Hurtado has left Chicago Fire in the MLS to join an unnamed Spanish La Liga team.
As it is 2031, it seems an appropriate point to take a look back at some of Hurtado’s past clubs to see how they are getting on now.
It also serves the pur... |
<reponame>cedrictrovati-bib/sp-dev-fx-controls-react
export * from './FolderTile';
export * from './IFolderTileProps';
|
// Get returns the value stored at the given key. If an object was previously
// stored at the key, it serialized bytes will be returned.
func (t *Tx) Get(ctx context.Context, key string) (string, error) {
okey, err := internal.NewObjectKey(key)
if err != nil {
return "", err
}
s, err := t.tx.Get(ctx, okey.String... |
/**
* Find string "findStr" in another string "str"
* Returns true if found, false elsewhere
*/
int16_t SIM808Driver::strIndex(const char *str, const char *findStr, uint16_t startIdx)
{
int16_t firstIndex = -1;
int16_t sizeMatch = 0;
for (int16_t i = startIdx; i < strlen(str); i++)
{
if (sizeMatch >= str... |
<reponame>admiraltyio/multicluster-controller
/*
Copyright 2018 The Multicluster-Controller Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
... |
Beyond Learner-Centered Practice: Adult Education, Power, and Society.
At the heart of practice in most conceptions of adult education is the adult
learner whose needs for learning, once uncovered, can be met through the
effective design of educational programs. There has been increasing
dissatisfaction with this v... |
/**
* Group regular expression settings by xml
* group-regular.xml
* @author zonglu
*/
public class GroupRegularExpression
{
@Test(groups="group1.one")
public void group1One()
{
System.out.println("group1 one");
}
@Test(groups="group1.two")
public void group1Two()
{
System.out.println("g... |
Southern Fluffy Gluten Free Biscuit Recipe
Friends, I am excited. Finally, a Southern, fluffy, gluten free biscuit I am proud of.
I worked for six months experimenting on a gluten free biscuit. The feedback has been heart warming, and gratifying as it quickly rose to my number one food post out of 1,000 recipes.
Thi... |
Novel investigational drugs for basal cell carcinoma
Importance of the field: In the United States, the annual incidence of basal cell carcinoma (BCC) is close to 1 million. Ultraviolet radiation exposure is the main risk factor; however, the availability of ever more potent sunscreens and education have not prevented... |
// Copyright 2004-9 Trustees of Indiana University
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// read_graphviz_new.hpp -
// Initialize a model of the BGL's MutableGraph concept and an associated
// ... |
import os
import re
import toml
import subprocess
from typing import Dict, Optional, List
import logging
logger = logging.Logger(__name__)
def no_exist_msg(s: str) -> str:
"""return no exist s in config"""
return f"{s} do not exist in qsubpy_config.toml"
class Resource:
def __init__(self, config: Di... |
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
public class Main {
static class Node {
int p = -1, l, r;
}
public static void main(String[] args) throws IOException {
BufferedReader reader = new BufferedReader(new InputStreamRead... |
package com.boot.payment.init;
import com.boot.payment.properties.WxProperties;
import lombok.Data;
import java.security.PrivateKey;
/**
* 微信支付元数据
*
* @author lizhifu
* @date 2021/1/12
*/
@Data
public class WxMetaData {
/**
* privateKey
*/
private PrivateKey privateKey;
/**
* 配置文件信息
... |
// Note sets the value of the 'note' attribute to the given value.
//
//
func (b *EventBuilder) Note(value string) *EventBuilder {
b.note = value
b.bitmap_ |= 8192
return b
} |
def create_mask(image):
selem = skimage.morphology.disk(2)
im = equalize_adaptive_clahe(image)
im = threshold_otsu(im)
im = erosion_binary(im, selem)
mask = np.ones(im.shape, dtype=bool)
segmentation = connected_components(im, background=0)
for i in segmentation.identifiers:
region =... |
<gh_stars>1-10
import base64
import tempfile
import nibabel
import numpy as np
import os
from nilearn._utils import check_niimg
def _get_64(niimg):
f = check_niimg(niimg)
data = f.get_data().astype(float)
data = data + data.min()
data = data / data.max() * 254.
data = data.astype(np.uint8)
f =... |
/**
* Implementation of heap restore operation.
*
* @param <K> The data type that the serializer serializes.
*/
public class HeapRestoreOperation<K> implements RestoreOperation<Void> {
private final Collection<KeyedStateHandle> restoreStateHandles;
private final StateSerializerProvider<K> keySerializerProvider;
... |
#![feature(globs, if_let)]
extern crate gopher;
use gopher::DirEntity;
use gopher::client::Gopher;
use std::io::IoResult;
fn pretty_print(item: &DirEntity) {
use gopher::EntityKind::{Known, Unknown};
use gopher::KnownEntityKind::*;
let kind = match item.kind {
Known(File) => "file",
Kno... |
/**
* @author alexander karmanov on 2016-10-14.
*/
public class CommonBase extends RecyclerView.ViewHolder {
protected HostFragmentInterface hostFragment;
protected final ImageView imageView;
protected AsyncTask<FilepickerFile, Integer, Bitmap> imageLoadTask;
protected boolean loadingImage = false;
... |
import discord
from discord.ext import commands
import os
import asyncio
import SimpleJSON
Path = f"/DaeGal/Data"
class Docs(commands.Cog):
def __init__(self, client):
self.client = client
@commands.command(name="help", aliases=["도움말", "Help", "도움"])
async def help(self, ctx:commands.Context, cat... |
<commit_msg>Add guard for multiple calls of Stop-method.
<commit_before>//Copyright 2016 lyobzik
//
//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... |
The Impact of Distressed Sales on Repeat-Transactions; House Price Indexes
The paper discusses the impact of distressed sales on recent estimates of house price changes in California. Using information from Notice of Default (NOD) filings in that state, the paper compares the usual FHFA HPI against an index computed a... |
/**
* @author Dave Syer
* @author Mahmoud Ben Hassine
*
*/
@Configuration
@PropertySource("classpath:/batch-hsql.properties")
public class DataSourceConfiguration {
@Autowired
private Environment environment;
@Autowired
private ResourceLoader resourceLoader;
@PostConstruct
protected void initialize() {
R... |
Cardio-oncology: A Subspecialty in its Infancy
S everal years ago, after spending my professional life in cardiology, I was happy to join a private practice where I could focus my energies on managing patients with heart failure (HF). It was through this experience that I noticed a growing population of women previous... |
/* VC-2 11.1 - parse_parameters()
* The level dictates what the decoder should expect in terms of resolution
* and allows it to quickly reject whatever it can't support. Remember,
* this codec kinda targets cheapo FPGAs without much memory. Unfortunately
* it also limits us greatly in our choice of formats, hence t... |
<gh_stars>1-10
use parser::{DatalogParser, Rule};
#[test]
fn idents() {
parses_to! {
parser: DatalogParser,
input: "parent",
rule: Rule::ident,
tokens: [
ident(0, 6),
]
}
parses_to! {
parser: DatalogParser,
input: "1234",
rule: Rul... |
/**
* Implements the mapping between {@link Class} and {@link TypeName} documented in {@link DefaultTypeName}.
*
* @author Martin Desruisseaux (Geomatys)
* @since 0.5
* @version 0.5
* @module
*/
final class TypeNames {
/**
* The mapping between {@link TypeName} and {@link Class} as documented in {@li... |
def goto_next_instruction(self):
self._get_current_list().goto_next_instruction()
current_process = self.get_process_of_current_list()
if current_process is not None and current_process.follower is not None:
move_to_next_instruction = False
while len(self.stack) > 0 and s... |
// Returns true when it is running on the x64 system.
inline bool IsX64() {
#ifdef _AMD64_
return true;
#else
return false;
#endif
} |
/**
* sc,scn,SC,SCN Sets the colour to use for stroking or non-stroking operations.
* @param operator the operator that is being executed.
* @param arguments list of operands
* @throws IOException if the color space cannot be read
*/
public void process(PDFOperator operator, List<COSBase> argum... |
<reponame>CIDARLAB/stl_metrics
from stlLexer import stlLexer
from stlParser import stlParser
from stl import STLAbstractSyntaxTreeExtractor
from stl import Operation, RelOperation, STLFormula, Trace |
#include<stdio.h>
#include<stdlib.h>
int cmpfunc(const void * a, const void*b)
{
return (* (long long int *) a - * (long long int *) b);
}
int main()
{
long long int a, b, c, d;
scanf("%lld %lld %lld %lld",&a, &b, &c, &d);
long long int num[5];
num[0]=a, num[1]=b, num[2]=c, num[3]=d;
... |
/**
* @author Ricky Fung
*/
public abstract class Constant {
public static final String POOL_NAME_KEY = "name";
public static final String CORE_POOL_SIZE_KEY = "coreSize";
public static final String MAXIMUM_POOL_SIZE_KEY = "maximumSize";
public static final String KEEP_ALIVE_TIME_KEY = "keepAliveTim... |
/**
* Created by nookio on 15/12/11.
*/
public abstract class BaseService<E,T> {
protected abstract E getInfo(String outTradeNo);
protected abstract E updateInfo(E e, String tradeNo, String tradeStatus, Date payedAt, BigDecimal totalFee);
protected abstract E createNewInfo(Integer payerId, Short paymen... |
During Fan Fest at the Amalie on Saturday morning, Tampa Bay Lightning owner Jeff Vinik participated in a question and answer session with fans inside the arena. Some of his statements should be reassuring to fans (insert loud and proud statement directed at Steven Stamkos here) while another should illicit confidence ... |
from rest_framework.views import APIView
from .models import Attendance
class AttendanceView(APIView):
"""Note that attendance cannot be called later than 20 mins after the start of class """
def post(self, request, format=None):
#get the start time of the course (from the point the staff presses a button for t... |
/**
* Finds a data value for a specific search element. The format in the .nam file is:
* (key)-(element):
* with the key being a number and the element being the one searched for. The entire
* string is put in as the element parameter.
* @param element
*/
public void findData(String element) {
while (sca... |
2018 recruit Josh Roberts verbally committed to St. John’s on Friday, he told Scout.
“It's a great fit for me,” Roberts said when asked about his decision. “I really like coach [Chris] Mullin and he will help me take my game to higher level.”
Roberts’ coach for the Southern Stampede – Cory Underwood – echoed his thou... |
def mvn_log_pdf(x: np.ndarray, mu: np.ndarray, sigma_inv: np.ndarray, log_det: float) -> np.ndarray:
n = len(mu)
o = x - mu
l = (sigma_inv@o.T).T
maha = np.sum(o*l, axis=-1)
ld = -0.5*(n*np.log(2*np.pi) + log_det + maha)
return ld |
def trim_polytope_set(
trimmable_polytopes: List[Polytope],
fixed_polytopes: Optional[List[Polytope]] = None
) -> List[Polytope]:
fixed_polytope = Polytope(convex_subpolytopes=[])
if fixed_polytopes is not None:
for polytope in fixed_polytopes:
fixed_polytope = fixed_polytope... |
/** Fire the change event to repaint the given block of text.
* @deprecated Please use <code>JTextComponent.getUI().damageRange()</code> instead.
*/
public void repaintBlock(int startOffset, int endOffset) {
BaseDocumentEvent evt = getDocumentEvent(startOffset,
endOffset - startOffset,... |
A high powered and high-tech tool is helping investigators solve serious crimes in Manitoba.
The Leica Scanstation is a forensic laser scanner able to pick up the tiniest of details and recreate collisions and crime scenes in 3D.
RCMP have eight scanners. The Winnipeg Police Service has one. Both agencies started usi... |
/**
* A Grid that contains mergable cells
*/
public class MergableGridWidget extends BaseGridWidget<MergableGridData, IMergableGridRenderer> {
private final MergableGridWidgetMouseClickHandler mouseClickHandler;
private final MergableGridWidgetMouseDoubleClickHandler mouseDoubleClickHandler;
public Merg... |
<gh_stars>0
# This file is a part of the powerscan_scenario project
#
# Copyright (C) 2018 <NAME> <<EMAIL>>
#
# This Source Code Form is subject to the terms of the Mozilla Public License,
# v. 2.0. If a copy of the MPL was not distributed with this file,You can
# obtain one at http://mozilla.org/MPL/2.0/.
from unit... |
package Nextcorev1
//ShardHolder ...
type ShardHolder interface {
Hold(val bool)
}
//ShardDisposer ...
type ShardDisposer interface {
Dispose(val bool)
}
//ShardHolderAndDisposer ...
type ShardHolderAndDisposer interface {
ShardHolder
ShardDisposer
}
|
Question: What does the following code display?
import java.awt.Color; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JLayeredPane; import javax.swing.JPanel; public class Demo { public static void main(String[] args) { JFrame frame = new JFrame(); JLayeredPane container = new JLayeredPane();... |
def _api_get_json(self, url):
try:
response = urllib2.urlopen(url)
data = json.loads(response.read())
except urllib2.URLError, e:
self.log.error("Could not communicate with Master API becasue: %s" % e)
print "Could not communicate with Master API because %... |
Will Google’s new Calico venture and Obamacare work hand-in hand? (AP Photo/Mark Lennihan)
Google unveiled its new anti-aging initiative, Calico, to much fanfare last month. The exclusive story of “Can Google Solve Death?” was splashed across the cover of TIME magazine while tech bloggers scrambled to figure out the t... |
/**
* Represents a room's creator, only containing "_id" and "username".
*
* @author Bradley Hilton (graywolf336)
* @version 0.0.1
* @since 0.1.0
*/
public class RoomCreator extends Identified {
private String username;
/**
* Sets the username of this room creator.
*
* @param username... |
def memoryview_to_bytes(value):
if hasattr(value, 'tobytes'):
return value.tobytes()
return value |
<filename>test/ch/tsphp/tinsphp/inference_engine/test/integration/reference/ResolveConstantTest.java
/*
* This file is part of the TinsPHP project published under the Apache License 2.0
* For the full copyright and license information, please have a look at LICENSE in the
* root folder or visit the project's website... |
/**
* Imports data from the specified Web component by taking the specified x column
* for the x values, and the specified y column for the y values. Prior to calling this function,
* the Web component's Get method has to be called to load the data. The usage of the gotValue
* event in the Web component is ... |
/*
* Given an array of ints length 3, return an array with the elements
* "rotated left" so {1, 2, 3} yields {2, 3, 1}.
*
* rotateLeft3({1, 2, 3}) --> {2, 3, 1}
* rotateLeft3({5, 11, 9}) --> {11, 9, 5}
* rotateLeft3({7, 0, 0}) --> {0, 0, 7}
*/
public class RotateLeft3Test {
public static void main(String[] ar... |
<gh_stars>1-10
// Copyright (c) 2022 Red Hat, Inc.
// Copyright Contributors to the Open Cluster Management project
package controllers
import (
"k8s.io/apimachinery/pkg/api/equality"
"sigs.k8s.io/controller-runtime/pkg/event"
"sigs.k8s.io/controller-runtime/pkg/predicate"
policiesv1 "open-cluster-management.io/... |
<reponame>raahoolkumeriya/codelocked
from django.shortcuts import render
from django.http import HttpResponseRedirect, HttpResponse
from django.views import View
from .models import StreamType
from django.views.generic import TemplateView
from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger
#from .f... |
<reponame>kozross/linterieur
{-# LANGUAGE MagicHash #-}
{-# LANGUAGE UnliftedFFITypes #-}
-- |
-- Module: Data.Diablerie.Byte
-- Copyright: (C) 2021 <NAME>
-- License: Apache 2.0
-- Maintainer: <NAME> <<EMAIL>>
-- Stability: stable
-- Portability: GHC only
--
-- Functions for searching and accumulating over 'ByteArray... |
/**
*
* @file openmp_task.h
*
* @copyright 2018 King Abdullah University of Science and Technology (KAUST).
* All rights reserved.
***
* @brief AL4SAN OpenMP task header
*
* AL4SAN is a software package provided by King Abdullah University of Science and Technology (KAUST)
*
* @version 1... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.