repo_name
stringlengths
6
101
path
stringlengths
4
300
text
stringlengths
7
1.31M
guilhermejccavalcanti/orientdb
object/src/main/java/com/orientechnologies/orient/object/entity/OObjectEntityClassHandler.java
/* * * Copyright 2010-2016 OrientDB LTD (http://orientdb.com) * * 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 ...
davidmoser/Activiti
modules/activiti-camel/src/main/java/org/activiti/camel/ActivitiEndpoint.java
<gh_stars>1-10 /* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software...
npocmaka/Windows-Server-2003
base/cluster/mgmt/cluscfg/basecluster/cbaseclusteraddnode.h
<reponame>npocmaka/Windows-Server-2003 ////////////////////////////////////////////////////////////////////////////// // // Copyright (c) 2000 Microsoft Corporation // // Module Name: // CBaseClusterAddNode.h // // Description: // Header file for CBaseClusterAddNode class. // // The CBaseClu...
ematusov/mBaas-service
node_modules/fh-mbaas-api/node_modules/fh-security/node_modules/node-rsa/.tmp/speed.js
var NodeRSA = require('../src/NodeRSA'); var key = new NodeRSA({b:1024}, {environment: 'browser'}); var text = 'Hello RSA!'; var encrypted = key.encrypt(text, 'base64'); var decrypted = key.decrypt(encrypted, 'utf8'); console.log(decrypted); console.time('browser encrypt'); for(var i = 0; i < 100; i++) { ...
jaamal/overclocking
sources/Algorithms/src/patternMatching/fcpm/table/builder/APTableBuilderFactory.java
<reponame>jaamal/overclocking<filename>sources/Algorithms/src/patternMatching/fcpm/table/builder/APTableBuilderFactory.java package patternMatching.fcpm.table.builder; import patternMatching.fcpm.MultiThreadPatternMatchingContextFactory; import patternMatching.fcpm.MultiThreadWithSharedTablePatternMatchingContextFa...
jeozey/XmppServerTester
xmpp-core-client/src/main/java/rocks/xmpp/core/session/ReconnectionStrategy.java
/* * The MIT License (MIT) * * Copyright (c) 2014-2016 <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 limitation the rights * ...
jdleesmiller/twenty48
ext/twenty48/policy_writer.cxx
#include <string.h> #include <sstream> #include "policy_writer.hpp" namespace twenty48 { policy_writer_t::policy_writer_t(const char *pathname) : os(pathname, std::ios::out | std::ios::binary), data(0), offset(0) { } policy_writer_t::~policy_writer_t() { flush(); } void policy_writer_t::write(direction_t direc...
kaz-yamam0t0/php2javascript
test/strlen.test.js
<gh_stars>1-10 const {strlen} = require("../function/strlen.js"); test("test strlen()", ()=>{ expect(strlen("abcdef")).toStrictEqual(6) expect(strlen(" ab cd ")).toStrictEqual(7) expect(strlen("")).toStrictEqual(0) })
tbirdso/ITKUltrasound
include/itkBlockMatchingCosineInterpolationDisplacementCalculator.h
<gh_stars>10-100 /*========================================================================= * * Copyright NumFOCUS * * 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 * * htt...
peakforest/peakforest-webapp
src/main/webapp/resources/js/JSmol/j2s/java/lang/NoSuchMethodError.js
<gh_stars>100-1000 Clazz.load(["java.lang.IncompatibleClassChangeError"],"java.lang.NoSuchMethodError",null,function(){ c$=Clazz.declareType(java.lang,"NoSuchMethodError",IncompatibleClassChangeError); });
coderzzz/Shuangyin
iwen/iwen/Controllers/Login/Controller/RegistViewController.h
<reponame>coderzzz/Shuangyin<filename>iwen/iwen/Controllers/Login/Controller/RegistViewController.h // // RegistViewController.h // iwen // // Created by Interest on 15/10/9. // Copyright (c) 2015年 Interest. All rights reserved. // #import <UIKit/UIKit.h> @interface RegistViewController : BaseViewController @pro...
MXPOL/velo-external-db
packages/velo-external-db-core/test/drivers/date_time_provider_test_support.js
const current = new Date() const dateTime = { currentDateTime: () => current, } module.exports = dateTime
linuxlsx/Algo
src/main/java/org/linuxlsx/algo/leetcode/PartitionList.java
package org.linuxlsx.algo.leetcode; public class PartitionList { /** * 时间复杂度 O(n) * @param head * @param x * @return */ public ListNode partition(ListNode head, int x) { if (head == null || head.next == null) { return null; } ListNode swap = null;...
wangxs123/copy
hsweb-message/hsweb-message-api/src/main/java/org/hswebframework/web/message/support/simple/SimpleServiceInvokerMessage.java
<reponame>wangxs123/copy package org.hswebframework.web.message.support.simple; import org.hswebframework.web.message.support.ServiceInvokerMessage; import java.io.Serializable; /** * TODO 完成注释 * * @author zhouhao */ public class SimpleServiceInvokerMessage implements ServiceInvokerMessage { private String s...
TextC0de/pasapalabra
server/helpers/dates.js
export const getDiffInSeconds = (finalDate, initialDate) => (finalDate - initialDate) / 1000;
hackingbear/deeplearning4j
deeplearning4j-scaleout/deeplearning4j-nlp/src/main/java/org/deeplearning4j/text/sentenceiterator/LuceneSentenceIterator.java
package org.deeplearning4j.text.sentenceiterator; import org.apache.commons.compress.utils.IOUtils; import org.apache.lucene.document.Document; import org.apache.lucene.index.DirectoryReader; import org.apache.lucene.index.IndexReader; import org.apache.lucene.index.MultiFields; import org.apache.lucene.store.Director...
hiaux0/Coding-2
client/ListMapper/list-mapper/db.js
export default { "shortcuts": [ { "content": "C-a :", "position": 0 }, { "content": "C-b :", "position": 1 }, { "content": "C-c :", "position": 2 }, { "content": "C-d :", "position": 3 }, { "content": "C-e :", "position":...
pageinsec/security_content
bin/automated_detection_testing/ci/labeled_data/labeled_data.py
import sys import argparse import shutil import os from modules.github_service import GithubService from modules import aws_service, testing_service DT_ATTACK_RANGE_STATE_STORE = "dt-attack-range-tf-state-store" DT_ATTACK_RANGE_STATE = "dt-attack-range-state" REGION = "eu-central-1" NAME = "detection-testing-attack-...
embrosyn/ja2-stracciatella-mpslsm
Build/Tactical/Merc_Hiring.cc
#include "Font_Control.h" #include "Debug.h" #include "math.h" #include "MapScreen.h" #include "MessageBoxScreen.h" #include "WorldDef.h" #include "Assignments.h" #include "Soldier_Control.h" #include "Animation_Data.h" #include "Render_Fun.h" #include "Render_Dirty.h" #include "MouseSystem.h" #include "SysUtil.h" #inc...
Lucioric2000/jsorolla
src/core/webcomponents/individual/opencga-individual-inferred-sex-view.js
/** * Copyright 2015-2019 OpenCB * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to...
cjang/chai
jitast/TransMatmul.cpp
<gh_stars>10-100 // Copyright 2011 <NAME> (<EMAIL>) under The Artistic License 2.0 #include "AstMatmulVV.hpp" #include "AstMatmulVM.hpp" #include "AstMatmulMV.hpp" #include "AstMatmulMM.hpp" #include "TransMatmul.hpp" namespace chai_internal { //////////////////////////////////////// // dispatched operation BaseAst...
ajayns/zulip-mobile
src/nav/StreamTabs.js
/* @TODO flow */ import React from 'react'; import { Text } from 'react-native'; import { TabNavigator, TabBarTop } from 'react-navigation'; import { FormattedMessage } from 'react-intl'; import tabsOptions from '../styles/tabs'; import UnreadStreamsContainer from '../unread/UnreadStreamsContainer'; import Subscriptio...
lemkova/Yorozuya
YorozuyaGSLib/source/_talk_crystal_matrial_combine_nodeDetail.cpp
#include <_talk_crystal_matrial_combine_nodeDetail.hpp> #include <common/ATFCore.hpp> START_ATF_NAMESPACE namespace Detail { Info::_talk_crystal_matrial_combine_nodeConsume2_ptr _talk_crystal_matrial_combine_nodeConsume2_next(nullptr); Info::_talk_crystal_matrial_combine_nodeConsume2_clbk _tal...
bitbrain/v0id
core/src/de/bitbrain/v0id/core/WeaponTemplate.java
<reponame>bitbrain/v0id<gh_stars>0 package de.bitbrain.v0id.core; public class WeaponTemplate { public final BulletType type; public final String assetId; public final String soundId; public final String hitParticleEffectId; public final float frequency; public final float velocityX; public...
claytonv/xbox-live-api
Source/Services/Presence/device_presence_change_event_args.cpp
// Copyright (c) Microsoft Corporation // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "pch.h" #include "xsapi/presence.h" NAMESPACE_MICROSOFT_XBOX_SERVICES_PRESENCE_CPP_BEGIN device_presence_change_event_args::device_presence_change_event_args() : ...
huahang/incubator-nuttx
include/nuttx/symtab.h
/**************************************************************************** * include/nuttx/symtab.h * * Copyright (C) 2009, 2015 <NAME>. All rights reserved. * Author: <NAME> <<EMAIL>> * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the fo...
Hans-JakobHoltzTT/ecutest-plugin
src/main/java/de/tracetronic/jenkins/plugins/ecutest/wrapper/com/ETComException.java
<reponame>Hans-JakobHoltzTT/ecutest-plugin /* * Copyright (c) 2015-2019 TraceTronic GmbH * * SPDX-License-Identifier: BSD-3-Clause */ package de.tracetronic.jenkins.plugins.ecutest.wrapper.com; /** * Exception thrown if an error occurs while communicating with a COM instance. */ public class ETComException exten...
pulewicz/scala-commons
commons-core/src/test/scala/com/avsystem/commons/testutil/CompilationErrorAssertions.scala
<filename>commons-core/src/test/scala/com/avsystem/commons/testutil/CompilationErrorAssertions.scala package com.avsystem.commons package testutil import com.avsystem.commons.macros.TestMacros import org.scalatest.Assertions trait CompilationErrorAssertions extends Assertions { def typeErrorFor(code: String): Strin...
royalfx/ae_snippets
src/ae/app/as_getAeReleaseVersion.js
<reponame>royalfx/ae_snippets<filename>src/ae/app/as_getAeReleaseVersion.js // Copyright (c) 2021 <NAME> // This code is licensed under MIT license // See also http://www.opensource.org/licenses/mit-license.php /** * @version 1.0.1 * @date Oct 12 2019 * * @description Get AE release version * @param version {str...
beyondkqw/react-kqw
src/Component/GoodsDetails/GoodsPopup.js
import React, { Component } from 'react'; import '../../Stylesheets/App/goodsDetails.css'; import $ from 'jquery'; export default class GoodsPopup extends Component { // 构造 constructor(props) { super(props); // 初始状态 this.attrIds = [] this.risePrice=[]; this.state = { ...
chinmobi/gin-mvc
model/x/validator/userid.go
<reponame>chinmobi/gin-mvc<gh_stars>10-100 // Copyright 2020 <NAME>. All rights reserved. // Use of this source code is governed by a MIT style // license that can be found in the LICENSE file. package validator import ( "strconv" "unicode" ) func ParseUserID(s string) (uint32, bool) { for _, c := range s { if...
frisciliasultan/tp
src/main/java/seedu/iscam/logic/commands/AddMeetingCommand.java
<filename>src/main/java/seedu/iscam/logic/commands/AddMeetingCommand.java<gh_stars>0 package seedu.iscam.logic.commands; import static java.util.Objects.requireNonNull; import static seedu.iscam.logic.parser.CliSyntax.PREFIX_CLIENT; import static seedu.iscam.logic.parser.CliSyntax.PREFIX_DESCRIPTION; import static see...
atultherajput/evpoco
evnet/src/EVTCPServer.cpp
<reponame>atultherajput/evpoco<gh_stars>1-10 // // Library: evnet // Package: EVTCPServer // Module: EVTCPServer // // Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. // and Contributors. // // SPDX-License-Identifier: BSL-1.0 // #include <sys/time.h> #include <sys/socket.h> #include <ev.h> ...
YoufuLi/radlog
datalog/src/main/java/edu/ucla/cs/wis/bigdatalog/database/store/bplustree/BPlusTree.java
<filename>datalog/src/main/java/edu/ucla/cs/wis/bigdatalog/database/store/bplustree/BPlusTree.java package edu.ucla.cs.wis.bigdatalog.database.store.bplustree; import edu.ucla.cs.wis.bigdatalog.measurement.MemoryMeasurement; public interface BPlusTree { public int getNumberOfEntries(); public MemoryMeasurement ...
silver-snoopy/material-ui
packages/material-ui-icons/src/WbShade.js
<reponame>silver-snoopy/material-ui import * as React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon( <path d="M14 12v2.5l5.5 5.5H22zm0 8h3l-3-3zM8 4l-6 6h2v10h8V10h2L8 4zm1 10H7v-4h2v4z" /> , 'WbShade');
leapframework/framework
web/core/src/main/java/leap/web/format/HtmlFormat.java
<filename>web/core/src/main/java/leap/web/format/HtmlFormat.java /* * 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...
EricCharnesky/CIS2001-Winter2021
Project2/TransportMethod.py
class TransportMethod: def __init__(self, number, number_of_items_until_full, load_time_multiple=1): self.number = number self.number_of_items_until_full = number_of_items_until_full self.time_until_full = 0 self.current_number_of_items = 0 self.load_time_multiple = load_tim...
ferhatelmas/algo
leetCode/algorithms/medium/random_pick_index.py
<reponame>ferhatelmas/algo import random class Solution(object): def __init__(self, nums): self.nums = nums def pick(self, target): r, c = -1, 0 for i, e in enumerate(self.nums): if e == target: if random.randint(0, c) == 0: r = i ...
Martin-Seysen/mmgroup
src/mmgroup/generate_c/testcode.py
<filename>src/mmgroup/generate_c/testcode.py from generate_functions import UserDirective from make_c_tables import TableGenerator class TestGen: def add_to(x, expr): return "{x} = {x} + {expr};\n".format(x = x, expr = str(expr)) functions = { "AddTo": UserDirective(add_to, "si"), } ...
RIPBackdoored/Backdoored-1.7-Deobf-Source-Leak
backdoored/client/i/j/c/q.java
package l.c.i.j.c; import l.c.i.d.a; import net.minecraft.client.Minecraft; import net.minecraft.client.entity.EntityPlayerSP; import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.OpenGlHelper; import net.minecraft.client.renderer.RenderHelper; import net.minecraft.client.renderer....
itfuyun/learning-examples
common-example/src/main/java/org/example/common/handler/GlobalExceptionHandler.java
<gh_stars>1-10 package org.example.common.handler; import org.example.common.exception.BusinessException; import org.example.common.response.ResultEntity; import org.springframework.validation.BindException; import org.springframework.validation.BindingResult; import org.springframework.validation.FieldError; import o...
siaomingjeng/konga-test
assets/js/app/core/layout/03_layout-services.js
/** * This file contains all necessary Angular service definitions for 'frontend.core.layout' module. * * Note that this file should only contain services and nothing else. */ (function() { 'use strict'; // Generic service to return all available menu items for main level navigation. angular.module('frontend...
MrDDaye/cna_cp1855
final/final_part2/operations.py
"""Operations team manager program.""" from cli import display_lineup_header, display_player, display_player_position, display_player_stats, display_farewell, display_player_updated from inputs import get_lineup_number, get_string, get_position, get_int from baseball_stats import batting_average from files import...
zhanghqgit/joyrpc
joyrpc-core/src/main/java/io/joyrpc/cluster/event/ConfigEvent.java
package io.joyrpc.cluster.event; /*- * #%L * joyrpc * %% * Copyright (C) 2019 joyrpc.io * %% * 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/LI...
areese/jni_cleanup
src/main/java/yjava/jni/cleaner/DeallocatingClosedBase.java
<filename>src/main/java/yjava/jni/cleaner/DeallocatingClosedBase.java<gh_stars>0 /* Copyright 2015 Yahoo Inc. */ /* Licensed under the terms of the 3-Clause BSD license. See LICENSE file in the project root for details. */ package yjava.jni.cleaner; /** * This class takes advantage of the Cleaner API inside the GC ...
Tencao/ExNihiloCreatio
src/main/java/exnihilocreatio/compatibility/tconstruct/CompatTConstruct.java
package exnihilocreatio.compatibility.tconstruct; import exnihilocreatio.ModItems; import exnihilocreatio.config.ModConfig; import exnihilocreatio.items.ore.EnumOreSubtype; import exnihilocreatio.items.ore.ItemOre; import exnihilocreatio.registries.manager.ExNihiloRegistryManager; import net.minecraft.item.ItemStack; ...
demidenko05/beige-acc
src/main/java/org/beigesoft/acc/prc/InvLnSv.java
/* BSD 2-Clause License Copyright (c) 2019, Beigesoft™ 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 notice, this list of conditions...
bhutchinson/rice
rice-framework/krad-web-framework/src/main/java/org/kuali/rice/krad/uif/container/PageGroup.java
/** * Copyright 2005-2015 The Kuali Foundation * * Licensed under the Educational Community 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.opensource.org/licenses/ecl2.php * * Unless requ...
joetache4/project-euler
data/p079.py
def get_data(): return [ 319, 680, 180, 690, 129, 620, 762, 689, 762, 318, 368, 710, 720, 710, 629, 168, 160, 689, 716, 731, 736, 729, 316, 729, 729, 710, 769, 290, 719, 680, 318, 389, 162, 289, 162, 718, 729, 319, 790, 680, 890, 362, 319, 760, 316, 729, 380, 319, 728, ...
kkcookies99/UAST
Dataset/Leetcode/train/121/656.java
<filename>Dataset/Leetcode/train/121/656.java class Solution { public int XXX(int[] prices) { if (prices.length <= 1) { return 0; } int res = Integer.MIN_VALUE; int min = prices[0]; /* 本质上的意思是f(i) = max(当前价格 - 之前价格最小值,之前最大利润) */ for (int ...
ZRock-Application/ZROCK_APPLICATION_SCRIPTME
ZROCK_SCRIPTME/app/src/main/java/zrock/application/scriptme/ScriptMeActivity.java
<reponame>ZRock-Application/ZROCK_APPLICATION_SCRIPTME<gh_stars>0 package zrock.application.scriptme; import zrock.application.scriptme.R; import zrock.application.scriptme.activities.*; import zrock.application.scriptme.fragments.*; import zrock.application.scriptme.utils.Root; import zrock.application.engine.Engine;...
scbedd/azure-sdk-for-node
lib/services/logicManagement/lib/models/integrationAccountMapPropertiesParametersSchema.js
<filename>lib/services/logicManagement/lib/models/integrationAccountMapPropertiesParametersSchema.js /* * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for * license information. * * Code generated by Microsoft (R) AutoRest Code Gene...
lpezo/marca2
public/modules/clientes/controllers/clientes.client.controller.js
'use strict'; // Clientes controller angular.module('clientes').controller('ClientesController', ['$scope', '$stateParams', '$location', 'Authentication', 'Clientes', 'TableSettings', 'ClientesForm', function($scope, $stateParams, $location, Authentication, Clientes, TableSettings, ClientesForm ) { $scope.a...
HendryKaak/u8g2
tools/font/build/single_font_files/u8g2_font_crox2hb_tf.c
/* Fontname: -Cronyx-Helvetica-Bold-R-Normal--10-100-75-75-P-56-RAWIN-R Copyright: Copyright (C) 1990, 1991 EWT Consulting, Portions Copyright (C) 1994 Cronyx Ltd. Glyphs: 191/224 BBX Build Mode: 0 */ const uint8_t u8g2_font_crox2hb_tf[2616] U8G2_FONT_SECTION("u8g2_font_crox2hb_tf") = "\277\0\3\3\4\4\2\5\5\1...
komamj/Audient
storemusic/src/main/java/com/xinshang/store/playlist/ReasonDialogFragment.java
package com.xinshang.store.playlist; import android.os.Bundle; import android.support.annotation.NonNull; import android.support.v4.app.DialogFragment; import android.support.v4.app.FragmentManager; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.Progr...
rlgod/gallery
node_modules/babel-plugin-transform-cjs-system-require/test/fixtures/require-calls-only/options.js
module.exports = { mappedRequireName : '$__require' };
fajarutamaa/display-device
src/components/mixins/common.js
import { DateRangeTypes } from '../../constants/date' export function update() { const chart = this.$refs.chart.$refs.chart chart.clear() chart.showLoading() Promise.all([this.fetchData(), this.updateAnnotations()]).finally(() => { chart.hideLoading() chart.mergeOptions(this.chartOptions) }) } expo...
thiagoyoussef/registry
db/migrate/20150109081914_create_api_log_tables.rb
<filename>db/migrate/20150109081914_create_api_log_tables.rb class CreateApiLogTables < ActiveRecord::Migration[6.0] def connection ApiLog::Db.connection end def up # create_table :epp_logs do |t| # t.text :request # t.text :response # t.string :request_command # t.string :request...
MatrixTunnel/1.13-Command-API
1.13CommandAPI/src/io/github/jorelali/commandapi/api/arguments/SuggestedStringArgument.java
<reponame>MatrixTunnel/1.13-Command-API package io.github.jorelali.commandapi.api.arguments; import java.util.List; import com.mojang.brigadier.arguments.StringArgumentType; import io.github.jorelali.commandapi.api.CommandPermission; /** * Deprecated as of 1.9, due to implementation of OverrideableSuggestions. Use...
scibian/fmgui
src/com/intel/stl/ui/logger/config/LoggingInputValidator.java
/** * Copyright (c) 2015, Intel Corporation * * 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 notice, * this list of conditions and the...
karolciba/playground
probol/student.py
<gh_stars>0 #!/usr/bin/env python from prob import P from enum import Enum from decimal import Decimal class Difficulty(Enum): d0 = 0 d1 = 1 class Intelligence(Enum): i0 = 0 i1 = 1 class Grade(Enum): g1 = 1 g2 = 2 g3 = 3 class Sat(Enum): s0 = 0 s1 = 1 class Letter(Enum): l0...
Michelean/pandorajob
powerjob-server/powerjob-server-common/src/main/java/tech/powerjob/server/common/utils/ListUtils.java
package tech.powerjob.server.common.utils; import org.apache.commons.lang3.StringUtils; import java.util.*; import java.util.concurrent.ConcurrentHashMap; import java.util.function.BinaryOperator; import java.util.function.Function; import java.util.function.Predicate; import java.util.function.Supplier; import java....
Jwomers/trinity
eth2/beacon/state_machines/forks/serenity/epoch_processing.py
from typing import ( Iterable, Sequence, Tuple, ) from eth_utils import to_tuple from eth2.beacon import helpers from eth2._utils.numeric import ( is_power_of_two, ) from eth2._utils.tuple import ( update_tuple_item, ) from eth2.beacon.exceptions import ( NoWinningRootError, ) from eth2.beacon...
przemek83/data-explorer-go
internal/column_numeric.go
<filename>internal/column_numeric.go package internal // ColumnNumeric - numeric column struct. type ColumnNumeric struct { data []int } // GetType - get type of column. func (column *ColumnNumeric) GetType() ColumnType { return NumericColumn } // GetSize - Get number of elements in column. func (column *ColumnNum...
ExpandiumSAS/cxxutils
sources/libraries/cxxu/cxxu/daemon.cpp
<reponame>ExpandiumSAS/cxxutils #pragma GCC diagnostic ignored "-Wdeprecated-declarations" #include <stdlib.h> #include <unistd.h> #include <cxxu/daemon.hpp> #include <cxxu/logging.hpp> #include <cxxu/signaler.hpp> namespace cxxu { daemon::daemon(const std::string& name) : name_(name) {} daemon::~daemon() {} void...
KartikChugh/Jeras
src/kc/ml/jeras/_testing/InitializerTests.java
package kc.ml.jeras._testing; import kc.ml.jeras.architecture.Dense; import kc.ml.jeras.architecture.Input; import kc.ml.jeras.architecture.Sequential; import static kc.ml.jeras.initializers.Initializers.*; public class InitializerTests { public static void main(String[] args) { final long init = Syste...
xiang12835/mall-platform
mall-api/src/main/java/ltd/newbee/mall/service/impl/NewBeeMallUserAddressServiceImpl.java
/** * 严肃声明: * 开源版本请务必保留此注释头信息,若删除我方将保留所有法律责任追究! * 本软件已申请软件著作权,受国家版权局知识产权以及国家计算机软件著作权保护! * 可正常分享和学习源码,不得用于违法犯罪活动,违者必究! * Copyright (c) 2020 十三 all rights reserved. * 版权所有,侵权必究! */ package ltd.newbee.mall.service.impl; import ltd.newbee.mall.api.vo.NewBeeMallUserAddressVO; import ltd.newbee.mall.common.NewBeeMall...
ghuntley/COVIDSafe_1.0.11.apk
src/sources/rx/internal/operators/BlockingOperatorLatest.java
package rx.internal.operators; import java.util.Iterator; import java.util.NoSuchElementException; import java.util.concurrent.Semaphore; import java.util.concurrent.atomic.AtomicReference; import rx.Notification; import rx.Observable; import rx.Subscriber; import rx.exceptions.Exceptions; public final class Blocking...
AlCash07/ACTL
include/actl/operation/scalar/arithmetic/all.hpp
// Copyright 2021 <NAME>. // // Distributed under the Boost Software License, Version 1.0 // (see accompanying file LICENSE.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). #pragma once #include <actl/operation/scalar/arithmetic/add.hpp> #include <actl/operation/scalar/arithmetic/div.hpp> #include <actl/ope...
lemkova/Yorozuya
YorozuyaGSLib/source/CNationSettingFactoryGroupDetail.cpp
#include <CNationSettingFactoryGroupDetail.hpp> #include <common/ATFCore.hpp> START_ATF_NAMESPACE namespace Detail { Info::CNationSettingFactoryGroupctor_CNationSettingFactoryGroup2_ptr CNationSettingFactoryGroupctor_CNationSettingFactoryGroup2_next(nullptr); Info::CNationSettingFacto...
npocmaka/Windows-Server-2003
inetcore/mshtml/src/other/moniker/abtprot.cxx
<filename>inetcore/mshtml/src/other/moniker/abtprot.cxx //+--------------------------------------------------------------------------- // // Microsoft Forms // Copyright (C) Microsoft Corporation, 1996 // // File: abtprot.cxx // // Contents: Implementation of the about protocol // // History: 0...
weiss/original-bsd
sys/vax/if/ACC/driver/if_dda.c
<filename>sys/vax/if/ACC/driver/if_dda.c /*************************************************************************/ /* */ /* */ /* ________________________________________________________ */ /* / \ */ /* | AAA CCCCCCCCCCCCCC CCCCCCCCCCCCCC | */ /* | AAAAA CCCCCCC...
PrzemyslawMalinowski-epm/sample-repo-git-flow
test/transform/resource/after-ecj/EqualsAndHashCodeOfAndExclude.java
<filename>test/transform/resource/after-ecj/EqualsAndHashCodeOfAndExclude.java final @lombok.EqualsAndHashCode(of = {"x"}) class EqualsAndHashCodeOf { int x; int y; EqualsAndHashCodeOf() { super(); } public @java.lang.Override @java.lang.SuppressWarnings("all") boolean equals(final java.lang.Object o) { ...
mitchellolsthoorn/ASE-Technical-2021-api-linkage-replication
EvoMaster/client-java/instrumentation/src/test/java/org/evomaster/client/java/instrumentation/example/methodreplacement/strings/BranchCovSCTest.java
package org.evomaster.client.java.instrumentation.example.methodreplacement.strings; import com.foo.somedifferentpackage.examples.methodreplacement.strings.StringCallsImp; import org.evomaster.client.java.instrumentation.InstrumentingClassLoader; import org.evomaster.client.java.instrumentation.staticstate.ExecutionTr...
dolphinridercrypto/bxcommon
test/unit/models/test_node_model.py
<reponame>dolphinridercrypto/bxcommon<gh_stars>10-100 import unittest from bxcommon import constants from bxcommon.models.node_model import NodeModel from bxcommon.models.node_type import NodeType from bxcommon.utils import model_loader from bxutils.logging import log_config class TestNodeModel(unittest.TestCase): ...
wvffle/Ystring
src/Ystring/Encodings/Iso8859_15.cpp
<reponame>wvffle/Ystring<gh_stars>0 //**************************************************************************** // Copyright © 2015 <NAME>. All rights reserved. // Created by <NAME> on 2015-09-19. // // This file is distributed under the Simplified BSD License. // License text is included with the source distributio...
mcvine/mcvine
packages/mccomponents/tests/mccomponentsbpmodule/phonon/NdArray_TestCase.py
<reponame>mcvine/mcvine #!/usr/bin/env python # # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # # <NAME> # California Institute of Technology # (C) 2007 All Rights Reserved # # {LicenseText} # # ~~~~~~~~~~...
sinzlab/nntransfer
nntransfer/trainer/utils/loss.py
<reponame>sinzlab/nntransfer import math import torch from torch.nn import Module class CircularDistanceLoss(Module): def __init__(self, reduction: str = "mean") -> None: super(CircularDistanceLoss, self).__init__() self.reduction = reduction def forward(self, input, target): distanc...
ivayloivanof/CarWashSoftware
src/main/java/bg/car_wash/areas/role/entity/Role.java
package bg.car_wash.areas.role.entity; import org.springframework.security.core.GrantedAuthority; import javax.persistence.*; import javax.validation.constraints.Size; @Entity @Table(name = "roles") public class Role implements GrantedAuthority { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private lo...
jpetto/olympia
src/olympia/amo/signals.py
<reponame>jpetto/olympia import contextlib from django.db import models def flush_front_end_cache(sender, instance, **kwargs): from . import tasks furls = getattr(instance, 'flush_urls', None) urls = furls() if hasattr(furls, '__call__') else furls if urls: tasks.flush_front_end_cache_urls.a...
itsthejoker/filamentcolors.xyz
filamentcolors/migrations/0015_auto_20200327_0106.py
<reponame>itsthejoker/filamentcolors.xyz # Generated by Django 3.0.4 on 2020-03-27 01:06 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("filamentcolors", "0014_auto_20191219_0633"), ] operations = [ migrations.AddField( mode...
universekavish/Learning-Java
src/Polymorphism.java
// used classses are named like VehiclePm public class Polymorphism { public static void main(String[] args) { CarPm car = new CarPm(); BicyclePm bicycle = new BicyclePm(); BoatPm boat = new BoatPm(); VehiclePm[] racers = {car,bicycle,boat};// using polymorphism to create an array of diffeerent objects of c...
MaximilianLincks/LectureFeed
src/main/java/com/lecturefeed/repository/service/SessionDBService.java
<reponame>MaximilianLincks/LectureFeed package com.lecturefeed.repository.service; import com.lecturefeed.entity.model.Session; import com.lecturefeed.repository.SessionRepository; import org.springframework.stereotype.Service; import java.util.List; @Service public class SessionDBService extends AbstractService<Ses...
flashboss/rubia-forums
rubia-forums-jsf/src/test/java/it/vige/rubia/selenium/forum/model/Links.java
<reponame>flashboss/rubia-forums package it.vige.rubia.selenium.forum.model; import org.openqa.selenium.By; import static org.openqa.selenium.By.*; public enum Links { CATEGORY_TEMPLATE_LINK(xpath("//li[@class='first']/ul/li/a")), FORUM_TEMPLATE_LINK( xpath("//li[@class='first']/ul/li/ul/li/a")), TOPIC_TEMPLATE_L...
jurieo/tgo-cli
template/core/_tgo.js
<reponame>jurieo/tgo-cli /* * @Author: Jurieo * @Date: 2019-08-23 09:58:22 * @LastEditTime: 2019-08-23 09:59:01 * @Description: _tgo请求封装 */ const _tgo = {}; const md5 = require("md5"); _tgo.cardId = "template_ssr_frontend_lwox97wk2dqx"; _tgo.appKey = "99999999"; _tgo.SALIT = "COaFpf69BverHMdhVIBIOPMmwwnRwuxM"; _t...
filepicker/filestack-java
src/main/java/com/filestack/transforms/tasks/TornEdgesTask.java
package com.filestack.transforms.tasks; import com.filestack.transforms.ImageTransformTask; public class TornEdgesTask extends ImageTransformTask { // Constructor left public because this task can be used with default options public TornEdgesTask() { super("torn_edges"); } public static class Builder { ...
dHannasch/beluga
beluga/ivpsol/tests/test_ivpsol.py
<reponame>dHannasch/beluga<filename>beluga/ivpsol/tests/test_ivpsol.py<gh_stars>0 from beluga.ivpsol import Propagator, Trajectory, integrate_quads import numpy as np from math import * tol = 1e-3 def test_propagator_1(): k = [-0.5, -0.2] def odefn(x, p, const): return np.array([k[0]*x[0], k[1]*x[1]...
kdcsoftware/abu
packages/api-admin-access/tests/integration/access.spec.js
import { start, makeFakeEvent } from "helper"; import { handler as create } from "../../src/create"; import { handler as read } from "../../src/read"; import { handler as list } from "../../src/list"; import { handler as update } from "../../src/update"; import { handler as remove } from "../../src/delete"; import apiA...
lifeich1/play-cf
src/1070d/_io.cc
#include "type.h" #include <cstdio> using namespace std; _2018ICPC_NEERC_D_gardis_in_t in_; _2018ICPC_NEERC_D_gardis_out_t out_; void _get_input() { int n, k; scanf("%d%d", &n, &k); in_.n = n; in_.k = k; for (int i = 0; i < n; ++i) { scanf("%d", in_.a + i); } } void _print_output...
cuntoushifu/EWN
src/main/java/me/aichina/strategy/evaluation/RandomEvaluate.java
package me.aichina.strategy.evaluation; import java.util.Random; import me.aichina.board.ChessBoard; import me.aichina.board.PieceType; /** * 随机估值,返回随机数 * * @author 陆梦轩 * */ public class RandomEvaluate extends EvaluationFunction { /** * 构造函数,创建一个随机估值函数 */ public RandomEvaluate() { setLabel("RandomEva...
MC-JY/inception
inception/inception-api-annotation/src/main/java/de/tudarmstadt/ukp/clarin/webanno/api/annotation/paging/TokenWrappingPagingStrategy.java
/* * Licensed to the Technische Universität Darmstadt under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The Technische Universität Darmstadt * licenses this file to you under the Apache License, Versio...
antonmedv/year
packages/2018/08/20/index.js
module.exports = new Date(2018, 7, 20)
cg31/cule
cule/atari/games/timepilot.hpp
<gh_stars>100-1000 #pragma once #include <cule/config.hpp> #include <cule/atari/controller.hpp> #include <cule/atari/state.hpp> namespace cule { namespace atari { namespace games { namespace timepilot { template<typename State> CULE_ANNOTATION void reset(State& s) { s.m_reward = 0; s.m_score = 0; s.t...
pivotal-cf-experimental/gocd
tools/jruby/lib/ruby/gems/1.8/specifications/Antwrap-0.7.0-java.gemspec
<reponame>pivotal-cf-experimental/gocd # -*- encoding: utf-8 -*- Gem::Specification.new do |s| s.name = %q{Antwrap} s.version = "0.7.0" s.platform = %q{java} s.required_rubygems_version = nil if s.respond_to? :required_rubygems_version= s.authors = ["<NAME>"] s.cert_chain = nil s.date = %q{2008-02-16} ...
lioder/LampManager
ERPClient/src/main/java/blservice/salesblservice/SalesBLService.java
package blservice.salesblservice; import java.util.ArrayList; import util.BillState; import util.Level; import util.ResultMessage; import util.UserLimits; import vo.CustomerVO; import vo.GoodsItemVO; import vo.PromotionBargainVO; import vo.PromotionCustomerVO; import vo.PromotionTotalVO; import vo.PurchaseVO; import ...
mzmero/SnakeDesktop
src/main/java/com/neolumia/snake/model/QuestionLevel.java
package com.neolumia.snake.model; /** * This ENUM class represents the level of the game */ public enum QuestionLevel { ONE("1"), TWO("2"), THREE("3"); private String level; public String getLevel() { return this.level; } QuestionLevel(String level) { this.level = level; } }
wilebeast/FireFox-OS
B2G/hardware/ti/omap4xxx/libtiutils/Semaphore.cpp
/* * Copyright (C) Texas Instruments - http://www.ti.com/ * * 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 requ...
thinkthroughmath/status_site
spec/models/email_subcription_spec.rb
<reponame>thinkthroughmath/status_site require 'spec_helper' describe EmailSubscription do describe 'creating a subscription' do it "makes a valid new unconfirmed subscription" do subscription = EmailSubscription.new_unconfirmed_subscription('<EMAIL>') subscription.save.should == true end i...
lyy289065406/exp-libs-refactor
exp-libs-base/src/test/java/exp/libs/utils/other/ObjUtilsTest.java
package exp.libs.utils.other; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import java.util.HashMap; import java.util.Map; import static org.junit.jupiter.api.Assertions.*; class ObjUtilsTest { @BeforeEach public void setUp() throws Exc...
unsw-cse-soc/Data-curation-API
src/main/java/unsw/curation/api/linking/ConceptNet.java
<gh_stars>1-10 package unsw.curation.api.linking; import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.FileWriter; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.net.HttpURLConnection; import java.net.URL; import java.util.ArrayLi...