repo_name
stringlengths
6
101
path
stringlengths
4
300
text
stringlengths
7
1.31M
ollfkaih/lego
lego/apps/events/migrations/0016_auto_20180223_1614.py
<reponame>ollfkaih/lego # Generated by Django 2.0.2 on 2018-02-23 16:14 import django.db.models.deletion from django.db import migrations, models class Migration(migrations.Migration): dependencies = [("events", "0015_event_responsible_group")] operations = [ migrations.AlterField( mode...
PhenixRTS/PlatformTesting
scripts/run.js
/** * Copyright 2020 Phenix Real Time Solutions, 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 * * Unle...
paulmach/osmzen
util/streetnames/shorten_test.go
<reponame>paulmach/osmzen package streetnames import "testing" func TestShorten(t *testing.T) { cases := []struct { in, out string }{ {"Wodehouse Avenue", "Wodehouse Ave."}, {"Wodehouse Rd", "Wodehouse Rd."}, {"Wodehouse Street North", "Wodehouse St. N"}, {"South Wodehouse Boulevard", "S Wodehouse Blvd."}...
ibalajiarun/go-consensus
protocols/dqpbft/dqpbftpb/types.go
<gh_stars>1-10 package dqpbftpb import ( "bytes" fmt "fmt" proto "github.com/gogo/protobuf/proto" "github.com/ibalajiarun/go-consensus/peer/peerpb" ) type Index uint64 type View uint64 func (idx *Index) GetAndIncrement() Index { index := *idx *idx = *idx + 1 return index } func (m *InstanceState) IsPrePrep...
fallingsoulm/easy-archetype-module
easy-archetype-security/easy-archetype-security-starter/src/main/java/io/github/fallingsoulm/easy/archetype/security/oauth/TokenConfig.java
<gh_stars>0 package io.github.fallingsoulm.easy.archetype.security.oauth; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Co...
NextZeus/beyond-webapp
unicom/libs/vmss/index.js
<reponame>NextZeus/beyond-webapp var soap = require('soap'); var path = require('path'); var async = require('async'); var soapClient; var VMSS = {}; VMSS.soap = function(next) { if (soapClient) return next(); // create soap client soap.createClient( path.join(__dirname, 'wsdl.xml'), function(err, client) { ...
DragonJoker/Aria
source/Aria/Database/DbParameteredObject.cpp
<reponame>DragonJoker/Aria #include "Database/DbParameteredObject.hpp" #include "Database/DbParameter.hpp" #include <algorithm> #include <sstream> namespace aria::db { static const std::string ERROR_DB_PARAMETER_INDEX = "No query parameter at index: "; static const std::string ERROR_DB_PARAMETER_NAME = "No query p...
kimjand/cxf
distribution/src/main/release/samples/jax_rs/tracing_opentracing_camel/src/main/java/demo/jaxrs/tracing/server/camel/Server.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 m...
zhangkn/iOS14Header
System/Library/Frameworks/PhotosUI.framework/PUEditExtensionActivityViewController.h
/* * This header is generated by classdump-dyld 1.0 * on Monday, September 28, 2020 at 5:54:49 PM Mountain Standard Time * Operating System: Version 14.0 (Build 18A373) * Image Source: /System/Library/Frameworks/PhotosUI.framewo...
felipecosta09/cloudone-workload-controltower-lifecycle
source/deepsecurity/api/computer_groups_api.py
<reponame>felipecosta09/cloudone-workload-controltower-lifecycle<filename>source/deepsecurity/api/computer_groups_api.py # coding: utf-8 """ Trend Micro Deep Security API Copyright 2018 - 2020 Trend Micro Incorporated.<br/>Get protected, stay secured, and keep informed with Trend Micro Deep Security's ne...
zenglongGH/spresense
sdk/modules/include/bluetooth/hal/bt_event.h
<reponame>zenglongGH/spresense<filename>sdk/modules/include/bluetooth/hal/bt_event.h<gh_stars>100-1000 /**************************************************************************** * modules/include/bluetooth/hal/bt_event.h * * Copyright 2018 Sony Semiconductor Solutions Corporation * * Redistribution and use in...
marco-foscato/Lib-INVENT
tests/unit_tests/fixtures/paths.py
<reponame>marco-foscato/Lib-INVENT import os import json from definitions import ROOT_DIR with open(os.path.join(ROOT_DIR, 'configurations/config.json'), 'r') as f: config = json.load(f) MAIN_TEST_PATH = config["MAIN_TEST_PATH"] MODEL_PATH = f'{ROOT_DIR}/trained_models/recap.model' CHEMBL_TL_MODEL_PATH = f'{ROO...
EikeStein/replication-kit-chp-study
code/gumtree/core/src/test/java/com/github/gumtreediff/test/TestOptimizedMatchers.java
<filename>code/gumtree/core/src/test/java/com/github/gumtreediff/test/TestOptimizedMatchers.java /* * This file is part of GumTree. * * GumTree is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, eithe...
bmunozi/onesaitplatform-cloud
sources/modules/control-panel/src/main/resources/static/dataflow/3.3.0/common/directives/recordTree/recordTree.js
/* * Copyright 2017 StreamSets 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 required by applicable law or agreed...
mrm-xiefan/lunania-ai
catvsdog/01_job/predict.py
<gh_stars>10-100 import os import utils import config import traceback import argparse import logging.config from luna import LunaExcepion logging.config.fileConfig("logging.conf") logger = logging.getLogger() os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3' def parse_args(): parser = argparse.ArgumentParser() pars...
zhuaiballl/venus_lite
tools/gengen/util/testing.go
package gengen import ( "fmt" "github.com/filecoin-project/go-state-types/abi" "github.com/filecoin-project/specs-actors/v6/actors/builtin/market" "github.com/filecoin-project/specs-actors/v6/actors/builtin/miner" tutil "github.com/filecoin-project/specs-actors/v6/support/testing" "github.com/filecoin-project/ve...
dandycheung/curlconverter
test/fixtures/javascript/post_json_multiple_headers.js
<reponame>dandycheung/curlconverter fetch('https://localhost:28139/rest/login-sessions', { method: 'POST', headers: { 'Content-Type': 'application/json', 'X-API-Version': '200' }, // body: '{"userName":"username123","password":"<PASSWORD>", "authLoginDomain":"local"}', body: JSON.str...
redshark2016/base_springmvc
src/base/main/com/redshark/model/User.java
package com.redshark.model; import java.io.Serializable; import java.util.Date; import java.util.List; import javax.management.relation.RoleInfo; public class User implements Serializable { private static final long serialVersionUID = -2465519067844351347L; private String id; private String user_name; private S...
jcreamer898/ko.ninja
server/httpList.js
<gh_stars>10-100 var _ = require('underscore'); module.exports = function (app) { var list = [{ id: 1, name: '<NAME>' }, { id: 2, name: 'Ham' }]; function getListItemIndex (id) { for (var i = 0; i < list.length; i++) { if (list[i].id == id) { ...
guiiyanxD/PrimerParcial2
public/Jointjs/tutorials/js/element-tools-all.js
(function elementToolsAll() { var graph = new joint.dia.Graph; var paper = new joint.dia.Paper({ el: document.getElementById('paper-element-tools-all'), model: graph, width: 600, height: 100, gridSize: 10, drawGrid: true, background: { color:...
Grimace1975/bclcontrib-scriptsharp
ref.neo/tools/radiant/TabsDlg.cpp
<reponame>Grimace1975/bclcontrib-scriptsharp /* =========================================================================== Doom 3 GPL Source Code Copyright (C) 1999-2011 id Software LLC, a ZeniMax Media company. This file is part of the Doom 3 GPL Source Code (?Doom 3 Source Code?). Doom 3 Source Code is free so...
solidonline/hms-cordova-plugin
cordova-plugin-hms-awareness/example/cordova/www/js/ambientLightbarrier.js
/* Copyright 2020-2021. Huawei Technologies Co., Ltd. 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 https://www.apache.org/licenses/LICENSE-2.0 Un...
poyun/study-spring-data-jpa
src/main/java/cn/caofanqi/study/studyspringdatajpa/pojo/domain/JpaAnnotationDemo.java
<reponame>poyun/study-spring-data-jpa<gh_stars>1-10 package cn.caofanqi.study.studyspringdatajpa.pojo.domain; import cn.caofanqi.study.studyspringdatajpa.pojo.enums.Sex; import lombok.Data; import javax.persistence.*; import java.time.LocalDate; import java.time.LocalDateTime; import java.time.LocalTime; import java....
anshika581/competitive-programming-1
src/codebook/dp/Knapsack.java
<filename>src/codebook/dp/Knapsack.java /* * Dynamic programming algorithm that computes the maximum value that you can obtain from putting n elements (each with integral value and weight) in a knapsack that can fit * a total of n weight. * * Time complexity: O(NM) where N is the number of items and the M is the si...
Orcthanc/Kestrel
Kestrel/src/Core/File.hpp
#pragma once #include <kstpch.hpp> namespace Kestrel { struct Filereader { static std::vector<uint8_t> read_uint8t( const std::string& filepath ); static std::vector<int8_t> read_int8t( const std::string& filepath ); static std::string read_string( const std::string& filepath ); }; }
GaryGo/CodeIgniter-MiniBlog
third-party-code/umeditor-dev/_test/plugins/enterkey.js
module( 'plugins.enterkey' ); ///*不作处理chrome会产生div*/ test( 'chrome删除div', function () { var editor = te.obj[0]; var range = te.obj[1]; var body = editor.body; if(ua.browser.chrome){ editor.body.innerHTML = '<h1>一级标题</h1><div><br/></div>'; range.setStart( body.firstChild.firstCh...
fossabot/design_principles_dojo
src/test/java/com/thoughtworks/game_of_life/core/WorldTest.java
<reponame>fossabot/design_principles_dojo<filename>src/test/java/com/thoughtworks/game_of_life/core/WorldTest.java package com.thoughtworks.game_of_life.core; import org.junit.Before; import org.junit.Test; import static com.thoughtworks.game_of_life.core.Location.at; import static org.hamcrest.MatcherAssert.assertTh...
kettanaito/react-advanced-form
cypress/integration/validation/other/index.js
<reponame>kettanaito/react-advanced-form describe('Other', () => { require('./ConditionalSchema.spec') require('./AjaxPrefilling.spec') })
yuri0x7c1/uxerp
uxcrm-ofbiz/generated-entity/src/main/java/org/apache/ofbiz/webapp/website/WebPage.java
<reponame>yuri0x7c1/uxerp package org.apache.ofbiz.webapp.website; import lombok.experimental.FieldNameConstants; import java.io.Serializable; import lombok.Getter; import lombok.Setter; import java.sql.Timestamp; import org.apache.ofbiz.entity.GenericValue; import java.util.List; import java.util.ArrayList; /** * W...
ArnisLielturks/Urho3D-Project-Template
app/src/main/cpp/Levels/Voxel/Chunk.h
#ifdef VOXEL_SUPPORT #pragma once #include <queue> #include <Urho3D/Graphics/CustomGeometry.h> #include <Urho3D/Graphics/Geometry.h> #include <Urho3D/Scene/Scene.h> #include <Urho3D/Core/Object.h> #include <Urho3D/Scene/Node.h> #include <Urho3D/Core/WorkQueue.h> #include <Urho3D/Graphics/VertexBuffer.h> #include <Urho3...
aconstlink/snakeoil
audio/object.h
//------------------------------------------------------------ // snakeoil (c) <NAME> // Distributed under the MIT license //------------------------------------------------------------ #ifndef _SNAKEOIL_AUDIO_OBJECT_H_ #define _SNAKEOIL_AUDIO_OBJECT_H_ #include "api.h" #include "protos.h" #include "typedefs.h" #inclu...
stpangst/onemall
order-service-project/order-service-app/src/main/java/cn/iocoder/mall/orderservice/service/cart/CartService.java
package cn.iocoder.mall.orderservice.service.cart; import cn.iocoder.common.framework.exception.util.ServiceExceptionUtil; import cn.iocoder.common.framework.util.CollectionUtils; import cn.iocoder.mall.orderservice.convert.cart.CartConvert; import cn.iocoder.mall.orderservice.dal.mysql.dataobject.cart.CartItemDO; imp...
rachwal/DesignPatterns
operational/src/memento/move_command.h
// Based on "Design Patterns: Elements of Reusable Object-Oriented Software" // book by <NAME>, <NAME>, <NAME>, and <NAME> // // Created by <NAME>. The National Institute of Advanced Industrial Science and Technology, Japan. #ifndef OPERATIONAL_MEMENTO_MOVE_COMMAND_H_ #define OPERATIONAL_MEMENTO_MOVE_COMMAND_H_ #inc...
BenniN/OpenPEARLThesis
OpenPEARL/openpearl-code/compiler/src/org/smallpearl/compiler/Compiler.java
<filename>OpenPEARL/openpearl-code/compiler/src/org/smallpearl/compiler/Compiler.java /* * [The "BSD license"] * Copyright (c) 2012-2017 <NAME> * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * ...
Lywx/FalconEngine
src/FalconEngine/Graphics/Renderer/VisualEffectInstance.cpp
#include <FalconEngine/Graphics/Renderer/VisualEffectInstance.h> #include <FalconEngine/Graphics/Renderer/VisualEffect.h> #include <FalconEngine/Graphics/Renderer/VisualEffectPass.h> #include <FalconEngine/Graphics/Renderer/Resource/Texture.h> #include <FalconEngine/Graphics/Renderer/Resource/Sampler.h> namespace Falc...
txwhhny/vtk
Rendering/VolumeOpenGL2/vtkOpenGLVolumeGradientOpacityTable.h
<gh_stars>100-1000 /*========================================================================= Program: Visualization Toolkit Module: vtkOpenGLVolumeGradientOpacityTable.h Copyright (c) <NAME>, <NAME>, <NAME> All rights reserved. See Copyright.txt or http://www.kitware.com/Copyright.htm for details. ...
biothings/biothings_interactions
biointeract/hub/dataload/sources/ctdchemgene/uploader.py
<reponame>biothings/biothings_interactions import os import gzip import biothings, config biothings.config_for_app(config) import biothings.hub.dataload.uploader as uploader from .parser import CTDChemGeneParser class CTDChemGeneUploader(uploader.BaseSourceUploader): # main_source = "ConsensusPathDB" name ...
didadadida93/hacktiv8-bootcamp
phase0/week2/p0-w2-exercises-3.js
let name = "Arief"; let peran = "Tabib"; if (name === '') { console.log("Nama harus diisi!"); } else { if (peran === '') { console.log(`Halo ${name}, Pilih peranmu untuk memulai game!`); } else { console.log(`Selamat datang di Dunia Proxytia, ${name}`); if (peran.toLowerCase() === 'ksatria') { console.log(...
mirohs/prog1javalib
src/prog1/graphics/Shape.java
/* * Copyright 2016 michaelrohs. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed t...
trollknurr/sourcegraph
cmd/frontend/internal/pkg/search/query/syntax/query.go
package syntax import ( "bytes" "fmt" "regexp" "strings" ) // A Query contains the parse tree of a query. type Query struct { Input string // the original input query string Expr []*Expr // expressions in this query } func (q *Query) String() string { return ExprString(q.Expr) } // WithErrorsQuoted convert...
agent1894/Quant-Practice-Workspace
Cpp_Workspace/C++ Primer Plus/Chapter06/Chapter6_exercise8.cpp
// 6.11.8 -- read and count characters #include <iostream> #include <fstream> #include <cstdlib> int main() { using namespace std; cout << "Enter the file name: "; string filename; cin >> filename; ifstream inFile; inFile.open(filename); if (!inFile.is_open()) // failed to open file { ...
EricChang82/springBootDemo
springBootDemo/src/main/java/cn/dataModel/TextEditor.java
package cn.dataModel; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; import cn.Util; @Component public class TextEditor { @Autowired private SpellChecker spellChecker3332; public SpellChecker getSpellChecker( ) { return ...
amvb/GUCEF
plugins/COMCORE/pubsubpluginMSMQ/src/pubsubpluginMSMQ_CMsmqPubSubClient.cpp
<reponame>amvb/GUCEF /* * pubsubpluginMSMQ: Generic GUCEF COMCORE plugin for providing pubsub via Microsoft MSMQ * * Copyright (C) 1998 - 2020. <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 obta...
NullableInt/design.swedbankpay.com
src/App/utils/RenderRoutes/index.js
import React from "react"; import PropTypes from "prop-types"; import { Switch, Route, Redirect } from "react-router-dom"; const RenderRoutes = ({ path, redirect, routes, appFolder }) => ( <Switch> <Route exact path={path} render={() => <Redirect to={redirect} />}/> {routes.map(route => { ...
GabrielSturtevant/mage
Mage.Sets/src/mage/cards/t/TelJiladJustice.java
<reponame>GabrielSturtevant/mage package mage.cards.t; import java.util.UUID; import mage.abilities.effects.common.DestroyTargetEffect; import mage.abilities.effects.keyword.ScryEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.target.common.TargetArtifactP...
deduper/raml-java-tools
raml-to-pojo/src/test/java/org/raml/ramltopojo/plugin/PluginTwo.java
package org.raml.ramltopojo.plugin; /** * Created. There, you have it. */ public class PluginTwo { }
evgeniums/cpp-validator
include/dracosha/validator/utils/make_types_tuple.hpp
/** @copyright <NAME> 2020 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ /****************************************************************************/ /** @file validator/utils/make_types_tuple.hpp * * Defines helper to...
lkwr/react-bootstrap-icons
src/icons/cloudy.js
<gh_stars>100-1000 import React, { forwardRef } from 'react'; import PropTypes from 'prop-types'; const Cloudy = forwardRef(({ color, size, ...rest }, ref) => { return ( <svg ref={ref} xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width={size} height={size} fill={colo...
raymondlu/EffectNodes-for-cocos2dx
effectNodes/tinyWingsTerrain/ensTinyWingsTerrainNode.h
// // ensTinyWingsTerrainSprite.h // HelloCpp // // Created by <NAME> (wantnon) on 13-12-16. // // #ifndef __HelloCpp__ensTinyWingsTerrainNode__ #define __HelloCpp__ensTinyWingsTerrainNode__ #include <iostream> #include <vector> using namespace std; #include "cocos2d.h" using namespace cocos2d; #include "common/en...
lin10086/easy_oa
src/main/java/cn/gson/oasys/mappers/TaskLoggerPOMapper.java
package cn.gson.oasys.mappers; import cn.gson.oasys.modelV2.po.TaskLoggerPO; import cn.gson.oasys.modelV2.po.TaskLoggerPOExample; import java.util.List; import org.apache.ibatis.annotations.Delete; import org.apache.ibatis.annotations.DeleteProvider; import org.apache.ibatis.annotations.Insert; import org.apache.ibati...
ZhiQiAnSecFork/ssf
src/network/ssf/layer/proxy/negotiate_auth_strategy.h
<gh_stars>1000+ #ifndef SSF_LAYER_PROXY_NEGOTIATE_AUTH_STRATEGY_H_ #define SSF_LAYER_PROXY_NEGOTIATE_AUTH_STRATEGY_H_ #include <memory> #include <vector> #include "ssf/layer/proxy/auth_strategy.h" #include "ssf/layer/proxy/platform_auth_impl.h" namespace ssf { namespace layer { namespace proxy { class NegotiateAuth...
Shashi-rk/azure-sdk-for-java
sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/test/java/com/azure/resourcemanager/digitaltwins/DigitalTwinsLifecycleTests.java
<filename>sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/test/java/com/azure/resourcemanager/digitaltwins/DigitalTwinsLifecycleTests.java // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. package com.azure.resourcemanager.digitaltwins; import com.azure.core.http....
dogchenya/xc-ros
src/xcroscpp/include/ros/internal_timer_manager.h
<reponame>dogchenya/xc-ros<gh_stars>0 #ifndef _XCROSCPP_INTERNAL_TIMER_MANAGER_H_ #define _XCROSCPP_INTERNAL_TIMER_MANAGER_H_ #include "ros/forwards.h" #include <ros/time.h> #include "ros/xcroscpp_common.h" namespace xcros { template<typename T, typename D, typename E> class TimerManager; typedef TimerManager<Steady...
airslie/renalware-core
spec/dummy/db/seeds/surveys/seeds.rb
# frozen_string_literal: true require_relative "./surveys"
Ahmad-Milan/gatsby-milan
src/components/templates/store-layout/InteriorPhotos.js
import React from 'react' function InteriorPhotos({store, imgPath, defaultImages}) { return ( <div className="w-100 d-flex justify-content-center flex-wrap mb-n3"> <div className="col-sm-6 col-lg-3 p-1"> <img src={ store.proPhotos ? `${imgPath}FrontDesk.jpg` : defaultImages.frontdesk } ...
broadinstitute/tissue_purifier
tests/model_utils/test_benckmark_mixin.py
import pytest import torch import numpy import pandas from tissue_purifier.model_utils.benckmark_mixin import classify_and_regress from sklearn.neighbors import KNeighborsRegressor, KNeighborsClassifier @pytest.mark.parametrize("n_splits, n_repeats", [(1, 1), (2, 1), (2, 2)]) def test_classify_regress_knn(n_splits, n...
vanacekj/midpoint
model/notifications-impl/src/test/java/com/evolveum/midpoint/notifications/impl/TestTextFormatter.java
<filename>model/notifications-impl/src/test/java/com/evolveum/midpoint/notifications/impl/TestTextFormatter.java /** * Copyright (c) 2010-2017 Evolveum * * 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 t...
pingidentity/browser-extensions
firefox/addon-sdk/test/test-require.js
<reponame>pingidentity/browser-extensions /* 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/. */ const traceback = require("sdk/console/traceback"); exports.test_no_arg...
ankurshukla1993/IOT-test
coeey/android/arch/persistence/db/SimpleSQLiteQuery.java
<filename>coeey/android/arch/persistence/db/SimpleSQLiteQuery.java package android.arch.persistence.db; public class SimpleSQLiteQuery implements SupportSQLiteQuery { private final Object[] mBindArgs; private final String mQuery; public SimpleSQLiteQuery(String query, Object[] bindArgs) { this.mQu...
zieemer/buttons
out/chrome/Default/Extensions/dbaonaocldpohelilahfhnkmjankmbcc/5.10.14_0/components/search/search.controller.js
'use strict'; export let SearchController = [ '$scope', '$rootScope', '$window', 'searchService', 'statService', 'utilsService', ( $scope, $rootScope, $window, searchService, statService, utilsService ) => { /** * Using this to pr...
iakobos/mocha
lib/mocha/module_method.rb
require 'mocha/class_method' module Mocha class ModuleMethod < ClassMethod end end
JavaSaBr/jmonkey-builder
src/main/java/com/ss/editor/part3d/editor/Editor3DPart.java
<reponame>JavaSaBr/jmonkey-builder package com.ss.editor.part3d.editor; import com.jme3.app.state.AppState; /** * The interface to implement a 3D part of editor. * * @author JavaSaBr */ public interface Editor3DPart extends AppState { }
awong9/t5
app/src/main/java/com/csc413/team5/fud5/tests/SelectorDemoActivity.java
package com.csc413.team5.fud5.tests; import android.content.Intent; import android.location.Address; import android.location.Geocoder; import android.location.Location; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.util.Log; import android.view.View; import android.widget.Bu...
Mcpg/cmike
kernel/src/ports/os_get_via_serial.c
#include <mikeos.h> void _os_get_via_serial(int* ax, int* bx, int* cx, int* dx, int* si, int* di) { char result; if (os_get_via_serial(&result)) { *ax = ((*ax & 0xFF00) ^ 0x8000) | (result & 0xFF); } else { *ax = *ax | 0x8000; } } int os_get_via_serial(char* byte) { int...
kenneycode/fusion-java
libfusionjava/src/main/java/io/github/kenneycode/fusionjava/framebuffer/FrameBuffer.java
package io.github.kenneycode.fusionjava.framebuffer; import io.github.kenneycode.fusionjava.util.GLUtil; import io.github.kenneycode.fusionjava.common.Ref; import static android.opengl.GLES20.GL_COLOR_ATTACHMENT0; import static android.opengl.GLES20.GL_FRAMEBUFFER; import static android.opengl.GLES20.GL_RGBA; import ...
phatblat/macOSPrivateFrameworks
PrivateFrameworks/InputContext/_ICNullLexiconManager.h
// // Generated by class-dump 3.5 (64 bit). // // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by <NAME>. // #import "NSObject.h" #import "_ICLexiconManaging.h" @class NSMutableArray; @interface _ICNullLexiconManager : NSObject <_ICLexiconManaging> { NSMutableArray *_contactObservers; } ...
fossabot/leetcode-3
problems/reshape-the-matrix/reshape_the_matrix.go
package reshape_the_matrix func matrixReshape(nums [][]int, r int, c int) [][]int { m, n := len(nums), len(nums[0]) if m*n != r*c { return nums } ans := make([][]int, r) for i := 0; i < r; i++ { ans[i] = make([]int, c) } i, j := 0, 0 for _, row := range nums { for _, v := range row { ans[i][j] = v ...
merceyz/babel-plugin-optimize-clsx
test/fixtures/find-function-names/no-import/output.js
clsx({ foo: true, });
exKAZUu-Research/WillingQuiz
server/app/models/teacher.rb
<filename>server/app/models/teacher.rb # == Schema Information # # Table name: teachers # # id :uuid not null, primary key # name :string not null # school_id :uuid not null # created_at :datetime not null # updated_at :datetime not null # class Tea...
andrewgross/moto
moto/emr/utils.py
import random import string def random_job_id(size=13): chars = range(10) + list(string.uppercase) job_tag = ''.join(unicode(random.choice(chars)) for x in range(size)) return 'j-{0}'.format(job_tag) def random_instance_group_id(size=13): chars = range(10) + list(string.uppercase) job_tag = ''.j...
aksr/wmii
lib/libstuff/geom/rect_contains_p.c
<filename>lib/libstuff/geom/rect_contains_p.c /* Copyright ©2006-2010 <NAME> <<EMAIL> at Gmail> * See LICENSE file for license details. */ #include <stuff/geom.h> bool rect_contains_p(Rectangle r, Rectangle r2) { return r2.min.x >= r.min.x && r2.max.x <= r.max.x && r2.min.y >= r.min.y && r2.max.y <= ...
ronakshah2895/Handshake-Lab1
backend/actions/jobs.js
const fs = require('fs'); const { v1: uuidv1 } = require('uuid'); const { literal } = require('sequelize'); const { User, Job, jobApplication } = require('../models/index'); function postJob(req, res) { Job.create({ ...req.body, creatorId: req.user.id, }).then((job) => { const { title, category, ...
internet-com/kit
examples/web/cmd/app/handlers/user.go
// Package handlers contains the handler logic for processing requests. package handlers import ( "context" "net/http" "github.com/ardanlabs/kit/examples/web/internal/sys/app" "github.com/ardanlabs/kit/examples/web/internal/user" "github.com/ardanlabs/kit/web" ) // UserList returns all the existing users in the...
seowalex/tp
src/test/java/chopchop/commons/util/EitherTest.java
// EitherTest.java package chopchop.commons.util; import java.util.NoSuchElementException; import org.junit.jupiter.api.Test; import static org.junit.jupiter.api.Assertions.assertTrue; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertEquals; import sta...
haiko21/LittleGPTracker
sources/Application/Controllers/ControlRoom.h
<filename>sources/Application/Controllers/ControlRoom.h #ifndef _CONTROLROOM_H_ #define _CONTROLROOM_H_ #include "Foundation/T_Singleton.h" #include "Services/Controllers/ControlNode.h" class ControlRoom:public T_Singleton<ControlRoom>,public ControlNode { public: ControlRoom() ; ~ControlRoom() ; bool Init() ; ...
DmitriyKostyanetsky/job4j
chapter_004/src/test/java/ru/job4j/thread/ThreadTest.java
package ru.job4j.thread; import org.junit.Test; import ru.job4j.treads.condition.Task; import ru.job4j.treads.condition.Visibility; public class ThreadTest { @Test public void testThread() throws InterruptedException { Task task = new Task(new Task.Account()); Thread thread1 = new Thread(task...
theshaodi/algorithm004-05
Week 1/id_595/LeetCode_641_595.js
/* * @lc app=leetcode.cn id=641 lang=javascript * * [641] 设计循环双端队列 * * https://leetcode-cn.com/problems/design-circular-deque/description/ * * algorithms * Medium (46.52%) * Likes: 17 * Dislikes: 0 * Total Accepted: 2.1K * Total Submissions: 4.5K * Testcase Example: '["MyCircularDeque","insertLast",...
jimmydief/babel-plugin-transform-async-to-promises
tests/await complex switch/case-fallthrough with code.js
<reponame>jimmydief/babel-plugin-transform-async-to-promises let called = false; expect((await f(5, async () => 2, () => called = true))).toBe(2); expect(called).toBe(true);
SkygearIO/skygear-server
pkg/core/imageprocessing/asset_type.go
package imageprocessing type AssetType string const ( AssetTypeImage AssetType = "image" )
ethansaxenian/RosettaDecode
lang/Go/add-a-variable-to-a-class-instance-at-runtime.go
<gh_stars>1-10 package main import ( "bufio" "fmt" "log" "os" ) type SomeStruct struct { runtimeFields map[string]string } func check(err error) { if err != nil { log.Fatal(err) } } func main() { ss := SomeStruct{make(map[string]string)} scanner := bufio.NewScanner(os.Std...
Melatonin64/snowplow
3-enrich/scala-common-enrich/src/test/scala/com.snowplowanalytics.snowplow.enrich.common/utils/TestResourcesRepositoryRef.scala
package com.snowplowanalytics package snowplow.enrich.common.utils // Java import java.io.IOException // Scala import scala.util.control.NonFatal // Jackson import com.fasterxml.jackson.core.JsonParseException import com.fasterxml.jackson.databind.JsonNode import com.github.fge.jackson.JsonLoader // Scalaz import s...
irinabov/debian-qpid-cpp-1.35.0
src/qpid/messaging/amqp/util.h
<filename>src/qpid/messaging/amqp/util.h #ifndef QPID_MESSAGING_AMQP_UTIL_H #define QPID_MESSAGING_AMQP_UTIL_H /* * * 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 copyri...
cfe84/42sh
src/expansion/expand.c
/* ** expand.c for 42sh in /goinfre/grosli_o-42sh/src/expansion ** ** Made by <NAME> ** Login <<EMAIL>> ** ** Started on Sun Jan 16 15:09:42 2005 <NAME> ** Last update Tue Jan 18 18:14:54 2005 <NAME> */ /** ** @file expand.c ** Contains the mainframe of expansion module */ #include <stdlib.h> #include <stdio.h> ...
bracikaa/openproject
lib/api/v3/principals/principal_representer.rb
#-- encoding: UTF-8 #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2021 the OpenProject GmbH # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License version 3. # # OpenProject is a fork of ChiliProj...
hao-wang/Montage
js-test-suite/testsuite/7910db6d4b621a8f4a3358bf32b76e1f.js
<gh_stars>10-100 load("1d8ada728956c1a3d52d68d1d4d6dd52.js"); // Copyright 2016 the V8 project authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // Flags: --allow-natives-syntax try { %Call(1, 0); } catch (e) { assertTrue(e instan...
NikkiLoveGod/vis-academy
src/demos/building-a-geospatial-app/starting-code/src/charts.js
import React from "react"; import { charts } from "./style"; import { VerticalBarSeries, XAxis, XYPlot, YAxis } from "react-vis"; export default function Charts({ pickups }) { return ( <div style={charts}> <h2>Pickups by hour</h2> <p>As percentage of all trips</p> <XYPlot height={140} width={4...
TotteKarlsson/dsl
Common/dslException.cpp
#pragma hdrstop #include "dslException.h" #include "dslLogger.h" //--------------------------------------------------------------------------- namespace dsl { DSLException::DSLException(const string& desc) : mMessage(desc) {} DSLException::DSLException(const stringstream& msg) : mMessage(msg.str()) {} DSLException::...
galaxy-book/cyclone
pkg/server/handler/v1alpha1/healthcheck.go
<filename>pkg/server/handler/v1alpha1/healthcheck.go package v1alpha1 import ( "context" "github.com/caicloud/cyclone/pkg/server/apis/v1alpha1" ) // HealthCheck checks the health status of Cyclone server. func HealthCheck(ctx context.Context) (v1alpha1.HealthStatus, error) { return v1alpha1.HealthStatus{ Status...
Kevinskwk/ILP
Final/Ma Yuchen-1.py
<gh_stars>1-10 def myseries(n): s=n*(n+1)/2 return s def sqnum(n): root=n**0.5 if root % 1 == 0: return True else: return False print 'T100 = '+str(myseries(100)) print 'T2000 = '+str(myseries(2000)) print 'T50000 = '+str(myseries(50000)) i=0 n=8 SquareNumbers=[] while...
drrost/s2c1-libmx-tests
tests/t10/test_00.c
#include "../../lib/test_lib.h" #include "../../libmx.h" char *test_case_name = "mx_foreach"; void mx_printint(int n) { printf("%d\n", n); } // Tests void test_foreach() { // Given int arr[] = {1, 2, 3, 4, 5}; intercept_stdout(); // When mx_foreach(arr, 5, mx_printint); // Then re...
joshualy/numerical_computing
Vol3A/SQL1/spec.py
# Name this file 'solutions.py'. """Volume III Lab : SQL1. <Name> <Class> <Date> """ import sqlite3 as sql import csv # Problem 1 def new_tables(): """ Create two tables in the database "sql1". Call the first table MajorInfo with columns MajorCode(int) and MajorName(string). Call the second table CourseI...
kazssym/bountysource-core
spec/controllers/api/v2/fundraiser_rewards_controller_spec.rb
<reponame>kazssym/bountysource-core<filename>spec/controllers/api/v2/fundraiser_rewards_controller_spec.rb require 'spec_helper' describe Api::V2::FundraiserRewardsController do end
faezezps/SiMQC
hotpot/scripts/train_eval/ranked_scores_to_hotpot_pred.py
import argparse from ast import literal_eval import json import pandas as pd import numpy as np def df_to_pred(df, filename, return_results=False, return_titles=False): span_q_col = "span_question_scores" yes_no_q_col = "yes_no_question_scores" yes_no_scores_col = "yes_no_confidence_scores" span_score...
venkateshprasad123/wb
Java_GUI/src/com/ibm/safr/we/data/DAOFactoryHolder.java
package com.ibm.safr.we.data; /* * Copyright Contributors to the GenevaERS Project. SPDX-License-Identifier: Apache-2.0 (c) Copyright IBM Corporation 2008. * * 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 cop...
phatblat/macOSPrivateFrameworks
PrivateFrameworks/CloudServices/SecureBackup.h
// // Generated by class-dump 3.5 (64 bit). // // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by <NAME>. // #import "NSObject.h" #import "NSSecureCoding.h" @class EscrowPrerecord, NSData, NSDate, NSDictionary, NSError, NSObject<OS_dispatch_queue>, NSString, SESWrapper; @interface SecureBacku...
srcarter3/awips2
cave/com.raytheon.viz.hydrocommon/src/com/raytheon/viz/hydrocommon/textreport/StationListReport.java
/** * This software was developed and / or modified by Raytheon Company, * pursuant to Contract DG133W-05-CQ-1067 with the US Government. * * U.S. EXPORT CONTROLLED TECHNICAL DATA * This software product contains export-restricted data whose * export/transfer/disclosure is restricted by U.S. law. Dissemination ...
huaicheng/IODA-SOSP21-AE
src/iodaLinux/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_opp.c
<gh_stars>1-10 /* * Copyright 2012-15 Advanced Micro Devices, Inc. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to us...
Yangxiaohan0120/LearningJava
src/main/java/LeetCode/InsertionSortList.java
<filename>src/main/java/LeetCode/InsertionSortList.java package LeetCode; /** * @ author: yxh * @ created: 2022-02-10 : 4:18 PM */ public class InsertionSortList { // 为一个链表实现插入排序 public InsertionSortList() { } }
KMDice/kmdice-wallet
packages/dice-app/app/containers/App/saga/__tests__/startKMDiceChainSaga.spec.js
<filename>packages/dice-app/app/containers/App/saga/__tests__/startKMDiceChainSaga.spec.js<gh_stars>1-10 // @flow import { fromJS } from 'immutable'; import { runSaga } from 'redux-saga'; import startKMDiceChainSaga from '../startKMDiceChainSaga'; import { KMDICE_CHAIN_START, KMDICE_CHAIN_GET_INFO, KMDICE_CHAIN_...
tg1716/SLAM
libs/base/src/utils/CServerTCPSocket_WIN.cpp
/* +------------------------------------------------------------------------+ | Mobile Robot Programming Toolkit (MRPT) | | http://www.mrpt.org/ | | | | Cop...