repo_name stringlengths 6 101 | path stringlengths 4 300 | text stringlengths 7 1.31M |
|---|---|---|
qiwx2012/flutter_admin_backend | src/main/java/com/cry/flutter/admin/service/IMessageReplayService.java | package com.cry.flutter.admin.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.cry.flutter.admin.common.RequestBodyApi;
import com.cry.flutter.admin.entity.Message;
import com.cry.flutter.admin.entity.MessageReplay;
import com.baomidou.mybatisplus.extension.service.IService;
import com.cry.flut... |
shadowlansec/project-fantastic | packages/fantastic-default_auth/files/public/account.js | <gh_stars>10-100
fetch('/auth/myaccount')
.then(res => res.json())
.then(res => {
if (res.error) return document.getElementById('content').innerHTML = res.error
document.getElementById('username').innerHTML = res.username
document.getElementById('role').innerHTML = `Role: ${res.role}`
})
document.onkeyup = e => ... |
swanhong/CiFEr | test/abe/fame.c | /*
* Copyright (c) 2018 XLAB d.o.o.
*
* 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 ... |
quis/pay-selfservice | app/controllers/payment-links/get-review-controller.js | 'use strict'
// NPM dependencies
const lodash = require('lodash')
// Local dependencies
const {response} = require('../../utils/response.js')
const paths = require('../../paths')
module.exports = (req, res) => {
const pageData = lodash.get(req, 'session.pageData.createPaymentLink', {})
return response(req, res,... |
zcemycl/algoTest | py/tests/testMaxDepthBT/test_MaxDepthBT.py | import unittest
from parameterized import parameterized as p
from solns.maxDepthBT.maxDepthBT import *
class UnitTest_MaxDepthBT(unittest.TestCase):
@p.expand([
[[3,9,20,None,None,15,7],3],[[1,None,2],2]
])
def test_naive(self,nums,expected):
root = TreeNode.treeNode_fromList2(nums)
... |
danstowell/signalflow | source/include/signalflow/node/stochastic/random-exponential-dist.h | <reponame>danstowell/signalflow
#pragma once
#include "signalflow/node/stochastic/stochastic-node.h"
namespace signalflow
{
class RandomExponentialDist : public StochasticNode
{
public:
RandomExponentialDist(NodeRef scale = 0.0, NodeRef clock = nullptr, NodeRef reset = nullptr);
virtual void alloc() override... |
Noddy76/data-highway | monitoring/highway-patrol/src/main/java/com/hotels/road/highwaypatrol/Sender.java | /**
* Copyright (C) 2016-2019 Expedia, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or ag... |
Munyola/sentry | tests/sentry/api/serializers/test_grouptagkey.py | from __future__ import absolute_import
import six
from sentry import tagstore
from sentry.api.serializers import serialize
from sentry.testutils import TestCase
class GroupTagKeySerializerTest(TestCase):
def test(self):
user = self.create_user()
project = self.create_project()
tagkey = t... |
NanoCode012/ITStep | C++ Programming/Unicode/Tchar.cpp | <gh_stars>1-10
#include "Tchar.h"
wchar_t* ConvertANSIToUnicode(const char * c)
{
int len = mbstowcs(NULL, c, 0);
wchar_t* ch = new wchar_t(len);
mbstowcs(ch, c, len);
return ch;
}
const char* GetChar(const char * c)
{
return c;
} |
cmdallas/aws-app-mesh-controller-for-k8s | test/e2e/framework/helm/release.go | package helm
import (
"fmt"
"github.com/aws/aws-app-mesh-controller-for-k8s/test/e2e/framework/utils"
"github.com/pkg/errors"
"go.uber.org/zap"
"helm.sh/helm/v3/pkg/action"
"helm.sh/helm/v3/pkg/chart/loader"
"helm.sh/helm/v3/pkg/cli"
"helm.sh/helm/v3/pkg/release"
"k8s.io/cli-runtime/pkg/genericclioptions"
"s... |
IvanPashchenko/intellij-plugin-verifier | intellij-plugin-verifier/verifier-test/before-idea/src/main/java/com/intellij/util/xmlb/annotations/Attribute.java | <reponame>IvanPashchenko/intellij-plugin-verifier<filename>intellij-plugin-verifier/verifier-test/before-idea/src/main/java/com/intellij/util/xmlb/annotations/Attribute.java
package com.intellij.util.xmlb.annotations;
import org.jetbrains.annotations.NonNls;
import java.lang.annotation.ElementType;
import java.lang.a... |
dashevo/tendermint | crypto/crypto_test.go | package crypto
import (
"encoding/hex"
"testing"
"github.com/stretchr/testify/require"
)
func TestChecksum(t *testing.T) {
// since sha256 hash algorithm is critical for tenderdash, this test is needed to inform us
// if for any reason the hash algorithm is changed
actual := Checksum([]byte("dash is the best c... |
windmaomao/adventofcode | utils/js/duplicate.js | const duplicates = (arr, keyBy = v => `${v}`) => {
if (arr.length < 2) return []
const m = {}
arr.forEach(p => {
const k = keyBy(p)
m[k] = m[k] || []
m[k].push(p)
})
return Object
.values(m)
.filter(v => v.length > 1)
}
export default duplicates
|
Nikita-tech-writer/ignite-4 | modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/RootQuery.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 ... |
Metalhead33-Foundation/WoDDem2 | ComboBoxIdentifierDelegate.cpp | #include "ComboBoxIdentifierDelegate.hpp"
#include <QComboBox>
#include "PointerRole.hpp"
ComboBoxIdentifierDelegate::ComboBoxIdentifierDelegate(int column, QAbstractTableModel *model, QObject *parent) : QStyledItemDelegate(parent),
column(column), model(model)
{
}
QWidget *ComboBoxIdentifierDelegate::createEdito... |
cathal-killeen/ucd-modules | static/src/components/Cards/WordCloud.js | import React from 'react';
import TagCloud from 'react-tag-cloud';
import randomColor from 'randomcolor';
import { Link } from 'react-router';
export default class WordCloud extends React.Component {
constructor(props) {
super(props);
}
render() {
let word_dict = this.props.wordDict || {}... |
npatel37/dmrgornl | src/Models/FeAsBasedScExtended/FeAsBasedScExtended.h | /*
Copyright (c) 2009, UT-Battelle, LLC
All rights reserved
[DMRG++, Version 2.0.0]
[by G.A., Oak Ridge National Laboratory]
UT Battelle Open Source Software License 11242008
OPEN SOURCE LICENSE
Subject to the conditions of this License, each
contributor to this software hereby grants, free of
charge, to any person... |
venkyhegde/ITIS-5180-mobile-application-development | In-Class/In-Class-01/IC01/src/edu/uncc/cci/mobileapps/MainPart4.java | <gh_stars>0
package edu.uncc.cci.mobileapps;
//import java.util.HashMap;
import java.util.HashMap;
public class MainPart4{
/*
Question 4
You are provided with the Data class that contains an items array (Data.items) which is an array of items in a store. Each element in the array represents a single ... |
mousedogpig/solr5.5.4 | lucene/spatial/src/java/org/apache/lucene/spatial/util/GeoUtils.java | <gh_stars>1-10
/*
* 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 "Lice... |
HawxChen/barrelfishOS | lib/newlib/libgloss/or1k/timer.c | <filename>lib/newlib/libgloss/or1k/timer.c
/* timer.c -- tick timer functions for OpenRISC 1000.
*
* Copyright (c) 2011, 2014 Authors
*
* Contributor <NAME> <<EMAIL>>
* Contributor <NAME> <<EMAIL>>
*
* The authors hereby grant permission to use, copy, modify, distribute,
* and license this software and its docu... |
return/BeOSSampleCode | open_gl/3Dlife-Voodoo/lifeApp.h | <gh_stars>1-10
/*
Copyright 1999, Be Incorporated. All Rights Reserved.
This file may be used under the terms of the Be Sample Code License.
*/
#include <Application.h>
#include "lifeWin.h"
class lifeApp : public BApplication
{
public:
lifeApp();
void AboutRequested();
void MessageReceived(BMessage *msg);... |
ArjunAtlast/js-datastructure | dist/ds/abstract/abstract-list.js | "use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const abstract_collection_1 = require("./abstract-collection");
/**
An abstract implementation of List interface
*/
class AbstractList extends abstract_collection_1.AbstractCollection {
constructor(...args) {
super(...args);
}... |
shaojiankui/iOS10-Runtime-Headers | PrivateFrameworks/PhotoLibraryServices.framework/PLSidecarFile.h | /* Generated by RuntimeBrowser
Image: /System/Library/PrivateFrameworks/PhotoLibraryServices.framework/PhotoLibraryServices
*/
@interface PLSidecarFile : _PLSidecarFile
@property (nonatomic, readonly, retain) NSURL *fileURL;
- (id)fileURL;
- (void)setCaptureDateFromExifDictionary:(id)arg1;
@end
|
javagl/CommonUI | src/main/java/de/javagl/common/ui/utils/desktop/JDesktopPaneLayout.java | <filename>src/main/java/de/javagl/common/ui/utils/desktop/JDesktopPaneLayout.java
/*
* www.javagl.de - Common - UI
*
* Copyright (c) 2013-2015 <NAME> - http://www.javagl.de
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* f... |
MitkoDG/mySoftUniJorney | Fundamentals/textProcessing/excercise/02.modernTimes.js | function modernTask(text) {
let result = [];
for (let element of text.split(" ")) {
if (element[0] === "#" && element.length !== 1) {
result.push(element.substring(1));
}
}
let final = [];
for (let el of result) {
let array = el.split("");
let arrL = array.length;
let flag = true;
... |
Sirokujira/MicroFrameworkPK_v4_3 | Solutions/SAM7X_EK/DeviceCode/EMAC/SAM7X_EMAC_Config.cpp | <gh_stars>1-10
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Copyright (c) Microsoft Corporation. All rights reserved.
//////////////////////////////////////////... |
ostseegloeckchen/basics | Laden_mithilfe_pickle.py | <reponame>ostseegloeckchen/basics<gh_stars>0
#Das Skript funktioniert nicht
import pickle
wissen=open("Daten\\test6.txt","w")
buch=pickle.load(wissen)
wissen.close()
|
starlingx-staging/stx-ha | service-mgmt/sm-1.0.0/src/sm_heartbeat_msg.h | //
// Copyright (c) 2014-2017 Wind River Systems, Inc.
//
// SPDX-License-Identifier: Apache-2.0
//
#ifndef __SM_HEARTBEAT_MSG_H__
#define __SM_HEARTBEAT_MSG_H__
#include <stdint.h>
#include "sm_limits.h"
#include "sm_types.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef bool (*SmHeartbeatMsgAuthCallbackT) (char ... |
hifi/matrix-media-repo | templating/templates.go | package templating
import (
"fmt"
"html/template"
"path"
"sync"
"github.com/turt2live/matrix-media-repo/common/config"
)
type templates struct {
cached map[string]*template.Template
}
var instance *templates
var singletonLock = &sync.Once{}
func GetInstance() *templates {
if instance == nil {
singletonLoc... |
automation-club/pinmame | src/unix/dirio.c | #include "xmame.h"
#include <stdarg.h>
#include <unistd.h>
#include <dirent.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <zlib.h>
#ifdef BSD43 /* old style directory handling */
#include <sys/types.h>
#include <sys/dir.h>
#define dirent direct
#endif
/* #define FILEIO_DEBUG */
#define MAXPATHC 20 /* at mo... |
sc1987910/quick-cocos2d-x | template/PROJECT_TEMPLATE_01/proj.win32/ProjectConfigDialog.h | #pragma once
#include "resource.h"
// C RunTime Header Files
#include "CCStdC.h"
#include <string>
#include "SimulatorConfig.h"
class ProjectConfigDialog
{
public:
static bool showModal(HWND hwnd, ProjectConfig *project, const string dialogCaption = string(""), const string buttonCaption = string(""));
~Pr... |
myles-novick/ml-workflow | feature_store/src/test/tests/test_get_features_by_name.py | <gh_stars>0
from typing import List
from requests.auth import HTTPBasicAuth
from shared.logger.logging_config import logger
from ...rest_api import crud
from ..fixtures.conftest import APP, get_my_session, override_get_db, test_app
from ..fixtures.feature_set import create_fset_with_features
APP.dependency_override... |
LeonChen1024/algorithm-4th-exercise | alg4/src/edu/princeton/cs/exercise/chapter2_5/E02_05_04.java | package edu.princeton.cs.exercise.chapter2_5;
import java.util.ArrayList;
import java.util.Arrays;
import edu.princeton.cs.algs4.StdOut;
/**
* 2.5.4 Implement a method String[] dedup(String[] a) that returns the objects in a[] in sorted
* order, with duplicates removed.
*
* <p>实现一个方法 String[] dedup(String[] a) 将... |
earthcomputing/Netronome | nfp-sdk-6.0.1/p4/components/dcfl/me/lib/dcfl/libdcfl.c | <gh_stars>0
/*
* Copyright (C) 2014, Netronome Systems, Inc. All rights reserved.
*
* @file lib/dcfl/libdcfl.c
* @brief DCFL library for MicroC
*/
#ifndef _DCFL__LIBDCFL_C_
#define _DCFL__LIBDCFL_C_
#include <assert.h>
#include <nfp.h>
#include <nfp/me.h>
#include <stdint.h>
#include <types.h>... |
matthewloring/core | x/ref/services/identity/internal/server/identityd.go | <gh_stars>0
// Copyright 2015 The Vanadium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// HTTP server that uses OAuth to create security.Blessings objects.
package server
import (
"fmt"
mrand "math/rand"
"net"
"net/http"
"s... |
DanielSpasov/Game-Hub | src/components/InfoBox/index.js | <reponame>DanielSpasov/Game-Hub
import InfoBox from './InfoBox'
export default InfoBox |
civet148/gotools | mq/test/consumer/main.go | package main
import (
"github.com/civet148/gotools/log"
"github.com/civet148/gotools/mq"
_ "github.com/civet148/gotools/mq/rabbit"
)
type ConsumerHandler struct {
}
func main() {
var err error
//var strTopicRoutingKey = "TOPIC.NEWS.ROUTINGKEY"
var strTopicBindingKey = "TOPIC.NEWS.#" //#表示一个或多个单词(以.分割),*表示一个单词
... |
BSeppke/vigra | include/vigra/random_forest/rf_split.hxx | <reponame>BSeppke/vigra<gh_stars>100-1000
/************************************************************************/
/* */
/* Copyright 2008-2009 by <NAME> and <NAME> */
/* ... |
raymondchen625/grafana | pkg/services/preference/prefimpl/store_test.go | <reponame>raymondchen625/grafana
//go:build integration
// +build integration
package prefimpl
import (
"context"
"testing"
"time"
"github.com/google/go-cmp/cmp"
"github.com/grafana/grafana/pkg/models"
pref "github.com/grafana/grafana/pkg/services/preference"
"github.com/grafana/grafana/pkg/services/sqlstore"... |
sammympie/scitools | lib/scitools/_numpyload.py | """
Note:
This module stems from the days when there were three (almost) competing
Numerical Python implementations around and people wanted to be able
to switch between these implementations in their Python programs.
Nowadays, numpy is the dominating module, and the use of _numpyload and
numpytools is no longer partic... |
chewaca/gtsSolution | GtsSoftware/src/GtsSoftware/personal/diasnolaboralData.java | <reponame>chewaca/gtsSolution
package GtsSoftware.personal;
import java.io.Serializable;
import java.util.Date;
public class diasnolaboralData implements Serializable{
private Integer codigo;
private String nombre;
private Date fecha;
private String motivo;
public Integer getCodigo() {
return codigo;
}
publi... |
ggydush-fn/flytekit | tests/flytekit/integration/remote/mock_flyte_repo/workflows/basic/joblib.py | """Test joblib file."""
import os
import typing
import joblib
import flytekit
from flytekit import task, workflow
from flytekit.types.file import JoblibSerializedFile
@task
def joblib_task(obj: typing.List[int]) -> JoblibSerializedFile:
working_dir = flytekit.current_context().working_directory
filename = ... |
petergroth/trajectory_forecasting | src/training_modules/train_nbody_model.py | import argparse
import math
import os
import random
from typing import Union
import hydra
import pytorch_lightning as pl
import torch
import torch_geometric.nn
import torchmetrics
import yaml
from omegaconf import DictConfig, OmegaConf
from pytorch_lightning.loggers import WandbLogger
from pytorch_lightning.utilities.... |
eeyesonme/myspider | projects/ireader/src/main/java/com/digitalplay/network/ireader/book/controller/BookController.java | package com.digitalplay.network.ireader.book.controller;
import java.util.Map;
import javax.servlet.ServletRequest;
import javax.transaction.Transactional;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.stereotype.Controller;
imp... |
djee-ms/webrtc-scripts | defaults.py | <gh_stars>1-10
"""
This file holds default settings value and it is used like template for creation userdef.py file.
If you want to change any variable listed below do that in generated userdef.py file.
"""
#args.gn template path
webRTCGnArgsTemplatePath='./webrtc/windows/templates/gns/args.gn'
#Supported platfor... |
bill1812/wicromatch | benchmark/fixtures/match/star-basename-short.js | module.exports = [
[
"a00.js",
"b00.js",
"c00.js",
"d00.js",
"e00.js",
"f00.js",
"g00.js",
"h00.js",
"i00.js",
"j00.js",
"k00.js",
"l00.js",
"m00.js",
"n00.js",
"o00.js",
"p00.js",
"q00.js",
"r00.js",
"s00.js",
"t00.js",
"u00.js",
... |
imgstack/stackpath-cdn-go | models/custconf_auth_geo.go | <filename>models/custconf_auth_geo.go
// Code generated by go-swagger; DO NOT EDIT.
package models
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"context"
"github.com/go-openapi/errors"
"github.com/go-openapi/strfmt"
... |
kubemq-hub/kubemq-target-connectors | targets/gcp/memorystore/redis/connector.go | package redis
import (
"github.com/kubemq-hub/builder/connector/common"
"math"
)
func Connector() *common.Connector {
return common.NewConnector().
SetKind("gcp.cache.redis").
SetDescription("GCP Memory Store Redis Target").
SetName("Redis").
SetProvider("GCP").
SetCategory("Cache").
SetTags("db","memo... |
jstokes/secure-data-service | tools/odin/lib/Shared/EntityClasses/enum/GraduationPlanType.rb | =begin
Copyright 2012-2013 inBloom, Inc. and its affiliates.
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... |
adesutherland/crexx | re2c/test/american_fuzzy_lop/005.c | <filename>re2c/test/american_fuzzy_lop/005.c
american_fuzzy_lop/005.re:2:9: error: syntax error in escape sequence
|
hernad/zimbra9 | zm-mailbox/store/src/java-test/com/zimbra/cs/mailbox/acl/AclPushTest.java | <filename>zm-mailbox/store/src/java-test/com/zimbra/cs/mailbox/acl/AclPushTest.java
/*
* ***** BEGIN LICENSE BLOCK *****
* Zimbra Collaboration Suite Server
* Copyright (C) 2014, 2016 Synacor, Inc.
*
* This program is free software: you can redistribute it and/or modify it under
* the terms of the GNU General Pub... |
eID-Testbeds/server | eidsrv-testbed-runner/src/main/java/com/secunet/eidserver/testbed/tlsclient/TLSConnection.java | package com.secunet.eidserver.testbed.tlsclient;
import java.io.IOException;
import java.io.PrintWriter;
import java.io.StringWriter;
import java.lang.reflect.Field;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.bouncycastle.crypto.params.AsymmetricKeyParamete... |
ShreyanshRoyGeek/Java-Logical_Programming | Moderate Program/src/Rectangle.java |
public class Rectangle {
int width;
int length;
void area(int length,int width)
{
this.length = length;
this.width = width;
int area = (this.length*this.width);
System.out.println(area);
}
public static void main(String[] args) {
Rectangle r = new Rectangle();
r.area(4, 5);
}
... |
nikiqta/HomeWork | node-express-mongoose/MongoDBAndMongoose/index.js | const mongodb = require('mongodb');
let connectionStr = 'mongodb://localhost:27017/liveDemoDB';
mongodb.MongoClient.connect(connectionStr)
.then(client => {
let db = client.db('liveDemoDB');
let dogs = db.collection('dogs');
/*
dogs.insert({
name: 'Hektor',
... |
santosh-shaastry/lithium-sdk | test/lib/responsive-options-test.js | <gh_stars>10-100
'use strict';
var rewire = require('rewire');
var nock = require('nock');
var chai = require('chai');
var expect = chai.expect;
var path = require('path');
var gutil = require('gulp-util');
var fs = require('fs');
var through = require('through2');
var testRoot = path.resolve(__dirname) + '/..';
var s... |
abodacs/django-fullstack-biolerplate | backend/apps/projects/models.py | <reponame>abodacs/django-fullstack-biolerplate
import datetime
from django.conf import settings
from django.core.exceptions import ValidationError
from django.db import models
from django.db.models import Q
from django.utils.translation import ugettext_lazy as _
from common.models import IndexedTimeStampedModel
cla... |
Oldes/rs | projects/ucs2/latest/charmaps/CP1256.d.rb | <reponame>Oldes/rs
; CP1256 UCS-2 decoding rule
; source: ftp://dkuug.dk/i18n/charmaps/CP1256
any [
#{060C} (insert tail result #{80}) |
#{0660} (insert tail result #{81}) |
#{201A} (insert tail result #{82}) |
#{0661} (insert tail result #{83}) |
#{201E} (insert tail result #{84}) |
#{2026} (insert tail result #... |
academyyyy12/LIA-LEARNING | src/app/pages/pages.module.js | <filename>src/app/pages/pages.module.js<gh_stars>1-10
function rowSelect() {
return {
require: '^stTable',
template: '<input type="checkbox" class="s-row-select">',
scope: {
row: '=rowSelect'
},
link: function (scope, element, attr, ctrl, prop) {
eleme... |
EchoThreeLLC/echothree | ui/web/main/src/java/com/echothree/ui/web/main/action/configuration/postaladdresslineelement/AddActionForm.java | <reponame>EchoThreeLLC/echothree
// --------------------------------------------------------------------------------
// Copyright 2002-2022 Echo Three, LLC
//
// 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 o... |
QuietSugar/run-java | project-mybatis-generator/src/test/java/name/xu/utils/VelocityUtilTest.java | package name.xu.utils;
import org.junit.Test;
import java.io.FileWriter;
import java.io.IOException;
import java.util.HashMap;
/**
* @author Created by HuoXu
*/
public class VelocityUtilTest {
@Test
public void gen2File() throws IOException {
HashMap<String, Object> map = new HashMap<>();
... |
Degget1986/neo-mamba | neo3/network/payloads/inventory.py | <reponame>Degget1986/neo-mamba<gh_stars>10-100
from __future__ import annotations
from enum import IntEnum
from typing import List
from neo3.core import types
from neo3.core import Size as s, utils
from neo3.core import serialization
import abc
from .verification import IVerifiable
class InventoryType(IntEnum):
T... |
simokhov/schemas44 | src/main/java/ru/gov/zakupki/oos/eptypes/_1/AppCorrespondenceType.java | //
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// 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: 2019.07.... |
MrLys/verbose-waffle | src/main/java/no/rutta/rutta/common/Identifiable.java | package no.rutta.rutta.common;
public interface Identifiable {
int getId();
}
|
shuaicj/hello-java | hello-string/src/test/java/shuaicj/hello/string/StringTest.java | package shuaicj.hello.string;
import org.junit.Test;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
/**
* Test String.
*
* Conclusions:
* 1. Literal Strings are always in the pool.
* 2. Strings by 'new String(..)' are not in the pool.
* 3. Strings by 'String.intern... |
theatrus/drivers | ads1x15/driver_test.go | package ads1x15
import (
"testing"
"github.com/reef-pi/hal"
)
var params = map[string]interface{}{
"Address": 72,
"Gain 1": "2/3",
"Gain 2": "1",
"Gain 3": "2",
"Gain 4": 4,
}
type mock struct {
Bytes []byte
}
func (m *mock) SetAddress(_ byte) error { return nil }
func (m *mock) Re... |
test-coverage-enforce-bot/wso2-ode | axis2/src/main/java/org/apache/ode/axis2/httpbinding/ProxyConf.java | <reponame>test-coverage-enforce-bot/wso2-ode
/*
* 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 ... |
danil/logastic | uint8p.go | <filename>uint8p.go
// Copyright 2021 The Go 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 log0
// Uint8p returns stringer/JSON/text marshaler for the uint8 pointer type.
func Uint8p(p *uint8) uint8P { return uint8P{P: p} ... |
billlin0904/xamp2 | src/xamp_output_device/include/output_device/win32/wasapi.h | <reponame>billlin0904/xamp2<filename>src/xamp_output_device/include/output_device/win32/wasapi.h
//=====================================================================================================================
// Copyright (c) 2018-2021 xamp project. All rights reserved.
// More license information, please see L... |
Jumpscale/jumpscale_examples7 | examples/serializers/multiserialze.py | import os
import struct
from JumpScale import j
import JumpScale.baselib.serializers
j.application.start("blowfishtest")
from random import randrange
msg = ""
for i in range(500):
msg += chr(randrange(0, 256))
key = ""
for i in range(56):
key += chr(randrange(0, 256))
serializationstr = "mcb"
s = j.db.se... |
lucascassilha/react-fastfeet | src/pages/Providers/index.js | import React, { useState, useEffect } from 'react';
import { useDispatch, useSelector } from 'react-redux';
import { produce } from 'immer';
import { toast } from 'react-toastify';
import { IoIosMore, IoIosArrowBack, IoIosArrowForward } from 'react-icons/io';
import { FaTrashAlt, FaPen } from 'react-icons/fa';
import... |
Copeland87/Nuanced | models/user.js | <filename>models/user.js
var passportLocalSequelize = require("passport-local-sequelize");
module.exports = function(sequelize, DataTypes) {
var User = passportLocalSequelize.defineUser(sequelize, {
favoriteColor: DataTypes.STRING
});
return User;
} |
siahr/basex | basex-tests/src/test/java/org/basex/qt3ts/op/OpSubtractYearMonthDurations.java | <gh_stars>0
package org.basex.qt3ts.op;
import org.basex.tests.bxapi.XQuery;
import org.basex.tests.qt3ts.*;
/**
* Tests for the subtract-yearMonthDurations() function.
*
* @author BaseX Team 2005-13, BSD License
* @author <NAME>
*/
@SuppressWarnings("all")
public class OpSubtractYearMonthDurations extends QT3Te... |
jianjunchu/pentaho-kettle | plugins/pentaho-obs-vfs/src/test/java/org/pentaho/obs/vfs/OBSFileProviderTest.java | /*******************************************************************************
*
*
*
* Copyright (C) 2011-2019 by Sun : http://www.kingbase.com.cn
*
*******************************************************************************
*
*
* Email : <EMAIL>
*
*
***********************************************... |
npocmaka/Windows-Server-2003 | inetsrv/iis/iisrearc/iisplus/mbid/mbid.cxx | /*++
Copyright (c) 1996 Microsoft Corporation
Module Name:
mbid.cxx
Abstract:
Builds a library that defines the MB guids.
Author:
<NAME> (TaylorW) 13-Dec-1999
Revision History:
--*/
#include <windows.h>
#include <initguid.h>
#include <iadmw.h>
|
cloudfoundry-attic/perm | internal/migrations/7_combine_actor_and_role_assignment_tables.go | package migrations
import (
"context"
"code.cloudfoundry.org/perm/internal/sqlx"
"code.cloudfoundry.org/perm/logx"
"github.com/Masterminds/squirrel"
uuid "github.com/satori/go.uuid"
)
var createAssignmentTable = `
CREATE TABLE IF NOT EXISTS assignment
(
id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY,
uuid BI... |
timxor/leetcode-journal | solutions/LeetCode/Java/49.java | <filename>solutions/LeetCode/Java/49.java
__________________________________________________________________________________________________
6ms
class Solution {
int[] hash = {2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 47, 53, 59, 67, 71, 83, 89, 101, 107, 109, 113, 127, 131};
public List<List<String>> gro... |
chinhung/demoshop | src/main/java/net/chinhung/application/endpoint/order/impl/create_order/CreateOrderService.java | <filename>src/main/java/net/chinhung/application/endpoint/order/impl/create_order/CreateOrderService.java
package net.chinhung.application.endpoint.order.impl.create_order;
import net.chinhung.application.endpoint.order.impl.OrderConverter;
import net.chinhung.application.endpoint.order.CreateOrder;
import net.chinhun... |
hyunaaaah/0000 | src/js/markets.js | require('bootstrap');
require('../less/markets.less');
require('../less/market-intro.less');
require('../less/common.less');
require('./common');
require('./market-tab');
require('./headline');
var URLSearchParams = require('url-search-params');
var params = new URLSearchParams(location.search);
var marketId = params... |
dmgerman/zephyrd3 | boards/arm/nrf52_vbluno52/board.h | DECL|BUT_GPIO_NAME|macro|BUT_GPIO_NAME
DECL|BUT_GPIO_PIN|macro|BUT_GPIO_PIN
DECL|LED0_GPIO_PIN|macro|LED0_GPIO_PIN
DECL|LED0_GPIO_PORT|macro|LED0_GPIO_PORT
DECL|LED_GPIO_PIN|macro|LED_GPIO_PIN
DECL|LED_GPIO_PORT|macro|LED_GPIO_PORT
DECL|SW0_GPIO_NAME|macro|SW0_GPIO_NAME
DECL|SW0_GPIO_PIN|macro|SW0_GPIO_PIN
DECL|__INC_B... |
tadvi/uva | UVa 1548 - The Game of Master-Mind/sample/1548 - The Game of Master-Mind.cpp | <gh_stars>1-10
#include <stdio.h>
#include <string.h>
#include <algorithm>
using namespace std;
const int MAXM = 128;
const int MAXP = 11;
const int MAXC = 128;
int P, C, M;
int B[MAXM], W[MAXM], G[MAXM][MAXP], CG[MAXM][MAXC];
int path[MAXP], bcnt[MAXM], bwcnt[MAXM], CGcnt[MAXC];
// B[i] = |vector_intersection(G, S)|... |
ejkim-dev/ejkim-dev | TIL/Android/MyTravelDiary/MyTravelDiary/app/src/main/java/com/example/mytraveldiary/FindPWActivity.java | <gh_stars>0
package com.example.mytraveldiary;
import androidx.appcompat.app.AppCompatActivity;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;
import android.widget.Toast;
import com.exam... |
natdurlik/chicken-challenge-game | core/src/com/mygdx/game/ChangeChickenSkinCommand.java | package com.mygdx.game;
public class ChangeChickenSkinCommand implements Command{
@Override
public void execute(float delta) {
Player.getInstance().changeTexture();
}
}
|
Mortano/Prismatic | PrismaticCore/Headers/Rendering/Utility/peBxDF.h | <gh_stars>0
#pragma once
#include "Type/peColor.h"
#include "Type\peBitmask.h"
#include "peCoreDefs.h"
#include <glm/detail/type_vec2.hpp>
#undef max
#include <gsl.h>
#include <random>
#pragma warning(push)
#pragma warning(disable : 4251)
/*
* Everything in here is taking more or less one-to-one from 'Physically ba... |
augustinebest/app | tests/saas-tests/dashboard/StatusPage.test.js | <filename>tests/saas-tests/dashboard/StatusPage.test.js
const puppeteer = require('puppeteer');
const utils = require('../../test-utils');
const init = require('../../test-init');
require('should');
// user credentials
const email = utils.generateRandomBusinessEmail();
const password = '<PASSWORD>';
const componentNa... |
devovi/ia-node | app/iot/app/router/http/building_router.js | <filename>app/iot/app/router/http/building_router.js
buildingRouter = function(app){
const colors = require('colors');
//**************************** Collections ****************************
// Fetches all data of collections
app.route('/building/findall')
.get(function(req, res){
console.log(colors.b... |
zchee/protoc-gen-jsonschema | vendor/github.com/golang/protobuf/proto/message_set.go | // Copyright 2010 The Go 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 proto
/*
* Support for message sets.
*/
import (
"errors"
"reflect"
"google.golang.org/protobuf/reflect/protoreflect"
)
// errNoMessageTypeID o... |
Beguiled/omi | Unix/samples/Providers/Color/ColorBase.h | /* @migen@ */
/*
**==============================================================================
**
** WARNING: THIS FILE WAS AUTOMATICALLY GENERATED. PLEASE DO NOT EDIT.
**
**==============================================================================
*/
#ifndef _ColorBase_h
#define _ColorBase_h
#include <MI.h>
/... |
MrDML/LinKingSDKWLZG | LinKingSDK/Products/LinKingSDK.framework/Headers/LKOrderApi.h | <filename>LinKingSDK/Products/LinKingSDK.framework/Headers/LKOrderApi.h
//
// LKOrderApi.h
// LinKingSDK
//
// Created by leoan on 2020/7/22.
// Copyright © 2020 <EMAIL>. All rights reserved.
//
#import "LKBaseApi.h"
NS_ASSUME_NONNULL_BEGIN
@interface LKOrderApi : LKBaseApi
+ (void)orderRecordQuery:(NSString *)f... |
TRibeiro94/ISEP-ARQSI-2020 | Semester_Project/SPA/src/components/showPathsComp/ShowPathsComp.js | import React, { Component } from "react";
import { Table, Tag, Button } from "antd";
import masterDataRede from "../../apis/masterDataRede";
class ShowPathsComp extends Component {
constructor(props) {
super(props);
this.state = {
paths: null,
pathNodes: null,
n... |
anruky/Zeta | zds-server/src/main/java/com/ebay/dss/zds/runner/CustomizableThreadFactory.java | <reponame>anruky/Zeta
package com.ebay.dss.zds.runner;
import org.springframework.lang.Nullable;
import org.springframework.util.ClassUtils;
import java.io.Serializable;
import java.util.concurrent.ThreadFactory;
import java.util.concurrent.atomic.AtomicInteger;
/**
* Created by tatian on 2020-09-07.
*/
public cla... |
acidicMercury8/xray-1.0 | sdk/MagicSoftware/FreeMagic/Source/Numerics/MgcSpecialFunction.cpp | // Magic Software, Inc.
// http://www.magic-software.com
// Copyright (c) 2000-2002. All Rights Reserved
//
// Source code from Magic Software is supplied under the terms of a license
// agreement and may not be copied or disclosed except in accordance with the
// terms of that agreement. The various license ag... |
ahodanenok/gwt-rpc-stub | src/main/java/ahodanenok/gwt/stub/gui/dialog/ServiceStubDialog.java | <filename>src/main/java/ahodanenok/gwt/stub/gui/dialog/ServiceStubDialog.java
package ahodanenok.gwt.stub.gui.dialog;
import ahodanenok.gwt.stub.gui.component.ComponentUtils;
import ahodanenok.gwt.stub.core.Profile;
import ahodanenok.gwt.stub.core.ServiceStub;
import ahodanenok.gwt.stub.core.Stubs;
import ahodanenok.g... |
twigkit/aws-sdk-java | aws-java-sdk-support/src/main/java/com/amazonaws/services/support/model/TrustedAdvisorResourcesSummary.java | <filename>aws-java-sdk-support/src/main/java/com/amazonaws/services/support/model/TrustedAdvisorResourcesSummary.java
/*
* Copyright 2010-2016 Amazon.com, Inc. or its affiliates. All Rights
* Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in complia... |
vlsi/pru-emulator | src/main/java/com/github/vlsi/pru/plc110/CodeEmitter.java | <reponame>vlsi/pru-emulator
package com.github.vlsi.pru.plc110;
import com.github.vlsi.pru.plc110.debug.RegisterVariableLocation;
import java.util.ArrayList;
import java.util.List;
public class CodeEmitter {
final List<Instruction> result = new ArrayList<>();
final List<Integer> jumpInstructions = new ArrayList<... |
asiboro/asiboro.github.io | vsdoc/search--/s_3731.js | search_result['3731']=["topic_00000000000008F0.html","StageTabListDto.StageTabList Property",""]; |
darlyhellen/oto | DLClent_A/src/design/patterns/structural/Decorator/DecoratorSource.java | <filename>DLClent_A/src/design/patterns/structural/Decorator/DecoratorSource.java
/**上午10:44:01
* @author zhangyh2
* DecoratorSource.java
* TODO
*/
package design.patterns.structural.Decorator;
/**
* @author zhangyh2 DecoratorSource 上午10:44:01 TODO Decorator类是一个装饰类
*/
public class DecoratorSource implements Sour... |
ernestyalumni/HrdwCCppCUDA | Constructicon/Source/Performance/CPrimer/pointer.c | <filename>Constructicon/Source/Performance/CPrimer/pointer.c
/*******************************************************************************
* @ref MIT 6.172 Fall 2018 Hwk 1, c-primer
******************************************************************************/
#include <stdio.h>
#include <stdlib.h>
#include <std... |
phpc0de/idea-android | transport-database/testSrc/com/android/tools/datastore/database/MemoryStatsTableTest.java | /*
* Copyright (C) 2017 The Android Open Source Project
*
* 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 app... |
tobiasvasquez/P2Tec | controllers/perfilController.js | <filename>controllers/perfilController.js
const jsonModel = require('../models/jsonModel');
const productModel = jsonModel('products');
let db = require("../database/models");
const sequelize = require('sequelize');
const Op = sequelize.Op;
const {
validationResult
} = require("express-validator");
const bcrypt = req... |
enterpact/enterchain | ethereum/eth/src/test/java/org/enterchain/enter/ethereum/eth/manager/task/GetReceiptsFromPeerTaskTest.java | <filename>ethereum/eth/src/test/java/org/enterchain/enter/ethereum/eth/manager/task/GetReceiptsFromPeerTaskTest.java
/*
* Copyright ConsenSys AG.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the Licens... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.