repo_name
stringlengths
6
101
path
stringlengths
4
300
text
stringlengths
7
1.31M
sharon1321/studio
function/python/brightics/common/datatypes/image.py
<filename>function/python/brightics/common/datatypes/image.py<gh_stars>100-1000 import io import struct import numpy as np import cv2 from brightics.common.datatypes import BRTC_CODE, BRTC_CODE_SIZE class Image(object): _data_type = 0 _header_format = '<{}sBIII'.format(BRTC_CODE_SIZE) _pack_format = ''....
buzzonetwo/calcentral
spec/models/concerns/academic_roles_spec.rb
<reponame>buzzonetwo/calcentral<filename>spec/models/concerns/academic_roles_spec.rb<gh_stars>0 describe Concerns::AcademicRoles do shared_examples 'a map of academic status codes to roles' do it 'includes plans and career matchers' do expect(subject.count).to_not eq 0 end it 'defines role code an...
albertoirurueta/irurueta-ar
src/main/java/com/irurueta/ar/sfm/MatchedSamples.java
<reponame>albertoirurueta/irurueta-ar<filename>src/main/java/com/irurueta/ar/sfm/MatchedSamples.java /* * Copyright (C) 2016 <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...
sudhirs745/instagram-clone
src/components/others/stickers/__test__/stickers-mockArray.js
export default [ '/images/stickers/wall.png', '/images/stickers/oracles.png', '/images/stickers/like9.png', ]
googleinterns/gail-dyn
test_deformable.py
# Copyright 2020 Google LLC # # 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 # #     https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
landyking/java-practices
learn-concurrency/src/test/java/com/github/landyking/learnConcurrency/CyclicBarrierTest.java
package com.github.landyking.learnConcurrency; import java.util.concurrent.BrokenBarrierException; import java.util.concurrent.CyclicBarrier; import java.util.concurrent.TimeUnit; /** * Created by landy on 2019/2/28. */ public class CyclicBarrierTest { public static void main(String[] args) throws InterruptedEx...
pilinsin/p2p-verse
crdt/filters.go
<gh_stars>0 package crdtverse import ( "bytes" query "github.com/ipfs/go-datastore/query" "strings" ) //data key: (<pid>)/<category>/(<tKey>) type KeyMatchFilter struct { Key string } func (f KeyMatchFilter) Filter(e query.Entry) bool { keys := strings.Split(strings.TrimPrefix(e.Key, "/"), "/") fKeys := string...
moddingplayground/thematic
src/main/java/net/moddingplayground/thematic/api/BuiltinDecoratables.java
package net.moddingplayground.thematic.api; import net.minecraft.block.Blocks; import net.minecraft.block.MapColor; import net.minecraft.util.Identifier; import net.minecraft.util.registry.Registry; import net.moddingplayground.thematic.api.registry.ThematicRegistry; import net.moddingplayground.thematic.api.theme.Dec...
nadavtal/3dbia
app/containers/Projects/Projects.js
<reponame>nadavtal/3dbia import React, { useState, useEffect, memo, useMemo} from 'react'; import { useHistory} from 'react-router-dom'; import Layout from 'containers/Management/Layout'; import Filters from 'components/Filters/Filters' import { MDBTabPane, MDBTabContent, MDBNav, MDBNavItem, MDBNavLink, MDBR...
ezzatron/overpass-websocket-client
test/suite/core/create-handshake.spec.js
<filename>test/suite/core/create-handshake.spec.js var expect = require('chai').expect var createHandshake = require('../../../core/create-handshake') describe('createHandshake', function () { it('should produce a valid handshake', function () { var mimeType = 'application/json' var actual = new Uint8Array(...
weucode/COMFORT
artifact_evaluation/data/codeCoverage/fuzzilli_generate/661.js
<gh_stars>10-100 function main() { const v2 = 4; // v2 = .integer let v3 = 0; const v4 = v3 + 1; // v4 = .primitive v3 = v4; const v6 = 0; // v6 = .integer let v7 = 0; while ("k**baeaDif" < 9) { } } main();
DeepankarSinha/megoro-kernel
script/cmd/cmd.c
<filename>script/cmd/cmd.c /* *Copyright 2016 <NAME> * */ #include "cmdlist.h" #include "command.h" #include "../sys/system.h" int request(char* cmdline){ int cmdno,chk; char *cmd; cmd=getcmd(cmdline); cmdno=isvalidcmd(cmd); if(cmdno){ chk=exec(cmdno,cmdline); if(chk) return 1;//executed successfully ...
jMonkeyEngine-mirrors/JmeSDK-jayfella-github
src/main/java/com/jayfella/sdk/sdk/tree/scene/LightTreeItem.java
<reponame>jMonkeyEngine-mirrors/JmeSDK-jayfella-github package com.jayfella.sdk.sdk.tree.scene; import com.jayfella.sdk.ext.core.ThreadRunner; import com.jme3.light.Light; import com.jme3.scene.Spatial; import de.jensd.fx.glyphs.fontawesome.FontAwesomeIcon; import de.jensd.fx.glyphs.fontawesome.FontAwesomeIconView; im...
darnellbelcourt99999/aion
modApiServer/src/org/aion/api/server/rpc3/RPCMethods.java
package org.aion.api.server.rpc3; import java.math.BigInteger; import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.Set; import java.util.stream.Collectors; import org.aion.base.AionTransaction; import org.aion.base.AionTxReceipt; import org.aion.base.TxUtil; import org.aio...
ScalablyTyped/SlinkyTyped
o/office-js/src/main/scala/typingsSlinky/officeJs/global/Word/TableRowCollection.scala
package typingsSlinky.officeJs.global.Word import org.scalablytyped.runtime.StObject import scala.scalajs.js import scala.scalajs.js.`|` import scala.scalajs.js.annotation.{JSGlobalScope, JSGlobal, JSImport, JSName, JSBracketAccess} /** * * Contains the collection of the document's TableRow objects. * * [Api ...
openid-certification/-conformance-suite
src/main/java/net/openid/conformance/condition/client/FAPIBrazilConsentEndpointResponseValidatePermissions.java
package net.openid.conformance.condition.client; import com.google.gson.JsonArray; import com.google.gson.JsonElement; import net.openid.conformance.condition.AbstractCondition; import net.openid.conformance.condition.PostEnvironment; import net.openid.conformance.condition.PreEnvironment; import net.openid.conformanc...
suomenriistakeskus/oma-riista-web
src/generated/java/fi/riista/sql/SQSpatialRefSys.java
<gh_stars>10-100 package fi.riista.sql; import static com.querydsl.core.types.PathMetadataFactory.*; import com.querydsl.core.types.dsl.*; import com.querydsl.core.types.PathMetadata; import javax.annotation.Generated; import com.querydsl.core.types.Path; import com.querydsl.sql.ColumnMetadata; import java.sql.Type...
Sheetal0601/InterviewBit
06_Trees/min_depth_of_binary_tree.py
# Min Depth of Binary Tree # https://www.interviewbit.com/problems/min-depth-of-binary-tree/ # # Given a binary tree, find its minimum depth. # # The minimum depth is the number of nodes along the shortest path from the root node down to the nearest leaf node. # # NOTE : The path has to end on a leaf node. # Example :...
icarazob/mr4c
java/src/java/com/google/mr4c/hadoop/MR4CGenericOptionsParser.java
/** * Copyright 2014 Google Inc. 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 requir...
bitnami/bitnami-ui
packages/hex-docs/gulpfile.js
<gh_stars>1-10 // Libraries const gulp = require('gulp'); // Docs const aigis = require('gulp-aigis'); // Paths const path = require('path'); const join = path.join.bind(__dirname); // Images const imageDist = join('../hex/dist/images'); // Compile documentation const compileDocs = () => { return gulp.src(join('c...
ICT4H/dcs-web
func_tests/pages/activitylogpage/show_activity_log_page.py
# vim: ai ts=4 sts=4 et sw=4 encoding=utf-8 import re from framework.utils.common_utils import by_css from pages.page import Page from pages.activitylogpage.show_activity_log_locator import * class ShowActivityLogPage(Page): def __init__(self, driver): Page.__init__(self, driver) def get_data_on_cel...
meghasfdc/jmc
application/org.openjdk.jmc.rjmx.services.jfr/src/main/java/org/openjdk/jmc/rjmx/services/jfr/internal/EventOptionsToolkitV1.java
<filename>application/org.openjdk.jmc.rjmx.services.jfr/src/main/java/org/openjdk/jmc/rjmx/services/jfr/internal/EventOptionsToolkitV1.java /* * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * The contents of this file ar...
tmarback/modular-commands
src/main/java/dev/sympho/modular_commands/execute/StaticPrefix.java
package dev.sympho.modular_commands.execute; import org.checkerframework.checker.nullness.qual.Nullable; import discord4j.common.util.Snowflake; /** * Prefix provider that only uses a static prefix determined at construction time. * * @param prefix The prefix to use. * @version 1.0 * @since 1.0 */ public recor...
broadinstitute/single_cell_portal_core
test/models/upload_cleanup_job_test.rb
<reponame>broadinstitute/single_cell_portal_core<filename>test/models/upload_cleanup_job_test.rb require 'test_helper' class UploadCleanupJobTest < ActiveSupport::TestCase def setup @study = Study.first end def teardown @study.study_files.where(file_type: 'Other').destroy_all end test 'should auto...
djforth/react-search
test_assets/javascripts/tab_search.es6.js
<reponame>djforth/react-search<filename>test_assets/javascripts/tab_search.es6.js require("babelify/polyfill"); const React = require("react"); const ReactDOM = require("react-dom"); const Search = require("../../vanilla") const Tab = Search.Tab.Search; console.log('WTF'); let columns = [ {key:"id"}, {key:"ti...
MDC01/News
app/src/main/java/com/jaydenxiao/androidfire/app/AppConstant.java
<gh_stars>0 package com.jaydenxiao.androidfire.app; /** * des: * Created by xsf * on 2016.09.10:44 */ public class AppConstant { public static final String HOME_CURRENT_TAB_POSITION="HOME_CURRENT_TAB_POSITION"; public static final String MENU_SHOW_HIDE="MENU_SHOW_HIDE"; /* 新闻*/ public static fina...
lechium/iOS1351Headers
System/Library/PrivateFrameworks/AssistantUI.framework/AFUIVoicemailPlayer.h
<reponame>lechium/iOS1351Headers /* * This header is generated by classdump-dyld 1.5 * on Wednesday, October 27, 2021 at 3:17:47 PM Mountain Standard Time * Operating System: Version 13.5.1 (Build 17F80) * Image Source: /System/...
cri-lab-hbku/AIS_CAESAR
src/arith_coder-3/hashtable.c
<filename>src/arith_coder-3/hashtable.c /****************************************************************************** File: hashtable.c Authors: <NAME> (<EMAIL>) <NAME> (<EMAIL>) Purpose: Data compression using a word-based model and revised arithmetic coding method. Based on: <NAME>, <NAME>, <N...
timboudreau/ANTLR4-Plugins-for-NetBeans
antlr-editing-plugins/antlr-live-language-editors/src/main/java/org/nemesis/antlr/live/language/coloring/AdhocColorings.java
/* * Copyright 2016-2019 <NAME>, <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 ag...
theothertomelliott/tic-tac-toverengineered
common/http/param/parse_test.go
package param_test import ( "net/http/httptest" "testing" "github.com/stretchr/testify/assert" "github.com/theothertomelliott/tic-tac-toverengineered/common/http/param" ) func TestParseString(t *testing.T) { var got string req := httptest.NewRequest("GET", "/?str=value", nil) err := param.Parse(req, "str", &g...
wuhulala/spring-test-code
spring-normal/src/test/java/Client.java
import com.wuhulala.spring.Application; import com.wuhulala.spring.aop.AOPService; import com.wuhulala.spring.aop.AService; import com.wuhulala.spring.properties.Properties; import org.junit.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration...
asa3311/Sentinel
sentinel-agent/sentinel-agent-client/src/main/java/com/taobao/diamond/domain/ConfigInfoBaseEx.java
package com.taobao.diamond.domain; /** * 不能增加字段,为了兼容老前台接口(老接口增加一个字段会出现不兼容问题)设置的model。 * * @author water.lyl * */ public class ConfigInfoBaseEx extends ConfigInfoBase { private static final long serialVersionUID = -1L; //不能增加字段 // 批量查询时, 单条数据的状态码, 具体的状态码在Constants.java中 private int status; // 批量查询时, 单条数据的信息...
importlib/klib
master/core/third/loki/include/loki/ForEachType.h
//////////////////////////////////////////////////////////////////////////////// // The Loki Library // Copyright (C) 2009 <NAME> // Copyright (c) 2009 <NAME> // Code covered by the MIT License // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated document...
metux/chromium-deb
chrome/browser/chromeos/printing/printer_event_tracker_unittest.cc
<gh_stars>0 // Copyright 2017 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. #include "chrome/browser/chromeos/printing/printer_event_tracker.h" #include "base/macros.h" #include "base/time/time.h" #include "chromeos/p...
yukarinoki/docplex-examples
examples/mp/modeling/production.py
<filename>examples/mp/modeling/production.py # -------------------------------------------------------------------------- # Source file provided under Apache License, Version 2.0, January 2004, # http://www.apache.org/licenses/ # (c) Copyright IBM Corp. 2015, 2018 # -----------------------------------------------------...
niekvandael/Framework
Frontend/modules/common/commonModels.js
<filename>Frontend/modules/common/commonModels.js<gh_stars>0 /** * CREATED BY NVD ON 1-apr.-2014 13:57:41 * * Package : modules/common Filename : commonModels.js */ function commonModels() { this.CH000S0W_COMMON = new CH000S0W_COMMON(); this.CH000SEW_SYS_ERROR = new CH000SEW_SYS_ERROR(); this.CH000S0W...
Sam-2019/Okukus
src/OkukusPages/Container/View/View.js
import React from "react"; import { NavLink } from "react-router-dom"; import PropTypes from "prop-types"; import { okukus } from "../../endpoints"; import "./view.css"; const View = ({ cover_photo_url, product_name, unit_price, unique_id }) => { return ( <NavLink to={`/product/${unique_id}`} className="view_wr...
yasyf/elasticsearch-ruby
elasticsearch-dsl/spec/elasticsearch/dsl/search/aggregations/geo_grid_spec.rb
# Licensed to Elasticsearch B.V under one or more agreements. # Elasticsearch B.V licenses this file to you under the Apache 2.0 License. # See the LICENSE file in the project root for more information require 'spec_helper' describe Elasticsearch::DSL::Search::Aggregations::GeohashGrid do let(:search) do descr...
godontop/python-work
loop_return.py
def sum(x): res = 0 for i in range(x): res += i # return res return res # Don't put the return in for loop, or the for loop will just run one time, # then quit. print(sum(10))
zephraph/saasify
packages/saasify-openapi-utils/lib/openapi-service-params-to-json-schema.js
<filename>packages/saasify-openapi-utils/lib/openapi-service-params-to-json-schema.js 'use strict' const cloneDeep = require('clone-deep') const createError = require('http-errors') const refParser = require('json-schema-ref-parser') const serviceToPathItem = require('./service-to-path-item') // TODO: use https://gi...
pirxpilot/mapbox-gl-js
src/symbol/projection.js
'use strict'; const Point = require('@mapbox/point-geometry'); const { mat4, vec4 } = require('@mapbox/gl-matrix'); const symbolSize = require('./symbol_size'); const { addDynamicAttributes } = require('../data/bucket/symbol_bucket'); const properties = require('../style/style_layer/symbol_style_layer_properties'); c...
juseongkr/BOJ
acmicpc/3172.cpp
<reponame>juseongkr/BOJ #include <iostream> #include <algorithm> #include <vector> using namespace std; #define MAX 100001 int n; int tree[MAX*4]; vector<string> vec; vector<pair<string, int>> rev; string s; void update(int i, int diff) { while (i <= n) { tree[i] += diff; i += (i & -i); } } int sum(int i) { i...
lcsm29/project-euler
py/py_0380_amazing_mazes!.py
<filename>py/py_0380_amazing_mazes!.py<gh_stars>0 # Solution of; # Project Euler Problem 380: Amazing Mazes! # https://projecteuler.net/problem=380 # # An m×n maze is an m×n rectangular grid with walls placed between grid cells # such that there is exactly one path from the top-left square to any other # square. The...
wtrocki/aerogear-android-sdk
example/src/main/java/org/aerogear/mobile/example/ui/BaseFragment.java
<gh_stars>0 package org.aerogear.mobile.example.ui; import android.os.Bundle; import android.support.annotation.LayoutRes; import android.support.annotation.NonNull; import android.support.annotation.Nullable; import android.support.v4.app.Fragment; import android.view.LayoutInflater; import android.view.View; import ...
nabils/jackrabbit
jackrabbit-core/src/test/java/org/apache/jackrabbit/core/lock/ExtendedLockingTest.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...
DistributedMonitoringSystem/open-falcon-backend
common/gin/config.go
// Some convenient utility for usage of gin framework // // JSON service // // ginConfig := &GinConfig{ // Mode: gin.ReleaseMode, // Host: "localhost", // Port: 8080, // } // engine := NewDefaultJsonEngine(ginConfig) // // // Start service // // StartServiceOrExit(engine, ginConfig) // // // Binds the engin...
wh00sh/Tanda-DAPP
node_modules/mdi-material-ui/ChessBishop.js
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var _createIcon = _interopRequireDefault(require("./util/createIcon")); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } var _default = (0, _createIcon["defaul...
frostingwolf/saluki
saluki-core/src/main/java/io/github/saluki/grpc/client/internal/unary/GrpcHystrixCommand.java
<gh_stars>10-100 /* * Copyright 1999-2012 DianRong. * * 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 l...
toddstrader/slang
source/binding/SystemSubroutine.cpp
<reponame>toddstrader/slang<filename>source/binding/SystemSubroutine.cpp<gh_stars>0 //------------------------------------------------------------------------------ // SystemSubroutine.cpp // System-defined subroutine handling. // // File is under the MIT license; see LICENSE for details. //----------------------------...
sejust/cubefs-blobstore
blobnode/chunk.go
// Copyright 2022 The CubeFS 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 applicable law or agree...
ntiufalara/openerp7
openerp/tests/__init__.py
<gh_stars>1-10 # -*- coding: utf-8 -*- """ Tests for the OpenERP library. This module groups a few sub-modules containing unittest2 test cases. Tests can be explicitely added to the `fast_suite` or `checks` lists or not. See the :ref:`test-framework` section in the :ref:`features` list. """ import test_acl import te...
ZieIony/Ghurund
engine/Engine.UI/src/ui/widget/button/CheckBoxRadio.cpp
<gh_stars>10-100 #include "ghuipch.h" #include "CheckBoxRadio.h" #include "ui/control/ImageView.h" #include "ui/widget/StateIndicator.h" namespace Ghurund::UI { void CheckBoxRadioStyle::onStateChanged(Control& control) const { Widget<CheckBoxBinding>& checkBoxRadio = (Widget<CheckBoxBinding>&)control; ...
shwetasshinde24/Panoply
case-studies/tor/src/App/IO/sysctl_ocall.cpp
#include <sys/sysctl.h> #include <TorEnclave_u.h> int ocall_sysctl (int *name, int nlen, void *oldval, size_t *oldlenp, void *newval, size_t newlen) { return sysctl(name, nlen, oldval, oldlenp, newval, newlen); }
devs-7/bible-projector-python
src/widgets/chapter_widget/chapter_verse_widget/__init__.py
from PyQt5 import QtGui, QtWidgets from PyQt5.QtCore import pyqtSignal from src.models.verse import Verse from .container import Container from .verse_number_label import VerseNumberLabel from .verse_text_label import VerseTextLabel class ChapterVerseWidget(QtWidgets.QWidget): verse: Verse list_widget_item: ...
moensun/rpc
src/test/java/com/linda/framework/rpc/aio/SocketAcceptHandler.java
package com.linda.framework.rpc.aio; import java.nio.channels.CompletionHandler; public class SocketAcceptHandler<V,A> implements CompletionHandler<V,A>{ @Override public void completed(V result, A attachment) { } @Override public void failed(Throwable exc, A attachment) { } }
Edraak/code-dot-or
apps/src/sites/studio/pages/init/loadFish.js
<filename>apps/src/sites/studio/pages/init/loadFish.js import appMain from '@cdo/apps/appMain'; import {singleton as studioApp} from '@cdo/apps/StudioApp'; import Fish from '@cdo/apps/fish/Fish'; import skins from '@cdo/apps/skins'; import levels from '@cdo/apps/fish/levels'; export default function loadFish(options) ...
Karumi/FlowUpAndroidSDK
flowup/src/main/java/io/flowup/collectors/CPUUsageCollector.java
/* * Copyright (C) 2016 <NAME>. */ package io.flowup.collectors; import com.codahale.metrics.CachedGauge; import com.codahale.metrics.MetricRegistry; import io.flowup.android.App; import io.flowup.android.CPU; import io.flowup.metricnames.MetricNamesGenerator; import java.util.concurrent.TimeUnit; class CPUUsageCo...
twothinkinc/node-celery-ts
dist/utility.js
<filename>dist/utility.js "use strict"; var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { fun...
DEFRA/gwa-web
server/lib/data/validate-users.js
const schema = require('./user-schema') /** * Validate a list of users against a [Joi](https://joi.dev/) schema. * * @param {Array} users * @return {object} consisting of two arrays, `valid` and `nonValid`. `valid` * contains the original value of the user. `nonValid` contains a * [Joi validate result object](ht...
Thav/freehub
test/functional/reports_controller_test.rb
require 'test_helper' class ReportsControllerTest < ActionController::TestCase def setup super login_as 'greeter' end def test_index get :index, :organization_key => 'sfbk' assert_response :success end def test_visits_report get :visits, :organization_key => 'sfbk', :report...
RayDeeA/rbm2014
CBIRProjekt/CBIR_Project/src/de/htw/iconn/views/InImageDetectorController.java
package de.htw.iconn.views; import de.htw.iconn.main.AController; import de.htw.iconn.main.BenchmarkModel; import java.net.URL; import java.util.ArrayList; import java.util.Iterator; import java.util.List; import java.util.ListIterator; import java.util.ResourceBundle; import java.util.Set; import java.util.TreeMap; ...
qq573011406/FASTBuild_UnrealEngine
Code/Tools/FBuild/FBuildTest/Data/TestCache/LightCache_IncludeUsingMacro2/header1.h
// define macro for use by file that includes this header #define INCLUDE_VIA_MACRO "header2.h"
PlayWithSanLei/JavaProjects
OnJava8-Examples/housekeeping/SimpleConstructor2.java
<reponame>PlayWithSanLei/JavaProjects // housekeeping/SimpleConstructor2.java // (c)2021 MindView LLC: see Copyright.txt // We make no guarantees that this code is fit for any purpose. // Visit http://OnJava8.com for more book information. // Constructors can have parameters class Rock2 { Rock2(int i) { System.o...
EVATool/evatool-backend
src/test/java/com/evatool/domain/repository/DataTest.java
<gh_stars>0 package com.evatool.domain.repository; import com.evatool.application.dto.*; import com.evatool.application.mapper.*; import com.evatool.application.service.impl.*; import com.evatool.common.enums.StakeholderLevel; import com.evatool.common.enums.StakeholderPriority; import com.evatool.domain.entity.*; imp...
debesheedas/MyMargdarshaka-2
backend/models/feedback.model.js
//@ts-check /* * The feedback collection is used to store all issues submitted by users as feedback * They will be fetched and available for the admin to resolve them */ const mongoose = require("mongoose"); const Schema = mongoose.Schema; let Feedback = new Schema({ phone: { type: String, required: true,...
RuiDTLima/diffuzz
evaluation/themis_tourplanner_unsafe/src/main/java/com/graphhopper/storage/LockFactory.java
package com.graphhopper.storage; import com.graphhopper.storage.Lock; import java.io.File; public interface LockFactory { void setLockDir(File var1); Lock create(String var1, boolean var2); void forceRemove(String var1, boolean var2); }
Charismara/BlutmondRPG
src/main/java/de/blutmondgilde/blutmondrpg/interfaces/IClassWeapon.java
<gh_stars>1-10 package de.blutmondgilde.blutmondrpg.interfaces; import de.blutmondgilde.blutmondrpg.enums.ItemRarities; import de.blutmondgilde.blutmondrpg.enums.WeaponAttributeTypes; import de.blutmondgilde.blutmondrpg.enums.WeaponTypes; import java.util.Map; public interface IClassWeapon { ItemRarities getRari...
wujia28762/Tmate
App/src/main/java/com/honyum/elevatorMan/utils/SQLiteUtils.java
package com.honyum.elevatorMan.utils; import android.content.Context; import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; import android.util.Log; /** * Created by chang on 2016/3/4. */ public class SQLiteUtils { private static final String TAG = "SQLiteUtils"; /** * 打开db文件...
loye168/tddl5
tddl-repo-hbase/src/main/java/com/taobao/ustore/repo/hbase/RowCoderSample3.java
package com.taobao.ustore.repo.hbase; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; import java.util.HashMap; import java.util.Map; public class RowCoderSample3 extends AbstractRowCoder { public RowCoderSample3(TablePhysicalSchema schema){ super(schema); }...
HeadassHouse/loremaster-backend
src/resolvers/utils/__tests__/hash.test.js
const bcrypt = require('bcrypt'); const { hash } = require('..'); jest.mock('bcrypt'); describe('hashing functions', () => { beforeEach(() => { bcrypt.compare.mockReturnValue(true); bcrypt.hash.mockReturnValue('abcdef'); }); it('should return a hashed value', async () => { const hashedData = await ...
Minecraftian14/Webicity
src/main/java/everyos.browser.javadom/everyos/browser/javadom/intf/CharacterData.java
<reponame>Minecraftian14/Webicity<filename>src/main/java/everyos.browser.javadom/everyos/browser/javadom/intf/CharacterData.java package everyos.browser.javadom.intf; public interface CharacterData extends Node { void appendData(String data); default void appendData(char data) { appendData(String.valueOf(d...
Antolin1/TCRMG-GNN
java/rdsSimplified/src-gen/rdsSimplified/impl/RdsSimplifiedPackageImpl.java
/** */ package rdsSimplified.impl; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.EPackage; import org.eclipse.emf.ecore.EReference; import org.eclipse.emf.ecore.impl.EPackageImpl; import rdsSimplified.Column; import rdsSimplified.Database; import rdsSimplified.Element; import rdsSimplified.Index...
DearbhailRicePA/gateway-web
test/Loading.test.js
<gh_stars>1-10 import React from 'react'; import Loading from '../src/pages/commonComponents/Loading'; describe('<Loading /> rendering', () => { it('renders without crashing', () => { const wrapper = shallow(<Loading />); }); });
gputtley/cmssw
DataFormats/ParticleFlowReco/interface/ConvBremSeed.h
#ifndef ConvBremSeed_h #define ConvBremSeed_h 1 /** \class reco::ConvBremSeed * * ConvBremSeed is a seed object constructed from a supercluster and 2 PixelRecHits * * \author <NAME> * * \version 1st Version Oct 6, 2008 * ************************************************************/ #include "DataFormats/...
cas-bigdatalab/vdb-4.0
src/main/java/vdb/mydb/jsp/RequestHandler.java
<reponame>cas-bigdatalab/vdb-4.0 package vdb.mydb.jsp; import java.io.IOException; import javax.servlet.FilterChain; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; public interface RequestHandler { /** * @return DO NOT continue n...
cuebook/turnilo
build/common/utils/plywood/duration.js
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var chronoshift_1 = require("chronoshift"); function isValidDuration(input) { try { chronoshift_1.Duration.fromJS(input); return true; } catch (_a) { return false; } } exports.isValidDuration = isValidDu...
fuzzdota/chromeapp-native-messaging-sample
app/bower_components/neon-animation/demo/grid/index.html.0.js
<reponame>fuzzdota/chromeapp-native-messaging-sample var scope = document.querySelector('template[is="dom-bind"]'); scope._onTileClick = function(event) { this.$['fullsize-card'].color = event.detail.data.color; this.$.pages.selected = 1; }; scope._onFullsizeClick = function(...
alexras/boomslang
BrokenAxisPlot.py
import matplotlib.axes import matplotlib.transforms import matplotlib.ticker as mticker from boomslang import Plot import numpy as np class BrokenAxesPiece(matplotlib.axes.Axes): def __init__(self, fig, rect, axisbg=None, frameon=True, sharex=None, sharey=None, label='', xscale=None, yscale...
user1095108/generic
obsolete/arraydelegate.hpp
#ifndef ARRAYDELEGATE_HPP # define ARRAYDELEGATE_HPP # pragma once #include <cassert> #include <cstddef> #include <new> #include <type_traits> #include <utility> namespace generic { template <typename T> class arraydelegate; template<class R, class ...A> class arraydelegate<R (A...)> { static constexpr auto m...
mitodl/ol-django
tests/mitol/common/utils/test_currency.py
<filename>tests/mitol/common/utils/test_currency.py<gh_stars>1-10 """Utils tests""" from decimal import Decimal import pytest from mitol.common.utils.currency import format_price @pytest.mark.parametrize( "price,expected", [[Decimal("0"), "$0.00"], [Decimal("1234567.89"), "$1,234,567.89"]], ) def test_forma...
nathan-slv017/Aulas
estruturas de dados e alg em js/cap2/index.js
let movie = 'Lord of the Rings' function startWarsFan(){ const movie = 'Star War'; return movie } function marvelFan(){ movie = 'The avengers'; return movie } function blizzardFan(){ const isFan = true let phase = 'Warcraft'; console.log('Before if ' + phase); if(isFan){ let ...
Vishal1003/vHelp
Backend/models/item.js
<gh_stars>1-10 const mongoose = require("mongoose"); const itemSchema = mongoose.Schema({ name: { type: String, required: true }, cost: { type: Number, required: true }, category: { type: mongoose.Schema.Types.ObjectId, ref: "Category", requir...
Duli1986/coreui-free-react-admin-template
modules/customer-crm-app/node_modules/ramda-extension/es/__tests__/noop-test.js
<gh_stars>0 import { noop } from '../'; describe('noop', function () { it('returns null', function () { expect(noop()).toBe(null); }); });
feihua666/feihua-framework
feihua-framework-scheduler-service/feihua-framework-scheduler-service-impl/src/main/java/com/feihua/framework/scheduler/impl/ApiSchedulerServiceImpl.java
package com.feihua.framework.scheduler.impl; import com.feihua.exception.DataNotFoundException; import com.feihua.framework.scheduler.QuartzSchedulerUtils; import com.feihua.framework.scheduler.api.ApiBaseQuartzJobManager; import com.feihua.framework.scheduler.api.ApiSchedulerPoService; import com.feihua.framework.sch...
bertt1t11/Java
Set 2/MyCanvas.java
import java.awt.*; import javax.swing.JFrame; public class MyCanvas extends Canvas{ public void paint(Graphics g) { Toolkit t=Toolkit.getDefaultToolkit(); Image i=t.getImage("mobile-communication-home.png"); g.drawImage(i, 120,100,this); } public static void main(Str...
akrisiun/vscode
out/vs/workbench/contrib/tasks/common/taskTemplates.js
<reponame>akrisiun/vscode<gh_stars>1-10 /*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *-----------------------...
banzsolt/wot-api
lib/wargaming_api/wargaming_net.rb
<reponame>banzsolt/wot-api require 'wargaming_api/request' module WargamingApi class WargamingApi::WargamingNet < WargamingApi::Request puts 'WargamingNet loaded.' end end
hispindia/BIHAR-2.7
dhis-2/dhis-api/src/main/java/org/hisp/dhis/message/MessageConversation.java
<gh_stars>0 package org.hisp.dhis.message; /* * Copyright (c) 2004-2012, University of Oslo * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain th...
eyedeekay/rain
internal/pexlist/pexlist.go
<reponame>eyedeekay/rain package pexlist import ( "net" "strings" "github.com/cenkalti/rain/internal/tracker" ) const ( // BEP 11: Except for the initial PEX message the combined amount of added v4/v6 contacts should not exceed 50 entries. // The same applies to dropped entries. maxPeers = 50 ) type PEXList s...
BlueCodeSystems/opensrp-client-chw
opensrp-chw/src/test/java/org/smartregister/chw/actionhelper/ANCCardActionTest.java
package org.smartregister.chw.actionhelper; import android.content.Context; import org.json.JSONObject; import org.junit.Assert; import org.junit.Test; import org.robolectric.RuntimeEnvironment; import org.robolectric.util.ReflectionHelpers; import org.smartregister.chw.BaseUnitTest; import org.smartregister.chw.R; i...
BestJex/redragon-erp
erp-parent/erp-masterData/src/main/java/com/erp/masterdata/vendor/dao/model/MdVendorLicenseCO.java
<reponame>BestJex/redragon-erp package com.erp.masterdata.vendor.dao.model; import com.erp.masterdata.vendor.dao.model.MdVendorLicense; public class MdVendorLicenseCO extends MdVendorLicense implements java.io.Serializable { // serialVersionUID private static final long serialVersionUID = 1L; }
labs12-section-calendar-template/Front-End
calendr/src/components/login/Register.js
<reponame>labs12-section-calendar-template/Front-End<filename>calendr/src/components/login/Register.js import React, { Component } from 'react' import axios from 'axios' import styled from 'styled-components'; // Currently not being used. Meant for manual registration const url = "https://calendrserver.herokuapp.com/...
getsproud/react-app
src/contexts/SettingsContext.js
<reponame>getsproud/react-app import { createContext, useEffect, useState } from 'react'; import PropTypes from 'prop-types'; import { THEMES } from '../constants'; const initialSettings = { compact: true, responsiveFontSizes: true, roundedCorners: true, theme: THEMES.DARK }; export const restoreSettings = ()...
cityofaustin/joplin
joplin/users/fixtures/administrative/superadmin.py
import os from django.conf import settings from django.core.exceptions import ValidationError from users.fixtures.helpers.create_fixture import create_fixture # An user for API Testing. # Should be loaded on "test" Joplin branch only. def superadmin(): user_data = { "email": "<EMAIL>", "is_superus...
goline/lapi
body_test.go
package lapi import ( "github.com/goline/errors" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" "strings" ) var _ = Describe("Body", func() { It("NewBody should return an instance of Body", func() { Expect(NewBag()).NotTo(BeNil()) }) }) type sampleBodyItem struct { Price float64 `json:"price"` } ty...
micromall-team/micromall
micromall-service/src/main/java/run/micromall/micromall/service/shop/service/MicromallCommentService.java
<filename>micromall-service/src/main/java/run/micromall/micromall/service/shop/service/MicromallCommentService.java package run.micromall.micromall.service.shop.service; import cn.hutool.core.util.StrUtil; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.toolkit....
jefbed/jbwm
title_bar.h
<reponame>jefbed/jbwm // jbwm - Minimalist Window Manager for X // Copyright 2008-2020, <NAME> <<EMAIL>> // Copyright 1999-2015, <NAME> <<EMAIL>> // See README for license and other details. #ifndef JBWM_TITLE_BAR_H #define JBWM_TITLE_BAR_H struct JBWMClient; void jbwm_toggle_shade(struct JBWMClient * c); void jbwm_upd...
chenjiaxing6/pocket-shop
pocket-shop-web-admin/src/main/java/cn/ishangit/shop/web/admin/abstracts/AbstractBaseController.java
<filename>pocket-shop-web-admin/src/main/java/cn/ishangit/shop/web/admin/abstracts/AbstractBaseController.java package cn.ishangit.shop.web.admin.abstracts; import cn.ishangit.shop.commons.dto.BaseResult; import cn.ishangit.shop.commons.dto.PageInfo; import cn.ishangit.shop.commons.persistence.BaseEntity; import cn.is...
Embodimentgeniuslm3/BDB11A0E2DE062D2E39E4C5301B2FE5E
script/lib/update-dependency/spec/pull-request-spec.js
const nock = require('nock'); const { createPR, findPR } = require('../pull-request'); const createPrResponse = require('./fixtures/create-pr-response.json'); const searchResponse = require('./fixtures/search-response.json'); describe('Pull Request', () => { it('Should create a pull request', async () => { const...
bkachinthay/squash-ladder
app/containers/App/AlertContainer.js
import React from 'react'; import { connect } from 'react-redux'; import { createStructuredSelector } from 'reselect'; import Alert from 'components/Alert'; import { makeSelectAlertText } from './selectors'; import { setAlertMessage } from './actions'; const AlertContainer = (props) => (<Alert {...props} />); const m...