repo_name stringlengths 6 101 | path stringlengths 4 300 | text stringlengths 7 1.31M |
|---|---|---|
Max-PJB/python-learning2 | LeetCode/weekly-contest-144-2019.11.04/defangIPaddr_1108.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
-------------------------------------------------
@ Author : pengj
@ date : 2019/11/4 14:12
@ IDE : PyCharm
@ GitHub : https://github.com/JackyPJB
@ Contact : <EMAIL>
---------------------------------... |
graphisoft-python/TextEngine | Support/Modules/Geometry/Real.hpp | #if !defined (REAL_HPP)
#define REAL_HPP
#pragma once
#include <math.h>
#if !defined (REALNUMBER_H)
#include "RealNumber.h"
#endif
namespace Geometry {
// =============================================================================
//
// General comparision functions (allowing number type-templated algorihms
//
/... |
uk-gov-mirror/hmcts.hwf-staffapp | db/migrate/20151210152605_create_business_entities.rb | class CreateBusinessEntities < ActiveRecord::Migration[5.2]
def up
create_table :business_entities do |t|
t.references :office, null: false, index: true
t.references :jurisdiction, null: false, index: true
t.string :code, null: false, index: true
t.string :name, null: false, index: true
... |
webdevhub42/Lambda | WEEKS/CD_Sata-Structures/_MISC/misc-examples/python3-book-examples/asyncio/asyncio_coroutine.py | # Copyright (c) 2014 <NAME>. All rights reserved.
"""Starting a coroutine
"""
# end_pymotw_header
import asyncio
async def coroutine():
print("in coroutine")
event_loop = asyncio.get_event_loop()
try:
print("starting coroutine")
coro = coroutine()
print("entering event loop")
event_loop.run_un... |
ci123chain/ci123chain | pkg/ibc/core/channel/keeper/grpc_query.go | <filename>pkg/ibc/core/channel/keeper/grpc_query.go<gh_stars>0
package keeper
import (
"context"
"github.com/ci123chain/ci123chain/pkg/ibc/core/exported"
"strconv"
"strings"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
prefix "github.com/ci123chain/ci123chain/pkg/abci/store"
sdk "github.com... |
vedant080102/FSD-MERN-GRP27-METER_DOWN | middleware/auth.js | <reponame>vedant080102/FSD-MERN-GRP27-METER_DOWN<filename>middleware/auth.js
const jwt= require("jsonwebtoken")
const fs = require('fs');
const path = require('path');
const pathToKey = path.join(__dirname, '..', 'id_rsa_pub.pem');
const PUB_KEY = fs.readFileSync(pathToKey, 'utf8');
const User = require("../models/User... |
nwtgck/scala | test/files/pos/t4205/1.scala | trait A[OUT[_]] {
null.asInstanceOf[B[OUT]].b1("")
} |
ubidreams/wisdom | core/wisdom-vertx-engine/src/main/java/org/wisdom/framework/vertx/WebSocketHandler.java | <gh_stars>10-100
/*
* #%L
* Wisdom-Framework
* %%
* Copyright (C) 2013 - 2014 Wisdom Framework
* %%
* 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/lic... |
bayusamudra5502/PustakaCpp | STL/eksperimen/median.cpp | <reponame>bayusamudra5502/PustakaCpp
#include <bits/stdc++.h>
using namespace std;
int n, db[10];
int median(int low, int high)
{
// BANYAK KECOA DISINI :v
if (low == high)
return db[low];
int l = low, r = high;
int pivot = db[(l + r) / 2];
int tengah = (l + r) / 2;
while (l < r)
... |
mcanlas/6502-opcodes | src/main/scala/com/htmlism/mos6502/dsl/Operand.scala | package com.htmlism.mos6502.dsl
trait Operand[A] {
self =>
def toAddressLiteral(x: A): String
/**
* Suitable for comments
*/
def toShow(x: A): String
def operandType: OperandType
}
object Operand {
implicit val operandInt: Operand[Int] =
new Operand[Int] {
val operandType: OperandType... |
subuta/blog-js | src/views/pages/auth/cb.js | <gh_stars>1-10
import React from 'react'
import _ from 'lodash'
import { withRouter } from 'next/router'
import Head from 'next/head'
import connext from 'src/views/hoc/connext'
import auth0 from 'src/views/utils/auth0'
import storage from 'src/views/utils/storage'
import CustomLoader from 'src/views/components/comm... |
manel1874/libscapi | include/infra/MathAlgorithms.hpp | <reponame>manel1874/libscapi
/**
* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
*
* Copyright (c) 2016 LIBSCAPI (http://crypto.biu.ac.il/SCAPI)
* This file is part of the SCAPI project.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Permission is hereby gran... |
pooja-gera/TheWireUsChallenge | Web Scraping (Beautiful Soup, Scrapy, Selenium)/Web Scraping_ Day22/Locating Elements from html using selenium/SourceCode.py | <gh_stars>0
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.common.by import By
from selenium. webdriver.support.ui import WebDriverwait
from selenium. webdriver.support import expected_conditions as EC
import time
PATH = "C:Program Files (x86)\chromedriver.exe"
d... |
medismailben/llvm-project | llvm/include/llvm/ADT/PriorityQueue.h | //===- llvm/ADT/PriorityQueue.h - Priority queues ---------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===---------------------------... |
Canfone2209/Website-Gatsby | src/components/shop/components/phone_products/index.js | import React, { Fragment } from 'react';
import Item from './item';
function Phone({packages, order_data, setPhonePackage, updatePhonePortOption, updatePhonePortAuthorization, lang}) {
const products = packages.map((item) =>
<Item
key={item.id}
id={item.id}
lang={lang}
title={item.title}... |
flowermy/chovietjp | views/src/components/account/authActions.js | <reponame>flowermy/chovietjp
import axios from 'axios';
import {apiUrls} from "../../common/url-configs/common-url";
export default function login(data) {
return () => {
return axios.post(apiUrls.INIT + apiUrls.LOGIN, data, {withCredentials: true}).then((res) => {
const token = res.data.token;
localS... |
victorgallegosGIT/Serenity-PageObject-Sistema | src/test/java/motoresdebusqueda/SistemaAcuerdos/steps/AltaDePerfil.java | package motoresdebusqueda.SistemaAcuerdos.steps;
import motoresdebusqueda.SistemaAcuerdos.pageobject.ConfiguracionAltaPerfil;
import motoresdebusqueda.SistemaAcuerdos.pageobject.VisualizacionesAltas;
import motoresdebusqueda.SistemaAcuerdos.pageobject.SistemaDeAcuerdosLogin;
import io.cucumber.java.en.And;
import io.... |
clayne/RGA | source/radeon_gpu_analyzer_gui/rg_resource_usage_csv_file_parser.cpp | <reponame>clayne/RGA
// C++.
#include <cassert>
// Local.
#include "radeon_gpu_analyzer_gui/rg_resource_usage_csv_file_parser.h"
bool RgResourceUsageCsvFileParser::ProcessLineTokens(const std::vector<std::string>& tokens)
{
bool ret = false;
// Verify that the number of tokens matches the number of columns i... |
ray1888/go-leetcode | src/heap/Merge-k-sorted-lists.go | package heap
type ListNode struct {
Val int
Next *ListNode
}
// func mergeKListsMinHeap(lists []*ListNode) *ListNode {
// }
func mergeTwoList(left, right *ListNode) *ListNode {
dummy := &ListNode{}
cur := dummy
for left != nil && right != nil {
if left.Val > right.Val {
cur.Next = right
right = right.... |
aviral243/interviewbit-solutions-1 | Arrays/infinite_2d_array.cpp | <reponame>aviral243/interviewbit-solutions-1
#include <iostream>
#include <math.h>
#include <algorithm>
#include <vector>
using namespace std;
int coverPoints(vector<int> &A, vector<int> &B)
{
int positionX = *A.begin(), positionY = *B.begin();
int steps = 0;
int i = 1;
int diffX, diffY, minDiff;
while (i <... |
alecnunn/mud | src/lang/Types.h | #pragma once
#include <lang/Forward.h>
#if !defined MUD_MODULES || defined MUD_TYPE_LIB
#include <type/Type.h>
#include <type/Vector.h>
#endif
#ifndef MUD_MODULES
#include <infra/Types.h>
#include <type/Types.h>
#include <pool/Types.h>
#include <refl/Types.h>
#endif
#ifndef MUD_CPP_20
#include <string>
#include <cs... |
mgpavlov/SoftUni | Java/Java Web/02.Java MVC Frameworks - Spring - February 2019/03.Unit Testing And Isolation/Exercise/cardealer-Integration Tests/src/test/java/org/softuni/cardealer/service/SaleServiceTests.java | package org.softuni.cardealer.service;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.modelmapper.ModelMapper;
import org.softuni.cardealer.domain.entities.Car;
import org.softuni.cardealer.domain.entities.Customer;
import org.softuni.cardealer.doma... |
xhuangmlnx/libocoms | ocoms/dstore/hash/dstore_hash.h | /*
* Copyright (c) 2010 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2012 Los Alamos National Security, Inc. All rights reserved.
* Copyright (c) 2014 Intel, Inc. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
*
* $HEADER$
*/
#ifndef OCOMS_DSTORE_HASH_H
... |
KristianJerpetjon/IncludeOS | api/util/units.hpp | <filename>api/util/units.hpp<gh_stars>1-10
// -*-C++-*-
// This file is a part of the IncludeOS unikernel - www.includeos.org
//
// Copyright 2017 IncludeOS AS, Oslo, Norway
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You m... |
CodingSoldier/java-learn | spring-cloud-2/app002/src/main/java/com/cpq/app002/Test002Ctrl.java | <reponame>CodingSoldier/java-learn
package com.cpq.app002;
import org.springframework.web.bind.annotation.*;
import java.util.Map;
import java.util.concurrent.TimeUnit;
/**
* @Description
* @Author chenpiqian
* @Date: 2019-07-03
*/
@RestController
@RequestMapping("/test02")
public class Test002Ctrl {
@GetMa... |
msonst/rpi-iot | rpi-iot-common/src/main/java/de/sonsts/rpi/iot/communication/common/messaage/DocumentMessageFactory.java | package de.sonsts.rpi.iot.communication.common.messaage;
import java.util.List;
import de.sonsts.rpi.iot.communication.common.ComplexValue;
import de.sonsts.rpi.iot.communication.common.DoubleSampleValue;
import de.sonsts.rpi.iot.communication.common.SpectrumValue;
import de.sonsts.rpi.iot.communication.common.messaa... |
monogenics/pdfviewers | my-pdf-app/public/WebViewer/samples/advanced/redaction/redaction-viewer.js | <gh_stars>0
// @link WebViewerInstance: https://www.pdftron.com/api/web/WebViewerInstance.html
// @link WebViewerInstance.loadDocument: https://www.pdftron.com/api/web/WebViewerInstance.html#loadDocument__anchor
// @link WebViewerInstance.disableTools: https://www.pdftron.com/api/web/WebViewerInstance.html#disableToo... |
kvsurii/capstone | src/js/pages/Tribunal.js |
import React from "react";
import { IndexLink, Link } from "react-router";
export default class Tribunal extends React.Component {
render() {
return (
<section class="tribunal">
<div class="container">
<h2><strong>About Us</strong></h2>
<br/>
<h4 class="tribunal-hea... |
ClaudiaVisentin/eeros-framework | examples/system/MockRobotSequencer.hpp | #ifndef MOCK_ROBOT_SEQUENCER_HPP_
#define MOCK_ROBOT_SEQUENCER_HPP_
#include <eeros/sequencer/Sequencer.hpp>
#include <eeros/sequencer/Sequence.hpp>
#include <eeros/sequencer/Step.hpp>
#include <eeros/sequencer/Wait.hpp>
#include "MockRobotControlSystem.hpp"
#include "MockRobotSafetyProperties.hpp"
using na... |
abreuboom/yap | node_modules/gatsby/dist/utils/worker/pool.js | "use strict";
const Worker = require(`jest-worker`).default;
const {
cpuCoreCount
} = require(`gatsby-core-utils`);
const create = () => new Worker(require.resolve(`./child`), {
numWorkers: cpuCoreCount(),
forkOptions: {
silent: false
}
});
module.exports = {
create
};
//# sourceMappingURL=pool.js.map |
fstudio/Phoenix | lib/AutoCompletion/PhoenixAutoComplete.cpp | /*********************************************************************************************************
* PhoenixAutoComplete.cpp
* Note: AutoCompletion.
* @2014.08
* E-mail:<<EMAIL>>
* Copyright (C) 2015 The ForceStudio All Rights Reserved.
***************************************************************************... |
trespasserw/MPS | plugins/mps-kotlin/languages/kotlin/source_gen/jetbrains/mps/kotlin/constraints/CompanionObject_Constraints.java | <gh_stars>0
package jetbrains.mps.kotlin.constraints;
/*Generated by MPS */
import jetbrains.mps.smodel.runtime.base.BaseConstraintsDescriptor;
import jetbrains.mps.smodel.runtime.ConstraintFunction;
import jetbrains.mps.smodel.runtime.ConstraintContext_CanBeChild;
import org.jetbrains.annotations.NotNull;
import org... |
Duffney/azure-sdk-for-go | sdk/messaging/azservicebus/internal/rpc_test.go | <gh_stars>0
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
package internal
import (
"context"
"net"
"testing"
"time"
"github.com/Azure/azure-sdk-for-go/sdk/messaging/azservicebus/internal/amqpwrap"
"github.com/Azure/azure-sdk-for-go/sdk/messaging/azservicebus/i... |
thp/wipeout-pulse-shipedit | src/psp-save/psp-save.c | <reponame>thp/wipeout-pulse-shipedit
/* Copyright (c) 2018 38_ViTa_38
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, version 2.0 or later versions.
*
* This program is distributed in th... |
Josephu/go | iso_host/iso8583_reversal_req_handler.go | <gh_stars>0
package iso_host
import "go/iso8583"
func handleReversalReq(isoResp *iso8583.Iso8583Message) {
msgTypeField := isoResp.GetFieldByName("Message Type")
msgTypeField.SetData(iso8583.IsoMsg1430)
}
|
IAries/VEDO | src/aries/utility/MatrixFs.h | #ifndef _ARIES_MATRIX_FORTRAN_STYLE_H
#define _ARIES_MATRIX_FORTRAN_STYLE_H
#include <aries/utility/DataType.h>
#include <aries/utility/XSolver.h>
#include <cstring>
#include <cstdio>
#include <cstdlib>
#include <string>
#include <iostream>
#include <iomanip>
namespace aries
{
class MatrixFs
{
public:
MatrixFs(co... |
AuDigitalHealth/clinical-document-library-java | src/main/java/au/gov/nehta/sample/diagnosticImage/SampleDiagnosticImageCreation_3A.java | package diagnosticImage;
import au.gov.nehta.builder.diagnostic.image.DiagnosticImageReportCreator;
import au.gov.nehta.builder.util.UUIDTool;
import au.gov.nehta.model.cda.common.address.PostalAddress;
import au.gov.nehta.model.cda.common.address.PostalAddressImpl;
import au.gov.nehta.model.cda.common.address.PostalA... |
SebastianWebdev/SebaKoduje | src/components/MainSlider.js | import React from "react"
import styles from "../styles/main_slider.module.css"
import Slide from "./Slide.js"
import { Carousel } from "react-bootstrap"
import { useStaticQuery, graphql } from "gatsby"
const MainSlider = props => {
const posts = useStaticQuery(graphql`
query {
gcms {
posts {
... |
sreenivas8084/cQube | tests/src/Teacher_Attendance/check_data_range.py | import re
from selenium.webdriver.support.select import Select
from Data.parameters import Data
from reuse_func import GetData
class DateRange():
def __init__(self, driver):
self.driver = driver
def check_date_range(self):
count =0
cal = GetData()
cal.click_on_state(self.drive... |
spurious/safecode-mirror | test/cstdlib/strncat-003.c | <gh_stars>1-10
// RUN: test.sh -e -t %t %s
// The destination string is written to out of bounds.
#include <string.h>
int main()
{
char a[10];
char b[500];
a[0] = '\0';
memset(b, 'b', 10);
strncat(a, b, 50);
return 0;
}
|
ym6745476/andbase-x | andbase/src/main/java/com/andbase/library/view/sample/AbOuterScrollView.java | <gh_stars>1-10
package com.andbase.library.view.sample;
import android.content.Context;
import android.util.AttributeSet;
import android.view.GestureDetector;
import android.view.GestureDetector.SimpleOnGestureListener;
import android.view.MotionEvent;
import android.widget.ScrollView;
/**
* Copyright ymbok.com
* A... |
victorgveloso/RefactoringMiner | src/gr/uom/java/xmi/UMLAbstractClass.java | package gr.uom.java.xmi;
import gr.uom.java.xmi.decomposition.OperationInvocation;
import gr.uom.java.xmi.decomposition.VariableDeclaration;
import gr.uom.java.xmi.diff.CodeRange;
import gr.uom.java.xmi.diff.RenamePattern;
import gr.uom.java.xmi.diff.StringDistance;
import org.refactoringminer.util.PrefixSuffixUtils;
... |
qianbinbin/leetcode | c/tests/string_to_integer_atoi_test.cpp | <filename>c/tests/string_to_integer_atoi_test.cpp
#include <gtest/gtest.h>
extern "C" {
#include "string_to_integer_atoi.h"
}
TEST(string_to_integer_atoi_test, myAtoi_8_1) {
EXPECT_EQ(42, myAtoi_8_1("42"));
EXPECT_EQ(-42, myAtoi_8_1("-42"));
EXPECT_EQ(4193, myAtoi_8_1("4193 with words"));
EXPECT_EQ(0,... |
bgyori/chemical-roles | src/chemical_roles/export/bel.py | # -*- coding: utf-8 -*-
"""Export to BEL."""
import pybel
from pybel import BELGraph, dsl
from tqdm import tqdm
from .utils import get_relations_df
__all__ = [
'get_bel',
]
_type_map = {
'biological process': dsl.BiologicalProcess,
'chemical': dsl.Abundance,
'organism': dsl.Population,
'phenoty... |
liamtong/click-to-deploy | vm/chef/cookbooks/mautic/recipes/default.rb | # Copyright 2019 Google 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 of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... |
lchb369/chaos | chaos/utility/noncopyable.h | <filename>chaos/utility/noncopyable.h
/*
* Copyright 2012, <NAME>. All rights reserved.
* https://github.com/lyjdamzwf/chaos
*
* Use of this source code is governed by a BSD-style
* license that can be found in the License file.
*/
#ifndef _CHAOS_NONCOPYALBE_H_
#define _CHAOS_NONCOPYALBE_H_
/**
* @file ... |
boyskylake/maintain-soat | resources/js/src/Officer/pages/Lookscreen/Lookscreen.js | <reponame>boyskylake/maintain-soat
import React, { useState, useEffect } from "react";
import { Helmet } from "react-helmet";
import { useDispatch, useSelector } from "react-redux";
import { useHistory } from "react-router-dom";
import { useBodyClass, useScript } from "../../../helpers";
import { userActions } from "..... |
RanerL/analyzer | tests/juliet/testcases/CWE369_Divide_by_Zero/s01/CWE369_Divide_by_Zero__float_zero_83.h | <reponame>RanerL/analyzer<gh_stars>10-100
/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE369_Divide_by_Zero__float_zero_83.h
Label Definition File: CWE369_Divide_by_Zero__float.label.xml
Template File: sources-sinks-83.tmpl.h
*/
/*
* @description
* CWE: 369 Divide by Zero
* BadSource: zero Fixed value of z... |
ysBach/irafdocgen | iraf.v2161/vendor/x11iraf/obm/ObmW/MenuBar.c | /* Generated by wbuild from "MenuBar.w"
** (generator version $Revision: 2.0 $ of $Date: 93/07/06 16:08:04 $)
*/
#include <X11/IntrinsicP.h>
#include <X11/StringDefs.h>
/* #include "PullDown.h" */
#include <X11/Shell.h>
#include <stdio.h>
#include "MenuBarP.h"
static void menu_popdown(
#if NeedFunctionPrototypes
Widget... |
COFS-UWA/MPM3D | SimulationsOMP/RigidObject/ContactModel3D.h | <filename>SimulationsOMP/RigidObject/ContactModel3D.h
#ifndef __Contact_Model_3D_h__
#define __Contact_Model_3D_h__
#include "Geometry3D.h"
#include "ParticleVariablesGetter.h"
class ContactModel3D
{
public:
struct Position { double x, y, z; };
struct Force { double x, y, z; };
explicit ContactModel3D();
virtual... |
wrapper755/diirt | graphene/graphene-rrdtool/src/test/java/org/epics/graphene/rrdtool/RrdToolOutputParserTest.java | <filename>graphene/graphene-rrdtool/src/test/java/org/epics/graphene/rrdtool/RrdToolOutputParserTest.java
/**
* Copyright (C) 2012-14 graphene developers. See COPYRIGHT.TXT
* All rights reserved. Use is subject to license terms. See LICENSE.TXT
*/
package org.epics.graphene.rrdtool;
import java.io.BufferedReader;
i... |
AlisonBernardino/AlgosAndLogic-JAVA- | src/baseCourse/classes/class03/Architect.java | package baseCourse.classes.class03;
import java.util.Scanner;
public class Architect {
// Final value = No changes, "getters" or "setters" after the "final" definition
private final double salaryIncreaseIndex = 0.06;
private String architectFirstName;
private String architectRegisterCode;
private ... |
MPDL/INGe | transformationManager/src/main/java/de/mpg/mpdl/inge/transformation/results/VoResult.java | <gh_stars>1-10
package de.mpg.mpdl.inge.transformation.results;
import de.mpg.mpdl.inge.model.valueobjects.ValueObject;
import de.mpg.mpdl.inge.transformation.exceptions.TransformationException;
import de.mpg.mpdl.inge.transformation.sources.TransformerSource;
import de.mpg.mpdl.inge.transformation.sources.Transformer... |
XUyongjie2000/Study-Java | Study day02/day02_2/src/com/czxy/demo1/Demo2_2.java | <filename>Study day02/day02_2/src/com/czxy/demo1/Demo2_2.java
package com.czxy.demo1;
public class Demo2_2 {
public static void main(String[] args) {
//特殊定义方式:先定义,后赋值
int aa;
aa=10;
aa=20;
aa=30;
System.out.println(aa);
}
}
|
NoMariusz/Praeteritum | match/tests/MatchWithCardDataTestCase.py | from django.test import TestCase
from match.logic.Match import Match
from .utils import make_test_users, make_match, make_test_card
class MatchWithCardDataTestCase(TestCase):
""" parent class for tests needing match, player indexes and unit set on
setUp method """
def setUp(self):
""" prepare v... |
youyouqiu/hybrid-development | clbs/src/main/java/com/zw/platform/dto/driverMiscern/DriverDiscernStatisticsExport.java | <filename>clbs/src/main/java/com/zw/platform/dto/driverMiscern/DriverDiscernStatisticsExport.java
package com.zw.platform.dto.driverMiscern;
import com.zw.platform.util.excel.annotation.ExcelField;
import lombok.Data;
/**
* @author denghuabing
* @version V1.0
* @description: TODO
* @date 2020/9/25
**/
@Data
publ... |
electrolobzik/cupboard | library/src/androidTest/java/nl/qbusict/cupboard/StringArrayFieldConverter.java | package nl.qbusict.cupboard;
import android.content.ContentValues;
import android.database.Cursor;
import nl.qbusict.cupboard.convert.EntityConverter.ColumnType;
import nl.qbusict.cupboard.convert.FieldConverter;
public class StringArrayFieldConverter implements FieldConverter<String[]> {
@Override
public St... |
twizoapi/lib-api-java | src/com/twizo/services/registrationwidget/JsonRegistrationWidgetService.java | <filename>src/com/twizo/services/registrationwidget/JsonRegistrationWidgetService.java<gh_stars>0
package com.twizo.services.registrationwidget;
import com.google.gson.JsonObject;
import com.google.gson.JsonSyntaxException;
import com.twizo.exceptions.RegistrationWidgetException;
import com.twizo.exceptions.TwizoJsonP... |
nixford/SoftUni-JavaScript-2020-TasksAndExams | JS-Advanced/Tasks/Function-Context-Exercise/01. Company.js | // 01. Company
class Company {
constructor(){
this.departments = []
}
addEmployee(username, salary, position, department){
if (!username || !salary || !position || !department) {
throw new Error("Invalid input!");
}
if (salary < 0) {
throw new Error(... |
NU-CBITS/telehealth_prim_engine | spec/models/telehealth_prim_engine/pre_screening_question_spec.rb | <reponame>NU-CBITS/telehealth_prim_engine
require "rails_helper"
module TelehealthPrimEngine
RSpec.describe PreScreeningQuestion, type: :model do
def valid_attributes
[{ pre_screening: PreScreening.new, label: "label", position: 1 }]
end
def invalid_attributes
[
{ pre_screening: nil,... |
metaversethailand/snapshot-strategies | dist/strategies/holds-tokens/index.js | <reponame>metaversethailand/snapshot-strategies<gh_stars>0
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.strategy = exports.version = exports.author = void 0;
const multichain_1 = require("../multichain");
exports.author = 'lightninglu10';
exports.version = '0.1.0';
async function... |
CI6/gmchain-core | src/key_const.h | <gh_stars>1-10
//
// const_string.h
// gmchain-core
//
// Created by AnonymityMaster on 2019/12/22.
// Copyright © 2019 ci6. All rights reserved.
//
#ifndef key_const_h
#define key_const_h
#include <stdio.h>
static const char *KCType = "type"; // => 类型
static const char *KCPat... |
EyeOfDarkness/Arc | extensions/box2d/src/arc/box2d/JointEdge.java | package arc.box2d;
/**
* A joint edge is used to connect bodies and joints together in a joint graph where each body is a node and each joint is an
* edge. A joint edge belongs to a doubly linked list maintained in each attached body. Each joint has two joint nodes, one for
* each attached body.
*/
public class Jo... |
npocmaka/Windows-Server-2003 | admin/netui/macprint/pstodib/ti/src/font/fontenco.h | <gh_stars>10-100
/*
* Copyright (c) 1989,90 Microsoft Corporation
*/
/* @WIN; take out the static def of dict data. The tables will be allocated
* thru global alloc, and contents be loaded at run time, in "fontinit.c".
*/
#ifdef KANJI
/* ********************************************************************** ... |
hydra41/constellation | CoreGraphFramework/src/au/gov/asd/tac/constellation/graph/undo/NormalisingGraphEdit.java | <reponame>hydra41/constellation<filename>CoreGraphFramework/src/au/gov/asd/tac/constellation/graph/undo/NormalisingGraphEdit.java
/*
* Copyright 2010-2019 Australian Signals Directorate
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the Lice... |
ThibaultLatrille/ControverSciences | config/application.rb | <filename>config/application.rb
require File.expand_path('../boot', __FILE__)
require 'rails/all'
# Require the gems listed in Gemfile, including any gems
# you've limited to :test, :development, or :production.
Bundler.require(*Rails.groups)
module SampleApp
class Application < Rails::Application
# TODO Stop-... |
ZhuJunJi/base_cloud | system-user/user-microservice-mapper/src/main/java/com/zhujunji/user/domain/SysUserDO.java | <gh_stars>0
package com.zhujunji.user.domain;
import com.zhujunji.common.domain.BaseObject;
import lombok.Data;
/**
*
* @author J.zhu
* @date 2019/7/11
*/
@Data
public class SysUserDO extends BaseObject {
/**
* 用户ID
*/
private Long userId;
/**
* 用户名称
*/
private String usernam... |
skylarbpayne/parseq | contrib/parseq-restli-client/src/test/java/com/linkedin/restli/examples/greetings/client/StreamingGreetingsRequestBuilders.java |
package com.linkedin.restli.examples.greetings.client;
import java.util.ArrayList;
import java.util.Collections;
import java.util.EnumSet;
import java.util.HashMap;
import javax.annotation.Generated;
import com.linkedin.data.template.DataTemplateUtil;
import com.linkedin.data.template.DynamicRecordMetadata;
import co... |
faizol/timescaledb | src/debug_guc.h | <filename>src/debug_guc.h
/*
* This file and its contents are licensed under the Apache License 2.0.
* Please see the included NOTICE for copyright information and
* LICENSE-APACHE for a copy of the license.
*/
#ifndef TIMESCALEDB_DEBUG_GUC_H
#define TIMESCALEDB_DEBUG_GUC_H
#include <postgres.h>
#include <fmgr.h>
... |
compbiol/CAMSA | camsa/utils/fasta/camsa_points2fasta.py | <filename>camsa/utils/fasta/camsa_points2fasta.py
#! /usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import print_function, division
import datetime
import logging
import numbers
import os
import sys
from collections import defaultdict
import Bio
import configargparse
import networkx
from Bio import SeqI... |
ViniGom3/repool-front | src/views/anuncio/AnuncioDetailsView/index.js | /* eslint-disable no-nested-ternary */
import {
Button,
Container,
Divider,
Grid,
IconButton,
List,
makeStyles,
Typography,
} from '@material-ui/core';
import { red } from '@material-ui/core/colors';
import DeleteIcon from '@material-ui/icons/Delete';
import DoneAllIcon from '@material-ui/icons/DoneAll'... |
jianlexia/assets_front_v2 | node_modules/@polkadot/x-textdecoder/typeCheck.js | <gh_stars>0
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
var _browser = _interopRequireDefault(require("./browser"));
var _node = _interopRequireDefault(require("./node"));
// Copyright 2020 @polkadot/x-textdecoder authors & contributors
// This software may be... |
kami-lang/madex-redex | test/unit/TrueVirtualsTest.cpp | /*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#include <gmock/gmock.h>
#include <gtest/gtest.h>
#include <memory>
#include "Creators.h"
#include "DexClass.h"
#include "DexUti... |
sturgeons/esfm-server | src/main/java/com/esfm/modules/survey/controller/SurveyShceduleController.java | package com.esfm.modules.survey.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.esfm.extension.api.ApiController;
import com.esfm.extension.api.R;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.esfm.modules.survey.entity.SurveyShcedule;
import ... |
SCS-ASSE-FS21-Group4/tapas | tapas-tasks/src/main/java/ch/unisg/tapastasks/tasks/application/handler/TaskExecutedHandler.java | package ch.unisg.tapastasks.tasks.application.handler;
import ch.unisg.tapastasks.tasks.application.port.in.TaskExecutedEvent;
import ch.unisg.tapastasks.tasks.application.port.in.TaskExecutedEventHandler;
import ch.unisg.tapascommon.tasks.domain.Task;
import ch.unisg.tapastasks.tasks.application.port.out.AddTaskPort;... |
Astrocoders/meteor-easy-testing | lib/templates/meteor/method.js | <gh_stars>1-10
//
export default ({name, params}) => (
`import { ValidatedMethod } from 'meteor/mdg:validated-method'
import { SimpleSchema } from 'meteor/aldeed:simple-schema'
export default new ValidatedMethod({
name: '${name}',
validate: new SimpleSchema({
${params.map(paramDefToSimpleSchemaDef(params.length)).... |
AnonymousDeveloper65535/open-toontown | toontown/parties/PartyCog.py | import math
from direct.actor.Actor import Actor
from direct.interval.ActorInterval import ActorInterval
from direct.interval.MetaInterval import Sequence, Parallel
from direct.interval.FunctionInterval import Func, Wait
from direct.interval.SoundInterval import SoundInterval
from direct.interval.LerpInterval import Le... |
pchlenski/NeuroSEED | tests/multiple_sequence_alignment_tests/test_msa_steiner_training.py | import copy
import io
import os
import random
import string
import unittest
from os import path
from contextlib import redirect_stdout
import torch
from multiple_alignment.steiner_string.models.convolutional.model import CNNEncoder, CNNDecoder
from multiple_alignment.steiner_string.models.mlp.model import MLPEncoder,... |
Incapture/OG-Platform | projects/OG-Analytics/src/test/java/com/opengamma/analytics/math/interpolation/InterpolatorNDDataBundleTest.java | /**
* Copyright (C) 2009 - present by OpenGamma Inc. and the OpenGamma group of companies
*
* Please see distribution for license.
*/
package com.opengamma.analytics.math.interpolation;
import java.util.ArrayList;
import java.util.List;
import org.testng.annotations.Test;
import com.opengamma.analytics.math.int... |
jdruk/mycroft-for-us | app/app/models/kea_lease4.rb | <reponame>jdruk/mycroft-for-us
# == Schema Information
#
# Table name: lease4
#
# address :bigint(8) not null, primary key
# expire :datetime
# fqdn_fwd :boolean
# fqdn_rev :boolean
# hostname :string(255)
# hwaddr :binary
# state :bigint(8) default... |
SmartSoftAsia/iOS-Fleet-Management-SDK | EstimoteFleetManagementSDK/EstimoteFleetManagementSDK.framework/Versions/A/Headers/ESTSettingPowerDarkToSleepThreshold.h | // Estimote Fleet Management SDK
// Copyright (c) 2015 Estimote. All rights reserved.
#import <Foundation/Foundation.h>
#import "ESTSettingReadWrite.h"
@class ESTSettingPowerDarkToSleepThreshold;
NS_ASSUME_NONNULL_BEGIN
/**
* Block used as a result of read/write setting DarkToSleepThreshold operation for Power ... |
eugeis/eej-email | ee-email-outlook/src/main/java/ee/email/outlook/base/OlDaysOfWeekEnum.java | package ee.email.outlook.base;
/**
* @see <p>
* Type <a href="http://msdn.microsoft.com/en-us/library/aa219371(v=office.11).aspx">OlDaysOfWeek</a>
* </p>
* @author eugeis
*/
public enum OlDaysOfWeekEnum {
olSunday(1), olThursday(16), olFriday(32), olMonday(2), olSaturday(64), olTuesday(4), ol... |
YUCS-Club/Java-OOP-LangFeatures | Day07/src/com/csculb/collection/CollectionMapDemo.java | package com.csculb.collection;
import java.util.Map;
import java.util.HashMap;
import java.util.stream.Stream;
public class CollectionMapDemo {
public static void main(String[] args) {
Map maps = new HashMap<Integer, String>();
maps.put(1, "Mg Mg");
maps.put(2, "Mg Hla");
String n... |
groupe-sii/ogham | ogham-test-utils/src/main/java/fr/sii/ogham/testing/util/ResourceUtils.java | <filename>ogham-test-utils/src/main/java/fr/sii/ogham/testing/util/ResourceUtils.java
package fr.sii.ogham.testing.util;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
import org.apache.commons.io... |
teco-kit/ModelDrivenGateways | src/edu.teco.squery.editor/src-gen/edu/teco/squery/wizards/NewSQueryProjectWizard.java | <filename>src/edu.teco.squery.editor/src-gen/edu/teco/squery/wizards/NewSQueryProjectWizard.java
package edu.teco.squery.wizards;
import org.openarchitectureware.xtext.LanguageUtilities;
import org.openarchitectureware.xtext.editor.wizards.AbstractNewProjectWizard;
import edu.teco.squery.SQueryEditorPlugin;
public c... |
ykomitov/Homeworks-TA | 14.SPA-AngularJS/TheBigCatProject/TheBigCatProject.Client/scripts/_references.js | /// <autosync enabled="true" />
/// <reference path="../cats/add-cat-controller.js" />
/// <reference path="../common/main-controller.js" />
/// <reference path="../common/scripts/app.js" />
/// <reference path="../common/scripts/auth-service.js" />
/// <reference path="../common/scripts/cat-service.js" />
/// <refere... |
ControlTrees/rai | rai/KOMO/retired/benchmarks.h | /* ------------------------------------------------------------------
Copyright (c) 2017 <NAME>
email: <EMAIL>
This code is distributed under the MIT License.
Please see <root-path>/LICENSE for details.
-------------------------------------------------------------- */
#pragma once
#include <Opt... |
VertiPub/oozie | core/src/test/java/org/apache/oozie/executor/jpa/TestCoordJobGetActionsNotCompletedJPAExecutor.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... |
state303/spring-batch | spring-batch-core/src/test/java/org/springframework/batch/core/jsr/configuration/xml/BatchParserTests.java | /*
* Copyright 2013 the original author or authors.
*
* 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
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applic... |
JamesLinus/rose | src/midend/MDCG/lib/klt/klt.cpp |
#include "sage3basic.h"
#include "KLT/Language/c-family.hpp"
#include "MDCG/KLT/runtime.hpp"
namespace MDCG {
namespace KLT {
template <> Runtime< ::KLT::Language::C, ::KLT::Language::C>::host_api_t Runtime< ::KLT::Language::C, ::KLT::Language::C>::host_api = Runtime< ::KLT::Language::C, ::KLT::Language::C>::host... |
berak/opencv_smallfry | demo/py/rtree.py | import cv2
import numpy as np
import random
import pdb
# https://github.com/opencv/opencv/pull/8004
data = list()
classes = list()
test = np.array([[1,2,3,4,5]]).astype(np.float32)
for i in range(20):
entry = list()
for j in range(5):
entry.append(int(random.random() * 10))
data.append(entry)
dat... |
Mozu/mozu-java | mozu-javaasync-core/src/main/java/com/mozu/api/contracts/customer/CurrencyAmount.java | <reponame>Mozu/mozu-java
/**
* This code was auto-generated by a Codezu.
*
* Changes to this file may cause incorrect behavior and will be lost if
* the code is regenerated.
*/
package com.mozu.api.contracts.customer;
import java.io.Serializable;
import com.fasterxml.jackson.annotation.J... |
fancyremarker/opsworks-cli | lib/opsworks/instance.rb | <reponame>fancyremarker/opsworks-cli<filename>lib/opsworks/instance.rb<gh_stars>0
require 'opsworks/resource'
module OpsWorks
class Instance < Resource
attr_accessor :id, :hostname, :ec2_instance_id, :instance_type, :status
def self.from_collection_response(response)
response.data[:instances].map do |... |
thewizardplusplus/wizard-parser | source/thewizardplusplus/wizard_parser/vendor/range/v3/utility/scope_exit.hpp | <filename>source/thewizardplusplus/wizard_parser/vendor/range/v3/utility/scope_exit.hpp
/// \file
// Range v3 library
//
// Copyright <NAME> 2017-present
//
// Use, modification and distribution is subject to the
// Boost Software License, Version 1.0. (See accompanying
// file LICENSE.txt or copy at
// http://www... |
BelieveSong/fssi | wallet/src/main/scala/fssi/wallet/WalletMain.scala | <reponame>BelieveSong/fssi
package fssi.wallet
import fssi.wallet.controller.LoginController
import scalafx.application.JFXApp
import scalafx.application.JFXApp.PrimaryStage
import scalafx.scene.Scene
import scalafx.Includes._
import scalafx.geometry.Insets
import scalafx.scene.effect.DropShadow
import scalafx.scene.l... |
qtxasjo/Foundation | src/Foundation.CommerceManager/Apps/Shell/Scripts/BusinessFoundation/TimePickerExtender.js | <gh_stars>10-100
Type.registerNamespace("Ibn");
// ---------------------------------
// ------- TimePickerExtender ---------
// ---------------------------------
// TimePickerExtender Constructor
Ibn.TimePickerExtender = function(element)
{
Ibn.TimePickerExtender.initializeBase(this, [element]);
//inter... |
lzhzero/ycsb-c-bang | Core/generator/scrambled_zipfian_generator.h | //
// scrambled_zipfian_generator.h
// YCSB-C
//
// Created by <NAME> on 12/8/14.
// Copyright (c) 2014 <NAME> <<EMAIL>>.
//
#ifndef YCSB_C_SCRAMBLED_ZIPFIAN_GENERATOR_H_
#define YCSB_C_SCRAMBLED_ZIPFIAN_GENERATOR_H_
#include "generator.h"
#include <cstdint>
#include "zipfian_generator.h"
#include "Util/funcs.h"... |
gabi62215/Teme | apd_tema_2/skel/Result.java | import java.util.Hashtable;
import java.util.List;
// class that contains results from the map task
public class Result {
Hashtable<Integer, Integer> dict;
List<String> longest_words;
String doc_name;
public Result(Hashtable<Integer, Integer> dict, List<String> longest_words, String doc_name) {
... |
phvu/cebes-server | cebes-pipeline-serving/src/test/scala/io/cebes/serving/http/CebesServingSecuredServerSuite.scala | /* Copyright 2016 The Cebes Authors. All Rights Reserved.
*
* Licensed under the Apache License, version 2.0 (the "License").
* You may not use this work except in compliance with the License,
* which is available at www.apache.org/licenses/LICENSE-2.0
*
* This software is distributed on an "AS IS" basis, WITHOUT... |
jorgejesus/soils-revealed | api/charts/index.js | const getOnTheFlyData = require('./on-the-fly');
const getTimeseriesData = require('./timeseries');
const getChangeData = require('./change');
const { combineTimeseriesData, combineChangeData } = require('./helpers');
module.exports = async (
{
params: { layer, type, boundaries, depth },
query: { scenario },... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.