repo_name stringlengths 6 101 | path stringlengths 4 300 | text stringlengths 7 1.31M |
|---|---|---|
hosomi/LeetCode | #0105.construct-binary-tree-from-preorder-and-inorder-traversal.cpp | /**
* Definition for a binary tree node.
* struct TreeNode {
* int val;
* TreeNode *left;
* TreeNode *right;
* TreeNode() : val(0), left(nullptr), right(nullptr) {}
* TreeNode(int x) : val(x), left(nullptr), right(nullptr) {}
* TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), l... |
Hellorin/stickyMoss | stickymossCoreServices/src/main/java/com/hellorin/stickyMoss/jobHunting/services/ApplicantService.java | <gh_stars>0
package com.hellorin.stickyMoss.jobHunting.services;
import com.hellorin.stickyMoss.jobHunting.domain.Applicant;
import com.hellorin.stickyMoss.jobHunting.exceptions.ApplicantNotFoundException;
import com.hellorin.stickyMoss.jobHunting.repositories.ApplicantRepository;
import org.springframework.beans.fact... |
gmlueck/llvm-test-suite | MultiSource/Benchmarks/Prolangs-C/TimberWolfMC/bellman.c | #include "geo.h"
#define DEBUG
extern FILE *fpo ;
void bellman(void)
{
int i , j , D , distance ;
WCPTR ptr ;
xBellArray = (BELLBOXPTR) malloc((1 + numXnodes) * sizeof(BELLBOX));
yBellArray = (BELLBOXPTR) malloc((1 + numYnodes) * sizeof(BELLBOX));
xBellArray[1].from = 0 ;
xBellArray[1].distance = 0 ;
for( i = 2... |
Expander/polylogarithm | test/alt/algorithm_327/algorithm_327.c | #include <math.h>
/*
Algorithm 327, Dilogarithm [S22]
<NAME> (Rect. 10 Oct. 1967)
Applied Mathematics Group, Data Handling Division,
European Organization for Nuclear Research (CERN)
1211 Genea 23, Switzerland
Published in Communications of the ACM,
Volume 11, Number 4, p. 270f, April 1968
Translated... |
autuanthinh/react-template-full | internals/generators/index.js | /**
* generator/index.js
*
* Exports the generators so plop knows them
*/
const fs = require('fs');
const path = require('path');
const languageGenerator = require('./language/index.js');
module.exports = plop => {
plop.setGenerator('language', languageGenerator);
plop.addHelper('directory', comp => {
... |
zouzhihao1992/DataStucture | DataStructure/Arena_1782.cpp | //
// Arena_1782.cpp
// DataStructure
//
// Created by zzh on 15/5/3.
// Copyright (c) 2015年 zzh. All rights reserved.
//
#include "Arena_1782.h"
#include <stdio.h>
int main_Arena_1782()
{
int n,m;
scanf("%d%d",&n,&m);
int book[m+1];
for (int j=0; j<=m+1; j++)
{
book[j]=0;
}
in... |
bt-nia/Application-Gateway | oag/src/test/java/org/owasp/oag/services/crypto/jwt/HmacJwtSignerTest.java | <reponame>bt-nia/Application-Gateway
package org.owasp.oag.services.crypto.jwt;
import com.nimbusds.jose.JWSAlgorithm;
import com.nimbusds.jose.JWSVerifier;
import com.nimbusds.jose.crypto.MACVerifier;
import com.nimbusds.jwt.JWTClaimsSet;
import com.nimbusds.jwt.SignedJWT;
import org.apache.commons.codec.binary.Hex;
... |
bobozhengsir/DesignPatternsStories | src/main/java/com/programcreek/designpatterns/observer/SimpleSwingExample.java | <filename>src/main/java/com/programcreek/designpatterns/observer/SimpleSwingExample.java
package com.programcreek.designpatterns.observer;
import java.awt.BorderLayout;
import java.awt.event.ActionEvent;
import javax.swing.*;
/**
* Created with IntelliJ IDEA.
* User: wujiaoniao
* Date: 13-12-17
* Time: 上午9:58
* ... |
Excentrics/publication-backbone | publication_backbone/admin/forms.py | <filename>publication_backbone/admin/forms.py
#-*- coding: utf-8 -*-
from django.utils.translation import ugettext_lazy as _
from django import forms
from django.contrib import admin
from django.forms import models
from mptt.forms import TreeNodeMultipleChoiceField, TreeNodeChoiceField
from publication_backbone.models... |
HedgehogFog/TimeOfDeath | build/linux-build/Sources/src/zpp_nape/space/ZPP_AABBPair.cpp | // Generated by Haxe 4.0.0-preview.5
#include <hxcpp.h>
#ifndef INCLUDED_zpp_nape_dynamics_ZPP_Arbiter
#include <hxinc/zpp_nape/dynamics/ZPP_Arbiter.h>
#endif
#ifndef INCLUDED_zpp_nape_space_ZPP_AABBNode
#include <hxinc/zpp_nape/space/ZPP_AABBNode.h>
#endif
#ifndef INCLUDED_zpp_nape_space_ZPP_AABBPair
#include <hxinc/... |
liumapp/jks-core | src/main/java/com/liumapp/jks/core/job/JobDetail.java | package com.liumapp.jks.core.job;
import com.alibaba.fastjson.JSONObject;
/**
* author liumapp
* file JobDetail.java
* email <EMAIL>
* homepage http://www.liumapp.com
* date 6/28/18
*/
public abstract class JobDetail<T extends JobData> {
protected JSONObject jobResult;
public JobDetail() {
thi... |
akiyamayami/KLTN | src/main/java/com/tlcn/model/SttDriver.java | <filename>src/main/java/com/tlcn/model/SttDriver.java<gh_stars>0
package com.tlcn.model;
import java.util.List;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
@Entity(name = "sttdriver... |
ruifly2012/server-1 | store/db/db.go | package db
import (
"context"
"errors"
"time"
"github.com/urfave/cli/v2"
"go.mongodb.org/mongo-driver/mongo/options"
)
// db find no result
var ErrNoResult = errors.New("db return no result")
var (
DatabaseWriteTimeout = time.Second * 5
DatabaseLoadTimeout = time.Second * 5
DatabaseBulkWriteTimeout... |
gruz0/inspirer-web | spec/services/activity/yoga/asanas/contracts/update_contract_spec.rb | # frozen_string_literal: true
require 'rails_helper'
RSpec.describe Activity::Yoga::Asanas::Contracts::UpdateContract do
let(:input) do
{
attributes: {
notes: 'Asana',
feeling: 'good'
}
}
end
include_examples 'it validates contract'
end
|
mccollek/itjobstudyv2 | db/migrate/20131230185446_add_data_type_id_to_bls_column_mapper.rb | <reponame>mccollek/itjobstudyv2
class AddDataTypeIdToBlsColumnMapper < ActiveRecord::Migration
def change
add_column :bls_column_mappers, :data_type_id, :integer
end
end
|
datagym-ai/datagym-core | datagym-backend/src/main/java/ai/datagym/application/labelTask/controller/UserTaskController.java | package ai.datagym.application.labelTask.controller;
import ai.datagym.application.labelTask.models.viewModels.LabelTaskViewModel;
import ai.datagym.application.labelTask.models.viewModels.UserTaskViewModel;
import ai.datagym.application.labelTask.service.UserTaskService;
import org.hibernate.validator.constraints.Len... |
nelcolon/pocket-core | util/http.go | package util
import (
"bytes"
"encoding/json"
"errors"
"io/ioutil"
"net/http"
)
type Method int
const (
POST Method = iota + 1
GET
)
func (m Method) String() string {
return [...]string{"GET", "POST"}[m]
}
func RPCRequ(url string, data []byte, m Method) (string, error) {
req, err := http.NewRequest(m.Stri... |
onehilltech/backbone | backbone-gatekeeper/src/main/java/com/onehilltech/backbone/gatekeeper/http/JsonChangePassword.java | <reponame>onehilltech/backbone
package com.onehilltech.backbone.gatekeeper.http;
import com.google.gson.annotations.SerializedName;
public class JsonChangePassword
{
@SerializedName ("current")
public String currentPassword;
@SerializedName ("new")
public String newPassword;
}
|
zrj-rimwis/DeltaPorts | ports/math/cado-nfs/dragonfly/patch-utils_select__mpi.h | <reponame>zrj-rimwis/DeltaPorts
--- utils/select_mpi.h.orig 2021-09-16 01:25:08 UTC
+++ utils/select_mpi.h
@@ -3,7 +3,7 @@
#include "cado_mpi_config.h"
#include "macros.h"
-#if !(defined(__OpenBSD__) || defined(__FreeBSD__))
+#if !(defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__DragonFly__))
#if !(defin... |
duweiwang/java-playground | src/main/java/com/wangduwei/java_basic/collection/queue/QueueApi.java | <reponame>duweiwang/java-playground
package com.wangduwei.java_basic.collection.queue;
import java.util.Deque;
import java.util.LinkedList;
import java.util.Queue;
/**
* <p>队列的相关操作
*
* @auther: wangduwei
* @since: 2019/7/25
**/
public class QueueApi {
public static void main(String[] args) {
QueueApi... |
katemihalikova/test262 | test/built-ins/Object/defineProperty/15.2.3.6-4-290.js | // Copyright (c) 2012 Ecma International. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es5id: 15.2.3.6-4-290
description: >
Object.defineProperty - 'O' is an Arguments object, 'name' is own
property of 'O', and is deleted afterwards, and 'desc' is accessor
... |
basho-labs/riak-explorer-gui | app/pods/node/monitoring/controller.js | import Ember from 'ember';
import Modal from '../../../mixins/controller/modal';
export default Ember.Controller.extend(Modal, {
currentGraphs: [],
availableGraphs: [],
actions: {
updateGraphName: function(graph, newStat) {
return this.set('currentGraphs', this.get('currentGraphs').map(function(graph... |
maidiHaitai/haitaibrowser | third_party/WebKit/Source/core/css/CSSComputedStyleDeclaration.cpp | <reponame>maidiHaitai/haitaibrowser
/*
* Copyright (C) 2004 <NAME> <<EMAIL>>
* Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved.
* Copyright (C) 2007 <NAME> <<EMAIL>>
* Copyright (C) 2007 <NAME> <<EMAIL>>
* Copyright (C) 2011 Sencha, Inc. All rights reserved.
*
* ... |
jtravee/neuvector | vendor/modernc.org/sqlite/lib/mutex.go | <gh_stars>100-1000
// Copyright 2021 The Sqlite 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 sqlite3
import (
"fmt"
"sync"
"sync/atomic"
"unsafe"
"modernc.org/libc"
"modernc.org/libc/sys/types"
)
func init() {
tl... |
thanhtrang0493/on-demand-youtube-player | app/src/main/java/com/vcoders/on_demand_youtube_player/features/home/HomeView.java | <filename>app/src/main/java/com/vcoders/on_demand_youtube_player/features/home/HomeView.java
package com.vcoders.on_demand_youtube_player.features.home;
import com.vcoders.on_demand_youtube_player.architecture.BaseView;
import com.vcoders.on_demand_youtube_player.database.DatabaseResponseListener;
public interface H... |
suisen-cp/cp-library-cpp | test/src/tree/rerooting/abc160_f.test.cpp | #define PROBLEM "https://atcoder.jp/contests/abc160/tasks/abc160_f"
#include <iostream>
#include <atcoder/modint>
using mint = atcoder::modint1000000007;
#include "library/tree/rerooting.hpp"
using suisen::ReRooting;
int n;
std::vector<int> sub;
std::vector<int> par;
mint op(mint x, mint y) {
return x * y;
}
m... |
poecao/RLibrary | imagepicker/src/main/java/com/lzy/imagepicker/YImageControl.java | package com.lzy.imagepicker;
import android.text.TextUtils;
import android.widget.ImageView;
/**
* Copyright (C) 2016,深圳市红鸟网络科技股份有限公司 All rights reserved.
* 项目名称:
* 类的描述:图片涉黄控制
* 创建人员:Robi
* 创建时间:2017/05/24 15:27
* 修改人员:Robi
* 修改时间:2017/05/24 15:27
* 修改备注:
* Version: 1.0.0
*/
public class YI... |
ZipFile/pytest-alembic | src/pytest_alembic/plugin/plugin.py | import re
from dataclasses import dataclass
from typing import Callable, Dict, List, Optional
import pytest
from _pytest import fixtures
from pytest_alembic.plugin.error import AlembicReprError, AlembicTestFailure
@dataclass(frozen=True)
class PytestAlembicTest:
raw_name: str
function: Callable
is_exper... |
relaton/relaton-bib-py | tests/test_medium.py | <gh_stars>0
import dataclasses
import inspect
import pytest
import xml.etree.ElementTree as ET
from relaton_bib import Medium
@pytest.fixture
def subject():
return Medium(form="form", size="size", scale="scale")
@pytest.fixture
def subject_none():
return Medium()
def test_to_xml(subject):
host = ET.... |
zeterain/phaser | examples/geometry/rotate point.js | <reponame>zeterain/phaser<filename>examples/geometry/rotate point.js
var game = new Phaser.Game(800, 600, Phaser.CANVAS, 'phaser-example', {create: create, update: update, render: render });
var p1;
var p2;
var d = 0;
function create() {
p1 = new Phaser.Point(200, 300);
p2 = new Phaser.Point(300, 300);
}
... |
Ankitkurani1997/maya | vendor/github.com/hashicorp/nomad/testutil/vault.go | package testutil
import (
"fmt"
"os"
"os/exec"
"testing"
"github.com/hashicorp/nomad/nomad/structs"
"github.com/hashicorp/nomad/nomad/structs/config"
vapi "github.com/hashicorp/vault/api"
)
// TestVault is a test helper. It uses a fork/exec model to create a test Vault
// server instance in the background and... |
rerorero/meshtest | src/model/service_test.go | package model
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestServiceValidate(t *testing.T) {
depends := []DependentService{
DependentService{
Name: "valid1",
EgressPort: 9001,
},
DependentService{
Name: "valid2",
EgressPort: 9002,
},
}
s := Service{
Name: ... |
QualityInformationFramework/QIFResourcesEditor | src/qif191/QIFDocument/type_t.COppositePlanesTransformType.h | <reponame>QualityInformationFramework/QIFResourcesEditor<filename>src/qif191/QIFDocument/type_t.COppositePlanesTransformType.h
#pragma once
#include "type_t.CConstructionMethodBaseType.h"
namespace qif191
{
namespace t
{
class COppositePlanesTransformType : public ::qif191::t::CConstructionMethodBaseType
{
public... |
harveywangdao/ants | app/goods/model/goods_model.go | package model
import (
"github.com/harveywangdao/ants/logger"
"github.com/jinzhu/gorm"
"time"
)
type GoogsModel struct {
ID int64 `gorm:"column:id"`
GoodsID string `gorm:"column:goods_id"`
SellerID string `gorm:"column:seller_id"`
GoodsName string `gorm:"column:goods_name"`
Price ... |
afeng11/tomato-arm | release/src-rt-6.x.4708/router/apcupsd/src/win32/winconfig.h | <filename>release/src-rt-6.x.4708/router/apcupsd/src/win32/winconfig.h
/*
* Copyright (C) 2009 <NAME>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of version 2 of the GNU General
* Public License as published by the Free Software Foundation.
*
* This program is di... |
pelican/pelican | pelican/output/test/src/OutputStreamManagerTest.cpp | /*
* Copyright (c) 2013, The University of Oxford
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright notice,
* this list ... |
scottwedge/OpenStack-Stein | openstack-congress-9.0.0/congress/tests/datasources/json_ingester/test_json_ingester.py | # Copyright (c) 2019 VMware, Inc. All rights reserved.
#
# 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 b... |
SmarterApp/TechnologyReadinessTool | core-components/src/main/java/net/techreadiness/persistence/domain/OrgPartExtDO_.java | package net.techreadiness.persistence.domain;
import javax.persistence.metamodel.SingularAttribute;
import javax.persistence.metamodel.StaticMetamodel;
@StaticMetamodel(OrgPartExtDO.class)
public abstract class OrgPartExtDO_ {
public static volatile SingularAttribute<OrgPartExtDO, OrgPartDO> orgPart;
public static... |
DreadMoirai/SamuraiBot | src/main/java/com/github/breadmoirai/samurai/plugins/trivia/TriviaPlugin.java | <reponame>DreadMoirai/SamuraiBot<filename>src/main/java/com/github/breadmoirai/samurai/plugins/trivia/TriviaPlugin.java
/*
* Copyright 2017-2018 <NAME>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a... |
twagner/noidcp | main/lib/model/tokenRequest.js | "use strict";
const config = require('../../config'),
AccessToken = require('./accessToken'),
RefreshToken = require('./refreshToken'),
TokenResponse = require('./tokenResponse'),
IdToken = require('./idToken'),
TokenError = require('./tokenError'),
Q = require('q'),
S = require('string'),
... |
shreyasvj25/turicreate | deps/src/boost_1_65_1/libs/integer/test/gcd_noexcept_test.cpp |
// (C) Copyright <NAME> 2017.
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#include <boost/integer/common_factor.hpp>
#if !defined(BOOST_NO_CXX11_NOEXCEPT) && !defined(BOOST_NO_CXX11_HDR_TYPE_TRAITS)
//... |
dougreside/MOVER | Releases/January2014/src/src/org/nypl/drag/DragLayer.java | <filename>Releases/January2014/src/src/org/nypl/drag/DragLayer.java
/*
* This is a modified version of a class from the Android Open Source Project.
* The original copyright and license information follows.
*
* Copyright (C) 2008 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0... |
automenta/trex-autonomy | agent/base/Utilities.hh | #ifndef H_Utilities
#define H_Utilities
/*********************************************************************
* Software License Agreement (BSD License)
*
* Copyright (c) 2007. MBARI.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted prov... |
wiechula/AliPhysics | PWGGA/CaloTrackCorrelations/AliAnaOmegaToPi0Gamma.cxx | /**************************************************************************
* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
* *
* Author: The ALICE Off-line Project. *
* Contributors ... |
DarrenPaulWright/hord | bench/Schema/parse/checkTypeDef.bench.js | <reponame>DarrenPaulWright/hord
import { benchSettings } from 'karma-webpack-bundle';
import checkSchemaType from '../../../src/Schema/parse/checkTypeDef.js';
suite('checkSchemaType', () => {
let sandbox = 0;
benchmark('string', () => {
sandbox = checkSchemaType(String, false);
}, benchSettings);
benchmark('ar... |
ScalablyTyped/SlinkyTyped | a/aws-sdk/src/main/scala/typingsSlinky/awsSdk/ec2Mod/SpotCapacityRebalance.scala | package typingsSlinky.awsSdk.ec2Mod
import org.scalablytyped.runtime.StObject
import scala.scalajs.js
import scala.scalajs.js.`|`
import scala.scalajs.js.annotation.{JSGlobalScope, JSGlobal, JSImport, JSName, JSBracketAccess}
@js.native
trait SpotCapacityRebalance extends StObject {
/**
* The replacement str... |
naskya/testcase-generator | verify/checker/abc219/f.py | <reponame>naskya/testcase-generator<gh_stars>1-10
def main() -> None:
S = input()
K = int(input())
assert all(S_i in ('L', 'R', 'U', 'D') for S_i in S)
assert 1 <= len(S) <= 100
assert 1 <= K <= 10**12
if __name__ == '__main__':
main()
|
GoldSubmarine/submarine-admin | src/main/java/com/htnova/system/tool/mapper/QuartzLogMapper.java | package com.htnova.system.tool.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.htnova.system.tool.dto.QuartzLogDto;
import com.htnova.system.tool.entity.QuartzLog;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public ... |
Splyse/nos-client | src/renderer/account/actions/balanceWithPricesActions.js | <gh_stars>100-1000
import { createActions } from 'spunky';
import { reduce } from 'lodash';
import CoinGecko from 'coingecko-api';
import getBalances from 'shared/util/getBalances';
const coinGeckoClient = new CoinGecko();
function mapPrices(tickers) {
return reduce(
tickers,
(mapping, ticker) => ({
... |
AsenLins/tinymce5-ice-plugin | src/lib/tinymce/js/tinymce/classes/Shortcuts.js | <filename>src/lib/tinymce/js/tinymce/classes/Shortcuts.js
/**
* Shortcuts.js
*
* Copyright, Moxiecode Systems AB
* Released under LGPL License.
*
* License: http://www.tinymce.com/license
* Contributing: http://www.tinymce.com/contributing
*/
/**
* Contains all logic for handling of keyboard shortcuts.
*/
de... |
ksoichiro/spring-boot-practice | contents/20160821-querydsl-join/src/main/java/com/example/spring/service/EmployeeService.java | package com.example.spring.service;
import com.example.spring.domain.Employee;
import com.example.spring.domain.QEmployee;
import com.mysema.query.jpa.JPQLQuery;
import com.mysema.query.jpa.impl.JPAQuery;
import com.mysema.query.types.Path;
import com.mysema.query.types.Predicate;
import com.mysema.query.types.path.Pa... |
deepcloudlabs/dcl202-2021-mar-01 | core-banking/src/com/example/banking/questions/q1/moon/E.java | <gh_stars>0
package com.example.banking.questions.q1.moon;
import com.example.banking.questions.q1.earth.A;
public class E {
public void f(A a) {
// a.m_private = 1;
// a.m_protected = 2;
// a.m_default = 3;
a.m_public = 4;
}
}
|
perfectsense/gyro-azure-provider | src/main/java/gyro/azure/dns/PtrRecordSetResource.java | /*
* Copyright 2019, Perfect Sense, 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 a... |
jeroen-dhollander/python-paginator | more_or_less/buffered_input.py | <filename>more_or_less/buffered_input.py
from .input import Input
import queue
class BufferedInput(Input):
'''
Input object that allows you to put back characters
(which are then returned by the next call to 'get_character')
'''
def __init__(self, input):
self._buffered_characters... |
AdityaSrikanth/core | server/app/model/composite-blueprints/composite-blueprints.js | <gh_stars>1-10
/*
Copyright [2016] [Relevance Lab]
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 i... |
Ebury/chameleon-components | src/components/ec-phone-number-input/ec-phone-number-input.spec.js | import { mount, createLocalVue } from '@vue/test-utils';
import EcPhoneNumberInput from './ec-phone-number-input.vue';
import { withMockedConsole } from '../../../tests/utils/console';
jest.mock('svg-country-flags/png100px/gb.png', () => '/my-path/gb.png');
jest.mock('svg-country-flags/png100px/jm.png', () => '/my-pat... |
lebeerman/gatsby-netlify-tut | src/pages/Footer.js | import React from 'react'
import Link from 'gatsby-link'
import SpotifyPlayer from 'react-spotify-player';
import * as FaIconPack from 'react-icons/lib/fa';
// size may also be a plain string using the presets 'large' or 'compact'
const size = {
width: '100%',
height: 300,
};
const view = 'list'; // or 'coverart'... |
souza-joao/cursoemvideo-python3 | 041.py | <gh_stars>0
from datetime import date
idade = int(input('Digite o ano em que você nasceu: '))
x = date.today().year - idade
print('O atleta tem ou fará {} anos.'.format(x))
if x < 9:
print('Ele participará da categoria MIRIM.')
elif 9 < x < 14:
print('Ele participará da categoria INFANTIL.')
elif 14 < x < 19:
... |
Bu11etmagnet/GWToolboxpp | GWToolboxdll/GWToolbox/Widgets/PartyDamage.h | #pragma once
#include <Defines.h>
#include <GWCA/Constants/Constants.h>
#include <GWCA/Packets/StoC.h>
#include "ToolboxWidget.h"
#include "Timer.h"
#include "Color.h"
class PartyDamage : public ToolboxWidget {
static const int MAX_PLAYERS = 12;
struct PlayerDamage {
uint32_t damage = 0;
uint32_t recent_dama... |
mrxbox98/ParticleNativeAPI | ParticleNativeAPI-api/src/main/java/com/github/fierioziy/particlenativeapi/api/types/ParticleTypeColorable.java | package com.github.fierioziy.particlenativeapi.api.types;
import com.github.fierioziy.particlenativeapi.api.utils.ParticleException;
import org.bukkit.Color;
import org.bukkit.Location;
import org.bukkit.util.Vector;
/**
* <p>Class used to represent particle type that can construct
* colored particle packet.</p>
*... |
morozig/muzero | MuZero/MuCoach.py | <filename>MuZero/MuCoach.py
"""
Implements the abstract Coach class for defining the data sampling procedures for MuZero neural network training.
Notes:
- Base implementation done.
- Documentation 15/11/2020
"""
import typing
from datetime import datetime
import numpy as np
import tensorflow as tf
from Coach impor... |
Programming-TRIGON/RobotCode2022 | src/main/java/frc/robot/subsystems/MovableSubsystem.java | package frc.robot.subsystems;
import edu.wpi.first.wpilibj2.command.Subsystem;
/**
* This is interface for all of our moving subsystems with motors.
* For example every moving SS will have to move and stop.
* It is also used for dependency injection with commands that works the same way,
* for multiple subsystems... |
sbwfk2/HearthSim | src/main/java/com/hearthsim/card/classic/minion/common/AmaniBerserker.java | package com.hearthsim.card.classic.minion.common;
import com.hearthsim.card.minion.MinionWithEnrage;
public class AmaniBerserker extends MinionWithEnrage {
public AmaniBerserker() {
super();
}
@Override
public void enrage() {
attack_ = (byte)(attack_ + 3);
}
@Override
pu... |
dandroos/project-corner-website | src/pages/cursos.js | import React, { useEffect } from "react"
import { connect } from "react-redux"
import { setCurrentPage } from "../state"
import { Link, useStaticQuery, graphql } from "gatsby"
import {
Toolbar,
Box,
Container,
Typography,
Link as MLink,
List,
ListSubheader,
ListItem,
ListItemText,
Button,
useTheme... |
y2ghost/study | c/algorithm/include/set.h | #ifndef SET_H
#define SET_H
#include <list.h>
typedef list_t set_t;
void set_init(set_t *set,
int (*match)(const void *key1, const void *key2),
void (*destroy)(void *data));
int set_insert(set_t *set, const void *data);
int set_remove(set_t *set, void **data);
int set_union(set_t *setu, const set_t *set1, co... |
designerasun/myLearning | myJavascript/backend/myNodeJs/netNinja/lists.js | <reponame>designerasun/myLearning<filename>myJavascript/backend/myNodeJs/netNinja/lists.js
const people = ['elly', 'brian', 'paul']
const pets = ['cat', 'dog']
module.exports = {
people : people,
pets : pets
} |
zealoussnow/chromium | third_party/shell-encryption/glog/logging.h | <reponame>zealoussnow/chromium<filename>third_party/shell-encryption/glog/logging.h
// Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
#ifndef SHELL_ENCRYPTION_GLOG_H_
#define SHELL_ENCRYPTION_GLOG_H_
#inclu... |
jingyuyao/tactical-adventure | core/src/com/jingyuyao/tactical/model/state/Battling.java | <filename>core/src/com/jingyuyao/tactical/model/state/Battling.java
package com.jingyuyao.tactical.model.state;
import com.google.inject.assistedinject.Assisted;
import com.jingyuyao.tactical.model.ModelBus;
import com.jingyuyao.tactical.model.battle.Battle;
import com.jingyuyao.tactical.model.world.Cell;
import java.... |
openharmony-gitee-mirror/developtools_profiler | host/ohosprofiler/src/main/java/ohos/devtools/views/trace/metrics/strategy/MemAggStrategy.java | /*
* Copyright (c) 2021 Huawei Device Co., Ltd.
* 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 ... |
dram/metasfresh | backend/de.metas.ui.web.base/src/main/java/de/metas/ui/web/view/InvoiceCandidateViewHeaderPropertiesProvider.java | <reponame>dram/metasfresh<filename>backend/de.metas.ui.web.base/src/main/java/de/metas/ui/web/view/InvoiceCandidateViewHeaderPropertiesProvider.java<gh_stars>1000+
/*
* #%L
* metasfresh-webui-api
* %%
* Copyright (C) 2020 metas GmbH
* %%
* This program is free software: you can redistribute it and/or modify
* it... |
icahoon/vocal | sip/gua/LookupTable.cxx | #include "LookupTable.hxx"
#include <stdio.h>
#include "cpLog.h"
LookupTable* LookupTable::myInstance = 0;
LookupTable::LookupTable(const char* filename)
{
// read from a file
parseFile(filename);
}
void
LookupTable::parseFile(const char* filename)
{
char line [256];
FILE* fd = fopen (filename , "... |
ggreen/pcf-scdf-retail-showcase | pivot-market-int-tests/src/main/java/io/pivotal/gemfire/functions/FunctionInvoker.java | package io.pivotal.gemfire.functions;
import org.apache.geode.cache.Region;
import org.apache.geode.cache.execute.FunctionService;
import org.apache.geode.cache.execute.ResultCollector;
public class FunctionInvoker {
//ClientCache cache;
public FunctionInvoker() {
}
public static void exportToGpdb(Region<?, ?>... |
hascode/ArchUnit | archunit-example/example-plain/src/main/java/com/tngtech/archunit/example/cycle/constructorcycle/slice2/SliceTwoCallingConstructorInSliceOne.java | package com.tngtech.archunit.example.cycle.constructorcycle.slice2;
import com.tngtech.archunit.example.cycle.constructorcycle.slice1.SomeClassWithCalledConstructor;
public class SliceTwoCallingConstructorInSliceOne {
void callSliceOne() {
new SomeClassWithCalledConstructor();
}
void doSomethingI... |
namin/pycket | meta-interp-pycket.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from rpython.jit.metainterp.test.support import LLJitMixin
from pycket.racket_entry import dev_mode_metainterp_fasl_zo, dev_mode_dynamic_metainterp
from pycket.env import w_global_config as glob
from pycket.config import get_testing_config
# 1
glob.set_pycketconfig(get_... |
shachindrasingh/apiman | manager/api/core/src/main/java/io/apiman/manager/api/core/catalog/JsonApiCatalog.java | <filename>manager/api/core/src/main/java/io/apiman/manager/api/core/catalog/JsonApiCatalog.java
/*
* Copyright 2015 JBoss 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
*
* h... |
kshatriya-abhay/leetcode-solutions | cpp-solutions/easy/pascals-triangle.cpp | <reponame>kshatriya-abhay/leetcode-solutions<filename>cpp-solutions/easy/pascals-triangle.cpp<gh_stars>0
class Solution {
public:
vector<vector<int>> generate(int numRows) {
vector<vector<int>> ans;
if(numRows < 1) return ans;
vector<int> init;
init.push_back(1);
ans.push_bac... |
mirajgodha/cdap | cdap-app-fabric/src/main/java/co/cask/cdap/internal/app/deploy/DefaultConfigResponse.java | <filename>cdap-app-fabric/src/main/java/co/cask/cdap/internal/app/deploy/DefaultConfigResponse.java
/*
* Copyright © 2014-2018 <NAME>, 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 a... |
ananyahjha93/libself | ssl_framework/models/heads/mlp.py | import math
import torch
import torch.nn as nn
from ssl_framework.config.default import cfg
class MLP(nn.Module):
def __init__(self, dims, dropout, dropout_probs, in_channels=0):
"""
length of dropout and dropout_probs should be 2 less than length
of dims
"""
super(MLP, se... |
chenshun131/PaySystem | pay-banklink/pay-facade-banklink/src/main/java/wusc/edu/pay/facade/banklink/netpay/vo/NotifyResult.java | <reponame>chenshun131/PaySystem
package wusc.edu.pay.facade.banklink.netpay.vo;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import wusc.edu.pay.facade.banklink.netpay.enums.BankCardTypeEnum;
import wusc.edu.pay.facade.banklink.netpay.enums.BankTradeStatusEnum;
/**
* ... |
kravitz/transims4 | SysLib/Include/Toll_Data.hpp | //*********************************************************
// Toll_Data.hpp - network toll data
//*********************************************************
#ifndef TOLL_DATA_HPP
#define TOLL_DATA_HPP
#include "Class_Index.hpp"
#include "Class_Array.hpp"
//---------------------------------------------------------
//... |
sola-da/LambdaTester | experiments/every/everyGen/test686.js |
var callbackArguments = [];
var argument1 = function callback(a,b,c) {
callbackArguments.push(JSON.stringify(arguments))
base_0[7] = ""
return a-b*c
};
var argument2 = {"157":"","783":0,"1.6387309732655129e+308":1.0334437466942613e+308,"":705,"9.553967314964856e+307":-100,"4.0176776835119257e+307":8.643476709719... |
LindsayBradford/StopWatchUtility | src/main/java/blacksmyth/stopwatch/view/swing/StopWatchCommand.java | <filename>src/main/java/blacksmyth/stopwatch/view/swing/StopWatchCommand.java
/**
* Copyright (c) 2016, <NAME> and other Contributors.
* All rights reserved.
*
* This program and the accompanying materials are made available
* under the terms of the BSD 3-Clause licence which accompanies
* this distribution,... |
lauracristinaes/aula-java | Aula-2709/src/Heranca/Colaborador.java | <filename>Aula-2709/src/Heranca/Colaborador.java
package Heranca;
import Pessoa.Pessoa;
public class Colaborador extends Pessoa {
private String carteiraTrabalho;
private String cargo;
private double salario;
}
|
canuc/meow-engine | events/camera_following_event.cpp | #include "events/camera_following_event.h"
int CameraFollowingEvent::processEvent(lua_State* L) {
lua_pushnil(L);
while(lua_next(L, -2) != 0) {
const char *eventType = lua_tostring(L, -2);
if (strncmp(eventType, ANIMATION_OFFSET_KEY, strlen(ANIMATION_OFFSET_KEY)) == 0 && lua_istable(L, -1)) {... |
hpgit/HumanFoot | PyCommon/externalLibs/BaseLib/math/nr/cpp/recipes/laguer.cpp | #include <cmath>
#include <complex>
#include <limits>
#include "nr.h"
using namespace std;
void NR::laguer(Vec_I_CPLX_DP &a, complex<DP> &x, int &its)
{
const int MR=8,MT=10,MAXIT=MT*MR;
const DP EPS=numeric_limits<DP>::epsilon();
static const DP frac[MR+1]=
{0.0,0.5,0.25,0.75,0.13,0.38,0.62,0.88,1.0};... |
121arijit/jeneratedata | src/com/googlecode/jeneratedata/dates/DateGenerator.java | <gh_stars>0
package com.googlecode.jeneratedata.dates;
import java.util.Calendar;
import java.util.Date;
import java.util.Random;
import com.googlecode.jeneratedata.core.Generator;
/**
* Generates {@link Date} instances between two given dates.
*
* @author <NAME> <<EMAIL>>
*/
public class DateGenerator implemen... |
TomasHofman/infinispan | core/src/main/java/org/infinispan/conflict/impl/InternalConflictManager.java | package org.infinispan.conflict.impl;
import org.infinispan.conflict.ConflictManager;
import org.infinispan.distribution.LocalizedCacheTopology;
import org.infinispan.factories.scopes.Scope;
import org.infinispan.factories.scopes.Scopes;
import org.infinispan.topology.CacheTopology;
/**
* @author <NAME>
* @since 9.... |
f4deb/cen-electronic | robot/strategy/gameStrategyOutsidePathHandler.h | #ifndef GAME_STRATEGY_OUTSIDE_PATH_HANDLER
#define GAME_STRATEGY_OUTSIDE_PATH_HANDLER
#include "gameStrategyHandler.h"
/**
* Creates a new "route" for the robot which is not on a classical Path !
*/
void gameStrategyCreateOutsideTemporaryPaths(GameStrategyContext* gameStrategyContext);
/**
* Do the cle... |
jnthn/intellij-community | python/testData/refactoring/extractmethod/GlobalVarAssignment.after.py | x = 0
def foo():
global x
bar()
def bar():
global x
x = 1 |
mmonrealv/inversion-engine | inversion-jdbc/src/test/java/io/inversion/jdbc/postgres/PostgresRqlIntegTest.java | /*
* Copyright (c) 2015-2020 Rocket Partners, LLC
* https://github.com/inversion-api
*
* 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
*
... |
sirineFruition/angular-project-mon-terroir | app/appuser/app-user.js | <gh_stars>0
System.register([], function(exports_1, context_1) {
"use strict";
var __moduleName = context_1 && context_1.id;
var User;
return {
setters:[],
execute: function() {
User = (function () {
function User(username, terroirs) {
}
... |
billforward/bf-python | billforward/models/flat_pricing_component.py | <reponame>billforward/bf-python<filename>billforward/models/flat_pricing_component.py
# coding: utf-8
"""
BillForward REST API
OpenAPI spec version: 1.0.0
Generated by: https://github.com/swagger-api/swagger-codegen.git
Licensed under the Apache License, Version 2.0 (the "License");
you may... |
CodeNow/palantiri | lib/external/docker.js | <filename>lib/external/docker.js
/**
* Docker API requests
* @module lib/external/docker
*/
'use strict'
require('loadenv')()
const async = require('async')
const DockerClient = require('@runnable/loki').Docker
const DockerUtils = require('@runnable/loki').Utils
const Promise = require('bluebird')
const logger = re... |
SelvorWhim/competitive | ACM-ICPC/icpc_7272.cpp | // problem 1/2 - which employees always appear in the first A/B of a topological sort?
// problem 3 - which employees always appear after the first B in a topological sort?
// Can I check all options in the topological?
//// no way, that could be like E! I could maybe count them in less but this requires seeing which e... |
sumeshmn/Visionlib | setup.py | <reponame>sumeshmn/Visionlib
import setuptools
with open("README.md", "r") as rd:
long_description = rd.read()
setuptools.setup(
name="visionlib",
version="1.4.5",
author="<NAME>",
author_email="<EMAIL>",
url="https://github.com/ashwinvin/Visionlib",
download_url="https://github.com/ashwin... |
ShineXxx/zhengwu | common/src/main/java/com/shine/common/exceptions/BaseXmlInfo.java | <filename>common/src/main/java/com/shine/common/exceptions/BaseXmlInfo.java
package com.shine.common.exceptions;
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;
import com.shine.common.constant.XmlErrorInfo;
/**
... |
ictk-solution-dev/amazon-freertos-zrg3m- | vendors/ictkholdings/sdk/driver/chip/inc/hal_pwm.h | <gh_stars>0
/* Copyright Statement:
*
* (C) 2005-2016 MediaTek Inc. All rights reserved.
*
* This software/firmware and related documentation ("MediaTek Software") are
* protected under relevant copyright laws. The information contained herein
* is confidential and proprietary to MediaTek Inc. ("MediaTek") and/o... |
kermox/schronisko-krakow | shelter/migrations/0006_auto_20200718_1407.py | # Generated by Django 3.0.5 on 2020-07-18 14:07
import django.core.validators
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('shelter', '0005_animal_date_of_registration'),
]
operations = [
migrations.AlterField(
model_name=... |
lnceballosz/inventaire | server/models/validations/common.js | // SPDX-FileCopyrightText: 2014 <NAME>, <NAME>
// SPDX-License-Identifier: AGPL-3.0-only
const _ = require('builders/utils')
const error_ = require('lib/error/error')
const validations = module.exports = {
couchUuid: _.isCouchUuid,
'doc _id': _.isCouchUuid,
userId: _.isUserId,
itemId: _.isItemId,
transact... |
solstag/red | doc/html/mod_2group_8php.js | <gh_stars>0
var mod_2group_8php =
[
[ "group_content", "mod_2group_8php.html#a07a64f6c65b0080d8190b3d9728a7a83", null ],
[ "group_post", "mod_2group_8php.html#aed1f009b1221348021bb34761160ef35", null ]
]; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.