repo_name stringlengths 6 101 | path stringlengths 4 300 | text stringlengths 7 1.31M |
|---|---|---|
luoshengming/MyReadings | books/fpinjava/fpinjava-parent/fpinjava-usingfunctions-solutions/src/test/java/com/fpinjava/functions/exercise02_12/FunctionExamplesTest.java | package com.fpinjava.functions.exercise02_12;
import org.junit.Test;
import static com.fpinjava.functions.exercise02_12.FunctionExamples.factorial0;
import static com.fpinjava.functions.exercise02_12.FunctionExamples.factorial1;
import static org.junit.Assert.assertEquals;
public class FunctionExamplesTest {
@T... |
NicolasJudalet/connexions | gatsby-config.js | /**
* Configure your Gatsby site with this file.
*
* See: https://www.gatsbyjs.org/docs/gatsby-config/
*/
require("dotenv").config({
path: ".env",
})
const { spaceId, accessToken } = process.env
module.exports = {
plugins: [
{
resolve: "gatsby-source-contentful",
options: {
spaceId,
... |
samkusin/overview | Engine/Tasks/LoadFile.hpp | //
// LoadFile.hpp
// EnginePrototype
//
// Created by <NAME> on 11/30/15.
//
//
#ifndef Oveview_Task_LoadFile_hpp
#define Oveview_Task_LoadFile_hpp
#include <cinek/allocator.hpp>
#include <cinek/task.hpp>
#include <ckio/file.h>
#include <vector>
#include <string>
namespace cinek {
namespace ove {
class Loa... |
rmartinc/keycloak | saml-core/src/main/java/org/keycloak/saml/processing/core/parsers/saml/metadata/SAMLAuthzServiceParser.java | <reponame>rmartinc/keycloak
package org.keycloak.saml.processing.core.parsers.saml.metadata;
/**
* @author mhajas
*/
public class SAMLAuthzServiceParser extends SAMLEndpointTypeParser {
private static final SAMLAuthzServiceParser INSTANCE = new SAMLAuthzServiceParser();
public SAMLAuthzServiceParser() {
... |
hahs-92/ddd-sofkau-reto | src/main/java/co/com/webSchoolddd/registro/Escuela/command/RemoverReto.java | <reponame>hahs-92/ddd-sofkau-reto
package co.com.webSchoolddd.registro.Escuela.command;
import co.com.sofka.domain.generic.Command;
import co.com.webSchoolddd.registro.Escuela.valor.EscuelaId;
import co.com.webSchoolddd.registro.Escuela.valor.RetoId;
public class RemoverReto extends Command {
private final Escuel... |
supertech-999/ReactJS-Phonegap | app/src/flux/constants/lang.js | var ReactFlux = require('react-flux');
module.exports = ReactFlux.createConstants([
'SET_LOCALE'
], 'LANG');
|
ahmadabudames/data-structures-and-algorithms | python/code_challenges/tree_intersection/tree_intersection/linkedList.py | class Node:
def __init__(self, value):
self.value = value
self.next = None
class LinkedList:
def __init__(self):
self.head = None
def add(self, value):
new_node = Node(value)
if not self.head:
self.head = new_node
else:
new_node.ne... |
sizeofvoid/ifconfigd | usr/src/sys/arch/sparc64/sparc64/ofw_machdep.c | <reponame>sizeofvoid/ifconfigd
/* $OpenBSD: ofw_machdep.c,v 1.31 2009/02/19 11:12:42 kettenis Exp $ */
/* $NetBSD: ofw_machdep.c,v 1.16 2001/07/20 00:07:14 eeh Exp $ */
/*
* Copyright (C) 1996 <NAME>.
* Copyright (C) 1996 TooLs GmbH.
* All rights reserved.
*
* Redistribution and use in source and binary forms, wi... |
renesugar/Js2Py | tests/test_cases/language/future-reserved-words/S7.6.1.2_A1.13.js | // Copyright 2009 the Sputnik authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
info: The "float" token can be used as identifier
es5id: 7.6.1.2_A1.13
description: Checking if execution of "float=1" succeeds
---*/
var float = 1;
|
damazz/HQCA | hqca/core/primitives/_Hamiltonian.py | from math import pi
import sys
'''
takes Pauli strings from qiskit aqua package, and actually adds on Hamiltonian
circuit
'''
def apply_clifford_operation(Q,U):
def V(n):
Q.qc.s(n)
Q.qc.h(n)
Q.qc.sdg(n)
def S(n):
Q.qc.s(n)
cliff = {
'H':Q.qc.h,
'S':S,... |
hhgyu/webrtc-java | webrtc-demo/webrtc-demo-api/src/main/java/dev/onvoid/webrtc/demo/apprtc/AppRTCJsonCodec.java | /*
* Copyright 2019 <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 in wr... |
14ms/Minecraft-Disclosed-Source-Modifications | Skizzle/us/myles/viaversion/protocols/protocol1_13to1_12_2/blockconnections/ChorusPlantConnectionHandler.java | /*
* Decompiled with CFR 0.150.
*/
package us.myles.ViaVersion.protocols.protocol1_13to1_12_2.blockconnections;
import java.util.ArrayList;
import java.util.List;
import us.myles.ViaVersion.api.data.UserConnection;
import us.myles.ViaVersion.api.minecraft.BlockFace;
import us.myles.ViaVersion.api.minecraft.Position;... |
jsimck/uni | ano1/5-mog/gaussian.cpp | #include "gaussian.h"
#include <cmath>
#include <utils.h>
#include <cassert>
#include <opencv2/opencv.hpp>
double Gaussian::calcProbability(double X, Gaussian &g) {
double e = std::exp(-((SQR(X - g.u) / (2.0 * SQR(g.sd)))));
double p = (1.0 / (g.sd * std::sqrt(2.0 * M_PI))) * e;
return p;
}
double Gaussi... |
Jiangtong-Li/ZHSIR | src/package/args/pcyc_args.py | import argparse
def parse_config():
parser = argparse.ArgumentParser()
parser.add_argument('--save_dir', type=str, default='pcyc_test', help='The directory to save the model and logs')
parser.add_argument('--sketch_dir', type=str,
help='The directory of sketches. The directory can ... |
welterde/ewok | com/planet_ink/coffee_mud/Commands/ClanResign.java | package com.planet_ink.coffee_mud.Commands;
import com.planet_ink.coffee_mud.core.interfaces.*;
import com.planet_ink.coffee_mud.core.*;
import com.planet_ink.coffee_mud.Abilities.interfaces.*;
import com.planet_ink.coffee_mud.Areas.interfaces.*;
import com.planet_ink.coffee_mud.Behaviors.interfaces.*;
import com.plane... |
ManuRodgers/react-dva-chat | node_modules/antd-mobile/es/pagination/style/index.native.js | <filename>node_modules/antd-mobile/es/pagination/style/index.native.js
import variables from '../../style/themes/default.native';
export default {
container: {
alignItems: 'center',
justifyContent: 'center'
},
numberStyle: {
flexDirection: 'row',
justifyContent: 'center'
... |
liuyukuai/commons | commons-test/src/main/java/com/itxiaoer/commons/test/mvc/MockMvcConsumers.java | package com.itxiaoer.commons.test.mvc;
import com.itxiaoer.commons.core.page.ResponseCode;
import lombok.extern.slf4j.Slf4j;
import org.springframework.test.web.servlet.ResultActions;
import org.springframework.test.web.servlet.result.MockMvcResultMatchers;
import java.util.function.Consumer;
/**
* @author : liuyk
... |
CharlesCheung96/tiflow | dm/dm/pb/dmmaster.pb.go | <filename>dm/dm/pb/dmmaster.pb.go<gh_stars>0
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: dmmaster.proto
package pb
import (
context "context"
fmt "fmt"
proto "github.com/gogo/protobuf/proto"
_ "google.golang.org/genproto/googleapis/api/annotations"
grpc "google.golang.org/grpc"
codes "google.g... |
eoekun/jsondoc | jsondoc-core/src/test/java/org/jsondoc/core/util/JSONDocEnumTemplateBuilderTest.java | package org.jsondoc.core.util;
import java.io.IOException;
import java.util.Map;
import java.util.Set;
import org.jsondoc.core.util.pojo.MyEnum;
import org.junit.Test;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.google.common.collect.Sets;
public class JSONDocEnumTemplateBuilderTest {
@Test
pu... |
SamirAroudj/BaseProject | Platform/Utilities/RectanglePacker.cpp | <gh_stars>0
/*
* Copyright (C) 2017 by Author: Aroudj, Samir, born in Suhl, Thueringen, Germany
* All rights reserved.
*
* This software may be modified and distributed under the terms
* of the BSD 3-Clause license. See the License.txt file for details.
*/
#include <cstring>
#include <limits>
#include "RectangleP... |
npocmaka/Windows-Server-2003 | base/ntsetup/cobra/engine/ism/modules.c | <reponame>npocmaka/Windows-Server-2003
/*++
Copyright (c) 1999 Microsoft Corporation
Module Name:
modules.c
Abstract:
Implements routines that are common to the entire ISM.
Author:
<NAME> (jimschm) 21-Mar-2000
Revision History:
<alias> <date> <comments>
--*/
//
// Inclu... |
jiangshide/sdk | eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/RefactoringTest.java | /*
* Copyright (C) 2011 The Android Open Source Project
*
* Licensed under the Eclipse Public License, Version 1.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.eclipse.org/org/documents/epl-v10.php
*
* Unless r... |
wyaadarsh/LeetCode-Solutions | Python3/0811-Subdomain-Visit-Count/soln.py | <reponame>wyaadarsh/LeetCode-Solutions
class Solution(object):
def subdomainVisits(self, cpdomains):
"""
:type cpdomains: List[str]
:rtype: List[str]
"""
counter = collections.Counter()
for item in cpdomains:
num, url = item.split()
num = int(n... |
darobin/critic | installation/database.py | <filename>installation/database.py
# -*- mode: python; encoding: utf-8 -*-
#
# Copyright 2012 <NAME>, 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.apac... |
sorasful/minos-python | packages/core/minos-microservice-saga/tests/test_saga/test_exceptions.py | import unittest
from minos.common import (
MinosException,
)
from minos.saga import (
AlreadyOnSagaException,
EmptySagaStepException,
MultipleOnErrorException,
MultipleOnExecuteException,
MultipleOnFailureException,
MultipleOnSuccessException,
SagaException,
SagaExecutionException,
... |
GSTJ/XPerion | packages/mobile/src/views/home/styles.js | import styled from 'styled-components/native';
import LinearGradient from 'react-native-linear-gradient';
import {Map as map} from 'components/molecules';
import {TEXT, LOWER_CONTRAST} from 'theme';
export const SearchContainer = styled.View`
height: 55;
margin-bottom: 10px;
border: 1px solid ${LOWER_CONTRAST};
... |
Myweik/MMC_qgroundcontrol | MMC/qtavplayer/src/QmlVideoObject.cpp | <reponame>Myweik/MMC_qgroundcontrol<filename>MMC/qtavplayer/src/QmlVideoObject.cpp
/****************************************************************************
* VLC-Qt - Qt and libvlc connector library
* Copyright (C) 2013 <NAME> <<EMAIL>>
*
* Based on Phonon multimedia library
* Copyright (C) 2011 <NAME> <<EMA... |
liuning19861103/NavOS_C | Sources/VSSim/SimParSet.h | <reponame>liuning19861103/NavOS_C<gh_stars>0
/*****************************************************************
* @brief:
* @File:
* @Project:
* @Author:
* @Date:
* @CopyRight:
* @Version:
* @Description:
**************************************************************... |
ameli/TraceInv | imate/_trace_estimator/trace_estimator_plot_utilities.py | # SPDX-FileCopyrightText: Copyright 2021, <NAME> <<EMAIL>>
# SPDX-License-Identifier: BSD-3-Clause
# SPDX-FileType: SOURCE
#
# This program is free software: you can redistribute it and/or modify it
# under the terms of the license found in the LICENSE.txt file in the root
# directory of this source tree.
# =======
#... |
kniz/wrd | mod/wrd/loader/pack/opaquePackLoading.cpp | #include "opaquePackLoading.hpp"
namespace wrd {
WRD_DEF_ME(opaquePackLoading)
wbool me::verify(errReport& rpt, pack& pak) { return true; }
}
|
frkasper/MacroUtils | macroutils/src/macroutils/templates/TemplateGeometry.java | <reponame>frkasper/MacroUtils<filename>macroutils/src/macroutils/templates/TemplateGeometry.java
package macroutils.templates;
import macroutils.MacroUtils;
import macroutils.StaticDeclarations;
import macroutils.UserDeclarations;
import star.base.neo.DoubleVector;
import star.cadmodeler.Body;
import star.cadmodeler.C... |
oliverselinger/failsafe-executor | src/main/java/os/failsafe/executor/Execution.java | <reponame>oliverselinger/failsafe-executor
package os.failsafe.executor;
import os.failsafe.executor.utils.Database;
import os.failsafe.executor.utils.SystemClock;
import java.time.LocalDateTime;
import java.util.List;
import java.util.Optional;
class Execution {
private final Database database;
private fi... |
Const-me/vis_avs_dx | avs/vis_avs/r_colorreduction.cpp | /*
LICENSE
-------
Copyright 2005 Nullsoft, Inc.
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 conditions a... |
yusenD/MySubway | app/src/main/java/com/dsunny/util/AppUtil.java | <reponame>yusenD/MySubway
package com.dsunny.util;
import android.app.Activity;
import android.content.ClipData;
import android.content.ClipboardManager;
import android.content.Context;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.content.res.Resources;
import android... |
samuelhehe/AppMarket | src/com/samuel/downloader/app/AtyAppMgr.java | <reponame>samuelhehe/AppMarket
package com.samuel.downloader.app;
import java.util.ArrayList;
import java.util.List;
import net.tsz.afinal.FinalDBChen;
import android.content.Context;
import android.os.Bundle;
import android.os.Handler;
import android.view.LayoutInflater;
import android.view.View;
import a... |
bayashiok/httpd | include/ap_expr.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 copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not... |
qsjdhm/vue2-cli-test | src/subtree/packages/v-tree/setMethods.js | const METHOD_NAMES = [
'filter',
'updateKeyChildren',
'getCheckedNodes',
'setCheckedNodes',
'getCheckedKeys',
'setCheckedKeys',
'setChecked',
'getHalfCheckedNodes',
'getHalfCheckedKeys',
'getCurrentKey',
'getCurrentNode',
'setCurrentKey',
'setCurrentNode',
'getNod... |
yodakingdoms/kingdoms | Areas/Bird/Oakdale/o/Village/Monster/villager_man.c | // Inherited by male villagers
#pragma strict_types
#include "../def.h"
inherit MONSTER + "villager_adult";
void create_object(void);
void create_object(void)
{
::create_object();
add_id("man");
set_gender(1);
load_a_chat(25,({ "The man shouts: Foul servant of Nirach!\n" }));
}
|
purushothamgowthu/deeppy | deeppy/feedforward/neural_network.py | import numpy as np
from ..base import Model, ParamMixin, CollectionMixin
from ..feed import Feed
from ..loss import SoftmaxCrossEntropy
class NeuralNetwork(Model, CollectionMixin):
def __init__(self, layers, loss):
self.layers = layers
self.loss = loss
self.bprop_until = next((idx for idx,... |
m-nakagawa/sample | jena-3.0.1/jena-sdb/src/main/java/org/apache/jena/sdb/script/QExec.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 ... |
my-digital-decay/Polycode | include/polycode/bindings/lua/PolycodeLua.h | #pragma once
#include <Polycode.h>
extern "C" {
#include <stdio.h>
#include "lua.h"
#include "lualib.h"
#include "lauxlib.h"
int _PolyExport luaopen_Polycode(lua_State *L);
}
|
IBM/oct-glaucoma-forecast | revised/training/scripts/test_reconstruction_mlode.py | <reponame>IBM/oct-glaucoma-forecast
import os
import numpy as np
from data.utils import mask_rnfl
from scripts.datautils import MatchedTestSet, save_error
from scripts.eval_mlode_sync import evaluate_reconstruction_error, create_vft_mask
from train_multimodal_latentodegru_sync import getConfig
from utils.oct_utils imp... |
mathiasbynens/unicode-data | 6.3.0/scripts/Brahmi-regex.js | <filename>6.3.0/scripts/Brahmi-regex.js<gh_stars>10-100
// Regular expression that matches all symbols in the `Brahmi` script as per Unicode v6.3.0:
/\uD804[\uDC00-\uDC4D\uDC52-\uDC6F]/; |
Caesar73/chineseclub | public/src/js/libs/src/TouchSlide.js | <filename>public/src/js/libs/src/TouchSlide.js<gh_stars>0
/*!
* TouchSlide v1.1
* javascript触屏滑动特效插件,移动端滑动特效,触屏焦点图,触屏Tab切换,触屏多图切换等
* 详尽信息请看官网:http://www.SuperSlide2.com/TouchSlide/
*
* Copyright 2013 大话主席
*
* 请尊重原创,保留头部版权
* 在保留版权的前提下可应用于个人或商业用途
* 1.1 宽度自适应(修复安卓横屏时滑动范围不变的bug)
*/
/*!
AniJS - http://anijs.gith... |
moyui/BlogBuild | client/src/constant/actions.js | <filename>client/src/constant/actions.js
import { FETCH_STARTED, FETCH_SUCCESS, FETCH_FAILURE } from './actionTypes.js';
export const fetchAItemsStarted = () => {
return {
type: FETCH_STARTED
}
};
export const fetchAItemsSuccess = (data) => {
return {
type: FETCH_SUCCESS,
data,
}
};
export const ... |
JackGirl/start-base | services/activiti/src/main/java/cn/ulyer/activiti/service/ActReModelService.java | package cn.ulyer.activiti.service;
import com.baomidou.mybatisplus.extension.service.IService;
import cn.ulyer.activiti.entity.ActReModel;
/**
* <p>
* 服务类
* </p>
*
* @author mybatis-plus generator
* @since 2021-06-15
*/
public interface ActReModelService extends IService<ActReModel> {
}
|
SCSLaboratory/BearOS | usr/include/sys/syslog.h | <filename>usr/include/sys/syslog.h
#pragma once
/* Modified for Bear (ST) */
/* syslog warning priorities -- needed by dropbear */
#define LOG_EMERG 0
#define LOG_ALERT 1
#define LOG_CRIT 2
#define LOG_ERR 3
#define LOG_WARNING 4
#define LOG_NOTICE 5
#define LOG_INFO 6
#define LOG_DEBUG 7
/* end of mods */
|
wokalski/Distraction-Free-Xcode-plugin | Archived/v1/WCDistractionFreeXcodePlugin/Headers/PlugIns/IDEInterfaceBuilderKit/IBSourceCodeScanningActivityReporter.h | <reponame>wokalski/Distraction-Free-Xcode-plugin<filename>Archived/v1/WCDistractionFreeXcodePlugin/Headers/PlugIns/IDEInterfaceBuilderKit/IBSourceCodeScanningActivityReporter.h
//
// Generated by class-dump 3.5 (64 bit).
//
// class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by <NAME>.
//
#import "I... |
kineticsquid/kineticsquid | Jena/src/com/hp/hpl/jena/sparql/util/DatasetUtils.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 ... |
cvisionai/tator-py | test/test_attachment.py | <reponame>cvisionai/tator-py
import tempfile
import os
import tator
def test_attachment(host, token, project, video):
tator_api = tator.get_api(host, token)
with tempfile.NamedTemporaryFile(mode='w',suffix=".txt") as temp:
temp.write("foo")
temp.flush()
for progress, response in tator... |
pousse-cafe/pousse-cafe-source | src/main/java/poussecafe/source/generation/ProducesEventsEditor.java | package poussecafe.source.generation;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.Optional;
import org.eclipse.jdt.core.dom.Annotation;
import org.eclipse.jdt.core.dom.Expression;
import org.eclipse.jdt.core.dom.MemberValuePair;
import org.eclipse.jdt.core.dom.Norma... |
pengchujin/LeetCode-Go | leetcode/9990975.Odd-Even-Jump/975. Odd Even Jump.go | <filename>leetcode/9990975.Odd-Even-Jump/975. Odd Even Jump.go
package leetcode
import (
"fmt"
)
func oddEvenJumps(A []int) int {
oddJumpMap, evenJumpMap, count, current, res := map[int]int{}, map[int]int{}, 1, 0, 0
for i := 0; i < len(A); i++ {
for j := i + 1; j < len(A); j++ {
if v, ok := oddJumpMap[i]; ok ... |
opencomputeproject/Rack-Manager | Contrib-Microsoft/Olympus_rack_manager/ocs/Init/ocs-init.c | // Copyright (C) Microsoft Corporation. All rights reserved.
//
// This program is free software; you can redistribute it
// and/or modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
#in... |
jurgendl/jhaws | jhaws/elasticsearch-impl/src/main/java/org/jhaws/common/elasticsearch/impl/ElasticCustomizer.java | package org.jhaws.common.elasticsearch.impl;
import java.lang.reflect.Modifier;
import java.util.Arrays;
import java.util.Collection;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.TreeMap;
import org.apache.commons.lang3.StringUtils;
import or... |
Rbasovnik/IngresoUTN2019 | 1-EntradaSalida/jsEntradaSalida-1.js | //Debemos lograr mostrar un mensaje al presionar el botón 'MOSTRAR'.
function Mostrar()
{
//alert("Esto funciona de maravilla");
/* //parcial ej 7
var nota;
var sexo;
var promedio;
var notaBaja;
var contadorVaronesMas5=0 ;
var flag=0;
var acumuladorNotas=0;
var sexoNota... |
ErnestHolloway8482/QV21-codingexercise-holloway | app/src/androidTest/java/qv21/codingexercise/viewmodeltests/SplashVMTest.java | <filename>app/src/androidTest/java/qv21/codingexercise/viewmodeltests/SplashVMTest.java
package qv21.codingexercise.viewmodeltests;
import android.support.test.runner.AndroidJUnit4;
import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
impor... |
nurnware/ray-microkernel | src/Include/cmdline.h | #ifndef _CMDLINE_H
#define _CMDLINE_H
/**
* @file cmdline.h
* @author <NAME>
* @date 09-13-2006
* @brief Checks and analyses the kernel command line
*/
/**
* parses the command line
* @param cmdline The command line from the multiboot bootloader (e.g. grub)
*/
void KernelParseCommandLine(String cmdline);
voi... |
rajyan/AtCoder | ABC/ABC014/Source.cpp | <filename>ABC/ABC014/Source.cpp<gh_stars>1-10
//#include <cassert>
//#include <cstdio>
//#include <cmath>
//#include <iostream>
//#include <iomanip>
//#include <sstream>
//#include <vector>
//#include <set>
//#include <map>
//#include <queue>
//#include <numeric>
//#include <algorithm>
//
//using namespace std;
//using... |
diku-dk/PROX | PROX/SIMULATION/CONTENT/CONTENT/src/content_channels_storage.cpp | #include <content_channels.h>
namespace content
{
//--------------------------------------------------------------------------------
void ChannelStorage::clear()
{
m_channels.clear();
}
//--------------------------------------------------------------------------------
size_t ChannelStorage::c... |
wanghaiyang-github/dna-cloud | bazl-dna-database-service/src/main/java/com/bazl/dna/database/service/service/impl/DnaPanelInfoServiceImpl.java | <filename>bazl-dna-database-service/src/main/java/com/bazl/dna/database/service/service/impl/DnaPanelInfoServiceImpl.java<gh_stars>0
package com.bazl.dna.database.service.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.bazl.dna.database.service.mapper.DnaLocusInfoMapper;
im... |
mauriciotogneri/android-utils | androidutils/src/main/java/com/mauriciotogneri/androidutils/Connectivity.java | <reponame>mauriciotogneri/android-utils<gh_stars>1-10
package com.mauriciotogneri.androidutils;
import android.annotation.SuppressLint;
import android.content.Context;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import androidx.annotation.NonNull;
public class Connectivity
{
private f... |
nccasia/ncc-komubot | test/env.test.js | <reponame>nccasia/ncc-komubot
const path = require('path');
const env = require('../env');
const vars = env.config({ path: path.resolve(__dirname, '..', '.env') });
console.log(vars);
|
d3scomp/JDEECo | jdeeco-edl-model/src/cz/cuni/mff/d3s/jdeeco/edl/model/edl/impl/FunctionCallImpl.java | <reponame>d3scomp/JDEECo
/**
*/
package cz.cuni.mff.d3s.jdeeco.edl.model.edl.impl;
import cz.cuni.mff.d3s.jdeeco.edl.model.edl.EdlPackage;
import cz.cuni.mff.d3s.jdeeco.edl.model.edl.QueryVisitor;
import cz.cuni.mff.d3s.jdeeco.edl.model.edl.FunctionCall;
import cz.cuni.mff.d3s.jdeeco.edl.model.edl.Query;
import java... |
btjanaka/competitive-programming-solutions | kattis/zebrasocelots.cpp | <filename>kattis/zebrasocelots.cpp
// Author: btjanaka (<NAME>)
// Problem: (Kattis) zebrasocelots
// Title: Zebras and Ocelots
// Link: https://open.kattis.com/problems/zebrasocelots
// Idea:
// Difficulty: easy
// Tags:
#include <bits/stdc++.h>
#define GET(x) scanf("%d", &x)
#define GED(x) scanf("%lf", &x)
typedef lo... |
shenzulun/IEasyTool | src/main/java/me/belucky/easytool/random/IdCardRandom.java | /**
* File Name: IdCardRandom.java
* Date: 2016-9-19 下午02:22:58
*/
package me.belucky.easytool.random;
import java.util.ArrayList;
import java.util.List;
import me.belucky.easytool.util.IDCardGenerateUtil;
/**
* 功能说明: 随机生成身份信息
* @author shenzl
* @date 2016-9-19
* @version 1.0
*/
public class I... |
revoiid/sven_internal | sven_internal/patterns.h | <reponame>revoiid/sven_internal
// Patterns
#pragma once
#include "utils/patterns_base.h"
namespace Patterns
{
namespace Interfaces
{
EXTERN_PATTERN(EngineFuncs);
EXTERN_PATTERN(ClientFuncs);
EXTERN_PATTERN(EngineStudio);
}
namespace Hardware
{
EXTERN_PATTERN(flNextCmdTime);
EXTERN_PATTERN(Netchan_C... |
pethersonmoreno/secretvault | controllers/key/routeKey.go | package key
import (
"github.com/gin-gonic/gin"
)
func RouteKey(router *gin.Engine) {
secretKey := router.Group("/key")
secretKey.PUT("/intermediateKey", updateIntermediateKeyHandler)
secretKey.PUT("/openingKey", updateOpeningKeyHandler)
secretKey.POST("", createKeyHandler)
secretKey.POST("/generateRsaKey", gen... |
Mbompr/deepr | tests/unit/layers/test_layers_mask.py | <reponame>Mbompr/deepr<filename>tests/unit/layers/test_layers_mask.py
"""Tests for layers.mask"""
import numpy as np
import tensorflow as tf
import deepr as dpr
def test_layers_mask_equal():
"""Test for Equal"""
layer = dpr.layers.Equal(values=(0, 1))
result = layer(tf.constant([0, 1, 2]))
with tf.S... |
jiadaizhao/LintCode | 1201-1300/1218-Number Complement/1218-Number Complement.py | <reponame>jiadaizhao/LintCode
class Solution:
"""
@param num: an integer
@return: the complement number
"""
def findComplement(self, num):
# Write your code here
limit = 1
while limit <= num:
limit <<= 1
return limit - 1 - num
|
mahdanidani/google-api-ads-ruby | dfp_api/examples/v201502/custom_field_service/create_custom_field_options.rb | <filename>dfp_api/examples/v201502/custom_field_service/create_custom_field_options.rb
#!/usr/bin/env ruby
# Encoding: utf-8
#
# Copyright:: Copyright 2012, Google Inc. All Rights Reserved.
#
# License:: Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in comp... |
blueblueblue/infinispan | commons/src/main/java/org/infinispan/commons/marshall/LambdaExternalizer.java | <gh_stars>100-1000
package org.infinispan.commons.marshall;
/**
* A lambda {@link AdvancedExternalizer}.
*
* @param <T>
* @since 8.0
*/
public interface LambdaExternalizer<T> extends AdvancedExternalizer<T> {
ValueMatcherMode valueMatcher(Object o);
}
|
david-buderus/PP-Manager | server/src/main/java/de/pnp/manager/main/ManagerApplication.java | package de.pnp.manager.main;
import de.pnp.manager.ui.ManagerView;
import javafx.application.Application;
import javafx.stage.Stage;
import net.ucanaccess.jdbc.UcanaccessDriver;
import java.io.File;
import java.sql.DriverManager;
import java.sql.SQLException;
public class ManagerApplication extends Application {
... |
xk-wang/mgek_imgbed | app/api/img/image_format.py | # -*- coding: utf-8 -*-
# @Author: Landers
# @Github: Landers1037
# @File: image_format.py
# @Date: 2020-05-15
#输出适用多种格式的图片信息
from app.api.img import img
from app.database import database
from flask import request
from app.utils import format_response
from app import global_config
@img.route('/api/image_format')
def... |
xuantan/viewfinder | backend/db/user.py | <filename>backend/db/user.py
# Copyright 2011 Viewfinder Inc. All Rights Reserved.
"""Viewfinder user.
User: viewfinder user account information
"""
__author__ = '<EMAIL> (<NAME>)'
import json
from copy import deepcopy
from tornado import gen, web
from viewfinder.backend.base import secrets, util
from viewfinder... |
uael/fdf | libft/src/ds/ft_du_begin.c | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_du_begin.c :+: :+: :+: ... |
plusmancn/learn-arithmetic | arithmetic/src/main/java/cn/plusman/arithmetic/leetcode/top/top69/Top69Solution.java | package cn.plusman.arithmetic.leetcode.top.top69;
/**
* @author plusman
* @since 2021/7/14 2:44 PM
*/
public interface Top69Solution {
int mySqrt(int x);
}
|
OpenHFT/Chronicle-Test-Framework | src/test/java/net/openhft/chronicle/testframework/internal/ProductionTest.java | <gh_stars>0
/*
*
* Copyright (c) 2006-2020, Speedment, 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
*
* ... |
CharlesPoletowin/SHU_selecting_course | src/main/Java/com/shu/db/dao/CourseDao.java | <reponame>CharlesPoletowin/SHU_selecting_course
package com.shu.db.dao;
import com.shu.db.entity.Course;
import java.util.List;
/**
* Created by PoleToWin on 2019/5/1 17:50
*/
public interface CourseDao {
Course getCourse(String kh);
List<Course> getCourseList();
List<Course> getCourseListbyYxh(String y... |
Glost/db_nets_renew_plugin | root/prj/sol/projects/renew2.5source/renew2.5/src/Gui/src/de/renew/gui/CPNDrawing.java | package de.renew.gui;
import CH.ifa.draw.figures.TextFigure;
import CH.ifa.draw.framework.ConnectionFigure;
import CH.ifa.draw.framework.Figure;
import CH.ifa.draw.framework.FigureChangeAdapter;
import CH.ifa.draw.framework.FigureChangeEvent;
import CH.ifa.draw.framework.FigureEnumeration;
import CH.ifa.draw.framewor... |
titusfortner/watirmark | lib/watirmark/models/factory.rb | require_relative 'cucumber_helper'
require_relative 'default_values'
require_relative 'factory_methods'
require_relative 'factory_method_generators'
require_relative 'debug_methods'
module Watirmark
module Model
class Factory
extend FactoryMethods
include CucumberHelper
include DebugMethods
... |
Titzi90/hpx | examples/interpolate1d/interpolate1d/dimension.cpp | // Copyright (c) 2007-2012 <NAME>
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#include <hpx/hpx_fwd.hpp>
#include <hpx/util/portable_binary_iarchive.hpp>
#include <hpx/util/portable_binary_oarchive.hpp>
... |
npocmaka/Windows-Server-2003 | windows/advcore/ctf/aimm1.2/win32/compstr.cpp | /*++
Copyright (c) 1985 - 1999, Microsoft Corporation
Module Name:
compstr.cpp
Abstract:
This file implements the CCompStrFactory Class.
Author:
Revision History:
Notes:
--*/
#include "private.h"
#include "compstr.h"
#include "a_wrappers.h"
HRESULT
CCompStrFactory::CreateCo... |
sping/ractive | src/view/items/element/binding/NumericBinding.js | import GenericBinding from './GenericBinding';
export default class NumericBinding extends GenericBinding {
getInitialValue () {
return undefined;
}
getValue () {
const value = parseFloat( this.node.value );
return isNaN( value ) ? undefined : value;
}
setFromNode( node ) {
const value = parseFloat( nod... |
lastaflute/lastaflute-example-maihama | maihama-showbase/src/main/java/org/docksidestage/app/web/products/purchases/assist/PurchasesCrudAssist.java | /*
* Copyright 2015-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by app... |
zohassadar/netdisc | netdisc/discover/looper.py | <filename>netdisc/discover/looper.py
"""
S = Starting Host
N = Neighbor (discovered host
[S1, S2, S3]
-> _hopper
"""
from __future__ import annotations
import logging
logging.basicConfig(level=logging.DEBUG)
import collections
import dataclasses
import ipaddress
import logging
import queue
fr... |
mrjj/dicker | src/constants.js | <gh_stars>1-10
/**
* @fileOverview Constants
*/
/**
* @constant TASK_STATUS {Object}
* @type {{DONE: string, FAILED: string, RUNNING: string, SKIPPED: string, PENDING: string}}
*/
const TASK_STATUS = {
SKIPPED: 'SKIPPED',
PENDING: 'PENDING',
RUNNING: 'RUNNING',
DONE: 'DONE',
FAILED: 'FAILED',
UNKNOWN:... |
jjzhang166/minerva | scripts/modelconvertor/caffe2minerva.py | #!/usr/bin/env python
import os
import sys, argparse
import owl
from owl.net.caffe import *
from google.protobuf import text_format
import numpy as np
import owl
import subprocess
class Caffe2MinervaConvertor:
''' Class to convert Caffe's caffemodel into numpy array files. Minerva use numpy array files to store a... |
anonymous-authorss/DS-Pipeline | notebooks/research-25/training-mask-r-cnn-to-be-a-fashionista-lb-0-07.py |
# coding: utf-8
# Welcome to the world where fashion meets computer vision! This is a starter kernel that applies Mask R-CNN with COCO pretrained weights to the task of [iMaterialist (Fashion) 2019 at FGVC6](https://www.kaggle.com/c/imaterialist-fashion-2019-FGVC6).
# In[1]:
import os
import gc
import sys
import j... |
PavelHudau/Algorithms | src/test/java/com/pavelhudau/burrowswheeler/TestMoveToFront.java | <reponame>PavelHudau/Algorithms<filename>src/test/java/com/pavelhudau/burrowswheeler/TestMoveToFront.java
package com.pavelhudau.burrowswheeler;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.ValueSource;
import static org.junit.jupiter.api.Assertions.*;
public class Test... |
SINTEF-SIT/project_gravity | controller/src/main/java/sintef/android/controller/sensor/data/MagneticFieldData.java | <reponame>SINTEF-SIT/project_gravity
/*
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 (t... |
kmamal/node-sdl | examples/02-raw-drawing/index.js | <reponame>kmamal/node-sdl<gh_stars>10-100
import sdl from '@kmamal/sdl'
const window = sdl.video.createWindow({ resizable: true })
window.on('resize', () => {
const { width, height } = window
const stride = width * 4
const buffer = Buffer.alloc(stride * height)
let offset = 0
for (let i = 0; i < height; i++) {
... |
Steven128/jlulife | src/FetchInterface/ClassInterface.js | import Global from "../Global";
import AppStorage from "../AppStorage";
export default function getInfo(callback) {
var termId = Global.settings.class.currentTermId;
if (termId == undefined || termId == "")
termId = Global.defRes.teachingTerm;
let loginURL = "http://10.60.65.8/ntms/service/res.do";... |
athomas-git/chpl-api | chpl/chpl-service/src/main/java/gov/healthit/chpl/domain/contact/Person.java | package gov.healthit.chpl.domain.contact;
import java.io.Serializable;
import java.util.HashMap;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
import org.apache.commons.lang3.Obj... |
rajeevvats/klone_webServer | test/misc.c | #include <u/libu.h>
#include <klone/utils.h>
struct htmlenc_vec_s
{
const char *src, *exp;
int ssz, esz; /* source and exp size */
};
#define HTMLENC_VEC( src, exp ) { src, exp, (sizeof(src)-1), (sizeof(exp)-1) }
const struct htmlenc_vec_s htmlenc_vec[] = {
HTMLENC_VEC( "", ""),
HTMLENC_VEC( "a", "a"... |
mcarcaso/foam2 | src/foam/cross_platform/ui/widget/array/FObjectArrayViewItemWrapperDetailView.js | foam.CLASS({
package: 'foam.cross_platform.ui.widget.array',
name: 'FObjectArrayViewItemWrapperDetailView',
requires: [
'foam.cross_platform.ui.widget.DynamicDetailView'
],
implements: [
'foam.cross_platform.ui.widget.DetailView',
],
swiftImports: [
'UIKit',
],
properties: [
{
cl... |
alemoles/tutorials | graphql/graphql-error-handling/src/main/java/com/baeldung/graphql/error/handling/exception/VehicleAlreadyPresentException.java | <filename>graphql/graphql-error-handling/src/main/java/com/baeldung/graphql/error/handling/exception/VehicleAlreadyPresentException.java
package com.baeldung.graphql.error.handling.exception;
import java.util.Map;
public class VehicleAlreadyPresentException extends AbstractGraphQLException {
public VehicleAlrea... |
Imobiliario-MrBelly/LP2 | mysql-connector-java-8.0.23/src/test/java/com/mysql/cj/MessagesTest.java | /*
* Copyright (c) 2015, 2020, Oracle and/or its affiliates.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, version 2.0, as published by the
* Free Software Foundation.
*
* This program is also distributed with certain software (in... |
rimmartin/cctbx_project | scitbx/stl/vector.py | <reponame>rimmartin/cctbx_project<filename>scitbx/stl/vector.py<gh_stars>0
from __future__ import division
import scitbx.stl.set # import dependency
import boost.python
ext = boost.python.import_ext("scitbx_stl_vector_ext")
from scitbx_stl_vector_ext import *
|
kagic/KE2 | src/main/java/mod/ke2/handles/HandleBubbleEnchant.java | package mod.ke2.handles;
import java.util.List;
import java.util.Map;
import mod.ke2.entity.machine.EntityBubble;
import mod.ke2.init.Ke2Enchants;
import net.minecraft.enchantment.Enchantment;
import net.minecraft.enchantment.EnchantmentHelper;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.... |
Andreas237/AndroidPolicyAutomation | ExtractedJars/Apk_Extractor_com.ext.ui.apk/javafiles/android/support/v4/media/session/MediaSessionCompat$MediaSessionImplBase$MessageHandler.java | // Decompiled by Jad v1.5.8g. Copyright 2001 <NAME>.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) annotate safe
package android.support.v4.media.session;
import android.content.Intent;
import android.net.Uri;
import android.os.*;
import android.support.v4.media.MediaDescripti... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.