repo_name stringlengths 6 101 | path stringlengths 4 300 | text stringlengths 7 1.31M |
|---|---|---|
markgras/salt | salt/states/azurearm_network.py | """
Azure (ARM) Network State Module
.. versionadded:: 2019.2.0
:maintainer: <<EMAIL>>
:maturity: new
:depends:
* `azure <https://pypi.python.org/pypi/azure>`_ >= 2.0.0
* `azure-common <https://pypi.python.org/pypi/azure-common>`_ >= 1.1.8
* `azure-mgmt <https://pypi.python.org/pypi/azure-mgmt>`_ >= 1.0.0... |
jellehuibregtse/cah | auth-service/src/main/java/com/jellehuibregtse/cah/authservice/security/SecurityCredentialsConfig.java | package com.jellehuibregtse.cah.authservice.security;
import com.jellehuibregtse.cah.authservice.jwt.JwtConfig;
import com.jellehuibregtse.cah.authservice.jwt.JwtTokenAuthenticationFilter;
import com.jellehuibregtse.cah.authservice.jwt.JwtUsernameAndPasswordAuthenticationFilter;
import com.jellehuibregtse.cah.aut... |
menty44/tutorials | rxjava-operators/src/test/java/com/baeldung/rxjava/operators/RxAggregateOperatorsUnitTest.java | package com.baeldung.rxjava.operators;
import org.junit.Test;
import rx.Observable;
import rx.observers.TestSubscriber;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
public class RxAggregateOperatorsUnitTest {
... |
hsmtknj/programming-contest | cpp_snippet/sort/pg/merge_sort.cpp | #include <bits/stdc++.h>
void merge_sort(std::vector<int> &v, int left, int right)
{
// ベースケース: 底まで行ったら終了
if (right - left <= 1)
{
// std::cout << left << "," << right << ": " << v[left] << std::endl;
return;
}
// 再帰関数
int mid = left + (right - left) / 2;
// std::cout << le... |
perfectrecall/aws-sdk-cpp | aws-cpp-sdk-ecs/include/aws/ecs/model/ListServicesResult.h | <filename>aws-cpp-sdk-ecs/include/aws/ecs/model/ListServicesResult.h
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/ecs/ECS_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSVector.h>
#include <aws/core/utils/memory/stl/... |
ienter/iwage | src/js/modes/image/tools/glfx/Vignette.js | <reponame>ienter/iwage
Ext.ns('iwage.image.tools.glfx');
Ext.define('iwage.image.tools.glfx.Vignette', {
toolLabel: 'Vignette',
extend: 'iwage.image.tools.glfx.Common',
createControls: function() {
return [
{
xtype: 'slider',
fieldLabel: 'Tamaño',
... |
tikskit/otus-java-dev-class | hw13-atm-department/src/main/java/ru/tikskit/atm/NotEnoughMoneyException.java | package ru.tikskit.atm;
/**
* Сумма денег в банкомате меньше, чем требуется выдать
*/
public class NotEnoughMoneyException extends ATMException {
public NotEnoughMoneyException(int requiredAmount) {
super(String.format("Недостаточно денег в банкомате: %d!", requiredAmount));
}
}
|
redrye/PowershellTerminal | terminalpp/window.h | #pragma once
#include <algorithm>
#include <thread>
#include <mutex>
#include "helpers/time.h"
#include "ui/canvas.h"
#include "ui/renderer.h"
#include "ui/event_queue.h"
#include "config.h"
#include "application.h"
#include "font.h"
namespace tpp {
using namespace ui;
class Window : public Renderer {
... |
SwarajPaul99/Health-Care-System | src/main/java/com/Sprint/HealthCareSystem/Service/IUserService.java | package com.Sprint.HealthCareSystem.Service;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.Sprint.HealthCareSystem.Entity.User;
import com.Sprint.HealthCareSystem.Exceptions.UserCreationError;
import com.Sprint.Hea... |
weihualiu/SDBC | ds/tbound.c | <filename>ds/tbound.c
/*************************************************
* 可以看到如何用lowerBound()和upperBound组合成
* < <= > 功能
************************************************/
#include <stdio.h>
#include <Binary_search.h>
#include <pack.h>
// <key的最后元素
int less_than(void *key,void *data,int data_siz,int cmp(void *key,... |
uktrade/data-hub-frontend | test/functional/cypress/specs/dashboard-new/projects-filter-spec.js | import { INVESTMENT_PROJECT_STAGES } from '../../fakers/constants'
import { investmentProjectListFaker } from '../../fakers/investment-projects'
import { investmentProjectSummaryFaker } from '../../fakers/investment-project-summary'
import { assertPayload } from '../../support/assertions'
const getFinancialYearStart =... |
dariusgrassi/upf-epc | pfcpiface/vendor/github.com/wmnsk/go-pfcp/ie/rds-configuration-information.go | <reponame>dariusgrassi/upf-epc
// Copyright 2019-2021 go-pfcp authors. All rights reserved.
// Use of this source code is governed by a MIT-style license that can be
// found in the LICENSE file.
package ie
import "io"
// NewRDSConfigurationInformation creates a new RDSConfigurationInformation IE.
func NewRDSConfigu... |
allisonverdam/cubes | cubes/metadata/defaults.py | # -*- encoding: utf-8 -*-
"""Metadata validation
"""
import pkgutil
import json
from collections import namedtuple
from .. import compat
try:
import jsonschema
except ImportError:
from ..common import MissingPackage
jsonschema = MissingPackage("jsonschema", "Model validation")
__all__ = (
"validat... |
rubicon-project/prebid-server-java | src/main/java/org/prebid/server/bidder/stroeercore/StroeerCoreBidder.java | package org.prebid.server.bidder.stroeercore;
import com.fasterxml.jackson.core.type.TypeReference;
import com.iab.openrtb.request.BidRequest;
import com.iab.openrtb.request.Imp;
import com.iab.openrtb.response.Bid;
import io.vertx.core.http.HttpMethod;
import org.apache.commons.collections4.CollectionUtils;
import or... |
upstar77/spacemap | coworker/core/base_model.py | from django.db import models
from location_field.models.spatial import LocationField
from django.utils.functional import cached_property
from django.utils.translation import ugettext_lazy as _
from coworker.search import index
class BaseLocation(models.Model):
address = models.CharField(max_length=250)
lat_ln... |
RhoInc/participant-visit-listing | src/listing/onDraw/addSummaries/visit.js | <filename>src/listing/onDraw/addSummaries/visit.js
import { nest, format } from 'd3';
export default function visit() {
this.pvl.data.sets.visit_col.forEach(visit => {
const visit_data = this.pvl.data.filtered.filter(
d => d[this.pvl.settings.visit_col] === visit.name
);
const v... |
cstom4994/SourceEngineRebuild | src/public/panorama/controls/animatedimagestrip.h | //=========== Copyright Valve Corporation, All rights reserved. ===============//
//
// Purpose:
//=============================================================================//
#ifndef ANIMATED_IMAGE_STRIP_H
#define ANIMATED_IMAGE_STRIP_H
#ifdef _WIN32
#pragma once
#endif
#include "image.h"
namespace panorama
{... |
huzheng12/vue-admin | src/apis/global_management/global_letter/letterRecord.js | import {request as axios} from "@/utils/request/index.js";
export default {
// 多语种信件 > 查询
listMessageVo: ({ isAuto, offset, limit, title_like, sendDate_GT, sendDate_LT, isSend }) => {
return axios.request({
url: '/appmessage/listMessageVo',
method: 'post',
data: {
isAuto, // ... |
3jins/job-seek | src/webServer/api/category.js | import express from 'express';
import Category from '../../mongodb/model/Category';
const router = express.Router();
router.get('/', (req, res) => Category.find()
.then(categories => res.json(categories))
.catch((err) => {
console.error(err);
return res.status(500).json({
message: 'Could not retriev... |
Ayub-Khan/workbench | workbench/workers/meta.py | <reponame>Ayub-Khan/workbench<gh_stars>10-100
''' Meta worker '''
import hashlib
import magic
import pprint
class MetaData(object):
''' This worker computes meta data for any file type. '''
dependencies = ['sample', 'tags']
def __init__(self):
''' Initialization '''
self.meta = {}
de... |
Truong-Duong/SMU-BootCamp-Archive | 17-CS/01-Activities/28-Stu_Mini-Project/Main/01_bubble-sort/bubble-sort.js | // Create our input data
const unsortedInputArray = [];
// seed data in unsortedInputArray
for (let i = 0; i < 2000; i++) {
unsortedInputArray.push(Math.round(Math.random() * 2000));
}
// slightly more efficient since it will stop the `while` loop early if array is sorted
const bubbleSort = (array) => {
// set fl... |
TeacherManoj0131/HacktoberFest2020-Contributions | Algorithms/Directed Graph/DirectedGraphShortestPath.cpp | <filename>Algorithms/Directed Graph/DirectedGraphShortestPath.cpp<gh_stars>100-1000
/*
Algorithm Purpose: Get the length of shortest path from 1 to a certain vertex in directed graph.
For: weighted directed graph, consisting of n vertices and m edges.
q should answer:
1. 1->v — find the length of shortest path from ... |
dmgerman/hadoop | hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/MemoryMappedBlock.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 license... |
SolidDesignNet/j1939-84 | src-test/org/etools/j1939_84/controllers/part02/Part02Step08ControllerTest.java | <reponame>SolidDesignNet/j1939-84
/*
* Copyright 2021 Equipment & Tool Institute
*/
package org.etools.j1939_84.controllers.part02;
import static net.soliddesign.j1939tools.j1939.packets.DM26TripDiagnosticReadinessPacket.PGN;
import static org.etools.j1939_84.J1939_84.NL;
import static org.etools.j1939_84.model.Outc... |
rohun-tripati/pythonRepo | Previous_State_On_Repo/StrokeRecoveryOffline/Data/code/pixelsToStrokesView.py | <gh_stars>1-10
import random, sys
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.lines as mlines
import matplotlib.patches as mpatches
def add_arrow_to_line2D(
axes, line, arrow_locs=[0.2, 0.4, 0.6, 0.8],
arrowstyle='-|>', arrowsize=1, transform=None):
"""
Add arrows to a matplotl... |
mcodegeeks/OpenKODE-Framework | 01_Develop/libXMFFmpeg/Source/libavcodec/j2k.cpp | <gh_stars>1-10
/*
* JPEG2000 encoder and decoder common functions
* Copyright (c) 2007 <NAME>
*
* This file is part of FFmpeg.
*
* FFmpeg is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
... |
teleclimber/Dropserver | internal/getcleanhost/getcleanhost_test.go | package getcleanhost
import "testing"
func TestGetCleanHost(t *testing.T) {
cases := []struct {
hostPort string
host string
er bool
}{
{"abc.def:3000", "abc.def", false},
{"abc.def:", "abc.def", false},
{"abc.def", "abc.def", false},
{"", "", false},
{"abc.def:xyz", "abc.def", false},
{"... |
mbreemhaar/webcurator | webcurator-core/src/main/java/org/webcurator/core/store/Indexer.java | <reponame>mbreemhaar/webcurator<gh_stars>0
package org.webcurator.core.store;
import java.io.File;
import java.util.ArrayList;
import java.util.Date;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.HashMap;
import java.util.Properties;
import org.apache.commons.logging.Log;
im... |
bl0x/symbiflow-arch-defs | quicklogic/pp3/utils/timing.py | <gh_stars>100-1000
import statistics
from copy import deepcopy
from collections import defaultdict, namedtuple
from data_structs import VprSwitch, MuxEdgeTiming, DriverTiming, SinkTiming
from utils import yield_muxes, add_named_item
# =============================================================================
de... |
taoyonggang/litemall | litemall-admin-api/src/test/java/org/linlinjava/litemall/admin/text.java | package org.linlinjava.litemall.admin;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.linlinjava.litemall.admin.config.QrcodeProperties;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.contex... |
Landgate/Staff-Calibration | staff_calibration/forms.py | from django import forms
from datetime import date
# import models
from .models import uCalibrationUpdate
from staffs.models import Staff, DigitalLevel
# make your forms
class StaffForm(forms.ModelForm):
def __init__(self, *args, **kwargs):
user = kwargs.pop('user', None)
super(StaffForm,... |
Sofiasotog/signature_ruby | app/controllers/account.js | <filename>app/controllers/account.js
const getModelByName = require('../models/getModelByName');
const signup = (req,res)=>{
if(!req.body.user){
return res.status(200).send({
success: false,
error:'user not fund'
})
}
const UserModel = getModelByName('user_conserv... |
rex/destiny | app/models/faction_definition.rb | class FactionDefinition < ActiveRecord::Base
end
|
e-mayo/mscreen | mscreen/autodocktools_prepare_py3k/MolKit/pdb2pqr/forcefield.py | #!/usr/bin/python2 -O
"""
Forcefield script
This module takes a pdblist as input and replaces the occupancy and
tempfactor fields with charge and radius fields, with values as defined
by a particular forcefield. The forcefield structure is modeled off of
the structures.py file, where each forcefi... |
JuanitoFatas/faulty | spec/cache/null_spec.rb | <gh_stars>10-100
# frozen_string_literal: true
RSpec.describe Faulty::Cache::Null do
subject(:cache) { described_class.new }
it 'reads nothing after writing' do
cache.write('foo', 'bar')
expect(cache.read('foo')).to eq(nil)
end
it 'is fault_tolerant' do
expect(cache.fault_tolerant?).to eq(true)
... |
EgorBo/coreclr | src/binder/fusionassemblyname.cpp | // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
// ============================================================
//
// FusionAssemblyName.cpp
//
// Implements the CAs... |
WOWZON3/TERAsology | engine/src/main/java/org/terasology/logic/characters/CharacterMoveInputEvent.java | <filename>engine/src/main/java/org/terasology/logic/characters/CharacterMoveInputEvent.java
/*
* Copyright 2013 MovingBlocks
*
* 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
*
* ht... |
reels-research/iOS-Private-Frameworks | CoreParsec.framework/_CPNetworkTimingData.h | /* Generated by RuntimeBrowser
Image: /System/Library/PrivateFrameworks/CoreParsec.framework/CoreParsec
*/
@interface _CPNetworkTimingData : PBCodable <NSSecureCoding, _CPNetworkTimingData> {
bool _QUICWhitelistedDomain;
bool _TFOSuccess;
unsigned int _connectEnd;
unsigned int _connectStart;
... |
se77en/LibCoroC | examples/C/ticker.c | // Copyright 2016 <NAME> (<EMAIL>). All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE.txt file.
#include <stdlib.h>
#include <stdio.h>
#include "libcoroc.h"
void callback(void) { printf("\ttime out!\n"); }
int main(int argc, char** argv) {
uint6... |
slavrd/go-book-gopl | ch02/ex2.02/lengthconv/lengthconv.go | <gh_stars>0
//!+
// Package lengthconv converts Feet to Meters and vice versa
package lengthconv
import "fmt"
const (
// MeterToFeetRatio the ration of meter to feet
MeterToFeetRatio = 0.3048
)
// Meter represents the meter length unit
type Meter float64
// Foot represents the foot length unit
type Foot float64
... |
cambridgejames/coss4-server | coss4-services/user-management/src/main/java/cn/net/powerinv/coss4/service/LoginAndLogoutService.java | package cn.net.powerinv.coss4.service;
import cn.net.powerinv.coss4.vo.ThirdPartyDTO;
import cn.net.powerinv.coss4.vo.UserDTO;
import java.util.Map;
/**
* 用户基本信息维护服务
*/
public interface LoginAndLogoutService {
/**
* 用户名/邮箱登录
* @param userDTO 用户信息
* @return 登录结果
*/
public Map<String, Obj... |
echaussidon/LSS | py/LSS/imaging/veto_masks/reference/trim_allwise_catalog.py | <gh_stars>0
# Based on AllWISE W1MPRO<13.3 catalog
# Select stars within 1.5 degree of a brick center
from __future__ import division, print_function
import sys, os, glob, time, warnings, gc
import numpy as np
# import matplotlib
# matplotlib.use("Agg")
# import matplotlib.pyplot as plt
from astropy.table import Table... |
smilehcb/002 | src/server/controllers/reply.js | <filename>src/server/controllers/reply.js
/**
* 评论回复控制器
*/
var validator = require('validator');
var _ = require('lodash');
var at = require('../common/at');
var EventProxy = require('eventproxy');
var UserProxy = require('../proxy').User;
var OrderProxy = require('../proxy').Order;
var ReplyProxy = require('../proxy... |
Raffy23/boinc-webmanager | shared/src/main/scala/at/happywetter/boinc/shared/webrpc/package.scala | package at.happywetter.boinc.shared
/**
* Created by:
*
* @author Raphael
* @version 04.03.2018
*/
package object webrpc {
case class ServerStatus(daemon_status: Seq[Daemon], database_file_states: DatabaseFileStates,
tasks_by_app: Seq[ServerStatusApp])
case class Daemon(host:... |
tylerwinkler/msg-game | src/Entities/Entity.cpp | #include "Entities/Entity.hpp"
#include "Components/SpriteComponent.hpp"
void Entity::setPosition(int x, int y)
{
oldPosition.x = position.x;
oldPosition.y = position.y;
position.x = x;
position.y = y;
for (auto observer : m_positionObservers)
{
observer->receive(x, y);
}
}
void... |
adorsys/xs2a-gateway | xs2a-adapter-service-loader/src/test/java/de/adorsys/xs2a/adapter/serviceloader/TestAccountInformationService.java | <filename>xs2a-adapter-service-loader/src/test/java/de/adorsys/xs2a/adapter/serviceloader/TestAccountInformationService.java
/*
* Copyright 2018-2022 adorsys GmbH & Co KG
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU Affero General Public License as publish... |
d4x337/reloaded | db/migrate/20161015102605_add_image_to_posts.rb | class AddImageToPosts < ActiveRecord::Migration
def self.up
change_table :posts do |t|
t.attachment :image
end
end
def self.down
remove_column :posts, :image, :attachment
end
end
|
Justin-Teng/HackerRank | Algorithms/Implementation/Easy/Sock-Merchant.cpp | <filename>Algorithms/Implementation/Easy/Sock-Merchant.cpp
#include <bits/stdc++.h>
using namespace std;
int sockMerchant(int n, vector <int> ar) {
unordered_map<int, int> socks;
int count = 0;
for (int i = 0; i < n; i++) {
auto it = socks.find(ar[i]);
if (it != socks.end()) {
... |
monadgroup/sy17 | tool/tool/dependency/shadermanager.h | #pragma once
#include <map>
#include <memory>
#include <string>
#include <set>
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#define SH_CHANGENOTIFY 2000
namespace monad {
class ShaderDependency;
class ShaderManager {
std::map<const std::string, std::weak_ptr<ShaderDependency>> cache;
st... |
pparkddo/ps | boj/9663/Main.java | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
class Solution {
private int n;
private boolean placed[][];
private int count = 0;
Solution(int n) {
this.n = n;
this.placed = new boolean[n][n];
}
public int getCount() {
ret... |
LibreTask/website | src/components/Signup.js | /*
* @link https://libretask.org/
* @license https://github.com/LibreTask/backend/blob/master/LICENSE.md
*/
import React, { Component } from "react";
import { browserHistory } from "react-router";
import { connect } from "react-redux";
import {
Button,
FormGroup,
ControlLabel,
FormControl,
HelpBlock
} fr... |
McLeodMoores/starling | projects/web/src/main/java/com/opengamma/web/user/AbstractWebRoleResource.java | <gh_stars>1-10
/**
* Copyright (C) 2009 - present by OpenGamma Inc. and the OpenGamma group of companies
*
* Please see distribution for license.
*/
package com.opengamma.web.user;
import org.joda.beans.impl.flexi.FlexiBean;
import com.opengamma.master.user.UserMaster;
import com.opengamma.util.ArgumentChecker;
i... |
portal-io/portal-ios-business | WVRPay/WVRPay/Classes/CheckGoodsPayedList/Model/http/WVRHttpApiCheckGoodsPayedList.h | <gh_stars>0
//
// WVRHttpApiCheckGoodsPayedList.h
// WhaleyVR
//
// Created by <NAME> on 2017/9/7.
// Copyright © 2017年 Snailvr. All rights reserved.
//
#import "WVRAPIBaseManager+ReactiveExtension.h"
@interface WVRHttpApiCheckGoodsPayedList : WVRAPIBaseManager <WVRAPIManager>
@end
|
irwansetiawan/android-publisher-sdk | publisher-sdk/src/main/java/com/criteo/publisher/AppEvents/AppEvents.java | <gh_stars>1-10
/*
* Copyright 2020 Criteo
*
* 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 ... |
bgalloway1/enroll | components/sponsored_benefits/app/helpers/sponsored_benefits/application_helper.rb | <gh_stars>10-100
module SponsoredBenefits
module ApplicationHelper
def generate_breadcrumb_links(proposal, organization)
if proposal.persisted?
links = [sponsored_benefits.edit_organizations_plan_design_organization_plan_design_proposal_path(organization.id, proposal.id)]
links << sponsored_... |
u-transnet/Gamedev | uTransnetCalcServer/src/main/java/com/github/utransnet/utranscalc/server/data/ObjectType.java | package com.github.utransnet.utranscalc.server.data;
/**
* Created by Artem on 04.06.2018.
*/
public enum ObjectType {
link(1),
pylon(2),
station(3);
public int id;
ObjectType(int id) {
this.id = id;
}
}
|
guyuedumingx/ProgrammingExperiment | src/main/java/experiment2/yhicxu/utils/LinkQueue.java | package experiment2.yhicxu.utils;
import java.util.Iterator;
/**
* <p><b>类名:</b>{@code LinkQueue}</p>
* <p><b>功能:</b></p><br>链队列
* <p><b>方法:</b></p>
* <br> {@link #LinkQueue()}构造方法
* <br> {@link #offer(Object)}将数据添加到队尾
* <br> {@link #peek()}查看队首元素
* <br> {@link #pool()}取出队首元素
* <br> {@link #isEmpty()}判断队列是否为空... |
mpi2/PhenotypeData | datatests/src/test/java/org/mousephenotype/cda/datatests/repositories/solr/EssentialGeneServiceTest.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.
/**
* Copyright © 2014 EMBL - European Bioinformatics Institute
*
* Licensed under the Apache License, Version 2.0 (the "License");
* ... |
John3/crabmusket_Torque3D | Engine/source/lighting/advanced/advancedLightingFeatures.cpp | //-----------------------------------------------------------------------------
// Copyright (c) 2012 GarageGames, LLC
//
// 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 restrictio... |
Adrjanjan/JiMP-Exercises | lab3/tinyurl/TinyUrl.cpp | //
// Created by adrja on 22.03.2018.
//
#include "TinyUrl.h"
namespace tinyurl {
std::unique_ptr<TinyUrlCodec> Init() {
std::unique_ptr<TinyUrlCodec> codec_structure(new TinyUrlCodec);
codec_structure->state = {'0', '0', '0', '0', '0', '0'};
codec_structure->urls = {};
return st... |
bluebird88/HIS | his-cloud/his-cloud-service-dms/src/main/java/com/neu/his/cloud/service/dms/dto/dms/DmsRefundDrugParam.java | package com.neu.his.cloud.service.dms.dto.dms;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import java.io.Serializable;
@Setter
@Getter
@ToString
public class DmsRefundDrugParam implements Serializable {
@ApiModelProperty(value = "退药处方项Id... |
LasserCAT/elemental-creepers | src/main/java/T145/elementalcreepers/core/ModLoader.java | <reponame>LasserCAT/elemental-creepers
package T145.elementalcreepers.core;
import java.util.List;
import java.util.Set;
import T145.elementalcreepers.ElementalCreepers;
import T145.elementalcreepers.client.render.entity.RenderAngryCreeper;
import T145.elementalcreepers.client.render.entity.RenderBaseCreeper;
import ... |
fdosani/rubicon-ml | rubicon_ml/viz/dataframe_plot.py | <gh_stars>0
import dash_bootstrap_components as dbc
import plotly.express as px
from dash import dcc, html
from dash.dependencies import Input, Output
from rubicon_ml.viz.base import VizBase
from rubicon_ml.viz.common.colors import (
get_rubicon_colorscale,
light_blue,
plot_background_blue,
)
class Dataf... |
Xovis/azure-service-operator | pkg/secrets/kube/client_test.go | // Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
package kube
import (
"context"
"fmt"
"strconv"
"strings"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
v1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/types"
"github.com/Azure/azure-service-operator/pkg/secrets"
)
func ge... |
Haavasma/Harmoni | client/src/Containers/Event/Components/artist.js | //@flow
import * as React from 'react';
import { Component } from "react-simplified";
import Button from "react-bootstrap/Button";
import Card from "react-bootstrap/Card";
import {Artist} from "../../../services/ArtistService";
import Accordion from "react-bootstrap/Accordion";
import {Alert} from "../../../widgets";
... |
mhewson/rei-cedar | backstop_data/engine_scripts/onReady.js | <filename>backstop_data/engine_scripts/onReady.js
const hover = require('./hover');
const focus = require('./focus');
module.exports = (chromy, scenario, vp) => {
hover(chromy, scenario);
focus(chromy, scenario);
// add more ready handlers here...
};
|
HolmanA/CatChat | src/main/java/catchat/model/chat/BaseChatModel.java | package catchat.model.chat;
import catchat.data.source.entities.chat.Chat;
import catchat.data.source.entities.message.Message;
import catchat.data.source.ApiInvoker;
import catchat.data.source.groupme.BaseGroupMeApiCommand;
import catchat.data.source.groupme.LikeMessageApiCommand;
import catchat.data.source.groupme.U... |
nicksieger/advent-jruby | vendor/RMagick4J/test/eyetests/tests/gruff_area_1.rb | <filename>vendor/RMagick4J/test/eyetests/tests/gruff_area_1.rb
require 'rubygems'
require 'gruff'
require File.join(File.dirname(__FILE__), 'new_image.rb')
g = Gruff::Area.new
g.title = "Many Multi-Area Graph Test"
g.labels = {
0 => 'June',
10 => 'July',
30 => 'August',
50 => 'September',
}
g.data('many po... |
acrollet/content-build | src/site/stages/build/drupal/tests/fixtures/metalsmith-drupal.fixture.js | export const personProfileWithoutBio = {
data: {
nodeQuery: {
entities: [
{
entityBundle: 'person_profile',
entityUrl: { path: 'profile-sans-bio' },
},
],
},
},
};
export const personProfileWithBio = {
data: {
nodeQuery: {
entities: [
{
... |
chainsquad/python-graphenelib | graphenecommon/aio/block.py | <gh_stars>10-100
# -*- coding: utf-8 -*-
from .blockchainobject import BlockchainObject
from ..block import Block as SyncBlock, BlockHeader as SyncBlockHeader
from ..exceptions import BlockDoesNotExistsException
class Block(BlockchainObject, SyncBlock):
""" Read a single block from the chain
:param int b... |
zoho/zohocrm-python-sdk-2.0 | zcrmsdk/src/com/zoho/crm/api/bulk_write/__init__.py | from .request_wrapper import RequestWrapper
from .resource import Resource
from .bulk_write_operations import BulkWriteOperations, UploadFileHeader
from .result import Result
from .api_exception import APIException
from .action_response import ActionResponse
from .response_handler import ResponseHandler
from .file impo... |
Sergioamjr/my-website | src/components/Footer/Footer.js | /** @jsx jsx */
import { css, jsx } from "@emotion/core";
import PropTypes from "prop-types";
import { justifyContent, primaryFont } from "../../design";
const footerStyle = css`
background: var(--theme);
height: 60px;
display: flex;
margin-top: 40px;
align-items: center;
justify-content: center;
`;
const... |
guanzhongxing/craft-atom-rpc | craft-atom-protocol-http/src/main/java/io/craft/atom/protocol/http/model/HttpCookie.java | package io.craft.atom.protocol.http.model;
import static io.craft.atom.protocol.http.HttpConstants.S_EQUAL_SIGN;
import static io.craft.atom.protocol.http.HttpConstants.S_SEMICOLON;
import static io.craft.atom.protocol.http.HttpConstants.S_SP;
import io.craft.atom.protocol.http.HttpDates;
import java.io.Serializable... |
r-koubou/KSPSyntaxParser | src/java/net/rkoubou/kspparser/analyzer/data/reserved/ReservedSymbolManager.java | /* =========================================================================
ReservedSymbolManager.java
Copyright (c) R-Koubou
======================================================================== */
package net.rkoubou.kspparser.analyzer.data.reserved;
import java.io.File;
import java.io.IOException;... |
hir0pr0tagonist/tesb-rt-se | examples/cxf/jaxrs-oauth2/common/src/main/java/oauth2/common/ReservationConfirmation.java | <reponame>hir0pr0tagonist/tesb-rt-se
/**
* Copyright (C) 2011 Talend Inc. - www.talend.com
*/
package oauth2.common;
import javax.xml.bind.annotation.XmlRootElement;
@XmlRootElement
public class ReservationConfirmation {
private String address;
private int hour;
private boolean calendarUpdated;
pub... |
isandlaTech/cohorte-demos | demo-led/led-gateway/repo/web_viewer/viewer.py | <reponame>isandlaTech/cohorte-demos
#!/usr/bin/python
from pelix.ipopo.decorators import ComponentFactory, Provides, Requires, Property, \
BindField, UnbindField
import pelix.remote
import os
import json
import time
import uuid
import logging
_logger = logging.getLogger("viewer.viewer")
@ComponentFactor... |
jgzl/gw | common/common-core/src/main/java/com/github/jgzl/gw/common/core/spi/Join.java | <gh_stars>0
package com.github.jgzl.gw.common.core.spi;
import java.lang.annotation.*;
/**
* Join
* Adding this annotation to a class indicates joining the extension mechanism.
*
*/
@Documented
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
public @interface Join {
}
|
LemaMichael/BetterGoogleWifi | GoogleWifi Headers/GOOPanelPanGestureRecognizer.h | //
// Generated by class-dump 3.5 (64 bit) (Debug version compiled Sep 17 2017 16:24:48).
//
// class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2015 by <NAME>.
//
#import <UIKit/UIPanGestureRecognizer.h>
@interface GOOPanelPanGestureRecognizer : UIPanGestureRecognizer
{
_Bool _trackingPan;
_Boo... |
mercury199/Space-Gen-Modification | src/com/zarkonnen/spacegen/LostArtefact.java | <filename>src/com/zarkonnen/spacegen/LostArtefact.java
/**
Copyright 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 a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unles... |
sywh/algorithms | Fundamentals/UF.py | class UF:
def __init__(self, N: int):
self._count = N
self.id = [i for i in range(N)]
def union(self, p: int, q: int): # add connection between p and q
pID = self.find(p)
qID = self.find(q)
if pID == qID:
return
for i in range(len(self.id))... |
edwardmfasano/php-sf-flex-webpack-encore-vuejs | assets/js/lib/reviver/library/index.js | <filename>assets/js/lib/reviver/library/index.js
import {EditorReviver} from "./editorReviver";
import {AuthorReviver} from "./authorReviver";
import {JobReviver} from "./jobReviver";
import {SerieReviver} from "./serieReviver";
import {EditorsReviver} from "./editorsReviver";
import {AuthorsReviver} from "./authorsRev... |
ondrejsika/sedastrela-is | sedastrela_is/event/urls.py | <filename>sedastrela_is/event/urls.py
from django.conf.urls import include, url
from sedastrela_is.event.views import attending_done_view, attending_view
urlpatterns = [
url(r'^admin/', include('sedastrela_is.event.admin_urls', namespace='admin')),
url(r'^attending/(?P<person_token>\w+)/(?P<event_id>\d+)/(?P<... |
wenze1367/snort-2.9.15-read-annotation | snort-2.9.15.1/src/detection_util.h | /*
** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved.
** Copyright (C) 2002-2013 Sourcefire, Inc.
** Copyright (C) 1998-2002 <NAME> <<EMAIL>>
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License Version 2 as
*... |
sgomezsaez/SCARF-SimilarityEngine | SimilarityEngine/src/com/model/PerformanceMetricDescriptor.java | <reponame>sgomezsaez/SCARF-SimilarityEngine<filename>SimilarityEngine/src/com/model/PerformanceMetricDescriptor.java
package com.model;
import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.pers... |
gb-archive/asmotor | xasm/6502/main.c | <reponame>gb-archive/asmotor
/* Copyright 2008-2017 <NAME>
This file is part of ASMotor.
ASMotor is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(a... |
yizhang-cae/torsten | cmdstan/stan/src/test/unit/lang/parser/torsten_functions_test.cpp | <reponame>yizhang-cae/torsten
#include <gtest/gtest.h>
#include <test/unit/lang/utility.hpp>
TEST(lang_parser, PKModelOneCpt_function_signatures) {
test_parsable("function-signatures/math/torsten/PKModelOneCpt");
}
TEST(lang_parser, PKModelTwoCpt_function_signatures) {
test_parsable("function-signatures/math/t... |
ovidiu-mura/LongestIncreasingSequences | src/main/java/ArrangingCoins/Solution.java | <reponame>ovidiu-mura/LongestIncreasingSequences
package ArrangingCoins;
public class Solution {
public int arrangeCoins(int n) {
if(n == 0)
return 0;
else if(n == 1)
return 1;
else if(n == 2)
return 1;
int i=1;
long coins = 0;
wh... |
igagrock/imzbackendRest | backendapi/src/main/java/com/wemater/controller/StartExecutorforArticles.java | package com.wemater.controller;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import org.apache.log4j.Logger;
import org.hibernate.HibernateException;
import com.wemater.dao.UserDao;
import com.wemater.dto.User;
import com.wemater.util.HibernateUtil;
import com.wemater.util.SessionUti... |
liuzix/sgx-elps | musl/src/unistd/dup.c | #include <unistd.h>
#include "syscall.h"
int dup(int fd)
{
return __async_syscall(SYS_dup, fd);
}
|
isstac/spf-sca | src/main/sidechannel/cost/approximate/MultipleRunCost.java | package sidechannel.cost.approximate;
import java.util.ArrayList;
import gov.nasa.jpf.vm.ChoiceGenerator;
import gov.nasa.jpf.vm.SystemState;
import sidechannel.choice.CostChoiceGenerator;
import sidechannel.cost.approximate.monitor.MultiRunPathMonitor;
/**
*
* @author <NAME> <<EMAIL>>
*
*/
public class MultipleRunC... |
dataplumber/dmas | inventory/src/main/java/gov/nasa/podaac/inventory/api/GranuleMetadataFactory.java | /**
*
*/
package gov.nasa.podaac.inventory.api;
import gov.nasa.podaac.inventory.core.GranuleMetadataImpl;
/**
* @author clwong
* $Id: GranuleMetadataFactory.java 249 2007-10-02 22:59:41Z clwong $
*/
public class GranuleMetadataFactory {
private static GranuleMetadataFactory granuleMetadataFactory = new Gra... |
qhl0505/dmd | dmd-mall/src/main/java/com/dmd/mall/config/SecurityConfig.java | <gh_stars>1-10
package com.dmd.mall.config;
//import com.dmd.mall.model.UmsMember;
//import com.dmd.mall.model.domain.MemberDetails;
//import com.dmd.mall.service.UmsMemberService;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.context.annotation.Bean;
//import org.spring... |
best08618/asylo | gcc-gcc-7_3_0-release/gcc/testsuite/gcc.dg/tree-ssa/20030920-1.c | <gh_stars>1-10
/* Jump threading was creating FALLTHRU edges out of blocks ending in
GOTO_EXPR. */
extern int frame_pointer_needed;
struct value_data_entry
{
unsigned int mode;
unsigned int oldest_regno;
unsigned int next_regno;
};
struct value_data
{
struct value_data_entry e[53];
unsigned int max_val... |
bzxy/cydia | iOSOpenDev/frameworks/AXRuntime.framework/Headers/AXRuntime-Structs.h | <gh_stars>100-1000
/**
* This header is generated by class-dump-z 0.2b.
*
* Source: /System/Library/PrivateFrameworks/AXRuntime.framework/AXRuntime
*/
|
Marcusz97/CILP_Facilitatore_Audacity | lib-src/libflac/src/flac/utils.c | <reponame>Marcusz97/CILP_Facilitatore_Audacity
/* flac - Command-line FLAC encoder/decoder
* Copyright (C) 2002-2009 <NAME>
* Copyright (C) 2011-2013 Xiph.Org Foundation
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published... |
x-sheep/puzzles | PuzzleModern/ParamsFlyout.xaml.h | <filename>PuzzleModern/ParamsFlyout.xaml.h
//
// ParamsFlyout.xaml.h
// Declaration of the ParamsFlyout class
//
#pragma once
#include "ParamsFlyout.g.h"
using namespace PuzzleCommon;
namespace PuzzleModern
{
public delegate void NewConfigurationEventHandler(ParamsFlyout ^sender, Windows::Foundation::Collections:... |
SimonCasteran/JobBoard | front/src/Admin/admin.js | import React, { useState } from 'react';
import NoCRUD from './noCRUD'
import UserCRUD from './userCRUD'
import AdCRUD from './adCRUD'
import CompanyCRUD from './companyCRUD'
import ApplicationCRUD from './applicationCRUD'
const Admin = () => {
const [page, setPage] = useState(0);
const components = [
... |
gitter-badger/torch | torch-core/src/test/java/org/brightify/torch/util/SerializerTest.java | package org.brightify.torch.util;
import org.brightify.torch.test.TestObject;
import org.junit.Test;
import java.util.ArrayList;
import static org.junit.Assert.assertArrayEquals;
import static org.junit.Assert.assertEquals;
/**
* @author <a href="mailto:<EMAIL>"><NAME></a>
*/
public class SerializerTest {
@T... |
IcelyFramework/icely-metamodels | plugins/com.github.icelyframework.metamodels/src/com/github/icelyframework/dynamicview/impl/ResourceImpl.java | <reponame>IcelyFramework/icely-metamodels
/**
*/
package com.github.icelyframework.dynamicview.impl;
import com.github.icelyframework.dynamicview.Aggregate;
import com.github.icelyframework.dynamicview.Create;
import com.github.icelyframework.dynamicview.Delete;
import com.github.icelyframework.dynamicview.Dynamicvie... |
ScalablyTyped/SlinkyTyped | q/qlik/src/main/scala/typingsSlinky/qlik/mod/QTable.scala | package typingsSlinky.qlik.mod
import org.scalablytyped.runtime.StObject
import scala.scalajs.js
import scala.scalajs.js.`|`
import scala.scalajs.js.annotation.{JSGlobalScope, JSGlobal, JSImport, JSName, JSBracketAccess}
@js.native
trait QTable extends StObject {
var colCount: Double = js.native
def exportD... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.