repo_name stringlengths 6 101 | path stringlengths 4 300 | text stringlengths 7 1.31M |
|---|---|---|
dkraczkowski/opyapi | tests/http/test_http_response.py | <gh_stars>1-10
import pytest
from opyapi.http import Headers
from opyapi.http import HttpResponse
def test_can_instantiate():
instance = HttpResponse(200)
assert isinstance(instance, HttpResponse)
def test_can_write_and_read_body():
instance = HttpResponse(200)
instance.write("Example text")
as... |
Enerccio/kclib | kclib/intinc/string.h | <reponame>Enerccio/kclib
/*
* string.h
*
* Created on: Dec 18, 2015
* Author: pvan
*/
#ifndef INTINC_STRING_H_
#define INTINC_STRING_H_
#ifdef __cplusplus
extern "C" {
#endif
/**
* Thread safe call to strtok
*/
char* __strtok_ts(char** token, char* restrict s1, const char* restrict s2) __attribute__((n... |
WPIMascotMQP/version0.1 | behaviourtree/composite/Sequence.cpp | <filename>behaviourtree/composite/Sequence.cpp
#include "Sequence.h"
/**
CONSTRUCTOR
@param childr The children of this sequence object
*/
Sequence::Sequence(std::vector<Node*> childr) : Composite(childr) {
currentChild = children.begin();
}
/**
DECONSTRUCTOR
*/
Sequence::~Sequence() {
}
/**
Node execute as ch... |
cmri/BC-BSP | src/java/com/chinamobile/bcbsp/sync/WorkerSSControllerInterface.java | <reponame>cmri/BC-BSP
/**
* CopyRight by Chinamobile
*
* WorkerSSControllerInterface.java
*/
package com.chinamobile.bcbsp.sync;
/**
* WorkerSSControllerInterface
*
* WorkerSSControllerInterface for local synchronization and aggregation. This class is
* connected to WorkerAgentForJob.
*
* @author
* @vers... |
shashankcm/Full-Stack-Online-Shopping-Website | frontend/node_modules/apollo-client/index.js | <filename>frontend/node_modules/apollo-client/index.js
export { print as printAST } from 'graphql/language/printer';
export { ObservableQuery, } from './core/ObservableQuery';
export { NetworkStatus } from './core/networkStatus';
export * from './core/types';
export { ApolloError } from './errors/ApolloError';
import A... |
horondi/horondi_client_fe | src/containers/currency/constants.js | export const HRYVNIA_UNICODE = '\u20b4';
export const DOLLAR_UNICODE = '\u0024';
|
flaviovdf/pyksc | src/pyksc/test/test_regression.py | <filename>src/pyksc/test/test_regression.py
#-*- coding: utf8
'''Unit tests for the regression module'''
from __future__ import division, print_function
from numpy.testing import *
from pyksc import regression
from sklearn import linear_model
from sklearn.grid_search import GridSearchCV
import numpy as np
import un... |
globalbus/karaf | util/src/test/java/org/apache/karaf/util/DeployerUtilsTest.java | <reponame>globalbus/karaf<gh_stars>100-1000
/*
* 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 Licen... |
bstee615/ReVeal | code-slicer/joern/projects/extensions/jpanlib/src/main/java/ast/CodeLocation.java | <filename>code-slicer/joern/projects/extensions/jpanlib/src/main/java/ast/CodeLocation.java<gh_stars>10-100
package ast;
public class CodeLocation
{
final public static int NOT_SET = -1;
public int startLine = NOT_SET;
public int endLine = NOT_SET;
public int startPos = NOT_SET;
public int startIndex = NOT_SET;... |
KonstantinosAng/CodeWars | Python/[6 kyu] consecutive count.py | # see https://www.codewars.com/kata/59c3e819d751df54e9000098/train/python
from TestFunction import Test
def get_consective_items(items, key):
positions, max_count, count = [], 0, 0
for i, item in enumerate(str(items)):
if item == str(key):
positions.append(i)
for i in range(len(positions)-1):
if ... |
Blaubot/Blaubot | blaubot-android/src/main/java/eu/hgross/blaubot/android/wifip2p/WifiP2PConnectionMetaDataDTO.java | <reponame>Blaubot/Blaubot<filename>blaubot-android/src/main/java/eu/hgross/blaubot/android/wifip2p/WifiP2PConnectionMetaDataDTO.java<gh_stars>10-100
package eu.hgross.blaubot.android.wifip2p;
import eu.hgross.blaubot.core.acceptor.ConnectionMetaDataDTO;
/**
* Created by henna on 16.02.15.
*/
public class WifiP2PCon... |
gspeedtech/Audacity | src/effects/Fade.cpp | <reponame>gspeedtech/Audacity
/**********************************************************************
Audacity: A Digital Audio Editor
Fade.cpp
<NAME>
*******************************************************************//**
\class EffectFadeIn
\brief An EffectSimpleMono
*//***********************************... |
yxlao/StanfordPCL | apps/src/dinast_grabber_example.cpp | #include <string>
#include <string.h>
#include <stdlib.h>
#include <iostream>
#include <cstdio>
#include <Eigen/Core>
#include <pcl/common/transforms.h>
#include <pcl/common/time.h>
#include <pcl/visualization/pcl_visualizer.h>
#include <pcl/visualization/image_viewer.h>
#include <pcl/point_types.h>
#include <pcl/io/p... |
OpenChemistry/experimentaldataplatform | server/edp/server/models/postmortem.py | <gh_stars>1-10
from .base import Base
class Postmortem(Base):
def __init__(self):
from girder.plugins.edp.models.project import Project
from girder.plugins.edp.models.postmortemtest import PostmortemTest
super(Postmortem, self).__init__(
name='edp.postmortem',
prop... |
cardforcoin/shale-scala | logback-setup/build.sbt | name := "logback-setup"
libraryDependencies += "ch.qos.logback" % "logback-classic" % "1.0.0"
|
TakehideSoh/Scarab | org.sat4j.pb/src/main/java/org/sat4j/pb/IGroupPBSolver.java | package org.sat4j.pb;
import java.math.BigInteger;
import org.sat4j.specs.ContradictionException;
import org.sat4j.specs.IConstr;
import org.sat4j.specs.IGroupSolver;
import org.sat4j.specs.IVec;
import org.sat4j.specs.IVecInt;
public interface IGroupPBSolver extends IGroupSolver, IPBSolver {
IConstr addAtMost(... |
sedurCode/nodOSC | firmware/newlib_nano/src/malloc.c | #include <stdlib.h>
#include <string.h>
#include <sys/config.h>
#include <reent.h>
#include <malloc.h>
extern void *pvPortMalloc( size_t xWantedSize );
extern void vPortFree( void *pv );
extern size_t xPortGetFreeHeapSize( void );
extern size_t xPortGetMinimumEverFreeHeapSize( void );
extern size_t xPortGetHeapSize( v... |
al1221/ghost-openshift | core/client/node_modules/ember-cli-babel/node_modules/broccoli-babel-transpiler/node_modules/babel-core/node_modules/core-js/src/es6.object.prototype.js | !function(tmp){
// 19.1.3.6 Object.prototype.toString()
tmp[SYMBOL_TAG] = DOT;
if(cof(tmp) != DOT)hidden(ObjectProto, TO_STRING, function(){
return '[object ' + classof(this) + ']';
});
}({}); |
shapri/martian_robots | src/test/java/martian_robots/SpringIntegrationTest.java | package martian_robots;
import martian_robots.config.Configuration;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.ActiveProfiles;
import org.springframework.test.context.ContextConfiguration;
@ActiveProfiles("test")
@SpringBootTest
@ContextConfiguration(classes =... |
N-Silbernagel/discordbot | src/test/java/com/github/nsilbernagel/discordbot/audio/VolumeTaskTest.java | <gh_stars>0
package com.github.nsilbernagel.discordbot.audio;
import com.github.nsilbernagel.discordbot.message.MessageTestUtil;
import com.github.nsilbernagel.discordbot.message.MsgTaskRequest;
import com.sedmelluq.discord.lavaplayer.player.AudioPlayer;
import discord4j.core.object.entity.Message;
import org.junit.ju... |
Eve-ning/aleph0 | scripts/f834.py | from math import pi
import numpy as np
from aleph.consts import *
from reamber.osu.OsuBpm import OsuBpm, MIN_BPM, MAX_BPM
from reamber.osu.OsuHit import OsuHit
from reamber.osu.OsuMap import OsuMap
from reamber.osu.lists.notes.OsuHitList import OsuHitList
offsets = OsuHitList.readEditorString(
"05:29:364 ("
... |
christopherwj/a_code_a_day | c++/generic_code/address_book/doc/html/search/functions_2.js | <reponame>christopherwj/a_code_a_day<filename>c++/generic_code/address_book/doc/html/search/functions_2.js
var searchData=
[
['deletecontact_41',['deleteContact',['../class_address_book.html#a12d8f1663aa709e62369cc9dd1e466d9',1,'AddressBook']]]
];
|
gabrielrigon/trabalho_graduacao | app/models/comment.rb | <gh_stars>1-10
class Comment < ActiveRecord::Base
# ---- relationships ----
belongs_to :user
belongs_to :post
# ---- delegates ----
delegate :name, to: :user, prefix: true, allow_nil: true
# ---- validates ----
validates :content, presence: true
end
|
praveen-garg/FogLAMP | python/foglamp/common/storage_client/__main__.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
""" This module is for test purpose only!
USE src/python/foglamp/storage/payload_builder.py
This will go away when tests, payload_builder and actually STORAGE layer (FOGL-197) are in place
"""
import json
from collections import OrderedDict
from foglamp.common.stora... |
fossabot/evemonk | spec/routing/api/eve/corporations_routing_spec.rb | <filename>spec/routing/api/eve/corporations_routing_spec.rb
# frozen_string_literal: true
require "rails_helper"
describe Api::Eve::CorporationsController do
describe "routing" do
it "should route GET /api/eve/corporations to api/eve/corporations#index" do
expect(get: "/api/eve/corporations").to route_to(... |
JamesLoveCurry/bione_input | bione-plugin/src/main/java/com/yusys/bione/plugin/rptidx/entity/RptIdxSrcRelInfoPK.java | package com.yusys.bione.plugin.rptidx.entity;
import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Embeddable;
/**
* The primary key class for the RPT_IDX_SRC_REL_INFO database table.
*
*/
@Embeddable
public class RptIdxSrcRelInfoPK implements Serializable {
//default serial ve... |
Tollainmear/Nucleus | src/main/java/io/github/nucleuspowered/nucleus/modules/kit/commands/kit/KitRenameCommand.java | /*
* This file is part of Nucleus, licensed under the MIT License (MIT). See the LICENSE.txt file
* at the root of this project for more details.
*/
package io.github.nucleuspowered.nucleus.modules.kit.commands.kit;
import io.github.nucleuspowered.nucleus.api.nucleusdata.Kit;
import io.github.nucleuspowered.nucleus... |
coheigea/tcommon-studio-se | main/plugins/org.talend.core.runtime/src/main/java/org/talend/core/service/IRemoteService.java | <filename>main/plugins/org.talend.core.runtime/src/main/java/org/talend/core/service/IRemoteService.java<gh_stars>10-100
// ============================================================================
//
// Copyright (C) 2006-2021 Talend Inc. - www.talend.com
//
// This source code is available under agreement avai... |
tenpaiyomi/rodf | spec/tab_spec.rb | <gh_stars>0
# Copyright (c) 2010 <NAME>
#
# This file is part of rODF.
#
# rODF 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 version 3 of
# the License, or (at your option) any later version.
... |
ethansaxenian/RosettaDecode | lang/Ruby/find-common-directory-path-3.rb | def common_directory_path(dirs, separator='/')
dir1, dir2 = dirs.minmax.map{|dir| dir.split(separator)}
dir1.zip(dir2).take_while{|dn1,dn2| dn1==dn2}.map(&:first).join(separator)
end
p common_directory_path(dirs) #=> "/home/user1/tmp"
|
zhouzy-creator/Tengine | source/device/vulkan/layer/packing_vulkan.hpp | <filename>source/device/vulkan/layer/packing_vulkan.hpp<gh_stars>1000+
/*
* 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
... |
NicoleRobin/dovecot | dovecot-2.2.33.2/src/lib/aqueue.c | /* Copyright (c) 2003-2017 Dovecot authors, see the included COPYING file */
#include "lib.h"
#include "array.h"
#include "aqueue.h"
struct aqueue *aqueue_init(struct array *array)
{
struct aqueue *aqueue;
aqueue = i_new(struct aqueue, 1);
aqueue->arr = array;
aqueue->area_size = buffer_get_writable_size(aqueue-... |
wallywest/magnum | lib/magnum/error.rb | module Magnum
class Error < StandardError
end
class PersistenceError < Error
end
class InvalidType < Error
end
end
|
eltonyeh/tp | src/main/java/seedu/address/logic/parser/CliSyntax.java | <gh_stars>0
package seedu.address.logic.parser;
/**
* Contains Command Line Interface (CLI) syntax definitions common to multiple commands
*/
public class CliSyntax {
/* Umbrella command definitions */
public static final String PERSON_COMMAND = "student";
public static final String GROUP_COMMAND = "gro... |
rgrr/smartmeshsdk | libs/SmartMeshSDK/protocols/oap/OAPNotif.py | import OAPMessage
import OAPDefines
import struct
import datetime
from array import array
DIGITAL_IN_ADDRESS = 2
ANALOG_ADDRESS = 4
TEMP_ADDRESS = array('B', [5])
NOTIFTYPE_SAMPLE = 0
NOTIFTYPE_STATS = 1
NOTIFTYPE_DIG = 2
NOTIFTYPE_LOCATEME = 3
NOTIFTYPE_PKGEN = 4
TAG_ADDRESS = 0xff
... |
RequestPrivacy/sparrow | src/main/java/com/sparrowwallet/sparrow/wallet/AdvancedDialog.java | <gh_stars>100-1000
package com.sparrowwallet.sparrow.wallet;
import com.sparrowwallet.drongo.wallet.Wallet;
import com.sparrowwallet.sparrow.AppServices;
import com.sparrowwallet.sparrow.io.Storage;
import javafx.fxml.FXMLLoader;
import javafx.scene.control.ButtonBar;
import javafx.scene.control.ButtonType;
import jav... |
Hap-Hugh/quicksel | test/python/test_time_gaussian_3d.py | import sys
sys.path.append('../../src/python')
import pprint
from quickSel import *
import numpy as np
query_dir = '../../test/python/queries/'
data_file_name = query_dir + 'gaussian_3d.data'
query_file_name = query_dir + 'gaussian_trans.query'
# get data
def get_data():
data_file = open(data_file_name)
data... |
Maksim2498/spe-game | src/static/scripts/ecs/entity/EntityManager.js | import ECSManager from "/scripts/ecs/ECSManager.js"
import "/scripts/ext/Map.js"
export default class EntityManager extends ECSManager {
deleteAllWithComponents(...components) {
let deleted = 0
for (const entity of this.entitiesWithComponents(...components))
deleted += this.delete(en... |
knes1/high-performance-java-persistence | core/src/test/java/com/vladmihalcea/book/hpjp/hibernate/identifier/StringSequenceIdentifierTest.java | <filename>core/src/test/java/com/vladmihalcea/book/hpjp/hibernate/identifier/StringSequenceIdentifierTest.java
package com.vladmihalcea.book.hpjp.hibernate.identifier;
import com.vladmihalcea.book.hpjp.util.AbstractOracleXEIntegrationTest;
import org.hibernate.annotations.GenericGenerator;
import org.junit.Test;
impo... |
will62794/tlaplus | org.lamport.tla.toolbox/src/org/lamport/tla/toolbox/ui/handler/DeleteModuleHandler.java | package org.lamport.tla.toolbox.ui.handler;
import java.util.List;
import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.core.expressions.IEvaluationContext;
import org.eclipse.core.resources.I... |
JonathanLehner/korali | examples/study.cases/covid19/src/tools/tools.py | #!/usr/bin/env python3
# Author: <NAME>
# Date: 16/3/2020
# Email: <EMAIL>
import os
import sys
import shutil
import glob
import pandas as pd
import io
import requests
import json
import os.path
import numpy as np
def print_params_to_infer(model, pairs=False):
"""Print the list of parameter identifiers for '... |
gameley-tc/bi-go | bimodels/equip_level.go | <reponame>gameley-tc/bi-go
// Copyright 2018 The Gameley-TC Authors. All rights reserved.
package bimodels
import (
"strconv"
"github.com/gameley-tc/bi-go"
)
type LogEquipLevel struct {
*LogReason
// 装备类型
EquipType int
// 装备ID
EquipId int
// 装备原来的等级
EquipOldLevel int
// 装备新的等级
EquipNewLevel int
// 本次变动的... |
SmallWhite-Jamie/sharp-sword | sharp-sword-core/src/main/java/com/jamie/framework/quartz/job/OpLogWriteQuartzJob.java | package com.jamie.framework.quartz.job;
import com.jamie.framework.log.mapper.OpLogMapper;
import com.jamie.framework.log.op.OpLog;
import com.jamie.framework.log.op.OpLogWriteAspect;
import com.jamie.framework.redis.RedisService;
import com.jamie.framework.util.ApplicationContextUtil;
import lombok.extern.slf4j.Slf4j... |
dedalusgs/sitae | sitae/src/main/java/es/novasoft/sitae/business/dao/interfaz/RelacionEdictosDAO.java | package es.novasoft.sitae.business.dao.interfaz;
import java.util.List;
import es.novasoft.comun.exceptions.DAOException;
import es.novasoft.sitae.business.objects.RelacionEdictos;
public interface RelacionEdictosDAO {
public void save(RelacionEdictos transientInstance) throws DAOException;
public void delete(Re... |
BeckerFrank/egradle | egradle-plugin-main/src/main/java/de/jcup/egradle/core/GradleExecutor.java | <reponame>BeckerFrank/egradle<filename>egradle-plugin-main/src/main/java/de/jcup/egradle/core/GradleExecutor.java
/*
* Copyright 2016 <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 ... |
wpumacay/tiny_renderer | legacy/src/graphics/CShadowMap.cpp |
#include <graphics/CShadowMap.h>
namespace engine
{
std::string toString( const eShadowRangeType& rangeType )
{
if ( rangeType == eShadowRangeType::AUTOFIX_CAMERA ) return "autofix_camera";
if ( rangeType == eShadowRangeType::FIXED_USER ) return "fixed_user";
ENGINE_CORE_ASSERT( fals... |
0420syj/KOSM | test6/frontend/src/sign/login/forgot/ForgotPassword.js | import React, {useState} from 'react';
import './ForgotPassword.scss';
import { forgot } from '../../../util/APIUtils';
import { Button } from 'reactstrap';
const ForgotPassword = () => {
const [data, setData] = useState({
email: '',
originPassword: '', //기존 비밀번호
password: '', ... |
msoharab/madmec | inh_manage.madmec.com/assets/js/drawing.js | function DrawingCtrl() {
var CPO = {};
var listofrequi = {};
var listofdesin = {};
var requi = {};
this.__construct = function (cpoctrl) {
CPO = cpoctrl;
requi = CPO.cpo.require;
list = CPO.list;
$(CPO.msgDiv).html('');
/* Requirement */
// fetchRequirement(... |
dannyadkins/uwazi | app/api/settings/specs/settings.spec.js | <reponame>dannyadkins/uwazi<filename>app/api/settings/specs/settings.spec.js
import { catchErrors } from 'api/utils/jasmineHelpers';
import db from 'api/utils/testing_db';
import translations from 'api/i18n/translations';
import settings from '../settings.js';
import fixtures from './fixtures.js';
describe('settings',... |
jkolokotronis/ds_mod_tools | pkg/Python27/Lib/site-packages/win32comext/axscript/client/framework.py | """AXScript Client Framework
This module provides a core framework for an ActiveX Scripting client.
Derived classes actually implement the AX Client itself, including the
scoping rules, etc.
There are classes defined for the engine itself, and for ScriptItems
"""
import sys
from win32com.axscript imp... |
aczapi/PingPong | game.hpp | #pragma once
#include <SFML/Audio.hpp>
#include <SFML/Graphics.hpp>
#include <memory>
#include "background.hpp"
#include "ball.hpp"
#include "entity.hpp"
#include "gameStates.hpp"
#include "headers.hpp"
#include "leftPaddle.hpp"
#include "rightPaddle.hpp"
class Game : public State {
public:
void initialize(sf::Re... |
ElianeBriand/ensmallen | include/ensmallen_bits/fw/atoms.hpp | <gh_stars>1-10
/**
* @file atoms.hpp
* @author <NAME>
*
*
* ensmallen is free software; you may redistribute it and/or modify it under
* the terms of the 3-clause BSD license. You should have received a copy of
* the 3-clause BSD license along with ensmallen. If not, see
* http://www.opensource.org/licenses/B... |
panda-factory/showmaker | src/render/layer/clip_path_layer.h | //
// Created by guozhenxiong on 2021-11-04.
//
#ifndef SHOWMAKER_CLIP_PATH_LAYER_H
#define SHOWMAKER_CLIP_PATH_LAYER_H
#include "render/layer/container_layer.h"
#include "render/painting/canvas_path.h"
#include "render/painting/clip.h"
namespace sm {
class ClipPathLayer : public ContainerLayer {
public:
void Se... |
danghica/mokapot | mokapot/src/main/java/xyz/acygn/mokapot/MigrationActionsMessage.java | package xyz.acygn.mokapot;
import java.time.Duration;
import xyz.acygn.mokapot.util.AutocloseableLockWrapper;
/**
* A distributed message that returns a set of migration actions for an object.
* This should typically be sent to the system which currently stores the
* object's data (otherwise, the message is likely... |
cquoss/jboss-4.2.3.GA-jdk8 | testsuite/src/main/org/jboss/test/util/ServiceControllerUtil.java | /*
* JBoss, Home of Professional Open Source.
* Copyright 2006, Red Hat Middleware LLC, and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
* This is free software; you can redistribute it and/or mo... |
tardeaux/SnapTools | app/src/pack/java/com/ljmu/andre/snaptools/ModulePack/MiscChanges.java | package com.ljmu.andre.snaptools.ModulePack;
import android.content.ClipboardManager;
import android.content.ComponentName;
import android.content.Context;
import android.content.pm.ComponentInfo;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.graphics.Typeface;
import ... |
chs6558/chs6558.github.io | node_modules/styled-icons/crypto/Btx/Btx.esm.js | export * from '@styled-icons/crypto/Btx';
|
codekoala/glujs | spec/Providers/extjs/validationSpec.js | <gh_stars>1-10
describe('validation specs', function () {
describe('given a text field with a boolean validation function', function () {
var vm, view, itemId;
function standUp(initialStatus) {
itemId = Ext.id();
testNs = {
viewmodels:{
v... |
ngageoint/mapcache-electron | src/lib/source/zip/ZipSource.js | <filename>src/lib/source/zip/ZipSource.js
import Source from '../Source'
import AdmZip from 'adm-zip'
import ShapeFileSource from '../shapefile/ShapeFileSource'
import KMZSource from '../kml/KMZSource'
import XYZFileSource from '../xyz/XYZFileSource'
import isNil from 'lodash/isNil'
export default class ZipSource exte... |
cameroncooke/XcodeHeaders | Frameworks/IDEKit/IDENavigableItemPredicateFilter.h | //
// Generated by class-dump 3.5 (64 bit).
//
// class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by <NAME>.
//
#import <IDEKit/_IDENavigableItemPredicateFilter.h>
@interface IDENavigableItemPredicateFilter : _IDENavigableItemPredicateFilter
{
}
- (id)initWithPredicate:(id)arg1;
@end
|
sun-996/safty | src/utils/index.js | import Vue from 'vue'
import store from '@/store'
/**
* Parse the time to string
* @param {(Object|string|number)} time
* @param {string} cFormat
* @returns {string | null}
*/
export function parseTime(time, cFormat) {
if (arguments.length === 0) {
return null
}
const format = cFormat || '{... |
ForFunPenguin/Mekanism | src/api/java/mekanism/api/SerializerHelper.java | <gh_stars>0
package mekanism.api;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import com.google.gson.JsonSyntaxException;
import com.mojang.brigadier.exceptions.CommandSyntaxException;
import javax.annotation.Nonnull;
import me... |
RMMJR/g3m | iOS/G3MiOSSDK/Commons/GEO/GEOSymbol.hpp | <filename>iOS/G3MiOSSDK/Commons/GEO/GEOSymbol.hpp
//
// GEOSymbol.hpp
// G3MiOSSDK
//
// Created by <NAME> on 3/25/13.
//
//
#ifndef __G3MiOSSDK__GEOSymbol__
#define __G3MiOSSDK__GEOSymbol__
#include <vector>
class G3MRenderContext;
class GEOSymbolizer;
class MeshRenderer;
class ShapesRenderer;
class MarksRendere... |
terminux/jdk1.7.0_80 | src/com/sun/corba/se/impl/util/PackagePrefixChecker.java | /*
* Copyright (c) 1999, 2004, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*/
package com.sun.corba.se.impl.util;
import java.io.File;
/**
* PackagePrefixChecker provides static u... |
Vujovic/ihyht | src/components/contactCard.js | import React from 'react'
import styled from 'styled-components'
import ContactQR from './contactQR'
import ContactIcon from './svg/contact'
import PhoneIcon from './svg/phone'
export default () => (
<ContactCard>
<h2>联系方式</h2>
<p className="contact email">
<ContactIcon /> <EMAIL>
</p>
<p cla... |
jkloth/pyxml | test/dom/html/test_a.py | from util import testAttribute
from util import testIntAttribute
def test():
print 'testing source code syntax'
from xml.dom.html import HTMLAnchorElement
from xml.dom import implementation
doc = implementation.createHTMLDocument('Title')
a = doc.createElement('A')
print 'testing get/set'
... |
tie/Valkyrien-Skies | src/main/java/org/valkyrienskies/mod/common/util/jackson/minecraft/ChunkPosSerialization.java | package org.valkyrienskies.mod.common.util.jackson.minecraft;
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.databind.DeserializationContext;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.SerializerProv... |
nguyenduythuan/mock-project-reactjs | app/containers/GlobalLoading/actions.js | import * as type from './constants';
export function showLoading() {
return {
type: type.SHOW_LOADING,
};
}
export function hideLoading() {
return {
type: type.HIDE_LOADING,
};
}
|
giranath/atelier | lib/gpu/opengl45/private/opengl45_gpu_device.cpp | <gh_stars>0
#include "opengl45_gpu_device.hpp"
#include "opengl45_gpu_pipeline_state.hpp"
#include "opengl45_gpu_buffer.hpp"
#include "opengl45_gpu_texture.hpp"
#include "opengl45_helpers.hpp"
#include <cassert>
namespace at
{
// TODO: Check if glad needs to be loaded inside this library
// Needs to test on wi... |
idealeak/goserver | core/builtin/filter/connectionthrottle.go | <filename>core/builtin/filter/connectionthrottle.go<gh_stars>10-100
package filter
import (
"net"
"time"
"github.com/idealeak/goserver/core/container"
"github.com/idealeak/goserver/core/netlib"
)
var (
DefaultAllowedInterval = 500 //ms
ConnectionThrottleFilterName = "session-filter-connectionthrottle"
)
... |
vishalbelsare/chronos | org.chronos.chronodb/src/main/java/org/chronos/chronodb/internal/impl/query/parser/ast/DoubleWhereElement.java | <reponame>vishalbelsare/chronos
package org.chronos.chronodb.internal.impl.query.parser.ast;
import static com.google.common.base.Preconditions.*;
import org.chronos.chronodb.api.query.NumberCondition;
import org.chronos.chronodb.internal.api.query.searchspec.DoubleSearchSpecification;
import org.chronos.chronodb.int... |
wx930910/commons-jelly | jelly-tags/jaxme/src/main/java/org/apache/commons/jelly/tags/jaxme/MarshallTag.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 may not ... |
navin09/layerJS | test/e2e/slidelayout/fade_spec.js | var utilities = require('../helpers/utilities.js');
describe('fade', function() {
utilities.resizeWindow(800, 600);
describe('fade frame', function() {
/*
frame1(default-frame) fades out as frame2 fades in
*/
it('frame1 fades out as frame2 fades in', function() {
browser.get('slidelayout/fa... |
foundations/onedev | server-core/src/main/java/io/onedev/server/model/support/pullrequest/changedata/PullRequestAssigneeRemoveData.java | <reponame>foundations/onedev<gh_stars>1-10
package io.onedev.server.model.support.pullrequest.changedata;
import javax.annotation.Nullable;
import io.onedev.server.OneDev;
import io.onedev.server.entitymanager.UserManager;
import io.onedev.server.model.User;
public class PullRequestAssigneeRemoveData extends PullReq... |
silenc3502/MYSQL-Arch-Doc-Summary | mysql-server/plugin/x/src/session.cc | /*
* Copyright (c) 2015, 2020, Oracle and/or its affiliates. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License, version 2.0,
* as published by the Free Software Foundation.
*
* This program is also distributed with... |
xkcoding/scaffold | scaffold-notification/src/main/java/com/xkcoding/scaffold/notification/model/dingtalk/Link.java | <reponame>xkcoding/scaffold<gh_stars>10-100
/*
* Copyright 2019 Yangkai.Shen
*
* 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... |
HelixOS/prebuilts-ndk | 6/platforms/android-9/arch-x86/usr/include/linux/taskstats.h | /****************************************************************************
****************************************************************************
***
*** This header was automatically generated from a Linux kernel header
*** of the same name, to make information necessary for userspace to
*** call i... |
cyjake/material | icons/AccountGroupIcon.js | import React from 'react'
const DEFAULT_SIZE = 24
export default ({
fill = 'currentColor',
width = DEFAULT_SIZE,
height = DEFAULT_SIZE,
style = {},
...props
}) => (
<svg
viewBox={ `0 0 ${ DEFAULT_SIZE } ${ DEFAULT_SIZE }` }
style={{ fill, width, height, ...style }}
{ ...props }
>
<path d... |
bobmcwhirter/drools | drools-eclipse/drools-eclipse-plugin/src/main/java/org/drools/eclipse/flow/ruleflow/view/property/ProcessNameSection.java | package org.drools.eclipse.flow.ruleflow.view.property;
import org.drools.eclipse.flow.common.editor.core.ProcessWrapper;
import org.drools.eclipse.flow.common.editor.editpart.ProcessEditPart;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.s... |
5cs/spdk | module/event/subsystems/scheduler/scheduler.c | /*-
* BSD LICENSE
*
* Copyright (c) Intel Corporation.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* * Redistributions of source code must retain the above copyri... |
Jakgn/gem5_test | build/ARM/python/m5/internal/Clock_vector.i_init.cc | #include "sim/init.hh"
extern "C" {
void init_Clock_vector();
}
EmbeddedSwig embed_swig_Clock_vector(init_Clock_vector, "m5.internal._Clock_vector");
|
GV-KrishnaTeja/Node-JS | arr2.js | <reponame>GV-KrishnaTeja/Node-JS<filename>arr2.js
//copywithin 1
const array1 = ['a', 'b', 'c', 'd', 'e'];
console.log(array1.copyWithin(0, 3));
//copywithin2
const array2 = [1, 2, 3, 4, 5]
console.log(array2.copyWithin(-2, -3, -1));
//entries1
const array3 = ['a', 'b', 'c'];
const iterator1 = array3.entries()... |
jmittert/cpp-docs | docs/mfc/reference/codesnippet/CPP/cfiledialog-class_4.cpp | <reponame>jmittert/cpp-docs
// Get the interface pointer
IFileDialogCustomize * customDlgPtr = m_myFileDialogPtr->GetIFileDialogCustomize();
// Make sure that it is not null
if ( customDlgPtr != NULL )
{
//
// Perform any interface functionality here
... |
PalgamingHD/Prehistoric | src/main/java/net/prehistoric/items/Fossil.java | package net.prehistoric.items;
import net.fabricmc.fabric.api.item.v1.FabricItemSettings;
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
import net.fabricmc.fabric.api.tool.attribute.v1.FabricToolTags;
import net.minecraft.block.Block;
import net.minecraft.block.Material;
import net.minecr... |
Rich2/openstrat | Tiling/Exs/testSrc/gOne/OneScen2Test.scala | <reponame>Rich2/openstrat
/* Copyright 2018-21 <NAME>. Licensed under Apache Licence version 2.0. */
package ostrat; package gOne
import utest._
object OneScen2Test extends TestSuite
{
val g = OneScen2.grid
val tests = Tests {
"test1" -
{ g.bottomCenRow ==> 2
g.topCenRow ==> 10
g.leftCenCol ==... |
jayrulez/NazaraEngine | include/Nazara/Graphics/UberShader.inl | // Copyright (C) 2022 Jérôme "Lynix" Leclercq (<EMAIL>)
// This file is part of the "Nazara Engine - Graphics module"
// For conditions of distribution and use, see copyright notice in Config.hpp
#include <Nazara/Graphics/UberShader.hpp>
#include <Nazara/Graphics/Debug.hpp>
namespace Nz
{
inline ShaderStageTypeFlags... |
rajadilipkolli/POC | poc-spring-boot-rest/poc-spring-boot-rest-webmvc/src/main/java/com/example/poc/webmvc/exception/LowerCaseClassNameResolver.java | <reponame>rajadilipkolli/POC
package com.example.poc.webmvc.exception;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.databind.jsontype.impl.TypeIdResolverBase;
import java.util.Locale;
class LowerCaseClassNameResolver extends TypeIdResolverBase {
/** {@inheritDoc} */
@Ove... |
dubdabasoduba/estatio | estatioapp/integtests/src/test/java/org/estatio/integtests/agreement/AgreementRoleTypeRepositoryTest.java | package org.estatio.integtests.agreement;
import java.util.List;
import javax.inject.Inject;
import org.junit.Before;
import org.junit.Test;
import org.apache.isis.applib.fixturescripts.FixtureScript;
import org.estatio.dom.agreement.Agreement;
import org.estatio.dom.agreement.AgreementRoleType;
import org.estatio.dom... |
qianbinbin/leetcode | cpp/src/MinimumWindowSubstring.cpp | #include "MinimumWindowSubstring.h"
#include <array>
#include <limits>
using namespace lcpp;
#define UC(Ch) (static_cast<unsigned char>(Ch))
std::string Solution76_1::minWindow(std::string s, std::string t) {
const auto &Size1 = s.size(), &Size2 = t.size();
if (Size1 < Size2)
return "";
typedef std::string... |
vlehtola/questmud | lib/wizards/jenny/mehta/mosut/spider.c | <gh_stars>0
inherit "obj/monster";
reset(arg) {
::reset(arg);
if (arg) { return; }
set_level(6+random(7));
set_race("spider");
set_name("spider");
set_alias("animal");
set_short("A small woolly spider");
set_long("A small woolly spider is hanging from the ceiling. It\n"
"i... |
Schwarz-Hexe/YAMMS | skse/GameData.h | <reponame>Schwarz-Hexe/YAMMS
#pragma once
#include "GameTypes.h"
#include "GameForms.h"
#include "GameObjects.h"
#include "GameReferences.h"
#include "GameResources.h"
class BSFile;
struct FormRecordData
{
UInt8 typeID; // corresponds to kFormType_XXX
UInt32 typeCode; // i.e. 'GMST', 'FACT'
UInt3... |
Ronald-Fi/Spring-Cloud | Netty/src/main/java/com/example/io/bio/tomcat_netty/http/NServlet.java | package com.example.io.bio.tomcat_netty.http;
public abstract class NServlet {
public void service(NRequest request, NResponse response) throws Exception {
//由service方法来决定,是调用doGet或者调用doPost
if ("GET".equalsIgnoreCase(request.getMethod())) {
doGet(request, response);
} ... |
cookingcodewithme/kafka | metadata/src/main/java/org/apache/kafka/metadata/BrokerHeartbeatReply.java | <gh_stars>10-100
/*
* 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 "Lic... |
JonyFang/MTHawkeye | MTHawkeye/UISkeleton/Toast/MTHToast.h | <gh_stars>1000+
//
// Copyright (c) 2008-present, Meitu, Inc.
// All rights reserved.
//
// This source code is licensed under the license found in the LICENSE file in
// the root directory of this source tree.
//
// Created on: 13/06/2018
// Created by: Huni
//
#import <Foundation/Foundation.h>
#import "MTHToastBtnH... |
ssb-ngi-pointer/manyverse-with-index-feeds | tools/echo-android-changelog.js | #!/usr/bin/env node
// SPDX-FileCopyrightText: 2021 The Manyverse Authors
//
// SPDX-License-Identifier: CC0-1.0
const addStream = require('add-stream');
const intoStream = require('into-stream');
const generateChangelog = require('./generate-changelog');
intoStream('--------------BEGIN GOOGLE PLAY--------------\n')... |
koitoer/j2ee-components | src/main/java/webservices/chapter5/base64attach/server/SkiImagePublisherBase64.java | package webservices.chapter5.base64attach.server;
import javax.xml.ws.Endpoint;
import com.koitoer.webservices.chapter5.base64attach.server.SkiImageService;
public class SkiImagePublisherBase64 {
public static void main(String[] args){
System.out.println("URL: http://localhost:9876/ski");
Endpoint.publish("htt... |
tgodzik/intellij-community | java/java-psi-impl/src/com/intellij/psi/impl/source/PsiPackageAccessibilityStatementImpl.java | <filename>java/java-psi-impl/src/com/intellij/psi/impl/source/PsiPackageAccessibilityStatementImpl.java
// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.intellij.psi.impl.source;
import com.intellij.lang.ASTNode;
im... |
shi00/foundation | plugins/log4j2/desensitization/src/main/java/com/silong/foundation/plugins/log4j2/desensitization/process/ChainSensitiveRecognizer.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 ... |
zer0infinity/CuteForCoast | coast/wdbase/Test/TestLib/TestRenderer.cpp | /*
* Copyright (c) 2005, <NAME> and IFS Institute for Software at HSR Rapperswil, Switzerland
* All rights reserved.
*
* This library/application is free software; you can redistribute and/or modify it under the terms of
* the license that is included with this library/application in the file license.txt.
*/
#in... |
Brent-rb/University | bachelor/imperative-programming-2/ZSO7/student.c | #include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <time.h>
#include <math.h>
struct student {
char naam[32];
char voornaam[32];
int studentnr;
double punten[5];
int jaar;
};
#define aantalStudenten 3
void readIn(struct student*);
void sortNr(struct student[]);
void printStudent(struct student*);... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.