repo_name stringlengths 6 101 | path stringlengths 4 300 | text stringlengths 7 1.31M |
|---|---|---|
ArcticReal/eCommerce | plugins/eCommerce/src/main/java/com/skytala/eCommerce/domain/order/relations/returnStatus/mapper/ReturnStatusMapper.java | <gh_stars>1-10
package com.skytala.eCommerce.domain.order.relations.returnStatus.mapper;
import java.math.BigDecimal;
import java.sql.Timestamp;
import java.util.HashMap;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import org.apache.ofbiz.entity.GenericValue;
import com.skytala.eCommerce.domain... |
bennn/PyonR | lib/sys.py | <gh_stars>100-1000
#lang racket
(require "../runtime.rkt")
(provide (rename-out [PATH :path]
[stdin :stdin]
[stdout :stdout]
[stderr :stderr]))
(define stdin (wrap-port (current-input-port)))
(define stdout (wrap-port (current-output-port)))
(define stder... |
casey/fuchsia | src/connectivity/wlan/drivers/third_party/broadcom/brcmfmac/pno.cc | <reponame>casey/fuchsia
/*
* Copyright (c) 2016 Broadcom
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" A... |
PissedCapslock/methanol | methanol-testutils/src/main/java/com/github/mizosoft/methanol/testutils/Logging.java | /*
* Copyright (c) 2021 <NAME>
*
* 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 use, copy, modify, merge, publish, dis... |
Sgitario/jcloud-unit | jester-containers/src/main/java/io/jester/api/Container.java | <filename>jester-containers/src/main/java/io/jester/api/Container.java
package io.jester.api;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Target({ ElementType.FIELD, ElementType.TYPE })
@Retention(Ret... |
ACPK/atc | db/migrations/migrations.go | package migrations
import "github.com/BurntSushi/migration"
var Migrations = []migration.Migrator{
InitialSchema,
MoveSourceAndMetadataToVersionedResources,
AddTypeToVersionedResources,
RemoveTransitionalCurrentVersions,
NonNullableVersionInfo,
AddOneOffNameSequence,
AddHijackURLToBuilds,
AddTimestampsToBuild... |
GabrielSturtevant/mage | Mage.Sets/src/mage/cards/w/Willbender.java |
package mage.cards.w;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.TurnedFaceUpSourceTriggeredAbility;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.common.ChooseNewTargetsTargetEffect;
import mage.abilities.keyword.MorphAbilit... |
joeivans/data-structures-and-algorithms | javascript/array-insert-shift/ArrayExtensions.js | const Utils = require('../lib/Utils');
class ArrayExtensions {
constructor() {
Array.prototype.nonNativeInsertShift = function (value) {
const result = [];
const midpoint = Utils.truncateToInteger(this.length / 2);
const isEven = Utils.isEven(this.length);
const determinePreOrPostInserti... |
LeoMurphyWM24/PlasmaPy | plasmapy/utils/decorators/checks.py | <filename>plasmapy/utils/decorators/checks.py
"""
Decorator for checking input/output arguments of functions.
"""
__all__ = [
"check_values",
"check_units",
"check_relativistic",
"CheckBase",
"CheckUnits",
"CheckValues",
]
import collections
import functools
import inspect
import numpy as np
im... |
kagemeka/atcoder-submissions | jp.atcoder/abc113/abc113_c/11952584.cpp | #include <bits/stdc++.h>
using namespace std;
string fill(string s) {
while (s.size() < 6) s = "0" + s;
return s;
}
string create_id(int p, int o) {
return fill(to_string(p)) + fill(to_string(o));
}
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
int n, m; cin >> n >> m;
vector<... |
EliahKagan/old-practice-snapshot | main/palindrome-linked-list/palindrome-linked-list.java | /**
* Definition for singly-linked list.
* public class ListNode {
* int val;
* ListNode next;
* ListNode(int x) { val = x; }
* }
*/
class Solution {
public boolean isPalindrome(ListNode head) {
if (head == null) return true;
final ListNode beforeSecond = findMiddle(head);
... |
MRezaNasirloo/Slick | slick-compiler/src/main/java/com/mrezanasirloo/slick/middleware/components/MiddlewareGeneratorBaseImpl.java | <filename>slick-compiler/src/main/java/com/mrezanasirloo/slick/middleware/components/MiddlewareGeneratorBaseImpl.java
/*
* Copyright 2018. <NAME>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the Lic... |
premium-runner-benchmark/isle-editor | app/components/spectacle/utils/context.js | <reponame>premium-runner-benchmark/isle-editor
/* eslint-disable react/require-default-props */
/*
* The MIT License (MIT)
*
* Copyright (c) 2013-2018 Formidable Labs, Inc.
*
* Copyright (c) 2016-2018 <NAME>, <NAME>, and potentially other
* DefinitelyTyped contributors
*
* Permission is hereby granted, free of charge,... |
srcarter3/awips2 | cave/com.raytheon.uf.viz.kml.export/src/com/raytheon/uf/viz/kml/export/graphics/ext/KmlRasterImage.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
... |
nonomal/ultimateshell | ultimate-shell/target/com/g3g4x5x6/sftp/actions/UploadAction.java | <filename>ultimate-shell/target/com/g3g4x5x6/sftp/actions/UploadAction.java
package com.g3g4x5x6.sftp.actions;
import com.g3g4x5x6.sftp.SftpBrowser;
public class UploadAction extends DefaultAction {
public UploadAction(SftpBrowser sftpBrowser) {
super(sftpBrowser);
}
}
|
juanfelipe82193/opensap | sapui5-sdk-1.74.0/resources/sap/ushell/renderers/fiori2/search/SearchResultListFormatter-dbg.js | <gh_stars>0
// Copyright (c) 2009-2017 SAP SE, All Rights Reserved
/* global sap */
// iteration 0 ok
/* eslint no-fallthrough: 0 */
sap.ui.define([
'sap/ushell/renderers/fiori2/search/SearchConfiguration',
'sap/ushell/renderers/fiori2/search/SearchHelper',
'sap/ushell/renderers/fiori2/search/SearchNaviga... |
Surfndez/operaprestodriver | src/com/opera/core/systems/scope/internal/OperaIntervals.java | <reponame>Surfndez/operaprestodriver
/*
Copyright 2008-2012 Opera Software ASA
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 ap... |
theatlasroom/sshego | cmd/gosshtun/main.go | package main
import (
"context"
"flag"
"fmt"
"io"
"log"
"os"
tun "github.com/glycerine/sshego"
ssh "github.com/glycerine/sshego/xendor/github.com/glycerine/xcryptossh"
)
const ProgramName = "gosshtun"
func main() {
myflags := flag.NewFlagSet(ProgramName, flag.ExitOnError)
cfg := tun.NewSshegoConfig()
cf... |
Djelibeybi/photons | modules/photons_app/mimic/operators/matrix.py | from photons_app.mimic.operator import Operator, operator
from photons_app.mimic.operators.light import color_spec
from photons_app import helpers as hp
from photons_messages import TileMessages, TileEffectType
from photons_protocol.types import enum_spec
from delfick_project.norms import dictobj, sb
class TileChil... |
prichhazed/yb | internal/biome/fakebiome.go | // Copyright 2020 YourBase 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
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to ... |
fga-gpp-mds/dulce-app | src/Components/Absences.js | <reponame>fga-gpp-mds/dulce-app
import {absences as styles} from './styles' ;
import React from 'react';
import {
View,
TouchableOpacity,
Image,
ScrollView,
Alert
} from 'react-native';
import DateRangePicker from './DateRangePicker';
import AGRButton from './AGRButton';
import ImagePicker from 'react-native-... |
cybernetics/gridgain | modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheAbstractProjectionSelfTest.java | /*
Copyright (C) GridGain Systems. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or... |
davidlares/davidC- | poo/virtuals.cpp | <gh_stars>0
#include <iostream>
#include <string>
using namespace std;
// base class
class Shape {
public:
void setValues(int a, int b){
width = a;
height = b;
}
// virtual member function -> member function that can be redefined in his derived classes only
virtual int area() {
return 0... |
DeadZoneLuna/csso-src | src/engine/audio/private/snd_dev_sdl.cpp | //========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose:
//
//===========================================================================//
#include "audio_pch.h"
#if !DEDICATED
#include "tier0/dynfunction.h"
#include "video//ivideoservices.h"
#include "../../sys_dll.h"
// preven... |
timoneluo/SmsServer | potato-service/src/main/java/io/potato/ts/domain/UserGroupLink.java | <reponame>timoneluo/SmsServer
package io.potato.ts.domain;
import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import io.potato.cor... |
nanovc/nanovc-java | api/src/main/java/io/nanovc/content/StringContentBase.java | /*
MIT License
https://opensource.org/licenses/MIT
Copyright 2020 <NAME>
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 use, co... |
woorimlee/cpp_CTCI_6E_APSS | BOJ_백준/10816 숫자 카드2 (이진 탐색).cpp | <filename>BOJ_백준/10816 숫자 카드2 (이진 탐색).cpp
#include <iostream>
#include <algorithm>
#include <vector>
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
int N, M;
cin >> N;
vector <int> sg(N, 0);
for (auto& it : sg) {
cin >> it;
}
sort(sg.begin(), sg.end());
cin >> M;
i... |
shaqk/dfuse-eosio | eosws/completion/completion.go | <reponame>shaqk/dfuse-eosio<filename>eosws/completion/completion.go
// Copyright 2020 dfuse Platform 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/... |
Sp2000/colplus-backend | webservice/src/main/java/life/catalogue/importer/ContinuousImporter.java | <reponame>Sp2000/colplus-backend
package life.catalogue.importer;
import life.catalogue.api.vocab.ImportState;
import life.catalogue.api.vocab.Users;
import life.catalogue.common.util.LoggingUtils;
import life.catalogue.concurrent.ExecutorUtils;
import life.catalogue.config.ContinuousImportConfig;
import life.catalogu... |
BBN-E/serif | src/ProfileGenerator/NameHypothesis.h | // Copyright (c) 2010 by BBNT Solutions LLC
// All Rights Reserved.
#ifndef NAME_HYPOTHESIS_H
#define NAME_HYPOTHESIS_H
#include "ProfileGenerator/GenericHypothesis.h"
#include "ProfileGenerator/PGFact.h"
#include "ProfileGenerator/Profile.h"
#include "ProfileGenerator/ProfileSlot.h"
#include "boost/shared_... |
ckamtsikis/cmssw | HLTriggerOffline/Tau/test/runHLTTauValidation_WithHLT.py | <filename>HLTriggerOffline/Tau/test/runHLTTauValidation_WithHLT.py
import FWCore.ParameterSet.Config as cms
process = cms.Process("HLT")
process.load("FWCore.MessageService.MessageLogger_cfi")
process.options = cms.untracked.PSet(
wantSummary = cms.untracked.bool(True)
)
process.maxEvents = cms.untracked.PSet(... |
lanl/DnMFkCPP | install_dependencies/xianyi-OpenBLAS-6d2da63/lapack/CMakeFiles/slaswp_minus.c | #define MINUS
#define ASMNAME slaswp_minus
#define ASMFNAME slaswp_minus_
#define NAME slaswp_minus_
#define CNAME slaswp_minus
#define CHAR_NAME "slaswp_minus_"
#define CHAR_CNAME "slaswp_minus"
#include "/lustre/scratch3/turquoise/rvangara/RD100/distnnmfkcpp_Src/install_dependencies/xianyi-OpenBLAS-6d2da63/lapack/las... |
lpi/codeforces-go | main/1200-1299/1255D.go | package main
import (
"bufio"
"bytes"
. "fmt"
"io"
)
// github.com/EndlessCheng/codeforces-go
func Sol1255D(reader io.Reader, writer io.Writer) {
in := bufio.NewReader(reader)
out := bufio.NewWriter(writer)
defer out.Flush()
const alphabet = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
v... |
robort-yuan/AI-EXPRESS | source/solution_zoo/video_box/src/smartplugin_box/vencmodule.cpp | /**
* Copyright (c) 2020, Horizon Robotics, Inc.
* All rights reserved.
* @Author:
* @Mail: @horizon.ai
*/
#include "vencmodule.h"
#include <fcntl.h>
#include <fstream>
#include <iostream>
#include <stdio.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
#include <cstring>
#include "hb_venc.h"
... |
qwasdw/Code-for-interview-Java-version | ch03/src/kth_last_node_in_linked_list.java | <gh_stars>1-10
public class kth_last_node_in_linked_list {
public static void main(String[] args) {
ListNode a = new ListNode(111);
ListNode b = new ListNode(222);
ListNode c = new ListNode(333);
ListNode d = new ListNode(444);
a.setNext(b);
b.setNext(c);
... |
splitio/qos-runner | src/main/java/io/split/qos/server/modules/QOSServerModule.java | package io.split.qos.server.modules;
import com.google.common.base.Preconditions;
import com.google.inject.AbstractModule;
import com.google.inject.Singleton;
import com.google.inject.assistedinject.FactoryModuleBuilder;
import com.google.inject.name.Names;
import io.split.qos.server.QOSServerConfiguration;
import io.... |
jhwsx/Java_01_AdvancedFeatures | src/com/java/advanced/features/io/bixiangdong/p14_file/FileMehtodDemo.java | <filename>src/com/java/advanced/features/io/bixiangdong/p14_file/FileMehtodDemo.java
package com.java.advanced.features.io.bixiangdong.p14_file;
import javafx.scene.input.DataFormat;
import java.io.File;
import java.io.IOException;
import java.text.DateFormat;
/**
* @author wangzhichao
* @since 2021/7/27
*
*/
pu... |
ERS-HCL/atomic-react-comp | src/lib/components/atoms/Caption/index.js | import PropTypes from "prop-types";
import styled from "styled-components";
import { font, palette } from "styled-theme";
const Caption = styled.caption`
font-family: ${font("quote")};
color: ${palette("grayscale", 1)};
font-weight: 500;
line-height: 3rem;
font-size: 0.875rem;
text-transform: uppercase;
`;... |
xiaohuliqibao/LangBot | src/main/java/top/kagerou/lang/service/serviceImp/VoiceStorageServiceImp.java | <reponame>xiaohuliqibao/LangBot<gh_stars>0
package top.kagerou.lang.service.serviceImp;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.stream.Stream;
import org.springframework.core.io.Resource;
import org.springframework.core.io.UrlReso... |
harderthan/gazebo | gazebo/gui/building/BaseInspectorDialog.cc | /*
* Copyright (C) 2015 Open Source Robotics Foundation
*
* 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 appl... |
saichikine/GMAT | plugins/ProductionPropagatorPlugin/src/base/propagator/PrinceDormand853.hpp | //
//------------------------------------------------------------------------------
// PrinceDormand853
//------------------------------------------------------------------------------
// GMAT: General Mission Analysis Tool.
//
// Copyright (c) 2002 - 2018 United States Government as repr... |
wood-ghost/openvino | src/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/einsum.hpp | <gh_stars>1000+
// Copyright (C) 2022 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#pragma once
#include <string>
#include <tuple>
#include <vector>
#include "shared_test_classes/base/layer_test_utils.hpp"
namespace LayerTestsDefinitions {
typedef std::tuple<
std::string, ... |
zzgchina888/msdn-code-gallery-microsoft | Official Windows Platform Sample/Windows 8.1 Store app samples/[C++]-Windows 8.1 Store app samples/Projection sample/C++/Constants.cpp | <reponame>zzgchina888/msdn-code-gallery-microsoft<gh_stars>1-10
//*********************************************************
//
// Copyright (c) Microsoft. All rights reserved.
//
//*********************************************************
#include "pch.h"
#include "MainPage.xaml.h"
#include "Constants.h"
using namesp... |
hradec/duke | src/duke/io/ImageLoadUtils.cpp | #include "duke/io/ImageLoadUtils.hpp"
#include "duke/attributes/Attributes.hpp"
#include "duke/attributes/AttributeKeys.hpp"
#include "duke/filesystem/FsUtils.hpp"
#include "duke/filesystem/MemoryMappedFile.hpp"
#include "duke/gl/GlUtils.hpp"
#include "duke/gl/Textures.hpp"
#include "duke/image/ImageDescription.hpp"
#... |
matiaslopezd/wix-style-react | src/PopoverMenu/index.js | <filename>src/PopoverMenu/index.js<gh_stars>1-10
export {default} from './PopoverMenu';
|
input-output-hk/Scorex | scorex-basics/src/test/scala/scorex/crypto/ads/merkle/MerkleSpecification.scala | package scorex.crypto.ads.merkle
import java.io.{File, FileOutputStream}
import org.scalacheck.Gen
import org.scalatest.prop.{GeneratorDrivenPropertyChecks, PropertyChecks}
import org.scalatest.{Matchers, PropSpec}
import scorex.crypto.hash.FastCryptographicHash
import scala.util.Random
class MerkleSpecification ex... |
janishar/jPost | jpost/src/main/java/com/mindorks/jpost/core/CustomChannel.java | /*
* Copyright (C) 2016 <NAME>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to i... |
bitkylin/ClusterDeviceManager | Project-v1-Obsolete/clustermanage-server/src/main/java/cc/bitky/clustermanage/server/message/base/IMessage.java | <reponame>bitkylin/ClusterDeviceManager
package cc.bitky.clustermanage.server.message.base;
public interface IMessage {
int getMsgId();
int getDeviceId();
void setDeviceId(int deviceId);
int getGroupId();
void setGroupId(int groupId);
}
|
theothertomelliott/gort | dataaccess/memory/token-access.go | <filename>dataaccess/memory/token-access.go
/*
* Copyright 2021 The Gort 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
*
... |
metux/chromium-deb | third_party/WebKit/Source/core/html/track/AudioTrack.cpp | // Copyright 2014 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 "core/html/track/AudioTrack.h"
#include "core/html/HTMLMediaElement.h"
namespace blink {
AudioTrack::AudioTrack(const String& id,
... |
HPCToolkit/hpctest | internal/notes/builtin-SAVE/packages/mpibash/package.py | <gh_stars>1-10
##############################################################################
# Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Created by <NAME>, <EMAIL>, All rights reserved.
# LLNL-CODE-647... |
njhoffman/better-musician | src/store/reducers.js | <reponame>njhoffman/better-musician
import { combineReducers } from 'redux';
import { reducer as formReducer } from 'redux-form';
import { connectRouter } from 'connected-react-router';
import { init as initLog } from 'shared/logger';
import uiReducer from './ui';
import apiReducer from './api';
import userReducer from... |
simia-tech/netx | test/helper.go | <reponame>simia-tech/netx
package test
import (
"context"
"fmt"
"log"
"net"
"testing"
"github.com/simia-tech/errx"
"github.com/simia-tech/netx"
"github.com/stretchr/testify/require"
)
type action func(net.Conn) error
func echoServer(conn net.Conn) error {
data, err := ReadBlock(conn)
if err != nil {
ret... |
GTreeSoftware/GTreeCodeExample | Function/ineuronprocessobject.h | #ifndef INEURONPROCESSOBJECT_H
#define INEURONPROCESSOBJECT_H
#include "../ngtypes/ineurondataobject.h"
class ProcessStatus
{
public:
ProcessStatus(){ isSuccess = false; }
ProcessStatus(bool arg, const std::string& str, const std::string &infostr):isSuccess(arg), className(str), errorStr(infostr){}
... |
IbexOmega/CrazyCanvas | Dependencies/NoesisGUI/Providers/Src/LocalFontProvider.cpp | ////////////////////////////////////////////////////////////////////////////////////////////////////
// NoesisGUI - http://www.noesisengine.com
// Copyright (c) 2013 Noesis Technologies S.L. All Rights Reserved.
////////////////////////////////////////////////////////////////////////////////////////////////////
#incl... |
jattenberg/parallax | src/main/java/com/dsi/parallax/ml/classifier/lazy/KDType.java | /*******************************************************************************
* Copyright 2012 <NAME>. Not for re-use or redistribution.
******************************************************************************/
package com.dsi.parallax.ml.classifier.lazy;
/**
* The distance function used for kd trees
*/
p... |
Dorllen/JDemo | bao_console/src/main/java/bao/action/base/Worker.java | package bao.action.base;
import bao.menu.BaseMenu;
public interface Worker {
void work(BaseMenu list);
}
|
Matthew-Griffith/ringteki-client | test/server/cards/05-UotE/FromTheShadows.spec.js | describe('From the Shadows', function() {
integration(function() {
describe('When playing From the Shadows\'s', function() {
beforeEach(function() {
this.setupTest({
phase: 'conflict',
player1: {
inPlay: ['adept-of-s... |
SocialGouv/ecollecte | control/tests/test_send_questionnaire_file.py | <filename>control/tests/test_send_questionnaire_file.py<gh_stars>1-10
from pytest import mark
from django.shortcuts import reverse
from tests import factories, utils
pytestmark = mark.django_db
class SendQuestionnaireRunner():
def __init__(self, client):
questionnaire = factories.QuestionnaireFactory(... |
Hess-Gregory/cms_server | app/components/about/aboutRouter.js | <gh_stars>0
import about from './aboutController';
const router = require('express').Router()
router.get('/about', about.getAbouts)
router.post('/about', about.storeAbout)
router.get('/about/:aboutId', about.findAbout)
router.put('/about/:aboutId', about.updateAbout)
router.delete('/about/:aboutId', about.deleteAbou... |
WJW53/WebNotes | WebLevelOne/14.包管理器/2. [重点]npm/2-7. 运行环境配置/test.js | <gh_stars>1-10
//读取package.json文件中的版本号
const packageConfig = require("./package.json");
console.log(packageConfig.version);
console.log(packageConfig.a); |
danterusdev/Sol-Client | game/src/main/java/me/mcblueparrot/client/util/data/Colour.java | <filename>game/src/main/java/me/mcblueparrot/client/util/data/Colour.java<gh_stars>0
package me.mcblueparrot.client.util.data;
import java.awt.Color;
import com.google.gson.annotations.Expose;
import lombok.Getter;
import me.mcblueparrot.client.util.Utils;
import net.minecraft.util.MathHelper;
public class Colour {... |
tmtsoftware/csw-prototype | javacsw/src/main/scala/javacsw/services/cs/akka/JConfigServiceClient.scala | package javacsw.services.cs.akka
import java.io.File
import java.util.Optional
import java.util.concurrent.CompletableFuture
import javacsw.services.cs.core.{JBlockingConfigManager, JConfigManager}
import akka.actor.{ActorRef, ActorRefFactory, ActorSystem}
import akka.util.Timeout
import com.typesafe.config.{Config, ... |
joelliusp/SpaceHabit | SpaceHabitRPG/Models/Zone.py | from StoryModels import StoryModels
from AllDBFields import ZoneDBFields
from ZoneDefinitions import ZoneDefinition
from ZoneDefinitions import AllZones
from bson.objectid import ObjectId
from OrphanedModelException import OrphanedModelException
import DatabaseLayer
import random
class Zone(StoryM... |
vlehtola/questmud | lib/guilds/spells/abjuration/_kyo_brr_tdr.c | // Changed spell name from remove protections to purge by C. 20051028
// Idea: removes ALL magic effects on the target (both good and bad)
resolve(int bonus, string target) {
object ob,sphere;
string target2;
if(target) ob = present(target, environment(this_player()));
if (!ob) {
... |
MaartenS11/Team-Fortress-Invasion | mp/src/old/cl_dll/idebugoverlaypanel.h | <filename>mp/src/old/cl_dll/idebugoverlaypanel.h
//======== (C) Copyright 1999, 2000 Valve, L.L.C. All rights reserved. ========
//
// The copyright to the contents herein is the property of Valve, L.L.C.
// The contents may be used and/or copied only with the written permission of
// Valve, L.L.C., or in accordance wi... |
RWTH-OS/MP-MPICH | rexec/RexecShell/Main.cpp | <reponame>RWTH-OS/MP-MPICH<gh_stars>0
//---------------------------------------------------------------------------
#define UNICODE
#include <winsock2.h>
#include <vcl\vcl.h>
#pragma hdrstop
#include "Main.h"
#include "Client.h"
#include "NetState.h"
#include "ConfigDlg.h"
#include "Parform.h"
#include "Exclude.h"
#i... |
hhq163/kk_core | examples/base/global.go | package base
const ReadBufferSize = 10240 //单位byte
const PacketMaxSize = 1024 * 64
const NUM_MSG_TYPES = 1000 //协议总数
const (
STATUS_NEVER = 0 // Opcode not accepted from client (deprecated or server side only)
STATUS_AUTHED = 1 // Player authenticated
STATUS_UNHANDLED = 2 // We don' handle this opcode yet
... |
kilbouri/advent-of-code | 2020/day12/part2.py | from os import getcwd
import re
import math
def rotate(degrees: int, wp: list):
newWaypoint = wp.copy()
rads = math.radians(degrees)
newWaypoint[1] = wp[1] * math.cos(rads) - wp[0] * math.sin(rads)
newWaypoint[0] = wp[0] * math.cos(rads) + wp[1] * math.sin(rads)
return newWaypoint
... |
dhis2/dhis2 | dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/tracker/TrackerIdentifierCollectorTest.java | /*
* Copyright (c) 2004-2022, 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 the above copyright notice, this
* list of cond... |
aaronmjacobs/Forge | Source/Math/Bounds.cpp | #include "Math/Bounds.h"
#include "Core/Assert.h"
Bounds::Bounds(const glm::vec3& centerPosition, const glm::vec3& extentVector)
: center(centerPosition)
, extent(extentVector)
, radius(glm::length(extentVector))
{
}
Bounds::Bounds(std::span<const glm::vec3> points)
{
ASSERT(points.size() > 0);
glm::... |
sonnat/sonnat-ui | packages/sonnat-ui/src/utils/useSyncEffect.js | <filename>packages/sonnat-ui/src/utils/useSyncEffect.js
import { useRef, useMemo, useEffect } from "react";
export default function useSyncEffect(effectFn, dependencies) {
const key = useRef([]);
let cleanUpFn;
// Store "generation" key. Just returns a new object every time
// eslint-disable-next-line react-h... |
xiyifen/myshop | src/main/java/com/xiyifen/myshop/system/mapper/Report2Mapper.java | package com.xiyifen.myshop.system.mapper;
import com.xiyifen.myshop.system.entity.Report2;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* @author xiyifen
*/
public interface Report2Mapper extends BaseMapper<Report2> {
}
|
Shefin-CSE16/Competitive-Programming | CodeForces/Solutions/1088A.cpp | #include <bits/stdc++.h>
using namespace std;
#define ll long long
int main()
{
ll x;
cin >> x;
for(ll i = 1; i <= x; i++) {
for(ll j = 1; j <= x; j++) {
if(i % j == 0) {
if(i * j > x && i < x * j) {
cout << i << " " << j << endl;
... |
gcao/gene | lib/gene/handlers/complex_string_handler.rb | module Gene
module Handlers
class ComplexStringHandler
COMPLEX_STRING1 = Gene::Types::Symbol.new('#""')
COMPLEX_STRING2 = Gene::Types::Symbol.new("#''")
def initialize
@logger = Logem::Logger.new(self)
end
def call context, data
return Gene::NOT_HANDLED unless
... |
we11cheng/WCTelegram | Telegraph/TGAccessChecker.h | <gh_stars>1-10
#import <Foundation/Foundation.h>
typedef enum {
TGPhotoAccessIntentRead,
TGPhotoAccessIntentSave,
TGPhotoAccessIntentCustomWallpaper
} TGPhotoAccessIntent;
typedef enum {
TGMicrophoneAccessIntentVoice,
TGMicrophoneAccessIntentVideo,
TGMicrophoneAccessIntentCall,
} TGMicrophoneA... |
best08618/asylo | gcc-gcc-7_3_0-release/gcc/testsuite/gcc.dg/special/weak-1.c | /* { dg-do run { xfail { hppa*-*-hpux* && { ! lp64 } } } } */
/* { dg-require-weak "" } */
/* { dg-additional-sources weak-1a.c } */
/* See PR target/23387 for hppa xfail details. */
#include <stdlib.h>
int foo(void) __attribute__((weak));
int foo(void) {
return 0;
}
int main(void) {
if (foo())
ex... |
bcncybersecurity/frab | test/support/capybara_helper.rb | module CapybaraHelper
def sign_in(email, password)
visit root_path
click_on 'Log-in'
fill_in 'Email', with: email
fill_in 'Password', with: password
click_on 'Log in'
end
def sign_in_user(user)
sign_in(user.email, 'frab123')
end
def visit_conference_settings(matcher = :first)
cli... |
Knight13/Exploring-Deep-Neural-Decision-Trees | Covertype/NN.py | <filename>Covertype/NN.py<gh_stars>1-10
import numpy as np
import tensorflow as tf
import covtype_data
import time
import random
x = covtype_data.feature
y = covtype_data.label
epochs = 100
batch_size = 100
input_num_units = x.shape[1]
hidden_num_units_1 = 10**5
hidden_num_units_2 = 10**5
num_class = y.shape[1]
... |
fossabot/hrdc | hrdc/stream/parser/__init__.py | from .base import Parser
from .binary import Binary
from .hex import Hex
from .code import Code
|
tunepack/tunepack-desktop | src/renderer/handlers/search.js | <reponame>tunepack/tunepack-desktop
import { sendAndWait } from '../utils/handlers'
import * as Channel from 'shared/constants/Channel'
export default (query) => {
return sendAndWait(Channel.SEARCH, {
query
})
}
|
Voldemort-Team/Voldemort | voldemort-core/src/main/java/com/fs/voldemort/core/functional/func/Func7.java | package com.fs.voldemort.core.functional.func;
import java.io.Serializable;
@FunctionalInterface
public interface Func7<T1, T2, T3, T4, T5, T6, T7, R> extends Serializable {
R call(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7);
}
|
mcarlen/libbiarc | lib/CurveBundle.cpp | /*!
\class CurveBundle include/CurveBundle.h include/CurveBundle.h
\ingroup BiarcLibGroup
\brief The CurveBundle class for storing and manipulating biarc curves
in \f$\mathcal{R}^3\f$.
This class is used to store and manipulate a set of curves.
This data can be interpolated to a biarc curve. The class is
... |
liaopeiyuan/ml-arsenal-public | settings.py | from datetime import datetime
PATH= "kail"
"""
Local
"""
if PATH=='kail':
print("Using paths on kail-main")
CHECKPOINTS='/data/kaggle/salt/checkpoints'
DATA='/data/kaggle/salt/'
RESULT='/data/ml-arsenal/projects/TGS_salt'
CODE='/data/ml-arsenal'
CUDA_DEVICES='0,1'
MODE='gpu'
GRAPHICS=T... |
ysyluminous/Java_Learning | code/back/bxd/file/ProducerConsumerDemo.java | <filename>code/back/bxd/file/ProducerConsumerDemo.java<gh_stars>1-10
import com.sun.xml.internal.ws.policy.privateutil.LocalizationMessages;
import com.sun.xml.internal.ws.runtime.config.TubelineFeatureReader;
import java.util.concurrent.locks.Condition;
import java.util.concurrent.locks.Lock;
import java.util.concurr... |
Th3Shadowbroker/nexus | src/main/java/org/th3shadowbroker/nexus/util/NumericRange.java | <gh_stars>0
package org.th3shadowbroker.nexus.util;
import lombok.Data;
import org.th3shadowbroker.nexus.exceptions.RangeFormatException;
import java.util.Random;
/**
* Class for handling ranges like '5-10'.
*/
@Data
public class NumericRange {
/**
* The minimum.
*/
private final double min;
... |
windsome/windpress | src/routes/Coin/components/MyArtList.js | <filename>src/routes/Coin/components/MyArtList.js
var xdebug = window.myDebug('COIN:ArtworkList')
import React, { Component, PropTypes } from 'react'
import { IndexLink, Link } from 'react-router'
import ReactModal from 'react-modal';
import _ from 'lodash';
import moment from 'moment';
//import classNames from 'classn... |
e-amzallag/mondialrelay-api | src/main/java/org/dajlab/mondialrelayapi/soap/ArrayOfString.java |
package org.dajlab.mondialrelayapi.soap;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>
* Classe Java pour ArrayOfS... |
fakecoinbase/ebaklundslashethtax | src/runtime-types/address-string.js | 'use strict';
const t = require('flow-runtime');
const AddressString = t.refinement(t.any(), input => {
if (!t.string().accepts(input) || !/0x[0-9a-f]{20}/.test(input))
return 'must be an address string (lower case)';
});
t.AddressString = () => AddressString;
|
alemosan1/prueba2 | src/main/java/es/tid/topologyModuleBase/COPServiceTopology/client/auth/Authentication.java | package es.tid.topologyModuleBase.COPServiceTopology.client.auth;
import java.util.Map;
import es.tid.topologyModuleBase.COPServiceTopology.client.Pair;
import java.util.List;
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-05-27T13:24:30.808+02:00")
public i... |
Peakstep233/Yttr | src/main/java/com/unascribed/yttr/mixin/effector/MixinVoxelShapes.java | package com.unascribed.yttr.mixin.effector;
import java.util.stream.Stream;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.ModifyVariable;
import org.spongepowered.asm.mixin.in... |
ajitda/flexerp | node_modules/redeyed/test/redeyed-smoke.js | 'use strict';
/*jshint asi: true*/
// applying redeyed to a bunch of files of contained libraries as a smoke test
var test = require('tap').test
, path = require('path')
, fs = require('fs')
, readdirp = require('readdirp')
, redeyed = require('..')
, esprima = require('esprima... |
jeremyagray/relue | tests/relue/math/hailstone.js | <filename>tests/relue/math/hailstone.js
'use strict';
const chai = require('chai');
const assert = chai.assert;
const relue = require('../../../index.js');
suite('relue.math.hailstone()', function() {
test('relue.math.hailstone() is a function', function(done) {
assert.equal(typeof relue.math.hailstone, 'funct... |
logV/superfluous | superfluous/components/about_sidebar/events.js | <reponame>logV/superfluous
"use strict";
// http://stackoverflow.com/questions/2905867/how-to-scroll-to-specific-item-using-jquery
function focusElement(scrollTo) {
var container = $("body,html");
container.stop(true, true).animate({
scrollTop: scrollTo.offset().top - container.offset().top
});
}
module.ex... |
jacogreyling/pexeso | config/manifest.js | <filename>config/manifest.js
'use strict';
const Confidence = require('confidence');
const Config = require('./config');
const criteria = {
env: process.env.NODE_ENV
};
const manifest = {
server: {
debug: {
request: ['error']
},
cache: {
name: 'redisCache',
... |
idmontie/gptp | BurningGround/src/hooks/bunker_hooks.cpp | #include "bunker_hooks.h"
#include "../SCBW/enumerations.h"
/// Checks whether the unit can attack from inside a bunker.
bool unitCanAttackInsideBunkerHook(const CUnit *unit) {
//Default StarCraft behavior
const u16 unitId = unit->id;
if (unitId == UnitId::TerranMarine
|| unitId == UnitId::Hero_Jim... |
mfkiwl/zephyr | include/zephyr/arch/x86/ia32/gdbstub.h | <filename>include/zephyr/arch/x86/ia32/gdbstub.h<gh_stars>1-10
/*
* Copyright (c) 2020 Intel Corporation.
*
* SPDX-License-Identifier: Apache-2.0
*/
/**
* @file
* @brief IA-32 specific gdbstub interface header
*/
#ifndef ZEPHYR_INCLUDE_ARCH_X86_GDBSTUB_SYS_H_
#define ZEPHYR_INCLUDE_ARCH_X86_GDBSTUB_SYS_H_
#if... |
isabelgk/airfx | source/projects/ar.bite_tilde/ar.bite_tilde.cpp | <filename>source/projects/ar.bite_tilde/ar.bite_tilde.cpp
#include "c74_min.h"
using namespace c74::min;
class bite : public object<bite>, public vector_operator<> {
public:
MIN_DESCRIPTION {"an unusual edge-maker"};
MIN_TAGS {"destruction, lofi"};
MIN_AUTHOR {"<NAME>"};
inlet<> in1 {this, "(signal) Input1"};
i... |
Mammad88/job4j_elementary | chapter_003/src/main/java/ru/job4j/collection/sort/JobDescByPriority.java | package ru.job4j.collection.sort;
import java.util.Comparator;
/**
* class JobDescByPriority - сортировка компаратора по приоритету и по убыванию.
*
* @author <NAME> (<EMAIL>)
* @version $1.0$
* @since 24.03.2020
*/
public class JobDescByPriority implements Comparator<Job> {
@Override
public int compare(... |
cybik/QSettingsDialog | QSettingsDialog/dialogui/settingsengine.h | #ifndef SETTINGSENGINE_H
#define SETTINGSENGINE_H
#include <QObject>
#include <QSignalMapper>
#include "qsettingsentry.h"
#include "qsettingsloader.h"
#include "qsettingswidget.h"
#include "checkinghelper.h"
class SettingsEngine : public QObject
{
Q_OBJECT
public:
explicit SettingsEngine(QObject *parent = nullptr);... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.