repo_name stringlengths 6 101 | path stringlengths 4 300 | text stringlengths 7 1.31M |
|---|---|---|
z8g/app | file.zxy97.com/src/java/com/zxy97/download/servlet/DownloadServlet.java | <reponame>z8g/app
package com.zxy97.download.servlet;
import static com.zxy97.download.util.Download.download;
import static com.zxy97.download.util.Download.getFileName;
import com.zxy97.download.util.GetPath;
import java.io.File;
import java.io.IOException;
import java.io.PrintWriter;
import javax.servlet.Se... |
parthjoshi2007/pydantic | docs/examples/types_choices.py | from enum import Enum, IntEnum
from pydantic import BaseModel, ValidationError
class FruitEnum(str, Enum):
pear = 'pear'
banana = 'banana'
class ToolEnum(IntEnum):
spanner = 1
wrench = 2
class CookingModel(BaseModel):
fruit: FruitEnum = FruitEnum.pear
tool: ToolEnum = ToolEnum.spanner
print... |
l81893521/design-pattern-example | src/main/java/abstract_factory/Test.java | <gh_stars>1-10
package abstract_factory;
import abstract_factory.apple.AppleFactory;
import abstract_factory.xiaomi.XiaomiFactory;
/**
* 抽象工厂模式测试类
* @author zhangjiawei
*
*/
public class Test {
public static void main(String[] args) {
/*
* 很轻松获取到appleFactory
* 通过appleFactory也很轻松拿到苹果产品的对象,如iphone,ipad等... |
NickyMateev/compass | components/kyma-environment-broker/internal/appinfo/runtime_info_test.go | <reponame>NickyMateev/compass
package appinfo_test
import (
"encoding/json"
"errors"
"fmt"
"net/http"
"net/http/httptest"
"testing"
"time"
"github.com/kyma-incubator/compass/components/kyma-environment-broker/internal"
"github.com/kyma-incubator/compass/components/kyma-environment-broker/internal/appinfo"
"... |
xingmeichen/spring-cloud-shop | shop-job/shop-job-api/src/main/java/quick/pager/shop/trigger/JobTrigger.java | <gh_stars>100-1000
package quick.pager.shop.trigger;
import com.google.common.collect.Lists;
import java.util.Collections;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import java.util.stream.Collectors;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.EnumUtils;
import o... |
nikkieverett/recipe-app | src/components/RecipeCard/RecipeCard.styles.js | <filename>src/components/RecipeCard/RecipeCard.styles.js
import { makeStyles } from '@material-ui/core/styles'
const recipeCardStyles = makeStyles(theme => ({
root: {
position: 'relative',
cursor: 'pointer',
height: '100%',
padding: '0',
textTransform: 'capitalize',
backgroundColor: 'rgba(255... |
kojitominaga/scratch | 270k/eb/plot5.py | import os
import numpy as np
import pandas as pd
# import pg8000
# from sqlalchemy import create_engine
import datetime
# import scipy.optimize
# import scipy.interpolate
from mpl_toolkits.basemap import Basemap
import matplotlib.pyplot as plt
import matplotlib as mpl
geog = pd.read_csv('9k_geography.csv')
geog = geo... |
andy-sheng/leetcode | proj/alog/885. Spiral Matrix III/885. Spiral Matrix III.h | <reponame>andy-sheng/leetcode
//
// 885. Spiral Matrix III.h
// leetcode
//
// Created by andysheng on 2019/10/23.
// Copyright © 2019 Andy. All rights reserved.
//
#ifndef _85__Spiral_Matrix_III_h
#define _85__Spiral_Matrix_III_h
#include <vector>
using namespace std;
namespace SpiralMatrixIII {
class Solut... |
Parcons/Torque3D | Engine/source/T3D/vehicles/flyingVehicle.h | <filename>Engine/source/T3D/vehicles/flyingVehicle.h<gh_stars>100-1000
//-----------------------------------------------------------------------------
// Copyright (c) 2012 GarageGames, LLC
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentatio... |
06keito/study-atcoder | src/abc194_b.py | <gh_stars>1-10
N = int(input())
li = [list(map(int,input().split())) for i in range(N)]
ans = 10**9
for idx_a in range(N):
for idx_b in range(N):
A,B = li[idx_a][0],li[idx_b][1]
if idx_a==idx_b:
ans = min(ans,A+B)
else:
ans = min(ans,max(A,B))
print(ans) |
nbbull/RIDE | src/robotide/editor/listeditor.py | <reponame>nbbull/RIDE
# Copyright 2008-2012 Nokia Siemens Networks Oyj
#
# 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 requ... |
yangbajing/akka-fusion | fusion-security/src/main/scala/fusion/security/aes/Crypto.scala | <reponame>yangbajing/akka-fusion
/*
* Copyright 2019 <EMAIL>
*
* 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... |
McJty/ImmersiveCraft | src/main/java/mcjty/immcraft/setup/ClientProxy.java | <gh_stars>1-10
package mcjty.immcraft.setup;
import mcjty.immcraft.ImmersiveCraft;
import mcjty.immcraft.blocks.ModBlocks;
import mcjty.immcraft.blocks.bundle.BundleModelLoader;
import mcjty.immcraft.events.ClientForgeEventHandlers;
import mcjty.immcraft.input.InputHandler;
import mcjty.immcraft.input.KeyBindings;
imp... |
besom/bbossgroups-3.5 | bboss-taglib/src/com/frameworkset/common/tag/pager/tags/ParamTag.java | /*****************************************************************************
* *
* This file is part of the tna framework distribution. *
* Documentation and updates may be get from biaoping.yin the author of *
... |
curaga/curaga | db/migrate/20200508174125_create_documents.rb | # frozen_string_literal: true
class CreateDocuments < ActiveRecord::Migration[6.0]
def change
create_table :documents do |t|
t.text :title, null: false, default: ''
t.jsonb :content, null: false, default: '{"doc": {"type":"doc"}}'
t.timestamps
end
end
end
|
Juny4541/GitDemo | app/src/main/java/com/juny/cashiersystem/business/cashiertab/presenter/CashierPresenter.java | <reponame>Juny4541/GitDemo
package com.juny.cashiersystem.business.cashiertab.presenter;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.DialogInterface;
import com.juny.cashiersystem.base.BasePresenter;
import com.juny.cashiersystem.bean.CategoryBean;
import com.juny.cashiersystem... |
BrunoAOR/get-out | get-out/Interactable.h | <gh_stars>0
#ifndef H_INTERACTABLE
#define H_INTERACTABLE
#include "Entity.h"
#include "EntityFactory.h"
class Interactable :
public Entity
{
friend Entity* EntityFactory::createEntity(EntityInfo);
private:
Interactable(int id, const std::string& name, const std::string& description, const std::string& inspectDes... |
prudywsh/steganography_conf_website | client/components/nav.js | import { h, Component } from 'preact'
import { connect } from 'preact-redux'
import reduce from '../reducer'
import * as actions from '../actions'
import NavItem from './navItem'
@connect(reduce, actions)
class Nav extends Component {
onScroll = () => {
this.setState({
black: window.pageYOffset >= 100
... |
arthur-noseda/spring-hateoas | src/main/java/org/springframework/hateoas/support/WebStack.java | <reponame>arthur-noseda/spring-hateoas
/*
* Copyright 2019-2020 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... |
cloudfoundry-incubator/garden-linux | linux_container/cgroups_manager/fake_cgroups_manager/fake_cgroups_manager.go | <reponame>cloudfoundry-incubator/garden-linux<gh_stars>10-100
package fake_cgroups_manager
import (
"path"
)
type FakeCgroupsManager struct {
cgroupsPath string
id string
SetError error
AddError error
setValues []SetValue
addValues []AddValue
getCallbacks []GetCallback
setCallbacks []SetCall... |
BabyMelvin/Linux-Api | driver/weidongshan/100ask/first_session/009_nor_flash/timer.c | <gh_stars>1-10
#include "s3c2440_soc.h"
void timer_irq(void)
{
// 点灯计数
static int cnt = 0;
int tmp;
cnt ++;
tmp =~cnt;
tmp &= 7;
GPFDAT &= ~(7 << 4);
GPFDAT |= ~(tmp << 4);
}
void timer_init (void)
{
/**
* 设置TIMER0的时钟
* Timer clk = PCLK / {prescaler value + 1} / {divider... |
muhammad-masood-ur-rehman/Skillrack | Python Programs/value-equals-previous-two.py | <filename>Python Programs/value-equals-previous-two.py
Value Equals Previous Two
An array of N integers is passed as the input. The program must find the combination of integers forming a sequence whose length is more than 4 which satisfies the below conditions.
- The ith index must satisfy arr[i] = arr[i-1] + arr[i-... |
diogocs1/comps | web/openerp/addons/base/res/res_users.py | <filename>web/openerp/addons/base/res/res_users.py
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
# Copyright (C) 2010-2014 OpenERP s.a. (<http://openerp.... |
yang-xiansen/drp | src/main/webapp/drp/base/view/WestView.js | <filename>src/main/webapp/drp/base/view/WestView.js<gh_stars>100-1000
Ext.define("drp.base.view.WestView", {
extend : 'Ext.panel.Panel',
alias : 'widget.westview',
collapsible : true,
split : true,
border : 0,
margins : '0 2 0 0',
width : 180,
titleAlign: 'center',
title : "业务导航",
... |
wrmlab/wrmos | krn/thread.h | //##################################################################################################
//
// Thread implementation.
//
//##################################################################################################
#ifndef THREAD_H
#define THREAD_H
#include "list.h"
#include "sys_eframe.h"
#includ... |
rbouadjenek/DQBioinformatics | DNorm-5.4.0/src/dnorm/PollDNorm.java | package dnorm;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.nio.file.Files;
import java.util.ArrayList;
import java.util.Collections;
impo... |
Jenny19880324/suitesparse-metis-for-windows | SuiteSparse/GraphBLAS/Demo/Source/bfs5m.c | <reponame>Jenny19880324/suitesparse-metis-for-windows
//------------------------------------------------------------------------------
// GraphBLAS/Demo/Source/bfs5m.c: breadth first search (vxm and assign/reduce)
//------------------------------------------------------------------------------
// Modified from the Gra... |
elveahuang/spring-samples | spring-boot-samples/spring-boot-data-sample/src/test/java/cn/elvea/samples/spring/boot/data/datasource/DataSourceTests.java | package cn.elvea.samples.spring.boot.data.datasource;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.spr... |
maheshlalu/OdishaNews | Odisha360/OGOdishaSHKConfigurator.h | //
// OGOdishaSHKConfigurator.h
// OnGO
//
// Created by <NAME> on 20/02/16.
// Copyright © 2016 <NAME>. All rights reserved.
//
#import <ShareKit/ShareKit.h>
#import "SHKConfiguration.h"
#import "DefaultSHKConfigurator.h"
@interface OGOdishaSHKConfigurator : DefaultSHKConfigurator
@end
|
heaths/azure-sdk-for-go | services/cognitiveservices/v1.0/entitysearch/client.go | <filename>services/cognitiveservices/v1.0/entitysearch/client.go
// Package entitysearch implements the Azure ARM Entitysearch service API version 1.0.
//
// The Entity Search API lets you send a search query to Bing and get back search results that include entities and
// places. Place results include restaurants, hot... |
ikostan/python | markdown/markdown.py | <filename>markdown/markdown.py
import re
def parse(markdown):
# Split source string in to list by new line
lines = markdown.split('\n')
results = list()
in_list = False
# Process the list line by line and replace
# patterns into HTML tags
for line in lines:
line = replace_header(... |
AonanHe/LeetCode | Easy/monotonic-array.js | /**
* Problem: Monotonic Array
* Difficulty: Easy
* Runtime: 200 ms
* Date: 2019/10/27
* Author: <NAME>
*/
/**
* @param {number[]} A
* @return {boolean}
*/
var isMonotonic = function(A) {
function equal(a, b) {
if (a.length !== b.length) return false
for (let i = 0; i < a.length; i++) {
if (a[i... |
npocmaka/Windows-Server-2003 | admin/wmi/wbem/scripting/test/jscript/arrayoob.js | <reponame>npocmaka/Windows-Server-2003
//***************************************************************************
//This script tests array out-of-bounds conditions on properties and
//qualifiers
//***************************************************************************
var Service = GetObject("winmgmts:root... |
jacadcaps/webkitty | Source/WebCore/html/FeaturePolicy.cpp | /*
* Copyright (C) 2019 Apple Inc. 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 of conditions a... |
lingfish/stackstorm-vsphere | actions/guest_file_upload.py | <filename>actions/guest_file_upload.py
# Licensed to the StackStorm, Inc ('StackStorm') 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.... |
Matthew-Griffith/ringteki-client | server/game/cards/02.2-FHaG/NorthernWallSensei.js | <gh_stars>100-1000
const DrawCard = require('../../drawcard.js');
const { Players, CardTypes } = require('../../Constants');
class NorthernWallSensei extends DrawCard {
setupCardAbilities(ability) {
this.action({
title: 'Grant immunity to events',
condition: context => context.sourc... |
ichitaso/TwitterListEnabler | Twitter-Dumped/7.60.6/T1FollowsYouView.h | <reponame>ichitaso/TwitterListEnabler<gh_stars>1-10
//
// Generated by class-dump 3.5 (64 bit) (Debug version compiled Sep 17 2017 16:24:48).
//
// class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2015 by <NAME>.
//
#import <UIKit/UIView.h>
@class NSString, UIColor, UIFont, UILabel;
@interface T1Follow... |
asheraryam/ETEngine | Engine/source/EtRendering/GlobalRenderingSystems/PrimitiveRenderer.cpp | <reponame>asheraryam/ETEngine
#include "stdafx.h"
#include "PrimitiveRenderer.h"
namespace et {
namespace render {
//Abstract
//*********
void PrimitiveGeometry::RootDraw()
{
if (!m_IsInitialized)
{
Initialize();
m_IsInitialized = true;
}
Draw();
}
PrimitiveRenderer::PrimitiveRenderer()
{
AddGeometry(ne... |
naparuba/opsbro | data/global-configuration/packs/rabbitmq/collectors/collector_rabbitmq.py | <filename>data/global-configuration/packs/rabbitmq/collectors/collector_rabbitmq.py<gh_stars>10-100
import traceback
from opsbro.httpclient import get_http_exceptions, httper
from opsbro.collector import Collector
from opsbro.parameters import StringParameter
from opsbro.jsonmgr import jsoner
# TODO: look at all ava... |
trayanmomkov/jos | src/main/java/info/trekto/jos/core/model/impl/SimulationObjectImpl.java | <gh_stars>0
package info.trekto.jos.core.model.impl;
import info.trekto.jos.core.model.ImmutableSimulationObject;
import info.trekto.jos.core.model.SimulationObject;
import info.trekto.jos.core.numbers.Number;
import static info.trekto.jos.core.numbers.NumberFactoryProxy.TRIPLE_ZERO;
import static info.trekto.jos.cor... |
delftdata/s-query | hazelcast/hazelcast-sql-core/src/test/java/com/hazelcast/sql/support/model/person/Person.java | /*
* Copyright (c) 2008-2020, Hazelcast, 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 ... |
meterXu/DogIcon | src/packages/dog-icon/components/iconPark/ComputerOne.js | <gh_stars>1-10
/**
* @file ComputerOne 计算机
* @author Auto Generated by IconPark
*/
/* tslint:disable: max-line-length */
/* eslint-disable max-len */
import {IconWrapper} from '../index';
export default IconWrapper(
'ComputerOne',
true,
(h, props) => (
<svg
width={props.size}
... |
spcl/dace-onnx | tests/pure_expansions/test_conv_expansion.py | import pytest
import dace
import daceml.onnx as donnx
import torch
import torch.nn.functional as F
import numpy as np
@pytest.mark.parametrize("implementation", ["pure", "im2col"])
@pytest.mark.parametrize("num_in_channels, kernel_size, num_filters, bias",
[(1, (3, 3), 8, True), (8, (3, 3), 3... |
czankel/cne | cli/common_test.go | <reponame>czankel/cne
package cli
import (
"testing"
"bytes"
"io"
"os"
)
// compareString compares the provided strings and returns -1 if they match, or the position
// where they mismatch. Note that this will return the length of the shorter string if their
// length differs.
func compareStrings(l, r string) in... |
Manny27nyc/azure-sdk-for-java | sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/HcxEnterpriseSitesCreateOrUpdateSamples.java | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.
package com.azure.resourcemanager.avs;
/** Samples for HcxEnterpriseSites CreateOrUpdate. */
public final class HcxEnterpriseSitesCreateOrUpdateSamples {
/**
... |
Zirias/pocas | src/bin/test/gui_internal.h | <filename>src/bin/test/gui_internal.h
#ifndef GUI_INTERNAL_H
#define GUI_INTERNAL_H
typedef struct Gui Gui;
Gui *Gui_create(void);
int Gui_run(Gui *self);
void Gui_dispose(Gui *self);
void Gui_destroy(Gui *self);
#endif
|
SVEChina/SVEngine | SVEngine/src/node/SVSpriteNode.h | //
// SVSpriteNode.h
// SVEngine
// Copyright 2017-2020
// <NAME>,<NAME>,<NAME>,<NAME>,<NAME>,<NAME>
//
#ifndef SV_SPRITE_H
#define SV_SPRITE_H
#include "SVNode.h"
namespace sv {
namespace node{
/*
精灵节点
*/
class SVSpriteNode : public SVNode {
publi... |
rweyrauch/AoSSimulator | include/stormcast/VanguardHunters.h | <reponame>rweyrauch/AoSSimulator<gh_stars>1-10
/*
* Warhammer Age of Sigmar battle simulator.
*
* Copyright (C) 2019 by <NAME> - <EMAIL>
*
* This code is licensed under the MIT license (MIT) (http://opensource.org/licenses/MIT)
*/
#pragma once
#include <stormcast/StormcastEternals.h>
#include <Weapon.h>
namespa... |
projectpai/paipass | frontend/src/components/shared/Header/index.js | import React, { Component } from 'react';
import { withStyles } from '@material-ui/core/styles';
import PaiPassLogo from 'assets/logo.png';
import AppBar from '@material-ui/core/AppBar';
import Toolbar from '@material-ui/core/Toolbar';
import IconButton from '@material-ui/core/IconButton';
import MenuIcon from '@materi... |
Praneethvvs/CircleCi_FastApi | general_dir/sorting_algorithms.py | <gh_stars>0
from abc import ABC, abstractmethod
class A(ABC):
@abstractmethod
def myfun(self):
return 1
def testfun(self):
print(1)
class C(A):
pass
C().testfun() |
lumos675/themecolor | mutable-theme/src/main/java/com/stardust/theme/app/ThemeColorAppCompatActivity.java | <reponame>lumos675/themecolor
package com.stardust.theme.app;
import android.os.Bundle;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
import com.stardust.theme.ThemeColorManager;
/**
* Created by Stardust on 2017/3/5.
*/
public class ThemeColorAppCompatActivity extends AppC... |
atveit/vespa | document/src/vespa/document/datatype/referencedatatype.cpp | <gh_stars>0
// Copyright 2017 <NAME>. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "referencedatatype.h"
#include <vespa/document/fieldvalue/referencefieldvalue.h>
#include <vespa/vespalib/util/exceptions.h>
using vespalib::make_string;
using vespalib::IllegalArgumentE... |
XpressAI/frovedis | src/foreign_if/python/examples/spectral_clustering_demo.py | #!/usr/bin/env python
import sys
import numpy as np
from frovedis.exrpc.server import FrovedisServer
from frovedis.matrix.dense import FrovedisRowmajorMatrix
from frovedis.mllib.cluster import SpectralClustering
# initializing the Frovedis server
argvs = sys.argv
argc = len(argvs)
if (argc < 2):
print ('Please gi... |
halleyzhao/alios-mm | test/cow/player/pipeline_player_test.cc | /**
* Copyright (C) 2017 Alibaba Group Holding Limited. 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
*
* ... |
avinfinity/UnmanagedCodeSnippets | Segmentation/utils.cpp |
#include "iostream"
#include "src\plugins\Application\ZeissViewer\SegmentationInterface\ZeissSegmentationInterface.hpp"
#include "itkImage.h"
#include "itkImageFileWriter.h"
#include "itkPNGImageIO.h"
#include "eigenincludes.h"
#include "VolumeInfo.h"
typedef unsigned short InternalPixelType;
typedef Eigen::Vector3f ... |
YukkaSarasti/pythonintask | IVTp/2014/Shcherbakov_R_A/task_07_22.py | <filename>IVTp/2014/Shcherbakov_R_A/task_07_22.py
# Задача 7. Вариант 22.
# Разработайте систему начисления очков для задачи 6, в соответствии с которой
# игрок получал бы большее количество баллов за меньшее количество попыток.
# <NAME>.
# 22.05.2016
import random
print("Комп загадал имя одного из двух братьев осно... |
DigitalInnovation/cucumber-jvm | java/src/test/java/io/cucumber/java/JavaDefaultParameterTransformerDefinitionTest.java | <gh_stars>1-10
package io.cucumber.java;
import io.cucumber.core.backend.Lookup;
import org.junit.jupiter.api.Test;
import java.lang.reflect.Method;
import java.lang.reflect.Type;
import java.util.Map;
import static org.hamcrest.CoreMatchers.startsWith;
import static org.hamcrest.MatcherAssert.assertThat;
import sta... |
qrac/musubii | src/components/previews/preview-badge.js | import React from "react"
import beautify from "js-beautify"
import DemoOption from "~/components/parts/demo-option"
import DemoOptionBoxRadios from "~/components/parts/demo-option-box-radios"
import DemoOptionBoxCheckbox from "~/components/parts/demo-option-box-checkbox"
import DemoPre from "~/components/parts/demo-p... |
unparalleled/kcards | app/src/main/java/com/mrkevinthomas/kcards/card_swipe/CardSwipeActivity.java | package com.mrkevinthomas.kcards.card_swipe;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.widget.Toast;
import com.lorentzos.flingswipe.SwipeFlingAdapterView;
import com.mrkevinthomas.kcards.BaseActivity;
import com.mrkevinthomas.kcards.CardViewActivity;
import ... |
robbypambudi/Struktur-Data | Tugas [6]/Exercises_9_No_4/bst_empty.c | <reponame>robbypambudi/Struktur-Data<gh_stars>1-10
// Fungsi untuk mengecek apakah fungsi tersebut kosong atau tidak
#include "header.h"
bool bst_empty(BST *bst)
{
return bst->_root == NULL;
} |
aicas/s2n-tls | tests/unit/s2n_certificate_extensions_test.c | <reponame>aicas/s2n-tls
/*
* Copyright 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 compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* o... |
ScheintodX/AXON-E-Tools | src/test/java/de/axone/cache/ng/TestValueProviderTest.java | <gh_stars>0
package de.axone.cache.ng;
import static org.testng.Assert.*;
import java.util.ArrayList;
import java.util.ConcurrentModificationException;
import java.util.List;
import org.testng.annotations.Test;
import de.axone.cache.ng.TestValueProvider.Range;
@Test( groups="testng.testvalueprovider" )
public clas... |
digi-embedded/android_platform_system_bt | service/test/low_energy_scanner_unittest.cc | <filename>service/test/low_energy_scanner_unittest.cc<gh_stars>0
//
// Copyright (C) 2016 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:... |
knightjdr/prohits-viz-ap | app/actions/news/get-news-articles.test.js | <gh_stars>1-10
import addMongoDate from '../../utils/add-mongo-date.js';
import find from '../../helpers/database/find.js';
import getNewsArticles from './get-news-articles.js';
import logger from '../../helpers/logging/logger.js';
jest.mock('../../utils/add-mongo-date');
jest.mock('../../helpers/database/find');
jest... |
BernardoFuret/async-tajs | resources/hostenv/nodejs/modules/fs.js | function Stats(
dev,
mode,
nlink,
uid,
gid,
rdev,
blksize,
ino,
size,
blocks,
atim_msec,
mtim_msec,
ctim_msec,
birthtim_msec,
atime,
mtime,
ctime,
birthtime
) {
this.dev = dev;
this.mode = mode;
this.nlink = nlink;
this.uid = uid;
... |
adohe/Homework | LeetCode/src/com/xqbase/java/ZigConv.java | <gh_stars>1-10
package com.xqbase.java;
/**
* LeetCodeSix -- Zigzag Conversion.
*
* @author <NAME>
*/
public class ZigConv {
public static void main(String[] args) {
System.out.println(convert("PAYPALISHIRING", 3));
}
public static String convert(String s, int numRows) {
if (numRows ... |
svidoso/ipopo | pelix/rsa/topologymanagers/basic.py | #!/usr/bin/python
# -- Content-Encoding: UTF-8 --
"""
BasicTopologyManager implements TopologyManager API
:author: <NAME>
:copyright: Copyright 2020, <NAME>
:license: Apache License 2.0
:version: 1.0.1
..
Copyright 2020 <NAME>
Licensed under the Apache License, Version 2.0 (the "License");
you may not ... |
wcalandro/kythe | kythe/cxx/indexer/cxx/testdata/tvar_template/template_arg_multiple_typename.cc | // Checks that templates can accept multiple typename arguments.
template
//- @T defines/binding TT
//- @S defines/binding TS
<typename T, typename S>
//- @C defines/binding ACDecl1
class C;
template
//- @N defines/binding TN
//- @V defines/binding TV
<typename N, typename V>
//- @C defines/binding ACDecl2
class C;
... |
ajb85/coopers-site | src/components/Gallery/Gallery.js | <filename>src/components/Gallery/Gallery.js
import React, { useEffect, useContext } from 'react';
import { useParams } from 'react-router-dom';
import MainImage from '../MainImage/';
import SideMenu from '../SideMenu/';
import BottomMenu from '../BottomMenu/';
import { ImagesContext } from 'Providers/Images.js';
impo... |
sergeishay/Screenters | source-pack/pro/InputRange/index.js | export { default } from './InputRange';
export * from './InputRange'; |
C14427818/CollegeYr1 | Algorithm and Design/Assignment/bubblenum.c | <reponame>C14427818/CollegeYr1
#include <stdio.h>
main()
{
int stuarray[15], num, i, j, swap;
printf("Enter number of students\n");
scanf("%d", &num);
printf("Enter %d student ID's\n", num);
for (i = 0; i < num; i++)
{
scanf("%d", &stuarray[i]);
}
for (i = 0 ; i < ( num - ... |
brycewang-microsoft/iot-sdks-e2e-fx | test-runner/exc_thread.py | # Copyright (c) Microsoft. All rights reserved.
# Licensed under the MIT license. See LICENSE file in the project root for
# full license information.
import threading
class ExcThread(threading.Thread):
def __init__(self, target, args=None):
self.args = args if args else []
self.target = target
... |
shubha-rajan/civiform | universal-application-tool-0.0.1/app/services/program/ProgramBlockDefinitionNotFoundException.java | package services.program;
/**
* ProgramBlockDefinitionNotFoundException is thrown when the specified block definition is not
* found in this program.
*/
public class ProgramBlockDefinitionNotFoundException extends Exception {
public ProgramBlockDefinitionNotFoundException(long programId, long blockDefinitionId) {... |
doorsrom/com.doors.edge | app/src/main/java/org/chromium/chrome/browser/widget/selection/SelectableBottomSheetContent.java | <reponame>doorsrom/com.doors.edge<filename>app/src/main/java/org/chromium/chrome/browser/widget/selection/SelectableBottomSheetContent.java
// Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
package org.ch... |
NOAA-EMC/ioda | src/engines/ioda/src/ioda/Engines/HH/HH/HH-types.h | #pragma once
/*
* (C) Copyright 2017-2020 <NAME> (<EMAIL>)
* (C) Copyright 2020-2021 UCAR
*
* This software is licensed under the terms of the Apache Licence Version 2.0
* which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
*/
/*! \addtogroup ioda_internals_engines_hh
*
* @{
* \file HH-types.h... |
sho25/jackrabbit-oak | oak-blob-plugins/src/test/java/org/apache/jackrabbit/oak/plugins/blob/DataStoreCacheUpgradeUtilsTest.java | <filename>oak-blob-plugins/src/test/java/org/apache/jackrabbit/oak/plugins/blob/DataStoreCacheUpgradeUtilsTest.java
begin_unit|revision:0.9.5;language:Java;cregit-version:0.0.1
begin_comment
comment|/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTI... |
sarvekash/HackerRank_Solutions | ProjectEuler+/euler-0485.cpp | // ////////////////////////////////////////////////////////
// # Title
// Maximum number of divisors
//
// # URL
// https://projecteuler.net/problem=485
// http://euler.stephan-brumme.com/485/
//
// # Problem
// Let `d(n)` be the number of divisors of `n`.
// Let `M(n,k)` be the maximum value of `d(j)` for `n <= j <=... |
yinziang/CMSProject | src/main/java/com/hy/dao/mapper/ImageTextMapper.java | package com.hy.dao.mapper;
import com.hy.domain.ImageText;
import java.util.List;
public interface ImageTextMapper {
int deleteByPrimaryKey(Integer id);
int insert(ImageText record);
ImageText selectByPrimaryKey(Integer id);
List<ImageText> selectAll();
int updateByPrimaryKey(ImageText recor... |
ScottEllisNovatex/opendatacon | Code/Ports/SimPort/SimPortConf.h | /* opendatacon
*
* Copyright (c) 2014:
*
* DCrip3fJguWgVCLrZFfA7sIGgvx1Ou3fHfCxnrz4svAi
* yxeOtDhDCXf1Z4ApgXvX5ahqQmzRfJ2DoX8S05SqHA==
*
* 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 ... |
jerrylovepizza/JavaLearningmanual | project/小米商城/shopping/src/com/mylifes1110/java/dao/OrderDao.java | package com.mylifes1110.java.dao;
import com.mylifes1110.java.bean.Order;
import java.sql.SQLException;
import java.util.List;
public interface OrderDao {
List<Order> selectOrderByUserId(int userId) throws SQLException;
void insertOrder(Order order) throws SQLException;
Order selectOrderMoney(String oi... |
nistefan/cmssw | FWCore/Framework/src/ESProxyFactoryProducer.cc | <filename>FWCore/Framework/src/ESProxyFactoryProducer.cc<gh_stars>1-10
// -*- C++ -*-
//
// Package: Framework
// Class : ESProxyFactoryProducer
//
// Implementation:
// <Notes on implementation>
//
// Author: <NAME>
// Created: Thu Apr 7 21:36:15 CDT 2005
//
// system include files
// user inc... |
Znigneering/CSCI-3154 | graph-tool-2.27/src/graph/util/graph_search.hh | <gh_stars>0
// graph-tool -- a general graph modification and manipulation thingy
//
// Copyright (C) 2006-2018 <NAME> <<EMAIL>>
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either vers... |
gsage/engine | PlugIns/SDL/src/SDLPlugin.cpp | <filename>PlugIns/SDL/src/SDLPlugin.cpp
/*
-----------------------------------------------------------------------------
This file is a part of Gsage engine
Copyright (c) 2014-2017 <NAME>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (... |
ImogenBits/algobattle | algobattle/battle_wrapper.py | <reponame>ImogenBits/algobattle<filename>algobattle/battle_wrapper.py
"""Base class for wrappers that execute a specific kind of battle.
The battle wrapper class is a base class for specific wrappers, which are
responsible for executing specific types of battle. They share the
characteristic that they are responsible ... |
Seitenbau/Sonferenz | sonferenz-web/src/main/java/de/bitnoise/sonferenz/web/pages/admin/tabs/LogOutputPanel.java | package de.bitnoise.sonferenz.web.pages.admin.tabs;
import static ch.qos.logback.core.CoreConstants.LINE_SEPARATOR;
import java.io.StringWriter;
import org.apache.wicket.Component;
import org.apache.wicket.markup.html.basic.Label;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import ch.qos.logback.classi... |
shahvineet98/dagster | python_modules/libraries/dagster-gcp/dagster_gcp/dataproc/configs.py | <filename>python_modules/libraries/dagster-gcp/dagster_gcp/dataproc/configs.py
from dagster import Dict, Field, String
from .configs_dataproc_cluster import define_dataproc_cluster_config
from .configs_dataproc_job import define_dataproc_job_config
def define_dataproc_create_cluster_config():
cluster_name = Fiel... |
gsmcwhirter/discord-bot-lib | discordapi/etf/helpers.go | package etf
import (
"encoding/binary"
"fmt"
"io"
"github.com/gsmcwhirter/go-util/v8/errors"
"github.com/gsmcwhirter/discord-bot-lib/v20/snowflake"
)
func writeLength16(b io.Writer, n int) error {
// assumes the Atom identifier byte has already been written
size, err := intToInt16Slice(n)
if err != nil {
... |
cquoss/jboss-4.2.3.GA-jdk8 | aspects/src/main/org/jboss/aspects/asynch/FutureInvocationHandler.java | <reponame>cquoss/jboss-4.2.3.GA-jdk8
/*
* JBoss, Home of Professional Open Source.
* Copyright 2006, Red Hat Middleware LLC, and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
* This is free software; yo... |
fuchao01/fuchao | solr/core/src/java/org/apache/solr/search/similarities/DFRSimilarityFactory.java | package org.apache.solr.search.similarities;
/*
* 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 Lic... |
stanfy/helium | codegen/swagger/src/main/java/com/stanfy/helium/swagger/Root.java | <gh_stars>10-100
package com.stanfy.helium.swagger;
import com.stanfy.helium.handler.codegen.json.schema.JsonSchemaEntity;
import java.util.List;
import java.util.Map;
/** Root of Swagger spec. */
final class Root {
final String swagger = "2.0";
Info info;
String host;
List<String> schemes;
String bas... |
Raxa/Raxa-JSS | src/outpatient/app/view/patient/diagnosedlist.js | /**
* Copyright 2012, Raxa
*
* 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 wr... |
sasfeld/remap | src/main/java/com/remondis/remap/BidirectionalMapper.java | package com.remondis.remap;
import static com.remondis.remap.Lang.denyNull;
import java.util.Collection;
import java.util.List;
import java.util.Set;
/**
* This class can be used to manage bidirectional mappings. The configuration of mappers for both directions is required
* to build a bidirectional mapping.
*
*... |
125929280/LeetCode | 572.java | <reponame>125929280/LeetCode<filename>572.java
/**
* Definition for a binary tree node.
* public class TreeNode {
* int val;
* TreeNode left;
* TreeNode right;
* TreeNode() {}
* TreeNode(int val) { this.val = val; }
* TreeNode(int val, TreeNode left, TreeNode right) {
* this.val... |
pepsi7959/OpenstudioThai | openstudiocore/src/project/ProjectDatabaseRecord.hpp | <gh_stars>1-10
/**********************************************************************
* Copyright (c) 2008-2015, Alliance for Sustainable Energy.
* All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as publi... |
asuessenbach/pipeline | dp/sg/io/DPAF/Saver/inc/DPAFSaver.h | // Copyright (c) 2002-2015, NVIDIA CORPORATION. All rights reserved.
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
// * Redistributions of source code must retain the above copyright
// notice, this list of con... |
ProjectBlackFalcon/DatBot | DatBot.ProtocolBuilder/Utils/messages/game/context/roleplay/job/JobLevelUpMessage.java | package protocol.network.messages.game.context.roleplay.job;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import protocol.utils.ProtocolTypeManager;
import protocol.network.util.types.BooleanByteWrapper;
import protocol.network.NetworkMessage;
import protocol.network.util.DofusDataRe... |
NaturalHistoryMuseum/taxonworks | spec/factories/geographic_areas_geographic_items_factory.rb | # Read about factories at https://github.com/thoughtbot/factory_bot
FactoryBot.define do
factory :geographic_areas_geographic_item do
geographic_area { nil }
geographic_item { nil }
data_origin { 'MyString' }
origin_gid { 1 }
date_valid_from { 'MyString' }
date_valid_to { 'MyString' }
# d... |
cliveyao/Orienteer | orienteer-tours/src/main/java/org/orienteer/tours/BootstrapTouristPlugin.java | package org.orienteer.tours;
import org.apache.wicket.Page;
import org.apache.wicket.markup.head.CssHeaderItem;
import org.apache.wicket.markup.head.IHeaderResponse;
import org.apache.wicket.markup.head.JavaScriptHeaderItem;
import org.apache.wicket.request.resource.CssResourceReference;
import org.apache.wicket.reque... |
zakibinary/deriv-app | packages/cashier/build/webpack.config.js | const path = require('path');
const { ALIASES, IS_RELEASE, MINIMIZERS, plugins, rules } = require('./constants');
module.exports = function (env, argv) {
const base = env && env.base && env.base != true ? '/' + env.base + '/' : '/';
return {
context: path.resolve(__dirname, '../src'),
devtool:... |
AleFelix/Sobelizador-de-Videos-Distribuido | src/distribuido/mapper/MapperServer.java | <filename>src/distribuido/mapper/MapperServer.java
package distribuido.mapper;
import java.io.File;
import java.rmi.RemoteException;
import java.rmi.registry.LocateRegistry;
import java.rmi.registry.Registry;
import java.rmi.server.UnicastRemoteObject;
import java.util.Scanner;
public class MapperServer {
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.