repo_name stringlengths 6 101 | path stringlengths 4 300 | text stringlengths 7 1.31M |
|---|---|---|
pedroperezpelaez/design-paterns-spring | src/main/java/com/pedroperez/designpatterns/patterns/creational/prototype/PrototypeFalse.java | <gh_stars>0
package com.pedroperez.designpatterns.patterns.creational.prototype;
public class PrototypeFalse {
}
|
ImHacked/welthylife_api | models/testAndLab/labTests.js | <gh_stars>0
const mongoose = require("mongoose"),
Schema = mongoose.Schema;
const labTests = new Schema(
{
testId: {
type: mongoose.Types.ObjectId,
ref: "TestMaster",
},
labId: {
type: mongoose.Types.ObjectId,
ref: "Lab",
},
centerId: {
type: mongoose.Types.ObjectI... |
edawson/parliament2 | resources/usr/lib/root/etc/dictpch/tmva/pymva/inc/LinkDef.h | <reponame>edawson/parliament2<filename>resources/usr/lib/root/etc/dictpch/tmva/pymva/inc/LinkDef.h<gh_stars>0
#ifdef __CINT__
#pragma link off all globals;
#pragma link off all classes;
#pragma link off all functions;
#pragma link off all namespaces;
#pragma link C++ nestedclass;
// the classifiers
#pragma link C++... |
L0mion/Makes-a-Click | Source/CameraController.cpp | #include "CameraController.h"
#include "camera.h"
#include "XInputFetcher.h"
#include "mathHelper.h"
#include "DebugGUI.h"
#include "HeightMap.h"
#include "PivotPoint.h"
#include <AntTweakBar.h>
#include "DigitalSmoothControl.h"
const int CameraController::s_vantagePoints[VantagePoints_CNT] = {
10,
50,
100,
200,
... |
zezha-msft/azure-sdk-for-go | profiles/preview/cosmos-db/mgmt/documentdb/documentdbapi/models.go | //go:build go1.9
// +build go1.9
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
// This code was auto-generated by:
// github.com/Azure/azure-sdk-for-go/eng/tools/profileBuilder
package documentdbapi
import... |
GetchaDEAGLE/eagle-versioner | tests/data-structures/Enum.positive.test.js | <gh_stars>1-10
// imports
const Enum = require("../../data-structures/Enum");
describe("Tests the Enum data structure for proper functionality.", () => {
test("Tests getting the size of an enum.", () => {
const TestEnum = new Enum("red", "white", "blue");
expect(TestEnum.size).toBe(3);
});
test("Tests c... |
DEVESHTARASIA/sarl | main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/wizards/elements/SarlSpecificTypeSelectionExtension.java | <reponame>DEVESHTARASIA/sarl<gh_stars>0
/*
* $Id$
*
* SARL is an general-purpose agent programming language.
* More details on http://www.sarl.io
*
* Copyright (C) 2014-2018 the original authors or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except i... |
haizhenhan/Kepler | kernel/2.6.32/drivers/media/video/bw-qcam.h | <gh_stars>10-100
/*
* Video4Linux bw-qcam driver
*
* Derived from code..
*/
/******************************************************************
Copyright (C) 1996 by <NAME>
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Softw... |
magistermaks/mod-stylishoccult | src/main/java/net/darktree/stylishoccult/entities/goal/FollowNonCorruptedGoal.java | package net.darktree.stylishoccult.entities.goal;
import net.darktree.stylishoccult.entities.CorruptedEntity;
import net.minecraft.entity.LivingEntity;
import net.minecraft.entity.ai.TargetPredicate;
import net.minecraft.entity.ai.goal.Goal;
import net.minecraft.entity.mob.MobEntity;
import java.util.EnumSet;
import ... |
m-m-m/ui | core/src/main/java/io/github/mmm/ui/api/attribute/AttributeWriteEnabled.java | /* Copyright (c) The m-m-m Team, Licensed under the Apache License, Version 2.0
* http://www.apache.org/licenses/LICENSE-2.0 */
package io.github.mmm.ui.api.attribute;
/**
* Interface to {@link #isEnabled() read} and {@link #setEnabled(boolean) write} the {@link #isEnabled() enabled flag}.
*
* @since 1.0.0
*/
pub... |
daejunpark/c-semantics | tests/csmith/bad/smith001539.c | <reponame>daejunpark/c-semantics
/*
* This is a RANDOMLY GENERATED PROGRAM.
*
* Generator: csmith 2.0.0
* svn version: exported
* Options: --check-global -s 1539
* Seed: 1539
*/
#include "random_runtime.h"
long __undefined;
/* --- Struct/Union Declarations --- */
/* --- GLOBAL VARIABLES --- */
volati... |
JygTech/gameserver | gameserver-core/src/main/java/org/jyg/gameserver/core/handle/initializer/InnerSocketServerInitializer.java | package org.jyg.gameserver.core.handle.initializer;
import io.netty.channel.Channel;
import io.netty.channel.ChannelPipeline;
import org.jyg.gameserver.core.handle.InnerSocketHandler;
import org.jyg.gameserver.core.handle.MyProtobufDecoder;
import org.jyg.gameserver.core.handle.MyProtobufListEncoder;
import org.jyg.ga... |
119068489/game_server | pb/client_hall/sport_apply_rpc.go | <gh_stars>1-10
package client_hall
import (
"game_server/easygo"
"game_server/easygo/base"
"game_server/pb/share_message"
)
type _ = base.NoReturn
type IClient2ESports interface {
RpcESportGetHomeInfo(reqMsg *ESportInfoRequest) *ESportMenuHomeInfo
RpcESportGetHomeInfo_(reqMsg *ESportInfoRequest) (*ESportMenuHom... |
JavaQualitasCorpus/jspwiki-2.8.4 | src/com/ecyrd/jspwiki/dav/RawPagesDavProvider.java | /*
JSPWiki - a JSP-based WikiWiki clone.
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 Apa... |
jamie-jjd/110_spring_IDS | homework/1/rail_problem.py | #
# author: redleaf
# email: <EMAIL>
#
def solve(n, arr):
stack, a = [], 1
for b in arr:
while len(stack) == 0 or stack[-1] != b:
if a > n: return False
stack.append(a)
a += 1
stack.pop()
return True
if __name__ == '__main__':
for _ in range(int(input... |
tfboyd/benchmark_harness | oss_bench/harness/controller.py | <filename>oss_bench/harness/controller.py
"""Sets up the environment and runs benchmarks."""
from __future__ import print_function
import argparse
import os
import subprocess
import sys
import yaml
# Set after module is dynamically loaded.
tracker = None
class BenchmarkRunner(object):
"""Setup environment an execu... |
marcotessarotto/exOpSys | 005puntatori/00puntatori.c | <reponame>marcotessarotto/exOpSys
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define MY_ARRAY_SIZE 100
// global variable
int a;
void increment_wrong(int a) {
a = a + 1;
}
void increment_ok(int * a) {
*a = *a + 1;
// (*a)++; // come sopra
}
void mutable_string() {
// N.B: in Java le istanze di ... |
object88/profiler | cmd/root.go | package cmd
import (
"github.com/spf13/cobra"
)
// InitializeCommands sets up the cobra commands
func InitializeCommands() *cobra.Command {
rootCmd := createRootCommand()
functionsCmd := createFunctionsCommand(rootCmd.o)
importsCmd := createImportsCommand(rootCmd.o)
globalsCmd := createGlobalsCommand(rootCmd.o)... |
boccaccioc/CellularAutomata | src/cellsociety/UserControlView.java | package cellsociety;
import cellsociety.Views.GridView;
import java.io.IOException;
import java.io.InputStream;
import java.util.Optional;
import java.util.Properties;
import javafx.animation.Timeline;
import javafx.beans.value.ChangeListener;
import javafx.beans.value.ObservableValue;
import javafx.event.ActionEvent... |
TotalCaesar659/OpenTESArena | OpenTESArena/src/Input/InputManager.h | #ifndef INPUT_MANAGER_H
#define INPUT_MANAGER_H
#include <cstdint>
#include <functional>
#include <string>
#include <string_view>
#include <unordered_map>
#include <vector>
#include "SDL_events.h"
#include "ApplicationEvents.h"
#include "InputActionEvents.h"
#include "InputActionMap.h"
#include "PointerEvents.h"
#in... |
BladimirOrellana/PROYECT-3 | client/src/components/profile/About/AboutItem.js | import React from "react";
import Auxiliary from "util/Auxiliary";
const AboutItem = ({data}) => {
const {title, icon, desc, userList} = data;
return (
<Auxiliary>
<div className="media flex-nowrap mt-3 mt-lg-4 mb-2">
<div className="mr-3">
<i className={`zmdi zmdi-${icon} jr... |
sbwheeler/BombermanJS | tests/browser/mapRedux.test.js | import { createStore } from 'redux'
import { expect } from 'chai'
import { loadMap } from '../../browser/redux/maps/action-creator'
import { map } from '../../browser/redux/maps/reducer'
import * as types from '../../browser/redux/maps/constants'
describe('Front end map action creator', () => {
describe('GENERATE_MA... |
phrocker/cosmos | core/src/main/java/cosmos/accumulo/GroupByRowSuffixIterator.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 may ... |
mczal/beirut-api | service-impl/src/main/java/com/gdn/x/beirut/services/listener/CandidateUpdateStatusEventListener.java | package com.gdn.x.beirut.services.listener;
import javax.annotation.Resource;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.data.solr.core.SolrTemplate;
import org.springframework.data.solr.core.query.PartialUpdate;
import org.springframework.data.solr.core.query.SimpleQuery;
imp... |
skatejs/dom-diff | src/compare/element.js | import compareAttributes from './attributes';
import compareEvents from './events';
import compareProperties from './properties';
export default function (src, tar) {
if (src.localName === tar.localName) {
return compareAttributes(src, tar)
.concat(compareEvents(src, tar))
.concat(compareProperties(s... |
JimCallahan/Pipeline | src/java/us/temerity/pipeline/plugin/IllustratorEditor/v2_0_0/IllustratorEditor.java | <filename>src/java/us/temerity/pipeline/plugin/IllustratorEditor/v2_0_0/IllustratorEditor.java
// $Id: IllustratorEditor.java,v 1.1 2007/06/17 15:34:42 jim Exp $
package us.temerity.pipeline.plugin.IllustratorEditor.v2_0_0;
import us.temerity.pipeline.*;
/*-----------------------------------------------------------... |
blockchain-development-resources/bxgateway | test/unit/connections/eth/test_eth_connection_protocol.py | import time
from mock import MagicMock
from bxcommon.test_utils.abstract_test_case import AbstractTestCase
from bxcommon.constants import LOCALHOST
from bxcommon.test_utils import helpers
from bxgateway.connections.eth.eth_base_connection_protocol import EthBaseConnectionProtocol
from bxgateway.messages.eth.protocol... |
daniel3303/sirs-project | src/server/models/User.py | <reponame>daniel3303/sirs-project
from cryptography.fernet import Fernet
from cryptography.hazmat.backends import default_backend
from cryptography.hazmat.primitives import hashes, hmac
from cryptography.hazmat.primitives.asymmetric import padding
from django.db import models
from django.contrib.auth.hashers import *
... |
jmilkiewicz/iot-starterkit | cf/samples/java-samples/commons/src/main/java/commons/model/Authentication.java | <reponame>jmilkiewicz/iot-starterkit<filename>cf/samples/java-samples/commons/src/main/java/commons/model/Authentication.java
package commons.model;
public class Authentication {
private String secret;
private String pem;
private String password;
public String getSecret() {
return secret;
}
public String ... |
odant/conan-jscript | src/test/sequential/test-debugger-preserve-breaks.js | 'use strict';
const common = require('../common');
common.skipIfInspectorDisabled();
const fixtures = require('../common/fixtures');
const startCLI = require('../common/debugger');
const assert = require('assert');
const path = require('path');
// Run after quit.
{
const scriptFullPath = fixtures.path('debugger',... |
wangsenyuan/learn-go | src/leetcode/set0000/set400/p495/solution.go | package main
import "fmt"
func main() {
//fmt.Println(findPosisonedDuration([]int{1, 4}, 2))
fmt.Println(findPosisonedDuration([]int{1, 2}, 2))
}
func findPosisonedDuration(timeSeries []int, duration int) int {
res := 0
pt := 0
for _, t := range timeSeries {
if t >= pt {
res += duration
} else {
res... |
1025514023/Configuration-Center-Server | src/main/java/xzfm/common/util/UUIDUtil.java | package xzfm.common.util;
import java.io.Serializable;
import java.util.Arrays;
import java.util.UUID;
import java.util.stream.Collectors;
/**
* Created by wangxizhong on 16/12/25.
*/
public class UUIDUtil extends ThreadLocalUtilHolder<UUID> implements Serializable {
private static class UUIDSingletonHolder {... |
edujsnogueira/Curso-Python-GG | CursoemVideoEx/ex016.py | <gh_stars>0
# Exercício 016:
# Crie um programa que leia um número real qualquer pelo teclado e mostre na tela a sua porção inteira.
# import math
# num = float(input('Digite um número real qualquer:'))
# print(f'O número digitado foi {num} e a sua parte inteira é {math.trunc(num)}.')
# Uma alternativa é importar so... |
johnmaccormick/wcbc-java | src/wcbc/HaltExTuring.java | package wcbc;
import java.io.IOException;
/**
* SISO program HaltExTuring.java
*
* Solves the computational problem haltEx, for the case of input programs
* represented as Turing machines.
*
* progString: An ASCII description of a Turing machine M
*
* inString: The initial content I of the Turing machine"s... |
johnson-ajar/ieds-circuit | com.soa.circuit.model/src/main/java/com/soa/circuit/model/reader/ModelReader.java | package com.soa.circuit.model.reader;
import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.IOException;
import com.soa.circuit.elements.diode.Diode;
import com.soa.circuit.elements.passive.Resistor;
import com.soa.circuit.elements.passive.Switch;
import com.soa.circuit.elements.reactive... |
Ddnirvana/test-CI | openeuler-kernel/arch/arm64/include/asm/uaccess.h | /* SPDX-License-Identifier: GPL-2.0-only */
/*
* Based on arch/arm/include/asm/uaccess.h
*
* Copyright (C) 2012 ARM Ltd.
*/
#ifndef __ASM_UACCESS_H
#define __ASM_UACCESS_H
#include <asm/alternative.h>
#include <asm/kernel-pgtable.h>
#include <asm/sysreg.h>
/*
* User space memory access functions
*/
#include <li... |
Dilrvvr/JKAlertX | JKAlertX/Classes/Category/JKAlertCategory/JKAlertView+Plain.h | <filename>JKAlertX/Classes/Category/JKAlertCategory/JKAlertView+Plain.h
//
// JKAlertView+Plain.h
// JKAlertX
//
// Created by Albert on 2020/5/31.
//
#import "JKAlertView.h"
@interface JKAlertView (Plain)
/**
* plain样式宽度
*/
@property (nonatomic, copy, readonly) JKAlertView *(^makePlainWidth)(CGFloat width);
/... |
apaz4/Jhaturanga | src/main/java/jhaturanga/model/user/User.java | <filename>src/main/java/jhaturanga/model/user/User.java
package jhaturanga.model.user;
import java.io.Serializable;
import java.util.Optional;
/**
* User interface represent an application user
* who can be register or login the application.
* Two Users are the same if they have the same ID.
*/
public interface U... |
rjw57/tiw-computer | emulator/src/mame/machine/namcos2.cpp | <gh_stars>1-10
// license:BSD-3-Clause
// copyright-holders:K.Wilkins
/***************************************************************************
Namco System II
machine.c
Functions to emulate general aspects of the machine (RAM, ROM, interrupts,
I/O ports)
***************************************************... |
bptlab/chimera | src/main/java/de/hpi/bpt/chimera/execution/ExecutionService.java | <filename>src/main/java/de/hpi/bpt/chimera/execution/ExecutionService.java
package de.hpi.bpt.chimera.execution;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.stream.Collect... |
JelenaKar/-job4j | junior/chapter_001_Collection_Pro/src/test/java/ru/job4j/map/SimpleHashMapTest.java | package ru.job4j.map;
import org.junit.Before;
import org.junit.Test;
import java.util.ConcurrentModificationException;
import java.util.Iterator;
import java.util.NoSuchElementException;
import static org.hamcrest.core.Is.is;
import static org.junit.Assert.*;
public class SimpleHashMapTest {
private SimpleHas... |
jasmdk/org.hl7.fhir.core | org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/TerminologyClientR2.java | <gh_stars>0
package org.hl7.fhir.convertors;
/*-
* #%L
* org.hl7.fhir.convertors
* %%
* Copyright (C) 2014 - 2019 Health Level 7
* %%
* 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
*... |
nablarch/nablarch-common-databind | src/test/java/nablarch/common/databind/csv/CsvDataReaderTsvFormatTest.java | package nablarch.common.databind.csv;
import static org.hamcrest.CoreMatchers.containsString;
import static org.hamcrest.CoreMatchers.instanceOf;
import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.CoreMatchers.nullValue;
import static org.junit.Assert.assertThat;
import static org.junit.Assert.fail... |
joaopver10/Curso-Linguagem-C | Aula09/aula9.c | <reponame>joaopver10/Curso-Linguagem-C
#include <stdio.h>
#include <stdlib.h>
void main(){
int lado1, lado2, lado3;
printf("Digite o primeiro lado: ");
scanf("%d", &lado1);
printf("Digite o segundo lado: ");
scanf("%d", &lado2);
printf("Digite o terceiro lado: ");
scanf("%d", &lado3);
... |
Reputeless/Siv3D-Reference | Programming Guide/Headers/Siv3D/Parse.hpp | //-----------------------------------------------
//
// This file is part of the Siv3D Engine.
//
// Copyright (C) 2008-2016 <NAME>
//
// Licensed under the MIT License.
//
//-----------------------------------------------
# pragma once
# include <sstream>
# include "String.hpp"
# include "Optional.hpp"
# include "Nu... |
wangpeng1108/BeautifulLife | app/src/main/java/com/wangpeng/beautifullife/view/MainView.java | <reponame>wangpeng1108/BeautifulLife<gh_stars>0
package com.wangpeng.beautifullife.view;
import android.support.design.widget.NavigationView;
import android.support.v4.widget.DrawerLayout;
import android.support.v7.app.AppCompatActivity;
/**
* Created by d1yf.132 on 2016/8/9.
*/
public interface MainView {... |
Andrew4113/SpicyClient | minecraft/info/spicyclient/events/listeners/EventRenderLivingLabel.java | <gh_stars>100-1000
package info.spicyclient.events.listeners;
import info.spicyclient.events.Event;
public class EventRenderLivingLabel extends Event {
public EventRenderLivingLabel(String text, double x, double y, double z, int maxDistance) {
this.text = text;
this.x = x;
this.y = y;
this.z = z;
this... |
zealoussnow/chromium | extensions/browser/guest_view/app_view/app_view_guest_delegate.cc | <filename>extensions/browser/guest_view/app_view/app_view_guest_delegate.cc
// 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 "extensions/browser/guest_view/app_view/app_view_guest_delegate.h"
n... |
xiangjs6/Tiny_ctl | example/rb_tree_example.c | <filename>example/rb_tree_example.c<gh_stars>1-10
#include <stdio.h>
#include <stdlib.h>
#include "../include/tctl_rb_tree.h"
#include "../include/auto_release_pool.h"
#include "../include/tctl_int.h"
#include "../include/tctl_arg.h"
#include "../include/tctl_any.h"
#define Import RB_TREE, ITERATOR, INT
int cmp(void ... |
Nasdan/phone-catalog | backend/src/repositories/phoneRepository.js | const phones = [
{
id: 1,
title: 'Apple iPhone 6 16GB',
imageUrl:
'https://pisces.bbystatic.com/image2/BestBuy_US/images/products/4987/4987610_sd.jpg;maxHeight=640;maxWidth=550',
description: `El iPhone 6 no sólo es más grande, también es mejor.
Incluye una pantalla Retina HD de 4,7 pulgadas... |
Coffeekraken/react-boilerplate | scripts/remove-samples.js | const fs = require('fs')
const rimraf = require('rimraf')
const glob = require('glob-all')
// delete all the sample containers
rimraf.sync('src/containers/Counter')
rimraf.sync('src/containers/CounterPage')
rimraf.sync('src/containers/FormPage')
rimraf.sync('src/containers/Header')
rimraf.sync('src/containers/HomePage... |
isaaclimdc/cachemulator | pin/source/tools/ManualExamples/pinatrace.cpp | <gh_stars>1-10
#include <stdio.h>
#include "pin.H"
#include <fstream>
#include <vector>
#include <cstring>
#include <string>
FILE *trace;
PIN_LOCK lock;
std::vector<std::string> userFuncs;
// Print a memory read record
VOID RecordMemRead(VOID *ip, VOID *addr, THREADID tid) {
PIN_GetLock(&lock, tid);
fprintf(trace... |
pintomau/commercetools-sdk-java-v2 | commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemDiscountedPriceChange.java | <reponame>pintomau/commercetools-sdk-java-v2
package com.commercetools.history.models.change;
import java.time.*;
import java.util.*;
import java.util.function.Function;
import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import com.commercetools.history.models.common.DiscountedLineItemPrice... |
sabman/Windshaft-cartodb | test/unit/overviews-query-rewriter-test.js | 'use strict';
require('../support/test-helper');
var assert = require('assert');
var OverviewsQueryRewriter = require('../../lib/utils/overviews-query-rewriter');
var overviewsQueryRewriter = new OverviewsQueryRewriter({
zoom_level: 'ZoomLevel()'
});
function normalizeWhitespace (txt) {
return txt.replace(/\... |
Jvillegasd/Codeforces | Codeforces 427A.cpp | #include <bits/stdc++.h>
using namespace std;
int main(){
int n, a, ans = 0, pol = 0;
scanf("%d", &n);
for(int i = 0; i < n; i++){
scanf("%d", &a);
if(a > 0) pol+=a;
if(a == -1 && pol > 0) pol--;
else if(a == -1 && pol == 0) ans++;
}
printf("%d", ans);
return 0;... |
ghsecuritylab/tomato_egg | release/src/router/nocat/src/conf.c | <filename>release/src/router/nocat/src/conf.c
# include <glib.h>
# include <ctype.h>
# include <time.h>
# include "conf.h"
# include "util.h"
/*** Global config settings ***/
GHashTable *nocat_conf = NULL;
/********** Conf stuff **********/
// NOTE: parse_conf_line destroys line!!!
GHashTable *parse_conf_line( GHash... |
tharakamd/integration-studio | components/bps-tools/plugins/org.eclipse.bpel.validator/src/org/eclipse/bpel/validator/model/Messages.java | <filename>components/bps-tools/plugins/org.eclipse.bpel.validator/src/org/eclipse/bpel/validator/model/Messages.java
/*******************************************************************************
* Copyright (c) 2006 Oracle Corporation and others.
* All rights reserved. This program and the accompanying materials
... |
CoderSong2015/Apache-Trafodion | core/sql/sort/List.cpp | <reponame>CoderSong2015/Apache-Trafodion
/**********************************************************************
// @@@ START COPYRIGHT @@@
//
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional inform... |
bahmutov/ | examples/browser/src/Foo.js | console.log('original foo');
define([], function () {
return function() {
if (5 > 10) {
return 'bar';
}
return 'foo';
};
});
function notCalled() {
console.log('this does not get called!');
} |
heweixi/overlord | anzi/proc_test.go | <reponame>heweixi/overlord
package anzi
import (
"io"
"testing"
"time"
"bufio"
"bytes"
"overlord/pkg/mockconn"
"github.com/stretchr/testify/assert"
)
func TestGetStrLenOk(t *testing.T) {
assert.Equal(t, 2, getStrLen(10))
assert.Equal(t, 3, getStrLen(999))
assert.Equal(t, 5, getStrLen(99999))
assert.Equa... |
twsnmp/twsnmpfc | report/device.go | package report
import (
"log"
"net"
"strings"
"time"
"github.com/twsnmp/twsnmpfc/datastore"
)
type deviceReportEnt struct {
Time int64
MAC string
IP string
}
func ReportDevice(mac, ip string, t int64) {
mac = normMACAddr(mac)
deviceReportCh <- &deviceReportEnt{
Time: t,
MAC: mac,
IP: ip,
}
}
... |
hmmmq/ExaminationSystem-Web | Code/service-api/src/main/java/com/foodie/dto/UserT.java | package com.foodie.dto;
import com.foodie.pojo.Student;
import com.foodie.pojo.Teacher;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
/**
* 一个DTO,
* userType:用户类型,为0是不存在该用户,为1是学生,为2是老师
* student:学生
* teacher:老师
* 用法:用于统一验证登录。若为2,student=null,te... |
chomats/cadse.si-view | src/main/java/fede/workspace/tool/view/actions/delete/WCLabelDecorator.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 ... |
jeikabu/lumberyard | dev/Code/Sandbox/Editor/TrackViewExportKeyTimeDlg.cpp | /*
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
* its licensors.
*
* For complete copyright and license terms please see the LICENSE at the root of this
* distribution (the "License"). All use of this software is governed by the License,
* or, if provided, by the license below or t... |
cies/replay | framework/src/play/data/parsing/DataParser.java | <filename>framework/src/play/data/parsing/DataParser.java
package play.data.parsing;
import play.mvc.Http;
import java.util.Map;
/**
* A data parser parse the HTTP request data to a Map<String,String[]>
*/
public abstract class DataParser {
public abstract Map<String, String[]> parse(Http.Request reques... |
Xenuzever/sit-wt-all | sit-wt-app/src/main/java/io/sitoolkit/wt/gui/pres/editor/testscript/ReadOnlyCellType.java | <filename>sit-wt-app/src/main/java/io/sitoolkit/wt/gui/pres/editor/testscript/ReadOnlyCellType.java<gh_stars>0
package io.sitoolkit.wt.gui.pres.editor.testscript;
import org.controlsfx.control.spreadsheet.SpreadsheetCell;
import org.controlsfx.control.spreadsheet.SpreadsheetCellEditor;
import org.controlsfx.contro... |
heuisam/mbed-os | targets/TARGET_STM/TARGET_STM32G4/STM32Cube_FW/STM32G4xx_HAL_Driver/stm32g4xx_hal_adc_ex.h | /**
******************************************************************************
* @file stm32g4xx_hal_adc_ex.h
* @author MCD Application Team
* @brief Header file of ADC HAL extended module.
******************************************************************************
* @attention
*
* <h2><cen... |
zazaho/SimImg | simimg/classes/toolbar.py | ''' Modules that defines a oolbar with action items'''
import os
from tkinter import ttk
from . import tooltip as TT
from ..dialogs import infowindow as IW
from ..utils import pillowplus as PP
class Toolbar(ttk.Frame):
' A toolbar frame that holds the action buttons'
def __init__(self, parent, Controller=Non... |
mrpandey/spoj | solved/HANGOVER.cpp | #include<iostream>
using namespace std;
int main(){
float v;
while(cin >> v){
if(v==0.00) break;
int n = 1;
float sum = 0.0;
while(v>sum) {
++n;
sum += (float)1/n;
}
cout << n-1 << " card(s)\n";
}
return 0;
} |
nageshwarrao19/BUILD | angular-sap-ui-elements/ui-elements/ui-popup/popup.directive.js | <filename>angular-sap-ui-elements/ui-elements/ui-popup/popup.directive.js
'use strict';
/**
* @ngdoc directive
* @name ui.elements:uiPopup
*
* @description
* Creates a popup dialog that is displayed relative to the calling element.
*
* @restrict E
* @element ANY
*
* @param {string} placement where to place t... |
DanIverson/OpenVnmrJ | src/kpsglib/gHSQC.c | // Copyright (C) 2015 University of Oregon
// You may distribute under the terms of either the GNU General Public
// License or the Apache License, as specified in the LICENSE file.
// For more information, see the LICENSE file.
#ifndef LINT
#endif
/*
*/
/* gHSQC - Gradient Selected phase-sensitive HSQC
Features i... |
yehzu/vespa | config/src/main/java/com/yahoo/vespa/config/LZ4PayloadCompressor.java | <reponame>yehzu/vespa<filename>config/src/main/java/com/yahoo/vespa/config/LZ4PayloadCompressor.java
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.config;
import com.yahoo.vespa.config.util.ConfigUtils;
import net.jpountz.... |
jyi2ya/artifacts | luogu.com.cn/P4884/a.c | #include <stdio.h>
#include <stdlib.h>
#include <math.h>
typedef long long ll;
ll llmul(ll a, ll b, ll p)
{
ll x = 0;
while (b) {
if (b & 1)
x = (x + a) % p;
a = (a + a) % p;
b /= 2;
}
return x;
}
typedef struct h_n {
ll key;
ll val;
struct h_n *next;
} h_n;
h_n* h_n_new(ll key, ll val)
{
static h_... |
brunetton/osmeditor4android | src/main/java/de/blau/android/views/overlay/MapViewOverlay.java | <reponame>brunetton/osmeditor4android<gh_stars>0
// Created by plusminus on 20:32:01 - 27.09.2008
package de.blau.android.views.overlay;
import android.annotation.SuppressLint;
import android.graphics.Canvas;
import android.util.Log;
import android.view.KeyEvent;
import android.view.MotionEvent;
import de.blau.androi... |
realXuJiang/bigtable-sql | src/main/java/net/sourceforge/squirrel_sql/client/session/mainpanel/objecttree/tabs/table/PrimaryKeyTab.java | package net.sourceforge.squirrel_sql.client.session.mainpanel.objecttree.tabs.table;
/*
* Copyright (C) 2001-2003 <NAME>
* <EMAIL>
*
* This library 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; ... |
OpenPipe/openpipe | openpipe/actions/read/from/_file/tar.py | """
Produce file metadata and content from a TAR archive
"""
import tarfile
from ..file_ import Action
def decode_file(fileobj, action):
with tarfile.open(fileobj=fileobj) as tar:
while True:
file_info = tar.next()
if file_info is None: # Reached end of archive
b... |
joaopsmendes/miei | src/2ano/2sem/poo/prt/Fichas/Ficha05/ex1/src/Parque.java | import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
public class Parque {
private String name;
private Map<String,Lugar> parqueMap;
public Parque(){
this.name = "";
this.parqueMap = new HashMap<>();
}
... |
lyxgy841/turms | src/main/java/im/turms/turms/pojo/request/group/member/UpdateGroupMemberRequestOuterClass.java | // Generated by the protocol buffer compiler. DO NOT EDIT!
// source: request/group/member/update_group_member_request.proto
package im.turms.turms.pojo.request.group.member;
public final class UpdateGroupMemberRequestOuterClass {
private UpdateGroupMemberRequestOuterClass() {}
public static void registerAllExte... |
CARV-ICS-FORTH/scoop | banshee/cparser/analysis.c | /* This file is part of banshee-pta.
Copyright (C) 2000-2001 The Regents of the University of California.
banshee-pta 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, or (at your option)
any l... |
zacscoding/caver-java | core/src/main/java/com/klaytn/caver/transaction/response/NoOpTransactionReceiptProcessor.java | <gh_stars>10-100
/*
* Copyright 2020 The caver-java 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 appl... |
timoML/zephyr-riscv | arch/xtensa/core/cpu_idle.c | /*
* Copyright (c) 2016 Cadence Design Systems, Inc.
* SPDX-License-Identifier: Apache-2.0
*/
#include <xtensa/tie/xt_core.h>
#include <xtensa/tie/xt_interrupt.h>
#include <logging/kernel_event_logger.h>
/*
* @brief Put the CPU in low-power mode
*
* This function always exits with interrupts unlocked.
*
* voi... |
abdallahMansour/ESSA-6907 | app/shared/redux/issues/tests/selectors.test.js | import makeSelectIssues from '../selectors'
describe('makeSelectIssues', () => {
it('should return sprints object', () => {
const mockedState = {
data: [],
}
const selected = makeSelectIssues().resultFunc(mockedState)
expect(selected).toEqual(mockedState)
})
}) |
etienne-monier/inpystem | inpystem/tests/tools/test_PCA.py | <filename>inpystem/tests/tools/test_PCA.py
# -*- coding: utf-8 -*-
import unittest
import logging
import numpy as np
import numpy.testing as npt
import numpy.random as npr
from ...tools import PCA
class Test_PCA(unittest.TestCase):
def setUp(self):
m, n, B = 10, 10, 3
self.Y = np.arange(m*n*B... |
edraut/pulitzer | lib/pulitzer/content_element_helper.rb | module Pulitzer
module ContentElementHelper
def cms_content_present?(element)
element.present? && element.has_content?
end
def render_cms_element(element,options = {})
if element.image_type?
render_image_element(element,options)
elsif element.video_type?
render_video_el... |
maxramos/vcp-spring | src/test/java/ph/mramos/vcps/section01/el/SampleELTest.java | <gh_stars>0
package ph.mramos.vcps.section01.el;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.junit.jupiter.SpringJUnitConfig;
@SpringJUnitConfig(classes = SampleELConfig.class)
public class SampleELTest {
@Autowir... |
jaafersheriff/Neo-Engine | AppDeferredDecal/src/DecalRenderable.hpp | #pragma once
#include "ECS/Component/Component.hpp"
using namespace neo;
class DecalRenderable: public Component {
public:
const Texture& mDiffuseMap;
DecalRenderable(GameObject *go, const Texture& diffuseMap) :
Component(go),
mDiffuseMap(diffuseMap)
{}
}; |
checho651/bfx-report-ui | src/components/Positions/index.js | <gh_stars>1-10
import Positions from './Positions.container'
export default Positions
|
leehsiu/nerfactor | third_party/xiuminglib/xiuminglib/geometry/sph.py | <reponame>leehsiu/nerfactor
import numpy as np
from .rot import _warn_degree
from ..log import get_logger
logger = get_logger()
def uniform_sample_sph(n, r=1, convention='lat-lng'):
r"""Uniformly samples points on the sphere
[`source <https://mathworld.wolfram.com/SpherePointPicking.html>`_].
Args:
... |
myoukaku/bksge | libs/fnd/cmath/test/src/unit_test_fnd_cmath_atan2.cpp | /**
* @file unit_test_fnd_cmath_atan2.cpp
*
* @brief atan2 のテスト
*
* @author myoukaku
*/
#include <bksge/fnd/cmath/atan2.hpp>
#include <bksge/fnd/cmath/isnan.hpp>
#include <bksge/fnd/cmath/iszero.hpp>
#include <bksge/fnd/cmath/signbit.hpp>
#include <bksge/fnd/type_traits/is_same.hpp>
#include <bksge... |
yoneyan/vm_mgr | controller/server/node.go | <gh_stars>1-10
package server
import (
"context"
"fmt"
"github.com/yoneyan/vm_mgr/controller/data"
"github.com/yoneyan/vm_mgr/controller/db"
pb "github.com/yoneyan/vm_mgr/proto/proto-go"
"log"
"strconv"
)
func (s *server) AddNode(ctx context.Context, in *pb.NodeData) (*pb.Result, error) {
log.Println("----Add... |
quantummaiddeveloper/mapmaid | tests/src/test/java/de/quantummaid/mapmaid/specs/SpecialCustomPrimitivesSpecs.java | <reponame>quantummaiddeveloper/mapmaid
/*
* Copyright (c) 2020 <NAME> - https://quantummaid.de/.
*
* 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. T... |
mehrdad-shokri/broken-link-checker | test/01.internal.matchURL.js | import {describe, it} from "mocha";
import {expect} from "chai";
import matchURL from "../lib/internal/matchURL";
describe("INTERNAL -- matchURL", () =>
{
it("works", () =>
{
expect( matchURL("http://keyword.com/", []) ).to.be.false;
expect( matchURL("http://keyword.com/", ["keyword"]) ).to.be.true;
expec... |
Sel8616/jutil | src/test/java/cn/sel/jutil_test/Test_JStringer.java | /*
* Copyright 2015-2016 <NAME> (<EMAIL>/<EMAIL>)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable... |
AdamArthurFaizal/Belajar-Java | ProceduralProgramming/src/HelloAdam00SukaSuka2/HelloAdam00SukaSuka2.java | <reponame>AdamArthurFaizal/Belajar-Java<gh_stars>1-10
/*
* Copyright (c) 2020. <NAME>
*/
package HelloAdam00SukaSuka2;
import java.io.*;
public class HelloAdam00SukaSuka2 {
public static void main(String[] MbahPutih) throws java.lang.Exception {
System.out.println("===================================... |
opensource-assist/fuschia | src/ledger/lib/vmo/strings.h | <reponame>opensource-assist/fuschia<filename>src/ledger/lib/vmo/strings.h
// Copyright 2016 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef SRC_LEDGER_LIB_VMO_STRINGS_H_
#define SRC_LEDGER_LIB_VMO_STRINGS_H_
#inc... |
amolofos/kata | Problems/BestTimeToBuyAndSellStock/java/src/main/java/com/dkafetzi/kata/Solution.java | package com.dkafetzi.kata;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/*
* https://leetcode.com/problems/best-time-to-buy-and-sell-stock/
*
* See README.md for more information
*
*/
class Solution {
private final static Logger LOGGER = LoggerFactory.getLogger(Solution.class);
public int... |
cyq-java/release-maven-plugin | release-maven-plugin/src/main/java/ch/sourcepond/maven/release/pom/Command.java | /*Copyright (C) 2016 <NAME>, <<EMAIL>>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, softwa... |
etamity/dashpad | packages/frontend/dashpad/plugins/Dashboard/components/GithubListItem.js | <reponame>etamity/dashpad
import React, { Component } from 'react';
import { ListGroupItem, Row, Col, Button, Progress } from 'reactstrap';
import moment from 'moment';
import { Remote } from 'common/libs/Remote';
import { toast } from 'react-toastify';
import { shell } from 'electron';
const { ModuleHelper } = Remote... |
oscourse-tsinghua/OS2018spring-projects-g02 | recc/kernel/main.c | /*
Copyright 2016 <NAME> 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 la... |
badalsarkar/thaw | style/src/test/java/de/be/thaw/style/parser/lexer/StyleFormatLexerTest.java | package de.be.thaw.style.parser.lexer;
import de.be.thaw.style.parser.lexer.exception.StyleFormatLexerException;
import de.be.thaw.style.parser.lexer.token.StyleFormatToken;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import java.io.StringReader;
import java.util.List;
import java.util... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.