repo_name
stringlengths
6
101
path
stringlengths
4
300
text
stringlengths
7
1.31M
gtarnaras/packer-builder-arm-image
pkg/builder/step_copy_image.go
package builder import ( "context" "fmt" "io" "os" "path/filepath" "time" "github.com/solo-io/packer-builder-arm-image/pkg/image" "github.com/solo-io/packer-builder-arm-image/pkg/utils" "github.com/hashicorp/packer/helper/multistep" "github.com/hashicorp/packer/packer" ) type stepCopyImage struct { FromK...
mkjanda/IAT-Server
iat-webapp/src/main/java/net/iatsoftware/iat/repositories/ClientExceptionRepository.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 net.iatsoftware.iat.repositories; /** * * @author michael */ import net.iatsoftware.iat.entities.ClientExceptionReport; p...
wt1187982580/javaBook-src
mybatisBook/src/main/java/com/huifer/mybatis/pojo/Dept.java
<filename>mybatisBook/src/main/java/com/huifer/mybatis/pojo/Dept.java package com.huifer.mybatis.pojo; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; import java.util.List; /** * 描述: * * @author huifer * @date 2019-02-21 */ @Data @AllArgsConstructor @NoArgsConstructor pub...
llabake/Hello-Books
server/routes/userRoute.js
<filename>server/routes/userRoute.js<gh_stars>1-10 import UserController from '../controllers/v1/userController'; import Authentication from '../middlewares/authenticationMiddleware'; const userRoute = (app) => { /** * @swagger * definition: * User: * properties: * username: * type: string ...
neonkingfr/ccv
lib/nnc/cmd/convolution/cpu_opt/_ccv_nnc_conv_cpu_gemm.c
<filename>lib/nnc/cmd/convolution/cpu_opt/_ccv_nnc_conv_cpu_gemm.c #include "ccv.h" #include "ccv_internal.h" #include "nnc/ccv_nnc.h" #include "nnc/ccv_nnc_easy.h" #include "nnc/ccv_nnc_internal.h" #include "../_ccv_nnc_conv_cpu_opt.h" int _ccv_nnc_conv_forw_gemm_cpu_opt(const ccv_nnc_tensor_view_t* const a, const cc...
ford442/openmpt
common/FileReader.h
/* * FileReader.h * ------------ * Purpose: A basic class for transparent reading of memory-based files. * Notes : (currently none) * Authors: OpenMPT Devs * The OpenMPT source code is released under the BSD license. Read LICENSE for more details. */ #pragma once #include "openmpt/all/BuildSettings.hpp" #in...
diegohfacchinetti/ExemploReactRedux
frontend/node_modules/redux-multi/test/index.js
<gh_stars>0 /** * Imports */ import test from 'tape' import multi from '../src' /** * Tests */ test('should work', ({plan, pass, end}) => { plan(2) multi({dispatch: () => pass('pass')})(() => {})([1, 2]) })
14ms/Minecraft-Disclosed-Source-Modifications
Scov 030121/Scov/value/util/BooleanParser.java
<gh_stars>1-10 package Scov.value.util; import java.util.HashMap; import java.util.Map; import java.util.Optional; public final class BooleanParser { private static final Map<String, Boolean> PARSE; static { PARSE = new HashMap<String, Boolean>() { { this.put("enable", tr...
leonardoamurca/tompero
src/pages/Recipe.js
<filename>src/pages/Recipe.js import React, { useState, useEffect } from "react"; import { request } from "../utils/request"; import styles from "./Recipe.module.css"; import { recipes } from "../mocks/recipes"; import Loading from "../components/Loading"; function Recipe(props) { const [loading, setLoading] = useSt...
guhilling/cdi-tes
cdi-test-core/src/test/java/de/hilling/junit/cdi/scope/context/AbstractScopeContextTest.java
<filename>cdi-test-core/src/test/java/de/hilling/junit/cdi/scope/context/AbstractScopeContextTest.java package de.hilling.junit.cdi.scope.context; import java.lang.reflect.Type; import java.util.HashMap; import java.util.Map; import java.util.UUID; import java.util.function.BiConsumer; import org.junit.jupiter.api.As...
larsw/rya
test/rdf/src/main/java/org/apache/rya/streams/kafka/RdfTestUtil.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 ...
nulllaborg/51duino
cores/STC8/wiring.h
<gh_stars>1-10 /* wiring.h Modified 2 February 2018 for mcs51 by huaweiwx */ #ifndef _WIRING_H_ #define _WIRING_H_ #ifndef USE_SYSTICK #define USE_SYSTICK 1 #endif #if CORE_STCYn > 1 #define T1MS (65536L-F_CPU/1000) //1ms timer calculation method in 1T mode #elif CORE_STCYn == 1 #define T1MS (65536L-F_C...
LazaroRaul/rextporter
src/client/client_catcher.go
package client import ( "github.com/prometheus/client_golang/prometheus" "github.com/simelo/rextporter/src/cache" ) // CatcherCreator have info to create catcher client type CatcherCreator struct { Cache cache.Cache ClientFactory CacheableFactory } // CreateClient create a catcher client func (cc Catcher...
borosboyo/timechamp
src/main/java/hu/bme/aut/timechamp/repository/TodoRepository.java
<gh_stars>1-10 package hu.bme.aut.timechamp.repository; import hu.bme.aut.timechamp.model.Todo; import org.springframework.data.jpa.repository.EntityGraph; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.Modifying; import org.springframework.data.jpa.reposit...
mateusdeap/natalie
spec/core/array/pack/g_spec.rb
<gh_stars>100-1000 # skip-test require_relative '../../../spec_helper' require_relative '../fixtures/classes' require_relative 'shared/basic' require_relative 'shared/numeric_basic' require_relative 'shared/float' describe "Array#pack with format 'G'" do it_behaves_like :array_pack_basic, 'G' it_behaves_like :arr...
denney/carbon-devicemgt-master
components/certificate-mgt/org.wso2.carbon.certificate.mgt.core/src/main/java/org/wso2/carbon/certificate/mgt/core/impl/CertificateGenerator.java
/* * Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * * WSO2 Inc. licenses this file to you 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.apach...
shgriffi/openshift-ansible
utils/src/ooinstall/ansible_plugins/facts_callback.py
<reponame>shgriffi/openshift-ansible<gh_stars>1-10 # TODO: Temporarily disabled due to importing old code into openshift-ansible # repo. We will work on these over time. # pylint: disable=bad-continuation,missing-docstring,no-self-use,invalid-name,no-value-for-parameter import os import yaml from ansible.plugins.callb...
connectim/iOS
Connect/Client/Wallet/View/LMWalletViewCell.h
// // LMWalletViewCell.h // Connect // // Created by Edwin on 16/7/14. // Copyright © 2016年 Connect. All rights reserved. // #import <UIKit/UIKit.h> @interface LMWalletViewCell : UIView // wallet money @property(nonatomic, strong) UILabel *walletAccout; @end
MetaPhase-Consulting/State-TalentMAP
src/reducers/bureauPositionDetails/bureauPositionDetails.test.js
<gh_stars>1-10 import * as reducers from './bureauPositionDetails'; describe('assignment reducers', () => { it('can set reducer BUREAU_POSITION_DETAILS_HAS_ERRORED', () => { expect(reducers.bureauPositionDetailsHasErrored(false, { type: 'BUREAU_POSITION_DETAILS_HAS_ERRORED', hasErrored: true })).toBe(true); })...
masud-technope/ACER-Replication-Package-ASE2017
corpus/class/eclipse.pde.ui/5270.java
/******************************************************************************* * Copyright (c) 2008, 2012 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, an...
mosxuqian/CodeCollection
Algorithm/HashTable/hashtableTest.c
<reponame>mosxuqian/CodeCollection #include<stdio.h> #include "hashtable.h" int main() { hash_table_t *table = hash_table_new(MODE_COPY); int i = 1; int val = 100; int val2 = 200; int j = 2; int x =0; for (x=0;x<3000;x++) { // use the macro HT_ADD(table, &j, &val); ...
BaiduFE/Tangram-base
test/baidu/dom/getComputedStyle.js
module("baidu.dom.getComputedStyle"); test("get style from style", function() { if (ua.browser.ie) { ok(true, "IE not supportted"); return; } expect(7); var div = document.createElement('div'); var img = document.createElement('img'); document.body.appendChild(div); div.appendChild(img); div.id...
johnjohndoe/pgem
vendor/extensions/meetups/db/seeds.rb
Refinery::I18n.frontend_locales.each do |lang| I18n.locale = lang Refinery::User.find_each do |user| user.plugins.where(name: 'refinerycms-meetups').first_or_create!( position: (user.plugins.maximum(:position) || -1) +1 ) end if defined?(Refinery::User) Refinery::Page.where(link_url: (url = "/me...
taoyuc3/CS225
potd/potd-q54/main.cpp
#include <iostream> #include <vector> #include "Primes.h" int main() { std::vector<int> * primes = genPrimes(1000); std::cout << "2 has " << numSequences(primes,2) << " sequence(s)." << std::endl; std::cout << "3 has " << numSequences(primes,3) << " sequence(s)." << std::endl; std::cout << "17 has " <...
svenfuchs/adva_cms
engines/adva_photos/app/models/album.rb
<gh_stars>10-100 class Album < Section has_many :photos, :foreign_key => 'section_id', :dependent => :destroy has_many :sets, :class_name => 'Category', :foreign_key => 'section_id', :dependent => :destroy, :order => 'lft' do def roots find :all, :conditions => {:parent_id => nil}, :order => 'lft' end...
hpc4cmb/tidas
src/libtidas/src/tidas_dict_getdata.cpp
<filename>src/libtidas/src/tidas_dict_getdata.cpp // TImestream DAta Storage (TIDAS). // // Copyright (c) 2015-2019 by the parties listed in the AUTHORS file. All rights // reserved. Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include <tidas_internal.hpp> #...
jamieguerrero/lucytumolo-gatsby
src/components/Modalities.js
import React from 'react' import PropTypes from 'prop-types' import { v4 } from 'uuid' const Modalities = ({ modalities }) => ( <div> {modalities.map(modality => ( <div> {modality.name} <img src={modality.image}/> {modality.description} </div> ))} </div> ) Moda...
Quesar/gradle-mobile-plugin
src/main/java/lv/ctco/scm/mobile/utils/IosArtifactUtil.java
package lv.ctco.scm.mobile.utils; import lv.ctco.scm.utils.file.FileUtil; import java.io.File; import java.io.IOException; import java.nio.file.Files; public class IosArtifactUtil { private IosArtifactUtil() {} public static void unpackIpaPayload(File sourceIpa, File payloadContainerDir) throws IOException...
mateussouzaweb/compactor
os/fs.go
package os import ( "bytes" "io/fs" "io/ioutil" "os" "path" "path/filepath" "strings" ) // Exist check if file or directory exists func Exist(path string) bool { if _, err := os.Stat(path); os.IsNotExist(err) { return false } return true } // Permissions retrieve permissions for file or directory func ...
ysimonson/new_sanctuary_asylum
spec/factories/community_factory.rb
<filename>spec/factories/community_factory.rb FactoryBot.define do factory :community do name { Faker::Address.unique.city } slug { name.downcase.gsub(/[^a-z]/i, '') } association :region end trait :primary do primary { true } end end
netspeak/netspeak4-application-cpp
src/netspeak/value/sextuple_traits.hpp
<filename>src/netspeak/value/sextuple_traits.hpp<gh_stars>0 // quadruple_traits.hpp -*- C++ -*- // Copyright (C) 2011-2013 <NAME> #ifndef NETSPEAK_VALUE_SEXTUPLE_TRAITS_HPP #define NETSPEAK_VALUE_SEXTUPLE_TRAITS_HPP #include "netspeak/value/sextuple.hpp" #include "netspeak/value/value_traits.hpp" namespace netspeak {...
quanpands/wflow
pcraster/pcraster-4.2.0/pcraster-4.2.0/source/pcraster_python/value_scale_traits.cc
<gh_stars>0 #include "value_scale_traits.h" namespace pcraster { std::string const ValueScaleTraits<VS_B>::name("Boolean"); std::string const ValueScaleTraits<VS_L>::name("LDD"); std::string const ValueScaleTraits<VS_N>::name("Nominal"); std::string const ValueScaleTraits<VS_O>::name("Ordinal"); std::string const Va...
Selvasundaram/gluster-ovirt
backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/DbUserDAODbFacadeImpl.java
<reponame>Selvasundaram/gluster-ovirt<gh_stars>1-10 package org.ovirt.engine.core.dao; import java.sql.ResultSet; import java.sql.SQLException; import java.util.List; import java.util.Map; import org.springframework.jdbc.core.namedparam.MapSqlParameterSource; import org.springframework.jdbc.core.simple.ParameterizedR...
sajalguptajft/cobbzilla-wizard
wizard-server/src/main/java/org/cobbzilla/wizard/dao/AbstractChildCRUDDAO.java
package org.cobbzilla.wizard.dao; import org.cobbzilla.wizard.model.ChildEntity; import org.hibernate.SessionFactory; import org.hibernate.criterion.Restrictions; import org.springframework.beans.factory.annotation.Autowired; import javax.validation.Valid; import java.util.HashMap; import java.util.List; import java....
DevGithub007/My_Codes
295 C Questions/61.c
<filename>295 C Questions/61.c #include<stdio.h> main() { union d { unsigned int a:1; unsigned int b:2; unsigned :0; unsigned int d:1; unsigned int e:0; }; union d aa; aa.a=1; aa.b=5; printf("d.aa.a=%d d.aa.b=%d",aa.a,aa.b); }
MystaraCorvus/Adventurer
RagnarokMod/src/main/java/Adventurer/patches/AdventurerEnum.java
<gh_stars>0 package Adventurer.patches; import com.evacipated.cardcrawl.modthespire.lib.SpireEnum; import com.megacrit.cardcrawl.characters.AbstractPlayer; public class AdventurerEnum { @SpireEnum public static AbstractPlayer.PlayerClass ADVENTURER; @SpireEnum public static AbstractPlayer.PlayerClass...
rudderlabs/rudder-utils
utils/config-gen/node_modules/antd/lib/_util/reactNode.js
<filename>utils/config-gen/node_modules/antd/lib/_util/reactNode.js "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.cloneElement = cloneElement; var React = _interopRequireWildcard(require("react")); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return ob...
e-gineer/edgr
core/core.go
package core import ( "encoding/csv" "encoding/xml" "fmt" "log" "net/http" "regexp" "time" "github.com/piquette/edgr/core/model" "golang.org/x/net/html/charset" ) var ( iexSymbolsURL = "https://api.iextrading.com/1.0/ref-data/symbols?format=csv" secCompanyURL = "https://www.sec.gov/cgi-bin/browse-edgar?ac...
marcio55afr/sktime
sktime/datatypes/_alignment/__init__.py
<reponame>marcio55afr/sktime # -*- coding: utf-8 -*- """Module exports: Alignment type checkers and mtype inference.""" from sktime.datatypes._alignment._check import check_dict as check_dict_Alignment from sktime.datatypes._alignment._registry import ( MTYPE_LIST_ALIGNMENT, MTYPE_REGISTER_ALIGNMENT, ) __all_...
bijeshcnair/wavemaker-app-runtime
src/main/webapp/scripts/modules/widgets/grid/datagrid.js
<reponame>bijeshcnair/wavemaker-app-runtime /*global $, window, angular, moment, WM, _, document, parseInt, navigator*/ /*jslint todo: true*/ /** * JQuery Datagrid widget. */ 'use strict'; $.widget('wm.datagrid', { options: { data: [], statusMsg: '', colDefs: [], rowActions: [], ...
Francesco-Lanciana/pockets
src/utils/supplierData.js
const metadata = { "asos": { deliveryMin: 2, deliveryMax: 20, returns: "unused", saleItemReturns: true, returnShippingFee: false, international: true, }, "the iconic": { deliveryMin: 1, deliveryMax: 7, returns: "unused", saleIte...
bcgov/gwa-ui
src/main/java/ca/bc/gov/gwa/v2/model/Service.java
<gh_stars>0 /* * 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 ca.bc.gov.gwa.v2.model; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotatio...
felixWackernagel/sidekick-ui
library/src/main/java/de/wackernagel/android/sidekick/utils/ApplicationUtils.java
<reponame>felixWackernagel/sidekick-ui package de.wackernagel.android.sidekick.utils; import android.content.Context; import android.content.pm.PackageInfo; import android.content.pm.PackageManager; import android.support.annotation.NonNull; import android.support.annotation.Nullable; public class ApplicationUtils { ...
kkcookies99/UAST
Dataset/Leetcode/test/13/829.java
<filename>Dataset/Leetcode/test/13/829.java public int XXX(String s) { HashMap<String, Integer> hashMap = new HashMap<>(13); hashMap.put("I", 1); hashMap.put("V", 5); hashMap.put("X", 10); hashMap.put("L", 50); hashMap.put("C", 100); hashMap.put("D", 500); ...
jhonatasrm/chromium-android
app/src/main/java/org/chromium/components/viz/service/frame_sinks/ExternalBeginFrameSourceAndroid.java
// Copyright 2018 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. package org.chromium.components.viz.service.frame_sinks; import org.chromium.base.ContextUtils; import org.chromium.base.annotations.CalledByNative; impo...
xmar/pythran
pythran/pythonic/__builtin__/ZeroDivisionError.hpp
<gh_stars>0 #ifndef PYTHONIC_BUILTIN_ZERODIVISIONERROR_HPP #define PYTHONIC_BUILTIN_ZERODIVISIONERROR_HPP #include "pythonic/include/__builtin__/ZeroDivisionError.hpp" #include "pythonic/types/exceptions.hpp" namespace pythonic { namespace __builtin__ { PYTHONIC_EXCEPTION_IMPL(ZeroDivisionError) } } #en...
lord-pradhan/SnowBot
all_raspi_code_backup/StartScript.py
<filename>all_raspi_code_backup/StartScript.py """ Program: StartProgram Revised On: 11/20/2019 """ ### Library Imports from os import system ### Main Program system('sudo pigpiod') ##system('python3 /home/pi/Desktop/EMSD/MainProgram.py')
AdamCorbinFAUPhD/COP5339-Object-Oriented-Software-Design
Homeworks/Homework4/q6.2/src/Manager.java
<reponame>AdamCorbinFAUPhD/COP5339-Object-Oriented-Software-Design public class Manager extends Employee { private Double bonus; Manager(String name) { super(name); } public Double getBonus() { return bonus; } public void setBonus(Double bonus) { this.bonus = bonus; ...
sachinsuthars/frontend
src/Campaign/searchComponents/table.js
<filename>src/Campaign/searchComponents/table.js import React from 'react'; import ReactDOM from 'react-dom'; import { browserHistory } from 'react-router'; import {Link} from 'react-router'; import SortableTbl from 'react-sort-search-table'; import Edit from './editor.js'; import Manager from './manager.js'; /* cust...
Yehezkiel01/main
src/main/java/tagline/logic/commands/group/RemoveMemberFromGroupCommand.java
//@@author e0031374 package tagline.logic.commands.group; import static java.util.Objects.requireNonNull; import static tagline.logic.parser.group.GroupCliSyntax.PREFIX_CONTACTID; import java.util.Collection; import java.util.HashSet; import java.util.Optional; import java.util.Set; import java.util.stream.Collectors...
TimDovg/Sales.CRM
Frontend/src/components/crmUI/CRMTag/CRMTagStyles.js
<reponame>TimDovg/Sales.CRM<filename>Frontend/src/components/crmUI/CRMTag/CRMTagStyles.js // @flow import commonStyles from 'crm-styles/common'; import { STATUS_FILTER_BACKGROUND, HEADER_CELL, ICON_COLOR, WHITE, } from 'crm-constants/jss/colors'; const CRMTagStyles = ({ spacing, typography: {...
kkkitsch/zhiyou_workbench
mybatis_6/src/com/zhiyou/mybatis/dao/ClazzMapper.java
package com.zhiyou.mybatis.dao; import com.zhiyou.mybatis.bean.Clazz; public interface ClazzMapper { Clazz getClazzById(int id); }
louisyoungx/rocket
node_modules/element-plus/lib/utils/constants.js
<reponame>louisyoungx/rocket export var UPDATE_MODEL_EVENT = 'update:modelValue'; export var CHANGE_EVENT = 'change'; export var VALIDATE_STATE_MAP = { validating: 'el-icon-loading', success: 'el-icon-circle-check', error: 'el-icon-circle-close' };
Pustur/edabit-js-challenges
src/Hiding the Card Number/index.js
const cardHide = str => '*'.repeat(str.length - 4) + str.slice(-4); export default cardHide;
markiewb/fakereplace
core/src/main/java/org/fakereplace/core/BuiltinClassData.java
<filename>core/src/main/java/org/fakereplace/core/BuiltinClassData.java /* * Copyright 2016, <NAME>, and individual contributors as indicated * by the @authors tag. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obta...
heurezjusz/Athena
athenet/models/alexnet.py
<filename>athenet/models/alexnet.py """AlexNet model.""" from athenet import Network from athenet.layers import ConvolutionalLayer, ReLU, LRN, MaxPool, \ FullyConnectedLayer, Dropout, Softmax from athenet.utils import load_data, get_bin_path ALEXNET_FILENAME = 'alexnet_weights.pkl.gz' def alexnet(trained=True, ...
digital-10/dataprep-external
src/main/java/kr/co/digitalship/dprep/custom/schedule/job/listener/ListenerJob1.java
<reponame>digital-10/dataprep-external package kr.co.digitalship.dprep.custom.schedule.job.listener; import java.util.ArrayList; import java.util.Arrays; import java.util.Date; import java.util.List; import java.util.Locale; import javax.annotation.PostConstruct; import org.apache.commons.lang.StringUtils;...
mangelosalvio/pos
public/bower_components/pouchdb/lib/adapters/leveldb/readAsBlobOrBuffer-browser.js
'use strict'; var binToBluffer = require('../../deps/binary/binaryStringToBlobOrBuffer'); module.exports = function readAsBlobOrBuffer(storedObject, type) { // In the browser, we've stored a binary string return binToBluffer(storedObject, type); };
ThePixly/TGEngine
TGEngine/Stdbase.hpp
<reponame>ThePixly/TGEngine #pragma once #include <stdio.h> #include <iostream> #include <cstddef> #ifdef _WIN32 #define VK_USE_PLATFORM_WIN32_KHR #endif #undef VK_NO_PROTOTYPES #include <vulkan/vulkan.hpp> #include <vector> #include <string> #include "util/Annotations.hpp" #include <thread> #include "io/Properties.hp...
keichi/RAJA
include/RAJA/policy/sequential/kernel/Collapse.hpp
/*! ****************************************************************************** * * \file * * \brief Header file for sequential kernel loop collapse executors. * ****************************************************************************** */ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~...
Nikeshh/Ecommerce-Platform
Website/Frontend/admindashboard/src/components/screens/users_screen.js
import React from "react"; import Sidebar from "../sidebar.js"; import Header from "../header.js"; import Users from "./users/users.js"; const UsersScreen = () => { return( <> <Sidebar /> <main className="main-wrap"> <Header /> <Users /> <...
arne-bdt/jena
jena-db/jena-dboe-trans-data/src/test/java/org/apache/jena/dboe/trans/bplustree/rewriter/TestBPlusTreeRewriterNonTxn.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 ...
hpc/hxhim
examples/hxhim/print_results.c
<reponame>hpc/hxhim<gh_stars>1-10 #include <float.h> #include <inttypes.h> #include <stdio.h> #include "hxhim/accessors.h" #include "print_results.h" #include "utils/elen.h" void print_by_type(void *value, size_t value_len, enum hxhim_data_t type) { switch (type) { case HXHIM_DATA_INVALID: pri...
reels-research/iOS-Private-Frameworks
PassKitUI.framework/PKDiscoveryArticleAnimatedTransitioningHandler.h
<filename>PassKitUI.framework/PKDiscoveryArticleAnimatedTransitioningHandler.h /* Generated by RuntimeBrowser Image: /System/Library/PrivateFrameworks/PassKitUI.framework/PassKitUI */ @interface PKDiscoveryArticleAnimatedTransitioningHandler : NSObject <UIViewControllerAnimatedTransitioning> { bool _completed...
annajohny/sdp
tug_observers/tug_observer_plugins/tug_observer_plugin_utils/scripts/filter/valuefilter.py
<filename>tug_observers/tug_observer_plugins/tug_observer_plugin_utils/scripts/filter/valuefilter.py #!/usr/bin/env python from tug_python_utils import YamlHelper as Config class ValueFilter(): """ Base class for filter. """ def __init__(self): self.sample_size = 0 pass def updat...
yop-platform/yop-java-sdk
src/test/java/com/yeepay/yop/sdk/service/common/SmD2DERTest.java
/* * Copyright: Copyright (c)2011 * Company: 易宝支付(YeePay) */ package com.yeepay.yop.sdk.service.common; import com.yeepay.yop.sdk.utils.Encodes; import org.bouncycastle.jcajce.provider.asymmetric.ec.BCECPrivateKey; import org.bouncycastle.jcajce.spec.OpenSSHPrivateKeySpec; import org.bouncycastle.jce.ECNamedCurveT...
StepanBarantsev/course_management
web/app/__init__.py
<filename>web/app/__init__.py from flask import Flask, render_template from flask_sqlalchemy import SQLAlchemy from flask_migrate import Migrate from web.config import Config from flask_login import LoginManager from flask_bootstrap import Bootstrap from flask_moment import Moment from flask_mail import Mail db = SQLA...
netochaves/IsCoolApp2
app/src/main/java/easii/com/br/iscoolapp/objetos/DisciplinaAluno.java
package easii.com.br.iscoolapp.objetos; /** * Created by gustavo on 15/09/2016. */ public class DisciplinaAluno { private long id; private String nome; private String turma; private String serie; private String escola; private String nomeProfessor; public DisciplinaAluno(long id, String...
ryoon/vialer-js
gulp/tasks/code.js
<gh_stars>100-1000 const {_extend, promisify} = require('util') const fs = require('fs') const path = require('path') const browserify = require('browserify') const buffer = require('vinyl-buffer') const composer = require('gulp-uglify/composer') const envify = require('gulp-envify') const gulp = require('gulp') cons...
kalik1/q3-server-docker-rest-api
src/api/rcon/index.js
<gh_stars>1-10 'use strict'; const Router = require('express').Router; const controller = require('./rcon.controller'); let router = new Router(); router.get('/status', controller.status()); router.get('/serverinfo', controller.serverinfo()); router.post('/setVar', controller.setVar); router.get('/:cmd', controller....
JMMarchant/jung
jung-io/src/test/java/edu/uci/ics/jung/io/graphml/DummyEdge.java
<reponame>JMMarchant/jung package edu.uci.ics.jung.io.graphml; import com.google.common.base.Function; public class DummyEdge extends DummyGraphObjectBase { public static class EdgeFactory implements Function<EdgeMetadata, DummyEdge> { int n = 100; public DummyEdge apply(EdgeMetadata md) { ...
RBSystems/device-monitoring-microservice
localsystem/hardware.go
<gh_stars>1-10 package localsystem import ( "context" "fmt" "io/ioutil" "math" "net" "os" "path/filepath" "strconv" "strings" "sync" "time" "github.com/byuoitav/common/log" "github.com/byuoitav/common/nerr" "github.com/docker/docker/api/types" "github.com/docker/docker/client" "github.com/shirou/gopsu...
freundlich/fcppt
libs/core/include/fcppt/mpl/map/equal.hpp
<gh_stars>10-100 // Copyright <NAME> 2009 - 2021. // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #ifndef FCPPT_MPL_MAP_EQUAL_HPP_INCLUDED #define FCPPT_MPL_MAP_EQUAL_HPP_INCLUDED #include ...
consected/restructure
app/errors/fs_exception/upload.rb
<gh_stars>1-10 module FsException class Upload < Exception end end
bradrf/kubey
kubey/table_row_popen.py
import subprocess import re from threading import Thread class TableRowPopen(subprocess.Popen): def __init__(self, row_handler, *args, **kwargs): self._row_handler = row_handler kwargs['stdout'] = subprocess.PIPE super(TableRowPopen, self).__init__(*args, **kwargs) self._stdout_th...
qbizns/Android-Uber-Clone
PartnerApp/app/src/main/java/com/tatx/partnerapp/adapter/ViewAllReferralsListAdapter.java
<gh_stars>0 package com.tatx.partnerapp.adapter; import android.content.Context; import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; import android.widget.TextView; import com.squareup.picasso.Pica...
Distrotech/jruby
truffle/src/main/java/org/jruby/truffle/nodes/methods/SetMethodDeclarationContext.java
<reponame>Distrotech/jruby /* * Copyright (c) 2015 Oracle and/or its affiliates. All rights reserved. This * code is released under a tri EPL/GPL/LGPL license. You can use it, * redistribute it and/or modify it under the terms of the: * * Eclipse Public License version 1.0 * GNU General Public License version 2 ...
wyan/ack
plat/linux/libsys/execve.c
#include <unistd.h> #include "libsys.h" int execve(const char *path, char *const argv[], char *const envp[]) { return _syscall(__NR_execve, (quad) path, (quad) argv, (quad) envp); }
andrasigneczi/TravelOptimiser
DataCollector/mozilla/xulrunner-sdk/include/mp4_demuxer/Index.h
/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef INDEX_H_ #define INDEX_H_ #include "MediaData.h" #include "MediaResource.h" #include "mozilla/Monitor.h" ...
WangZixuan/Leetcode
Medium/654 - Maximum Binary Tree.cpp
<gh_stars>10-100 /* Maximum Binary Tree Given an integer array with no duplicates. A maximum tree building on this array is defined as follow: The root is the maximum number in the array. The left subtree is the maximum tree constructed from left part subarray divided by the maximum number. The right subtree is the...
tetai/mymall
onemall-web/admin-dashboard-react/helpers/validator.js
<reponame>tetai/mymall // 校验必须是英文或者数字 export function checkTypeWithEnglishAndNumbers (rule, value, callback, text) { let char = /^[a-zA-Z0-9]+$/ if (char.test(value)) { callback() } else { callback(text) } }
exponentjs/rocker
src/build/commands_test.go
<reponame>exponentjs/rocker /*- * Copyright 2015 Grammarly, 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 * * Unless require...
mparnaudeau/clib2
library/contrib/byteswap/byteswap_swab64.c
<gh_stars>1-10 #if defined(__GNUC__) && defined(__PPC__) /* r3=from, r4=to, r5=len/temp, r6/r7=index, r8/r9=load/store temp, r10=cache hint */ /* This version is unrolled and uses cache-hinting. It appears to gain about 10% * over a non-unrolled, non-hinting version. */ asm("\ .text\n\ .align 2\n\ .globl swab6...
jackx22/fixflow
modules/fixflow-core/src/main/java/com/founder/fix/fixflow/core/impl/cmd/GetStartProcessByUserIdCmd.java
package com.founder.fix.fixflow.core.impl.cmd; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import com.founder.fix.fixflow.core.cache.CacheHandler; import com.founder.fix.fixflow.core.impl.Context; import com.founder.fix.fixflow.core.impl.bpmn.behavior.Pr...
softicar/sqml
com.softicar.sqml.model/src/main/java/com/softicar/sqml/model/builtin/functions/AbstractBuiltInBinaryOperator.java
package com.softicar.sqml.model.builtin.functions; import com.softicar.platform.db.sql.token.SqlSymbol; import com.softicar.sqml.model.expressions.ISqmlExpression; import com.softicar.sqml.model.functions.impl.SqmlFunctionImpl; import com.softicar.sqml.model.generation.ISqmlSelectGenerator; import com.softicar.sqml.mo...
jrtoocool/geo_ushelf
rmagick/ruby/1.8/gems/will_paginate-3.0.pre2/spec/view_helpers/view_example_group.rb
require 'action_dispatch/testing/assertions' class ViewExampleGroup < Spec::Example::ExampleGroup include ActionDispatch::Assertions::SelectorAssertions def assert(value, message) raise message unless value end def paginate(collection = {}, options = {}, &block) if collection.instance_of? Hash...
SaladDais/LLUDP-Encryption
indra/newview/llsearchableui.cpp
<gh_stars>1-10 /** * @file llsearchableui.cpp * * $LicenseInfo:firstyear=2019&license=viewerlgpl$ * Second Life Viewer Source Code * Copyright (C) 2019, Linden Research, 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 publi...
lcarva/chains
vendor/github.com/butuzov/ireturn/config/reject.go
<reponame>lcarva/chains package config import "github.com/butuzov/ireturn/types" // rejectConfig specifies a list of interfaces (keywords, patters and regular expressions) // that are rejected by ireturn as valid to return, any non listed interface are allowed. type rejectConfig struct { *defaultConfig } func rejec...
3846masa-tmp/slack-patron
app/public/src/js/components/Sidebar.js
<gh_stars>0 import React from 'react'; import SidebarHeader from './SidebarHeader'; import SlackChannels from './SlackChannels'; export default React.createClass({ render() { return ( <div className="sidebar"> <SidebarHeader /> <SlackChannels /> </div> ); } });
lieftsatyamShrivastava/JavaSourceAnalyzer
AnalyzerDashboard/src/org/eaSTars/adashboard/converter/impl/DefaultJavaSequenceOutputConverter.java
<gh_stars>0 package org.eaSTars.adashboard.converter.impl; import java.io.ByteArrayOutputStream; import org.eaSTars.adashboard.service.dto.JavaSequenceScript; public class DefaultJavaSequenceOutputConverter extends AbstractJavaSequenceDiagramConverter<ByteArrayOutputStream> { @Override public ByteArrayOutputStrea...
inexor-game/flex
src/entities/domain/Entity.js
<filename>src/entities/domain/Entity.js const EventEmitter = require('events'); const Relationship = require('./Relationship'); /** * @module entities */ // TODO: dependency: https://www.npmjs.com/package/uuid const uuidV4 = require('uuid/v4'); /** * An instance of an entity. */ class Entity extends EventEmitter...
swaplicado/sa-lib-10
src/sa/lib/grid/cell/SGridCellRendererIcon.java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package sa.lib.grid.cell; import java.awt.Component; import javax.swing.ImageIcon; import javax.swing.JLabel; import javax.swing.JTable; import javax.swing.table.DefaultTableCellRenderer; import sa.lib.SLibConsts; impo...
ovejur/hnie
zyjh/src/main/java/cn/edu/hnie/zyjh/function/service/impl/InfChooseServiceImpl.java
<gh_stars>0 package cn.edu.hnie.zyjh.function.service.impl; import java.util.ArrayList; import java.util.Date; import java.util.HashMap; import java.util.List; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import cn.edu.hnie.zyjh.function.dao.InfChoose...
Sproutigy/verve
webserver/src/main/java/com/sproutigy/verve/webserver/actions/FinishWebAction.java
package com.sproutigy.verve.webserver.actions; import com.sproutigy.verve.webserver.HttpRequestContext; import lombok.Data; @Data public class FinishWebAction implements WebAction { public final static FinishWebAction INSTANCE = new FinishWebAction(); @Override public Object execute(HttpRequestContext co...
IceKhan13/ecosystem
tests/utils/test_utils.py
"""Tests for manager.""" import os from unittest import TestCase from ecosystem.models.repository import Repository from ecosystem.utils import parse_submission_issue class TestUtils(TestCase): """Test class for manager functions.""" def setUp(self) -> None: current_dir = os.path.dirname(os.path.abs...
yangyanzhan/code-camp
leetcode/longest-happy-prefix.js
// Hi, I'm Yanzhan. I'm interested in all kinds of algorithmic problems. Also, I'm fascinated with javascript. If you want to learn more about programming problems and javascript, please visit my Youtube Channel (https://www.youtube.com/channel/UCDkz-__gl3frqLexukpG0DA?view_as=subscriber), Twitter Account (https://twit...
solomax/openjpa
openjpa-slice/src/main/java/org/apache/openjpa/slice/DistributedStoreManager.java
<reponame>solomax/openjpa<filename>openjpa-slice/src/main/java/org/apache/openjpa/slice/DistributedStoreManager.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 copy...
SanSYS/fraudbusters
src/main/java/com/rbkmoney/fraudbusters/listener/payment/ResultAggregatorListener.java
<gh_stars>0 package com.rbkmoney.fraudbusters.listener.payment; import com.rbkmoney.fraudbusters.config.KafkaConfig; import com.rbkmoney.fraudbusters.converter.FraudResultToEventConverter; import com.rbkmoney.fraudbusters.domain.FraudResult; import com.rbkmoney.fraudbusters.repository.EventRepository; import lombok.Re...
Torbaz/nestrischamps
public/views/competition_admin.js
const dom = { roomid: document.querySelector('#roomid'), producer_count: document.querySelector('#producer_count'), logo: document.querySelector('#logo input'), bestof: document.querySelector('#bestof'), clear_victories: document.querySelector('#clear_victories'), player_link: do...
Go-Va/lavarun-plugin
src/main/java/me/gong/lavarun/plugin/util/NumberUtils.java
package me.gong.lavarun.plugin.util; import org.bukkit.Location; import org.bukkit.entity.Entity; import org.bukkit.entity.Player; import org.bukkit.util.Vector; import java.security.SecureRandom; import java.text.DecimalFormat; import java.util.HashSet; import java.util.Random; import java.util.Set; public class Nu...