repo_name
stringlengths
6
101
path
stringlengths
4
300
text
stringlengths
7
1.31M
avlyalin/github-actions-test
src/containers/game/game.stories.js
import React from 'react'; import { withKnobs, radios } from '@storybook/addon-knobs'; import { BrowserRouter } from 'react-router-dom'; import { Route } from 'react-router-dom'; import { containerDecorator } from '_storybook/container'; import { TEAMS } from 'src/data/constants'; import { with_opened_cards_5x5 } from ...
mb3rn4l/reserva-canchas-hexagonal
microservicio/dominio/src/main/java/com/ceiba/tipocancha/modelo/dto/DtoTipoCancha.java
package com.ceiba.tipocancha.modelo.dto; import lombok.AllArgsConstructor; import lombok.Getter; @Getter @AllArgsConstructor public class DtoTipoCancha { private Long id; private String tipo; private double valorCancha; }
LazyFalcon/TechDemo-v4
src/Common/PerfTimers.hpp
<filename>src/Common/PerfTimers.hpp #pragma once #include <queue> #include "Timer.hpp" typedef u64 timeType; struct TimeRecord // in 1e-6s { timeType last {0}; timeType max {0}; timeType total {0}; timeType captured {0}; u64 count {0}; void update(timeType dt); }; class CpuTimerScoped { publi...
talentdeveloper511/Sprout
App/Services/Queries/TPT.js
<filename>App/Services/Queries/TPT.js<gh_stars>0 /* eslint-disable no-trailing-spaces,new-cap */ /** * Created by viktor on 9/8/17. */ // ======================================================== // Import Packages // ======================================================== import {AsyncStorage} from 'react-native' ...
duncangrant/incubator-brooklyn
core/src/test/java/brooklyn/test/entity/TestClusterImpl.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. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you ...
brianmock/ruby-code-challenges
validEmail.rb
<filename>validEmail.rb ARGV.each do|file| array = Array.new File.open(file).readlines.map do |line| array << line.to_s.gsub(/\n/,"") end #print array array.each {|x| if x == "" nil elsif (x[-4..-1] == "\.com" || x[-4..-1] == "\.org" || x[-4..-1] == "\.edu" || x[-4..-1] == "\.gov") && (x.count("\@")...
corneliouzbett/dhis2-android-capture-app
app/src/main/java/org/dhis2/utils/ObjectStyleUtils.java
package org.dhis2.utils; import android.content.Context; import android.content.res.Resources; import android.graphics.Color; import android.graphics.drawable.Drawable; import androidx.annotation.ColorRes; import androidx.appcompat.content.res.AppCompatResources; import androidx.core.content.ContextCompat; import or...
simoexpo/as4k
src/test/scala/org/simoexpo/as4k/KRecordSeqSourceConverterSpec.scala
package org.simoexpo.as4k import akka.stream.scaladsl.{Sink, Source} import org.apache.kafka.clients.consumer.OffsetAndMetadata import org.apache.kafka.common.TopicPartition import org.mockito.Mockito.{reset, verify, when} import org.scalatest.BeforeAndAfterEach import org.scalatest.concurrent.{IntegrationPatience, Sc...
SWING1993/YYFinance
youyu/Vendor/dswKit/ViewController/UIViewController+toast.h
<gh_stars>0 // // UIViewController+toast.h // qtyd // // Created by stephendsw on 15/8/21. // Copyright (c) 2015年 qtyd. All rights reserved. // #import <UIKit/UIKit.h> @interface UIViewController (toast) #pragma mark - other - (void)showMeg:(NSString *)meg; - (void)showMeg:(NSString *)meg cancelTitle:(NSString ...
Terry-Su/Technology-Laboratory
src/D3/Book_2nd/9.1_Transitions_basis/app.js
<filename>src/D3/Book_2nd/9.1_Transitions_basis/app.js import React, { Component } from "react" import { render } from "react-dom" import * as d3 from "d3" class App extends Component { change( { svg, yScale, h } ) { const dataset = [ 11, 12, 15, 20, 18, 17, 16, 18...
ribafs/linux
Comandos/catalogcommands/libc/exemplos/teste_lib.c
#include "nova_bib.h" int main(int argc, char *argv[]) { int num; if (argc != 2) { printf("Forneca um numero\n"); return 1; } else num = atoi(argv[1]); printf("\n*** fatorial\n"); int fat = fatorial(num); printf("Fatorial de %d = %d\n", num, fat); printf("\n'*** fibonacci\n")...
heristhesiya/OpenJSCAD.org
packages/modeling/src/geometries/poly3/create.js
<filename>packages/modeling/src/geometries/poly3/create.js<gh_stars>1000+ /** * Represents a convex 3D polygon. The vertices used to initialize a polygon must * be coplanar and form a convex shape. The vertices do not have to be `vec3` * instances but they must behave similarly. * @typedef {Object} poly3 * @prope...
geva/tradier.rb
spec/tradier/profile_spec.rb
require 'spec_helper' describe Tradier::Profile do describe "#name" do it "returns the name when set" do profile = Tradier::Profile.new(:profile => { :name => '<NAME>'}) expect(profile.name).to eq('<NAME>') end it "returns nil when name is not set" do profile = Tradier::Profile.new({})...
ChannD/chann-machine
ruoyi-forum/src/main/java/com/ruoyi/forum/domain/ForumReport.java
package com.ruoyi.forum.domain; import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; import com.ruoyi.common.annotation.Excel; import com.ruoyi.common.core.domain.BaseEntity; /** * 举报信息对象 forum_report * * @author ruoyi * @date 2021-03-15 */ public class...
wentch/redkale-plugins
src/main/java/org/redkalex/source/pgsql/PgReqExtended.java
<reponame>wentch/redkale-plugins<filename>src/main/java/org/redkalex/source/pgsql/PgReqExtended.java /* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package org.redkalex.source.p...
DDTH/DASP
servlet/src/ddth/dasp/common/api/IApiGroupHandler.java
package ddth.dasp.common.api; public interface IApiGroupHandler { /** * Handles an API call. * * @param apiName * @param params * @param authKey * @param remoteAddr * @return * @throws ApiException */ public Object handleApiCall(String apiName, Object params, String authKey, String remoteAddr) ...
gurfinkel/codeSignal
tournaments/commonPoints/commonPoints.js
function commonPoints(l1, r1, l2, r2) { return Math.max(Math.min(r1, r2) - Math.max(l1, l2) - 1, 0); }
JinshanMa/fenhuo-renren
src/main/java/io/renren/modules/fenhuo/dao/FenhuoRoleDao.java
<reponame>JinshanMa/fenhuo-renren<filename>src/main/java/io/renren/modules/fenhuo/dao/FenhuoRoleDao.java<gh_stars>0 package io.renren.modules.fenhuo.dao; import io.renren.modules.fenhuo.entity.FenhuoRoleEntity; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import org.apache.ibatis.annotations.Mapper; /** *...
alexxlzhou/scone-core
src/sconelib/scone/measures/Measure.h
/* ** Measure.h ** ** Copyright (C) 2013-2019 <NAME> and contributors. All rights reserved. ** ** This file is part of SCONE. For more information, see http://scone.software. */ #pragma once #include "scone/controllers/Controller.h" #include "scone/core/HasName.h" namespace scone { /// Base class for Measures. cla...
brandontrabucco/ros-image-captioner
src/image_caption_machine/navigator/helper.py
<filename>src/image_caption_machine/navigator/helper.py """Author: <NAME>. Adapted from <NAME>/shmoo_echo/nodes/nav_patch.py """ import tf2_ros import tf2_geometry_msgs import rospy from std_msgs.msg import Bool from flat_ball.msg import TrajWithBackup from geometry_msgs.msg import PoseStamped from image_caption_mac...
Kequc/adstack
lib/adstack/helper/network_setting.rb
<reponame>Kequc/adstack module Adstack class NetworkSetting < Helper ATTRIBUTES = [:google_search, :search_network, :content_network, :partner_search_network] attr_accessor *ATTRIBUTES def initialize(params={}) params.symbolize_all_keys! ATTRIBUTES.each do |symbol| params[symbol] = p...
jackleland/flopter
flopter/magnum/adcdata.py
<reponame>jackleland/flopter<gh_stars>1-10 import numpy as np import flopter.magnum.readfastadc as radc from flopter.core import constants as c class MagnumAdcConfig(object): def __init__(self, sample_rate, sample_time=None, num_samples=None, channels=None): self.sample_rate = sample_rate if sampl...
Crypto-APIs/Crypto_APIs_2.0_SDK_Golang
api_unified_endpoints.go
/* CryptoAPIs Crypto APIs 2.0 is a complex and innovative infrastructure layer that radically simplifies the development of any Blockchain and Crypto related applications. Organized around REST, Crypto APIs 2.0 can assist both novice Bitcoin/Ethereum enthusiasts and crypto experts with the development of their blockch...
cpplibv/libv
src/libv/utility/intrusive_ref.hpp
<reponame>cpplibv/libv<filename>src/libv/utility/intrusive_ref.hpp // Project: libv.utility, File: src/libv/utility/intrusive_ref.hpp, Author: <NAME> [Vader] #pragma once // pro #include <libv/utility/intrusive_ptr.hpp> namespace libv { // ---------------------------------------------------------------------------...
reiform/celix
examples/celix-examples/services_example_c/src/simple_consumer_example.c
<filename>examples/celix-examples/services_example_c/src/simple_consumer_example.c /* * 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...
bygui86/spring-validation
src/test/java/com/rabbit/validationsamples/integrations/ProfileWrapperDtoValidationIntegrationTest.java
package com.rabbit.validationsamples.integrations; import com.rabbit.validationsamples.dtos.ProfileDto; import com.rabbit.validationsamples.dtos.ProfileWrapperDto; import org.junit.Assert; import org.junit.BeforeClass; import org.junit.Test; import javax.validation.ConstraintViolation; import javax.validation.Validat...
oweson/ruoyi
ruoyi-system/src/main/java/com/ruoyi/system/domain/BasWord.java
package com.ruoyi.system.domain; import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; import com.ruoyi.common.annotation.Excel; import com.ruoyi.common.core.domain.BaseEntity; /** * word对象 bas_word * * @author ruoyi * @date 2020-08-06 */ public class Ba...
impredator/dharma2018
src/main/java/com/dharma/patterns/gof/behavioral/visitor/DemoVisitor.java
<reponame>impredator/dharma2018 package com.dharma.patterns.gof.behavioral.visitor; interface Element { void accept(Visitor v); } class FOO implements Element { public void accept(Visitor v) { v.visit(this); } public String getFOO() { return "FOO"; } } class BAR implements Elemen...
MateuszMazurkiewiczWaw/IntelligentTraderReactFlask
react_frontend/node_modules/mdi-react/QuestionNetworkIcon.js
'use strict'; function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } var React = _interopDefault(require('react')); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (v...
onmyway133/Runtime-Headers
macOS/10.13/AppKit.framework/NSRegularLegacyScrollerImp.h
/* Generated by RuntimeBrowser Image: /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit */ @interface NSRegularLegacyScrollerImp : NSLegacyScrollerImp + (double)scrollerWidth; - (unsigned long long)controlSize; - (double)knobMinLength; - (void)loadImages; - (double)trackWidth; @end
avereon/cart2
source/main/java/com/avereon/cartesia/CartesiaDesignCodec.java
package com.avereon.cartesia; import com.avereon.cartesia.data.*; import com.avereon.cartesia.math.CadGeometry; import com.avereon.data.IdNode; import com.avereon.data.Node; import com.avereon.log.LazyEval; import com.avereon.product.Product; import com.avereon.util.TextUtil; import com.avereon.xenon.asset.Asset; impo...
amygeek/computer-science-in-js
src/js/dynamicProgrammming/scoring-options.js
/** * Imagine a game (like baseball) where a player can score 1, 2 or 4 runs. Given a score "n", * find the total number of ways score "n" can be reached. Fibonacci Numbers Memoization S(n)=S(n−1)+S(n−2)+S(n−4) Runtime Complexity Linear, O(n). Memory Complexity Linear, O(n). we'll use the memoization techn...
pabigot/bsp430
examples/platform/cpu42/main.c
/** This file is in the public domain. * * This program demonstrates whether CPU erratum CPU42 is present on * the running chip. Note that BSP430 is not subject to this bug when * #BSP430_CORE_ENABLE_INTERRUPT() is used instead of the raw * __enable_interrupt(). * * @homepage http://github.com/pabigot/bsp430 *...
Quorafind/GuiLiteSamples
HelloWave/BuildSTM32F429-Gcc/guiLite_stm32f429/song/antialiasing.c
<filename>HelloWave/BuildSTM32F429-Gcc/guiLite_stm32f429/song/antialiasing.c // // Created by song on 17-6-1. // #include "stdlib.h" #include "math.h" #include "antialiasing.h" #include "color.h" uint16_t ipart(double x) { return (uint16_t) x; } float fpart(float x) { return (float) (x - floor(x)); } float ...
stIncMale/ratmex
ratmex/src/main/java/stincmale/ratmex/executor/RateMeasuringExecutorService.java
<filename>ratmex/src/main/java/stincmale/ratmex/executor/RateMeasuringExecutorService.java<gh_stars>0 /* * Copyright 2017-2018 <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 * ...
504479518/spring-cloud-parent
caesar-admin/admin-boot/src/main/java/com/caesar/admin/service/ISysRoleMenuService.java
package com.caesar.admin.service; import com.baomidou.mybatisplus.extension.service.IService; import com.caesar.admin.pojo.entity.SysRoleMenu; import java.util.List; /** * @author caesar * @desc 角色菜单 * @email <EMAIL> * @date 2021/12/2 */ public interface ISysRoleMenuService extends IService<SysRoleMenu> { ...
Loks-/competitions
hackerrank/practice/mathematics/number_theory/superpowers_of_2.cpp
<filename>hackerrank/practice/mathematics/number_theory/superpowers_of_2.cpp // https://www.hackerrank.com/challenges/superpowers #include "common/factorization/utils/eulers_totient.h" #include "common/factorization/utils/factorization_base.h" #include "common/modular/arithmetic.h" #include "common/modular/utils/merge...
chromium/chromium
build/lacros/mojo_connection_lacros_launcher.py
<reponame>chromium/chromium<filename>build/lacros/mojo_connection_lacros_launcher.py #!/usr/bin/env vpython3 # # Copyright 2020 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Helps launch lacros-chrome with mojo connect...
lleohao/NEJ-ES6
src/nejRoot/util/dispatcher/dsp/node.js
<gh_stars>1-10 /* * ------------------------------------------ * 树节点对象实现文件 * @version 1.0 * @author genify(caijf) * ------------------------------------------ */ /** @module util/dispatcher/dsp/node */ NEJ.define([ 'base/global', 'base/klass', 'base/util', 'util/event' ],function(NEJ,_k,_u,_t,_...
mdheller/rletters
app/lib/r_letters/analysis/stop_list.rb
<reponame>mdheller/rletters # frozen_string_literal: true module RLetters module Analysis # Code for parsing and loading lists of stop words class StopList # Return list of available stop lists # # @return [Hash<Symbol, Array<String>>] all present stop lists def self.available ...
ca1e/gonx
services/nv/types.go
package nv type Layout uint8 type DisplayScanFormat uint8 type Kind uint8 type ColorFormat uint64 const ( LayoutPitch Layout = 1 LayoutTiled Layout = 2 LayoutBlockLinear Layout = 3 ) const ( DisplayScanFormatProgressive DisplayScanFormat = 0 DisplayScanFormatInterlaced DisplayScanFormat = 1 ) cons...
bocke/abe-relive
Source/AliveLibAO/RollingBall.hpp
#pragma once #include "../AliveLibCommon/FunctionFwd.hpp" #include "Map.hpp" #include "BaseAliveGameObject.hpp" #include "../AliveLibAE/Path.hpp" namespace AO { struct Path_RollingBall final : public Path_TLV { Scale_short field_18_scale; XDirection_short field_1A_roll_direction; s16 field_1C_release_swi...
Pokoi/TortillaEngine
Documentation/html/structglm_1_1detail_1_1make__signed_3_01unsigned_01short_01_4.js
<gh_stars>0 var structglm_1_1detail_1_1make__signed_3_01unsigned_01short_01_4 = [ [ "type", "structglm_1_1detail_1_1make__signed_3_01unsigned_01short_01_4.html#af5793ac48501a8fb2be1d5aa55afff67", null ] ];
jfallows/airline
airline-core/src/main/java/com/github/rvesse/airline/restrictions/factories/StringRestrictionFactory.java
/** * Copyright (C) 2010-16 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by ...
BroiSatse/dbview_cti
lib/db_view_cti/model/cti/association_validations.rb
<filename>lib/db_view_cti/model/cti/association_validations.rb module DBViewCTI module Model module CTI module AssociationValidations extend ActiveSupport::Concern included do # validations validate :cti_validate_associations, :cti_no_disable => true attr_acces...
megahertz0/android_thunder
dex_src/com/xunlei/downloadprovider/ad/recommend/a/o.java
<reponame>megahertz0/android_thunder package com.xunlei.downloadprovider.ad.recommend.a; import android.database.Observable; import com.xunlei.downloadprovider.ad.common.c.a; import java.util.Arrays; import java.util.Iterator; import java.util.List; import java.util.Map; // compiled from: RecommendAdObservable.java p...
ckamtsikis/cmssw
SimRomanPot/SimFP420/src/ZeroSuppressFP420.cc
<filename>SimRomanPot/SimFP420/src/ZeroSuppressFP420.cc /////////////////////////////////////////////////////////////////////////////// // File: ZeroSuppressFP420.cc // Date: 12.2006 // Description: ZeroSuppressFP420 for FP420 // Modifications: ///////////////////////////////////////////////////////////////////////////...
jfehren/Crypto
hash/sha2/sha512-internal.h
/* * sha512-internal.h * * Created on: Apr 27, 2019, 6:13:50 PM * Author: <NAME> */ #ifndef SHA2_SHA512_INTERNAL_H_ #define SHA2_SHA512_INTERNAL_H_ #include "sha2.h" #ifdef __cplusplus extern "C" { #endif #if __IS_x86__ && CRYPTO_FAT #define _sha512_compress (*_crypto_sha512_compress_fat) #define _sha5...
fncolon/Belajar-Dengan-Jenius-AWS-Node.js
Chapter3-Mastering-Javascript/S5.Function/23.clean-code-2.js
<reponame>fncolon/Belajar-Dengan-Jenius-AWS-Node.js // bad if (currentUser) { function test() { console.log('Nope.'); } } // good let test; if (currentUser) { test = () => { console.log('Yup.'); }; } // Note: ECMA - 262 defines a block as a list of statements.A function dec...
venkatramanm/common
src/test/java/com/venky/core/util/PackageUtilTest.java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package com.venky.core.util; import java.io.IOException; import java.net.URL; import org.junit.After; import org.junit.AfterClass; import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; /** * ...
crowmurk/mallenom
mallenom/api/urls.py
<filename>mallenom/api/urls.py from django.urls import path, include from . import views app_name = 'api' employment = [ path('', views.EmploymentListEmployee.as_view(), name='list'), ] employee = [ path('<int:pk>/employment/', include((employment, 'employment'))), ] urlpatterns = [ path('employee/', ...
MantledIllusion/epiphy
src/test/java/com/mantledillusion/data/epiphy/set/test/DropSetModelPropertyTest.java
package com.mantledillusion.data.epiphy.set.test; import com.mantledillusion.data.epiphy.exception.InterruptedPropertyPathException; import com.mantledillusion.data.epiphy.exception.UnknownDropableElementException; import com.mantledillusion.data.epiphy.set.AbstractSetModelPropertyTest; import com.mantledillusion.data...
Haehnchen/idea-php-shopware-plugin
src/main/java/de/espend/idea/shopware/completion/ShopwareXmlCompletion.java
package de.espend.idea.shopware.completion; import com.intellij.codeInsight.completion.*; import com.intellij.codeInsight.lookup.LookupElementBuilder; import com.intellij.patterns.PlatformPatterns; import com.intellij.psi.PsiElement; import com.intellij.psi.xml.XmlTag; import com.intellij.util.ProcessingContext; impor...
m-m-m/util
nls/src/main/java/net/sf/mmm/util/nls/api/NlsObject.java
<gh_stars>1-10 /* Copyright (c) The m-m-m Team, Licensed under the Apache License, Version 2.0 * http://www.apache.org/licenses/LICENSE-2.0 */ package net.sf.mmm.util.nls.api; /** * This is the interface for an object with native language support. Such object be can {@link #toNlsMessage() * converted} to an {@link ...
VTracyHuang/yx-framework
yx-generator/src/main/java/com/yx/code/service/ISysEmailLogService.java
package com.yx.code.service; import com.yx.code.entity.SysEmailLog; import com.yx.common.core.base.BaseService; /** * <p> * 服务类 * </p> * * @author TangHuaLiang * @since 2019-02-28 */ public interface ISysEmailLogService extends BaseService<SysEmailLog> { }
dterletskiy/carpc
framework/imp/sys/command/Types.cpp
<gh_stars>1-10 #include "api/sys/command/Types.hpp" namespace carpc::command { }
prise-3d/macop
macop/evaluators/discrete/multi.py
<reponame>prise-3d/macop """Multi-objective evaluators classes for discrete problem """ # main imports from macop.evaluators.base import Evaluator class WeightedSum(Evaluator): """Weighted-sum sub-evaluator class which enables to compute solution using specific `_data` - stores into its `_data` dictionary at...
enhance-dev/enhance-styles
weights.js
module.exports = function (query='') { return /*css*/` /* WEIGHTS */ .font-hairline${query}{font-weight:100;} .font-thin${query}{font-weight:200;} .font-light${query}{font-weight:300;} .font-normal${query}{font-weight:400;} .font-medium${query}{font-weight:500;} .font-semibold${query}{font-weight:600;} .font-bold${qu...
jmartisk/syndesis-qe
rest-tests/src/test/java/io/syndesis/qe/rest/tests/integrations/KafkaSteps.java
package io.syndesis.qe.rest.tests.integrations; import org.springframework.beans.factory.annotation.Autowired; import java.util.Map; import java.util.UUID; import cucumber.api.java.en.Given; import cucumber.api.java.en.When; import io.syndesis.common.model.DataShapeKinds; import io.syndesis.common.model.action.Actio...
frag997/p5-plus-plus
Book-TheNatureOfCode/chapter_06_autonomous_agent/Steering: Seek/vehicle.js
<reponame>frag997/p5-plus-plus function Vehicle(x, y, n){ this.pos = createVector(x, y); this.vel = createVector(0, 0); this.acc = createVector(0, 0); this.maxspeed = 7; this.maxforce = 0.3; this.seek = function(target){ let desired = p5.Vector.sub(target, this.pos); desired.setMag(this.maxspeed); ...
jonathanxqs/lintcode
124.cpp
class Solution { public: /** * @param nums: A list of integers * @return an integer */ int longestConsecutive(vector<int>& nums) { unordered_map<int, bool> hash; for (int i = 0; i < nums.size(); i++) { hash[nums[i]] = true; } int max = 0; ...
jhh67/chapel
third-party/jemalloc/jemalloc-src/scripts/gen_travis.py
<gh_stars>1000+ #!/usr/bin/env python from itertools import combinations travis_template = """\ language: generic matrix: include: %s before_script: - autoconf - ./configure ${COMPILER_FLAGS:+ \ CC="$CC $COMPILER_FLAGS" } \ $CONFIGURE_FLAGS - make -j3 - make -j3 tests script: - make check "...
isabella232/turbine-fulcrum
template/src/java/org/apache/fulcrum/template/TemplateService.java
<reponame>isabella232/turbine-fulcrum package org.apache.fulcrum.template; /* * 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 ...
synapticarbors/wagyu
wagyu/edge.py
import math from typing import Optional from reprit.base import generate_repr from .hints import Coordinate from .point import Point from .utils import (round_towards_max, round_towards_min) class Edge: __slots__ = 'top', 'bottom', 'slope' def __init__(self, bottom: Point, top: Point) -...
olegon/online-judges
uri-online-judge/1309/main.cpp
/* Formatação Monetária https://www.urionlinejudge.com.br/judge/pt/problems/view/1309 */ #include <iostream> #include <iomanip> using namespace std; void printCurrency(int dollars, int cents); void printDollars(int dollars); void printCents(int cents); int main(void) { ios::sync_with_stdio(false); int doll...
tiagolobocastro/goNes
lib/mappers/cartridge.go
<gh_stars>1-10 package mappers import ( "encoding/binary" "fmt" "github.com/tiagolobocastro/gones/lib/ppu" "io" "log" "os" "path/filepath" "github.com/tiagolobocastro/gones/lib/common" "github.com/tiagolobocastro/gones/lib/cpu" ) const ( mapperNROM = iota mapperMMC1 mapperUnROM mapperMMC2 ) type NesVie...
riteshkumar99/coding-for-placement
leetcode/problemset-algorithms/smallest-subtree-with-all-the-deepest-nodes.cpp
class Solution { public: int recur(TreeNode *node, TreeNode * &ans) { int leftLen, rightLen; // we store the max length of left and right subtree in these vars TreeNode *leftNode, *rightNode; // we store the ans for left and right subtree in these vars if(node->left == NULL && node->right ==...
jinlongliu/AliOS-Things
platform/mcu/rda8955/inc/chip/regs/include/bb_cp2_asm.h
/* Copyright (C) 2016 RDA Technologies Limited and/or its affiliates("RDA"). * All rights reserved. * * This software is supplied "AS IS" without any warranties. * RDA assumes no responsibility or liability for the use of the software, * conveys no license or title under any patent, copyright, or mask work * right to t...
guoliim/resume-by-react
lib/views2/components/ExpList.js
import React from 'react' import PropTypes from 'prop-types' import Label from './Label' import Exp from './Exp' const ExpList = ({ exps = [] }) => { return ( <div className="exps"> <Label title={'个人项目实践'} url={'./img/ic_explore_24px.svg'} alt={'个人项目实践'}/> {exps.map((exp) => ( ...
puzzle/nochmal
spec/dummy/vendor/bundle/ruby/2.7.0/gems/sassc-2.4.0/lib/sassc/importer.rb
# frozen_string_literal: true module SassC class Importer attr_reader :options def initialize(options) @options = options end def imports(path, parent_path) # A custom importer must override this method. # Custom importer may return an Import, or an array of Imports. raise N...
Qwertygiy/Scenario
src/main/java/org/terasology/scenario/components/ScenarioComponent.java
<filename>src/main/java/org/terasology/scenario/components/ScenarioComponent.java /* * Copyright 2017 MovingBlocks * * 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:...
xmutzlq/ZZ
BopZZ/gen/com/bop/zz/R.java
<gh_stars>1-10 /* AUTO-GENERATED FILE. DO NOT MODIFY. * * This class was automatically generated by the * aapt tool from the resource data it found. It * should not be modified by hand. */ package com.bop.zz; public final class R { public static final class anim { public static final int...
ahai3840/slate-editor
lib/plugins/slate-helper-block-cleardatabykey/src/index.js
<filename>lib/plugins/slate-helper-block-cleardatabykey/src/index.js "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); /** * this delete a data key in current block type * * @param {Slate.state} state * @param {Datakey} dataKey * @return {Slate.state} **/ exports.default = function ...
abhinavsri360/Allcodes
JCode/hello/TrinomialDP.java
public class TrinomialDP { public static void main(String[] args) { int n = Integer.parseInt(args[0]); int k = Integer.parseInt(args[1]); System.out.println(trinomial(n, k)); } public static long trinomial(int n, int k) { if (n == 0 && k == 0) return 1; e...
htouqeer938/pet-hotel
3-Customization/22-Only Managers can register Employees and other Managers/backend-sql/src/api/iam/mutations/iamRemove.js
<gh_stars>0 const IamRemover = require('../../../services/iam/iamRemover'); const PermissionChecker = require('../../../services/iam/permissionChecker'); const permissions = require('../../../security/permissions') .values; const schema = ` iamRemove(emails: [ String! ]!, roles: [ String! ]!, all: Boolean): Boolea...
atpollmann/Reservation-system
agendator2000/server/src/cl/usach/ingesoft/agendator/business/service/IAdministrationService.java
package cl.usach.ingesoft.agendator.business.service; import cl.usach.ingesoft.agendator.entity.CareSessionEntity; import cl.usach.ingesoft.agendator.entity.OngEntity; import java.util.Date; import java.util.List; public interface IAdministrationService { /** * Operation 5. * * @param careSession ...
kaixiang1992/python-flask
502/modes.py
from sqlalchemy import create_engine, Column, Integer, String, DATETIME from sqlalchemy.ext.declarative import declarative_base from datetime import datetime # TODO: db_uri # dialect+driver://username:password@host:port/database?charset=utf8 DB_URI = 'mysql+pymysql://root:root123@127.0.0.1:3300/alembic_demo?charset=ut...
omserta/xsocs
xsocs/gui/widgets/AcqParamsWidget.py
<reponame>omserta/xsocs # coding: utf-8 # /*########################################################################## # # Copyright (c) 2015-2016 European Synchrotron Radiation Facility # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation file...
anant0301/Sem5
Computer Networks/Networkings Lab/Huffman_Encoding/huffman_encoding/create_node.c
#include "../headers.h" struct huffman_node* create_node(struct huffman_heap* tree, char ch) { struct huffman_node *node = (struct huffman_node*)malloc(sizeof(struct huffman_node)); node-> data = ch; node-> freq = 1; node-> left_ = NULL; node-> right_ = NULL; bzero(node-> code, MAX_ENCODE_LEN); ...
izenecloud/sf1r-lite
source/core/common/Utilities.h
#ifndef SF1R_COMMON_UTILITY_H #define SF1R_COMMON_UTILITY_H #include <sf1common/Utilities.h> namespace sf1r { using izenelib::Utilities; } #endif
truhlikfredy/dcs-bios-2-stream-deck
src/modules/allModules.js
<filename>src/modules/allModules.js module.exports = [ require('./deck15/ka-50/default.js') ]
LewJun/spring-boot-demo
spring-boot-mapstruct/src/main/java/com/example/lewjun/domain/bo/BaseObj.java
package com.example.lewjun.domain.bo; import com.fasterxml.jackson.annotation.JsonInclude; import java.io.Serializable; // 若为null,则不要返回给前端 @JsonInclude(JsonInclude.Include.NON_NULL) public class BaseObj implements Serializable { }
rbtnn/Admin
app/helpers/format-number.js
<filename>app/helpers/format-number.js import {helper} from '@ember/component/helper'; export function formatNumber(number, options) { if (number === '' || number === null || number === undefined) { return; } return Number(number).toLocaleString(undefined, options); } export default helper(functi...
ehbc221/apprenez-a-programmer-en-python
autres/fichiers/fichiers.py
# -*-coding:Utf-8 -* ############################################ # Changer le répertoire de travail courant # ############################################ import os os.chdir("/var/www/html/openclassrooms-apprenez-a-programmer-en-python/autres/fichiers") ########################### # Lecture dans un fichier # ######...
ximingxing/Close-Look-Java
Code/22-Generate-Parentheses/src/Solution.java
import java.util.LinkedList; import java.util.List; /** * Description: 括号生成 * Solution: 回溯 + 减枝 * Created By xingximing.xxm */ public class Solution { // 保存全部结果的集合 List<String> res = new LinkedList<>(); public List<String> generateParenthesis(int n) { backtrace(n, n, ""); return res; ...
pierreloicq/OsmAnd-core
include/OsmAndCore/Map/MapPrimitiviser.h
#ifndef _OSMAND_CORE_MAP_PRIMITIVISER_H_ #define _OSMAND_CORE_MAP_PRIMITIVISER_H_ #include <OsmAndCore/stdlib_common.h> #include <functional> #include <array> #include <OsmAndCore/QtExtensions.h> #include <QList> #include <OsmAndCore.h> #include <OsmAndCore/CommonTypes.h> #include <OsmAndCore/PrivateImplementation.h...
lowlander/nederrock
src/parser_nodes/literal_parser_node.hpp
<gh_stars>0 // // Copyright (c) 2020 <NAME> <<EMAIL>> // // SPDX-License-Identifier: MIT // #ifndef NEDERROCK_SRC_LITERAL_PARSER_NODE_HPP #define NEDERROCK_SRC_LITERAL_PARSER_NODE_HPP #include "literal_parser_node_pre.hpp" #include "constant_parser_node_pre.hpp" #include "number_parser_node_pre.hpp" #include "string_...
Andreas237/AndroidPolicyAutomation
ExtractedJars/RT_News_com.rt.mobile.english/javafiles/com/google/android/gms/internal/ads/zzahn.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 com.google.android.gms.internal.ads; import android.content.Context; import android.os.*; import com.google.android.gms.ads.internal.gmsg.zzb; import com.go...
YourFantasy/LeetCode
src/main/java/com/hust/edu/cn/twoPointers/_713.java
<filename>src/main/java/com/hust/edu/cn/twoPointers/_713.java package com.hust.edu.cn.twoPointers; class _713 { /** * j为工作指针 * i始终指向当b<k时的起始位置,并且此时i在j处或者j前面 * 设置b为数组的连续的乘积,如果b>=k,此时不满足,所以b=b/nums[i]; * 设数组为a0,a1,a2,a3....ak,...am...an;如果ak*ak+1*...am<k,此时的个数为cnt,若ak*ak+1*...am*am+1<k, 此时的个数为cnt...
Sonicskater/CurveModeller
src/vbo_tools.cpp
/** * @author <NAME>, <NAME> * @date 2019-10-15. * @details Organization: Biological Modeling and Visualization research group * University of Calgary, Calgary, AB, Canada * * Contact: arowens [at] ucalgary.ca * @copyright Copyright (c) 2019 ___ALGORITHMIC_BOTANY___. All rights reserved. * * @brief */ #incl...
xiangxik/castle-cloud
castle-component/castle-service-provider/src/main/java/me/xiangxik/service/provider/FooController.java
package me.xiangxik.service.provider; import java.util.Date; import javax.servlet.http.HttpServletRequest; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframewo...
raugfer/glasses
classes/java/security/AccessControlException.java
<gh_stars>0 /* GLASSES, Generic cLASSES * Copyright (c) 1998-2004, <NAME> */ package java.security; public class AccessControlException extends SecurityException { private final Permission permission; public AccessControlException(String message) { this(message, null); } public AccessControlException...
random-mud-pie/CoffeeMud
com/planet_ink/coffee_mud/Items/Basic/HoleInTheGround.java
package com.planet_ink.coffee_mud.Items.Basic; import com.planet_ink.coffee_mud.core.interfaces.*; import com.planet_ink.coffee_mud.core.*; import com.planet_ink.coffee_mud.core.collections.*; import com.planet_ink.coffee_mud.Abilities.interfaces.*; import com.planet_ink.coffee_mud.Areas.interfaces.*; import com....
physicsLoveJava/algorithms-practice-record
src/main/java/leetcode/contest/c5/SuitablePar.java
<reponame>physicsLoveJava/algorithms-practice-record<gh_stars>0 package leetcode.contest.c5; import java.util.Arrays; import java.util.Scanner; import java.util.Set; import java.util.TreeSet; public class SuitablePar { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); ...
sinotopia/sinotopia
sinotopia-fundamental/sinotopia-web/sinotopia-fundamental-jackson/src/main/java/com/sinotopia/fundamental/jackson/convert/serializer/DoubleJsonSerializer.java
<gh_stars>0 package com.sinotopia.fundamental.jackson.convert.serializer; /** * Double类型字段值的序列化 * Created by zhoubing on 2016/8/5. */ public class DoubleJsonSerializer extends BigDecimalJsonSerializer { public DoubleJsonSerializer() { addClazz(Double.class); addClazz(double.class); } }
g-votte/pfrl
tests/utils_tests/test_copy_param.py
<filename>tests/utils_tests/test_copy_param.py import unittest import torch import torch.nn as nn import numpy as np from pfrl.utils import copy_param from pfrl.testing import torch_assert_allclose class TestCopyParam(unittest.TestCase): def test_copy_param(self): a = nn.Linear(1, 5) b = nn.Line...
shangliyun/lu_xing_xiang_one_os
libc/source/armlibc/libc_syms.c
/** *********************************************************************************************************************** * Copyright (c) 2020, China Mobile Communications Group Co.,Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the...
osiris2k/school
src/js/app/components/video.js
<gh_stars>0 var pc_video = { init: function(){ $('body').on('click', '.video-block', function() { var element = $(this); if(element.hasClass('video-is-open')) { pc_video.close(element); } else { pc_video.open(element); } //videoWrapper.find('.fillcontainer').tri...
drjerry/acsploit
test/exploits/graphs/min_span_tree/test_kruskal.py
<gh_stars>100-1000 from exploits.graphs.min_span_tree import kruskal from test.exploits.dummy_output import DummyOutput def test_small_kruskal(): output = DummyOutput() n_nodes = 10 kruskal.options['n_nodes'] = n_nodes kruskal.run(output) assert len(output) == n_nodes def test_large_kruskal(): ...
playaround88/scan
scan-redis/src/main/java/com/ai/scan/redis/ScanLauncher.java
package com.ai.scan.redis; import java.util.List; import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** * 数据扫描任务的启动类 * * @author wutb * */ public class ScanLauncher { private static Logger LOG=LoggerFactory.getLogger(ScanLauncher.class); private ScanConfig config; private List<ScanThr...