repo_name stringlengths 6 101 | path stringlengths 4 300 | text stringlengths 7 1.31M |
|---|---|---|
MyMelodyUwU/comp1010SemTwo | comp1010_s2_2021_source_codes_for_students_v1/comp1010_s2_2021_source_codes_for_students_v1/src/ServiceClasses/Card.java | <reponame>MyMelodyUwU/comp1010SemTwo<gh_stars>0
package ServiceClasses;
import java.util.Random;
public class Card {
public String suit;
public int rank;
// suits organized from more powerful to less powerful
public static final String[] SUITS = { "dragons", "tigers", "snakes", "mice", "cats", "lions", "bees", "... |
AsahiOS/gate | usr/src/uts/common/os/serializer.c | /*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* o... |
paulromano/celeritas | src/comm/detail/LoggerMessage.cc | //----------------------------------*-C++-*----------------------------------//
// Copyright 2020 UT-Battelle, LLC, and other Celeritas developers.
// See the top-level COPYRIGHT file for details.
// SPDX-License-Identifier: (Apache-2.0 OR MIT)
//-------------------------------------------------------------------------... |
mykolaf/sonic-mgmt | tests/testbed_setup/conftest.py | from args.populate_fdb_args import add_populate_fdb_args
from common.fixtures.populate_fdb import populate_fdb
# FDB pytest arguments
def pytest_addoption(parser):
"""
Adds option to FDB pytest
Args:
parser: pytest parser object
Returns:
None
"""
add_popula... |
mahendra1904/pythod-programs | prog20_gen.py | radius=int(input("Enter the radius of the circle"))
area=22/7*radius*radius
print("The area of the circle with radius ",radius,"is",area)
|
shivharis/pybind | pybind/nos/v7_1_0/nas/server_ip/__init__.py | <gh_stars>0
from operator import attrgetter
import pyangbind.lib.xpathhelper as xpathhelper
from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType, RestrictedClassType, TypedListType
from pyangbind.lib.yangtypes import YANGBool, YANGListType, YANGDynClass, ReferenceType
from pyangbind.lib.base import Pybin... |
lucid-at-dream/citylife | legacy/auth/authenticator.c | #include "authenticator.h"
#include "logger/logger.h"
#include <stdlib.h>
#include <string.h>
authenticator *authenticator_new()
{
info("authenticator.c: creating a new authenticator struct");
authenticator *auth = (authenticator *)calloc(1, sizeof(authenticator));
auth->auth_table = map_new(16);
retur... |
Baek2back/kanban | src/redux/applyMiddleware.js | export default function applyMiddleware(...middlewareFactories) {
return function enhancer(createStore) {
return function newCreateStore(reducer) {
let store = createStore(reducer);
let dispatch = store.dispatch;
middlewareFactories.forEach((factory) => {
dispatch = factory(store)(dispat... |
candrews/gradle | subprojects/dependency-management/src/main/java/org/gradle/api/internal/artifacts/ivyservice/projectmodule/DefaultProjectPublication.java | <reponame>candrews/gradle<gh_stars>1-10
/*
* Copyright 2014 the original author or 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/LICE... |
sodicarus/channels | channels/altadefinizionezone.py | <reponame>sodicarus/channels
# -*- coding: utf-8 -*-
# ------------------------------------------------------------
# Thegroove360 - XBMC Plugin
# Canale altadefinizione01casa
# ------------------------------------------------------------
import re
import urlparse
from core import config
from core import httptools
f... |
cable5881/algorithm | src/com/lqb/offer/mark/MinNumberInRotateArray.java | <reponame>cable5881/algorithm
package com.lqb.offer.mark;
/**
* 旋转数组的最小数字
* 把一个数组最开始的若干个元素搬到数组的末尾,我们称之为数组的旋转。
* 输入一个递增排序的数组的一个旋转,输出旋转数组的最小元素。
* 例如数组{3,4,5,1,2}为{1,2,3,4,5}的一个旋转,该数组的最小值为1。
* NOTE:给出的所有元素都大于0,若数组大小为0,请返回0。
*/
public class MinNumberInRotateArray {
public static void main(String[] args) {
... |
shuigedeng/taotao-cloud-paren | taotao-cloud-microservice/taotao-cloud-starter/taotao-cloud-starter-feign/src/main/java/com/taotao/cloud/feign/configuration/FeignInterceptorConfiguration.java | /*
* Copyright 2002-2021 the original author or 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
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by a... |
eric-wieser/graphology | src/utils/index.js | <gh_stars>100-1000
/**
* Graphology Utils
* =================
*
* Library endpoint.
*/
var addEdgeModule = require('./add-edge');
var addNodeModule = require('./add-node');
exports.addEdge = addEdgeModule.addEdge;
exports.copyEdge = addEdgeModule.copyEdge;
exports.mergeEdge = addEdgeModule.mergeEdge;
exports.upda... |
thaisacs/oi-dbt | doc/html/class_e_l_f_i_o_1_1elfio_1_1_sections.js | var class_e_l_f_i_o_1_1elfio_1_1_sections =
[
[ "Sections", "class_e_l_f_i_o_1_1elfio_1_1_sections.html#a77095b63b7e9e56e40cfc94dad24c45e", null ],
[ "add", "class_e_l_f_i_o_1_1elfio_1_1_sections.html#af60206f1e95ae37985df476419ce875e", null ],
[ "begin", "class_e_l_f_i_o_1_1elfio_1_1_sections.html#ac64b474... |
playbar/android-ndk | jnitest/app/src/main/cpp/Sample2.c | <gh_stars>1-10
// Sample2.c
#include <stdio.h>
#include "com_study_jnilearn_Sample2.h"
#ifdef __cplusplus
extern "C" {
#endif
/*
* Class: com_study_jnilearn_Sample2
* Method: instanceMethod
* Signature: ()V
*/
JNIEXPORT void JNICALL Java_com_study_jnilearn_Sample2_accessStaticField
(JNIEnv *env, jobj... |
630461866/hhh-shop | shop-basic/shop-common/src/main/java/com/qf/dto/TProductAddDTO.java | <reponame>630461866/hhh-shop<gh_stars>1-10
package com.qf.dto;
import com.qf.entity.TProduct;
import java.io.Serializable;
public class TProductAddDTO extends TProduct implements Serializable {
private String pdesc;
public String getPdesc() {
return pdesc;
}
public void setPdesc(String... |
hhucn/tbus-applications | TbusTestAppNT/src/de/hhu/tbus/applications/nt/emergencywarning/message/EmergencyWarningMessage.java | /**
*
*/
package de.hhu.tbus.applications.nt.emergencywarning.message;
import java.util.UUID;
import com.dcaiti.vsimrti.rti.objects.v2x.EncodedV2XMessage;
import com.dcaiti.vsimrti.rti.objects.v2x.MessageRouting;
import de.hhu.tbus.applications.nt.geoserver.message.EmbeddedMessage;
import de.hhu.tbus.applications... |
535205856/summerframework | summerframework-lock/platform-lock-database/src/main/java/com/bkjk/platform/lock/database/DatabaseLock.java | <filename>summerframework-lock/platform-lock-database/src/main/java/com/bkjk/platform/lock/database/DatabaseLock.java<gh_stars>10-100
package com.bkjk.platform.lock.database;
import javax.sql.DataSource;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.locks.Condition;
import java.util.concurrent.lock... |
awatson1978/wcdt-forms | webapp/tests/nightwatch/commands/components/reviewHistologyResearchRow.js | <reponame>awatson1978/wcdt-forms<filename>webapp/tests/nightwatch/commands/components/reviewHistologyResearchRow.js
/*var histologyResearchRecord = {
sampleId: "",
mutatedGenes: "",
immunohistochemistry: "",
histologyCall: "",
adeno: "",
smallCell: "",
trichotomy: ""
}*... |
maxiko/gitlabhq | lib/gitlab/auth/otp/strategies/base.rb | # frozen_string_literal: true
module Gitlab
module Auth
module Otp
module Strategies
class Base
def initialize(user)
@user = user
end
private
attr_reader :user
def success
{ status: :success }
end
def ... |
fbrandt/Ceva | src/test/java/de/felixbrandt/ceva/queue/QueueJobClientControllerTest.java | package de.felixbrandt.ceva.queue;
import static org.junit.Assert.assertEquals;
import java.util.LinkedList;
import org.junit.Before;
import org.junit.Test;
import de.felixbrandt.ceva.controller.MockDataSource;
import de.felixbrandt.ceva.controller.MockExecutable;
import de.felixbrandt.ceva.queue.BaseQueueWriter;
i... |
AllanKerr/Services | containers/authorization/app/cmd/root.go | <reponame>AllanKerr/Services
package cmd
import (
"github.com/spf13/cobra"
"app/oauth2"
"os"
"github.com/sirupsen/logrus"
)
var config *oauth2.Config
var RootCmd = &cobra.Command{
Use: "app",
}
func init() {
// secret used as the key for hashing
secret := os.Getenv("SYSTEM_SECRET")
if secret == "" {
lo... |
fenomenalfunds/fenomenal-funds-frontend | components/not-found.js | import styles from './../styles/components/not-found.module.scss';
import Link from 'next/link';
const NotFound = ({link, text}) => {
return <div className={styles.notFound}>
<h1>404 <br/> Not Found</h1>
<p>Yeah, well... this is awkward!!! <br/>
We can't find what you are looking for.</p>
<p>
<Link href={... |
simpago/rsnano-node | nano/node/rsnano_callbacks.cpp | #include <nano/crypto/blake2/blake2.h>
#include <nano/lib/logger_mt.hpp>
#include <nano/lib/rsnano.hpp>
#include <nano/lib/rsnanoutils.hpp>
#include <nano/lib/stream.hpp>
#include <nano/lib/threading.hpp>
#include <nano/lib/tomlconfig.hpp>
#include <nano/node/blockprocessor.hpp>
#include <nano/node/bootstrap/bootstrap.... |
zerenlu/primer_Cpp | chapter10/exercise10_37.cpp | #include<iterator>
#include<vector>
#include<algorithm>
#include<list>
#include<iostream>
using namespace std;
int main()
{
vector<int> v_i{ 1,2,3,4,5,6,7,8,9,10 };
list<int> l_i;
copy(v_i.crbegin() + 3, v_i.crend()-2, back_inserter(l_i));
ostream_iterator<int> out(cout, " ");
copy(l_i.cbegin(), l_i.cend(), out... |
prateek-s/mesos | 3rdparty/aws-sdk-cpp-master/aws-cpp-sdk-redshift/include/aws/redshift/model/EventInfoMap.h | /*
* Copyright 2010-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file... |
igorariza/JavaMedicCenterJDBC | src/main/java/data/CausasDAO.java | package data;
import static data.Conexion.*;
import domain.*;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;
public class CausasDAO implements IDAO<Causas> {
//para las consult... |
bidhata/EquationGroupLeaks | Leak #5 - Lost In Translation/windows/Resources/Pc/PyScripts/Lib/pc/pc/cmd/pcstatus/errors.py | # uncompyle6 version 2.9.10
# Python bytecode 2.7 (62211)
# Decompiled from: Python 3.6.0b2 (default, Oct 11 2016, 05:27:10)
# [GCC 6.2.0 20161005]
# Embedded file name: errors.py
import mcl.status
ERR_SUCCESS = mcl.status.MCL_SUCCESS
ERR_INVALID_PARAM = mcl.status.framework.ERR_START
ERR_MARSHAL_FAILED = mcl.status.f... |
Havunen/karma-jasmine-diff-reporter | test/helpers/mark.js | <reponame>Havunen/karma-jasmine-diff-reporter<filename>test/helpers/mark.js<gh_stars>10-100
'use strict';
var marker = require('../../src/marker');
module.exports = function mark(string) {
return marker.wrapString(string);
};
|
n-junge/phasar | include/phasar/PhasarLLVM/DataFlowSolver/Mono/Problems/InterMonoTaintAnalysis.h | <gh_stars>0
/******************************************************************************
* Copyright (c) 2017 <NAME>.
* All rights reserved. This program and the accompanying materials are made
* available under the terms of LICENSE.txt.
*
* Contributors:
* <NAME> and others
******************************... |
redcamel/RedRnd | ~2017/2016/prototype/src/sheet.js | <reponame>redcamel/RedRnd
"use strict";
{
let fn
const MATERIAL = RedGL.CONST.MATERIAL
const GEOMETRY = RedGL.CONST.GEOMETRY
// TODO 시트는 음 메쉬의 확장이고
// TODO 맵은 비트맵관련모든것을 쓸 수 있도록 한다.
// TODO 렌더링 설정값은 객체가 먹어야하는군...
class Sheet extends Mesh{
constructor(geometry,material,maxRows = 1,maxCols = 1,totalFrame = 1,star... |
mdavid626/checkers | src/src/ija/projekt/game/Log.java | <filename>src/src/ija/projekt/game/Log.java
/**
*
*/
package ija.projekt.game;
import ija.projekt.basis.Round;
import ija.projekt.basis.Step;
import java.util.ArrayList;
import java.util.List;
/**
* @author <NAME>
*/
public class Log {
/**
*
*/
protected int n;
/**
*
*/
... |
devibizsys/unip | app_app_pub/src/main/webapp/app/js/common/potalControllerBase.js | var potal_db_myworklistBase = IBizListPortlet.extend({
construct: function(config) {
arguments.callee.$.construct.call(this,config);
}
});
var potal_db_tzggBase = IBizListPortlet.extend({
construct: function(config) {
arguments.callee.$.construct.call(this,config);
}
});
var potal_db_qxjtbBase = IBizChartPort... |
paitoon/netra.ai-client | netra/face_detector.py | from scipy.spatial import distance as dist
import cv2
import dlib
import imutils
from imutils import face_utils
import logging
from . import shape_predictor_68_model
log = logging.getLogger(__name__)
class FaceDetector:
def __init__(self):
self.detector = dlib.get_frontal_face_detector()
self.pred... |
mervin0502/Lizard | src/me/mervin/util/PairMap.java | package me.mervin.util;
import java.util.HashMap;
public class PairMap<T1,T2> extends HashMap<Pair<T1>, T2> {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
PairMap<Integer, Integer> p = new PairMap<Integer, Integer>();
p.put(new Pair<Integer>(1, 2), 1);
... |
Batandwa-mgutsi/MyJava | assignment2/SumCosts.java | import java.util.Scanner;
/**
* Program to calculate the sum of entered amounts.
*
* The user has to enter D or Done to print out the sum.
*/
public class SumCosts {
public static void main(String[] args) {
final Scanner keyboard = new Scanner(System.in);
final Currency rand = new Currency("R", "ZAR", 1... |
open-alchemy/OpenAlchemyPackage | api/library/helpers/spec.py | <reponame>open-alchemy/OpenAlchemyPackage<gh_stars>0
"""Helpers for spec."""
import dataclasses
import json
import typing
import open_alchemy
import yaml
from open_alchemy import build
from packaging import version as packaging_version
from yaml import parser, scanner
from .. import exceptions, types
TSpec = typing... |
Alx-l/portfolio | src/store.js | import { Container } from 'unstated'
import lift from 'space-lift'
export class FilterStore extends Container {
state = {
filters: []
}
updateFilters(key) {
const keyIndex = lift(this.state.filters)
.findIndex(k => k === key)
.getOrElse(-1)
this.setState({
filters:
keyInde... |
jmvallet/viky-ai | nlp/sources/ogm_ltras/lib/ltrasmmodule.c | /*
* ltrasmmodule.c
*
* Created on: 29 oct. 2014
* Author: caroline
*/
/*
* Handling score structures
* Copyright (c) 2009-2010 Pertimm by <NAME>
* Dev: November 2009, January 2010
* Version 1.0
*/
#include "ogm_ltras.h"
static int LtrasTrfAllocModule(struct og_ctrl_ltras *ctrl_ltras, struct og_ltr... |
fake-name/ReadableWebProxy | WebMirror/management/rss_parser_funcs/feed_parse_extractYorasuNovels.py | <filename>WebMirror/management/rss_parser_funcs/feed_parse_extractYorasuNovels.py
def extractYorasuNovels(item):
"""
Parser for 'Yorasu Novels'
"""
vol, chp, frag, postfix = extractVolChapterFragmentPostfix(item['title'])
if not (chp or vol) or 'preview' in item['title'].lower():
return None
if 'Fallen God Reco... |
damienfamed75/gowall | cmd/gowall/schemaAdmin.go | <filename>cmd/gowall/schemaAdmin.go
package main
import (
"encoding/json"
"github.com/gin-gonic/gin"
"gopkg.in/mgo.v2"
"gopkg.in/mgo.v2/bson"
"time"
)
type Admin struct {
ID bson.ObjectId `bson:"_id,omitempty" json:"_id"`
User struct {
ID bson.ObjectId `bson:"id,omitempty" json:"id"`
... |
kindlychung/mediasoup-sfu-cpp | deps/boost/include/boost/predef/language/cuda.h | /*
Copyright <NAME> 2018
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)
*/
#ifndef BOOST_PREDEF_LANGUAGE_CUDA_H
#define BOOST_PREDEF_LANGUAGE_CUDA_H
#include <boost/predef/version_number.h>
#include <boost/p... |
torodb/mongowp | server/src/main/java/com/torodb/mongowp/server/wp/NettyMongoServer.java | <reponame>torodb/mongowp<filename>server/src/main/java/com/torodb/mongowp/server/wp/NettyMongoServer.java<gh_stars>10-100
/*
* Copyright 2014 8Kdata Technology
*
* 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 c... |
mariannehagaseth/CreationToolEcompliance | fixture/src/main/java/org/isisaddons/wicket/summernote/fixture/dom/regulation/FreeText.java | <filename>fixture/src/main/java/org/isisaddons/wicket/summernote/fixture/dom/regulation/FreeText.java
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright owner... |
zhxie/Takos | src/models/Player.js | import Base from './Base';
import { Gear } from './Gear';
import Salmoniod from './Salmoniod';
import { Weapon } from './Weapon';
class Species {
constructor(name, value) {
this.name = name;
this.value = value;
}
static parse = (name) => {
switch (name) {
case 'inklings':
return Specie... |
subchen/go-stack | data/query.go | <filename>data/query.go
package data
import (
"fmt"
"strconv"
"strings"
"github.com/subchen/go-stack/conv"
"github.com/subchen/go-stack/scanner/splitattrs"
)
type Query struct {
data interface{}
}
var emptyValue = &conv.Value{nil}
func NewQuery(data interface{}) *Query {
return &Query{data}
}
func (q *Quer... |
DariosDjimado/Marvel-Search-Engine | src/main/java/fr/tse/fise2/heapoverflow/events/RequestListener.java | <reponame>DariosDjimado/Marvel-Search-Engine
package fr.tse.fise2.heapoverflow.events;
import fr.tse.fise2.heapoverflow.interfaces.IRequestListener;
import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;
public class RequestListener {
private final IRequest... |
Havoc-OS/androidprebuilts_go_linux-x86 | src/cmd/go/testdata/src/badc/x.c | <filename>src/cmd/go/testdata/src/badc/x.c
// C code!
|
RubenPX/django-orchestra | orchestra/contrib/saas/validators.py | <reponame>RubenPX/django-orchestra
from django.core.exceptions import ValidationError
from django.utils.translation import ugettext_lazy as _
from orchestra.utils.apps import isinstalled
def validate_website_saas_directives(app):
def validator(enabled, app=app):
if enabled and isinstalled('orchestra.cont... |
domin1101/ANNHelper | src/LightBulbApp/TrainingPlans/Preferences/PredefinedPreferenceGroups/Evolution/ConstantCreationCommandPreferenceGroup.cpp | <reponame>domin1101/ANNHelper
// Includes
#include "LightBulbApp/TrainingPlans/Preferences/PredefinedPreferenceGroups/Evolution/ConstantCreationCommandPreferenceGroup.hpp"
#include "LightBulbApp/TrainingPlans/Preferences/IntegerPreference.hpp"
#include "LightBulb/Learning/Evolution/ConstantCreationCommand.hpp"
names... |
lalyos/kotlin | idea/tests/org/jetbrains/jet/plugin/refactoring/rename/RenameInKotlinTest.java | /*
* Copyright 2010-2012 JetBrains s.r.o.
*
* 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 agre... |
2637309949/dolphin | examples/aisle/types/android_hotfix.auto.go | // Code generated by dol build. DO NOT EDIT.
// source: auto.go
package types
import (
"encoding/json"
"github.com/2637309949/dolphin/packages/null"
)
// AndroidHotfix defined
type AndroidHotfix struct {
// AHId defined
AHId null.Int `xorm:"int(11) pk notnull autoincr 'a_h_id'" json:"a_h_id" form:"a_h_id" xml:"... |
Roberto-Mota/CursoemVideo | exercicios/ex115.py | # Desafio 115 -> Crie um pequeno sistema modularizado que permita cadastrar pessoas pelo seu nome
# e idade em um arquivo de texto simples.
# O sistema só vai ter 2 opções: cadastrar uma nova pessoa e listar todas as pessoas cadastradas
from utilidades import dados
from utilidades impor... |
TengChongChong/easy-frame | easy-sample/src/main/webapp/static/modular/sample/export/data/list.js | <reponame>TengChongChong/easy-frame<filename>easy-sample/src/main/webapp/static/modular/sample/export/data/list.js
//== 数据导出示例
var mExportDataList = function () {
/**
* 初始化列表
*/
var initTable = function () {
var options = {
// 列配置
columns: [
{
... |
mantianxing246/angli | src/api/order/FinancialAudit/FormalOrderAudit.js | <reponame>mantianxing246/angli
import request from '@/utils/request'
// 正式订单查询回显
export function findProductByOrder(orderId) {
return request({
url: 'formal-order-auditing/findFormalOrderByOrderId/' + orderId,
method: 'get'
})
}
|
retrodaredevil/allwpilib | hal/src/main/native/sim/jni/RoboRioDataJNI.cpp | /*----------------------------------------------------------------------------*/
/* Copyright (c) 2018 FIRST. All Rights Reserved. */
/* Open Source Software - may be modified and shared by FRC teams. The code */
/* must be accompanied by the FIRST BSD license file in the root directory of... |
beehive-lab/DFLOW | on-board/src/can_module/messages/tpm_module_message.cpp | <reponame>beehive-lab/DFLOW<filename>on-board/src/can_module/messages/tpm_module_message.cpp
//Author: <NAME>
#include "tpm_module_message.hpp"
void TPMModuleMessage::set_from_map(std::map<std::string,std::string> value_map)
{
TPMModuleMessage::data.tyre_pressure_front = std::stod(value_map["TyrePressureFront"]);
... |
Xiaoxiong-Liu/gluon-ts | test/model/deepvar_hierarchical/test_reconciliation_error.py | # Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License").
# You may not use this file except in compliance with the License.
# A copy of the License is located at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# or in the "license... |
woshiluo/oi | cf/contest/1334/c/c.cpp | // Woshiluo<<EMAIL>>
// Started at 2020-04-10 23:17
// Blog: https://blog.woshiluo.com
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
template<class T>
T Min( T a, T b ) { return a < b? a: b; }
template<class T>
T Max( T a, T b ) { return a > b? a: b; }
template<class T>
void chk_Min( ... |
SIGBlockchain/project_aurum | internal/publickey/publickey_test.go | package publickey
import (
"crypto/ecdsa"
"crypto/elliptic"
"crypto/rand"
"crypto/x509"
"encoding/hex"
"encoding/pem"
"reflect"
"testing"
"github.com/SIGBlockchain/project_aurum/internal/hashing"
)
func TestNew(t *testing.T) {
private, _ := ecdsa.GenerateKey(elliptic.P256(), rand.Reader)
k, ok := private... |
kipiberbatov/idec | src/algebra/vector_sparse_fscan_raw.c | <filename>src/algebra/vector_sparse_fscan_raw.c
#include <errno.h>
#include <stdlib.h>
#include "double.h"
#include "int.h"
#include "vector_sparse_private.h"
static int all_values_in_range(
int a_length, int a_nonzero_max, const int * a_positions)
{
int i;
for (i = 0; i < a_nonzero_max; ++i)
if (a_positi... |
sdgcpae/Hybris_DevOps | bin/custom/training/trainingfulfilmentprocess/testsrc/com/hybris/training/fulfilmentprocess/test/beans/QueueServiceImpl.java | <filename>bin/custom/training/trainingfulfilmentprocess/testsrc/com/hybris/training/fulfilmentprocess/test/beans/QueueServiceImpl.java
/*
* Copyright (c) 2019 SAP SE or an SAP affiliate company. All rights reserved.
*/
package com.hybris.training.fulfilmentprocess.test.beans;
/**
*
*/
public class Queu... |
owynrichen/animalpants | FootGame/EnvironmentRepository.h | //
// Environment.h
// FootGame
//
// Created by <NAME> on 7/2/12.
// Copyright (c) 2012 __MyCompanyName__. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "Environment.h"
#import "BaseRepository.h"
@interface EnvironmentRepository : BaseRepository
@property (nonatomic, readonly) NSMutableDicti... |
sinmetal/angular_study | vendor/github.com/favclip/qbg/misc/fixture/c/model.go | //go:generate qbg -output model_query.go .
package c
import "time"
// +qbg
type Sample struct {
ID int64 `goon:"id"`
CreatedAt time.Time `datastore:",noindex"`
}
|
lyfls/mallplus | mall-portal/src/main/java/com/zscat/mallplus/util/JedisUtil.java | //
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//
package com.zscat.mallplus.util;
import org.apache.commons.lang.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import redis.clients.jedis.Jedis;
import redis.clients.jedis.JedisPool;
import... |
razyer/MyJavaDesignPattern | src/abstractfactory/NYPizzaIngredientFactory.java | package abstractfactory;
public class NYPizzaIngredientFactory implements PizzaIngredientFactory {
@Override
public Dough createDough() {
return new NYDough();
}
@Override
public Sauce createSauce() {
return new NYSauce();
}
}
|
smolnar82/cloudbreak | mock-infrastructure/src/generated/com/sequenceiq/mock/swagger/model/ApiActivityStatus.java | package com.sequenceiq.mock.swagger.model;
import java.util.Objects;
import io.swagger.annotations.ApiModel;
import com.fasterxml.jackson.annotation.JsonValue;
import org.springframework.validation.annotation.Validated;
import javax.validation.Valid;
import javax.validation.constraints.*;
import com.fasterxml.jackson... |
masud-technope/ACER-Replication-Package-ASE2017 | corpus/class/ecf/2266.java | <reponame>masud-technope/ACER-Replication-Package-ASE2017
/****************************************************************************
* Copyright (c) 2008 Composent, Inc. and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public Licens... |
Dbevan/SunderingShadows | d/atoyatl/tecqumin/mons/tabaxi_explorer.c | //Coded by Lujke
#include <std.h>
#include "../tecqumin.h"
#define EYECOLOUR ({"%^BOLD%^%^GREEN%^green%^RESET%^",\
"%^BOLD%^%^YELLOW%^yellow%^RESET%^"})
inherit MOB + "tabaxi";
int eyecolour;
void create()
{
object ob;
::create();
set_name("tabaxi");
set_id(({"tabaxi", ... |
CheyenneForbes/crate | enterprise/users/src/main/java/io/crate/plugin/AuthenticationModule.java | <reponame>CheyenneForbes/crate
/*
* This file is part of a module with proprietary Enterprise Features.
*
* Licensed to Crate.io Inc. ("Crate.io") under one or more contributor
* license agreements. See the NOTICE file distributed with this work for
* additional information regarding copyright ownership.
*
* Un... |
gmlueck/llvm-test-suite | SingleSource/Regression/C/gcc-c-torture/execute/pr28865.c | struct A { int a; char b[]; };
union B { struct A a; char b[sizeof (struct A) + 31]; };
union B b = { { 1, "123456789012345678901234567890" } };
union B c = { { 2, "123456789012345678901234567890" } };
__attribute__((noinline, noclone)) void
foo (int *x[2])
{
x[0] = &b.a.a;
x[1] = &c.a.a;
}
int
main ()
{
int *x... |
epfml/pax | pax/utils/__init__.py | <reponame>epfml/pax
from .call_stack import CallStack
|
padorang684/swc | crates/swc_ecma_minifier/tests/fixture/projects/underscore/3/input.js | _.max = function (obj, iterator, context) {
if (
!iterator &&
_.isArray(obj) &&
obj[0] === +obj[0] &&
obj.length < 65535
) {
return Math.max.apply(Math, obj);
}
if (!iterator && _.isEmpty(obj)) return -Infinity;
var result = { computed: -Infinity, value: -Infi... |
MobButcher/Charm | src/main/java/svenhjol/charm/module/automatic_recipe_unlock/AutomaticRecipeUnlock.java | package svenhjol.charm.module.automatic_recipe_unlock;
import net.fabricmc.fabric.api.event.lifecycle.v1.ServerEntityEvents;
import net.minecraft.server.level.ServerLevel;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.item.crafting.Recipe;
import ... |
JiiHu/potentiaali | src/pages/SubjectsPage.js | import React from "react";
import { Physics } from "./subjects/Physics";
import { Geophysics } from "./subjects/Geophysics";
import { Meteorology } from "./subjects/Meteorology";
import { Geology } from "./subjects/Geology";
import { Geography } from "./subjects/Geography";
import { Astronomy } from "./subjects/Astrono... |
omerson-cruz/pollen | src/util/abbreviateNumber.test.js | import abbreviateNumber from './abbreviateNumber';
describe('abbreviateNumber', () => {
test('returns a string of a number that is less than 1000', () => {
expect(abbreviateNumber(999)).toEqual('999');
});
test('abbreviates 1000 to 1k', () => {
expect(abbreviateNumber(1000)).toEqual('1K');
});
test('... |
mapleque/cell | client/html/src/pages/components/Contributor.js | import React, { Component } from 'react'
import { Tag, Icon } from 'antd'
class Index extends Component {
constructor(props) {
super(props)
this.state = {}
}
render() {
return (
<a href={`https://github.com/${this.props.name}`}>
<Tag>
<Icon type='github'/>
<span sty... |
cschreib/cobalt | common-netcom/include/shared_collection.hpp | #ifndef SHARED_COLLECTION_HPP
#define SHARED_COLLECTION_HPP
#include <scoped_connection_pool.hpp>
#include <sorted_vector.hpp>
#include "netcom_base.hpp"
using shared_collection_id_t = std::uint16_t;
namespace request {
NETCOM_PACKET(observe_shared_collection) {
shared_collection_id_t id;
struct ... |
alphagov-mirror/content-audit-tool | spec/domain/audits/filter_spec.rb | <reponame>alphagov-mirror/content-audit-tool
module Audits
RSpec.describe Filter do
it { is_expected.to respond_to(:after) }
it { is_expected.to respond_to(:allocated_to) }
it { is_expected.to respond_to(:audit_status) }
it { is_expected.to respond_to(:document_type) }
it { is_expected.to respond_... |
google-ar/chromium | ios/chrome/browser/metrics/ios_chrome_origins_seen_service_factory.cc | <gh_stars>100-1000
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "ios/chrome/browser/metrics/ios_chrome_origins_seen_service_factory.h"
#include "base/memory/ptr_util.h"
#include "base/memor... |
chunkyguy/hideous-engine | HideousGameEngine/src/UI/Sprite.cpp | <gh_stars>1-10
//
// Sprite.cpp
// HideousGameEngine
//
// Created by Sid on 20/06/13.
// Copyright (c) 2013 whackylabs. All rights reserved.
//
#include <he/UI/Sprite.h>
#include <he/Animation/AnimationLoop.h>
#include <he/Animation/SpriteAnimation.h>
#include <he/Animation/AnimationUtils.h>
#include <he/RenderOb... |
zhengweiye/zwyyf | netdisk-service-provider/src/main/java/com/micro/websocket/Message.java | <filename>netdisk-service-provider/src/main/java/com/micro/websocket/Message.java
package com.micro.websocket;
import java.io.Serializable;
import lombok.Data;
@Data
public class Message implements Serializable{
private Integer type;//0容量,1通知
private Object data;
private Integer count;
}
|
sushantsahu1987/qr-password-generator | app/src/main/java/com/tachyonic/qrpassword/ui/register/RegisterPresenter.java | package com.tachyonic.qrpassword.ui.register;
/**
* Created by ssahu on 3/27/2015.
*/
public interface RegisterPresenter {
}
|
ylil93/ydk-go | ydk/models/cisco_ios_xe/tunnel_mib/tunnel_mib.go | <gh_stars>0
// The MIB module for management of IP Tunnels,
// independent of the specific encapsulation scheme in
// use.
//
// Copyright (C) The Internet Society (2005). This
// version of this MIB module is part of RFC 4087; see
// the RFC itself for full legal notices.
package tunnel_mib
import (
"fmt"
... |
Trilligy/runelite | runescape-client/src/main/java/ClientPreferences.java | <reponame>Trilligy/runelite<gh_stars>0
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.Map.Entry;
import net.runelite.mapping.Export;
import net.runelite.mapping.Implements;
import net.runelite.mapping.ObfuscatedGetter;
import net.runelite.mapping.ObfuscatedName;
import net.runelite.m... |
SirSkaro/pokeapi-reactor | src/main/java/skaro/pokeapi/PokeApiReactorNonCachingConfiguration.java | package skaro.pokeapi;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
import skaro.pokeapi.client.PokeApiClient;
import skaro.pokeapi.client.PokeApiEntityFactory;
import skaro.pokeapi.client.Reactiv... |
epion-tropic-test-tool/epion-t3-core | src/main/java/com/epion_t3/core/flow/runner/impl/AbstractSimpleIterateFlowRunner.java | /* Copyright (c) 2017-2021 <NAME>. */
package com.epion_t3.core.flow.runner.impl;
import com.epion_t3.core.common.bean.ExecuteFlow;
import com.epion_t3.core.common.bean.ExecuteScenario;
import com.epion_t3.core.common.bean.scenario.Flow;
import com.epion_t3.core.common.bean.scenario.HasChildrenFlow;
import com.epion_t... |
Starorbit723/cms | webapps/ROOT/WEB-INF/classes/statics/js/modules/meeting/vtalk_list.js | <filename>webapps/ROOT/WEB-INF/classes/statics/js/modules/meeting/vtalk_list.js
var vm = new Vue({
el: '#vtalk_list',
data () {
var validateUrl = (rule, value, callback) => {
var urlReg = /http(s)?:\/\/([\w-]+\.)+[\w-]+(\/[\w- .\/?%&=]*)?/;
if (value =='') {
callb... |
GabrielAmare/Darts | venv/Lib/site-packages/tools37/actions/Insert.py | from .Action import Action
class Insert(Action):
def __init__(self, obj: list, index: int, item: object):
super().__init__()
self.obj = obj
self.index = index
self.item = item
def do(self) -> None:
self.obj.insert(self.index, self.item)
def undo(self) -> None:
... |
StarkillerX42/stui | TUI/Inst/Guide/GuideStateWdg.py | <filename>TUI/Inst/Guide/GuideStateWdg.py
#!/usr/bin/env python
"""Guide status widget
History:
2011-06-13 ROwen Extracted from GuideWdg and expanded to include CCD temperature.
2011-07-12 ROwen Show guide and exposure state in color to indicate severity.
The only "normal" guide state is "on"... |
NCIEVS/nci-report-writer-sparql | core/src/main/java/gov/nih/nci/evs/reportwriter/core/util/SPARQLQueryRunner.java | <filename>core/src/main/java/gov/nih/nci/evs/reportwriter/core/util/SPARQLQueryRunner.java
import gov.nih.nci.evs.reportwriter.core.util.*;
import java.nio.charset.Charset;
import java.time.Duration;
import java.io.*;
import java.util.*;
import java.net.*;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
impo... |
mortezaalizadeh/topicctl | cmd/topicctl/subcmd/reset.go | <filename>cmd/topicctl/subcmd/reset.go
package subcmd
import (
"context"
"errors"
"fmt"
"github.com/segmentio/topicctl/pkg/apply"
"github.com/segmentio/topicctl/pkg/cli"
"github.com/segmentio/topicctl/pkg/groups"
log "github.com/sirupsen/logrus"
"github.com/spf13/cobra"
)
var resetOffsetsCmd = &cobra.Command... |
stauntonknight/algorithm | gcj/4284486/a/a.cc | <filename>gcj/4284486/a/a.cc
#include <iostream>
using namespace std;
int getNum(long long i, int target) {
if (i <= 1) return 0;
long long numDig = (1ll << target) - 1;
if (i == numDig / 2 + 1) {
return 0;
} else if (i <= numDig / 2) {
return getNum(i, target - 1);
} else {
... |
tas9n/OpenSiv3D | Siv3D/src/Siv3D-Platform/macOS/Siv3D/AudioFormat/MP3/MP3Decoder.cpp | //-----------------------------------------------
//
// This file is part of the Siv3D Engine.
//
// Copyright (c) 2008-2022 <NAME>
// Copyright (c) 2016-2022 OpenSiv3D Project
//
// Licensed under the MIT License.
//
//-----------------------------------------------
# include <Siv3D/AudioFormat/MP3Decoder.hpp>
# incl... |
jkomoros/boardgame | boardgame-util/cmd_db_version.go | <reponame>jkomoros/boardgame
package main
import (
"fmt"
"strconv"
"github.com/bobziuchkovski/writ"
)
type dbVersion struct {
baseSubCommand
}
func (d *dbVersion) Name() string {
return "version"
}
func (d *dbVersion) Description() string {
return "Print what version of the migrations have been applied to db... |
Redchards/AutoMark | tests/cadrage/CadrageTest.java | <gh_stars>0
import com.auto.mark.annotation.MarkedTest;
import static org.junit.Assert.assertEquals;
import up5.cadrage.Cadrage;
/**
* Unit test for Cadrage
*/
public class CadrageTest
{
@MarkedTest(value = 3.0)
public static void cadrerAGaucheTest( ) {
assertEquals("azertxxxxx",new Cadrage('x').cadrerAG... |
yurinogueira/EterniaServer | src/main/java/br/com/eterniaserver/eterniaserver/modules/Constants.java | <filename>src/main/java/br/com/eterniaserver/eterniaserver/modules/Constants.java
package br.com.eterniaserver.eterniaserver.modules;
import java.io.File;
public class Constants {
public static final String DATA_LAYER_FOLDER_PATH = "plugins" + File.separator + "EterniaServer";
public static final String MAIN... |
barboras7/drools | kie-dmn/kie-dmn-feel/src/test/java/org/kie/dmn/feel/parser/feel11/FEELParserTest.java | /*
* Copyright 2016 Red Hat, Inc. and/or its affiliates.
*
* 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 a... |
mostafa-arshadi/aiotdlib | aiotdlib/api/types/message_position.py | # =============================================================================== #
# #
# This file has been generated automatically!! Do not change this manually! #
# ... |
dangkiet000/LoNhiet | MyLib/inc/Fls.h | <reponame>dangkiet000/LoNhiet
/*******************************************************************************
* @file DataFlash.h
* @version V1.00
* $Revision: 1 $
* $Date: 31/12/2016 11:47p $
* @brief Data Flash driver source file
*
* @note
* Copyright (C) 2016 DangKiet Technology Corp. All rights res... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.