repo_name stringlengths 6 101 | path stringlengths 4 300 | text stringlengths 7 1.31M |
|---|---|---|
xxdunedainxx/Z-Py | src/core/util/ErrorFactory/GeneralErrors.py | import sys, traceback
def errorStackTrace( e):
exc_type, exc_obj, exc_tb = sys.exc_info()
trace = traceback.format_exc()
errorMessage = ("STACK TRACE ERROR :: " + str(e) + ".. Line number: " + str(
exc_tb.tb_lineno) + "-- STACK TRACEBACK: " + str(trace))
return errorMessage
class InvalidChann... |
MDGSF/interviews | python-leetcode/42.01.py | <filename>python-leetcode/42.01.py
class Solution:
def trap(self, height: List[int]) -> int:
result, stack = 0, []
for i in range(len(height)):
while stack and height[i] > height[stack[-1]]:
tmp = stack.pop()
if len(stack) == 0:
break
curWidth = i - stack[-1] - 1
... |
OnciZL/Android | daemon/src/main/java/com/github/oncizl/daemon/service/XService.java | package com.github.oncizl.daemon.service;
import android.app.Notification;
import android.app.NotificationManager;
import android.app.Service;
import android.content.Intent;
import android.os.IBinder;
public class XService extends Service {
@Override
public void onCreate() {
super.onCreate();
startForeground(2... |
ericmanzi/double_pendulum_lqr | externals/libbot/bot2-procman/lcmtypes/c/lcmtypes/bot_procman_deputy_cmd2_t.h | /** THIS IS AN AUTOMATICALLY GENERATED FILE. DO NOT MODIFY
* BY HAND!!
*
* Generated by lcm-gen
**/
#include <stdint.h>
#include <stdlib.h>
#include <lcm/lcm_coretypes.h>
#include <lcm/lcm.h>
#ifndef _bot_procman_deputy_cmd2_t_h
#define _bot_procman_deputy_cmd2_t_h
#ifdef __cplusplus
extern "C" {
#endif
#inclu... |
tjbenton/docs | packages/docs-helpers-test/src/index.js | import assert from 'power-assert'
import path from 'path'
import fs from 'fs-extra-promisify'
import json from 'jsondiffpatch'
import readDir from 'recursive-readdir-sync'
import ava from 'ava-spec'
ava.compair = function Compair(folder, options = {}) {
if (typeof folder === 'object') {
options = folder
fol... |
1370156363/TTNews1 | TTNews/Classes/ZhuanjiaSearchController.h | <filename>TTNews/Classes/ZhuanjiaSearchController.h
//
// ZhuanjiaSearchController.h
// TTNews
//
// Created by 薛立强 on 2018/2/6.
// Copyright © 2018年 瑞文戴尔. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface ZhuanjiaSearchController : UIViewController
@property (nonatomic, strong) NSString *searchStr;
@e... |
liguo668/SparkSeq | src/test/java/org/ncic/bioinfo/sparkseq/compress/TestKryo.java | <reponame>liguo668/SparkSeq
/*
* Copyright (c) 2017 NCIC, Institute of Computing Technology, Chinese Academy of Sciences
*
* 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 restric... |
bvsoftware/stripe.net | tools/ruby/lib/ruby/1.9.1/irb/ext/history.rb | #
# history.rb -
# $Release Version: 0.9.6$
# $Revision: 25189 $
# by <NAME>(<EMAIL>)
#
# --
#
#
#
module IRB
class Context
NOPRINTING_IVARS.push "@eval_history_values"
alias _set_last_value set_last_value
def set_last_value(value)
_set_last_value(value)
# @workspace.evaluate s... |
sezero/windows-sdk-headers | Include/10.0.18362.0/winrt/windows.ui.xaml.automation.h | /* Header file automatically generated from windows.ui.xaml.automation.idl */
/*
* File built with Microsoft(R) MIDLRT Compiler Engine Version 10.00.0226
*/
#pragma warning( disable: 4049 ) /* more than 64k source lines */
/* verify that the <rpcndr.h> version is high enough to compile this file*/
#ifndef __REQUI... |
nickk-knack/crosdid | modules/b.js | <gh_stars>0
module.exports = {
name: 'b',
aliases: ['🅱️'],
description: '🅱️🅱️🅱️ 🅱️🅱️ 🅱️🅱️🅱️🅱️🅱️ 🅱️🅱️🅱️ 🅱️🅱️🅱️🅱️🅱️🅱️🅱️ 🅱️🅱️🅱️🅱️.',
args: true,
guildOnly: false,
cooldown: 3,
execute(message, args) {
const b = '🅱️';
const bMessage = args.join(' ').trim();
// normal str... |
ezLeaks/backdoored | com/google/cloud/storage/BlobReadChannel.java | <filename>com/google/cloud/storage/BlobReadChannel.java
package com.google.cloud.storage;
import com.google.cloud.storage.spi.v1.*;
import com.google.api.services.storage.model.*;
import java.nio.channels.*;
import java.nio.*;
import java.util.concurrent.*;
import com.google.api.gax.retrying.*;
import java.util.*;
imp... |
KJFrameForAndroid/KJFrameForAndroid | KJLibrary/src/org/kymjs/aframe/core/DiskCache.java | /*
* Copyright (c) 2014, KJFrameForAndroid 张涛 (<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 require... |
IgorRodchenkov/cpath2 | src/main/java/cpath/web/args/binding/GraphTypeEditor.java | <filename>src/main/java/cpath/web/args/binding/GraphTypeEditor.java
package cpath.web.args.binding;
import java.beans.PropertyEditorSupport;
import cpath.service.api.GraphType;
/**
* @author rodche
*
*/
public class GraphTypeEditor extends PropertyEditorSupport {
/* (non-Javadoc)
* @see java.beans.PropertyE... |
nemakam/azure-sdk-for-java | sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/sync/CosmosSyncTrigger.java | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
package com.azure.data.cosmos.sync;
import com.azure.data.cosmos.CosmosClientException;
import com.azure.data.cosmos.CosmosTrigger;
import com.azure.data.cosmos.CosmosTriggerProperties;
/**
* The type Cosmos sync trigger... |
openharmony-gitee-mirror/device_bearpi_bearpi_hm_nano | sdk_liteos/third_party/u-boot-v2019.07/u-boot-v2019.07/net/eth_common.c | // SPDX-License-Identifier: GPL-2.0+
/*
* (C) Copyright 2001-2015
* <NAME>, DENX Software Engineering, <EMAIL>.
* <NAME>, National Instruments
*/
#include <common.h>
#include <dm.h>
#include <environment.h>
#include <miiphy.h>
#include <net.h>
#include "eth_internal.h"
int eth_env_get_enetaddr_by_index(const char... |
perlaruizaviles/farandula | farandula-java/src/main/java/com/nearsoft/farandula/auth/AuthInterceptor.java | <reponame>perlaruizaviles/farandula
package com.nearsoft.farandula.auth;
import java.io.IOException;
import okhttp3.Interceptor;
import okhttp3.Request;
import okhttp3.Response;
public class AuthInterceptor implements Interceptor {
private final AccessToken _token;
public AuthInterceptor(AccessToken access... |
nofxx/ubi | spec/ubi/memorias/address_spec.rb | require 'spec_helper'
describe Memoria::Address do
[
'R Bahia,55 - Una/BA - 12345-678',
'R Bahia,55 - Una/BA - 12345- 678',
'R Bahia, 55 - Una/BA - 12345-678',
'R Bahia, 55 - Una/BA - 12345-678',
'R Bahia, 55 / Una/BA - 12345-678',
'R Bahia, 55 \n Una/BA \n 12345-678',
'R Bahia, 55, ... |
nkrios/autopsy | Core/src/org/sleuthkit/autopsy/communications/CVTTopComponent.java | /*
* Autopsy Forensic Browser
*
* Copyright 2017 Basis Technology Corp.
* Contact: carrier <at> sleuthkit <dot> 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://ww... |
rofinily/intelli-swift-core | swift-indexing/src/main/java/com/fr/swift/generate/history/index/FieldPathIndexer.java | <reponame>rofinily/intelli-swift-core<gh_stars>0
package com.fr.swift.generate.history.index;
import com.fr.swift.cube.io.Releasable;
import com.fr.swift.generate.BaseFieldPathIndexer;
import com.fr.swift.segment.Segment;
import com.fr.swift.segment.SwiftSegmentManager;
import com.fr.swift.segment.column.ColumnKey;
im... |
JamesCao2048/BlizzardData | Corpus/swt/1438.java | <gh_stars>1-10
/*******************************************************************************
* Copyright (c) 2000, 2008 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this d... |
kellixon/Cucumber | src/main/java/com/blakebr0/cucumber/util/Utils.java | package com.blakebr0.cucumber.util;
import java.text.NumberFormat;
import java.util.Collections;
import java.util.List;
import java.util.Random;
import org.lwjgl.input.Keyboard;
import net.minecraft.item.ItemStack;
import net.minecraft.util.text.TextComponentTranslation;
import net.minecraft.util.text.translation.I1... |
L-VE/knooppuntnet | server/src/main/scala/kpn/server/api/analysis/pages/route/RouteMapPageExample.scala | <reponame>L-VE/knooppuntnet<filename>server/src/main/scala/kpn/server/api/analysis/pages/route/RouteMapPageExample.scala
package kpn.server.api.analysis.pages.route
import kpn.api.common.route.RouteMapPage
object RouteMapPageExample {
val page: RouteMapPage = {
RouteMapPage(RouteDetailsPageExample.page.route, 1... |
kiptechie/wsc-sdk-java | src/test/java/com/wowza/cloudsdk/test/client/model/StreamSourceCreateInputModelTest.java | /*
* This code and all components © 2015 - 2019 Wowza Media Systems, LLC. All rights reserved.
* This code is licensed pursuant to the BSD 3-Clause License.
*
* Wowza Streaming Cloud REST API Reference Documentation
*/
package com.wowza.cloudsdk.test.client.model;
import com.wowza.cloudsdk.client.*;
import com.... |
MC-JY/quickstart | microprofile-jwt/src/test/java/org/wildfly/quickstarts/mpjwt/TokenUtil.java | /*
* JBoss, Home of Professional Open Source
* Copyright 2020 Red Hat, Inc., and individual contributors
* as indicated by the @author tags.
*
* 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 Licens... |
srinathwarrier/BrandstoreApp | app/src/main/java/com/brandstore1/asynctasks/SearchResultsAsyncTask.java | <filename>app/src/main/java/com/brandstore1/asynctasks/SearchResultsAsyncTask.java
package com.brandstore1.asynctasks;
import android.content.Context;
import android.os.AsyncTask;
import android.util.Log;
import com.brandstore1.adapters.ResultsListViewAdapter;
import com.brandstore1.entities.SearchResults;
import com... |
iterum-provenance/cli | idv/doc.go | // Package idv includes all the actual functionalities related to data versioning.
// Both relevant types and functions are included in this package
//
// Some notable helper files:
// * constants.go constants used throughout this package
// * manage.go contains many basic functions such as parsing often used files... |
huitongsaiyi/sxsy | src/main/java/com/sayee/sxsy/modules/typeinfo/web/TypeInfoController.java | /**
* Copyright © 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
*/
package com.sayee.sxsy.modules.typeinfo.web;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.shiro.authz.annotation.RequiresPermissions;
i... |
baibhavr/algorithms | algorithms/src/leetcode/hard/CriticalConnection.java | package leetcode.hard;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
/**
* https://leetcode.com/problems/critical-connections-in-a-network/
*
* @author baibhav <<EMAIL>> 2:16:01 AM Apr 20, 2022
*/
public class CriticalConnection {
public List<List<Integer>> criticalConnections(int ... |
java-fkd/leyou | leyou-order/leyou-order-service/src/test/java/com/leyou/rabbitmq/test/RabbitMQTest.java | <filename>leyou-order/leyou-order-service/src/test/java/com/leyou/rabbitmq/test/RabbitMQTest.java
//package com.leyou.rabbitmq.test;
//
//import com.leyou.order.LyOrderApplication;
//import com.leyou.order.service.OrderStatusService;
//import com.leyou.order.vo.OrderStatusMessage;
//import org.junit.Test;
//import org.... |
FridayAlgorithm/taesong_study | CodingTest_Study1/week18/소수찾기.py | <gh_stars>0
import math
from itertools import permutations
def is_prime_number(n):
"""소수판별 함수"""
if n == 0 or n == 1: # 0,1 은 소수가 아님
return False
else:
# sqrt(n)까지만 for문을 돌면서 확인하면 된다.
for i in range(2, int(math.sqrt(n)) + 1):
# 2~sqrt(num)... |
deora-earth/Habitat | web/lib/scene/scene.js | const BASE = import.meta.url.split('/').slice(0, -1).join('/');
const SPEEDS = [.1, .5, 1, 1];
const BASE_ZOOM = 100;
const TEMPLATE = document.createElement('template');
TEMPLATE.innerHTML = `
<style>
.whitetext {
color: var(--color-white);
text-shadow: 0 1px 6px black;
line-height: 1.2;
}
.para {
width: 100%;... |
wanliyun/xLua | build/3rd/lheap.c | <reponame>wanliyun/xLua
#ifndef SLUA_3RD_LOADED
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <lua.h>
#include <lauxlib.h>
#endif
#if (LUA_VERSION_NUM < 502 && !defined(luaL_newlib))
# define luaL_newlib(L,l) (lua_newtable(L), luaL_register(L,NULL,l))
#endif
#define LCS_HEAP "lheap{C11F... |
bmoretz/Daily-Coding-Problem | py/illuminated/14_max-weight-independent-set.py | <gh_stars>1-10
'''
In this programming problem you'll code up the dynamic programming algorithm for computing a maximum-weight independent set of a path graph.
This file describes the weights of the vertices in a path graph (with the weights listed in the order in which vertices appear in the path). It has the followi... |
blueskyawen/incubator-weex-site | docs/.vuepress/data/who-is-using-weex.js | <gh_stars>0
export default [
{
name_CN: '手机淘宝',
name_EN: 'taobao',
icon: 'https://img.alicdn.com/tfs/TB1jH9bX3mTBuNjy1XbXXaMrVXa-270-271.png',
iOS: 'https://itunes.apple.com/cn/app/id387682726?mt=8',
android: 'https://play.google.com/store/apps/details?id=com.taobao.taobao&hl=zh_CN'
},
{
n... |
melindil/FTSE | FTSE/entities/Switch.h | <filename>FTSE/entities/Switch.h
#pragma once
#include "Usable.h"
class Switch :
public Usable
{
public:
Switch(EntityID id);
Switch(void* ptr);
virtual ~Switch();
virtual void MakeLuaObject(lua_State* l);
static void RegisterLua(lua_State* l, Logger* tmp);
static const uint32_t VTABLE = 0x81ac64;
bool IsOn()... |
zzhmark/vaa3d_tools | released_plugins/v3d_plugins/neurontracing_neutube/src_neutube/neurolabi/gui/biocytin/swcprocessor.cpp | <filename>released_plugins/v3d_plugins/neurontracing_neutube/src_neutube/neurolabi/gui/biocytin/swcprocessor.cpp
#include "swcprocessor.h"
#include "zswctree.h"
#include "swctreenode.h"
#include "tz_math.h"
Biocytin::SwcProcessor::SwcProcessor()
{
}
void Biocytin::SwcProcessor::assignZ(ZSwcTree *tree, const Stack &de... |
sintak/RSSHub | lib/routes/hinatazaka46/news.js | const got = require('@/utils/got');
const cheerio = require('cheerio');
module.exports = async (ctx) => {
const response = await got({
method: 'get',
url: 'https://www.hinatazaka46.com/s/official/news/list',
headers: {
Referer: 'http://www.hinatazaka46.com/',
},
});
... |
mumupy/pythonlearn | src/numpy/screenshot.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 2019/9/21 17:29
# @Author : ganliang
# @File : screenshot.py
# @Desc : 屏幕截图
import time
import numpy as np
def window_capture():
"""
window截屏 不跨平台
:return:
"""
def _window_capature(filename):
import win32gui, win32ui, win3... |
lananh265/social-network | node_modules/react-icons-kit/oct/hubot.js | "use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.hubot = void 0;
var hubot = {
"viewBox": "0 0 14 16",
"children": [{
"name": "path",
"attribs": {
"fill-rule": "evenodd",
"d": "M3 6c-.55 0-1 .45-1 1v2c0 .55.45 1 1 1h8c.55 0 1-.45 1-1V7c0-.55-.45-1-1-1H3zm8 ... |
npocmaka/Windows-Server-2003 | sdktools/pview/mytoken.h |
typedef struct {
HANDLE Token;
LPWSTR Name;
PTOKEN_USER UserId;
PTOKEN_GROUPS Groups;
PTOKEN_OWNER DefaultOwner;
PTOKEN_PRIMARY_GROUP PrimaryGroup;
PTOKEN_PRIVILEGES Privileges;
PTOKEN_STATISTICS ... |
alexandrustoica/university.ubb.bachelor | Advanced Programming Methods/Advanced Programming Methods Generic ORM/model/src/main/java/translator/GenericTranslator.java | package translator;
import domain.Idable;
import org.jetbrains.annotations.NotNull;
/**
* @author <NAME>
* @version 1.0
*/
public interface GenericTranslator<EntityT extends Idable<?>, TransferT extends Idable<?>> {
EntityT transform(@NotNull TransferT transferable);
TransferT translate(@NotNull EntityT ... |
rolandomar/stheno | p3/src/org/cracs/stheno/core/p2p/p3/monitor/ClientMultipleRPCTest.cpp | /*
* Copyright 2012 <NAME>, CRACS & INESC-TEC, DCC/FCUP
*
* 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 requir... |
spotify-research/RIPS_KDD202 | rips/eval/offpolicy/drips.py | <gh_stars>10-100
#
# Copyright 2020 Spotify AB
# 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... |
SevKohler/highmed-dsf | dsf-bpe/dsf-bpe-server/src/main/java/org/highmed/dsf/fhir/websocket/FhirConnector.java | <gh_stars>0
package org.highmed.dsf.fhir.websocket;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.function.Supplier;
import org.highmed.dsf.fhir.client.WebsocketClientProvider;
import org.highmed.dsf.fhir.task.TaskHandler;
import org.highmed.fhir.client.WebsocketClie... |
dolphingarlic/sketch-frontend | src/main/java/sketch/util/DLListIterator.java | /*
* Copyright 2003 by the Massachusetts Institute of Technology.
*
* Permission to use, copy, modify, and distribute this
* software and its documentation for any purpose and without
* fee is hereby granted, provided that the above copyright
* notice appear in all copies and that both that copyright
* notice an... |
KyleLee95/learningTrie | client/store/vote.js | <reponame>KyleLee95/learningTrie
import axios from 'axios'
/**
* ACTION TYPES
*/
const UPVOTE = 'UPVOTE'
const DOWNVOTE = 'DOWNVOTE'
const FETCH_VOTE = 'FETCH_VOTE'
/**
* INITIAL STATE
*/
const defaultVote = {}
/**
* ACTION CREATORS
*/
const upvoteResource = vote => ({
type: UPVOTE,
vote
})
const downvote... |
npocmaka/Windows-Server-2003 | ds/security/protocols/digest/nonce.cxx |
//+-----------------------------------------------------------------------
//
// Microsoft Windows
//
// Copyright (c) Microsoft Corporation 2000
//
// File: nonce.cxx
//
// Contents: Context APIs for the Digest security package
// Main entry points into this dll:
// No... |
base-cms-websites/pmmi-media-group | packages/theme-monorail-leaders/browser/list/positions/menu-position.js | import AbstractPosition from './abstract-position';
class MenuPosition extends AbstractPosition {
constructor({
openDirection,
calculus,
offsetTop,
offsetBottom,
} = {}) {
super({ openDirection, calculus });
this.offsetTop = offsetTop || 0;
this.offsetBottom = offsetBottom || 0;
}
... |
JavaQualitasCorpus/poi-3.6 | src/scratchpad/src/org/apache/poi/hwpf/model/FieldDescriptor.java | <filename>src/scratchpad/src/org/apache/poi/hwpf/model/FieldDescriptor.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 i... |
UO-CIS/CIS399AndroidDemos | WeatherForecast-SAX+SQLite+ListView/app/src/main/java/edu/uoregon/bbird/weatherdemo/WeatherItem.java | package edu.uoregon.bbird.weatherdemo;
// Written by <NAME> 7/11/15, updated 7/13/17
import android.annotation.SuppressLint;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
@SuppressLint("SimpleDateFormat")
public class WeatherItem {
private String forecastDate = n... |
niquola/health_seven | lib/health_seven/2.6/messages.rb | <gh_stars>1-10
module HealthSeven::V2_6
base_dir = File.dirname(__FILE__)
autoload :Ack, base_dir + '/messages/ack'
autoload :AdrA19, base_dir + '/messages/adr_a19'
autoload :AdtA01, base_dir + '/messages/adt_a01'
autoload :AdtA02, base_dir + '/messages/adt_a02'
autoload :AdtA03, base_dir + '/messages/adt_a... |
jeanspector/elastifile-provisioner-csi | src/vendor/github.com/elastifile/emanage-go/src/eurl/url.go | <filename>src/vendor/github.com/elastifile/emanage-go/src/eurl/url.go<gh_stars>0
package eurl
import (
"net/url"
"strconv"
"github.com/go-errors/errors"
)
type URL struct {
*url.URL
}
func (u *URL) UnmarshalJSON(data []byte) error {
if u == nil || u.URL == nil {
return nil
}
rawurl, err := strconv.Unquote... |
Danish12/CoachingCenter | Chanakya/src/com/fagnum/controller/AppController.java | package com.fagnum.controller;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import com.fagnum.services.service.AccessDetailsService;
import com.fagnum.services.service.AnswerService;
import com.fagnum.services.service.BlogService;
im... |
thfabian/sequoia | sequoia-engine/src/sequoia-engine/Unittest/GameSetup.h | <reponame>thfabian/sequoia<gh_stars>1-10
//===--------------------------------------------------------------------------------*- C++ -*-===//
// _____ _
// / ____| (_)
// | (___ ___ __ _ _ _ ___ _ __... |
losil/oop_exercises | src/main/java/ch/hslu/oop/sw8/Sw8.java | /**
*
*/
package ch.hslu.oop.sw8;
/**
* @author silvan
*
*/
public class Sw8 {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
System.out.println(Temperature.convertCelsiusToKelvin(36.9));
System.out.println(Temperature.convertKelvinToCelsius(193));
... |
slmjy/oci-ansible-modules | test/units/test_oci_route_table_facts.py | <reponame>slmjy/oci-ansible-modules
# Copyright (c) 2017, 2018, Oracle and/or its affiliates.
# This software is made available to you under the terms of the GPL 3.0 license or the Apache 2.0 license.
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# Apache License v2.0
# Se... |
lanyanhua/gorgoues-doc | src/main/java/com/lancabbage/gorgeous/service/MenuService.java | <reponame>lanyanhua/gorgoues-doc
package com.lancabbage.gorgeous.service;
import com.lancabbage.gorgeous.bean.dto.MenuDto;
import com.lancabbage.gorgeous.bean.po.Menu;
import com.lancabbage.gorgeous.bean.po.ProjectBranch;
import java.util.List;
import java.util.Map;
/**
* 菜单service
*
* @author: lanyanhua
* @date... |
jrevault/xgenecloud | packages/xc-data-mapper/__tests__/models/film.meta.js | <reponame>jrevault/xgenecloud
module.exports = {
tableName: 'film',
columns: [{
columnName: 'film_id',
type: 'integer',
dataType: 'smallint',
notNull: true,
unsigned: true,
primaryKey: true,
autoIncrement: true,
validate: {
func: [],
args: [],
... |
lrueda9/ContableSale | Contable/src/contable/JuntarComponentes.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 contable;
import java.awt.Image;
import java.awt.event.KeyAdapter;
import java.awt.event.KeyEvent;
import java.sql.ResultSet;
... |
sarang-apps/darshan_browser | media/fuchsia/cdm/service/fuchsia_cdm_manager.h | // Copyright 2019 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.
#ifndef MEDIA_FUCHSIA_CDM_SERVICE_FUCHSIA_CDM_MANAGER_H_
#define MEDIA_FUCHSIA_CDM_SERVICE_FUCHSIA_CDM_MANAGER_H_
#include <fuchsia/media/drm/cpp/fidl.h>... |
SunYe1234/PDFNetNew | lib/src/pdftron-collab/src/main/java/com/pdftron/collab/ui/reply/component/ReplyMessagesUIComponent.java | <reponame>SunYe1234/PDFNetNew
package com.pdftron.collab.ui.reply.component;
import android.arch.lifecycle.LifecycleOwner;
import android.support.annotation.NonNull;
import android.view.ViewGroup;
import com.pdftron.collab.ui.base.component.BaseUIComponent;
import com.pdftron.collab.ui.reply.bottomsheet.view.ReplyMes... |
bannable/parslet | spec/parslet/atoms/capture_spec.rb | <reponame>bannable/parslet
# frozen_string_literal: true
require 'spec_helper'
describe Parslet::Atoms::Capture do
include Parslet
let(:context) { Parslet::Atoms::Context.new(nil) }
def inject(string, parser)
source = Parslet::Source.new(string)
parser.apply(source, context, true)
end
it 'should ... |
StoqnBorislavov/SpringFundamentals | src/main/java/softuni/mobile/repository/BrandRepository.java | package softuni.mobile.repository;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;
import softuni.mobile.model.entity.Brand;
import java.util.Optional;
@Repository
public interface BrandRepository extends JpaRepository<Brand, Long> {
Optional<Brand... |
NickFranz3/Nick-Clay-Test | src/waf/src/view/template/com/sun/j2ee/blueprints/waf/view/template/ScreenDefinitionDAO.java | /*
* Copyright 2002 Sun Microsystems, 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 con... |
PulseBeat02/Competitive-Programming | USACO Silver Problems/src/angry.java | import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.StringTokenizer;
public class angry {
public static boolean[] explode;
public static void main(String[] args) throws IOException {
// TO... |
acropolium/dGarson | src/components/Order/OrderStatusElement/MicroElement/LeftSideStatus.js | <filename>src/components/Order/OrderStatusElement/MicroElement/LeftSideStatus.js
import React from 'react';
import PropTypes from 'prop-types';
import { Text, View, Icon } from '../../../BaseComponents';
import styles from '../../../../styles/components/order/LeftSideStatusStyle';
const LeftSideStatus = props => {
... |
skeptycal/cs-playground-react | src/assets/seed/data-structures/Stack.js | <reponame>skeptycal/cs-playground-react
export default {
title: 'Stack',
seed:
`class Node {
constructor(value) {
this.value = value
this.next = null
}
}
class Stack {
constructor() {
this.root = null
this.size = 0
}
// methods to implement:
// push(value)
... |
hyrlamiranda/watir-webdriver | lib/watir-webdriver/elements/dlist.rb | module Watir
class DList < HTMLElement
def to_hash
keys = dts.map { |e| e.text }
values = dds.map { |e| e.text }
Hash[keys.zip(values)]
end
end
end
|
MrEliasen/path-to-power-server | server/game/components/structure/commands.js | import {CHARACTER_LEFT_GRID} from 'shared/actionTypes';
/**
* Heal command logic
* @param {Socket.io Socket} socket The socket of the client who sent the command
* @param {[type]} character Character of the client sending the request
* @param {String} command the command eg. /say
* @pa... |
adambirse/innovation-funding-service | ifs-data-layer/ifs-data-service/src/test/java/org/innovateuk/ifs/competition/domain/CompetitionTest.java | <filename>ifs-data-layer/ifs-data-service/src/test/java/org/innovateuk/ifs/competition/domain/CompetitionTest.java
package org.innovateuk.ifs.competition.domain;
import org.innovateuk.ifs.competition.mapper.CompetitionMapper;
import org.innovateuk.ifs.competition.resource.CompetitionResource;
import org.innovateuk.ifs... |
MadDogTechnology/telegraf | plugins/inputs/mcrouter/mcrouter_test.go | package mcrouter
import (
"bufio"
"strings"
"testing"
"github.com/MadDogTechnology/telegraf/testutil"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
func TestAddressParsing(t *testing.T) {
m := &Mcrouter{
Servers: []string{"tcp://" + testutil.GetLocalHost()},
}
var acceptTes... |
BitOneInc/itemsapi | tests/item/aggregationsSpec.js | var should = require('should');
var sinon = require('sinon');
var assert = require('assert');
var setup = require('./../mocks/setup');
var request = require('supertest');
var _ = require('underscore');
setup.makeSuite('item crud request', function() {
var data = [
{id: 1, rating: 9, name: 'godfather', tags: ['dr... |
Girbons/ui | src/components/RadioButton/index.js | <reponame>Girbons/ui<gh_stars>100-1000
export * from './RadioButton.Skeleton';
export * from './RadioButton';
export default from './RadioButton';
|
qawbecrdtey/BOJ-sol | problems/acmicpc_14623.cpp | #include <iostream>
int main() {
char s[99], t[99];
std::cin >> s >> t;
unsigned long x = std::stoll(s, nullptr, 2);
unsigned long y = std::stoll(t, nullptr, 2);
auto z = x * y;
bool flag = false;
for(int i = 63; i >= 0; i--) {
if(flag || ((z >> i) & 1)) flag = true, std::cout << ((z... |
WEBZCC/ohloh-ui | app/models/concerns/account/clearance_user.rb | <reponame>WEBZCC/ohloh-ui
# frozen_string_literal: true
module Account::ClearanceUser
extend ActiveSupport::Concern
included do
include Clearance::User
def email_optional?
true
end
end
end
|
pkt1583/google-collections | src/com/google/common/base/Joiner.java | /*
* Copyright (C) 2008 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 or agreed to ... |
oneybee/datavisual-react-refactor | src/components/Page01/block/Page01/Charts.js | <reponame>oneybee/datavisual-react-refactor
import React from 'react';
import styled, { css } from 'styled-components';
import { Row } from '../../../../libs/ruucm-blocks';
const ChartsInner = ({className, children}) => {
return <Row className={className}>{children}</Row>
}
const Charts = styled(ChartsInner)`
pad... |
deongroenewald/affiance | lib/hook-context/post-rewrite.js | <gh_stars>1-10
'use strict';
const gitRepo = require('../gitRepo');
const HookContextBase = require('./base');
module.exports = class HookContextPostRewrite extends HookContextBase {
constructor(config, argv, input) {
super(config, argv, input);
this.hookScriptName = 'post-rewrite';
this.hookConfigName =... |
RapidsAtHKUST/SimRank | python_experiments/run_vldbj_experiments/run_other_algorithms.py | from exec_utilities import time_out_util
from exec_utilities.exec_utils import *
def run_exp():
other_exec_path_lst = [
'/homes/ywangby/workspace/yche/git-repos/SimRank/SPS-Variants/sling/build/sling_all',
'/homes/ywangby/workspace/yche/git-repos/SimRank/SPS-Variants/isp-yche/build/isp_ap',
... |
agonzalezdlf/municipio2019 | src/mx/gob/municipio/centro/view/controller/acceso/ControladorMain.java | /**
* @author Lsc. <NAME>.
* @version 1.0
*
*/
package mx.gob.municipio.centro.view.controller.acceso;
import java.util.Map;
import java.util.logging.Logger;
import javax.servlet.http.HttpServletRequest;
import mx.gob.municipio.centro.model.gateways.sam.GatewayUsuarios;
import mx.gob.municipio.centro.view.bases... |
bis83/pomdog | src/Math/detail/FloatingPointMatrix2x2.cpp | // Copyright (c) 2013-2015 mogemimi.
// Distributed under the MIT license. See LICENSE.md file for details.
#include "Pomdog/Math/detail/FloatingPointMatrix2x2.hpp"
#include "Pomdog/Utility/Assert.hpp"
#include <cmath>
#include <limits>
namespace Pomdog {
namespace Detail {
template <typename T>
FloatingPointMatrix2... |
jkraybill/trakt-java | src/main/java/com/uwetrottmann/trakt5/entities/BaseIds.java | package com.uwetrottmann.trakt5.entities;
public abstract class BaseIds {
public Integer trakt;
public String imdb;
public Integer tmdb;
}
|
reflectometry/osrefl | osrefl/model/samples.py | <filename>osrefl/model/samples.py
# Holder Class for Sample Objects
# <NAME> - June 4, 2012
from .sample_prep import *
class Sample(object):
def empty(self):
return
def getScene(self):
self.scenelist = []
if(self.MaterialC != None):
self.scenelist.... |
GeorgeKirev/OpenOLAT | src/main/java/org/olat/commons/coordinate/cluster/jms/JMSWrapper.java | <reponame>GeorgeKirev/OpenOLAT<filename>src/main/java/org/olat/commons/coordinate/cluster/jms/JMSWrapper.java
/**
* OLAT - Online Learning and Training<br>
* http://www.olat.org
* <p>
* Licensed under the Apache License, Version 2.0 (the "License"); <br>
* you may not use this file except in compliance with the License... |
NemProject/nis-client | peer/src/it/java/org/nem/peer/trust/simulation/Config.java | <reponame>NemProject/nis-client<gh_stars>0
package org.nem.peer.trust.simulation;
import org.nem.core.node.*;
import org.nem.core.test.NodeUtils;
import java.util.*;
import java.util.logging.Logger;
import java.util.stream.Collectors;
/**
* Network simulator configuration.
*/
public class Config {
private static ... |
raphaelmeissonnier/Foundem_front_end | front-end/src/reducers/ObjetsReducer.js | import {GET_FOUND_ITEMS, GET_LOST_ITEMS, GET_MATCH_ITEMS} from "../Actions/ObjetsAction";
const INITIAL_STATE = {
getLostItemsResponse:null,
getFoundItemsResponse: null,
getMatchItemsResponse: null,
};
export default function ObjetsReducer (state = INITIAL_STATE , action) {
switch (action.type) {
... |
matthewgdv/iohandler | iotools/gui/widget/numeric.py | from __future__ import annotations
from typing import Union
from PySide6 import QtWidgets
from maybe import Maybe
from iotools.command.argument import IntegerArgument, FloatArgument
from .base import WidgetHandler
class NumericEntry(WidgetHandler):
"""An abstract manager class for a simple numeric SpinBox wi... |
polyaxon/polyaxon-lib | examples/programatic_examples/variational_autoencoder_mnist.py | <reponame>polyaxon/polyaxon-lib
# -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function
import numpy as np
import tensorflow as tf
import polyaxon_lib as plx
from tensorflow.examples.tutorials.mnist import input_data
from polyaxon_schemas.optimizers import AdamConfig
from polyaxon_sc... |
fengbindev/EightRoes | framework/src/main/java/com/ssrs/framework/data/p6spy/P6spyLogFormat.java | <reponame>fengbindev/EightRoes
package com.ssrs.framework.data.p6spy;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.toolkit.StringPool;
import com.p6spy.engine.spy.appender.MessageFormattingStrategy;
/**
* <p> P6spy SQL 日志格式化 </p>
*
* @author ssrs
*/
public class P6spyLogFormat implemen... |
johny-c/ViZDoom | src/lib/boost/process/windows/create_pipe.hpp | <reponame>johny-c/ViZDoom<gh_stars>1000+
// Copyright (c) 2006, 2007 <NAME>
// Copyright (c) 2008 <NAME>, <NAME>
// Copyright (c) 2009 <NAME>
// Copyright (c) 2010 <NAME>, <NAME>
// Copyright (c) 2011, 2012 <NAME>, <NAME>
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE... |
ptomato/test262 | test/built-ins/Array/length/S15.4.5.1_A1.1_T1.js | // Copyright 2009 the Sputnik authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-array-exotic-objects-defineownproperty-p-desc
info: If ToUint32(length) !== ToNumber(length), throw RangeError
es5id: 15.4.5.1_A1.1_T1
description: length in [4294967296, ... |
kevin74Unifei/ecommerce | ecommerce/src/main/java/ecommerce/main/Validators/CommonValidator.java | <gh_stars>0
package ecommerce.main.Validators;
import org.springframework.stereotype.Component;
@Component
public class CommonValidator {
public boolean isStringNullOrEmpty(String input) {
return (input == null || input.trim().length() == 0);
}
public boolean isMoneyValid(Double input){
... |
mbelyakovspb/job4j | chapter_001/src/main/java/ru/job4j/converter/Converter.java | package ru.job4j.converter;
/**
* Класс Конвертер валют
* @author <NAME> (<EMAIL>)
* @since 02.05.2019
* @version 1
*/
public class Converter {
/**
* Метод конвертирует рубли в евро
* @param value ruble
* @return euro
*/
public int rubleToEuro(int value) {
return value * 70;
... |
itzpankajpanwar/Leetcode | stone-game-iii/stone-game-iii.cpp | <gh_stars>1-10
class Solution {
public:
string stoneGameIII(vector<int>& A) {
vector<int> dp(4);
for (int i = A.size() - 1; i >= 0; --i) {
dp[i % 4] = -1e9;
for (int k = 0, take = 0; k < 3 && i + k < A.size(); ++k)
dp[i % 4] = max(dp[i % 4], (take += A[i + k])... |
TugberkArkose/MLScheduler | benchmarks/SimResults/Paper2_fair_spec_base/cmp_gromacscactusADMleslie3dnamd/power.py | <gh_stars>0
power = {'BUSES': {'Area': 1.33155,
'Bus/Area': 1.33155,
'Bus/Gate Leakage': 0.00662954,
'Bus/Peak Dynamic': 0.0,
'Bus/Runtime Dynamic': 0.0,
'Bus/Subthreshold Leakage': 0.0691322,
'Bus/Subthreshold Leakage with power gating': 0.0259246,
... |
abetten/orbiter | src/lib/foundations/geometry_builder/tdo_scheme.cpp | <filename>src/lib/foundations/geometry_builder/tdo_scheme.cpp
/*
* tdo_scheme.cpp
*
* Created on: Aug 16, 2021
* Author: betten
*/
#include "foundations.h"
using namespace std;
namespace orbiter {
namespace foundations {
tdo_scheme::tdo_scheme()
{
m = 0;
n = 0;
a = NULL;
}
tdo_scheme::~tdo_scheme... |
apoex/gs1 | spec/gs1/ai_spec.rb | <filename>spec/gs1/ai_spec.rb<gh_stars>1-10
RSpec.describe GS1::AI do
describe 'SSCC' do
subject { described_class::SSCC }
it { is_expected.to eq('00') }
end
describe 'GTIN' do
subject { described_class::GTIN }
it { is_expected.to eq('01') }
end
describe 'CONTENT' do
subject { describe... |
mnaboka/cosmos | cosmos-model/src/main/scala/com/mesosphere/universe/v3/model/Cli.scala | package com.mesosphere.universe.v3.model
case class Cli(
binaries: Option[Platforms]
)
|
elektronikasa/GWK | node_modules/gulp-spawn/node_modules/plexer/src/index.js | var Stream = require('stream')
, util = require('util')
;
// Inherit of Readable stream
util.inherits(Duplexer, Stream.Duplex);
// Constructor
function Duplexer(options, writableStream, readableStream) {
var _self = this;
// Ensure new were used
if (!(this instanceof Duplexer)) {
return new (Duplexer.bin... |
majos95/Software-Engineering | backend/src/main/java/pt/ulisboa/tecnico/socialsoftware/tutor/clarification/ClarificationRepository.java | <filename>backend/src/main/java/pt/ulisboa/tecnico/socialsoftware/tutor/clarification/ClarificationRepository.java
package pt.ulisboa.tecnico.socialsoftware.tutor.clarification;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframewor... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.