repo_name
stringlengths
6
101
path
stringlengths
4
300
text
stringlengths
7
1.31M
xpp011/tea-java
src/test/java/com/aliyun/tea/utils/IOUtilsTest.java
package com.aliyun.tea.utils; import org.junit.Assert; import org.junit.Test; import java.io.*; public class IOUtilsTest { @Test public void closeQuietlyTest() { byte[] source = {66, 99}; InputStream inputStream = new ByteArrayInputStream(source); try { IOUtils.closeQuiet...
eventide-project/consumer
lib/consumer/controls/consumer/error_handler.rb
<gh_stars>0 module Consumer module Controls module Consumer module ErrorHandler def self.example(category=nil) category ||= Category.example Example.new(category) end class Example include ::Consumer attr_accessor :handled_error at...
lmeysel/fa-compatible-icons
ion/trendingDownOutline.js
<filename>ion/trendingDownOutline.js 'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); var prefix = 'ion'; var iconName = 'trending-down-outline'; var width = 512; var height = 512; var ligatures = []; var unicode = null; var svgPathData = 'M 47.785156 128 A 16 16 0 0 0 36.685547 132.68555 A ...
jdmclark/gorc
src/game/world/events/landed.hpp
#pragma once #include "content/id.hpp" namespace gorc { namespace game { namespace world { namespace events { class landed { public: #include "landed.uid" thing_id thing; landed(thing_id thing); }; } } } }
ciena-frost/ember-frost-list
tests/integration/components/frost-list-item-content-test.js
/** * Integration test for the frost-list-item-content component */ import {expect} from 'chai' import Ember from 'ember' import {$hook, initialize as initializeHook} from 'ember-hook' import wait from 'ember-test-helpers/wait' import {registerMockComponent, unregisterMockComponent} from 'ember-test-utils/test-suppo...
06keito/study-atcoder
src/abc215_c.py
<reponame>06keito/study-atcoder import itertools def main(): S,K = input().split() tmp = list(set(itertools.permutations(list(S),len(S)))) array = [list(i) for i in tmp] array.sort() print("".join(array[int(K)-1])) if __name__ == '__main__': main()
sgholamian/log-aware-clone-detection
NLPCCd/Hive/1785_2.java
//,temp,sample_3421.java,2,17,temp,sample_1984.java,2,17 //,3 public class xxx { public void dummy_method(){ key.set(pos); pos++; Map<String, Object> record = iterator.next(); if ((record != null) && (!record.isEmpty())) { for (Entry<String, Object> entry : record.entrySet()) { value.put(new Text(entry.getKey()), entry...
sgammon/modeldemo
pipeline/src/main/java/io/momentum/demo/models/logic/service/transformers/RefSerializer.java
<gh_stars>0 package io.momentum.demo.models.logic.service.transformers; import com.google.api.server.spi.config.Transformer; import com.googlecode.objectify.Key; import com.googlecode.objectify.Ref; /** * Created by sam on 1/12/16. */ public final class RefSerializer implements Transformer<Ref, String> { @Overr...
swedenconnect/eidas-eu-mock
EIDAS-Sources-2.3.1-MDSL/EIDAS-Commons/src/main/java/eu/eidas/auth/commons/attribute/MemoryAttributeDefinitionDao.java
/* # Copyright (c) 2017 European Commission # Licensed under the EUPL, Version 1.2 or – as soon they will be # approved by the European Commission - subsequent versions of the # EUPL (the "Licence"); # You may not use this work except in compliance with the Licence. # You may obtain a copy of the ...
lifeibiren/Nut
syscall/sys_ioctl.c
<reponame>lifeibiren/Nut<gh_stars>1-10 #include <syscall.h> int sys_ioctl(int fd, int request) { fs_context_t *fs_context = get_fd_ptr(fd); if (fs_context == NULL) return -1; return fs_ioctl(fs_context, request); }
yacchin1205/RDM-modular-file-renderer
mfr/core/metrics.py
<reponame>yacchin1205/RDM-modular-file-renderer import copy def _merge_dicts(a, b, path=None): """"merges b into a Taken from: http://stackoverflow.com/a/7205107 """ if path is None: path = [] for key in b: if key in a: if isinstance(a[key], dict) and isinstance(b[key]...
niryarden/euler_project_solutions
solutions/euler5.py
# answer: 232792560 status = True num = 2520 answer = 0 while status: num = num + 20 # make a list of all the remainders of the deviding by 1 to 20 remainders = [] for i in range(1, 21, 1): remainders.append(num % i) # check if the sum of the remainders is 0 (which means the number fits) ...
Sod-Momas/momas-project
momas-wesay/momas-wesay-java-client/src/main/java/cc/momas/wesay/netty/java/WeSayEnvironment.java
<gh_stars>0 package cc.momas.wesay.netty.java; import org.apache.commons.cli.*; import java.util.Arrays; /** * 环境变量 * * @author Sod-Momas * @since 2021-02-24 */ public class WeSayEnvironment { private final CommandLine cmd; public WeSayEnvironment(String[] args) { // log.debug("args=" + Arrays....
AbdulMoeedSaleem/boiler-plate
templates/typescript/server/middlewares/response.js
<reponame>AbdulMoeedSaleem/boiler-plate const logCat = require("../../library/logger")("app"); const config = require('../../config/app'); module.exports = function (req, res, next) { req.offset = req.query.offset ? req.query.offset : 0; const lang = (req.get('mbq_lang') || req.headers['mbq_lang'] || 'en').toSt...
benety/mongo
src/mongo/db/repl/tenant_migration_shared_data.h
<reponame>benety/mongo /** * Copyright (C) 2020-present MongoDB, Inc. * * This program is free software: you can redistribute it and/or modify * it under the terms of the Server Side Public License, version 1, * as published by MongoDB, Inc. * * This program is distributed in the hope that it will...
paullewallencom/java-978-1-7898-0977-0
_src/Chapter04/CH4Prototype/Dungeon.java
package CH4Prototype; public class Dungeon extends BaseLevel { public Dungeon(String name) { levelName = name; } @Override public BaseLevel clone() throws CloneNotSupportedException { return (Dungeon)super.clone(); } }
SerBuitrago/PastLey
src/com/pastley/models/component/ItemComponent.java
package com.pastley.models.component; public class ItemComponent<A> extends Component{ private static final long serialVersionUID = 1L; private A entity; private String path; public ItemComponent(A entity) { this(null, null, null, entity, null, null); } public ItemComponent(A entity, String path, String ic...
Squantor/libMcuLL
inc/nxp/LPC8XX/LPC84X_dma.h
<reponame>Squantor/libMcuLL<filename>inc/nxp/LPC8XX/LPC84X_dma.h /* * SPDX-License-Identifier: Unlicense * * Copyright (c) 2021 <NAME> * For conditions of distribution and use, see LICENSE file */ /* * LPC840 series DMA registers, defines and functions. */ #ifndef LPC84X_DMA_H #define LPC84X_DMA_H /** DMA - Re...
PrincetonUniversity/ASPIRE-Python
src/aspire/classification/legacy_implementations.py
import logging import numpy as np import scipy.sparse as sps from scipy.linalg import qr logger = logging.getLogger(__name__) def pca_y(x, k, num_iters=2): """ PCA using QR factorization. See: An algorithm for the principal component analysis of large data sets. Halko, Martinsson, Shkolnisky, ...
Team-4361/RobotCode2021
src/main/java/frc/team4361/season2021/surrogate/ShooterSurrogate.java
<reponame>Team-4361/RobotCode2021<filename>src/main/java/frc/team4361/season2021/surrogate/ShooterSurrogate.java<gh_stars>0 package frc.team4361.season2021.surrogate; import org.roxbotix.elibs2.robot.components.Encoder; import org.roxbotix.elibs2.robot.components.TlMotor; import frc.team4361.season2021.legacy.CoreShoo...
sofimrtn/Gestion_Hospital_IPS
IPS-GestionHospital/src/business/dto/PacienteDto.java
package business.dto; public class PacienteDto { public int id; public String dni; public String nombre; public String contacto; public String estado; @Override public String toString() { return nombre + " DNI paciente: " + dni + "."; } }
xmaruto/mcord
xos/tosca/resources/port.py
<gh_stars>0 import os import pdb import sys import tempfile sys.path.append("/opt/tosca") from translator.toscalib.tosca_template import ToscaTemplate from core.models import Instance,User,Network,NetworkTemplate,Port from xosresource import XOSResource class XOSPort(XOSResource): provides = ["tosca.nodes.networ...
Chainsawkitten/Deathcap
src/Editor/main.cpp
#include <GL/glew.h> #include <GLFW/glfw3.h> #include <Engine/MainWindow.hpp> #include "Editor.hpp" #include "Util/EditorSettings.hpp" #include <Engine/Util/Input.hpp> #include <Engine/Util/FileSystem.hpp> #include <Utility/Log.hpp> #include <Engine/Input/Input.hpp> #include <Engine/Manager/Managers.hpp> #include <Engi...
cuba-rnd/entity-views
modules/global/src/com/haulmont/addons/cuba/entity/views/scan/ViewsNamespaceHandler.java
package com.haulmont.addons.cuba.entity.views.scan; import org.springframework.beans.factory.xml.NamespaceHandlerSupport; /** * Registers parser for the custom tag. */ public class ViewsNamespaceHandler extends NamespaceHandlerSupport { public static final String VIEWS = "views"; @Override public void...
brandonbraun653/Apollo
lib/am335x_sdk/ti/csl/src/ip/emif4/V4/csl_emif4a.h
<filename>lib/am335x_sdk/ti/csl/src/ip/emif4/V4/csl_emif4a.h /** * @file csl_emif4a.h * * @brief * This is the main header file for the EMIF4F Module which defines * all the data structures and exported API. * * \par * ============================================================================...
duanyifei1937/go-tour
src/chapter08/demo_8.1.4/anonymous/anonymous.go
<gh_stars>0 package main import "fmt" type firstS struct { in1 int in2 int } // 匿名字段和面向对象编程中的继承概念相似,可以被用来模拟类似继承的行为。 // Go语言中的继随是通过内嵌或组合来实现的,所以可以说在Go语言中,组合比继承更受欢迎。 type secondS struct { b int c float32 int // 匿名字段 firstS // 匿名字段 } func main() { sec := new(secondS) sec.b = 6 sec.c = 7.5 sec.int...
ee7/exercism-c
exercises/practice/triangle/triangle.h
<reponame>ee7/exercism-c #ifndef TRIANGLE_H #define TRIANGLE_H typedef struct { double a; double b; double c; } triangle_t; #endif
wipup/discord-bot
src/main/java/wp/discord/bot/config/properties/DiscordProperties.java
package wp.discord.bot.config.properties; import java.util.Set; import org.springframework.boot.context.properties.ConfigurationProperties; import lombok.Data; import wp.discord.bot.util.ToStringUtils; @Data @ConfigurationProperties(prefix = "discord") public class DiscordProperties { private String oauth2Url; p...
LaCocoRoco/Scope
src/twincat/scope/TriggerGroup.java
<reponame>LaCocoRoco/Scope package twincat.scope; import java.util.Iterator; import java.util.Observable; import java.util.Observer; import java.util.concurrent.CopyOnWriteArrayList; public class TriggerGroup implements Observer { /*********************************/ /******** global variable ********/ /**...
Farhan-hyd/CodingPractice
modulewise.practice/stlchallange/unlock.java
import java.io.*; import java.util.*; class Res { String max = ""; } class Solution { static class FastReader { BufferedReader br; StringTokenizer st; public FastReader() { br = new BufferedReader( new InputStreamReader(System.in)); }...
ChimpGamer/HubParkour
src/main/java/me/block2block/hubparkour/listeners/SetupListener.java
package me.block2block.hubparkour.listeners; import me.block2block.hubparkour.Main; import me.block2block.hubparkour.api.events.admin.ParkourSetupEvent; import me.block2block.hubparkour.api.plates.*; import me.block2block.hubparkour.entities.Parkour; import me.block2block.hubparkour.managers.CacheManager; import me.bl...
wzaylor/FEBio_MCLS
FEBioSource2.9/FECore/FEBroydenStrategy.cpp
<reponame>wzaylor/FEBio_MCLS<filename>FEBioSource2.9/FECore/FEBroydenStrategy.cpp /*This file is part of the FEBio source code and is licensed under the MIT license listed below. See Copyright-FEBio.txt for details. Copyright (c) 2019 University of Utah, The Trustees of Columbia University in the City of New York, a...
asminer/smart
src/_Meddly/src/storage/ct_styles.cc
<gh_stars>1-10 /* Meddly: Multi-terminal and Edge-valued Decision Diagram LibrarY. Copyright (C) 2009, Iowa State University Research Foundation, Inc. This library is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by t...
dgrlucky/PointLegend
PointLegend/Classes/PLChooseWindow.h
<reponame>dgrlucky/PointLegend // // PLChooseWindow.h // Legend // // Created by ydcq on 15/12/2. // Copyright © 2015年 frocky. All rights reserved. // #import <UIKit/UIKit.h> @interface PLChooseWindow : UIWindow /** * 筛选条件数组 */ @property (nonatomic, strong) NSArray *itemArray; @property (nonat...
vitorrsbarbosa/ResolucoesLivros
Programacao/Treinamento_em_Liguagem_C/Cap1/ex26.c
<filename>Programacao/Treinamento_em_Liguagem_C/Cap1/ex26.c /*Treinamento em Linguagem C - <NAME> Capítulo 1 - Conceitos Basicos Exercício 26: Escreva um programa que tenha a seguinte saida: Treinamento em Programacao. Linguagem C. a) com uma unica instrucao de impressao b) com tres instrucoes de impressa...
Gridelen/core-python-ex
12/12.6/import.py
<reponame>Gridelen/core-python-ex ''' 12-6. Extended Import. Create a new function called importAs(). This function will import a module into your namespace, but with a name you specify, not its original name. For example, calling newname=importAs ('mymodule') will import the module mymodule, but the module and all its...
chen-star/Spring-Framework-Impl
src/test/java/org/alex/aop/AspectListExecutorTest.java
<filename>src/test/java/org/alex/aop/AspectListExecutorTest.java package org.alex.aop; import org.alex.aop.aspect.AspectInfo; import org.alex.aop.mock.MockDefaultAspect1; import org.alex.aop.mock.MockDefaultAspect2; import org.alex.aop.mock.MockDefaultAspect3; import org.alex.aop.mock.MockDefaultAspect4; import org.al...
redhawkIT/typescript-eslint
packages/shared-fixtures/fixtures/javascript/templateStrings/tagged-no-placeholders.src.js
<filename>packages/shared-fixtures/fixtures/javascript/templateStrings/tagged-no-placeholders.src.js foo`foo`;
hashimati/MicroCli
Code Examples/JWT/java/SecurityExample/src/main/java/io/hashimati/security/repository/UserRepository.java
package io.hashimati.security.repository; import io.hashimati.security.domains.LoginStatus; import io.hashimati.security.domains.User; import io.micronaut.data.jdbc.annotation.JdbcRepository; import io.micronaut.data.model.query.builder.sql.Dialect; import io.micronaut.data.repository.CrudRepository; import java.tim...
justem007/rossina
public/node_modules/ng-admin/src/javascripts/ng-admin/Crud/fieldView/EmbeddedListFieldView.js
<filename>public/node_modules/ng-admin/src/javascripts/ng-admin/Crud/fieldView/EmbeddedListFieldView.js module.exports = { getReadWidget: () => '<ma-embedded-list-column field="::field" value="::value" datastore="::datastore"></ma-embedded-list-column>', getLinkWidget: () => 'error: cannot display reference...
wangsenyuan/learn-go
src/leetcode/set1000/set1000/set1300/set1370/p1377/solution.go
<reponame>wangsenyuan/learn-go package p1377 func frogPosition(n int, edges [][]int, t int, target int) float64 { conns := make([][]int, n) for i := 0; i < n; i++ { conns[i] = make([]int, 0, 3) } for _, e := range edges { u, v := e[0]-1, e[1]-1 conns[u] = append(conns[u], v) conns[v] = append(conns[v], u...
TheGoldLab/TheGoldLab.github.io
SnowDotsDocumentation/DoxyDocs/classdots_all_singleton_objects.js
<filename>SnowDotsDocumentation/DoxyDocs/classdots_all_singleton_objects.js var classdots_all_singleton_objects = [ [ "reset", "classdots_all_singleton_objects.html#a1a7708cf677a74c3d8b61271d3d80faf", null ], [ "initialize", "classdots_all_singleton_objects.html#ad5621c741ad3ecc4b4d0f261d2bc0956", null ], [...
HarryStevens/swiftmap
src/utils/isString.js
export default function isString(str){ return !!str && typeof str === "string"; }
NaxHPL/RiichiCompanion
RiichiCompanion/app/src/main/java/com/example/riichicompanion/handcalculation/yaku/Haitei.java
<gh_stars>0 package com.example.riichicompanion.handcalculation.yaku; import com.example.riichicompanion.handcalculation.Hand; import com.example.riichicompanion.handcalculation.HandArrangement; import com.example.riichicompanion.handcalculation.WinConditions; import java.util.ArrayList; public class Haitei implemen...
seatsio/seatsio-java
src/main/java/seatsio/reports/usage/detailsForEventInMonth/UsageForObject.java
<filename>src/main/java/seatsio/reports/usage/detailsForEventInMonth/UsageForObject.java package seatsio.reports.usage.detailsForEventInMonth; import java.time.Instant; public class UsageForObject { public String object; public int numFirstBookings; public Instant firstBookingDate; public int numFirs...
Lesterpig/dfss
tests/dummy.go
<reponame>Lesterpig/dfss<gh_stars>1-10 // Package tests provides DFSS integration tests. package tests
rajagurunath/mlvajra
mlvajra/explanations/localExp.py
import shap import numpy as np import pandas as pd import enum from typing import Callable from lime.lime_tabular import LimeTabularExplainer from sklearn.preprocessing import MinMaxScaler try: import tensorflow as tf from sklearn.base import BaseEstimator import catboost import xgboost except ImportErr...
BuckWang0509/codeforces-go
leetcode/weekly/272/c/c.go
<gh_stars>1-10 package main /* 分组循环 将 $\textit{prices}$ 按照平滑下降的定义分成若干组。例如 $[3,2,1,4]$ 分为 $[3,2,1]$ 和 $[4]$ 两组。 对于每一组的所有非空子数组,都是平滑下降的。设该组长度为 $m$,则该组的非空子数组个数为 $$ C_{m+1}^2 = \dfrac{m(m+1)}{2} $$ 累加每组的非空子区间个数即为答案。 - 时间复杂度:$O(n)$,其中 $n$ 是数组 $\textit{prices}$ 的长度。注意下面代码内外层循环共用同一个变量 $i$,时间复杂度就是 `i++` 的执行次数,即 $O(n)$。 - ...
brettdavidson3/eclipselink.runtime
foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/queries/report/ReportQueryRetrievePrimaryKeysCursorTest.java
<gh_stars>0 package org.eclipse.persistence.testing.tests.queries.report; import java.math.BigDecimal; import java.util.HashMap; import java.util.Vector; import org.eclipse.persistence.expressions.ExpressionBuilder; import org.eclipse.persistence.queries.CursoredStream; import org.eclipse.persistence.queries.ReportQu...
amrut-prabhu/club-connect
src/test/java/guitests/guihandles/TaskCardHandle.java
package guitests.guihandles; import javafx.scene.Node; import javafx.scene.control.Label; /** * Provides a handle to a task card in the task list panel. */ public class TaskCardHandle extends NodeHandle<Node> { private static final String ID_FIELD_ID = "#id"; private static final String DESCRIPTION_FIELD_ID...
felixding/vnstat-ruby
lib/vnstat/result/day.rb
# frozen_string_literal: true module Vnstat class Result ## # A class representing a tracking result for a specific day. # # @!attribute [r] date # @return [Date] The date the result was captured on. class Day < Result include DateDelegation attr_reader :date ## # ...
Kirishikesan/haiku
src/apps/icon-o-matic/generic/gui/popup_control/InputSlider.cpp
<gh_stars>1000+ /* * Copyright 2006, Haiku. * Distributed under the terms of the MIT License. * * Authors: * <NAME> <<EMAIL>> */ #include "InputSlider.h" #include <stdio.h> #include <Message.h> #include <MessageFilter.h> #include "NummericalTextView.h" // MouseDownFilter class NumericInputFilter : public ...
pickettd/code-dot-org
cookbooks/cdo-nodejs/recipes/default.rb
<gh_stars>0 # # Cookbook Name:: cdo-nodejs # Recipe:: default # node.default['nodejs']['repo'] = "https://deb.nodesource.com/node_#{node['cdo-nodejs']['version']}" include_recipe 'nodejs' # Keep nodejs up to date package 'nodejs' do action :upgrade end nodejs_npm 'npm' do version node['cdo-nodejs']['npm_version'...
benetech/MathShareBackend
src/main/java/org/benetech/mathshare/mappers/UserInfoMapper.java
<gh_stars>1-10 package org.benetech.mathshare.mappers; import org.benetech.mathshare.model.dto.UserInfoDTO; import org.benetech.mathshare.model.entity.UserInfo; import org.mapstruct.Mapper; import org.mapstruct.factory.Mappers; @Mapper public interface UserInfoMapper { UserInfoMapper INSTANCE = Mappers.getMapper...
alf-tool/alf-core
spec/unit/alf-types/attr_name/test_triple_equal.rb
<reponame>alf-tool/alf-core require 'spec_helper' module Alf describe AttrName, "===" do it "should allow normal names" do (AttrName === :city).should be_true end it "should allow underscores" do (AttrName === :my_city).should be_true end it "should allow numbers" do (AttrName...
jnvshubham7/CPP_Programming
450Question(DayWise)/57.cpp
class Solution { public: int maximumSwap(int num) { string n=to_string(num); //keep in a map the last accurance of each digit unodered_map<int,int> last; for(int i=0;i<n.size();i++) last[n[i]-'0']=i; for(int i=0;i<n.size();i++) { for(int j...
ScalablyTyped/SlinkyTyped
a/aws-sdk/src/main/scala/typingsSlinky/awsSdk/chimeMod/SigninDelegateGroup.scala
<gh_stars>10-100 package typingsSlinky.awsSdk.chimeMod import org.scalablytyped.runtime.StObject import scala.scalajs.js import scala.scalajs.js.`|` import scala.scalajs.js.annotation.{JSGlobalScope, JSGlobal, JSImport, JSName, JSBracketAccess} @js.native trait SigninDelegateGroup extends StObject { /** * Th...
pintomau/commercetools-sdk-java-v2
commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/shipping_method/ShippingRate.java
package com.commercetools.api.models.shipping_method; import java.time.*; import java.util.*; import java.util.function.Function; import javax.validation.Valid; import javax.validation.constraints.NotNull; import com.commercetools.api.models.common.TypedMoney; import com.fasterxml.jackson.annotation.*; import com.f...
FallenShard/Crisp
Crisp/Camera/AbstractCamera.hpp
<filename>Crisp/Camera/AbstractCamera.hpp #pragma once #include <array> #include <CrispCore/Math/Headers.hpp> namespace crisp { class AbstractCamera { public: static constexpr uint32_t FrustumPlaneCount = 6; static constexpr uint32_t FrustumPointCount = 8; AbstractCamera(); ...
ArcticReal/eCommerce
plugins/eCommerce/src/main/java/com/skytala/eCommerce/service/skytalaPlugin/PluginsSkytalaPluginsServiceController.java
package com.skytala.eCommerce.service.skytalaPlugin; import java.math.BigDecimal; import java.sql.Timestamp; import java.util.List; import java.util.HashMap; import java.util.Map; import javax.servlet.http.HttpSession; import org.apache.ofbiz.service.GenericServiceException; import org.apache.ofbiz.service.LocalDisp...
skynode-integration/skynode-codebox
packages/editor/src/index.js
<filename>packages/editor/src/index.js require("./stylesheets/main.less"); var ace = require("./ace"); var aceModes = ace.require("ace/ext/modelist"); var Tab = require("./tab"); var settings = require("./settings"); var editorCommands = require("./commands"); var Q = codebox.require("q"); var _ = codebox.re...
chandu0101/scalajs-tfjs
src/main/scala/io/brunk/deeplearnjs/math/backends/kernel_registry.scala
/* * Copyright 2017 <NAME> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in wr...
Cy4Shot/Better-Dungeons-Mod
src/main/java/com/cy4/betterdungeons/client/screen/util/AbilitySelectionWidget.java
<reponame>Cy4Shot/Better-Dungeons-Mod package com.cy4.betterdungeons.client.screen.util; import com.cy4.betterdungeons.BetterDungeons; import com.cy4.betterdungeons.client.helper.Rectangle; import com.cy4.betterdungeons.client.overlay.AbilitiesOverlay; import com.cy4.betterdungeons.common.upgrade.UpgradeNode; import c...
sireliah/polish-python
Lib/shlex.py
"""A lexical analyzer klasa dla simple shell-like syntaxes.""" # Module oraz documentation by <NAME>, 21 Dec 1998 # Input stacking oraz error message cleanup added by ESR, March 2000 # push_source() oraz pop_source() made explicit by ESR, January 2001. # Posix compliance, split(), string arguments, oraz # iterator int...
rinceyuan/WeFe
fusion/fusion-service/src/main/java/com/welab/wefe/data/fusion/service/dto/entity/TaskOutput.java
/** * Copyright 2021 Tianmian Tech. 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. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by ...
kmorales13/redux-and-the-rest
rollup.config.js
<reponame>kmorales13/redux-and-the-rest import babel from '@rollup/plugin-babel'; import replace from '@rollup/plugin-replace'; import { terser } from 'rollup-plugin-terser'; import license from 'rollup-plugin-license'; import path from 'path'; export default { input: 'src/index.js', output: { format: 'cjs', ...
lhw362950217/sqlflow
go/log/log.go
// Copyright 2020 The SQLFlow Authors. 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. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicab...
GabrielSturtevant/mage
Mage.Sets/src/mage/cards/f/FallowWurm.java
<filename>Mage.Sets/src/mage/cards/f/FallowWurm.java package mage.cards.f; import java.util.UUID; import mage.MageInt; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.costs.common.DiscardCardCost; import mage.abilities.effects.common.SacrificeSourceUnlessPaysEffect; import mage.c...
hilmidemirtas/A_Student_Of_JavaScript
30-Days-Of-JavaScript-Exercise/Day_01/08_day1_exercise_variables_multiple.js
<reponame>hilmidemirtas/A_Student_Of_JavaScript<gh_stars>1-10 /* Exercise 8: Declare variables to store your first name, last name, marital status, country and age in multiple lines */ let firstName = "<NAME>", lastName = "demirtaş", maritalStatus = "single", country = "Turkey", age = "28"; //mu...
pmq20/jruby
spec/ruby/core/range/step_spec.rb
require File.expand_path('../../../spec_helper', __FILE__) describe "Range#step" do before :each do ScratchPad.record [] end it "returns an enumerator when no block is given" do enum = (1..10).step(4) enum.should be_an_instance_of(enumerator_class) enum.to_a.should eql([1, 5, 9]) end it "re...
xqbase/util
util-winrm/src/main/java/com/xqbase/util/winrm/wsman/Delete.java
package com.xqbase.util.winrm.wsman; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlType; @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "Delete") public class Delete {/**/}
3timeslazy/ferret
pkg/drivers/cdp/dom/helpers.go
<reponame>3timeslazy/ferret package dom import ( "bytes" "context" "errors" "time" "github.com/PuerkitoBio/goquery" "github.com/mafredri/cdp" "github.com/mafredri/cdp/protocol/dom" "github.com/mafredri/cdp/protocol/page" "github.com/mafredri/cdp/protocol/runtime" "golang.org/x/net/html" "github.com/MontFe...
xiaoweiruby/Elastos.RT
Sources/Sample/HelloCarDemo/Android/HelloElastosDemo/app/src/main/jni/elastos/include/elastos/utility/Arrays.h
<gh_stars>1-10 //========================================================================= // Copyright (C) 2012 The Elastos Open Source Project // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the Licen...
antonmedv/year
packages/2002/06/26/index.js
<gh_stars>1-10 module.exports = new Date(2002, 5, 26)
stanislavus/showcases
grpc/packages/server/index.js
<reponame>stanislavus/showcases import { CONTRACTS, Server } from '@grpc-example/contracts'; import UserModel from './UserModel.js'; const server = new Server({ [CONTRACTS.HELLO]: { sayHello: (call, callback) => callback(null, {message: `Hello, ${call.request.name || 'user'}`}), }, [CONTRACTS.USER]: UserMode...
kighie/so.ontolog
0.0.1/ontolog-utils/src/main/java/so/ontolog/data/binding/tools/BeanPrinter.java
/* * Copyright (c) 2012 <NAME> <EMAIL> * 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...
Garfonso/loadable-frameworks
globalization/test/phone_format_tests_au.js
<gh_stars>0 // @@@LICENSE // // Copyright (c) 2010-2013 LG Electronics, Inc. // // 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 // // Un...
Asurada2015/TFAPI_translation
NeuralNekworks_function/Normalization/tf_nn_l2_normalize.py
"""归一化(标准化)的目标之一在于将输入保持在一个可接受的范围内 例如将输入归一化到[0.0,1.0]区间内使输入中所有可能的分量归一化为一个大于等于0.0小于等于1.0的值""" """ tf.nn.l2_normalize(x, dim, epsilon=1e-12, name=None) 解释:这个函数的作用是利用 L2 范数对指定维度 dim 进行标准化。 比如,对于一个一维的张量,指定维度 dim = 0,那么计算结果为: output = x / sqrt( max( sum( x ** 2 ) , epsilon ) ) 假设 x 是多维度的,那么标准化只会独立的对维度 dim 进行,不会影响到别的维度。""" im...
Chorro/normalizer
service/src/test/java/io/wizzie/normalizer/mocks/MockKeyValueStore.java
package io.wizzie.normalizer.mocks; import org.apache.kafka.streams.KeyValue; import org.apache.kafka.streams.processor.ProcessorContext; import org.apache.kafka.streams.processor.StateStore; import org.apache.kafka.streams.state.KeyValueIterator; import org.apache.kafka.streams.state.KeyValueStore; import java.util....
matt-deboer/kuill
pkg/ui/src/utils/LogFollower.js
import { TextDecoder } from 'text-encoding-utf-8' import { addError } from '../state/actions/errors' // const escape = parseInt('033', 8); const colorCodes = [153,215,230,147,14,10,11,159,255].map(val => `\x1B[38;5;${val}m`) const logSuffix = `\x1B[0m` class LogBuffer extends Array { constructor(maxSize=2500) { ...
kimonito98/tudat
src/math/interpolators/cubicSplineInterpolator.cpp
#include "tudat/math/interpolators/cubicSplineInterpolator.h" namespace tudat { namespace interpolators { template class CubicSplineInterpolator< double, Eigen::VectorXd >; template class CubicSplineInterpolator< double, Eigen::Vector6d >; template class CubicSplineInterpolator< double, Eigen::MatrixXd >; #if( TUDAT...
SymmetricChaos/FiniteFields
Computation/RootFinding/SchoolyardMethod.py
# A schoolyard method for finding the input of a function that gives a # particular output. The first guess is the output itself and the step size is # half of that. If the function evaluates to more than the value we want then # subtract the step size and check again. If the sign has flipped divide the # step size i...
curtislb/ProjectEuler
py/problem_148.py
<filename>py/problem_148.py #!/usr/bin/env python3 """problem_148.py Problem 148: Exploring Pascal's triangle We can easily verify that none of the entries in the first seven rows of Pascal's triangle are divisible by 7: 1 1 1 1 ...
adithyap/coursework
OperatingSystems/MMU/options.cpp
#include "options.hpp" bool Options::_ohhh; bool Options::_page_table; bool Options::_frame_table; bool Options::_summary; bool Options::_dbg_page_table; bool Options::_dbg_frame_table; bool Options::_dbg_aging; void Options::init_options(char *options) { _ohhh = false; _page_table = false; _frame_table ...
yangzhaofeng/huaweicloud-sdk-cpp-v3
evs/src/v2/model/ListSnapshotsRequest.cpp
#include "huaweicloud/evs/v2/model/ListSnapshotsRequest.h" namespace HuaweiCloud { namespace Sdk { namespace Evs { namespace V2 { namespace Model { ListSnapshotsRequest::ListSnapshotsRequest() { offset_ = 0; offsetIsSet_ = false; limit_ = 0; limitIsSet_ = false; name_ = ""; nameIsSet_ = f...
TamataOcean/Workshop-Electronic
libraries/LaCOOLBoard/extras/doxygenDocs/html/class_cool_s_i114_x.js
<reponame>TamataOcean/Workshop-Electronic var class_cool_s_i114_x = [ [ "Begin", "class_cool_s_i114_x.html#a206b36aca7049f63be1d11088c30a09f", null ], [ "DeInit", "class_cool_s_i114_x.html#a6840abd53a2e3d71a6bb918077c6d6e6", null ], [ "ReadByte", "class_cool_s_i114_x.html#acc20f8037e156ec4aadcbe90780b1e8b",...
giantswarm/app-operator
service/controller/app/resource/status/delete.go
package status import "context" func (r *Resource) EnsureDeleted(ctx context.Context, obj interface{}) error { return nil }
TAJORE/supinfo3
src/Web/AdminBundle/Resources/public/js/apputils.js
/** * Created by root on 7/26/17. */ var app = { formatNumber: function(number){ return number < 10 ? "0"+number : number.toString(); }, parseDate : function(date) { var d = new Date(date), result = ""; result += app.formatNumber(d.getDate()) + '/'; result ...
solisbrian/FLAP
src/app/modules/fsa2/machine/util/sipserTestsDFAs.test.js
<reponame>solisbrian/FLAP<filename>src/app/modules/fsa2/machine/util/sipserTestsDFAs.test.js import FSA, { EMPTY_SYMBOL } from '../FSA.js'; import { solveFSA, convertToDFA } from '../FSAUtils.js'; import FSAGraph from 'modules/fsa2/graph/FSAGraph.js'; import FSABuilder from 'modules/fsa2/machine/FSABuilder.js'; functi...
YuriyAM/what-front
src/utils/helpers/index.js
export { Cookie } from './cookie.js'; export { commonHelpers } from './common-helpers.js';
attineos/atti-components
packages/atti-components/src/components/InputPopdown/styles.js
<filename>packages/atti-components/src/components/InputPopdown/styles.js<gh_stars>10-100 import styled from 'styled-components' const StyledInputPopdownContainer = styled.div` position: relative; display: inline-block; ` const StyledInputPopdown = styled.div` display: ${({ isOpen }) => (isOpen ? 'block' : 'none...
jjuiddong/KarlSims
SampleFramework/renderer/src/d3d9/D3D9RendererTarget.cpp
// This code contains NVIDIA Confidential Information and is disclosed to you // under a form of NVIDIA software license agreement provided separately to you. // // Notice // NVIDIA Corporation and its licensors retain all intellectual property and // proprietary rights in and to this software and related documentation...
fabianoflorentino/python-CursoIntensivoDePython
Parte1/Cap2/exercicios/numero_oito.py
print(int(5) + int(3)) print(int(2) * int(4)) print(int(16) / int(2)) print(int(16) - int(8))
Y-sir/spark-cn
sql/core/target/java/org/apache/spark/sql/execution/adaptive/ReduceNumShufflePartitions.java
<gh_stars>0 package org.apache.spark.sql.execution.adaptive; /** * A rule to adjust the post shuffle partitions based on the map output statistics. * <p> * The strategy used to determine the number of post-shuffle partitions is described as follows. * To determine the number of post-shuffle partitions, we have a ta...
Bounty556/ChangeOfSeasons
controllers/userController.js
<filename>controllers/userController.js const db = require('../models'); const bcrypt = require('bcryptjs'); function hashPassword(password) { return bcrypt.hashSync(password, bcrypt.genSaltSync(10), null); } module.exports = { getUser: id => { return new Promise((resolve, reject) => { db.User.findById(...
bobbyLXArt/v8
test/mjsunit/maglev/05.js
<reponame>bobbyLXArt/v8<filename>test/mjsunit/maglev/05.js // Copyright 2022 the V8 project authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // // Flags: --allow-natives-syntax --maglev function f(i, end) { do { do { i = e...
KevinOneLedger/protocol
service/ethereum/prepareERC20Lock.go
<filename>service/ethereum/prepareERC20Lock.go package ethereum import ( "github.com/google/uuid" "github.com/Oneledger/protocol/action" "github.com/Oneledger/protocol/action/eth" "github.com/Oneledger/protocol/serialize" codes "github.com/Oneledger/protocol/status_codes" ) func (svc *Service) PrepareOLTERC20Lo...
willfarrell/angular-io
src/scripts/ie.js
// alternative - http://www.pinlady.net/PluginDetect/IE/ // IE version, undefined if not IE. Used for HTML5 polyfills. var IE = /*@cc_on!@*/!1; if (IE) { IE = parseFloat((/MSIE[\s]*([\d\.]+)/).exec(navigator.appVersion)[1]); // Check if chromeframe, reset IE var if so if(IE < 10 && (/chromeframe/).test(navigator.app...
jessy1092/react-valid
__test__/validators/isNumeric.test.js
import React from 'react'; import { mount } from 'enzyme'; import { createValle } from '../../src'; import isNumeric from '../../src/validators/isNumeric'; import Input from '../fakeComponent/Input'; test('It sould be invalid if input does not contains only number', done => { const valle = createValle(); valle.a...
magicmarvman/serenity
Libraries/LibJS/Tests/Array.prototype.join.js
load("test-common.js"); try { assert(Array.prototype.join.length === 1); assert(["hello", "friends"].join() === "hello,friends"); assert(["hello", "friends"].join(" ") === "hello friends"); assert([].join() === ""); assert([null].join() === ""); assert([undefined].join() === ""); assert([u...