repo_name stringlengths 6 101 | path stringlengths 4 300 | text stringlengths 7 1.31M |
|---|---|---|
tomorrow-rain/pjsip | pjsip/pjsip/src/pjsua-lib/pjsua_im.c | <gh_stars>0
/* $Id$ */
/*
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
* Copyright (C) 2003-2008 <NAME> <<EMAIL>>
*
* 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; either v... |
danielfireman-ifal/coletores | mpsp/src/active_members_parser.py | import pandas as pd
import math
import parser
# Due to the different format of the spreadsheets, a specific parser is required for a few months
# Contains the parsers for monthly remuneration worksheets for active members:
# parse_jan_19: January 2019
# parse_feb_to_may_19: February to May 2019
# parse_jun_19: June 20... |
Manu343726/boost-cmake | libs/asio/include/boost/asio/local/connect_pair.hpp | //
// local/connect_pair.hpp
// ~~~~~~~~~~~~~~~~~~~~~~
//
// Copyright (c) 2003-2017 <NAME> (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//
#ifndef BOOST_ASIO_LOCAL_CONNECT_PAIR_HP... |
hmrc/individual-income-des-stub | app/uk/gov/hmrc/individualincomedesstub/controller/SelfAssessmentIncomeController.scala | <filename>app/uk/gov/hmrc/individualincomedesstub/controller/SelfAssessmentIncomeController.scala<gh_stars>0
/*
* Copyright 2020 HM Revenue & Customs
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the... |
TecArt/servicecatalog-development | j2ep/javasrc/net/sf/j2ep/UrlRewritingResponseWrapper.java | /*
* Copyright 2000,2004 The Apache Software 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
*
* Unless required by... |
leonchen83/redis-replicator | src/test/java/com/moilioncircle/redis/replicator/rdb/RdbV8ParserTest.java | /*
* Copyright 2016-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 applicable law or agreed to ... |
afentev/Algorithms-and-Data-structures | Algorithms on graphs/LCA and LA/LD + BL.cpp | #include <iostream>
#include <vector>
#include <queue>
#include <cmath>
using namespace std;
class TreeAncestor {
public:
TreeAncestor(int n, vector<int>& p) {
this->n = n;
parents = p;
children.resize(n, vector<int>());
for (int i = 1; i < n; ++i) {
children[p[i]].push_back(i);
}
... |
ncats/gsrs-play | modules/ginas/test/protractor/ParameterFormTest.js | <reponame>ncats/gsrs-play
var WizardParameterPage = function () {
this.getPage = function () {
browser.get('/ginas/app/wizard?kind=structurallyDiverse');
};
this.clickById = function (name) {
element(by.id(name)).click();
};
this.clickByModel = function (name) {
element(by... |
eid101/InjazErp | modules/org.openbravo.client.application/web/org.openbravo.userinterface.smartclient/openbravo/skins/Default/org.openbravo.client.application/ob-grid-styles.js | <reponame>eid101/InjazErp
/*
*************************************************************************
* The contents of this file are subject to the Openbravo Public License
* Version 1.1 (the "License"), being the Mozilla Public License
* Version 1.1 with a permitted attribution clause; you may not ... |
xunyss/commons | commons-base/src/main/java/io/xunyss/commons/lang/ArrayUtils.java | <reponame>xunyss/commons
package io.xunyss.commons.lang;
import java.lang.reflect.Array;
/**
* Array utilities.
*
* @author XUNYSS
*/
public final class ArrayUtils {
/**
* An empty immutable {@code Object} array.
*/
public static final Object[] EMPTY_OBJECT_ARRAY = new Object[0];
/**
... |
ScalablyTyped/SlinkyTyped | g/grumbler-scripts/src/main/scala/typingsSlinky/grumblerScripts/configMod.scala | package typingsSlinky.grumblerScripts
import typingsSlinky.grumblerScripts.anon.Version
import typingsSlinky.grumblerScripts.typesMod.WebpackConfigOptions
import org.scalablytyped.runtime.StObject
import scala.scalajs.js
import scala.scalajs.js.`|`
import scala.scalajs.js.annotation.{JSGlobalScope, JSGlobal, JSImport,... |
martinogden/24hdujeu | client/tests/reducers/selectors.js | <reponame>martinogden/24hdujeu
import assert from 'assert';
import deepFreeze from 'deep-freeze';
import { getOwnedGameIDs, getKnownGameIDs } from 'reducers';
import { getGames } from 'reducers/games';
describe('selectors::getGames', () => {
it('should compose array of games using keys from gameList and gamesByID ... |
SKatiyar/cri | tethering/commands.go | /*
* CODE GENERATED AUTOMATICALLY WITH github.com/SKatiyar/cri/cmd/cri-gen
* THIS FILE SHOULD NOT BE EDITED BY HAND
*/
// Package tethering provides commands and events for Tethering domain.
package tethering
import (
"github.com/SKatiyar/cri"
)
// List of commands in Tethering domain
const (
Bind = "Tethering.... |
pdpdds/SDLGameProgramming | sdl2/3Guys/src/entities/firePitTrap.c | <reponame>pdpdds/SDLGameProgramming<gh_stars>0
/*
Copyright (C) 2018 Parallel Realities
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; either version 2
of the License, or (at your option) any later ... |
TheCodeLabsDevs/jlibs | libJfx/src/main/java/de/thecodelabs/utils/ui/cell/TemplateListCellFactory.java | <filename>libJfx/src/main/java/de/thecodelabs/utils/ui/cell/TemplateListCellFactory.java
package de.thecodelabs.utils.ui.cell;
import de.thecodelabs.utils.ui.DetailItem;
import javafx.scene.control.ListCell;
import javafx.scene.control.ListView;
import javafx.util.Callback;
import java.lang.reflect.InvocationTargetEx... |
JingMeng/Mart-Android | app/src/main/java/net/coding/mart/json/v2/phase/Phases.java | <filename>app/src/main/java/net/coding/mart/json/v2/phase/Phases.java
package net.coding.mart.json.v2.phase;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
import net.coding.mart.json.BaseHttpResult;
import java.io.Serializable;
import java.util.List;
public class Phas... |
mikiec84/bml | docs/API/search/enumvalues_5.js | <filename>docs/API/search/enumvalues_5.js
var searchData=
[
['precision_5funinitialized',['precision_uninitialized',['../bml__types_8h.html#a8d762ed64876f48d5eb687cb62f20d5caf4da658d031a1d1fb8303df656517607',1,'bml_types.h']]]
];
|
rialang/ria | src/main/java/ria/lang/compiler/RiaParser.java | package ria.lang.compiler;
import ria.lang.Core;
import ria.lang.compiler.nodes.BinOp;
import ria.lang.compiler.nodes.Bind;
import ria.lang.compiler.nodes.Eof;
import ria.lang.compiler.nodes.InstanceOf;
import ria.lang.compiler.nodes.IsOp;
import ria.lang.compiler.nodes.Node;
import ria.lang.compiler.nodes.NumLit;
imp... |
ornicar/lichobile | project/src/js/ui/analyse/view/treeView.js | <gh_stars>1-10
import * as m from 'mithril';
import * as helper from '../../helper';
import treePath from '../path';
import { empty, defined, renderEval, isSynthetic } from '../util';
export function renderTree(ctrl, tree) {
const turns = [];
const initPly = ctrl.analyse.firstPly();
if (initPly % 2 === 0) {
... |
JailMango/learning-java | java-netty/src/main/java/com/jailmango/netty/lightman/netty/chat/counter/ClientCounter.java | package com.jailmango.netty.lightman.netty.chat.counter;
import java.util.concurrent.atomic.AtomicLong;
/**
* ClientCounter
*/
public enum ClientCounter {
/**
* INSTANCE
*/
INSTANCE;
/**
* list
*/
private AtomicLong count;
/**
* Constructor
*/
ClientCounter()... |
duguyifang/btcpool | test/TestMain.cc | /*
The MIT License (MIT)
Copyright (c) [2016] [BTC.COM]
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, me... |
bhrunno/fs-agent | test_input/ksa/ksa-web-root/ksa-logistics-web/src/main/java/com/ksa/web/struts2/action/logistics/bookingnote/BookingNoteSaveAction.java | package com.ksa.web.struts2.action.logistics.bookingnote;
import com.ksa.context.ServiceContextUtils;
import com.ksa.model.logistics.BookingNoteState;
import com.ksa.service.logistics.BookingNoteService;
import com.ksa.service.security.util.SecurityUtils;
import com.ksa.util.StringUtils;
public class BookingNoteSave... |
ProKil/ShapeWorld | shapeworld/captioners/number_bound.py | from random import choice, random
from shapeworld import util
from shapeworld.captions import NumberBound
from shapeworld.captioners import WorldCaptioner
class NumberBoundCaptioner(WorldCaptioner):
# incorrect modes
# 0: incorrect quantifier
# 1: number off by one
# 2: number off by two
# 3: ran... |
anubhavsrivastava/leetcodeJS | Easy/520 Detect Capital/detectCapital.js | <reponame>anubhavsrivastava/leetcodeJS<gh_stars>10-100
/**
* @param {string} word
* @return {boolean}
*/
var detectCapitalUse = function(word) {
if (word.toUpperCase() === word) return true;
if (word.toLowerCase() === word) return true;
if (word[0].toUpperCase() + word.substr(1).toLowerCase() === word) return tru... |
cheststore/chest.store | gulpfile.js | const gulp = require('gulp')
const babel = require('gulp-babel')
const nodemon = require('gulp-nodemon')
const plumber = require('gulp-plumber')
const sourcemaps = require('gulp-sourcemaps')
const ts = require('gulp-typescript')
const tsProject = ts.createProject('tsconfig.json')
gulp.task('src', function () {
retu... |
RobotLocomotion/drake-python3.7 | systems/framework/test/diagram_builder_test.cc | #include "drake/systems/framework/diagram_builder.h"
#include <regex>
#include <Eigen/Dense>
#include <gtest/gtest.h>
#include "drake/common/test_utilities/expect_no_throw.h"
#include "drake/common/test_utilities/expect_throws_message.h"
#include "drake/common/trajectories/exponential_plus_piecewise_polynomial.h"
#i... |
omgitsgod/paws-for-pals-front | src/Components/FavoriteContainer.js | import React, { useState, useEffect, useMemo } from 'react';
import { Grid } from '@material-ui/core';
import { makeStyles } from '@material-ui/core/styles';
import FavoriteCard from './FavoriteCard';
import { backHost } from '../config';
const useStyles = makeStyles({
organize: {
width: '100vw',
height: '80... |
PasseRR/JavaLeetCode | src/main/java/com/gitee/passerr/leetcode/problem/lcci/page1/Lcci0302.java | package com.gitee.passerr.leetcode.problem.lcci.page1;
/**
* 请设计一个栈,除了常规栈支持的pop与push函数以外,还支持min函数,该函数返回栈元素中的最小值。执行push、pop和min操作的时间复杂度必须为O(1)。
* <p>
* 示例:
* MinStack minStack = new MinStack();
* minStack.push(-2);
* minStack.push(0);
* minStack.push(-3);
* minStack.getMin(); --> 返回 -3.
* minStack.pop();
* ... |
lalit-satapathy/beats | x-pack/libbeat/processors/add_nomad_metadata/nomad.go | // Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
// or more contributor license agreements. Licensed under the Elastic License;
// you may not use this file except in compliance with the Elastic License.
package add_nomad_metadata
import (
"fmt"
"time"
"github.com/elastic/beats/v7/l... |
kss39/BridgeServer2 | src/test/java/org/sagebionetworks/bridge/models/assessments/HibernateAssessmentTest.java | package org.sagebionetworks.bridge.models.assessments;
import static org.sagebionetworks.bridge.TestConstants.CREATED_ON;
import static org.sagebionetworks.bridge.TestConstants.CUSTOMIZATION_FIELDS;
import static org.sagebionetworks.bridge.TestConstants.GUID;
import static org.sagebionetworks.bridge.TestConstants.IDEN... |
IngenuityEngine/ftrack-connect-foundry | source/assetmgr_hiero/ui/BuildAssetTrackDialog.py | <gh_stars>1-10
from QtExt import QtGui, QtWidgets, QtCore
import FnAssetAPI
from FnAssetAPI import specifications
from .. import utils as cmdUtils
from FnAssetAPI.ui.constants import kWorkflowRelationshipWidgetId
## @todo Unify how the dialogs work - some use explicit accessors, some use
## options dicts
class Bui... |
lctseng/tamashi-agent | lib/tamashii/agent/common.rb | <reponame>lctseng/tamashi-agent<gh_stars>1-10
require 'tamashii/agent/common/loggable'
module Tamashii
module Agent
module Common
def self.load_device_class(device_class_name)
full_class_name = 'Tamashii::Agent::Device::' + device_class_name
load_class(full_class_name)
end
de... |
maciejg-git/vue-bootstrap-icons | dist-mdi/mdi/file-cancel-outline.js | import { h } from 'vue'
export default {
name: "FileCancelOutline",
vendor: "Mdi",
type: "",
tags: ["file","cancel","outline"],
render() {
return h(
"svg",
{"xmlns":"http://www.w3.org/2000/svg","width":"24","height":"24","viewBox":"0 0 24 24","class":"v-icon","fill":"currentColor","data-name":... |
npocmaka/Windows-Server-2003 | ds/security/services/w32time/w32tclnt/w32tclnt.cpp | <reponame>npocmaka/Windows-Server-2003
//--------------------------------------------------------------------
// W32TClnt - implementation
// Copyright (C) Microsoft Corporation, 2000
//
// Created by: <NAME> (louisth), 2-10-00
//
// client side wrappers for w32time RPC calls
//
#include <windows.h>
#include... |
NicholsTyler/cse_335 | City/City/City/TileRocketPad.h | /**
* \file TileRocketPad.h
*
* \author
*
* Class that implements a rocket pad.
*/
#pragma once
#include "Tile.h"
class CRocket;
/**
* Class that implements a rocket pad.
*
* This is where rockets take off and land.
*/
class CTileRocketPad : public CTile
{
public:
CTileRocketPad(CCity* city);
//... |
Jan-zou/LeetCode | python/k-Sum/167_two_sum_ii-input_array_is_sorted.py | <reponame>Jan-zou/LeetCode<filename>python/k-Sum/167_two_sum_ii-input_array_is_sorted.py
# !/usr/bin/env python
# coding: utf-8
'''
Description:
Similar to Question [1. Two Sum], except that the input array is already sorted in ascending order.
Tags: Array, Hash Table
'''
class Solution:
# binary search; O(n... |
d-william/pullupgen | tests/testPullUpGen/test26/test/B.java | package testPullUpGen.test26.test;
public class B extends S implements I {
@Override
public int m(String i){
return 1;
}
}
|
shaojiankui/iOS10-Runtime-Headers | PrivateFrameworks/iWorkImport.framework/TSTSortRuleReferenceTracker.h | /* Generated by RuntimeBrowser
Image: /System/Library/PrivateFrameworks/iWorkImport.framework/iWorkImport
*/
@interface TSTSortRuleReferenceTracker : NSObject <TSCEReferenceTrackerDelegate> {
TSCEReferenceTracker * mReferenceTracker;
NSMutableSet * mReferences;
TSTTableInfo * mTableInfo;
}
@property (... |
WN1AP/ITE368 | Line/test/line/LineTestSlope.java | <gh_stars>0
package line;
import static org.junit.Assert.*;
import java.util.Arrays;
import java.util.Collection;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
import org.junit.runners.Parameterized.Parameters;
@RunWith(Parameterized.class)
public class LineTestSlo... |
TwilightZebby/ActionsBot | slashCommands/grinch.js | const Discord = require('discord.js');
const { client } = require('../constants.js');
const UtilityModule = require('../modules/utilityModule.js');
// REGEXS
const authorRegEx = new RegExp(/{author}/g);
const everyoneMentionRegex = new RegExp(/@(everyone|here)/g);
const roleRegEx = new RegExp(/{role}/g);
const receive... |
soloway2010/octoshell-v2 | engines/jobstat/test/controllers/jobstat/float_data_controller_test.rb | <reponame>soloway2010/octoshell-v2
require 'test_helper'
module Jobstat
class FloatDataControllerTest < ActionController::TestCase
setup do
@float_datum = jobstat_float_data(:one)
@routes = Engine.routes
end
test "should get index" do
get :index
assert_response :success
ass... |
sjohnson-sage/carbon | src/components/heading/heading.stories.js | import React from "react";
import { text, boolean } from "@storybook/addon-knobs";
import Heading from "./heading.component";
import Pill from "../pill";
export default {
title: "Heading/Test",
component: Heading,
parameters: {
info: {
disable: true,
},
knobs: { escapeHTML: false },
chromat... |
hunterluepke/Learn-Python-for-Stats-and-Econ | In Class Projects/In Class Examples Spring 2019/Workshop/quantile.py | <reponame>hunterluepke/Learn-Python-for-Stats-and-Econ<gh_stars>10-100
#quantile.py
import pandas as pd
import numpy as np
def create_quantile(n, data, year, quantile_var, quantile_name):
# index that identifies countries for a given year
year_index = data.index.get_level_values("Year") == year
quantile_v... |
TommasoBruni/cry | src/mpi/mpi_sub_abs.c | #include "mpi_pvt.h"
int cry_mpi_sub_abs(cry_mpi *r, const cry_mpi *a, const cry_mpi *b)
{
size_t min, max, i;
cry_mpi_digit c, t1, t2, *rp, *ap, *bp;
if (cry_mpi_cmp_abs(a, b) < 0)
return -1; /* negative results are not allowed */
max = a->used;
min = b->used;
if (r->alloc < max) {
... |
uguraba/SI | si-onem2m-src/IITP_IoT_2_7/src/main/java/net/herit/iot/onem2m/resource/FlexContainerResource.java | <gh_stars>10-100
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 20... |
dcantrell/notcurses | src/tetris/score.h | void UpdateScore(){
if(scoreplane_->printf(1, 0, "level: %02d score: %ju", level_, static_cast<uintmax_t>(score_)) < 0){
throw TetrisNotcursesErr("printf()");
}
}
|
ScalablyTyped/SlinkyTyped | i/input-moment/src/main/scala/typingsSlinky/inputMoment/components/InputMoment.scala | package typingsSlinky.inputMoment.components
import slinky.web.html.`*`.tag
import typingsSlinky.StBuildingComponent
import typingsSlinky.inputMoment.mod.InputMomentProps
import typingsSlinky.inputMoment.mod.default
import typingsSlinky.moment.mod.Moment
import org.scalablytyped.runtime.StObject
import scala.scalajs.j... |
Samuel-Melo890/Python-Desafios | ExerciciosPYTHON/PythonCeV/102.py | <gh_stars>0
print('='*8,'Função para Fatorial','='*8)
def fatorial(n, show=False):
"""Calcula o fatorial de um número.
Args:
n (int): O número a ter seu fatorial calculado.
show (bool, optional): Mostrar ou nao a conta. Defaults to False.
Returns:
O valor do fatorial de um número n... |
Vectro-Type-Foundry/robofab | Docs/Examples/howtos/understandingContours_02.py | <gh_stars>10-100
# get straight to the points in a contour
# through the points attribute
g = CurrentGlyph()
for aPt in g[0].points:
print aPt
|
imsdu/nexus | rdf/src/main/scala/ch/epfl/bluebrain/nexus/rdf/jena/JenaConverters.scala | <gh_stars>1-10
package ch.epfl.bluebrain.nexus.rdf.jena
/**
* Conversions rdf and Jena data types.
*/
object JenaConverters extends FromJenaConverters with ToJenaConverters
|
Jhon354202/CEBIM | app/src/main/java/com/chenxi/cebim/entity/ModelEntity.java | <filename>app/src/main/java/com/chenxi/cebim/entity/ModelEntity.java<gh_stars>0
package com.chenxi.cebim.entity;
import java.io.Serializable;
public class ModelEntity implements Serializable{
private int ModelID,ProjectID,FileSize,OrderNo;
private String ModelName,DBName,OnlySign,AddTime,UpdateTime,ModelFile... |
lishulong16/mokitou | mokitou/dao/orm/__init__.py | # -*- coding: utf-8 -*-
"""
@contact: <EMAIL>
@time: 2018/3/28 下午2:12
""" |
jimjag/openoffice | main/framework/source/helper/oframes.cxx | /**************************************************************
*
* 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 y... |
nshcat/gl_app | src/capi/debug.cxx | #include <capi/debug.h>
#include <random>
#include <global_state.hxx>
#include <weighted_distribution.hxx>
#include <shapes.hxx>
#include <actions.hxx>
extern "C"
{
void debug_create_test_scene()
{
auto t_palette = global_state<asset_manager>().load_asset<palette>("c64");
std::random_device rd;
std::mt19937 ... |
weibingbing5101/react-native-svf | src/containers/User/index.js | import User from './Default';
import SecurityCenter from './SecurityCenter';
export {User, SecurityCenter}
export default {User, SecurityCenter} |
Microgamer/sykus3 | server/lib/jobs/printers/read_drivers_job.rb | require 'common'
module Sykus; module Printers
# Reads available printer drivers and stores them for fast access.
class ReadDriversJob
extend Resque::Plugins::Lock
@queue = :slow
# Runs the job.
def self.perform
result = `sudo lpinfo -m`.strip
drivers = []
result.split("\n").ea... |
camallen/Panoptes | db/migrate/20160613074633_foreign_keys_project_contents.rb | class ForeignKeysProjectContents < ActiveRecord::Migration
def change
ProjectContent.joins("LEFT OUTER JOIN projects ON projects.id = project_contents.project_id").where("project_contents.project_id IS NOT NULL AND projects.id IS NULL").delete_all
add_foreign_key :project_contents, :projects, on_update: :casc... |
ColFusion/PentahoKettle | kettle-data-integration/plugins/spoon/agile-bi/platform/webapps/pentaho/adhoc/js/common/ui/messages/nls/message_strings.js | <reponame>ColFusion/PentahoKettle
{
// this file must be UTF-8 encoded!!
CTOR_CALL_UNNEEDED: "WebServiceProxy: ctor call is unneeded.",
sessionExpiredMsg:"Your session has expired. You must log in again.",
invalidWebServiceCallback:"Invalid state in WebServiceProxy.executeFunk, unrecognized callback function.",
in... |
vaginessa/OpenHub | app/src/main/java/com/thirtydegreesray/openhub/ui/fragment/base/ListFragment.java | <gh_stars>0
/*
* Copyright 2017 ThirtyDegreesRay
*
* 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 requi... |
arievanwi/osgi.ee | osgi.ee.extender.jpa/src/osgi/extender/jpa/emf/BaseSynchronization.java | <gh_stars>1-10
/*
* Copyright 2015, Imtech Traffic & Infra
* Copyright 2015, aVineas IT Consulting
*
* 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... |
VPBelo/EODB_TEST_SCRIPT | node_modules/ggit/src/commit.js | var la = require('lazy-ass');
var exec = require('./exec');
var quote = require('quote');
var check = require('check-more-types');
function commit(msg, longMessage) {
la(check.unemptyString(msg), 'missing commit message', arguments);
la(check.maybe.unemptyString(longMessage), 'missing long commit message', argumen... |
CatchRelease/stenographer | app/models/stenographer/link.rb | <filename>app/models/stenographer/link.rb
# frozen_string_literal: true
module Stenographer
class Link < ApplicationRecord
validates :url, presence: true
end
end
|
maxandersen/javaee7-samples | jsf/composite-component/src/main/java/org/javaee7/jsf/composite/component/UserService.java | package org.javaee7.jsf.composite.component;
import java.io.Serializable;
import javax.enterprise.context.SessionScoped;
import javax.inject.Inject;
import javax.inject.Named;
/**
* @author <NAME>
*/
@Named
@SessionScoped
public class UserService implements Serializable {
@Inject User user;
public void... |
GWBasic/z3 | dbConnector.js | const { Client, Pool } = require('pg');
const format = require('pg-format');
const connectionString = process.env.DATABASE_URL;
const disableSSL = process.env.DISABLE_SSL != null
var pool = null;
var clients = [];
const connectionArguments = {
connectionString: connectionString
}
if (!disableSSL) {
connecti... |
Dbevan/SunderingShadows | d/tharis/Tharis/warehouse1.c | <reponame>Dbevan/SunderingShadows<filename>d/tharis/Tharis/warehouse1.c
#include <std.h>;
inherit "/std/room";
void create() {
::create();
set_terrain(STONE_BUILDING);
set_travel(PAVED_ROAD);
set_property("indoors", 1);
set_property("light", 3);
set_short("An Old Abandoned Warehouse");
set_long(
"%... |
lechium/iOS1351Headers | System/Library/PrivateFrameworks/WorkflowUI.framework/WFWorkflowPickerViewController.h | <reponame>lechium/iOS1351Headers
/*
* This header is generated by classdump-dyld 1.5
* on Wednesday, October 27, 2021 at 3:18:17 PM Mountain Standard Time
* Operating System: Version 13.5.1 (Build 17F80)
* Image Source: /System/... |
ayfie/metis | src/test/java/net/adeptropolis/frogspawn/graphs/algorithms/power_iteration/RandomInitialVectorsSourceTest.java | /*
* Copyright <NAME> 2019.
* SPDX-License-Identifier: Apache-2.0
*/
package net.adeptropolis.frogspawn.graphs.algorithms.power_iteration;
import net.adeptropolis.frogspawn.helpers.Vectors;
import org.hamcrest.Matchers;
import org.junit.Test;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.... |
dolchi21/open-prices-web | public/src/enhancers/checkpoint.js | import storage from 'store';
var defaultOptions = {
key : 'redux'
}
function Checkpoint(options = defaultOptions){
return function checkpoint(store){
return function(next){
return function(action){
storage.set(options.key, store.getState());
return next(action);
}
}
}
}
export defaul... |
BlueRidgeLabs/patterns | spec/factories/mailchimp_updates.rb | <reponame>BlueRidgeLabs/patterns
# frozen_string_literal: true
# == Schema Information
#
# Table name: mailchimp_updates
#
# id :integer not null, primary key
# email :string(191)
# fired_at :datetime
# raw_content :text(65535)
# reason :string(191)
# update_type :string(191)
# c... |
codehaus/senro | senro-core/src/main/java/org/senro/metadata/provider/senro/SenroMetadataReference.java | <gh_stars>0
package org.senro.metadata.provider.senro;
/**
* @author <NAME> <<EMAIL>>
*/
public interface SenroMetadataReference {
}
|
appcelerator-forks/k0sukey.ti-slag | lib/titanium/4.1.0.GA/Modules/Nfc/NdefRecordSmartPoster.js | <filename>lib/titanium/4.1.0.GA/Modules/Nfc/NdefRecordSmartPoster.js
var crypto = require('crypto');
function NdefRecordSmartPoster(__SLAG_PROPERTIES) {
__SLAG_PROPERTIES = __SLAG_PROPERTIES || {};
var __SLAG_DEVICE = JSON.parse(process.env.SLAG_DEVICE);
var __SLAG_CHECKS = [], __SLAG_NAMES = [
'apiName',
'lif... |
filewalkwithme/vulnerability-db-api | cmd/vulnerability-db-api-cli/gen/labels/views/view.go | // Code generated by goa v3.5.2, DO NOT EDIT.
//
// labels views
//
// Command:
// $ goa gen
// github.com/adevinta/vulnerability-db-api/cmd/vulnerability-db-api-cli/design
package views
import (
goa "goa.design/goa/v3/pkg"
)
// Labels is the viewed result type that is projected based on a view.
type Labels struct ... |
meshell/cucumber-cpp | features/support/RpnCalculator.cpp | <reponame>meshell/cucumber-cpp
#include <boost/lexical_cast.hpp>
#include <boost/math/constants/constants.hpp>
#include <vector>
using namespace std;
class RpnCalculator {
private:
vector<double> stack;
public:
void push(string arg) {
if (arg == "+") {
push(pop() + pop());
} else ... |
M-garrigan/threact.com | src/components/Examples/Force/Force.js | <reponame>M-garrigan/threact.com
import React, { Component, Fragment } from 'react';
import {
forceSimulation,
forceManyBody,
forceCenter,
forceCollide,
forceRadial } from 'd3-force';
import { select } from 'd3-selection';
import {range, map} from 'd3-array';
import TitleBanner from '../titleBanner/TitleB... |
curoli/woodard | cromiam/src/test/scala/woodard/http/auth/CromiamEngineVersionTest.scala | package woodard.http.auth
import org.scalatest.FunSuite
import woodard.http.HttpRequests
import woodard.model.EngineVersionRequest
class CromiamEngineVersionTest extends FunSuite {
test("get version") {
val request = EngineVersionRequest()
val serverApi = CromiamTestUtils.getServerApi(HttpRequests.caasProd... |
pecolynx/cosmo | cosmo-webapp/src/main/java/com/unitedinternet/calendar/CalendarDemoApplication.java | package com.unitedinternet.calendar;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.SpringBootConfiguration;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.au... |
ltp217/servicecomb-java-chassis | foundations/foundation-vertx/src/main/java/org/apache/servicecomb/foundation/vertx/stream/BufferOutputStream.java | <reponame>ltp217/servicecomb-java-chassis
/*
* 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... |
yahoo/cubed | src/main/java/com/yahoo/cubed/model/filter/PipelineLogicalRule.java | <reponame>yahoo/cubed
/*
* Copyright <NAME>, Licensed under the terms of the Apache License, Version 2.0. See LICENSE file in project root for terms.
*/
package com.yahoo.cubed.model.filter;
import java.util.ArrayList;
import java.util.List;
import lombok.Getter;
import lombok.Setter;
/**
* Stores list of filters... |
efedo/Sirelphy | source/core/physics/universe/generators.h | <gh_stars>0
// Copyright 2018-19 <NAME>
#pragma once
#include "Sirelphy/source/core/precomp.h"
#include "Sirelphy/source/core/physics/universe/universe.h"
struct UniverseGenerator {
static cUniverse* createStandardModelAtomic();
static cUniverse* createStandardModelFull();
static cUniverse* createTernaryPhotonSyst... |
phillipahereza/mattermost-server | vendor/github.com/wiggin77/merror/format.go | package merror
import (
"fmt"
"strings"
)
// FormatterFunc is a function that converts a merror
// to a string.
type FormatterFunc func(merr *MError) string
// GlobalFormatter is the global merror formatter.
// Set this to a custom formatter if desired.
var GlobalFormatter = defaultFormatter
// defaultFormatter
f... |
lirui-intel/hadoop | hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/offlineImageViewer/PBImageDelimitedTextWriter.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you... |
Coffey-May/dev_sitev2 | src/components/Recipe/RecipeComponent.js | <reponame>Coffey-May/dev_sitev2
import React from 'react';
import { Ingredients } from './Ingredients';
export const RecipeComponent = (recipe) => {
return (
<div style={{
padding: '1em', margin: '1em', display: 'inline-block', marginRight: '0', minWidth: '45vw', height: '750px', backgroundCol... |
michal-huzevka/twu-biblioteca-michalhuzevka | src/com/twu/biblioteca/view/View.java | <filename>src/com/twu/biblioteca/view/View.java
package com.twu.biblioteca.view;
/**
* Created by michal on 2/23/15.
*/
public interface View {
String output();
}
|
ashish1009/Kreator | Kreator/implementation/Core/Utils/Buffer.cpp | <reponame>ashish1009/Kreator
//
// Buffer.cpp
// Kreator
//
// Created by iKan on 08/04/22.
//
#include "Buffer.hpp"
#include <Core/Utils/Asserts.h>
using namespace Kreator;
uint32_t Buffer::s_AllocatedBytes = 0;
/// Buffer constructor to assign already allocated memory
/// @param data Allocated Memory pointer a... |
YuanYuanDog/DesignPatterns-Objective-C | DesignPatterns/TemplateMethod/TestPaper.h | //
// TestPaper.h
// DesignPatterns
//
// Created by leichunfeng on 14/11/2.
// Copyright (c) 2014年 zdnst. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface TestPaper : NSObject
/// 试题1
- (void)testQuestion1;
/// 答案1
///
/// @return 答案1
- (NSString *)answer1;
/// 试题2
- (void)testQuestion... |
balmasea/genieparser | src/genie/libs/parser/iosxe/tests/ShowMabAllDetails/cli/equal/golden_output_1_expected.py | <filename>src/genie/libs/parser/iosxe/tests/ShowMabAllDetails/cli/equal/golden_output_1_expected.py
expected_output = {
"interfaces": {
"GigabitEthernet2/0/1": {
"client_mac": {
"0000.0001.0003": {
"authen_status": "SUCCESS",
"mab_sm_state"... |
shibsankaras/atlasdb | atlasdb-cassandra-integration-tests/src/test/java/com/palantir/atlasdb/keyvalue/cassandra/CassandraTimestampStoreInvalidatorIntegrationTest.java | /*
* Copyright 2017 <NAME>, Inc. All rights reserved.
*
* Licensed under the BSD-3 License (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://opensource.org/licenses/BSD-3-Clause
*
* Unless required by applicable law or agree... |
vegai/react-pdf | packages/render/src/utils/isTextInstance.js | <reponame>vegai/react-pdf
import * as R from 'ramda';
import * as P from '@react-pdf/primitives';
const isTextInstance = R.propEq('type', P.TextInstance);
export default isTextInstance;
|
nkysg/Asenal | acm/twoSum.cc | #include <iostream>
#include <cstdio>
#include <algorithm>
#include <cstring>
#include <string>
#include <cmath>
#include <vector>
#include <queue>
#include <map>
#include <ctime>
#include <set>
typedef long long lld;
using namespace std;
class Solution {
#ifdef DEBUG
#define debug(x) cout<<__LINE__<<" "<<#x<... |
nagineni/chromium-crosswalk | chrome/android/java/src/org/chromium/chrome/browser/infobar/AnimationHelper.java | // Copyright 2013 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.
package org.chromium.chrome.browser.infobar;
import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.animatio... |
abcum/cirrius | cpm/check/card/main.go | <gh_stars>1-10
// Copyright © 2016 Abcum Ltd
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this info 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 o... |
iotile/baBLE-linux | platforms/linux/src/Application/PacketBuilder/PacketBuilder.cpp | #include "PacketBuilder.hpp"
#include "Log/Log.hpp"
#include "Exceptions/BaBLEException.hpp"
using namespace std;
// Constructors
PacketBuilder::PacketBuilder(shared_ptr<AbstractFormat> building_format) {
m_building_format = move(building_format);
}
// Setters
PacketBuilder& PacketBuilder::set_ignored_packets(unor... |
HuaYuetong1998/Online-Examination-System | backend/src/main/java/cn/yuanqikai/backend/service/impl/PaperManageServiceImpl.java | package cn.yuanqikai.backend.service.impl;
import cn.yuanqikai.backend.dto.PaperDTO;
import cn.yuanqikai.backend.dto.QuestionDTO;
import cn.yuanqikai.backend.entity.ChoiceQuestion;
import cn.yuanqikai.backend.entity.Paper;
import cn.yuanqikai.backend.entity.PaperQuestionPool;
import cn.yuanqikai.backend.mapper.ChoiceQ... |
rdwallis/rqueue | rqueue-spring-boot-starter/src/test/java/com/github/sonus21/rqueue/spring/boot/tests/integration/BootProcessingChannelTest.java | <filename>rqueue-spring-boot-starter/src/test/java/com/github/sonus21/rqueue/spring/boot/tests/integration/BootProcessingChannelTest.java
/*
* 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 obtai... |
asarcar/PI | experimental/hexinw/audio_example.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import sys
try:
import apiai
except ImportError:
sys.path.append(
os.path.join(os.path.dirname(os.path.realpath(__file__)), os.pardir)
)
import apiai
import pyaudio
import time
import wave
CLIENT_ACCESS_TOKEN = '<KEY>'
CHUNK = 1024
def main():
... |
Gradecak/fission-workflows | pkg/fnenv/workflows/workflows_test.go | <filename>pkg/fnenv/workflows/workflows_test.go
package workflows
import (
"context"
"errors"
"testing"
"time"
"github.com/golang/protobuf/ptypes"
"github.com/gradecak/fission-workflows/pkg/api"
"github.com/gradecak/fission-workflows/pkg/api/projectors"
"github.com/gradecak/fission-workflows/pkg/api/store"
"... |
RoboBears5611/Ftc2019RoverRuckus | Ftc3543Lib/src/main/java/trclib/TrcSwerveDriveBase.java | /*
* Copyright (c) 2018 Titan Robotics Club (http://www.titanrobotics.com)
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
... |
miguelsousa/hTools2 | Scripts/current-font/layers/delete-all.py | # [h] delete all layers
'''Delete all layers in the current font.'''
# run
f = CurrentFont()
while len(f.layerOrder) > 0:
f.removeLayer(f.layerOrder[0])
f.update() |
IDEOorg/steps-guide-housing | src/store/nav/nav.js | export const CHANGE_NAV = 'CHANGE_NAV';
export const MAIN_PAGE = 'MAIN_PAGE';
export const OPTIONS_PAGE = 'OPTIONS_PAGE';
export function changeNav(page) {
return {
type: CHANGE_NAV,
page
};
}
const nav = (state = [], action) => {
switch (action.type) {
case CHANGE_NAV:
return action.page;
... |
Diffblue-benchmarks/Ananas-analytics-ananas-desktop | buildSrc/src/main/java/org/ananas/desktop/CorePlugin.java | <reponame>Diffblue-benchmarks/Ananas-analytics-ananas-desktop
package org.ananas.desktop;
import java.util.Set;
import org.gradle.api.Plugin;
import org.gradle.api.Project;
import org.gradle.api.initialization.Settings;
import org.gradle.api.invocation.Gradle;
class CorePlugin implements Plugin<Settings> {
public v... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.