repo_name stringlengths 6 101 | path stringlengths 4 300 | text stringlengths 7 1.31M |
|---|---|---|
koiva/wellington | src/main/java/org/github/rwynn/wellington/transfer/UserDTO.java | package org.github.rwynn.wellington.transfer;
import com.fasterxml.jackson.annotation.JsonInclude;
import org.github.rwynn.wellington.validation.NewUser;
import org.github.rwynn.wellington.validation.StrongPassword;
import org.github.rwynn.wellington.validation.UpdateLock;
import org.github.rwynn.wellington.validatio... |
BillyOsvaldo/e-presensi_backend | src/hooks/permissions.js | const { authenticate } = require('@feathersjs/authentication').hooks
const permissions = {}
permissions.apiOrJWT = async (context) => {
try {
await authenticate('apiKey')(context)
} catch(e) {
await authenticate('jwt')(context)
}
}
module.exports = permissions
|
moiify/llofo | src/user/include/da14580.h | #ifndef DA14580_H_
#define DA14580_H_
#include "types.h"
#include "protocol.h"
#define TBEACON_INFO_LEN 22
#define TBEACON_MAC_LEN 6
#define HOST_MAC_LEN 6
#define TBEACON_ID_LEN 12
#define TBEACON_VER_LEN 2
typedef enum
{
NOTIFY_PKE,
NOTIFY_DEFEND_ON,
NOTIFY_DEFEND_OFF,
NOTIFY_FINDME,
NOTIFY_STA... |
mtomono/TERSE3 | src/shapeCollection/CubeInt.java | <reponame>mtomono/TERSE3
/*
Copyright 2017, 2018 <NAME>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by a... |
MomoPewpew/Quark | src/main/java/vazkii/quark/world/block/BlockBiotite.java | <reponame>MomoPewpew/Quark<gh_stars>0
/**
* This class was created by <Vazkii>. It's distributed as
* part of the Quark Mod. Get the Source Code in github:
* https://github.com/Vazkii/Quark
*
* Quark is Open Source and distributed under the
* CC-BY-NC-SA 3.0 License: https://creativecommons.org/licenses/by-nc-sa/... |
e10101/incubator-superset | superset/assets/src/dashboard/util/charts/getFormDataWithExtraFilters.js | import getEffectiveExtraFilters from './getEffectiveExtraFilters';
// We cache formData objects so that our connected container components don't always trigger
// render cascades. we cannot leverage the reselect library because our cache size is >1
const cachedDashboardMetadataByChart = {};
const cachedFiltersByChart ... |
loganbyers/frictionless-py | setup.py | import os
import io
from setuptools import setup, find_packages
# Helpers
def read(*paths):
"""Read a text file."""
basedir = os.path.dirname(__file__)
fullpath = os.path.join(basedir, *paths)
contents = io.open(fullpath, encoding="utf-8").read().strip()
return contents
# Prepare
PACKAGE = "... |
liftchampion/nativejson-benchmark | thirdparty/ccan/ccan/asearch/test/run-strings.c | #include <ccan/asearch/asearch.h>
#include <ccan/array_size/array_size.h>
#include <ccan/tap/tap.h>
#include <stdlib.h>
#include <ccan/asearch/asearch.c>
static int cmp(const int *key, const char *const *elem, void *ctx)
{
return *key - atoi(*elem);
}
int main(void)
{
const char *args[] = { "1", "4", "7", "9" };
... |
jacksonicson/paper.IS2015 | control/Control/src/balancer/placement_bestfit_demand.py | <reponame>jacksonicson/paper.IS2015
from logs import sonarlog
import conf_domainsize
import conf_nodes
import placement_bestfit
import numpy as np
# Setup Sonar logging
logger = sonarlog.getLogger('placement')
class BestFitDemand(placement_bestfit.BestFit):
def sort(self, host_choice, _key):
return sorted... |
personal-social-media/rmega | lib/rmega/cli.rb | <gh_stars>100-1000
require 'optparse'
require 'io/console'
require 'yaml'
module Rmega
module CLI
module Helpers
def cli_options
$cli_options ||= read_configuration_file
end
def cli_prompt_password
print("Enter password: ")
password = STDIN.noecho(&:gets)
passwo... |
kkptm/CppLikeCSharp | System.Drawing/include/Switch/System/Drawing/Image.hpp | <reponame>kkptm/CppLikeCSharp
/// @file
/// @brief Contains Switch::System::Drawing::Image class.
#pragma once
#include <Switch/System/Object.hpp>
#include <Switch/System/String.hpp>
#include <Switch/RefPtr.hpp>
#include <Switch/System/Array.hpp>
#include <Switch/System/IComparable.hpp>
#include <Switch/System/IO/Stre... |
amichard/tfrs | backend/api/urls.py | """
REST API Documentation for the NRS TFRS Credit Trading Application
The Transportation Fuels Reporting System is being designed to streamline
compliance reporting for transportation fuel suppliers in accordance with
the Renewable & Low Carbon Fuel Requirements Regulation.
OpenAPI spec version: ... |
CorundumGames/AshPlusPlus | src/ash/fsm/EngineStateMachine.cpp | #include "ash/fsm/EngineStateMachine.hpp"
ash::fsm::EngineStateMachine::EngineStateMachine(const Engine& engine)
{
//ctor
}
ash::fsm::EngineStateMachine::~EngineStateMachine()
{
//dtor
}
|
benoitongit/android-open-street-map | OpenStreetMapLibrary/src/com/android/lib/map/osm/GeoPoint.java | package com.android.lib.map.osm;
import java.io.Serializable;
public class GeoPoint implements Serializable {
private static final long serialVersionUID = -6241356443051839339L;
private int latitudeE6 = 0;
private int longitudeE6 = 0;
public int getLatitudeE6() {
return latitudeE6;
}
... |
oxanamenushina/job4j | chapter_011/src/main/java/ru/job4j/crudservlet/UserUpdateServlet.java | package ru.job4j.crudservlet;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.PrintWriter;
/**
* UserUpdateServlet.
*
* @author <NAME> (<EMAIL>).
* ... |
p9c/matrjoska | pkg/blockchain/example_test.go | package blockchain_test
import (
"fmt"
bits2 "github.com/p9c/matrjoska/pkg/bits"
"github.com/p9c/matrjoska/pkg/block"
"log"
"math/big"
"os"
"path/filepath"
"github.com/p9c/matrjoska/pkg/blockchain"
"github.com/p9c/matrjoska/pkg/chaincfg"
"github.com/p9c/matrjoska/pkg/database"
_ "github.com/p9c/matrjoska/... |
ankitabantey/covidbubble | node_modules/@chakra-ui/styled-system/dist/esm/config/flexbox.js | import { createParser, system } from "@styled-system/core";
var config = {
alignItems: true,
alignContent: true,
justifyItems: true,
justifyContent: true,
flexWrap: true,
flexDirection: true,
flex: true,
flexGrow: true,
flexShrink: true,
flexBasis: {
property: "flexBasis",
scale: "sizes"
}... |
asugbdp9w7gf-p29q3823e872t3o29387fg298d/rip-atlas | src/main/java/best/reich/ingros/mixin/impl/MixinAbstractClientPlayer.java | package best.reich.ingros.mixin.impl;
import best.reich.ingros.IngrosWare;
import best.reich.ingros.events.render.CapeLocationEvent;
import com.mojang.authlib.GameProfile;
import net.minecraft.client.entity.AbstractClientPlayer;
import net.minecraft.util.ResourceLocation;
import net.minecraft.world.World;
import org.s... |
ResonanceGroup/FEMM | femm/GeneralPrefs.h | #if !defined(AFX_GENERALPREFS_H__9C2D61CC_B458_496C_9A23_BD2CD5D22AC8__INCLUDED_)
#define AFX_GENERALPREFS_H__9C2D61CC_B458_496C_9A23_BD2CD5D22AC8__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// GeneralPrefs.h : header file
//
/////////////////////////////////////////////////////////... |
CBorum/go-saxo | trading/getallocationkeys_response.go | package trading
type GetAllocationKeysResponse struct {
Data []struct {
AllocationKeyID string `json:"AllocationKeyId"`
AllocationKeyName string `json:"AllocationKeyName"`
AssetType string `json:"AssetType"`
BuySell string `json:"BuySell"`
ExternalReference string `json:"ExternalRef... |
bowlofstew/orb | samples/async/src/main/java/com/ea/orbit/samples/async/Main.java | /*
Copyright (C) 2015 Electronic Arts 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:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions a... |
BarryGr/smockin | src/main/java/com/smockin/admin/dto/response/FtpMockResponseDTO.java | package com.smockin.admin.dto.response;
import com.smockin.admin.dto.FtpMockDTO;
import com.smockin.admin.persistence.enums.RecordStatusEnum;
import java.util.Date;
/**
* Created by mgallina.
*/
public class FtpMockResponseDTO extends FtpMockDTO {
private String extId;
private Date dateCreated;
publ... |
christopher-burke/warmups | python/codingbat/src/sleepin.py | #!/usr/bin/env python3
"""sleep_in
The parameter weekday is True if it is a weekday, and
the parameter vacation is True if we are on vacation.
We sleep in if it is not a weekday or we're on vacation.
Return True if we sleep in.
source: https://codingbat.com/prob/p173401
"""
def sleep_in(weekday: bool, vacation... |
tenmark86/alx-low_level_programming | 0x04-more_functions_nested_loops/7-print_diagonal.c | <filename>0x04-more_functions_nested_loops/7-print_diagonal.c
#include "main.h"
/**
* print_diagonal - a function that draws a diagonal line on the terminal
* @n: input number of times '\' should be printed
* Return: a diagonal
*/
void print_diagonal(int n)
{
int co, sp;
if (n <= 0)
{
_putchar('\n');
}
el... |
ResearchHub/ResearchHub-Backend-Open | src/researchhub_case/models.py | <filename>src/researchhub_case/models.py
# flake8: noqa
from .related_models.researchhub_case_abstract_model import (
AbstractResearchhubCase
)
from .related_models.author_claim_case_model import AuthorClaimCase
|
starburst997/nme | project/include/xcompile/netdnet/dnetdb.h | /* DNLIB FUNCTIONS PROTOTYPING */
#ifndef NETDNET_DNLIB_H
#define NETDNET_DNLIB_H
#ifdef __cplusplus
extern "C"
{
#endif
// forward declaration. This is in <netdnet/dn.h>.
struct sockaddr_dn;
struct nodeent {
char *n_name; /* name of node */
unsigned short n_addrtype; /* node address type */
unsigned short n_len... |
jcoderltd/odin | odin-core/src/main/java/io/jcoder/odin/graph/DependencyProvider.java | /*
* Copyright 2019 JCoder Ltd.
*
* 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 ... |
k000kc/java-a-to-z | Chapter_4/Lesson-4.3.1/src/test/java/ru.apetrov/UpdateFoodStorageTest/ControllQualityTest.java | <gh_stars>1-10
package ru.apetrov.UpdateFoodStorageTest;
import org.junit.Before;
import org.junit.Test;
import ru.apetrov.UpdateFoodStorage.ControllQualityExpansion;
import ru.apetrov.UpdateFoodStorage.ControllQuality;
import ru.apetrov.UpdateFoodStorage.Products.Food;
import ru.apetrov.UpdateFoodStorage.Products.Rep... |
IBMStreams/OSStreams | src/java/platform/com.ibm.streams.application.models/src/main/java/com/ibm/streams/application/models/spl/logical/PrimitiveOperator.java | <filename>src/java/platform/com.ibm.streams.application.models/src/main/java/com/ibm/streams/application/models/spl/logical/PrimitiveOperator.java<gh_stars>1-10
/*
* Copyright 2021 IBM Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance wi... |
93million/certcache | src/cli/commands/create-keys.js | const childProcess = require('child_process')
const path = require('path')
const util = require('util')
const { catkeys } = require('./args')
const getConfig = require('../../lib/getConfig')
const execFile = util.promisify(childProcess.execFile)
module.exports = {
cmd: 'create-keys',
desc:
'Create access keys... |
wu0916/design-pattern | src/main/java/com/snailwu/designpattern/d22_memento_pattern/Client.java | <gh_stars>0
package com.snailwu.designpattern.d22_memento_pattern;
/**
* 备忘录模式
*
* @author 吴庆龙
* @date 2020/4/13 4:46 下午
*/
public class Client {
public static void main(String[] args) {
Originator or = new Originator();
Caretaker cr = new Caretaker();
or.setState("S0");
System... |
Essane/PartimeJob | src/main/java/com/essane/partimejob/mapper/TaskMapper.java | package com.essane.partimejob.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.essane.partimejob.domain.Task;
public interface TaskMapper extends BaseMapper<Task> {
}
|
nhoughto/camel | core/camel-util/src/main/java/org/apache/camel/util/concurrent/CamelThreadFactory.java | <filename>core/camel-util/src/main/java/org/apache/camel/util/concurrent/CamelThreadFactory.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... |
Hendrikto/jena | jena-examples/src/main/java/tdb1/examples/ExTDB_Txn2.java | <filename>jena-examples/src/main/java/tdb1/examples/ExTDB_Txn2.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
* ... |
cristivlas/zerobugs | third_party_libs/dwarf-20111214/dwarfgen/irepmacro.h | /*
Copyright (C) 2010-2011 <NAME>.
This program is free software; you can redistribute it and/or modify it
under the terms of version 2 of the GNU General Public License as
published by the Free Software Foundation.
This program is distributed in the hope that it would be useful, but
WITHOUT ANY WARRANT... |
Dong-gi/Dong-gi.github.io | Repositories/Eclipse/spring-aop/src/main/java/io/github/donggi/advice/AfterAdvice3.java | package io.github.donggi.advice;
import org.aspectj.lang.JoinPoint;
public class AfterAdvice3 {
public void after1() {
System.out.println("after with no args");
}
public void after2(JoinPoint joinPoint) {
System.out.println("after with JoinPoint : " + joinPoint.toShortString());
Sy... |
hostgov/qmall | qmall-member/src/main/java/com/qjx/qmall/member/vo/MemberRegistVo.java | <gh_stars>0
package com.qjx.qmall.member.vo;
import lombok.Data;
/**
* Ryan
* 2021-11-14-16:09
*/
@Data
public class MemberRegistVo {
private String username;
private String password;
private String phone;
}
|
peramic/App.ProcessViewer | src/main/java/havis/custom/harting/processviewer/ReportListener.java | package havis.custom.harting.processviewer;
import havis.middleware.ale.service.ec.ECReport;
public interface ReportListener {
public void fire(ECReport ecReport) throws Exception;
}
|
microsoft/Network-Adapter-Class-Extension | netcx/ec/lib/executioncontexttask.hpp | // Copyright (C) Microsoft Corporation. All rights reserved.
#pragma once
#include <kwaitevent.h>
#include <ExecutionContextTask.h>
class ExecutionContextTask
{
friend class
ExecutionContext;
public:
_IRQL_requires_max_(PASSIVE_LEVEL)
ExecutionContextTask(
_In_ void * Task... |
Jeebiz/jeebiz-admin | jeebiz-admin-extras/jeebiz-admin-authz-rbac0/src/main/java/net/jeebiz/admin/authz/rbac0/dao/IAuthorizedFeatureDao.java | /**
* Copyright (C) 2018 Jeebiz (http://jeebiz.net).
* All Rights Reserved.
*/
package net.jeebiz.admin.authz.rbac0.dao;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import net.jeebiz.admin.authz.feature.dao.entities.AuthzFeatureModel;
import ne... |
ahnitz/pegasus | test/core/043-integrity-condorio-5.0API/blackdiamond.py | import hashlib
import logging
import sys
from pathlib import Path
from datetime import datetime
from Pegasus.api import *
logging.basicConfig(level=logging.DEBUG)
PEGASUS_LOCATION = "/usr/bin/pegasus-keg"
# --- Work Dir Setup -----------------------------------------------------------
RUN_ID = "black-diamond-integ... |
rostykerei/cci | src/main/java/nl/rostykerei/cci/ch03/q02/StackMin.java | package nl.rostykerei.cci.ch03.q02;
import nl.rostykerei.cci.datastructure.Stack;
/**
* Question 3.2 - Stack Min.
*
* @author <NAME>
*/
public interface StackMin extends Stack<Integer> {
/**
* Returns the minimum value within the stack.
*
* @return minimum value within the stack
* @throws... |
nodejs/node.js-convergence | test/parallel/test-fs-truncate-fd.js | 'use strict';
var common = require('../common');
var assert = require('assert');
var path = require('path');
var fs = require('fs');
var tmp = common.tmpDir;
if (!fs.existsSync(tmp))
fs.mkdirSync(tmp);
var filename = path.resolve(tmp, 'truncate-file.txt');
var success = 0;
fs.writeFileSync(filename, 'hello world', ... |
coronalabs/com.coronalabs-plugin.kochava | src/tvos/Libs/KochavaCoreTVOS/KVALog.h | <reponame>coronalabs/com.coronalabs-plugin.kochava<gh_stars>0
//
// KVALog.h
// KochavaCore
//
// Created by <NAME> on 8/1/16.
// Copyright © 2017 - 2021 Kochava, Inc. All rights reserved.
//
#ifndef KVALog_h
#define KVALog_h
#pragma mark - CLASS
@class KVALogLevel;
@class KVAProduct;
#pragma mark - IN... |
allanim/vaadin | uitest/src/com/vaadin/tests/containers/sqlcontainer/ComboBoxUpdateProblem.java | package com.vaadin.tests.containers.sqlcontainer;
import com.vaadin.server.LegacyApplication;
import com.vaadin.shared.ui.combobox.FilteringMode;
import com.vaadin.ui.ComboBox;
import com.vaadin.ui.LegacyWindow;
/**
* See http://dev.vaadin.com/ticket/9155 .
*/
public class ComboBoxUpdateProblem extends LegacyApplic... |
svenfuchs/adva_cms | plugins/adva_cells/vendor/plugins/cells/generators/cell/cell_generator.rb | require 'rails_generator/generators/components/controller/controller_generator'
class CellGenerator < ControllerGenerator
def manifest
record do |m|
# Check for class naming collisions.
m.class_collisions class_path, "#{class_name}Cell"
# Directories
m.directory File.join('app/cells', cl... |
anubhavparas/ARIAC_Group_1 | rwa5_group_1/docs/html/search/variables_7.js | <reponame>anubhavparas/ARIAC_Group_1<filename>rwa5_group_1/docs/html/search/variables_7.js
var searchData=
[
['id',['id',['../structPart.html#ac78dd973677ae60144acd1dd72a77e70',1,'Part']]],
['incorrect_5fpart_5fagv1',['incorrect_part_agv1',['../classSensorControl.html#a200559ad6fdcca0cbb054348c12e3b42',1,'SensorCon... |
ctfrancia/escacsBCN | barna-ajedrez/src/reducers/tournamentsReducer.js | <gh_stars>0
const defaultState = {
tournaments: []
};
const tournamentsReducer = (state = defaultState.tournaments, action) => {
switch (action.type) {
case 'ADD_NEW_TOURNAMENT':
return [...state, action.tournaments];
case 'FETCH_TOURNAMENT_LIST':
return [...state, ...action.tournaments];
... |
dzinoviev/clown | include/readln.h | #ifndef READLN_H
#define READLN_H
/* Read a string, and return a pointer to it.
Returns NULL on EOF. */
char *rl_gets ();
#endif /* READLN_H */
|
seckcoder/lang-learn | python/sklearn/examples/cluster/plot_lena_segmentation.py | """
=========================================
Segmenting the picture of Lena in regions
=========================================
This example uses :ref:`spectral_clustering` on a graph created from
voxel-to-voxel difference on an image to break this image into multiple
partly-homogenous regions.
This procedure (spec... |
albertico/homebrew-cask | Casks/tuneup.rb | cask 'tuneup' do
version '2.5.3.0'
sha256 '8a2722d8719323d692c4a14935d945a3e42946aa9abd8a772fbd3737e4698b5d'
# cloudfront.net is the official download host per the vendor homepage
url "https://dvk2ozaytrec6.cloudfront.net/mac4/Sparkle/TuneUp-Installer-#{version.major_minor}.0.zip"
appcast 'https://dvk2ozaytr... |
hkirsman/hhvm_centos7_builds | third-party/mcrouter/src/mcrouter/ProxyConfigBuilder.h | /*
* Copyright (c) 2015, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*/
#pragma once... |
JeromeDuboisPro/framework | arcane/src/arcane/ActionWrapperService.h | // -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
//-----------------------------------------------------------------------------
// Copyright 2000-2021 CEA (www.cea.fr) IFPEN (www.ifpenergiesnouvelles.com)
// See the top-level COPYRIGHT file for details.
// SPDX-License-Identifier: Apache-2... |
jdflorencio/simpleERP_clinteSide | public/app.routes.js | var router = angular.module('materialApp.routes', ['ui.router']);
router.config(function ($stateProvider, $urlRouterProvider, $locationProvider, $httpProvider, $injector) {
$urlRouterProvider.otherwise('/login');
$httpProvider.interceptors.push(($injector) => {
return {
request: function (... |
c-sp/AGE | src/age_emulator_gb/sound/age_gb_sound_volume.hpp | <filename>src/age_emulator_gb/sound/age_gb_sound_volume.hpp<gh_stars>1-10
//
// Copyright 2020 <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/licen... |
raghav-deepsource/FreeBuilder | src/main/java/org/inferred/freebuilder/processor/source/Variable.java | /*
* Copyright 2018 Google Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable ... |
gaoyuan117/RenRenRoom | app/src/main/java/com/justwayward/renren/ui/adapter/TopDetailAdapter.java | package com.justwayward.renren.ui.adapter;
import android.support.annotation.LayoutRes;
import android.support.annotation.Nullable;
import android.text.Html;
import android.text.TextUtils;
import android.widget.ImageView;
import com.bumptech.glide.Glide;
import com.chad.library.adapter.base.BaseQuickAdapter;
import c... |
DwArFeng/rabc-weapon-rack | rabc-weapon-rack-stack/src/main/java/com/dwarfeng/rabcwr/stack/bean/entity/Pexp.java | <reponame>DwArFeng/rabc-weapon-rack
package com.dwarfeng.rabcwr.stack.bean.entity;
import com.dwarfeng.subgrade.stack.bean.entity.Entity;
import com.dwarfeng.subgrade.stack.bean.key.LongIdKey;
import com.dwarfeng.subgrade.stack.bean.key.StringIdKey;
/**
* @author DwArFeng
* @since 0.0.1-alpha
*/
public class Pexp ... |
ppartarr/azure-sdk-for-java | sdk/containerregistry/mgmt-v2016_06_27_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2016_06_27_preview/implementation/RegistryInner.java | /**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
*/
package com.microsoft.azure.management.containerregistry.v2016_06_27_preview.implementat... |
beforeuwait/myLintCode | BackTracking/towerOfHanoi.py | # coding=utf-8
"""
汉诺塔
描述:汉诺塔问题(又称为河内塔问题),是一个大家熟知的问题。在A,B,C三根柱子上,有n个不同大小的圆盘(假设半径分别为1-n吧),一开始他们都叠在我A上(如图所示),你的目标是在最少的合法移动步数内将所有盘子从A塔移动到C塔。
游戏中的每一步规则如下:
每一步只允许移动一个盘子(从一根柱子最上方到另一个柱子的最上方)
移动的过程中,你必须保证大的盘子不能在小的盘子上方(小的可以放在大的上面,最大盘子下面不能有任何其他大小的盘子)
思路:
移动 n-1次
把最大换到最边上
再移动 n-1次
这题挺有意思的
"""
class Solution:
"""
@pa... |
youngdaLee/Baekjoon | src/5/5355.js | <gh_stars>10-100
/**
* 5355. 화성 수학
*
* 작성자: xCrypt0r
* 언어: node.js
* 사용 메모리: 7,700 KB
* 소요 시간: 132 ms
* 해결 날짜: 2020년 11월 16일
*/
const fs = require('fs');
function main() {
let input = fs.readFileSync('/dev/stdin').toString().trim().split('\n');
let T = +input.shift();
for (let i = 0; i < T; i++)... |
Henning-Schulz/LPE-Common | org.lpe.common.config/src/org/lpe/common/config/experiment/KeyRegistry.java | package org.lpe.common.config.experiment;
import java.io.FileNotFoundException;
import java.io.PrintWriter;
import java.io.UnsupportedEncodingException;
import java.util.HashMap;
import java.util.Map;
import java.util.Map.Entry;
public class KeyRegistry {
private final Map<String, Key<?>> string2keys = new HashMap... |
shaderecker/openstack-org | summit/javascript/summitapp-editevent.js | <filename>summit/javascript/summitapp-editevent.js
/**
* Copyright 2014 Openstack Foundation
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
*... |
bedhubgrid/whitehall | config/initializers/friendly_id.rb | <gh_stars>100-1000
FriendlyId.defaults do |config|
config.base = :name
config.use :slugged, :finders, :sequentially_slugged, FriendlyId::CustomNormalise
config.sequence_separator = "--"
end
|
marcial-lopezferrada-hs/vault-ctrl-tool | e2e/e2e_test.go | <reponame>marcial-lopezferrada-hs/vault-ctrl-tool
package e2e
import (
"context"
"encoding/json"
"io/ioutil"
"os"
"path"
"testing"
"time"
"github.com/golang/mock/gomock"
"github.com/hashicorp/vault/api"
mtrics "github.com/hootsuite/vault-ctrl-tool/v2/metrics"
"github.com/hootsuite/vault-ctrl-tool/v2/util/c... |
andreasdr/tdme | src/net/drewke/tdme/engine/model/RotationOrder.java | <filename>src/net/drewke/tdme/engine/model/RotationOrder.java
package net.drewke.tdme.engine.model;
import net.drewke.tdme.math.Vector3;
/**
* Rotation order
* @author <NAME>
* @version $Id$
*/
public enum RotationOrder {
XYZ(new Vector3(1f,0f,0f), new Vector3(0f,1f,0f), new Vector3(0f,0f,1f), 0,1,2, 0,1,2),
Y... |
chuckyQ/briefcase | src/briefcase/commands/__init__.py | <filename>src/briefcase/commands/__init__.py
from .build import BuildCommand # noqa
from .create import CreateCommand # noqa
from .dev import DevCommand # noqa
from .new import NewCommand # noqa
from .package import PackageCommand # noqa
from .publish import PublishCommand # noqa
from .run import RunCommand # no... |
latcoin/rippled | src/ripple/validators/impl/SourceURL.cpp | //------------------------------------------------------------------------------
/*
This file is part of rippled: https://github.com/ripple/rippled
Copyright (c) 2012, 2013 Ripple Labs Inc.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby ... |
mikimaus78/ml_monorepo | trading-with-python/notebooks/trendy.py | import numpy as np
def movingaverage(interval, window_size=14, pad=False):
window = np.ones(int(window_size))/float(window_size)
ma= np.convolve(interval, window, 'same')
# pad the end properly
if pad:
w = window_size
x = np.array(interval)
n = len(ma)
start = n-w
... |
Michal-Gagala/sympy | sympy/codegen/cutils.py | <reponame>Michal-Gagala/sympy<gh_stars>0
from sympy.printing.c import C99CodePrinter
def render_as_source_file(content, Printer=C99CodePrinter, settings=None):
""" Renders a C source file (with required #include statements) """
printer = Printer(settings or {})
code_str = printer.doprint(content)
... |
roadnarrows-robotics/rnr-sdk | Eudoxus/sw/openni/Modules/nimMockNodes/nimMockNodes.cpp | /****************************************************************************
* *
* OpenNI 1.x Alpha *
* Copyright (C) 2011 PrimeSense Ltd. *
* ... |
meshy/django-conman | tests/redirects/factories.py | <reponame>meshy/django-conman
import factory
from conman.redirects import models
from tests.routes.factories import ChildRouteFactory, RouteFactory
class ChildRouteRedirectFactory(ChildRouteFactory):
"""Create a RouteRedirect with a target to a Child Route."""
target = factory.SubFactory(ChildRouteFactory)
... |
yanqirenshi/SOGH | src/components/common/ProductBacklogHeader.js | import React from 'react';
import { Link } from "react-router-dom";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import {
faWindowMinimize, faWindowMaximize,
} from "@fortawesome/free-solid-svg-icons";
import ANewTab from './ANewTab.js';
export default function ProductBacklogHeader (props) {
... |
tfisher1226/ARIES | aries/tx-manager/tx-manager-service/src/main/java/common/tx/service/participant/DurableTwoPhaseCommitParticipant.java | <reponame>tfisher1226/ARIES
package common.tx.service.participant;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.aries.tx.Durable2PCParticipant;
import org.aries.tx.ParticipantInternal;
import common.tx.exception.HeuristicCancelException;
import common.tx.exception.He... |
vbohinc/qpid-java | broker-plugins/management-http/src/main/java/resources/js/qpid/management/accesscontrolprovider/aclfile/add.js | /*
*
* 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"); y... |
HappyTramp/libft | src/str/ft_strjoin3.c | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_strjoin3.c :+: :+: :+: ... |
SAFE-anwang/SafeWallet-android | telegram/TMessagesProj/jni/voip/tgcalls/v2_4_0_0/Signaling_4_0_0.h | #ifndef TGCALLS_SIGNALING_4_0_0_H
#define TGCALLS_SIGNALING_4_0_0_H
#include <string>
#include <vector>
#include "absl/types/variant.h"
#include "absl/types/optional.h"
#include "api/rtp_parameters.h"
namespace tgcalls {
namespace signaling_4_0_0 {
struct DtlsFingerprint {
std::string hash;
std::string set... |
maginbit/jslearn219 | variable_009/app.js | // hay 3 formas de ceclarar variables var - let -const
// var la forma antigua
// let-const = forma nueva
var nombre = 'jose';//puede ser comillas dobles o simples "" o ''
nombre = 'maria';//sobreescribe el primer nombre
var nombre = "Juan";//sobre escribe el segundo nombre
console.log(nombre);
/*
undifined ejemplo
... |
OpenWebGlobe/Application-SDK | source/og-core/io/FileSystemWriterDisk.h |
#ifndef _FILESYSTEMWRITERDISK_H_
#define _FILESYSTEMWRITERDISK_H_
#include "og.h"
#include <string>
#include <exception>
#include <boost/shared_ptr.hpp>
#include "IFileSystemWriter.h"
//! \brief File System for writing from hard disk-like file hierarchy.
//! Abstraction for writing files to a hard disk-like file hi... |
fabiojna02/OpenCellular | firmware/coreboot/src/include/cpu/amd/amdfam10_sysconf.h | /*
* This file is part of the coreboot project.
*
* Copyright (C) 2007 Advanced Micro Devices, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; version 2 of the License.
*
* This ... |
JPMoresmau/camel | components/camel-dynamic-router/src/main/java/org/apache/camel/component/dynamicrouter/DynamicRouterConstants.java | <reponame>JPMoresmau/camel<filename>components/camel-dynamic-router/src/main/java/org/apache/camel/component/dynamicrouter/DynamicRouterConstants.java
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for add... |
sho25/hive | ql/src/java/org/apache/hadoop/hive/ql/parse/GenTezUtils.java | begin_unit|revision:0.9.5;language:Java;cregit-version:0.0.1
begin_comment
comment|/* * 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... |
akhilgupta01/tool.codoogle | codoogle-calltrace-indexer/src/main/java/gupta/akhil/tools/indexer/CallTraceCollector.java | package gupta.akhil.tools.indexer;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.TimeUnit;
import gupta.akhil.tools.common.... |
Cyanss/JavaToolkit | Toolkit/Rest-Wrapper/Chief-Wrapper/Chief-Rooter/chief-toolkit-starter/src/main/java/cyan/toolkit/chief/ChiefService.java | <gh_stars>1-10
package cyan.toolkit.chief;
import cyan.toolkit.chief.service.BuilderAdvice;
import cyan.toolkit.chief.service.InfoService;
import java.util.Date;
/**
* <p>RestService</p>
* @author Cyan (<EMAIL>)
* @version V.0.0.1
* @group cyan.tool.kit
* @date 16:00 2020/11/3
*/
public abstract class ChiefSer... |
Kentik/telegraf | plugins/outputs/kentik/kentik.go | <reponame>Kentik/telegraf<filename>plugins/outputs/kentik/kentik.go
package kentik
import (
"fmt"
"log"
"net"
"regexp"
"strings"
"github.com/influxdata/telegraf"
"github.com/influxdata/telegraf/plugins/outputs"
"github.com/kentik/libkflow"
)
var (
allowedChars = regexp.MustCompile(`[^a-zA-Z0-9-_./\p{L}]`)
... |
aldernero/genart | visual_tests/kdtree_mouse/kdtree_mouse.go | <filename>visual_tests/kdtree_mouse/kdtree_mouse.go
package main
import (
"flag"
"github.com/aldernero/sketchy"
"github.com/hajimehoshi/ebiten/v2"
"github.com/hajimehoshi/ebiten/v2/inpututil"
"github.com/tdewolff/canvas"
"image/color"
"log"
"strconv"
)
var kdtree *sketchy.KDTree
var nearestPoints []sketchy.I... |
HongZeBin98/HZB_ONE | app/src/main/java/com/hongzebin/bean/VideoDetail.java | <reponame>HongZeBin98/HZB_ONE
package com.hongzebin.bean;
/**
* 影视列表
* Created by 洪泽彬
*/
public class VideoDetail {
private String title;
private User user;
private String summary;
private String content;
private String praisenum;
public VideoDetail(String title, User user,... |
barak/talks-cam.railsapp | vendor/rails/activesupport/lib/active_support/core_ext/blank.rb | <filename>vendor/rails/activesupport/lib/active_support/core_ext/blank.rb<gh_stars>10-100
class Object #:nodoc:
# "", " ", nil, [], and {} are blank
def blank?
if respond_to?(:empty?) && respond_to?(:strip)
empty? or strip.empty?
elsif respond_to?(:empty?)
empty?
else
!self
end
... |
vedhavyas/go-centrifuge | protobufs/gen/go/nft/service.pb.go | <filename>protobufs/gen/go/nft/service.pb.go
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: nft/service.proto
package nftpb
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import _ "github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/options"
import _ "google.gol... |
grantmontgomery/seknd | src/components/Date-Parts-Piece/index.js | <reponame>grantmontgomery/seknd<filename>src/components/Date-Parts-Piece/index.js
export { default as DatePartsPiece } from "./DatePartsPiece";
|
Papabyte/odex-frontend | src/types/orders.js | <reponame>Papabyte/odex-frontend
export type NewOrderParams = {
userAddress: string,
exchangeAddress: string,
pair: TokenPair,
amount: number,
price: number,
side: 'BUY' | 'SELL'
}
export type RawOrder = {
exchangeAddress: string,
userAddress: string,
baseToken: string,
quoteToken: string,
amount... |
TomasHofman/infinispan | server/integration/testsuite/src/test/java/org/infinispan/server/test/cs/custom/CustomCacheStoreIT.java | <reponame>TomasHofman/infinispan
package org.infinispan.server.test.cs.custom;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull;
import java.io.File;
import javax.management.ObjectName;
import org.infinispan.arquillian.core.InfinispanResource;
import org.infinispan.arquillian.c... |
eregnier/kestra | runner-kafka/src/main/java/io/kestra/runner/kafka/KafkaTemplateExecutor.java | <filename>runner-kafka/src/main/java/io/kestra/runner/kafka/KafkaTemplateExecutor.java
package io.kestra.runner.kafka;
import io.kestra.runner.kafka.services.SafeKeyValueStore;
import io.micronaut.context.annotation.Replaces;
import io.micronaut.context.annotation.Requires;
import lombok.extern.slf4j.Slf4j;
import org... |
Dixa-public/browser-extension | src/integrations/sprintly.js | <reponame>Dixa-public/browser-extension<filename>src/integrations/sprintly.js
clockifyButton.render(
'.modal-content .card_container:not(.clockify)',
{ observe: true },
(elem) => {
var link, description;
description = $('.card_container .body a.title', elem).textContent.trim();
link = clockifyButton.... |
NyteCore/Senior_School_Projects | CCC C++/CCC C++/main.cpp | //
// main.cpp
// CCC C++
//
// Created by - on 2017/02/14.
// Copyright © 2017 <NAME> House of Ren. All rights reserved.
//
#include <iostream>
#include <valarray>
using namespace std;
int main() {
int n = 0;
cin >> n;
int A[100001];
for (int i = 0; i < 100001; i++){
A[i] ... |
rpatil524/datacollector | sdc-solr_6-lib/src/test/java/com/streamsets/pipeline/solr/impl/Solr06ServerUtil.java | <filename>sdc-solr_6-lib/src/test/java/com/streamsets/pipeline/solr/impl/Solr06ServerUtil.java
/**
* Copyright 2016 StreamSets Inc.
*
* Licensed under the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional informatio... |
onap/aai-aai-service | ajsc-aai/src/main/java/org/openecomp/aai/parsers/query/QueryParser.java | <filename>ajsc-aai/src/main/java/org/openecomp/aai/parsers/query/QueryParser.java
/*-
* ============LICENSE_START=======================================================
* org.openecomp.aai
* ================================================================================
* Copyright (C) 2017 AT&T Intellectual P... |
sameerjj/WCF-android | app/src/main/java/com/android/wcf/settings/TeamMembershipFragment.java | <filename>app/src/main/java/com/android/wcf/settings/TeamMembershipFragment.java
package com.android.wcf.settings;
import android.app.AlertDialog;
import android.content.Context;
import android.os.Bundle;
import android.text.Editable;
import android.text.TextWatcher;
import android.util.Log;
import android.view.Layout... |
ThePantsThief/SnapchatKit | Pod/Classes/Model/SKErrorPacket.h | <filename>Pod/Classes/Model/SKErrorPacket.h
//
// SKErrorPacket.h
// Pods
//
// Created by Tanner on 1/3/16.
//
//
#import "SKPacket.h"
@interface SKErrorPacket : SKPacket
@property (nonatomic, readonly) NSString *errorIdentifier;
@property (nonatomic, readonly) NSString *message;
@end
|
iambus/xquery-b | src/main/java/org/libj/xquery/compiler/Symbol.java | package org.libj.xquery.compiler;
public class Symbol {
private String name;
private int index;
private Class type;
public Symbol(String name, int index, Class type) {
this.name = name;
this.index = index;
this.type = type;
}
public Symbol(String name, int index) {
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.