repo_name stringlengths 6 101 | path stringlengths 4 300 | text stringlengths 7 1.31M |
|---|---|---|
dlawde/homebrew-cask | Casks/screencast.rb | <reponame>dlawde/homebrew-cask
cask "screencast" do
version "0.0.6"
sha256 "0fb23d34ee3c94eb47233b42d2ac93de84d14dcdafe1e7205ce0a4341ee812f0"
url "https://github.com/soh335/Screencast/releases/download/#{version}/Screencast.dmg"
name "Screencast"
desc "Simple screen video capture application"
homepage "htt... |
JumHorn/leetcode | C/CombinationSumII.c | #include <stdbool.h>
#include <stdlib.h>
#include <string.h>
//integer cmp function
int cmp(const void *lhs, const void *rhs)
{
if (*(int *)lhs == *(int *)rhs)
return 0;
return *(int *)lhs < *(int *)rhs ? -1 : 1;
}
//malloc result
int **mallocRes(int (*data)[30], int dataSize, int *dataColSize, int *returnSize, i... |
nistefan/cmssw | FWCore/Integration/test/ProducerWithPSetDesc.cc | #include "FWCore/Integration/test/ProducerWithPSetDesc.h"
#include "DataFormats/TestObjects/interface/ThingCollection.h"
#include "FWCore/Framework/interface/Event.h"
#include "FWCore/Framework/interface/MakerMacros.h"
#include "FWCore/ParameterSet/interface/ConfigurationDescriptions.h"
#include "FWCore/ParameterSet/i... |
ClearlyElevated/Memexplorer | events/guildMemberRemove.js | const { members } = require('../data/channels.json');
const Discord = require('discord.js');
module.exports = class {
constructor (client) {
this.client = client;
}
async run (member) {
if(member.guild.id === "533778546288754689"){
const embed = new Discord.RichEmbed()
.setAuthor(`${member.u... |
jonpe960/ufsm | test/core/test_transition_conflict.c | <filename>test/core/test_transition_conflict.c
#include <stdio.h>
#include <assert.h>
#include <ufsm/ufsm.h>
#include "test_transition_conflict.gen.h"
static bool flag_eA, flag_xA, flag_xB, flag_eC;
static void reset_flags(void)
{
flag_eA = false;
flag_xA = false;
flag_xB = false;
flag_eC = false;
}
... |
atomsandbits/atomsandbits | services/webapp/both/imports/components/CalculationOptions/components/FinalDistanceInput/index.js | <reponame>atomsandbits/atomsandbits<gh_stars>1-10
import React from 'react';
import PropTypes from 'prop-types';
import {
branch,
compose,
lifecycle,
onlyUpdateForPropTypes,
renderNothing,
renderComponent,
withProps,
} from 'recompose';
import { OptionContainer, TextField } from '../../styles';
import ge... |
SevenDayCandle/STS-FoolMod | src/main/java/pinacolada/cards/base/attributes/HPAttribute.java | <reponame>SevenDayCandle/STS-FoolMod
package pinacolada.cards.base.attributes;
import eatyourbeets.cards.base.EYBCard;
import extendedui.utilities.ColoredString;
import pinacolada.cards.base.PCLCard;
import pinacolada.utilities.PCLColors;
public class HPAttribute extends PCLAttribute {
public static HPAttribute I... |
Willy5s/Pirates-Online-Rewritten | pirates/uberdog/DistributedGoldReceipt.py | <gh_stars>10-100
from direct.distributed.ClockDelta import *
from direct.directnotify.DirectNotifyGlobal import directNotify
from direct.distributed.DistributedObject import DistributedObject
from pirates.uberdog.UberDogGlobals import *
class DistributedGoldReceipt(DistributedObject):
notify = directNotify.newCate... |
wayneluzw/google-ads-ruby | examples/remarketing/add_logical_user_list.rb | <reponame>wayneluzw/google-ads-ruby
#!/usr/bin/env ruby
# Encoding: utf-8
#
# Copyright 2020 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
#
# https://www.apache.org/licenses... |
nistefan/cmssw | Geometry/EcalAlgo/interface/WriteESAlignments.h | <gh_stars>1-10
#ifndef SOMEPACKAGE_WRITEESALIGNMENTS_H
#define SOMEPACKAGE_WRITEESALIGNMENTS_H 1
namespace edm
{
class EventSetup ;
}
#include "CondFormats/Alignment/interface/Alignments.h"
class WriteESAlignments
{
public:
typedef Alignments* AliPtr ;
typedef std::vector<AlignTr... |
christianascone/itextpdf | itext/src/test/java/com/itextpdf/text/pdf/TextExpansionTest.java | <gh_stars>1-10
/*
This file is part of the iText (R) project.
Copyright (c) 1998-2018 iText Group NV
Authors: iText Software.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License version 3
as published by the Free Softw... |
sufyan739/AlfaSdk_Android | AlfaSdk/src/main/java/com/example/alfasdk/Models/NetShareModel/NetShareCustody.java | <filename>AlfaSdk/src/main/java/com/example/alfasdk/Models/NetShareModel/NetShareCustody.java
package com.example.alfasdk.Models.NetShareModel;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
public class NetShareCustody {
@SerializedName("physicalTradable")
@Ex... |
lilei-dfjk/mall | mall-portal/src/main/java/com/macro/mall/logistcs/cons/RedisKey.java | package com.macro.mall.logistcs.cons;
public class RedisKey {
public static final String PORTAL_LOGISTICS = "PORTAL_LOGISTICS";
public static final String LOGISTICS_RULE = "'logistics.rule.'";
}
|
mozhe24/study | java/src/main/java/ali/SearchStringByThreadPool.java | <gh_stars>1-10
package ali;
import javafx.util.Pair;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.List;
import java.util.Optional;
import java.util.concurrent.*;
import java.util.stream.Collectors;
/**
* @author yj
* @version 1.0
* @date 2019/4/28 21:02
*/
... |
x42/VeeSeeVSTRack | plugins/community/repos/moDllz/src/XBender.cpp | #include "dsp/digital.hpp"
#include "moDllz.hpp"
#include "dsp/filter.hpp"
/*
* XBender
*/
namespace rack_plugin_moDllz {
struct XBender : Module {
enum ParamIds {
XBEND_PARAM,
XBENDCVTRIM_PARAM,
XBENDRANGE_PARAM,
BEND_PARAM,
BENDCVTRIM_PARAM,
AXISXFADE_PARAM,
... |
robertdavidgraham/squirrel-wifi | src/module/pcaplive.c | /* Copyright (c) 2007 by Errata Security, All Rights Reserved
* Programer(s): <NAME> [rdg]
*/
/*
PCAPLIVE
This code links the 'libpcap' module at RUNTIME rather than LOADTIME.
This allows us to:
(a) run this program on capture files without needing libpcap installed.
(b) give more user friendly diagnostic t... |
DEIPworld/deip-chain | libraries/chain/include/deip/chain/services/dbs_contract_agreement.hpp | #pragma once
#include "dbs_base_impl.hpp"
#include <deip/chain/schema/contract_agreement_object.hpp>
namespace deip {
namespace chain {
class dbs_contract_agreement : public dbs_base
{
friend class dbservice_dbs_factory;
dbs_contract_agreement() = delete;
protected:
explicit dbs_contract_agreement(data... |
YangHao666666/hawq | tools/bin/pythonSrc/pychecker-0.8.18/pychecker/checker.py | #!/usr/bin/env python
# Copyright (c) 2001-2004, MetaSlash Inc. All rights reserved.
# Portions Copyright (c) 2005, Google, Inc. All rights reserved.
"""
Check python source code files for possible errors and print warnings
Contact Info:
http://pychecker.sourceforge.net/
<EMAIL>
"""
import string
import types... |
aekryz1993/system-administration | client/auth/validate.js | import { isEmpty } from '../utils/validations';
const validate = values => {
const { username, password } = values;
const errors = {};
if(isEmpty(username)) errors.username = 'Username Required';
if(isEmpty(password)) errors.password = '<PASSWORD>';
return errors;
};
export default validate; |
bshawk/clappr | src/components/iframe_player/iframe_player.js | <reponame>bshawk/clappr<gh_stars>1-10
// Copyright 2014 Globo.com Player authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
var BaseObject = require('base_object')
var $ = require('jquery')
var Player = require('../player')
class Ifram... |
liszekei/eggroll | jvm/core/main/scala/com/webank/eggroll/core/schedule/TaskPlan.scala | <filename>jvm/core/main/scala/com/webank/eggroll/core/schedule/TaskPlan.scala
/*
* Copyright (c) 2019 - now, Eggroll Authors. 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 Li... |
vishalbelsare/Gaffer | library/spark/spark-accumulo-library/src/test/java/uk/gov/gchq/gaffer/sparkaccumulo/operation/handler/javardd/GetJavaRDDOfElementsInRangesHandlerTest.java | /*
* Copyright 2016-2018 Crown Copyright
*
* 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... |
nhojpatrick/nhojpatrick-cucumber | json-core/src/test/java/com/github/nhojpatrick/cucumber/json/core/exceptions/tests/NullPathElementExceptionTest.java | package com.github.nhojpatrick.cucumber.json.core.exceptions.tests;
import com.github.nhojpatrick.cucumber.json.core.exceptions.NullPathElementException;
import org.junit.jupiter.api.DynamicTest;
import org.junit.jupiter.api.TestFactory;
import org.junit.jupiter.api.function.Executable;
import java.util.Arrays;
impor... |
FilipaDurao/FEUP_SDIS | src/proj/peer/operations/DeleteFileOperation.java | <filename>src/proj/peer/operations/DeleteFileOperation.java<gh_stars>0
package proj.peer.operations;
import proj.peer.Peer;
import proj.peer.log.NetworkLogger;
import java.util.logging.Level;
public class DeleteFileOperation implements Runnable {
private Peer peer;
private String filename;
public Delet... |
JCWasmx86/java-gtk | java-gtk/src/main/java/ch/bailu/gtk/helper/BuilderHelper.java | <filename>java-gtk/src/main/java/ch/bailu/gtk/helper/BuilderHelper.java<gh_stars>1-10
package ch.bailu.gtk.helper;
import java.io.File;
import ch.bailu.gtk.exception.AllocationError;
import ch.bailu.gtk.gtk.Builder;
import ch.bailu.gtk.type.CPointer;
import ch.bailu.gtk.type.Str;
public class BuilderHelper {
pri... |
dwt/capybara.py | capybara/tests/session/test_has_select.py | import pytest
class HasSelectTestCase:
@pytest.fixture(autouse=True)
def setup_session(self, session):
session.visit("/form")
class TestHasSelect(HasSelectTestCase):
def test_is_true_if_the_field_is_on_the_page(self, session):
assert session.has_select("Locale")
assert session.ha... |
Usuario001/carbon_footprint | src/components/Quiz/business-quiz.js | import React, { useState, useReducer } from 'react';
import styled from 'styled-components';
import Quiz from './quiz';
import quizData from '../../data/business-carbon-data';
import BuisnessHeader from './BusinessQuiz/buisness-header';
import BuisnessBody from './BusinessQuiz/buisness-body';
import ButtonRows from '.... |
patrickfischer1/WebAPI | src/main/java/org/ohdsi/webapi/cohortresults/mapper/TornadoMapper.java | <filename>src/main/java/org/ohdsi/webapi/cohortresults/mapper/TornadoMapper.java
package org.ohdsi.webapi.cohortresults.mapper;
import org.ohdsi.webapi.cohortresults.TornadoRecord;
import org.springframework.jdbc.core.RowMapper;
import java.sql.ResultSet;
import java.sql.SQLException;
public class TornadoMapper impl... |
hzwoo/fusepay | lib/models/sql/gateway-merchant-route.js | /**
* lib/models/sql/gateway-merchant-route.js
*/
'use strict';
const SqlTable = require('../sql-table');
class GatewayMerchantRoute extends SqlTable {
constructor(db) {
super(db);
this.name = 't_gateway_merchant_route';
this.sql = this.db(this.name);
}
}
module.exports = GatewayMerchantRoute; |
mulberry-mail/mulberry4-client | Linux/Sources/Application/Rules/Dialog/CRulesTarget.h | <reponame>mulberry-mail/mulberry4-client<filename>Linux/Sources/Application/Rules/Dialog/CRulesTarget.h
/*
Copyright (c) 2007 <NAME>. 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 ... |
anticipasean/girakkafunc | func-futurestream/src/test/java/cyclops/async/reactive/futurestream/reactivestreams/TckSynchronousPublisherTest.java | package cyclops.async.reactive.futurestream.reactivestreams;
import cyclops.async.reactive.futurestream.LazyReact;
import cyclops.reactive.companion.ThreadPools;
import org.reactivestreams.Publisher;
import org.reactivestreams.tck.PublisherVerification;
import org.reactivestreams.tck.TestEnvironment;
import org.test... |
cedinu/tsduck | src/utest/utestFatal.cpp | //----------------------------------------------------------------------------
//
// TSDuck - The MPEG Transport Stream Toolkit
// Copyright (c) 2005-2021, <NAME>
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following c... |
BrotherSharper/fxmaster | rollup.config.js | <gh_stars>0
import copy from "@guanghechen/rollup-plugin-copy";
import sourcemaps from "rollup-plugin-sourcemaps";
import styles from "rollup-plugin-styles";
import { terser } from "rollup-plugin-terser";
import { distDirectory, name, sourceDirectory } from "./tools/const.mjs";
const staticFiles = ["assets", "lang", ... |
jufeng98/b2c-master | maven-parent/b2c-cloud-test-learn-java/src/main/java/com/javamaster/b2c/cloud/test/learn/java/test/EmojiTest.java | package com.javamaster.b2c.cloud.test.learn.java.test;
import com.vdurmont.emoji.EmojiParser;
import org.junit.Test;
/**
* @author yudong
* @date 2019/5/9
*/
public class EmojiTest {
@Test
public void test(){
String str = "An 😀awesome 😃string with a few 😉emojis!";
String result = EmojiPa... |
marcomoesman/Qora | src/main/java/qora/web/ServletUtils.java | <reponame>marcomoesman/Qora
package qora.web;
import javax.servlet.http.HttpServletRequest;
public class ServletUtils {
public static boolean isRemoteRequest(HttpServletRequest servletRequestOpt)
{
if(servletRequestOpt != null)
{
String ipAdress = getRemoteAddress(servletRequestOpt);
... |
iht/fpinscala | src/test/scala/chap05/ex01Spec.scala | <gh_stars>1-10
/*
* Copyright (c) 2014-2019 <NAME> <<EMAIL>>
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software without
* restriction, including without limitation the rights to use, cop... |
anasamo92/sagess-core | search/index.js | 'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.actionBuilder = exports.builtInStore = undefined;
var _builtInStore = require('./built-in-store');
var _builtInStore2 = _interopRequireDefault(_builtInStore);
var _actionBuilder = require('./action-builder');
var _actionBuilde... |
xiaolanchong/call_to_power2 | ctp2_code/libs/anet/demo/chat/chat.c | /*
Copyright (C) 1995-2001 Activision, Inc.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distribu... |
fruitxiang/smartapp-openapi-java | src/test/java/com/baidu/mapp/tp/api/impl/FeedServiceImplTest.java | <reponame>fruitxiang/smartapp-openapi-java
package com.baidu.mapp.tp.api.impl;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anyLong;
import static org.mockito.ArgumentMatchers.anyString;
import java.util.ArrayList;
import java.util.List;
import org.junit.Assert;
import o... |
dram/metasfresh | backend/de.metas.adempiere.adempiere/base/src/main/java-gen/org/compiere/model/I_M_Attribute.java | <reponame>dram/metasfresh<gh_stars>1000+
package org.compiere.model;
import java.math.BigDecimal;
import javax.annotation.Nullable;
import org.adempiere.model.ModelColumn;
/** Generated Interface for M_Attribute
* @author metasfresh (generated)
*/
@SuppressWarnings("unused")
public interface I_M_Attribute
{
St... |
AnneLivia/URI-Online | Data Structures/Hash Table/Hash Table (Implemented With Struct)/hashTable.cpp | #include "hashTable.h"
// Creating a hash table
Hash* createHashTable(int tableSize) {
// allocating memory for the hash table
Hash *hashTable = (Hash*) malloc(sizeof(Worker));
// if it succeeded, then:
if(hashTable != nullptr) {
// assign the number of elements to 0, since there's no element y... |
akac0297/PETLAB | MRI segmentation/Register-b50-to-b50.py | #!/usr/bin/env python
# coding: utf-8
import pathlib
import numpy as np
import SimpleITK as sitk
import matplotlib.pyplot as plt
from platipy.imaging import ImageVisualiser
from platipy.imaging.label.utils import get_com
from platipy.imaging.registration.linear import linear_registration
from platipy.imaging.regist... |
zhangkn/iOS14Header | System/Library/PrivateFrameworks/StoreKitUI.framework/SKUIInteractiveSegmentedControl.h | <filename>System/Library/PrivateFrameworks/StoreKitUI.framework/SKUIInteractiveSegmentedControl.h
/*
* This header is generated by classdump-dyld 1.0
* on Sunday, September 27, 2020 at 11:44:34 AM Mountain Standard Time
* Operating System: Version 14.0 (Build 18A373)
* Image Source: /System/Library/PrivateFrameworks/St... |
tomasdavidorg/kie-cloud-tests | test-cloud/test-cloud-optaweb/src/test/java/org/kie/cloud/optaweb/testprovider/OptawebEmployeeRosteringTestProvider.java | <reponame>tomasdavidorg/kie-cloud-tests
/*
* Copyright 2019 Red Hat, Inc. and/or its affiliates.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by appli... |
cl9200/cockroach | multiraft/storage_test.go | <reponame>cl9200/cockroach
// Copyright 2014 Square, Inc
// Author: <NAME> (bdarnell@)
package multiraft
import (
"sync"
"github.com/cockroachdb/cockroach/roachpb"
"github.com/coreos/etcd/raft/raftpb"
)
// BlockableStorage is an implementation of Storage that can be blocked for testing
// to simulate slow storag... |
polarisdev87/TravelFeed | pages/dashboard/newsletter.js | <reponame>polarisdev87/TravelFeed<filename>pages/dashboard/newsletter.js
import PropTypes from 'prop-types';
import React from 'react';
import DashboardPage from '../../components/Dashboard/DashboardPage';
import Newsletter from '../../components/Dashboard/Newsletter';
const NewsletterPage = props => {
const { open ... |
jawaidm/ledger | ledgergw/apps.py | <filename>ledgergw/apps.py
from __future__ import unicode_literals
from django.apps import AppConfig
class MarinastayConfig(AppConfig):
name = 'ledgergw'
|
soulbird/apisix-seed | test/e2e/tools/regcenter/nacos.go | package regcenter
import (
"e2e/tools/common"
"encoding/json"
"errors"
"fmt"
"io/ioutil"
"net/http"
)
type Nacos struct {
}
func NewNacos() *Nacos {
return &Nacos{}
}
type servicesResp struct {
Count int `json:"count"`
Doms []string `json:"doms"`
}
func (n *Nacos) Online(node *common.Node) error {
... |
izenecloud/izenelib | include/am/trie/alphabet_cjk.hpp | /**
@file alphabet_cjk.hpp
@author <NAME>
@date 2009.11.25
*/
#ifndef ALPHABET_CJK_H
#define ALPHABET_CJK_H
#include <types.h>
NS_IZENELIB_AM_BEGIN
const unsigned int cjk_size = 41040;
extern unsigned short cjk[cjk_size];
NS_IZENELIB_AM_END
#endif
|
huangfeng19820712/hfast | core/js/utils/AlgorithmUtils.js | /**
* @author: * @date: 2018/1/2
*/
define(["core/js/Class"], function ( Class) {
var AlgorithmUtils = Class.extend({
/**
* 快速排序
* @param array
* @returns {*}
*/
quickSort:function(array){
function sort(prev, numsize){
var nonius = ... |
salathegroup/crowdbreaks | app/javascript/custom/forms.js | // JS snippets to be used across forms
// File input (Show filename on file select)
function onChooseFile() {
let inputs = Array.from(document.querySelectorAll('.input-file'));
inputs.forEach((input) => {
let uploadButton = input.parentNode.parentNode.previousSibling.previousSibling.querySelector('div')
le... |
pellizzetti/pulumi-gcp | sdk/go/gcp/iap/appEngineVersionIamPolicy.go | <gh_stars>1-10
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package iap
import (
"github.com/pkg/errors"
"github.com/pulumi/pulumi/sdk/go/pulumi"
)
// > This content is derived from https:/... |
depromeet/toonzip-api | src/main/java/kr/co/antoon/webtoon/application/WebtoonSnapshotService.java | <filename>src/main/java/kr/co/antoon/webtoon/application/WebtoonSnapshotService.java
package kr.co.antoon.webtoon.application;
import kr.co.antoon.webtoon.domain.WebtoonSnapshot;
import kr.co.antoon.webtoon.infrastructure.WebtoonSnapshotRepository;
import lombok.RequiredArgsConstructor;
import org.springframework.ster... |
rjw57/tiw-computer | emulator/src/mame/video/decodmd3.h | <filename>emulator/src/mame/video/decodmd3.h
// license:BSD-3-Clause
// copyright-holders:<NAME>
/*
* Data East Pinball DMD Type 3 Display
*/
#ifndef MAME_VIDEO_DECODMD3_H
#define MAME_VIDEO_DECODMD3_H
#pragma once
#include "cpu/m68000/m68000.h"
#include "machine/ram.h"
#include "machine/timer.h"
#include "video/... |
FavyTeam/Elderscape_server | source/game/content/clanchat/ClanChatHandler.java | <gh_stars>1-10
package game.content.clanchat;
import core.Server;
import core.ServerConstants;
import game.content.interfaces.InterfaceAssistant;
import game.content.miscellaneous.DiceSystem;
import game.content.miscellaneous.PlayerRank;
import game.content.miscellaneous.Teleport;
import game.item.ItemAssistant;
impor... |
drincast/EntrenoReact | 03ReactGuiaCompletaHooksContextMERN/sec09/weather/src/components/Header.js | <reponame>drincast/EntrenoReact
import React from 'react';
import PropTypes from 'prop-types';
const Header = ({title}) => {
return(
<nav>
<div className="nav-wrapper light-blue darken-2">
<a href='#!' className='brand-logo'>{title}</a>
</div>
</nav>
);
}... |
giantswarm/gsclientgen | models/v4_modify_user_password_request.go | // Code generated by go-swagger; DO NOT EDIT.
package models
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
strfmt "github.com/go-openapi/strfmt"
"github.com/go-openapi/errors"
"github.com/go-openapi/swag"
"github.com... |
huyu0415/FFmpeg | ffmpeg-3.2.5/libavformat/lrcenc.c | /*
* LRC lyrics file format decoder
* Copyright (c) 2014 StarBrilliant <<EMAIL>>
*
* This file is part of FFmpeg.
*
* FFmpeg is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1... |
Tuscann/Java-Advanced---2017 | 06.EXERCISE ABSTRACTION/src/_03_Diagonal_Difference2.java | <filename>06.EXERCISE ABSTRACTION/src/_03_Diagonal_Difference2.java
import java.util.Scanner;
public class _03_Diagonal_Difference2 { // 100/100
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int n = Integer.parseInt(in.nextLine());
int[][] matrix =... |
88act/go-cms | server/plugin/txim/txFileDown.go | package plugin
import (
"go-cms/global"
"go-cms/model/business"
bizReq "go-cms/model/business/request"
bizSev "go-cms/service/business"
"go-cms/utils"
"path"
"strconv"
"strings"
"sync"
)
//文件下载器
type TxFileDown struct {
statusRun int
}
var once_TxFileDown sync.Once = sync.Once{}
var obj_TxFileDown *TxFileD... |
weng-lab/SCREEN | 2_import/30_cytobands.py | #!/usr/bin/env python2
# SPDX-License-Identifier: MIT
# Copyright (c) 2016-2020 <NAME>, <NAME>, <NAME>, <NAME>
from __future__ import print_function
import os
import sys
import gzip
import argparse
import json
sys.path.append(os.path.join(os.path.dirname(__file__), '../../metadata/utils'))
from utils import Utils,... |
manxx5521/shabao-blog | shabao-blog-core/src/test/java/test/SpringBeanTest.java | package test;
import static org.junit.Assert.fail;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.test.context.web.WebAppConfiguration;
im... |
WUSTL-CSPL/RT-TEE | linux/samples/bpf/task_fd_query_user.c | // SPDX-License-Identifier: GPL-2.0
#include <stdio.h>
#include <stdlib.h>
#include <signal.h>
#include <unistd.h>
#include <stdbool.h>
#include <string.h>
#include <stdint.h>
#include <fcntl.h>
#include <linux/bpf.h>
#include <sys/ioctl.h>
#include <sys/resource.h>
#include <sys/types.h>
#include <sys/stat.h>
#inclu... |
dassmeta/weixin | dassmeta-weixin-web-home/src/main/java/com/dassmeta/weixin/web/home/util/WeixinAbstractHandler.java | <reponame>dassmeta/weixin
package com.dassmeta.weixin.web.home.util;
import java.io.IOException;
import java.io.PrintWriter;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.jdom2.JDOMException;
import com.dassmeta.weixin.web.home.vo.recv.WxRecvEventMsg;
import... |
byepolr/ErgoDox-EZ-Reactor | lib/firmware/keyboard/quark/backlight.h |
void backlight_init_ports(void);
|
wlhcode/lscct | src/L/L1401.cpp | #include<cstdio>
int main(){
long long x,y;
scanf("%lld %lld",&x,&y);
printf("%lld\n",(x*y)%10);
return 0;
}
|
ProvoK/concourse | skymarshal/token/tokenfakes/fake_middleware.go | <reponame>ProvoK/concourse<gh_stars>1-10
// Code generated by counterfeiter. DO NOT EDIT.
package tokenfakes
import (
"net/http"
"sync"
"time"
"github.com/concourse/concourse/skymarshal/token"
)
type FakeMiddleware struct {
GetTokenStub func(*http.Request) string
getTokenMutex sync.RWMutex
getTok... |
ck76/awesome-cs | Algorithm/coding_interviews/Python/sword-for-offer/31_valid_stack_seq.py | <filename>Algorithm/coding_interviews/Python/sword-for-offer/31_valid_stack_seq.py
#! /usr/bin/python3
# -*- coding: utf-8 -*-
# @Time : 2019/3/9 10:58 PM
# @Author : xiaoliji
# @Email : <EMAIL>
"""
根据入栈和出栈顺序,判断是否能够清空该栈。
>>> pushed = [1, 2, 3, 4, 5]
>>> popped = [4, 5, 3, 2, 1]
>>> validateSta... |
typa1/spring-boot | spring-boot-note5/src/main/java/me/loveshare/note5/data/util/ResourceUtils.java | package me.loveshare.note5.data.util;
import me.loveshare.note5.data.constant.SymbolConstants;
import java.time.LocalDate;
import java.time.LocalTime;
import java.util.HashMap;
import java.util.Map;
/**
* Created by Tony on 2017/8/5.
* 资源辅助工具类
*/
public class ResourceUtils {
/**
* 文件类型:1.视频 2.音频 3.图片 4.... |
AleksandrSidorov/react-fb-chat | app/containers/MessageInput/constants.js | <filename>app/containers/MessageInput/constants.js<gh_stars>0
/*
*
* MessageInput constants
*
*/
export const CHANGE_MESSAGE = 'app/MessageInput/CHANGE_MESSAGE'
export const CLEAR_MESSAGE_INPUT = 'app/MessageInput/CLEAR_MESSAGE_INPUT'
|
zihadboss/UVA-Solutions | 12250 Language Detection.cpp | <reponame>zihadboss/UVA-Solutions<gh_stars>10-100
#include <cstdio>
#include <string>
#include <iostream>
using namespace std;
int main()
{
string current;
int t = 1;
cin >> current;
while (current != "#")
{
printf("Case %d: ", t);
if (current == "HELLO")
... |
1065672644894730302/Chromium | chrome/browser/policy/device_policy_cache.cc | <filename>chrome/browser/policy/device_policy_cache.cc
// Copyright (c) 2012 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.
#include "chrome/browser/policy/device_policy_cache.h"
#include <limits>
#include <string>
#in... |
czack810150/Markus | app/controllers/api/grade_entry_forms_controller.rb | module Api
class GradeEntryFormsController < MainApiController
# Sends the contents of the specified grade entry form
# Requires: id
def show
grade_entry_form = GradeEntryForm.find(params[:id])
send_data grade_entry_form.export_as_csv,
type: 'text/csv',
filena... |
mibutec/jnet | src/test/java/org/jnet/core/GameClientTest.java | package org.jnet.core;
import static org.mockito.Matchers.any;
import junit.framework.Assert;
import org.jnet.core.connection.Connection;
import org.jnet.core.connection.messages.NewStateMessage;
import org.jnet.core.synchronizer.ObjectId;
import org.jnet.core.testdata.FigureState;
import org.junit.Before;
... |
tylerslaton/api | vendor/k8s.io/apiextensions-apiserver/pkg/apiserver/schema/defaulting/surroundingobject.go | <filename>vendor/k8s.io/apiextensions-apiserver/pkg/apiserver/schema/defaulting/surroundingobject.go<gh_stars>1000+
/*
Copyright 2019 The Kubernetes 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 Lic... |
adriansr/cryptopals-challenge | cmd/s4c25/main.go | package main
import (
"os"
"fmt"
"io/ioutil"
"github.com/adriansr/cryptopals-challenge/util"
"crypto/aes"
"github.com/adriansr/cryptopals-challenge/crypto"
"bytes"
"encoding/binary"
"crypto/cipher"
)
// Make it more challenging
const MaxEdit = 15
var key = util.RandomBytes(aes.BlockSize)
var nonce = binary.... |
TheBricktop/BoofCV | main/boofcv-ip/src/main/java/boofcv/abst/filter/derivative/AnyImageDerivative.java | /*
* Copyright (c) 2021, <NAME>. All Rights Reserved.
*
* This file is part of BoofCV (http://boofcv.org).
*
* 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... |
k4netmt/Ogaga | oGAGA/app/src/main/java/com/ogaga/flash/acitivies/TimeLineActivity.java | package com.ogaga.flash.acitivies;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.support.design.widget.FloatingActionButton;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.... |
NotCamelCase/Grad-Project-Arcade-Sim | src/Screen/MainMenuScreen.cpp | <reponame>NotCamelCase/Grad-Project-Arcade-Sim
/*
The MIT License (MIT)
Copyright (c) 2015 <NAME>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation... |
mahshidhelali/RL-Assisted-Performance-Testing | RELOAD v0.2/LoadTester.java | <gh_stars>1-10
package org.deeplearning4j.rl4j.examples.advanced.QLearning;
import org.apache.jmeter.control.LoopController;
import org.apache.jmeter.engine.StandardJMeterEngine;
import org.apache.jmeter.reporters.ResultCollector;
import org.apache.jmeter.reporters.Summariser;
import org.apache.jmeter.save.SaveService... |
teddywest32/intellij-community | plugins/InspectionGadgets/test/com/siyeh/igtest/visibility/ambiguous/AmbiguousMethodCall.java | <gh_stars>0
package com.siyeh.igtest.visibility.ambiguous;
public class AmbiguousMethodCall {
class X {
void m() {}
class Inner extends Y {
{
<warning descr="Call to method 'm()' from superclass 'Y' looks like call to method from class 'X'">m</warning>(); // ambiguous... |
timxor/leetcode-journal | solutions/LeetCode/Java/128.java | <reponame>timxor/leetcode-journal
__________________________________________________________________________________________________
sample 2 ms submission
import java.util.Arrays;
/*
* @lc app=leetcode id=128 lang=java
*
* [128] Longest Consecutive Sequence
*/
class Solution {
public int longestConsecutive(in... |
tan9/spring-security | core/src/test/java/org/springframework/security/jackson2/RememberMeAuthenticationTokenMixinTests.java | /*
* Copyright 2015-2016 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 a... |
slafayIGN/validator | validator-core/src/main/java/fr/ign/validator/validation/database/AttributeReferenceValidator.java | package fr.ign.validator.validation.database;
import java.io.IOException;
import java.sql.SQLException;
import org.apache.commons.lang3.StringUtils;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.apache.logging.log4j.Marker;
import org.apache.logging.log4j.MarkerManager... |
nathanmullenax83/rhizome | include/parse/star_closure.cpp | #include "star_closure.hpp"
#include "log.hpp"
namespace rhizome {
namespace parse {
StarClosure::StarClosure( Gramex *inner ): inner(inner) {
}
StarClosure::~StarClosure() {
delete inner;
}
bool
StarClosure::accepts( GrammarFn lookup ) const {
... |
patelsan/fetchpipe | node_modules/isobject/index-compiled.js | <reponame>patelsan/fetchpipe
/*!
* isobject <https://github.com/jonschlinkert/isobject>
*
* Copyright (c) 2014-2015, <NAME>.
* Licensed under the MIT License.
*/
'use strict';
module.exports = function isObject(val) {
return val != null && typeof val === 'object' && !Array.isArray(val);
};
//# sourceMappingUR... |
grmkris/XChange | xchange-btcturk/src/main/java/org/knowm/xchange/btcturk/service/BTCTurkDigest.java | <gh_stars>1000+
package org.knowm.xchange.btcturk.service;
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;
import java.util.Base64;
import javax.crypto.Mac;
import javax.crypto.spec.SecretKeySpec;
import org.knowm.xchange.service.BaseParamsDigest;
import si.mazi.rescu.RestInvoc... |
gaybro8777/xfopencv | examples_sdaccel/magnitude/xf_magnitude_accel.cpp | <reponame>gaybro8777/xfopencv<filename>examples_sdaccel/magnitude/xf_magnitude_accel.cpp
/***************************************************************************
Copyright (c) 2019, Xilinx, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted pro... |
jnthn/intellij-community | java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advFixture/PackageNameAsClassFQName.java | <reponame>jnthn/intellij-community
package a;
import foo.Bar.*;
class MyTest {
private void foo(Inner inner) {}
} |
plixcoindev/Acryl | node/src/main/scala/com/acrylplatform/consensus/GeneratingBalanceProvider.scala | <reponame>plixcoindev/Acryl
package com.acrylplatform.consensus
import com.acrylplatform.account.Address
import com.acrylplatform.block.Block
import com.acrylplatform.block.Block.BlockId
import com.acrylplatform.common.state.ByteStr
import com.acrylplatform.features.BlockchainFeatures
import com.acrylplatform.state.Bl... |
heisedebaise/photon | photon-pdf/src/main/java/org/lpw/photon/pdf/PdfConverter.java | <gh_stars>0
package org.lpw.photon.pdf;
import java.io.OutputStream;
public interface PdfConverter {
/**
* HTML转化为PDF。
*
* @param html HTML文本。
* @param outputStream PDF输出流。
* @return 如果转化成功则返回true;否则返回false。
*/
boolean html2pdf(String html, OutputStream outputStream);
... |
IoanBasnic/Le-BoomberMan | MainProject/src/main/java/frontend/UI/QuitListener.java | package frontend.UI;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
public class QuitListener implements ActionListener {
@Override
public void actionPerformed(ActionEvent e) {
System.exit(0);
}
} |
bobheadlabs/sourcegraph | enterprise/internal/authz/bitbucketserver/integration_test.go | package bitbucketserver
import (
"testing"
)
func TestIntegration(t *testing.T) {
if testing.Short() {
t.Skip()
}
t.Parallel()
cli, save := newClient(t, "BitbucketServer")
defer save()
f := newFixtures()
f.load(t, cli)
for _, tc := range []struct {
name string
test func(*testing.T)
}{
{"Provider... |
feieryouyiji/learningpy | 2020-04-19/test_enum.py | <reponame>feieryouyiji/learningpy<gh_stars>0
from enum import Enum, unique
@unique
class Weekday(Enum):
Sun = 0 # Sun的value被设定为0
Mon = 1
Tue = 2
Wed = 3
Thu = 4
Fri = 5
Sat = 6
print(Weekday.Sun)
print(Weekday.Sun.value)
print(type(Weekday)) |
MarioMatschgi/Minecraft-Plugins | _Eclipse/_SpigotDecompiled/work/decompile-cf6b1333/net/minecraft/server/Slot.java | <filename>_Eclipse/_SpigotDecompiled/work/decompile-cf6b1333/net/minecraft/server/Slot.java
package net.minecraft.server;
public class Slot {
public final int index;
public final IInventory inventory;
public int rawSlotIndex;
public int f;
public int g;
public Slot(IInventory iinventory, int ... |
icco/fog | tests/fogdocker/requests/compute/image_create_tests.rb | <reponame>icco/fog
Shindo.tests("Fog::Compute[:fogdocker] | image_create request", 'fogdocker') do
compute = Fog::Compute[:fogdocker]
tests("Create image") do
response = compute.image_create({'fromImage' => 'mattdm/fedora', 'repo'=>'test', 'tag'=>'create_image'})
test("should be a kind of Hash") { respons... |
Rod1Andrade/lendbooks | lendbook-backend/src/main/java/com/github/rod1andrade/lendbookbackend/features/mail/infra/events/IDispatchMailEvent.java | <filename>lendbook-backend/src/main/java/com/github/rod1andrade/lendbookbackend/features/mail/infra/events/IDispatchMailEvent.java
package com.github.rod1andrade.lendbookbackend.features.mail.infra.events;
import com.github.rod1andrade.lendbookbackend.features.mail.core.entities.Mail;
/**
* @author <NAME>
*/
public... |
nateshao/design-demo | 5-00-singleton/src/main/java/nateshao/design/demo/singleton/Singleton_03_hungry_man.java | <reponame>nateshao/design-demo<gh_stars>1-10
package nateshao.design.demo.singleton;
/**
* @date Created by 邵桐杰 on 2020/12/10 11:20
* @微信公众号 <PASSWORD>
* @个人网站 www.nateshao.cn
* @博客 https://nateshao.gitee.io
* @GitHub https://github.com/nateshao
* @Gitee https://gitee.com/nateshao
* Description: 饿汉模式(线程安全)
* ... |
snpmyn/Widget | library/src/main/java/com/zsp/library/sidebar/AcronymSorting.java | <gh_stars>0
package com.zsp.library.sidebar;
import com.zsp.library.contact.bean.ContactBean;
import java.util.Comparator;
/**
* @decs: 首字母排序
* @author: 郑少鹏
* @date: 2019/9/12 16:48
*/
public class AcronymSorting implements Comparator<ContactBean> {
@Override
public int compare(ContactBean contactBean, C... |
93million/certcache | src/extensions/certbot/getBundle.js | const path = require('path')
const fs = require('fs')
const util = require('util')
const readFile = util.promisify(fs.readFile)
module.exports = async (cert) => {
const dirname = path.dirname(cert.certPath)
return {
cert: await readFile(`${dirname}/cert.pem`),
chain: await readFile(`${dirname}/chain.pem`... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.