repo_name stringlengths 6 101 | path stringlengths 4 300 | text stringlengths 7 1.31M |
|---|---|---|
chiknas/fire-business-api-java | src/main/java/com/fire/sdk/model/request/BatchListRequest.java | package com.fire.sdk.model.request;
import java.util.ArrayList;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.fire.sdk.http.HttpUtils;
import com.fire.sdk.model.Batch.BatchStatus;
import com.fire.sdk.model.Batch.BatchType;
import com.fire.sdk.model.Request;
import com.fire.sdk.model.response.Ba... |
rafaelw/mojo | sky/engine/core/dom/SelectorQuery.cpp | /*
* Copyright (C) 2011, 2013 Apple Inc. All rights reserved.
* Copyright (C) 2014 Samsung Electronics. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source co... |
SolidStateGroup/patientview | root/common/src/main/java/org/patientview/persistence/model/UserObservationHeading.java | package org.patientview.persistence.model;
import com.fasterxml.jackson.annotation.JsonIgnore;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.Table;
/**
* Created by <EMAIL>
* Created on 22/12/201... |
datlowe/czsem-gate-tools | modules/fs-query/src/main/java/czsem/fs/query/QueryNode.java | package czsem.fs.query;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.StringJoiner;
import czsem.fs.query.FSQuery.QueryData;
import czsem.fs.query.FSQuery.QueryMatch;
import czsem.fs.query.eval.FsEvaluator;
import czsem.fs.query.restrictions.DirectAttrRestriction;
im... |
rajitbanerjee/kattis | Gerrymandering/gerry.py | <reponame>rajitbanerjee/kattis<gh_stars>1-10
"""https://open.kattis.com/problems/gerrymandering"""
P, D = map(int, input().split())
districts = {}
for _ in range(P):
d, a, b = map(int, input().split())
if d not in districts.keys():
districts[d] = [0, 0]
districts[d][0] += a
districts[d][1] += ... |
sapcc/juno | libs/juno-ui-components/src/components/DataGridFootRow/DataGridFootRow.test.js | <reponame>sapcc/juno
import * as React from "react"
import { render, screen} from "@testing-library/react"
import { DataGridFootRow } from "./index"
describe("DataGridFootRow", () => {
test("renders a DataGridFootRow", async () => {
const tablefoot = document.createElement('tfoot')
const {container} = render(<D... |
RalfNick/DataStruct | src/algorithm/heap/PriorityQueue.java | package algorithm.heap;
import java.util.Arrays;
/**
* DESCRIPTION
*
* @author lixin
* @create 2019-09-05 下午8:34
**/
public class PriorityQueue<T extends Comparable<? super T>> {
private int capacity;
private int size;
private Object[] arr;
public PriorityQueue(int capacity) {
this.capa... |
cooperece366s21/cooper-union-ece366-spring2020 | spark-example/src/main/java/edu/cooper/ee/ece366/groceries/model/Item.java | <reponame>cooperece366s21/cooper-union-ece366-spring2020
package edu.cooper.ee.ece366.groceries.model;
import com.google.gson.annotations.Expose;
public class Item {
@Expose private final Long id;
@Expose private final String name;
@Expose private final Double cost;
public Item(Long id, String name, Double ... |
thebitstudio/pixelopolis_car_app | app/src/main/java/com/bit/pixelopolis_car/services/config/CommandTime.java | <gh_stars>0
/*
* Copyright 2020 Google LLC
*
* 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
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law o... |
zhengdejin/SC1_Code | kernel-3.10/arch/arm/mach-mt8127/include/mach/hotplug.h | <gh_stars>0
#ifndef _HOTPLUG
#define _HOTPLUG
#include <linux/kernel.h> //printk
#include <asm/atomic.h>
#include <mach/mt_reg_base.h>
/* log */
#define HOTPLUG_LOG_NONE 0
#define HOTPLUG_LOG_WITH_XLOG 1
#define HOTPLUG_LOG_WITH_PRINTK ... |
ArgonDesign/argon-vtools | src/main/scala/com/argondesign/alint/Message.scala | ////////////////////////////////////////////////////////////////////////////////
// Argon Design Ltd. Project P9000 Argon
// Copyright (c) 2016-2018 Argon Design Ltd. All rights reserved.
//
// This file is covered by the BSD (with attribution) license.
// See the LICENSE file for the precise wording of the license.
//... |
gscept/nebula-trifid | code/render/lighting/sm50/sm50shadowserver.h | #pragma once
//------------------------------------------------------------------------------
/**
@class Lighting::SM50ShadowServer
Handles shadowing using SM 5.0
(C) 2012-2016 Individual contributors, see AUTHORS file
*/
#include "lighting/base/shadowserverbase.h"
#include "frame/frameshader.h"
#... |
juliuspetero/coding-problems | src/com/coding/dynamicprogramming/FibonacciDynamicProgramming.java | <gh_stars>0
package com.coding.dynamicprogramming;
public class FibonacciDynamicProgramming {
/**
* Recursive approach to fibonacci
*
* @param n nth fibonacci
* @return fibonacci number
*/
public static int calculateFibonacciNumber(int n) {
if (n < 2)
return n;
... |
KismetSuS/SunderingShadows | d/shadow/room/forest/road4.c | <gh_stars>10-100
#include "forest.h"
inherit "/d/shadow/room/forest/road1";
void create(){
::create();
set_terrain(LIGHT_FOREST);
set_travel(DIRT_ROAD);
set_property("light" , 2);
set_property("indoors" , 0);
set_short("%^RESET%^%^GREEN%^On the Quiet %^BOLD%^%^GREEN%^Fo%^RESET%^%^GREEN%^r%^GREEN%... |
FunctionLab/sleipnir | src/annotation.h | /*****************************************************************************
* This file is provided under the Creative Commons Attribution 3.0 license.
*
* You are free to share, copy, distribute, transmit, or adapt this work
* PROVIDED THAT you attribute the work to the authors listed below.
* For more informa... |
jsc-masshtab/veil-connect | src/vdi_client/vdi_manager.h | <reponame>jsc-masshtab/veil-connect
/*
* VeiL Connect
* VeiL VDI Client
* Based on virt-viewer and freerdp
*
* Author: http://mashtab.org/
*/
#ifndef VIRT_VIEWER_VEIL_VDI_MANAGER_H
#define VIRT_VIEWER_VEIL_VDI_MANAGER_H
#include <gtk/gtk.h>
#include "settings_data.h"
#include "vdi_session.h"
#define TYPE_VDI... |
ybadmus/ASW | src/components/BusinessNews/index.js | <filename>src/components/BusinessNews/index.js
import React from 'react';
import {Link} from "react-router-dom";
const BusinessNews = ({businessNews, headerHide}) => {
return (
<div className="row">
<div className="col-12">
<div className="businerss_news">
... |
maulikjs/hue | desktop/core/ext-py/celery-4.2.1/t/unit/worker/test_autoscale.py | from __future__ import absolute_import, unicode_literals
import sys
from case import Mock, mock, patch
from celery.concurrency.base import BasePool
from celery.five import monotonic
from celery.utils.objects import Bunch
from celery.worker import autoscale, state
class MockPool(BasePool):
shrink_raises_except... |
zabrewer/batfish | projects/batfish-common-protocol/src/main/java/org/batfish/datamodel/routing_policy/communities/CommunityExprVisitor.java | package org.batfish.datamodel.routing_policy.communities;
/** A visitor of {@link CommunityExpr} that takes 1 generic argument and returns a generic value. */
public interface CommunityExprVisitor<T, U> {
T visitRouteTargetExtendedCommunityExpr(
RouteTargetExtendedCommunityExpr extendedCommunityTypeGlobalHigh... |
gmenti/authorization-service | test/unit/helpers.js | const chai = require('chai');
const sinon = require('sinon');
const { expect } = chai;
module.exports = { sinon, expect };
|
danewalton/azure-iot-sdk-python | azure-iot-device/azure/iot/device/aio/__init__.py | """Azure IoT Device Library - Asynchronous
This library provides asynchronous clients for communicating with Azure IoT services
from an IoT device.
"""
# Import all exposed items in aio subpackages to expose them via this package
from azure.iot.device.iothub.aio import *
from azure.iot.device.provisioning.aio import ... |
Toromino/chromiumos-platform2 | power_manager/common/test_main_loop_runner.cc | // Copyright (c) 2012 The Chromium OS 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 "power_manager/common/test_main_loop_runner.h"
#include <base/check.h>
#include <base/location.h>
#include <base/logging.h>
#include <bas... |
antoree/registry-creds | vendor/github.com/googleapis/gax-go/path_template_test.go | <reponame>antoree/registry-creds
// Copyright 2016, Google Inc.
// All rights reserved.
//
// 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
//... |
tjohnston-softdev/fox-controller-app | fox-api/device-params.js | // Help functions for Device and Node APIs.
const rioIndex = require("../fox-devices/remote_io/remote-io.index");
// Reads page string request parameter.
function readPagePart(parameterString)
{
var givenType = typeof parameterString;
var readRes = null;
if (givenType === "string" && parameterString.length > 0)... |
CoOwner/VisualPvP | org/sonatype/guice/bean/locators/QualifyingStrategy.java | <reponame>CoOwner/VisualPvP
package org.sonatype.guice.bean.locators;
import com.google.inject.Binding;
import com.google.inject.Key;
import com.google.inject.name.Named;
import java.lang.annotation.Annotation;
enum QualifyingStrategy
{
UNRESTRICTED, NAMED, NAMED_WITH_ATTRIBUTES, MARKED, MARKED_WITH_ATTRIBUTES... |
certik/paraview | VTK/Rendering/vtkXRenderWindowTclInteractor.cxx | /*=========================================================================
Program: Visualization Toolkit
Module: $RCSfile: vtkXRenderWindowTclInteractor.cxx,v $
Copyright (c) <NAME>, <NAME>, <NAME>
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
This ... |
the-trav/CalendarSwing-EventPlanning | src/mypi/calendarPanel/CalendarDayButton.java | <reponame>the-trav/CalendarSwing-EventPlanning
package mypi.calendarPanel;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.Calendar;
import java.util.GregorianCalendar;
import javax.swing.JButton;
import javax.swing... |
Kelvin19891223/TipEx | frontend/admin/routes/components/dataEntry/Cascader/CustomTrigger.js | <reponame>Kelvin19891223/TipEx
import React, {Component} from "react";
import {Card, Cascader} from "antd";
const options = [{
value: 'menu',
label: 'Menu',
children: [{
value: 'jumbo',
label: 'jquery',
children: [{
value: 'opstion',
label: 'West Lake',
}],
}],
}, {
value: 'menu'... |
merveealpay/python-exercises | OOP/inher.py | class X:
def met(self):
print("X OK")
class Y:
def met(self):
print("Y OK")
class Z(X, Y):
def met(self):
super(X, self).met()
class A(Z):
def met(self):
super(A, self).met()
object = A()
object.met()
#Y OK |
1847123212/YoC-open | components/chip_ch2601/include/es7210.h | /*
* Copyright (C) 2017-2020 Alibaba Group Holding Limited
*/
/******************************************************************************
* @file es7210.h
* @brief
* @version
* @date 2020-07-09
******************************************************************************/
#ifndef _ES7210_H_
#defin... |
seakers/ExtUtils | dakota-6.3.0.Windows.x86/include/DesignMultiSet.hpp.inl | /*
================================================================================
PROJECT:
<NAME> Genetic Algorithms (JEGA)
CONTENTS:
Inline methods of class DesignMultiSet.
NOTES:
See notes of DesignMultiSet.hpp.
PROGRAMMERS:
<NAME> (<EMAIL>) (JE)
ORGANIZAT... |
gitter-badger/ZeloEngine | Sandbox/Craft/cube.cpp | <reponame>gitter-badger/ZeloEngine
#include <math.h>
#include "cube.h"
#include "item.h"
#include "matrix.h"
#include "util.h"
void make_cube_faces(
float *data, float ao[6][4], float light[6][4],
int left, int right, int top, int bottom, int front, int back,
int wleft, int wright, int wtop, in... |
Yoon-SeokJin/PlatformerGame | PlatformerGame/BulletBlock.cpp | #include "BulletBlock.hpp"
BulletBlock::BulletBlock(const Vec2<double>& pos, int rotate) : Block(pos) {
bullet_rotate = rotate;
sprite_info.sprite_index = SpriteIndex::bullet_block;
sprite_info.image_angle = rotate;
if (rotate == 0) dpos = { 10, 0 };
else if (rotate == 1) dpos = { -1, 10 };
els... |
Bhanditz/Winds | api/src/routes/share.js | import Share from '../controllers/share';
module.exports = api => {
api.route('/shares').get(Share.list);
api.route('/shares/:shareId').get(Share.get);
api.route('/shares').post(Share.post);
api.route('/shares/:shareId').put(Share.put);
api.route('/shares/:shareId').delete(Share.delete);
};
|
FrankKwok/Oreo | android/net/NetworkCapabilities.java | <gh_stars>1-10
/*
* Copyright (C) 2014 The Android 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
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless ... |
anhle1476/restaurant-manager-react-client | src/components/Cashier/TableAndArea/AddTableModal/AddTableModal.js | import React, { useState } from "react";
import { Modal, ModalBody, ModalFooter, Form, Button } from "reactstrap";
import tableApi from "../../../../api/tableApi";
import { toastError, toastSuccess } from "../../../../utils/toastUtils";
import ModalHeaderWithCloseBtn from "../../../ModalHeaderWithCloseBtn/ModalHeader... |
mattshirtliffe/Axelrod | axelrod/result_set.py | import csv
import tqdm
from collections import namedtuple
from numpy import mean, nanmedian, std
from . import eigen
from .game import Game
import axelrod.interaction_utils as iu
def update_progress_bar(method):
"""A decorator to update a progress bar if it exists"""
def wrapper(*args):
"""Run the m... |
GetODK/central-frontend | src/util/router.js | <reponame>GetODK/central-frontend
/*
Copyright 2019 ODK Central Developers
See the NOTICE file at the top-level directory of this distribution and at
https://github.com/getodk/central-frontend/blob/master/NOTICE.
This file is part of ODK Central. It is subject to the license terms in
the LICENSE file found in the top-... |
andrewstellman/pbprdf | src/main/scala/com/stellmangreene/pbprdf/PlayByPlay.scala | <filename>src/main/scala/com/stellmangreene/pbprdf/PlayByPlay.scala
package com.stellmangreene.pbprdf
import org.joda.time.DateTime
import org.eclipse.rdf4j.model.IRI
import org.eclipse.rdf4j.model.vocabulary.RDF
import org.eclipse.rdf4j.model.vocabulary.RDFS
import org.eclipse.rdf4j.repository.Repository
import com.... |
Nyior/django-rest-paystack | paystack/serializers/__init__.py | from .customer import *
from .transaction import *
|
Nik6198/Data-Structures | sorting/heap.cpp | <gh_stars>0
qxc
#include<iostream>
using namespace std;
int main()
{
int n;
int v,temp,i;
cout<<"How many elements you want in array:";
cin>>n;
int a[n+1];
cout<<"Enter array elements:";
for(i=1;i<=n;i++)
{
cin>>a[i];
}
cout<<"sorted array elements are:";
for(i=1;i<=n;i++)
{
v=n;
//create min heap
while(v!=0)
{
i=v/2... |
GabrielePrestifilippo/EST-WA-Javascript | src/worldwind_old copy/navigate/Navigator.js | <reponame>GabrielePrestifilippo/EST-WA-Javascript<filename>src/worldwind_old copy/navigate/Navigator.js
define([
'../error/ArgumentError',
'./Camera',
'../util/Logger',
'../geom/Matrix',
'./NavigatorState'
], function (ArgumentError,
Camera,
Logger,
Matrix,
... |
IKATS/ikats-datamodel | TemporalDataManagerWebApp/src/main/java/fr/cs/ikats/temporaldata/application/ApplicationLabels.java | /**
* Copyright 2018-2019 CS Systèmes d'Information
*
* 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 applicabl... |
deeplearninc/relaax | relaax/common/algorithms/lib/episode.py | <filename>relaax/common/algorithms/lib/episode.py
from __future__ import absolute_import
from builtins import object
import numpy as np
from . import experience
class Episode(object):
def __init__(self, *args):
self.keys = args
self.experience = None
def begin(self):
assert self.exper... |
mateuszrzeszutek/tracing-examples | signalfx-tracing/signalfx-nodejs-tracing/mysql/deedScheduler/router.js | const tracer = require('./tracer');
const BodyParser = require('koa-bodyparser');
const Router = require('koa-router');
const scheduler = require('./scheduler');
const router = new Router();
async function addItem(ctx) {
const span = tracer.scope().active();
const deed = ctx.request.body.deed;
const note = ctx... |
evmanio/evman | app/services/form_services/form_submission_form.rb | module FormServices
class FormSubmissionForm
include ActiveModel::Model
def model_name
ActiveModel::Name.new(self, nil, "FormSubmissionForm")
end
delegate :persisted, :form_id, :associated_object_id, :associated_object_type, to: :submission
attr_reader :submission, :form, :params, :current... |
ShurtanMSC/ShurtanMSCFront | src/components/Shurtan/TableGrafic/TableGraficModal.js | import React, {useRef, useEffect, useCallback} from 'react'
import { motion, AnimatePresence } from 'framer-motion'
import {
ModalDivShurtan,
H2, H2Div, Table, Tr, Th, TdFirst, Td, InputModal, SaveDiv, SaveBtnModal, CloseBtnModal,
} from '../../../styled';
import axios from 'axios';
import {configHeader} from "... |
laudarch/GTAS | gtas-parent/gtas-rulesvc/src/main/java/gov/gtas/rule/RuleService.java | /*
* All GTAS code is Copyright 2016, The Department of Homeland Security (DHS), U.S. Customs and Border Protection (CBP).
*
* Please see LICENSE.txt for details.
*/
package gov.gtas.rule;
import gov.gtas.bo.RuleServiceRequest;
import gov.gtas.bo.RuleServiceResult;
import java.util.Map;
/**
* The interface for... |
city-mobil/go-mymy | pkg/mymy/handler_test.go | package mymy
import (
"testing"
"github.com/stretchr/testify/assert"
)
var (
tSource = SourceInfo{
Schema: "city",
Table: "clients",
PKs: []Column{
{
Index: 0,
Name: "id",
Type: TypeNumber,
IsAuto: true,
IsUnsigned: true,
},
},
Cols: []Column{
{Index: 1... |
opensag/atom-openwrt | package/wav6/iwlwav-dev/drivers/net/wireless/intel/iwlwav/tools/mtlkroot/linux/nlmsgs.c | <gh_stars>1-10
/******************************************************************************
Copyright (c) 2012
Lantiq Deutschland GmbH
For licensing information, see the file 'LICENSE' in the root folder of
this software module.
**********************... |
suveng/demo | spring/boot-stat-machine/src/main/java/my/suveng/statmachine/demo/own/IStat.java | <filename>spring/boot-stat-machine/src/main/java/my/suveng/statmachine/demo/own/IStat.java<gh_stars>1-10
package my.suveng.statmachine.demo.own;
/**
* 状态抽闲
*
* @author suwenguang
**/
public interface IStat {
/**
* 转化状态前的回调
*
* @author suwenguang
*/
void doBefore();
/**
* 转化... |
abdalla/docker-image-for-python-boto3-mysql | deps/unixODBC-2.3.4/Drivers/Postgre7.1/statement.h |
/* File: statement.h
*
* Description: See "statement.c"
*
* Comments: See "notice.txt" for copyright and license information.
*
*/
#ifndef __STATEMENT_H__
#define __STATEMENT_H__
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "psqlodbc.h"
#include "bind.h"
#ifndef WIN32
#inclu... |
ZakZubair/codesandbox-client | src/common/utl.test.js | <gh_stars>0
import { getSandboxOptions } from './url';
function testSandboxOptions(url: string) {
expect(getSandboxOptions(url)).toMatchSnapshot();
}
describe('url parameters', () => {
it('keeps everything false on normal urls', () => {
testSandboxOptions('https://codesandbox.io/s/new');
});
it('sets cur... |
aaarsene/o3de | Code/Framework/AzCore/Tests/TimeDataStatistics.cpp | /*
* Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution.
*
* SPDX-License-Identifier: Apache-2.0 OR MIT
*
*/
#include <AzCore/UnitTest/TestTypes.h>
#include <AzCore/UnitTest/UnitTest.h>
#include <AzTest/AzTest.... |
sw1115/climate-watch | spec/support/shared_contexts/net_zero_content/categories.rb | <gh_stars>10-100
RSpec.shared_context 'Net Zero categories' do
let(:global_type) {
FactoryBot.create(:indc_category_type, name: ::Indc::CategoryType::GLOBAL)
}
let(:overview_type) {
FactoryBot.create(
:indc_category_type, name: ::Indc::CategoryType::OVERVIEW
)
}
let!(:overview) {
Factory... |
PolRod/aleph | lib/schemas/redis_store.rb | <filename>lib/schemas/redis_store.rb<gh_stars>10-100
require 'json'
module Schemas
module RedisStore
EXPIRE = 3.days
def redis_retrieve
r = Redis.current.get(key)
r ? JSON.parse(r) : []
end
def redis_store!(schema_rows)
Redis.current.del(key)
Redis.current.set(key, JSON.gen... |
olivier-maury/unity | std-plugins/src/main/java/pl/edu/icm/unity/stdext/identity/AbstractStaticIdentityTypeProvider.java | /*
* Copyright (c) 2013 ICM Uniwersytet Warszawski All rights reserved.
* See LICENCE file for licensing information.
*/
package pl.edu.icm.unity.stdext.identity;
import pl.edu.icm.unity.types.basic.Identity;
/**
* Base class for static identity types, which simply store the identity value in the database.
* @au... |
loicgasser/ngeo | src/message/extraModule.js | <filename>src/message/extraModule.js
/**
* @module ngeo.message.extraModule
*/
import ngeoMessageNotification from 'ngeo/message/Notification.js';
import ngeoMessageDisclaimer from 'ngeo/message/Disclaimer.js';
import ngeoMessageDisplaywindowComponent from 'ngeo/message/displaywindowComponent.js';
import ngeoMessageP... |
xaoxuu/AXKit | Products/AXKit.framework/Headers/NSObject+AXAdd.h | //
// NSObject+AXAdd.h
// AXKit
//
// Created by xaoxuu on 13/03/2018.
// Copyright © 2018 Titan Studio. All rights reserved.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@interface NSObject (AXAdd)
/**
获取所有子类
@return 所有子类
*/
+ (NSArray *)ax_subclasses;
@end
NS_ASSUME_NONNULL_END
|
trespasserw/MPS | testbench/testsolutions/editor.menus.tests/test_gen/jetbrains/mps/lang/editor/menus/tests/Include_MenuAndTargetNodeCorrespondence_Test.java | package jetbrains.mps.lang.editor.menus.tests;
/*Generated by MPS */
import jetbrains.mps.MPSLaunch;
import jetbrains.mps.lang.test.runtime.BaseTransformationTest;
import org.junit.ClassRule;
import jetbrains.mps.lang.test.runtime.TestParametersCache;
import org.junit.Rule;
import jetbrains.mps.lang.test.runtime.RunW... |
betagouv/react-final-form-utils | src/utils/composeValidators.js | export const composeValidators = (...validators) => value =>
validators.reduce(
(error, validator) =>
error ||
(typeof validator === 'function' && validator(value)),
undefined
)
export default composeValidators
|
sunianping/elasticsearch | core/src/main/java/org/elasticsearch/search/aggregations/metrics/valuecount/ValueCountAggregator.java | /*
* Licensed to Elasticsearch under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this fi... |
theFaustus/demo-oca | src/md/tekwill/demo/inheritance/employeehomework/Employee.java | package md.tekwill.demo.inheritance.employeehomework;
import java.time.LocalDate;
import java.util.Random;
class Employee {
protected String name;
protected String employeeNumber;
protected LocalDate hireDate;
public Employee(String name) {
this(name, LocalDate.now());
}
public Employ... |
googege/algo-learn | java/algorithm/recursion/ValidBinarySearchTree.java | <gh_stars>100-1000
package algorithm.recursion;
/**
* @author roseduan
* @time 2020/9/23 8:11 下午
* @description 验证二叉搜索树
*/
public class ValidBinarySearchTree {
/**
* 根据二叉搜索树的特征,递归
*/
public boolean isValidBST(TreeNode root) {
return helper(root, Long.MIN_VALUE, Long.MAX_VALUE);
}
... |
saurabhgis/CV | wab/widgets/Geoprocessing/resultrenderers/FeatureSetRenderer.js | define([
'dojo/_base/declare',
'dojo/_base/lang',
'dojo/_base/array',
'dojo/_base/html',
'dojo/dom-style',
'dojo/dom-attr',
'dojo/on',
'dijit/_TemplatedMixin',
'esri/layers/GraphicsLayer',
'esri/layers/FeatureLayer',
'esri/graphicsUtils',
'esri/renderers/SimpleRenderer',
'esri/renderers/jsonUt... |
prateeksingh0001/FlexNeuART | trec_eval-9.0.7/m_P_avgjg.c | /*
Copyright (c) 2008 - <NAME>.
Permission is granted for use and modification of this file for
research, non-commercial purposes.
*/
#include "common.h"
#include "sysfunc.h"
#include "trec_eval.h"
#include "functions.h"
#include "trec_format.h"
static int
te_calc_P_avgjg (const EPI *epi, const REL_INFO... |
lechium/iOS1351Headers | usr/libexec/FullKeyboardAccess/FKACommandsViewController.h | <reponame>lechium/iOS1351Headers<filename>usr/libexec/FullKeyboardAccess/FKACommandsViewController.h
//
// Generated by classdumpios 1.0.1 (64 bit) (iOS port by DreamDevLost)(Debug version compiled Sep 26 2020 13:48:20).
//
// Copyright (C) 1997-2019 <NAME>.
//
#import <UIKit/UIViewController.h>
@class AXSSKeyCh... |
Droeftoeter/react-material-icons | src/maps/LocalHotel.js | import React from 'react';
import BaseIcon from '../BaseIcon';
export default props => (
<BaseIcon
{ ...props }
>
<path d="M14 26c3.31 0 6-2.69 6-6s-2.69-6-6-6-6 2.69-6 6 2.69 6 6 6zm24-12H22v14H6V10H2v30h4v-6h36v6h4V22c0-4.42-3.58-8-8-8z"/>
</BaseIcon>
);
|
CarletonURocketry/2019-avionics | src/targets/sam/same54/src/sdhc-test.c | //
// sdhc-test.c
// index
//
// Created by <NAME> on 2021-07-28.
// Copyright © 2021 <NAME>. All rights reserved.
//
#include "sdhc-test.h"
#include "sd-commands.h"
#define SDHC_ADMA2_DESC_ACT_NOP_Val 0b00
#define SDHC_ADMA2_DESC_ACT_TRAN_Val 0b10
#define SDHC_ADMA2_DESC_ACT_LINK_Val 0b11
#define SDH... |
LearnersGuild/idm-api-spec | webpack/module.js | <filename>webpack/module.js<gh_stars>0
const path = require('path')
const autoprefixer = require('autoprefixer')
const ExtractTextPlugin = require('extract-text-webpack-plugin')
module.exports = ({config, root}) => {
const sassResources = require('src/common/styles/sassResources')
const rules = [
{
test... |
KaliedaRik/Scrawl-canvas | source/mixin/dom.js | // # DOM mixin
// This mixin builds on the base and position mixins to give DOM elements (Scrawl-canvas [Stack](../factory/stack.html), [Canvas](../factory/canvas.html) and [Element](../factory/element.html) wrapper objects) the ability to act as __artefacts__ in a Scrawl-canvas stack environment.
// + Absolute and rel... |
troy0820/openshift-azure | vendor/github.com/openshift/origin/pkg/templateservicebroker/servicebroker/unbind_test.go | <gh_stars>10-100
package servicebroker
import (
"net/http"
"reflect"
"testing"
templatev1 "github.com/openshift/api/template/v1"
faketemplatev1 "github.com/openshift/client-go/template/clientset/versioned/typed/template/v1/fake"
"github.com/openshift/origin/pkg/templateservicebroker/openservicebroker/api"
aut... |
EvilBabyDemon/RubberDucky | src/main/java/commandHandling/commands/publicCommands/place/PlaceVerify.java | <filename>src/main/java/commandHandling/commands/publicCommands/place/PlaceVerify.java<gh_stars>0
package commandHandling.commands.publicCommands.place;
import services.PlaceWebSocket;
import java.awt.*;
import java.awt.image.BufferedImage;
import java.util.LinkedList;
public class PlaceVerify {
private final Pl... |
mattclegg/homebrew-emacs | Formula/timerfunctions.rb | require File.expand_path("../../Homebrew/emacs_formula", __FILE__)
class Timerfunctions < EmacsFormula
desc "Enhanced version of timer.el"
homepage "http://elpa.gnu.org/packages/timerfunctions.html"
url "http://elpa.gnu.org/packages/timerfunctions-1.4.2.el"
sha256 "854bc3716a77db2bc5f7f264166f6156e7a3b3c3296e1... |
xinming365/LeetCode | 187_find_repeat_DNA.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 2022/1/27 7:18 下午
# @Author : xinming
# @File : 187_find_repeat_DNA.py
from typing import List
from collections import defaultdict
class Solution:
def findRepeatedDnaSequences(self, s: str) -> List[str]:
l = len(s)
L=10
dict_dna ... |
cehbrecht/md-ingestion | tests/community/test_egidatahub.py | import os
from mdingestion.community.egidatahub import EgidatahubDublinCore
from tests.common import TESTDATA_DIR
def test_dublin_core():
xmlfile = os.path.join(TESTDATA_DIR, 'egidatahub-oai_dc', 'SET_1', 'xml', '3d0c278c-47d3-5dee-9a56-43b1a5b5d3dd.xml') # noqa
reader = EgidatahubDublinCore()
doc = re... |
mykhsystematic/hapi-fhir | hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/BanUnsupportedHttpMethodsInterceptor.java | package ca.uhn.fhir.rest.server.interceptor;
/*
* #%L
* HAPI FHIR - Server Framework
* %%
* Copyright (C) 2014 - 2019 University Health Network
* %%
* 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 th... |
making-books-ren-today/test_eval_3_shxco | mep/books/migrations/0006_item_creators.py | <reponame>making-books-ren-today/test_eval_3_shxco<filename>mep/books/migrations/0006_item_creators.py
# -*- coding: utf-8 -*-
# Generated by Django 1.11.12 on 2018-05-01 20:20
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = ... |
danjpgriffin/totallylazy | test/com/googlecode/totallylazy/CharactersTest.java | <gh_stars>100-1000
package com.googlecode.totallylazy;
import org.junit.Ignore;
import org.junit.Test;
import static com.googlecode.totallylazy.Characters.ASCII;
import static com.googlecode.totallylazy.Characters.UTF16;
import static com.googlecode.totallylazy.Characters.UTF8;
import static com.googlecode.totallylaz... |
nitspalash/blehx_app | js/components/sale/index.js | import React, { Component } from "react";
import { Image, View, StatusBar, TouchableOpacity,ScrollView,AsyncStorage } from "react-native";
import { Container,Spinner, Header,Thumbnail, Title, Button, Icon, Tabs, Tab, Right, Left, Body, Content,ListItem ,List,Text} from 'native-base';
import ResponsiveImage from 'react-... |
falki147/GMLAST | test/src/TypeTest.cpp | #include <GMLAST/AST/ArrayOperator.hpp>
#include <GMLAST/AST/AssignStatement.hpp>
#include <GMLAST/AST/BinaryOperator.hpp>
#include <GMLAST/AST/BreakStatement.hpp>
#include <GMLAST/AST/ContinueStatement.hpp>
#include <GMLAST/AST/DeclarationStatement.hpp>
#include <GMLAST/AST/DoStatement.hpp>
#include <GMLAST/AST/DotOpe... |
codegeekgao/framework | Spring-Framerwork/src/main/java/com/codegeek/ioc/day6/service/AccountService.java | <filename>Spring-Framerwork/src/main/java/com/codegeek/ioc/day6/service/AccountService.java
package com.codegeek.ioc.day6.service;
import com.codegeek.ioc.day6.model.Product;
import java.math.BigDecimal;
/**
* @author CodeGeekGao
* @version Id: AccountService.java, v 1.0 2020/6/30 11:59 PM CodeGeekGao
*/
public i... |
resystem/500-cidades-graph-api-serverless | models/disability.list.js | export const DISABILITY_LIST = [
'hearing_disability',
'deaf',
'physical_disability',
'mental_disability',
'visually_impaired',
'blind',
'multiple_disabilities',
'ASD',
'not_said',
'other',
];
export const todelete = '';
|
Arronzheng/roncoo-education | roncoo-education-course/roncoo-education-course-service/src/main/java/com/roncoo/education/course/service/biz/pc/PcApiCourseBiz.java | <filename>roncoo-education-course/roncoo-education-course-service/src/main/java/com/roncoo/education/course/service/biz/pc/PcApiCourseBiz.java
package com.roncoo.education.course.service.biz.pc;
import java.math.BigDecimal;
import java.util.List;
import com.qiniu.common.QiniuException;
import com.roncoo.education.cou... |
gianricardo/OpcUaStack | tst/OpcUaStackCore/BuildInTypes/OpcUaNumber_t.cpp | <reponame>gianricardo/OpcUaStack
#include "unittest.h"
#include "OpcUaStackCore/BuildInTypes/OpcUaNumber.h"
#include "OpcUaStackCore/Base/Utility.h"
#include <sstream>
#include <boost/iostreams/stream.hpp>
#include <boost/property_tree/ptree.hpp>
#include <boost/property_tree/json_parser.hpp>
using namespace O... |
AQ18/skimpy | skimpy/inference/parameters.py | <filename>skimpy/inference/parameters.py
"""
"""
from skimpy.core.parameters import ParameterValuePopulation
from scipy.stats import multivariate_normal
import tensorflow as tf
import pandas as pd
import numpy as np
EPSILON = 1e-9
class SecureMultivariateNormal(object):
def __init__(self, mu, sigma, var):
... |
Amit0617/OpenMS | src/openms/source/ANALYSIS/OPENSWATH/DIAScoring.cpp | <filename>src/openms/source/ANALYSIS/OPENSWATH/DIAScoring.cpp
// --------------------------------------------------------------------------
// OpenMS -- Open-Source Mass Spectrometry
// --------------------------------------------------------------------------
// Copyright The OpenMS Team -- Eberhard ... |
WebCampZg/conference-web | people/forms.py | <filename>people/forms.py
from django import forms
from django.contrib.auth import get_user_model
from django.contrib.auth.forms import ReadOnlyPasswordHashField
from django.utils.translation import ugettext_lazy as _
UserModel = get_user_model()
class CustomUserCreationForm(forms.ModelForm):
"""
A form for... |
bbilger/jrestless | aws/gateway/jrestless-aws-gateway-handler/src/main/java/com/jrestless/aws/gateway/filter/DynamicProxyBasePathFilter.java | <reponame>bbilger/jrestless
/*
* Copyright 2017 <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 appli... |
MManicaM/ogs | ProcessLib/TES/TESLocalAssemblerInner.h | /**
* \copyright
* Copyright (c) 2012-2019, OpenGeoSys Community (http://www.opengeosys.org)
* Distributed under a Modified BSD License.
* See accompanying file LICENSE.txt or
* http://www.opengeosys.org/project/license
*
* The code of this file is used to decouple the evalua... |
Pawlost/Pokecube-Issues-and-Wiki | src/main/java/pokecube/core/ai/tasks/bees/tasks/EnterHive.java | package pokecube.core.ai.tasks.bees.tasks;
import java.util.Optional;
import net.minecraft.core.GlobalPos;
import net.minecraft.world.entity.ai.Brain;
import net.minecraft.world.level.Level;
import pokecube.core.ai.tasks.bees.AbstractBeeTask;
import pokecube.core.ai.tasks.bees.BeeTasks;
import pokecube.core.ai.tasks.... |
personalised-semantic-search/JoDS_IRIS-- | JoDS_IRIS+-/src/org/deri/iris/factory/Factory.java | /*
* Integrated Rule Inference System (IRIS):
* An extensible rule inference system for datalog with extensions.
*
* Copyright (C) 2008 Semantic Technology Institute (STI) Innsbruck,
* University of Innsbruck, Technikerstrasse 21a, 6020 Innsbruck, Austria.
*
* This library is free software; you can redistribu... |
jhuynh85/sdth-site | src/components/calendar/details.js | import React from "react"
import moment from "moment"
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"
import Html from "Common/Html"
import truncateString from "Utils/truncate"
import { StyledDetails, SeeMore } from "./styles"
function Details({ eventInfo, setEventInfo, ...position }) {
React.useEff... |
joshuaherrera/car_maintenance | server/client/src/components/Session/withAuthorization.js | import React from 'react';
import { withRouter } from 'react-router-dom';
import { compose } from 'recompose';
import AuthUserContext from './Context';
import { withFirebase } from '../Firebase';
const withAuthorization = condition => Component => {
class WithAuthorization extends React.Component {
//this function ... |
Selous05/beeetv_1.6 | app/src/main/java/com/beeecorptv/ui/downloadmanager/core/model/DownloadScheduler.java | /*
* EasyPlex - Movies - Live Streaming - TV Series, Anime
*
* @author @Y0bEX
* @package EasyPlex - Movies - Live Streaming - TV Series, Anime
* @copyright Copyright (c) 2021 Y0bEX,
* @license http://codecanyon.net/wiki/support/legal-terms/licensing-terms/
* @profile https://codecanyon.net/user/yobex
* @link <E... |
gluckzhang/besu | consensus/qbft/src/test/java/org/hyperledger/besu/consensus/qbft/validator/TransactionValidatorProviderTest.java | <filename>consensus/qbft/src/test/java/org/hyperledger/besu/consensus/qbft/validator/TransactionValidatorProviderTest.java
/*
* Copyright ConsenSys AG.
*
* 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 ... |
bitesandbytes/Projekt-Panda | ClientGUI/src/clientCoreThreads/FileReceiverThread.java | package clientCoreThreads;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.RandomAccessFile;
import java.net.InetSocketAddress;
import java.nio.ByteBuffer;
import java.nio.channels.FileChannel;
import java.nio.channels.ServerSocketChannel;
import java.nio.channels.SocketChannel;
import ja... |
SCSLaboratory/BearOS | usr/include/sbin/libnfs/libnfs-raw-rquota.h | /*
* Please do not edit this file.
* It was generated using rpcgen.
*/
#ifndef _RQUOTA_H_RPCGEN
#define _RQUOTA_H_RPCGEN
#include <nfsc/libnfs-zdr.h>
#ifdef __cplusplus
extern "C" {
#endif
#define RQUOTAPATHLEN 1024
enum rquotastat {
RQUOTA_OK = 1,
RQUOTA_NOQUOTA = 2,
RQUOTA_EPERM = 3,
};
typedef enum rquota... |
LKG/lore | lore-user/user-core/src/main/java/im/heart/usercore/service/impl/FrameUserConnectServiceImpl.java | package im.heart.usercore.service.impl;
import com.google.common.collect.Sets;
import im.heart.core.plugins.persistence.DynamicSpecifications;
import im.heart.core.plugins.persistence.SearchFilter;
import im.heart.core.service.impl.CommonServiceImpl;
import im.heart.usercore.entity.FrameUserConnect;
import im.heart.us... |
HugoGGuerrier/mini-ML4J | src/mml4j/main/typist/equation_system/nodes/ListNode.java | package mml4j.main.typist.equation_system.nodes;
import mml4j.main.typist.equation_system.merging_strategy.ConstructorStrategy;
import mml4j.main.typist.equation_system.nodes.abstracts.ConstructorNode;
import mml4j.main.typist.equation_system.nodes.abstracts.Node;
import mml4j.main.typist.interfaces.INodeContained;
im... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.