repo_name stringlengths 6 101 | path stringlengths 4 300 | text stringlengths 7 1.31M |
|---|---|---|
olivierlemasle/cloudstack | framework/quota/src/main/java/org/apache/cloudstack/quota/dao/QuotaEmailTemplatesDaoImpl.java | <reponame>olivierlemasle/cloudstack<gh_stars>1000+
//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 ownership. The ASF licenses this file
//to you under the Apache Li... |
CDAGaming/TC_Research | src/main/java/thaumcraft/common/lib/research/theorycraft/CardCelestial.java | <filename>src/main/java/thaumcraft/common/lib/research/theorycraft/CardCelestial.java
package thaumcraft.common.lib.research.theorycraft;
import net.minecraft.nbt.*;
import net.minecraft.entity.player.*;
import thaumcraft.api.research.theorycraft.*;
import net.minecraft.util.math.*;
import java.util.*;
import net.mine... |
momokapapa/hanakapapa | libraries/utilities/include/enumivo/utilities/exception_macros.hpp | <reponame>momokapapa/hanakapapa
/**
* @file
* @copyright defined in enumivo/LICENSE.txt
*/
#define ENU_ASSERT( expr, exc_type, FORMAT, ... ) \
FC_MULTILINE_MACRO_BEGIN \
if( !(expr) ) \
FC_THRO... |
talsewell/cerberus | tests/csmith/small_arrays/csmith_30.c | <filename>tests/csmith/small_arrays/csmith_30.c
// Options: --no-pointers --no-structs --no-unions --argc --no-bitfields --checksum --comma-operators --compound-assignment --concise --consts --divs --embedded-assigns --pre-incr-operator --pre-decr-operator --post-incr-operator --post-decr-operator --unary-plus-operat... |
IHTSDO/snow-owl | dependencies/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/GetRemoteSessionsRequest.java | /*
* Copyright (c) 2004 - 2012 <NAME> (Berlin, Germany) and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
*... |
FANsZL/hive | ql/src/test/org/apache/hadoop/hive/ql/exec/util/rowobjects/RowTestObjectsMultiSet.java | <filename>ql/src/test/org/apache/hadoop/hive/ql/exec/util/rowobjects/RowTestObjectsMultiSet.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 ownership. Th... |
Astroray073/Feth | app/src/main/java/com/kyigames/feth/utils/ResourceUtils.java | package com.kyigames.feth.utils;
import android.content.Context;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.content.res.Resources;
import com.kyigames.feth.R;
import java.util.List;
import java.util.StringJoiner;
public class ResourceUtils
{
private static fi... |
AmdPathirana/autoaid-front | src/components/Atoms/SelectedSevicesSVAD.js | import React from 'react'
export default function SelectedSevicesSVAD(props) {
return (
<div>
<div className="text-black font-primary font-medium text-2xl flex flex-row justify-center">
{props.heading1}
</div>
<div className="text-gray-500 font-primary f... |
JakMobius/zeta_path_tracer | src/collections/materials/utils_header.h | #ifndef MATERIALS_UTILS_HEADER_H
#define MATERIALS_UTILS_HEADER_H
#include "material/material.h"
#include "hits/hit_record.h"
#include "color/texture.h"
#include "../textures/Textures.h"
#endif // MATERIALS_UTILS_HEADER_H
|
BlueRidgeLabs/patterns | app/controllers/budgets_controller.rb | <gh_stars>1-10
# frozen_string_literal: true
class BudgetsController < ApplicationController
before_action :admin_needed
before_action :set_budget, only: %i[show edit update destroy]
before_action :check_transaction_type, only: :create_transaction
# GET /budgets
# GET /budgets.json
def index
@budgets ... |
laggingreflex/sicksync | test/local/fs-helper.mspec.js | import _ from 'lodash';
import { expect } from 'chai';
import proxyquire from 'proxyquire';
import chokidarStub from '../stubs/chokidar';
import fsStub from '../stubs/fs';
const { FSHelper } = proxyquire('../../src/local/fs-helper', {
chokidar: chokidarStub,
fs: fsStub,
});
const config = {
sourceLocation: 'my... |
nomad-coe/electronic-parsers | tests/test_dmol3parser.py | <filename>tests/test_dmol3parser.py<gh_stars>0
#
# Copyright The NOMAD Authors.
#
# This file is part of NOMAD. See https://nomad-lab.eu for further info.
#
# 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... |
dotzero/habrahabr-api-python | examples/company.py | <filename>examples/company.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import logging
import habrahabr
logging.basicConfig(
level=logging.INFO,
format='%(levelname)-8s %(asctime)s - %(message)s'
)
auth = habrahabr.Auth(client="000000.00000000", token="<PASSWORD>")
api = habrahabr.Api(auth)
try:
pos... |
jtejido/golucene | core/search/similarities/bm25.go | <gh_stars>0
package similarities
import (
"fmt"
"github.com/jtejido/golucene/core/codec/spi"
"github.com/jtejido/golucene/core/index"
"github.com/jtejido/golucene/core/search"
"github.com/jtejido/golucene/core/util"
"math"
)
var _ Similarity = (*BM25Similarity)(nil)
const (
DEFAULT_K1 float32 = 1.2
DEFAULT_B... |
zhaozengj/ICRA2020-JLU-TARS_GO-Navigation | roborts_detection/armor_detection/proto/armor_detection.pb.cc | // Generated by the protocol buffer compiler. DO NOT EDIT!
// source: armor_detection.proto
#define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION
#include "armor_detection.pb.h"
#include <algorithm>
#include <google/protobuf/stubs/common.h>
#include <google/protobuf/stubs/once.h>
#include <google/protobuf/io/coded_s... |
avlo/wasp | packages/util/auth/auth.go | package auth
import (
"fmt"
"github.com/labstack/echo/v4"
"github.com/labstack/echo/v4/middleware"
)
func AddAuthentication(e *echo.Echo, config map[string]string) {
if len(config) == 0 {
return
}
scheme, ok := config["scheme"]
if !ok {
return
}
switch scheme {
case "basic":
addBasicAuth(e, config["u... |
internaru/Pinetree_P | lsp_shiloh/common/nvram/src/nvram_dev_shim.h | <filename>lsp_shiloh/common/nvram/src/nvram_dev_shim.h
/*
* ============================================================================
* Copyright (c) 2008-2010 Marvell International, Ltd. All Rights Reserved
*
* Marvell Confidential
* =====================================================... |
Adikteev/cuttle | flow/src/main/scala/com/criteo/cuttle/flow/Database.scala | package com.criteo.cuttle.flow
import com.criteo.cuttle._
import java.time._
import scala.concurrent.duration.Duration
import cats.Applicative
import cats.data.{EitherT, OptionT}
import cats.implicits._
import io.circe._
import io.circe.generic.auto._
import io.circe.syntax._
import doobie._
import doobie.implicits._... |
RatJuggler/led-shim-effects | tests/test_effect_controller.py | <gh_stars>1-10
from unittest import TestCase
from unittest.mock import patch
from testfixtures import LogCapture
from ledshimdemo.canvas import Canvas
import ledshimdemo.configure_logging as cl
from ledshimdemo.effect_controller import EffectController
from tests.test_effects.dummy1_effect import Dummy1Effect
from te... |
Quizine/Quizine | databaseSeedScripts/orderSeedScript.js | <filename>databaseSeedScripts/orderSeedScript.js
/* eslint-disable max-statements */
const {normalDistributionFunc} = require('./utilities')
//DATABASE SEED SCRIPT VARIABLES:
const orderNumber = 10000
//for seeding waiters
let server = [
{id: 1, name: '<NAME>', sex: 'male', age: 27, restaurantId: 1},
{id: 2, name... |
ChDragon/Summer | src/test/java/com/swingfrog/summer/test/repository/TestRepositoryBootstrap.java | package com.swingfrog.summer.test.repository;
import com.swingfrog.summer.app.Summer;
import com.swingfrog.summer.app.SummerApp;
import com.swingfrog.summer.app.SummerConfig;
import lombok.extern.slf4j.Slf4j;
@Slf4j
public class TestRepositoryBootstrap implements SummerApp {
@Override
public void init() {
... |
retrohacker/FunctionScript | tests/files/cases/function_invalid_multiple_schema_nested.js | <filename>tests/files/cases/function_invalid_multiple_schema_nested.js
/**
* Accepts multiple schemas for an object
* @param {object} fileOrFolder
* @ {string} name
* @ {number} size
* @ OR
* @ {string} name2
* @ {number} size2
* @ {object} props
* @ {string} label
* @ OR
* @ {number} size
* @returns {object}
*/
mo... |
thesourcestory/Core | src/main/java/realtech/items/components/Resistor.java | package realtech.items.components;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.NonNullList;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import realtech.init.Realtech;
... |
AlpineNow/PluginSDK | plugin-core/src/main/scala/com/alpine/plugin/core/io/HdfsTabularDataset.scala | /**
* COPYRIGHT (C) 2015 Alpine Data Labs Inc. All Rights Reserved.
*/
package com.alpine.plugin.core.io
import com.alpine.plugin.core.annotation.AlpineSdkApi
/**
* :: AlpineSdkApi ::
* Tabular dataset refers to table format datasets, such as CSV/TSV
* Parquet/Avro, etc. that reside within Hdfs.
*/
@Alpi... |
norbekaiser/yatbcpp-macos | src/types_fromJson/PhotoSize_fromJson.cc | ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// From JSON Specialication //
//////////////////////////////////////////////////////////////////////////////... |
0xflotus/csscritic | test/specs/regressionSpec.js | describe("Regression testing", function () {
"use strict";
var regression, rendererBackend, imagediff;
var util = csscriticLib.util();
var pageImage, referenceImage, viewport;
var setUpRenderedImage = function (image, errors) {
errors = errors || [];
rendererBackend.render.and.re... |
bazaarvoice/cloudbreak | cloud-api/src/main/java/com/sequenceiq/cloudbreak/cloud/model/VmTypeMeta.java | <reponame>bazaarvoice/cloudbreak
package com.sequenceiq.cloudbreak.cloud.model;
import java.util.HashMap;
import java.util.Map;
public class VmTypeMeta {
public static final String CPU = "Cpu";
public static final String MEMORY = "Memory";
public static final String MAXIMUM_PERSISTENT_DISKS_SIZE_GB = "... |
sillyhong/whongjiagou-learn | 41.redux/src/redux/bindActionCreators.js | <gh_stars>1-10
export default function bindActionCreators(actions,dispatch){
let newActions = {};
for(let attr in actions){
newActions[attr] = function(){
dispatch(actions[attr].apply(null,arguments));
}
}
return newActions;
} |
AndreasKaratzas/stonne | pytorch-frontend/test/cpp/jit/test_interpreter.cpp | <reponame>AndreasKaratzas/stonne<filename>pytorch-frontend/test/cpp/jit/test_interpreter.cpp
#include "test/cpp/jit/test_base.h"
#include "test/cpp/jit/test_utils.h"
#include <stdexcept>
namespace torch {
namespace jit {
void testTypeCheck() {
{
auto graph = std::make_shared<Graph>();
std::unordered_map<std... |
pass-by-value/salt | salt/states/pagerduty_escalation_policy.py | # -*- coding: utf-8 -*-
'''
Manage PagerDuty escalation policies.
Schedules and users can be referenced by pagerduty ID, or by name, or by email address.
For example:
.. code-block:: yaml
ensure test escalation policy:
pagerduty_escalation_policy.present:
- name: bruce test escalation polic... |
witquicked/fetlife-android | FetLife/fetlife/src/main/java/com/bitlove/fetlife/view/adapter/GroupsRecyclerAdapter.java | <gh_stars>100-1000
package com.bitlove.fetlife.view.adapter;
import android.os.Handler;
import android.os.Looper;
import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import com.bitlove.fetlife.R;
import com.bitlove... |
tomhel/AoC_2019 | 2021/day7/1.py | <reponame>tomhel/AoC_2019
def load():
with open("input") as f:
return [int(x) for x in f.read().strip().split(",")]
def align_crabs():
crabs = load()
min_fuel = None
for pos in range(min(crabs), max(crabs) + 1):
fuel = sum(abs(c - pos) for c in crabs)
min_fuel = fuel if min_fu... |
narenarjun/learn-scala | book-code/src/script/scala/progscala3/contexts/GivenImports.scala | // tag::O1[]
// src/script/scala/progscala3/contexts/GivenImports.scala
object O1:
val name = "O1"
def m(s: String) = s"$s, hello from $name"
class C1
class C2
given c1: C1 = C1()
given c2: C2 = C2()
// end::O1[]
// tag::imports[]
import O1.* // Import everything EXCEPT the givens, c1 and c2
i... |
lakeslove/springSourceCodeTest | spring-jms/src/main/java/org/springframework/jms/annotation/package-info.java | <filename>spring-jms/src/main/java/org/springframework/jms/annotation/package-info.java
/**
* Annotations and support classes for declarative JMS listener endpoints.
*/
package org.springframework.jms.annotation;
|
SchrodingersCat00/frontend-rdfa-editor-demo | node_modules/ember-source/dist/dependencies/@glimmer/encoder.js | <gh_stars>0
class InstructionEncoder {
constructor(buffer) {
this.buffer = buffer;
this.typePos = 0;
this.size = 0;
}
encode(type, machine) {
if (type > 255
/* TYPE_SIZE */
) {
throw new Error(`Opcode type over 8-bits. Got ${type}.`);
}
this.buffer.push(type | machine |... |
opensha/opensha-svn-archive | dev/scratch/martinez/util/Ss2009Tester.java | <filename>dev/scratch/martinez/util/Ss2009Tester.java
package scratch.martinez.util;
import org.opensha.commons.data.function.ArbitrarilyDiscretizedFunc;
import org.opensha.nshmp.sha.calc.SsS1Calculator;
import org.opensha.nshmp.util.GlobalConstants;
public class Ss2009Tester {
//------------------------------------... |
cocoatomo/asakusafw | mapreduce/compiler/core/src/main/java/com/asakusafw/compiler/flow/stage/CompiledReduce.java | <gh_stars>0
/**
* Copyright 2011-2017 Asakusa Framework Team.
*
* 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 b... |
WooDzu/PhalconEye | public/external/pydio/plugins/access.ajxp_user/class.UserProfileEditor.js | /*
* Copyright 2007-2013 <NAME> - Abstrium SAS <team (at) pyd.io>
* This file is part of Pydio.
*
* Pydio is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at... |
DeltaV235/Learning-notes | 18-springboot/tutorial/spring-boot-04-web-war/src/test/java/com/wuyue/springboot04webwar/SpringBoot04WebWarApplicationTests.java | <gh_stars>0
package com.wuyue.springboot04webwar;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
@SpringBootTest
class SpringBoot04WebWarApplicationTests {
@Test
void contextLoads() {
}
}
|
a4-data/a4-UI-EXT | packages/ext-web-components-kitchensink/src/view/d3/hierarchy/pack/PackComponent.js | import './PackComponent.html';
export default class PackComponent {
onTooltip = (component, tooltip, node) => {
const record = node.data,
size = record.get('size'),
n = record.childNodes.length;
let html = '<span style="font-weight: bold">' + record.get('text') + '</span><br... |
pricetula/react-coolcat | src/common/api/post/user.js | /* eslint-disable import/no-extraneous-dependencies */
import Promise from 'promise';
import axiosInstance from '../instance';
export const postUserSignin = (
{
email,
password,
},
) => new Promise(
(
resolve,
reject,
) => {
axiosInstance.post(
'/user/signin',
{
email,
... |
HIOTio/original_HIOT | platform/server/routes/sensor_types.js | <gh_stars>0
var express = require('express')
var router = express.Router()
var sensorTypesController = require('../controllers/sensor_types')
router.get('/', sensorTypesController.sensor_types_list)
router.get('/:id', sensorTypesController.sensor_types_detail)
router.post('/', sensorTypesController.sensor_types_create)... |
abel-navarro/midonet | brain/midonet-brain/src/main/java/org/midonet/brain/southbound/vtep/VtepMAC.java | /*
* Copyright 2014 Midokura SARL
*
* 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 t... |
pbaun/rere | modules/sasl/src/main/scala/rere/sasl/util/SafeString.scala | package rere.sasl.util
import scala.annotation.switch
/**
* String without ',' that can be safely sent as value in attr-val pair
*/
sealed trait SafeString
/**
* Escaped string without ',' and NUL. ',' and '=' replaced with "=2C" and "=3D".
* @param str - representation
*/
final class EscapedString private... |
mrfengyong/code-set | src/main/java/com/feyon/codeset/exception/CodeSetException.java | package com.feyon.codeset.exception;
/**
* @author <NAME>
*/
public class CodeSetException extends RuntimeException {
public CodeSetException() {
}
public CodeSetException(String message) {
super(message);
}
public CodeSetException(String message, Throwable cause) {
super(messa... |
penghaiYin/bm-work-2020 | server/src/main/java/edp/core/utils/DateUtils.java | <reponame>penghaiYin/bm-work-2020
package edp.core.utils;
import com.alibaba.druid.util.StringUtils;
import org.joda.time.DateTime;
import java.sql.Timestamp;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public ... |
AbhinavMehrotra/SenSocial-Library | SenSocial/src/com/ubhave/sensocial/manager/Stream.java | /*******************************************************************************
*
* SenSocial Middleware
*
* Copyright (c) ${2014}, University of Birmingham
* <NAME>, <EMAIL>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided th... |
r3c/tesca | src/provision/reader/line/csv.hpp |
#ifndef __TESCA_PROVISION_READER_LINE_CSV_HPP
#define __TESCA_PROVISION_READER_LINE_CSV_HPP
#include <cstdlib>
#include <functional>
#include <vector>
#include "../../../storage/config.hpp"
#include "../../row/array.hpp"
#include "../../lookup.hpp"
#include "../line.hpp"
namespace Tesca
{
namespace Provision
{
c... |
ericatsydney/mybabyjournal | resources/assets/js/components/app/NavigationMenu.js | <filename>resources/assets/js/components/app/NavigationMenu.js
import React, { Component } from 'react'
import { Link } from 'react-router'
class NavMenu extends Component {
render() {
return (
<div className="nav-menu">
<Link className="brand-logo" to="#">My Baby Journal</Link>
<Link to="#... |
jdacosta/remindme | gulpfile.js/tasks/clean.js | <gh_stars>0
var del = require('del');
var gulp = require('gulp');
var config = require('../config');
var icons = require('../config/icons');
gulp.task('clean', function (callback) {
del([
config.publicDirectory,
config.serverDirectory,
icons.sassDest
], callback);
});
|
nightskylark/DevExtreme | js/viz/docs/docpiechartseries.js | /**
* @name dxPieChartSeriesTypes
* @publicName dxPieChartSeriesTypes
* @type object
*/
/**
* @name dxPieChartSeriesTypes_CommonPieChartSeries
* @publicName CommonPieChartSeries
* @type object
* @hidden
*/
var commonPieChartSeries = {
/**
* @name dxPieChartSeriesTypes_CommonPieChartSeries_color
* @publicNam... |
KittyMcMitty/spiritumDuoDocker | pseudotie/src/placeholder_data/__init__.py | from .placeholder_data import getTestResultFromCharacteristics
|
eventstorm-projects/eventstorm | eventstorm-sql-spring/src/test/java/eu/eventstorm/sql/spring/ex001/AbstractStudentRepository.java | <reponame>eventstorm-projects/eventstorm
package eu.eventstorm.sql.spring.ex001;
import static eu.eventstorm.sql.expression.Expressions.eq;
import static eu.eventstorm.sql.spring.ex001.StudentDescriptor.ALL;
import static eu.eventstorm.sql.spring.ex001.StudentDescriptor.CODE;
import static eu.eventstorm.sql.sprin... |
Naotsun19B/PulldownBuilder | Plugins/PulldownBuilder/Source/PulldownBuilder/Private/PulldownBuilder/RowNameUpdaters/BlueprintUpdater.cpp | <filename>Plugins/PulldownBuilder/Source/PulldownBuilder/Private/PulldownBuilder/RowNameUpdaters/BlueprintUpdater.cpp
// Copyright 2021 Naotsun. All Rights Reserved.
#include "PulldownBuilder/RowNameUpdaters/BlueprintUpdater.h"
#include "PulldownBuilder/Assets/PulldownContents.h"
#include "PulldownBuilder/Utilities/Pu... |
netSensTeam/netSens | agent/app/listener/filequeue.py | import threading
import time
class FileQueue:
def __init__(self, env):
if env.mode == "live":
self.queue = []
self.lock = threading.Lock()
elif env.mode == "test":
self.queue = env.test_file
self.env = env
def enqueue(self, item):
if self.... |
atship/FinalBurn-X | Core/burn/drv/sms/sms.h | extern UINT8 SMSPaletteRecalc;
extern UINT8 SMSReset;
extern UINT8 MastInput[2];
extern UINT8 SMSDips[3];
extern UINT8 SMSJoy1[12];
INT32 SMSGetZipName(char** pszName, UINT32 i);
INT32 SMSInit();
INT32 SMSExit();
INT32 SMSDraw();
INT32 SMSFrame();
INT32 SMSScan(INT32 nAction, INT32 *pnMin);
|
timfel/netbeans | java/java.editor/test/qa-functional/data/projects/java_editor_test/src/org/netbeans/test/java/editor/smart_bracket/JavaSmartBracketTest/testComment.java | <gh_stars>1000+
package org.netbeans.test.java.editor.smart_bracket.JavaSmartBracketTest;
public class testComment {
public void test() {
if (true) { // line-comment
}
} |
mattp94/johnny-five | eg/imu-lsm303c.js | const {Board, IMU} = require("../");
const board = new Board();
board.on("ready", () => {
// Hookup Guide
// https://learn.sparkfun.com/tutorials/lsm303c-6dof-hookup-guide#hardware-assembly
//
// Basically uses I2C, so only 4 pins are needed:
// VCC --> VDD
// GND --> GND
// SCL --> SCL
// SDA --> SDA... |
Oracle-Exam-Preparation/OCP | src/main/java/com/trl/theoreticalKnowledge/nestedClass/innerClass/initialization/b/b1/Example.java | package com.trl.theoreticalKnowledge.nestedClass.innerClass.initialization.b.b1;
import java.util.Objects;
public class Example {
public static void main(String[] args) {
Human human = new Human("Sapiens");
Human.Arm arm_1 = human.new Arm("right");
Human.Arm arm_2 = human.new Arm("left");
... |
thefourtheye/elasticsearch-client | elasticsearch-client-jts-jdk5/src/main/java/com/vividsolutions/jtsexample/io/gml2/KMLReaderExample.java | package com.vividsolutions.jtsexample.io.gml2;
import com.vividsolutions.jts.geom.*;
import com.vividsolutions.jts.io.gml2.*;
import java.util.*;
import java.io.*;
import org.xml.sax.*;
import org.xml.sax.helpers.DefaultHandler;
import org.xml.sax.helpers.XMLReaderFactory;
/**
* An example of using the {@... |
ets-mlb/emissary | src/main/java/emissary/kff/ChecksumCalculator.java | <reponame>ets-mlb/emissary<filename>src/main/java/emissary/kff/ChecksumCalculator.java
package emissary.kff;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.zip.CRC32;
/**
* ChecksumCal... |
xsky-storage/go-sdk | dp_site_resp.go | <reponame>xsky-storage/go-sdk<filename>dp_site_resp.go
/*
* XMS API
*
* XMS is the controller of distributed storage system
*
* API version: SDS_4.2.000.0.200302
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package xmsclient
type DpSiteResp struct {
// data protecti... |
PathVisio/pathvisio4 | org.pathvisio.desktop/src/test/java/org/pathvisio/desktop/debug/TestAndMeasure.java | /*******************************************************************************
* PathVisio, a tool for data visualization and analysis using biological pathways
* Copyright 2006-2021 BiGCaT Bioinformatics, WikiPathways
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this fi... |
fanhubgt/StreamEPS | core/src/test/java/org/streameps/test/EngineTestWithCassandra.java | /*
* ====================================================================
* StreamEPS Platform
*
* (C) Copyright 2011.
*
* Distributed under the Modified BSD License.
* Copyright notice: The copyright for this software and a full listing
* of individual contributors are as shown in the packaged copyright... |
arista-eosplus/puppet-eos | lib/puppet/type/eos_ospf_instance.rb | <reponame>arista-eosplus/puppet-eos<filename>lib/puppet/type/eos_ospf_instance.rb
#
# Copyright (c) 2014, Arista Networks, 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:
#
# Redistributio... |
manu-ki/sechub | sechub-integrationtest/src/main/java/com/daimler/sechub/integrationtest/internal/IntegrationTestExampleConstants.java | // SPDX-License-Identifier: MIT
package com.daimler.sechub.integrationtest.internal;
public class IntegrationTestExampleConstants {
public static final String EXAMPLE_CONTENT_ROOT_PATH = "sechub-integrationtest/build/sechub/example/content/";
}
|
duartegroup/cgbind | examples/ex9_adding_substrates_from_files.py | <filename>examples/ex9_adding_substrates_from_files.py
from cgbind import Cage, Substrate, Linker, CageSubstrateComplex
# Generate an M4L6 bipyridyl Fe(III) based metallocage
linker = Linker(name='linker',
smiles='C1(C2=CC=C(C#CC3=CN=C(C4=NC=CC=C4)C=C3)C=N2)=NC=CC=C1',
arch_name='m4l6n'... |
umjammer/vavi-nio-file-discutils | src/main/java/DiscUtils/Iscsi/Session.java | <filename>src/main/java/DiscUtils/Iscsi/Session.java
//
// Copyright (c) 2008-2011, <NAME>
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the "Software"),
// to deal in the Software without restriction, including without limitat... |
Azquelt/cdi-tck | impl/src/main/java/org/jboss/cdi/tck/tests/definition/stereotype/priority/PriorityStereotype.java | package org.jboss.cdi.tck.tests.definition.stereotype.priority;
import jakarta.annotation.Priority;
import jakarta.enterprise.inject.Stereotype;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* Simp... |
Maledictus/leechcraft | src/plugins/azoth/msgformatterwidget.h | /**********************************************************************
* LeechCraft - modular cross-platform feature rich internet client.
* Copyright (C) 2006-2014 <NAME>
*
* Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE or copy at https://www.boost.org/LICENSE_1_0.... |
agaveplatform/science-apis | agave-uuids/uuids-api/src/main/java/org/iplantc/service/uuid/resource/impl/AbstractUuidResource.java | <filename>agave-uuids/uuids-api/src/main/java/org/iplantc/service/uuid/resource/impl/AbstractUuidResource.java
package org.iplantc.service.uuid.resource.impl;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.node.ObjectNode;
impor... |
threefishes/springCloudMainService | cloud-api/src/main/java/cn/threefishes/cloudapi/config/hikari/DBProperties.java | package cn.threefishes.cloudapi.config.hikari;
import com.zaxxer.hikari.HikariDataSource;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;
@Component
@ConfigurationProperties(prefix = "hikari")
public class DBProperties {
private... |
VT-Visionarium/osnap | src/main/java/x3d/model/Background.java | <filename>src/main/java/x3d/model/Background.java
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the sour... |
keithliam/bayung-angeles-website | src/pages/Landing/QuoteSection.js | import React, { useEffect, useRef, useState } from 'react';
import { CSSTransition } from 'react-transition-group';
import Img from 'react-cool-img';
import classNames from 'classnames';
import logoBlue from '../../assets/images/ba-logo-blue.png';
import { registerScrollResizeEventListeners } from '../../helpers';
con... |
mattweldon/indie-ui | app/components/indie-button.js | <reponame>mattweldon/indie-ui<filename>app/components/indie-button.js
export { default } from 'indie-ui/components/indie-button'; |
FrolovOlegVladimirovich/job4j | chess/src/main/java/ru/job4j/chess/figures/black/BishopBlack.java | <reponame>FrolovOlegVladimirovich/job4j
package ru.job4j.chess.figures.black;
import ru.job4j.chess.figures.Bishop;
import ru.job4j.chess.figures.Cell;
import ru.job4j.chess.figures.Figure;
/**
* Фигура "Черный слон".
*
* @author <NAME> (<EMAIL>)
* @version $Id$
* @since 27.06.2019
*/
public class BishopBlack e... |
Switch-Mexico/switch | src/imports/ui/components/Navigation/Dropdown.js | <gh_stars>1-10
import { NavLink } from 'react-router-dom';
import { push as MenuContainer } from 'react-burger-menu';
import { Menu, Dropdown, Label, Header } from 'semantic-ui-react';
import 'semantic-ui-css/semantic.min.css';
const HeaderBar = ({ actions }) =>
<Menu.Menu position="right">
<Dropdown item icon="... |
dounine/clouddisk | src/main/java/com/dounine/clouddisk360/store/BasicCookieStore3.java | package com.dounine.clouddisk360.store;
import java.util.Date;
public class BasicCookieStore3 {
private Date creationDate;
private String domain;
private Date expiryDate;
private String name;
private String path;
private Boolean persistent;
private Boolean secure;
private String value;
private Integer versi... |
cmlimm/uni-projects | C-Course/Workshops/HW4/concatstring.c | <gh_stars>0
#include <stdio.h>
#include <stdlib.h>
int len(char *str){
int len = 0;
while (str[len] != '\0'){
len += 1;
}
return len;
}
char *concat_string(char *str1, char *str2){
int n1 = len(str1);
int n2 = len(str2);
int i;
char *concat = malloc(n1 + n2);
for (i = 0; i... |
FeodorFitsner/learning_computer-science | src/InterviewBit/src/Courses/Programming/Level2_Math/Examples/VerifyPrime/Java/Solution.java | package InterviewBit.src.Courses.Programming.Level2_Math.Examples.VerifyPrime.Java;
public class Solution {
public static void main(String[] args) {
int result = isPrime(10);
System.out.println(result);
}
public static int isPrime(int A) {
if (A == 1) {
return 0;
... |
sockduct/Hackerrank | Python/arrayhg.py | def hglist(arr):
size = 6
hgres = []
for row in range(size - 2):
for col in range(size - 2):
hgres.append(sum(arr[row][col:col + 3]) + arr[row + 1][col + 1] +
sum(arr[row + 2][col:col + 3]))
return hgres
def arrstr(arr, colwidth=3):
size = 6
res =... |
ctishen/LuatOS | bsp/air001/impl/luat_gpio_air001.c |
#include "luat_vdev_gpio.h"
#include "luat_gpio.h"
int luat_vdev_gpio_init(void) {
return 0;
}
void luat_gpio_mode(int pin, int mode, int pull, int initOutput) {
}
int luat_gpio_setup(luat_gpio_t* gpio) {
return -1;
}
int luat_gpio_set(int pin, int level) {
return -1;
}
int luat_gpio_get(int pin) {
... |
Toinounet21/crabalanchego | utils/crypto/secp256k1r.go | // Copyright (C) 2019-2021, <NAME>, Inc. All rights reserved.
// See the file LICENSE for licensing terms.
package crypto
import (
"bytes"
"errors"
"sort"
stdecdsa "crypto/ecdsa"
"github.com/decred/dcrd/dcrec/secp256k1/v3/ecdsa"
secp256k1 "github.com/decred/dcrd/dcrec/secp256k1/v3"
"github.com/Toinounet21/... |
fjfd/microscope | microscope-storage/src/main/java/net/opentsdb/stats/StatsCollector.java | <gh_stars>10-100
// This file is part of OpenTSDB.
// Copyright (C) 2010-2012 The OpenTSDB Authors.
//
// This program is free software: you can redistribute it and/or modify it
// under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 2.1 of the Licens... |
wzshare/Leetcode | easy/141_Linked_List_Cycle.cpp | <gh_stars>0
#include "../libstruct.h"
using namespace std;
/*
* NO.141
* Given a linked list, determine if it has a cycle in it.
*/
class Solution {
public:
bool hasCycle(ListNode *head) {
ListNode *fast = head, *slow = head;
while(fast) {
fast = fast->next;
if (fast &... |
mbarkley/jbpm-wb | jbpm-console-ng-human-tasks/jbpm-console-ng-human-tasks-backend/src/main/java/org/jbpm/console/ng/ht/backend/server/TaskLifeCycleServiceImpl.java | /*
* Copyright 2014 JBoss by Red Hat.
*
* 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... |
calcacuervo/drools | drools-compiler/src/main/java/org/drools/compiler/compiler/ResourceConversionResult.java | <filename>drools-compiler/src/main/java/org/drools/compiler/compiler/ResourceConversionResult.java
/*
* Copyright 2015 JBoss by Red Hat
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
*
* http://www.apache.org/licenses/LIC... |
AriasBros/ember-material | addon/components/dialog.js | import Component from '@ember/component';
import { computed } from '@ember/object';
import { addListener, removeListener } from '@ember/object/events';
import { inject as service } from '@ember/service';
import { later } from '@ember/runloop';
import { tryInvoke } from '@ember/utils';
import { A } from '@ember/array';
... |
RobotLocomotion/drake-python3.7 | systems/primitives/integrator.h | #pragma once
#include "drake/common/drake_copyable.h"
#include "drake/systems/framework/context.h"
#include "drake/systems/framework/vector_system.h"
namespace drake {
namespace systems {
/// An integrator for a continuous vector input.
///
/// @tparam_default_scalar
/// @ingroup primitive_systems
template <typename... |
Andreas237/AndroidPolicyAutomation | ExtractedJars/RT_News_com.rt.mobile.english/javafiles/android/support/v4/media/session/MediaControllerCompat$TransportControls.java | // Decompiled by Jad v1.5.8g. Copyright 2001 <NAME>.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) annotate safe
package android.support.v4.media.session;
import android.net.Uri;
import android.os.Bundle;
import android.support.v4.media.RatingCompat;
// Referenced classes of ... |
jimmccusker/callimachus | test/org/callimachusproject/server/SPARQLEndPointTest.java | /*
* Copyright (c) 2013 3 Round Stones Inc., Some Rights Reserved
*
* 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 requir... |
ypiel-talend/components | components/components-processing/processing-runtime/src/main/java/org/talend/components/processing/runtime/typeconverter/TypeConverterFunction.java | package org.talend.components.processing.runtime.typeconverter;
import java.util.Stack;
import org.apache.avro.Schema;
import org.apache.avro.generic.GenericRecordBuilder;
import org.apache.avro.generic.IndexedRecord;
import org.talend.components.api.component.runtime.RuntimableRuntime;
import org.talend.components.a... |
godnoTA/acm.bsu.by | 2. Рекуррентные соотношения/0.3. Порядок перемножения матриц #3537/[OK]172039.java | <reponame>godnoTA/acm.bsu.by
import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.PrintWriter;
public class Priority {
final static String filename = "input.txt";
static File fin = new File(filename);
... |
glenga/c_programming_a_modern_approach_2nd | chapter03/program/program3.1.c | <filename>chapter03/program/program3.1.c
#include <stdio.h>
int main(void) {
int month, day, year;
printf("Enter a date(mm/dd/yyyy): ");
scanf("%d /%d /%d", &month, &day, &year);
printf("You entered the date %.4d%.2d%2d", year, month, day);
return 0;
}
// Enter a date(mm/dd/yyyy): 2/17/2011
// You entered... |
aliyun/alibabacloud-cpp-sdk | config-20190108/include/alibabacloud/config_20190108.hpp | // This file is auto-generated, don't edit it. Thanks.
#ifndef ALIBABACLOUD_CONFIG20190108_H_
#define ALIBABACLOUD_CONFIG20190108_H_
#include <alibabacloud/open_api.hpp>
#include <boost/any.hpp>
#include <boost/throw_exception.hpp>
#include <darabonba/core.hpp>
#include <darabonba/util.hpp>
#include <iostream>
#inclu... |
wenfeifei/miniblink49 | third_party/WebKit/Source/core/inspector/InjectedScriptManager.cpp | <reponame>wenfeifei/miniblink49<filename>third_party/WebKit/Source/core/inspector/InjectedScriptManager.cpp<gh_stars>1000+
/*
* Copyright (C) 2007, 2008 Apple Inc. All rights reserved.
* Copyright (C) 2008 <NAME> <<EMAIL>>
* Copyright (C) 2012 Google Inc. All rights reserved.
*
* Redistribution and use in source a... |
neoguru/axboot-origin | ax-boot-core/src/main/java/com/chequer/axboot/core/converter/BaseConverter.java | <reponame>neoguru/axboot-origin
package com.chequer.axboot.core.converter;
import com.chequer.axboot.core.utils.ModelMapperUtils;
import org.springframework.stereotype.Component;
import java.util.List;
import java.util.stream.Collectors;
@Component
public class BaseConverter {
public <T> List<T> convert(List<?>... |
xmar/pythran | pythran/pythonic/include/__builtin__/set/remove.hpp | #ifndef PYTHONIC_INCLUDE_BUILTIN_SET_REMOVE_HPP
#define PYTHONIC_INCLUDE_BUILTIN_SET_REMOVE_HPP
#include "pythonic/include/__dispatch__/remove.hpp"
#include "pythonic/include/utils/functor.hpp"
namespace pythonic
{
namespace __builtin__
{
namespace set
{
USING_FUNCTOR(remove, pythonic::__dispatch__:... |
electriccitizen/mlsa-calculator | src/components/MultiStepsLayout.js | <filename>src/components/MultiStepsLayout.js
import React from "react"
import { Link } from "gatsby"
import PropTypes from "prop-types"
import { useForm } from "@formiz/core"
import { PageLayout } from "../layout/PageLayout"
import { Box, Grid, Button, Stack } from "@chakra-ui/react"
import { CustomDrawer } from "./Uti... |
lee-dohm/hero-database | src/hero/characteristics-block.js | import HeroMath from './math'
import Model from './model'
/**
* A block that represents information on the characteristics of the character.
*
* The characteristics are each available as a property. The list of characteristics is available in
* `data/characteristics.json`.
*
* @hero 6E1 40 Characteristics
*/
ex... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.