content stringlengths 10 4.9M |
|---|
Hi everybody! Before we get into the main meat of this message, I'd like to provide a bit of context. This is all based around a game called Space Station 13, which runs on the BYOND (short for Build Your Own Net Dream) platform. More specifically, it's focused on the goonstation branch of this game. If you're interest... |
/** Statement base class implementing shared properties and logic */
public abstract class StatementBase implements Statement {
private StatementSource source;
private Integer index;
/** Comments preceding the statement in the source code. */
private List<Comment> comments;
public StatementBase(State... |
def is_neighbor(self, point1, point2):
row = point1[0] - point2[0]
col = point1[1] - point2[1]
if col == 0 and row == 0:
return False
if 0 <= row <= 1 and 0 <= col <= 1:
return True
if -1 <= row <= 0 and -1 <= col <= 0:
return True
ret... |
import express from 'express';
import bodyParser from 'body-parser';
import { Logger } from 'tslog';
import { env } from 'process';
import { ListarProfilesController } from './controllers/listarProfileController';
import { loginController } from './controllers/loginController';
import { Auth } from './authentication/au... |
<reponame>DarkWugWug/botiful
import { IAction } from "./foundation";
export declare const help: IAction;
export declare const man: IAction;
|
/**
* Inserts the question to the specified index of the questions list. If the
* index exceeds the size of the questions list, it adds it to the end of the
* list.
*
* @param index
* The index to insert the question to
* @param question
* The question to add
*/
public void addQ... |
Improving the Projection of Global Structures in Data through Spanning Trees
The connection of edges in a graph generates a structure that is independent of a coordinate system. This visual metaphor allows creating a more flexible representation of data than a two-dimensional scatterplot. In this work, we present STAD... |
def _reduce(self: pool, op, xs_per_part):
if self._processes == 1 and len(xs_per_part) == 1:
return reduce(op, map(partial(reduce, op), xs_per_part))
else:
return reduce(op, self._pool.map(partial(reduce, op), xs_per_part)) |
/** Prints out the graph. For debugging purposes. */
public void printGraph() {
for (startNodeIterator();
hasMoreNodes();) {
Node node = nextNode();
if (isInitialNode(node)) {
System.out.println("Initial Node");
}
if (isFinalNode(node)... |
// CNAMEResource returns the CNAME via Customizations, otherwise nil
func CNAMEResource(fqdnString string) *dnsmessage.CNAMEResource {
if domain, ok := Customizations[strings.ToLower(fqdnString)]; ok && domain.CNAME != (dnsmessage.CNAMEResource{}) {
return &domain.CNAME
}
return nil
} |
Guardians of the Galaxy 2 is likely to add in a number of new cosmic Marvel superheroes alongside the ones we already know, but there are still characters from the first film that could use a little more attention. Specifically, Nebula. The villain, played by Karen Gillan, was hyped up in the marketing campaigns, but e... |
package internal
import (
"log"
"os"
"time"
"github.com/qingfeng777/owls/server/global"
"gorm.io/gorm"
"gorm.io/gorm/logger"
)
type DBBASE interface {
GetLogMode() string
}
var Gorm = new(_gorm)
type _gorm struct{}
// Config gorm 自定义配置
// Author [SliverHorn](https://github.com/SliverHorn)
func (g *_gorm) C... |
Network-based reference model tracking for vehicle turning with event-triggered transmission and interval communication delays
This paper deals with the network-based modelling and reference model tracking control of four-wheel-independent-drive electric vehicles for turning purpose. First, a reference model is design... |
/// parse the key value entry
/// skip the internal key varint, return the internal key.
fn key(&self) -> &[u8] {
// Key Value Entry
let entry = self.iter.key();
let (value, length) = u32::decode_varint(entry);
// skip the internal_key_varint_length, return the internal_key
&entr... |
import { LitElement, html, css } from 'lit'
import { customElement, property } from 'lit/decorators.js'
import { MenuItem } from "./item"
@customElement('wh-dropdown')
export class Dropdown extends LitElement {
static styles = css`
ul {
list-style-type: none;
margin: 0;
padding: var(--padding, 0);
... |
def net_resolve(self, host_name):
return self.request( "net-resolve", {
'host_name': [ host_name, 'host-name', [ basestring, 'None' ], False ],
}, {
'ip-addresses': [ basestring, True ],
} ) |
Consensual reactions of human blood-aqueous barrier to implant operations.
Slit-lamp fluorophotometry was used to evaluate the disruption of the blood-aqueous barrier in eyes that underwent posterior chamber lens implantation following phacoemulsification and the consensual reaction of the barrier disruption in the co... |
// AssertEqualArgs gets two lists of arguments and returns nil if they are
// equal to each other and an error otherwise.
func AssertEqualArgs(as1, as2 Args) error {
if len(as1) != len(as2) {
return fmt.Errorf(
"Argument slices %#v and %#v have different length: %d != %d.",
as1, as2, len(as1), len(as2),
)
}... |
// Copyright 1996-2020 Cyberbotics Ltd.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agr... |
CMOS and sCMOS imaging performance comparison by digital holographic interferometry
Abstract. We use a digital holographic interferometric setup to assess, as a proof of concept, two state-of-the-art sensors (CMOS and sCMOS cameras) that are widely used in nondestructive testing (NDT). This interferometric study is in... |
class _MaskedUnaryOperation:
"""Defines masked version of unary operations, where invalid
values are pre-masked.
Parameters
----------
f : callable
fill :
Default filling value (0).
domain :
Default domain (None).
"""
def __init__ (self, mufunc, fill=0, domain=None)... |
/* Main activity for the adb test program */
public class AdbTestActivity extends Activity {
private static final String TAG = "AdbTestActivity";
private TextView mLog;
private UsbManager mManager;
private UsbDevice mDevice;
private UsbDeviceConnection mDeviceConnection;
private UsbInterface m... |
/**
* Here be dragons !
*
* @author: Ezio
* created on 2020/3/18
*/
public class _836_IsRectangleOverlap {
static class Solution {
public boolean isRectangleOverlap(int[] rec1, int[] rec2) {
return !(rec2[0] >= rec1[2] || rec1[0] >= rec2[2] || rec1[1] >= rec2[3] || rec2[1] >= rec1[3]);
... |
Compression and shear surface rheology in spread layers of beta-casein and beta-lactoglobulin.
We investigate the surface viscoelasticity of beta-lactoglobulin and beta-casein spread surface monolayers using a recently discovered method. Step compressions are performed, and the surface pressure is measured as a functi... |
/**
* Remove all the provider connections for the specified client uuid.
* @param uuid the uuid of the client for which to remove connections.
*/
public void removeProviderConnections(final String uuid) {
final Collection<AsyncClientClassContext> channels = providerConnections.removeKey(uuid);
if (chan... |
/**
* Class representing the CML atom element
*
* @author Peter Murray-Rust, Ramin Ghorashi (2005)
*
*/
public class CMLAtom extends AbstractAtom {
final static Logger LOG = Logger.getLogger(CMLAtom.class);
/** namespaced element name.*/
public final static String NS = C_E+TAG;
static {
... |
// Make graphics2d contexts for each test the same size, so we can layer
// the images without invalidating the previous ones.
PP_Resource CreateGraphics2D_90x90() {
PP_Resource graphics2d = PPBGraphics2D()->Create(
pp_instance(), &k90x90, kNotAlwaysOpaque);
CHECK(graphics2d != kInvalidResource);
PPBInstanc... |
/**
* Handles the redirection of incoming evaluation and assign group entity URLs to the proper views with the proper view params added
*
* @author Aaron Zeckoski (azeckoski @ unicon.net)
*/
@Slf4j
public class EvaluationVPInferrer implements EntityViewParamsInferrer {
private EvalCommonLogic commonLogic;
... |
def design_protein(net, x, edge_index, edge_attr, results, cutoff):
x_proba = torch.ones_like(x).to(torch.float) * cutoff
heap = [PrioritizedItem(0, x, x_proba)]
i = 0
while heap:
item = heapq.heappop(heap)
if i % 1000 == 0:
print(
f"i: {i}; p: {item.p:.4f}; n... |
<gh_stars>1-10
#!/usr/bin/python3
# Need to install the Python3 anafile wrapper that can be downloaded here.
from cds.core import *
import numpy as np
if __name__ == "__main__":
# Create the ReadMe/Table maker
#tablemaker = CDSTablesMaker(out='ReadMe')
tablemaker = CDSTablesMaker()
# Add astropy Tab... |
from flask import request, url_for
from flask_restx import Resource, abort
from tconfig.orm import orm_utils
from tconfig.api.schemas import ParameterSchema, NewParameterSchema, MoveParameterSchema
from tconfig.api.resources import resource_utils
PARAMETER_SCHEMA = ParameterSchema()
NEW_PARAMETER_SCHEMA = NewParame... |
<gh_stars>1-10
package de.dc.javafx.emfsupport.website.model.ui;
import java.io.File;
import de.dc.javafx.efxclipse.runtime.model.IEmfManager;
import de.dc.javafx.emfsupport.website.model.Author;
import de.dc.javafx.emfsupport.website.model.ModelFactory;
import de.dc.javafx.emfsupport.website.model.Page;
impo... |
def update_db(self,
reading: float,
client: str,
vendor: str,
per_unit: float,
units: float,
reason: str
) -> None:
try:
buildInstertionCommand(DA... |
// Implementation of Insertion sort algorithm in c++
// sorting an array in ascending order using insertion sort
#include<stdio.h>
void Insertion(int arr[],int);
int main()
{
int n;
printf("Enter the size of array\n");
scanf("%d",&n);
int arr[n];
printf("Enter %d integers\n",n);
for(int i=0;i... |
Jim Ritter, a gay officer with more than 30 years in the SPD, has started a campaign that politicians and others think is helping restore the security of Seattle’s gay community.
When he was a 14-year-old police cadet in Seattle, Jim Ritter knew he wanted to work for the Seattle Police Department someday. He also knew... |
n = input()
c = [0] * 99
for x in map(int, raw_input().split()):
c[bin(x).count('1')] += 1
print sum(x * (x - 1) / 2 for x in c) |
/**
* Runtime exceptions generated by this class. Wraps exceptions generated by delegated operations,
* particularly when they are not, themselves, Runtime exceptions.
*/
public static class PersistenceFeatureException extends RuntimeException {
private static final long serialVersionUID = 1L;
... |
package config
const (
CurrentAPIVersion = "v1"
ServiceName = "gocouchbase"
APIPrefix = "/" + ServiceName + "/" + CurrentAPIVersion
RequestContext = "RequestContext"
ClientIDKey = "clientID"
RequestIDKey = "requestID"
RequestTimeKey = "timestamp"
RemoteAddrKey = "remoteAddr"
MethodKey ... |
def dijkstra(start : "node" , *goal, limit=None, imbalance=None) -> list:
if start in goal: return [start]
if imbalance is None: imbalance = []
node = start
frontier = [(0, start)]
seen = set()
explored = set()
prev = {}
while True:
if len(frontier) == 0:
raise ValueE... |
import Vue from 'vue';
export { createNamespace } from './create';
export { addUnit } from './format/unit';
export const isServer: boolean = Vue.prototype.$isServer;
export function noop() {}
export function isDef(val: any): boolean {
return val !== undefined && val !== null;
}
export function isFunction(val: un... |
/**
* Exclude filter.
*
* @param shenyuConfig the shenyu config
* @return the web filter
*/
@Bean
@Order(-5)
@ConditionalOnProperty(name = "shenyu.exclude.enabled", havingValue = "true")
public WebFilter excludeFilter(final ShenyuConfig shenyuConfig) {
return new ExcludeFilt... |
#!/usr/bin/env python
from flask import Flask
app = Flask(__name__, static_url_path="")
app.debug = True
import twidder.views
|
//Searches a Date In a CSV File For the Company Symbol and Date Specified
private void searchDateCompany() {
String name;
String SearchDate;
name = JOptionPane.showInputDialog("Please Enter the Symbol or Filename of The Company");
SearchDate = JOptionPane.showInputDialog(... |
def main():
from collections import deque
K = int(input())
q = deque(range(1, 10))
for _ in range(K):
x = q.popleft()
lastdigit = x%10
base = x*10 + lastdigit
if lastdigit != 0:
q.append(base-1)
q.append(base)
if lastdigit != 9:
q.... |
/*
* napms. Sleep for ms milliseconds. We don't expect a particularly good
* resolution - 60ths of a second is normal, 10ths might even be good enough,
* but the rest of the program thinks in ms because the unit of resolution
* varies from system to system. (In some countries, it's 50ths, for example.)
* Vaxen ... |
// Copyright 2018 <NAME>
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writin... |
<filename>lotto_env.py<gh_stars>0
import numpy as np
import matplotlib.pyplot as plt
import random
'''
Rules:
Select 6 numbers from 59
Pay -2 for each game
Prize
6 = 1000000
5 + bb = 100000
5 = 10000
4 = 1000
3 = 25
2 = 0
1 ... |
/*
only one level of child document supported
*/
private void addFieldsToDoc(Map<String, Object> objectMap, SolrInputDocument doc) {
objectMap.forEach(
(key, val) -> {
if (val != null) {
if ("_childDocuments_".equalsIgnoreCase(key)) {
doc.addChildDocuments(getChildDo... |
def buildDict(self, dict):
self.dictSet = {}
self.lenSet = set()
for word in dict:
self.lenSet.add(len(word))
for idx in range(0, len(word)):
key = str(word[0:idx] + word[idx + 1:])
if key in self.dictSet:
self.dictSet[k... |
<reponame>victor-da-costa/Aprendendo-Python
from time import sleep
def contador(início, fim, passo):
if passo < 0:
passo * (-1)
if passo == 0:
passo = 1
if início < fim:
cont = início
while cont <= fim:
print(f' {cont}', end='', flush=True)
sleep(0.... |
I haven’t done one of these since Iowa Eve, when there were still “others,” so let’s do it! Let’s vote on the community’s Democratic presidential candidate preference.
DATE SANDERS CLINTON OTHER UNSURE SAMPLE SIZE
(1,000S) 26-Jan 61 35 1 2 10.7 12-JAN 65 32 1 2 10.1 29-DEC 73 26 1 1 17.7 15-DEC 63 35 1 2 9 1-DEC 60 3... |
// Copyright 2022 The Moov Authors
// Use of this source code is governed by an Apache License
// license that can be found in the LICENSE file.
package main
import (
"encoding/json"
"math"
"reflect"
"sync"
)
type Result[T any] struct {
Data T
match float64
precomputedName string
precomputedAlts [... |
/**
* Class which helps to read data
* from XLSX files.
*
*/
public class ReaderXLSX {
/** list of the invoices */
private Invoices invoices;
/** name of the XLSX file */
private String filename;
/** correction invoice */
private InvoiceCorrection invoiceCorrection;
/**
... |
<filename>sampleprojects/eBookApp/src/main/java/com/dtrules/samples/bookpreview/app/GenCase.java
package com.dtrules.samples.bookpreview.app;
import com.dtrules.samples.bookpreview.TestCaseGen_BookPreview;
import com.dtrules.samples.bookpreview.datamodel.DataObj;
public class GenCase {
int level;
... |
/**
* Free xlog memory and destroy it cleanly, without side
* effects (for use in the atfork handler).
*/
void
xlog_atfork(struct xlog *xlog)
{
close(xlog->fd);
xlog->fd = -1;
} |
<reponame>dpetrovych/jackson-databind-implicit<gh_stars>0
package io.dpetrovych.jackson.databind.implicit.types;
import org.jetbrains.annotations.NotNull;
import java.lang.reflect.Field;
import java.util.Arrays;
import java.util.List;
import static java.util.stream.Collectors.toList;
public class PropertiesExtracto... |
/// <reference types="jquery" />
$('#myForm').validator();
$('#myForm').validator('update');
$('#myForm').validator('validate');
$('#myForm').validator('destroy');
$('#myForm').validator({
delay: 500,
html: false,
disable: false,
focus: true,
feedback: {},
custom: {}
});
|
import java.io.PrintWriter;
import java.util.*;
public class Normal {
public static void main(String[] args) throws Exception {
Scanner sc = new Scanner(System.in);
PrintWriter pw = new PrintWriter(System.out);
int N = sc.nextInt();
int k = sc.nextInt();
int a... |
import Benefits from "./Benefits";
export default Benefits;
|
import {Component, EventEmitter, Input, Output} from '@angular/core';
import {Command} from '../../command-executor.service';
@Component({
selector: 'app-command-list',
templateUrl: './command-list.component.html'
})
export class CommandListComponent {
@Input() commands: Array<Command>;
@Output() run = new Eve... |
In the much-discussed new book "The Dangerous Case of Donald Trump" (Salon review here), mental health professionals act on their “duty to warn” of the imminent danger the Trump presidency represents. As explained in its prologue, “Collectively with our coauthors, we warn that anyone as mentally unstable as Mr. Trump s... |
<reponame>rajesh-ibm-power/trusted-connector
import { HttpClient, HttpHeaders } from '@angular/common/http';
import { Injectable } from '@angular/core';
import { Observable } from 'rxjs';
import { map } from 'rxjs/operators';
import { environment } from '../../environments/environment';
import { Configuration } from ... |
// Package chelsea exports the Animal Crossing villager Chelsea.
package chelsea
|
<gh_stars>1-10
from .baseeffect import BaseEffect
from .returneffect import ReturnEffect
from .endbattleeffect import EndBattleEffect
from .experienceeffect import ExperienceEffect
from ..action import ActionType
class FaintEffect(BaseEffect):
def __init__(self, scene, target):
super().__init__(scene)
... |
/* MH mail create mailbox
* Accepts: mail stream
* mailbox name to create
* Returns: T on success, NIL on failure
*/
long mh_create (MAILSTREAM *stream,char *mailbox)
{
char *s,tmp[MAILTMPLEN];
sprintf (tmp,"Can't create mailbox %.80s: invalid MH-format name",mailbox);
if (mailbox[0] == '#' && (mailbox[1]... |
// RegisterTable registers a Table with the Schema by name
func (s *Schema) RegisterTable(n schema.Name, t table.Table) error {
if err := s.register(n); err != nil {
return err
}
return s.tables.Register(n, t)
} |
/**
* Config ApiBoot Logging Discovery Instance
* Draw the list of ApiBoot Logging Admin addresses from the registry
* and report the request log through load balancing
*/
@Data
public static class DiscoveryInstance {
/**
* ApiBoot Logging Admin Spring Security Username
... |
///verbirgt bzw. zeigt den ersten Block
void BlockListWidget::setStartBlockHidden(bool hide)
{
qDebug() << "BlockListWidget::setStartBlockHidden, " << hide;
this->item(0)->setHidden(hide);
} |
<filename>jpa/odata-jpa-processor-cb/src/main/java/com/sap/olingo/jpa/processor/cb/impl/SqlSubQuery.java
package com.sap.olingo.jpa.processor.cb.impl;
enum SqlSubQuery {
EXISTS("EXISTS"),
SOME("SOME"),
ALL("ALL"),
ANY("ANY");
private String keyWord;
private SqlSubQuery(final String keyWord) {... |
<filename>hadoop_yarn/applicationmaster_service.pb.go
// Code generated by protoc-gen-go.
// source: applicationmaster_protocol.proto
// DO NOT EDIT!
package hadoop_yarn
import proto "github.com/golang/protobuf"
import json "encoding/json"
import math "math"
import "github.com/noelcosgrave/gohadoop"
import hadoop_ip... |
package versions_test
import (
. "rabbitmq-upgrade-preparation/versions"
. "github.com/onsi/ginkgo/extensions/table"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
var _ = Describe("Versions", func() {
Describe("RabbitVersions", func() {
DescribeTable("upgrade preparation required",
func(deployed... |
Volkswagen has always been brilliant in their advertising and marketing campaigns. Always funny and a little weird, the ads you see today have evolved from some really good material of the past. Here are some of the neatest VW ads from the classic era.
It isn’t so.
Just to be clear, Volkswagen cars are not wound up b... |
/** Add set namespace quota record to edit log
*
* @param src the string representation of the path to a directory
* @param quota the directory size limit
*/
public void logSetQuota(String src, long nsQuota, long dsQuota) {
SetQuotaOp op = SetQuotaOp.getInstance();
op.set(src, nsQuota, dsQuota);
... |
<filename>platform/shared/xruby/src/com/xruby/compiler/codedom/ExpressionStatement.java<gh_stars>100-1000
/**
* Copyright 2005-2007 <NAME>
* Distributed under the BSD License
*/
package com.xruby.compiler.codedom;
import java.util.ArrayList;
public class ExpressionStatement extends Statement {
private ... |
def ratio(self,n1,n2, explain=0):
weight_normal_form = 3.0
weight_normal_form_if_one_name_is_in_initials = old_div(weight_normal_form, 4)
weight_normal_form_soundex = 9.0
weight_normal_form_soundex_if_one_name_is_in_initials =old_div(weight_normal_form_soundex,4)
weight_ges... |
// Key loop (for driving the robot)
void Teleop::keyLoop()
{
char c;
bool dirty = false;
tcgetattr(kfd, &cooked);
memcpy(&raw, &cooked, sizeof(struct termios));
raw.c_lflag &= ~(ICANON | ECHO);
raw.c_cc[VEOL] = 1;
raw.c_cc[VEOF] = 2;
tcsetattr(kfd, TCSANOW, &raw);
ROS_INFO("Robot Tel... |
# ABC 066 B
S =input()
m = 0
for i,s in enumerate(S):
tmp = S[:-1-i]
tmp1 = tmp[:len(tmp)//2]
tmp2 = tmp[len(tmp)//2:]
if len(tmp)%2==0 and(tmp1==tmp2):
m = max(m,len(tmp))
print(m) |
<reponame>zhanibekrysbek/rft_sensor_serial<gh_stars>0
#include "RFT_IF_PACKET_Rev1.2.h"
#include <string.h>
CRT_RFT_IF_PACKET::CRT_RFT_IF_PACKET()
{
memset(m_rcvd_product_name, 0x00, sizeof(m_rcvd_product_name));
memset(m_rcvd_serial_number, 0x00, sizeof(m_rcvd_serial_number));
memset(m_rcvd_firmwar... |
/**
* Selects one of the points.
*
* @param pointIndex
* the index of the point to select or -1 to deselect all.
*/
public void selectPoint(int pointIndex) {
@Nullable
ChartPoint[] points = this.points;
if (pointIndex > -1) {
int pointIndexInt = pointIndex;
if (pointIndexInt < 0 || poin... |
<filename>packages/12-redux/todo-redux/src/application/store/store.ts
import { Action, applyMiddleware, createStore } from 'redux'
import { rootReducer } from './root-reducer'
import thunk, { ThunkAction } from 'redux-thunk'
const enhancers = applyMiddleware(thunk)
export const store = createStore(rootReducer, enhance... |
def descriptor_one_image(imagem,feature_extraction_method,list_of_parameters):
if feature_extraction_method == 'glcm':
features = glcm.glcm(imagem,[],[], int(list_of_parameters[0]), int(list_of_parameters[1]), int(list_of_parameters[2]))
elif feature_extraction_method == 'fotf':
features = histo... |
<filename>census-us/python-connectors/census-us_us_census_custom_dataset/connector.py
# -*- coding: utf-8 -*-
from dataiku.connector import Connector
import dataiku
from dataiku import pandasutils as pdu
import pandas as pd
import numpy as np
import os
import census_resources
import common
import census_metadata
clas... |
/**
* An Immutable expenseTracker that is serializable to JSON format.
*/
@JsonRootName(value = "expenseTracker")
public class JsonSerializableExpenseTracker {
private final List<JsonAdaptedExpense> expenses = new ArrayList<>();
/**
* Constructs a {@code JsonSerializableExpenseTracker } with the given ... |
<gh_stars>1-10
"""
pylaxz -S arguments
Arguments :
os
os-info
checking everying about network.
"""
from os import uname as _uname, name as _name
class System:
"""
For System Purposes
Arguments : (os), (os-all), -h
Examples:
$ pylaxz -S os # for short OS information
$ pylaxz ... |
#include <bits/stdc++.h>
#include <stdio.h>
#define FAST_IO ios_base::sync_with_stdio(false), cin.tie(nullptr)
#define FILE_IO freopen("input.txt", "r", stdin), freopen("output.txt", "w", stdout)
using namespace std;
typedef long long ll;
const int N = 26;
int n;
int tree[200005];
void build() {
for (... |
<filename>reg_import.go
package goql
import (
"sync"
"github.com/fzerorubigd/goql/astdata"
)
type importProvider struct {
cache map[string][]interface{}
lock *sync.Mutex
}
func (v *importProvider) Provide(in interface{}) []interface{} {
v.lock.Lock()
defer v.lock.Unlock()
p := in.(*astdata.Package)
if d, ... |
t = int(input())
while t!=0:
n = int(input())
if n%2==0:
count=0
f2=0
while n%2==0:
f1=0
maxi=-1
for i in range(3,int(pow(n,.5)+1)):
if n%i==0:
if i%2==1:
if i>maxi:
... |
import dark from "./dark";
function Button(props){
return (
<button style={dark.download}>{props.children}</button>
);
}
export default Button; |
<filename>Overworld/PauseState.cpp
//
// PauseState.cpp
// Overworld
//
// Created by <NAME> on 6/29/18.
// Copyright © 2018 Noah. All rights reserved.
//
#include "PauseState.hpp"
PauseState::PauseState(sf::RenderWindow& rw) {
pausedText.setString("Paused");
pausedText.setColor(sf::Color::White);
pausedText.s... |
/* $Procedure PARTOF ( Parabolic time of flight ) */
/* Subroutine */
int partof_(doublereal *ma, doublereal *d__)
{
doublereal d__1;
doublereal m;
extern int chkin_(char *, ftnlen);
extern doublereal dcbrt_(doublereal *);
doublereal deriv, deriv2, fn, change;
extern int chkout_(char *, f... |
<reponame>dadosjusbr/executor
package main
import (
"encoding/json"
"fmt"
"io/ioutil"
"log"
"strings"
"github.com/dadosjusbr/executor"
"github.com/dadosjusbr/executor/status"
"github.com/spf13/pflag"
)
var (
input = pflag.String("in", "", "Path for the descriptor file.")
volumeName = pflag.Str... |
// Class that holds the response from the last request
public class Response {
public int responseCode;
public String responseMessage;
public String responseData;
public ArrayList<Exception> exceptions;
public Response() {
this.exceptions = new ArrayList<Excep... |
/*
* pulseIn Function for the Spark Core - Version 0.1.1 (Beta)
* Copyright (2014) Timothy Brown - See: LICENSE
*
* Due to the current timeout issues with Spark Cloud
* this will return after 10 seconds, even if the
* input pulse hasn't finished.
*
* Input: Trigger Pin, Trigger State
* Output: Pulse Length in... |
/**
* This class shows how to use Maui on a single document
* or just a string of text.
* @author alyona
*
*/
public class MauiWrapper {
/** Maui filter object */
private MauiFilter extractionModel = null;
private Vocabulary vocabulary = null;
private Stemmer stemmer;
private Stopwords stopword... |
Reducing of birefringence of ‐cut crystal rod using side‐pumping and suitable crystal rotation
The beam quality and output power of high power solid‐state lasers is influenced by birefringence. Inhomogeneous distribution of the thermal field inside the laser crystal rod occurs due to non‐uniform absorption of the pum... |
/**
* Save a level state to a string.
* @param l Input level
* @return A string containing the serialized level
* @throws IOException Exception thrown from serializing
*/
public static String exportLevel(Level l) throws IOException {
ByteArrayOutputStream bo = new ByteArrayOutputStream();
ObjectO... |
/**
* On server stop, save all loaded ChunkContainer to mod database, then unregister all of them
* @param e
*/
@Listener
public void onServerStop(GameStoppingServerEvent e) {
ChunkContainerRegistry.getInstance().getRawMap().forEach((key, value) -> saveChunk(value));
ChunkContainerReg... |
Protective Role of Polysaccharides from Gynostemma pentaphyllum Makino Supplementation against Exhaustive Swimming Exercise-Induced Oxidative Stress in Liver and Skeletal Muscle of Mice
The objective of this study was to investigate the protective role of polysaccharide from Gynostemma pentaphyllum Makino (PGP) supple... |
def show_how_score():
a = tk.Tk()
how_score = yah.show_how_to_score()
for i in range(len(how_score)):
tk.Label(a,... |
The European Union and the Chinese ministry of science and technology have had a private row about an EU promise to help China finance feasibility studies for a carbon capture and storage site.
To remedy the dispute, the EU is proposing that instead of a €7-million grant to fund the studies, the EU would provide funds... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.