repo_name stringlengths 6 101 | path stringlengths 4 300 | text stringlengths 7 1.31M |
|---|---|---|
centauroWaRRIor/VulkanSamples | ExternalLibraries/NvGameworksFramework/externals/src/cg4cpp/upper3x2.cpp | /*
* Copyright 2009 by NVIDIA Corporation. All rights reserved. All
* information contained herein is proprietary and confidential to NVIDIA
* Corporation. Any use, reproduction, or disclosure without the written
* permission of NVIDIA Corporation is prohibited.
*/
#include <Cg/double.hpp>
#include <Cg/upper3... |
lindsayad/misc_programming | cpp/namespace-std.cpp | #include <iostream>
namespace std {
void foo() { cout << "Im in the std namespace bitch!\n"; }
} // namespace std
int main() { std::foo(); }
|
consulo/consulo-spring | web/src/com/intellij/spring/web/mvc/jam/SpringMVCJamReferenceContributor.java | package com.intellij.spring.web.mvc.jam;
import com.intellij.patterns.PsiJavaPatterns;
import com.intellij.patterns.PatternCondition;
import com.intellij.psi.*;
import com.intellij.psi.util.PsiTreeUtil;
import com.intellij.psi.impl.source.resolve.reference.PsiReferenceProviderBase;
import com.intellij.util.ProcessingC... |
jyf588/nimblephysics | dart/realtime/RealTimeControlBuffer.cpp | #include "dart/realtime/RealTimeControlBuffer.hpp"
#include <iostream>
#include "dart/simulation/World.hpp"
namespace dart {
namespace realtime {
RealTimeControlBuffer::RealTimeControlBuffer(
int forceDim, int steps, int millisPerStep)
: mForceDim(forceDim),
mNumSteps(steps),
mMillisPerStep(millisPerS... |
agustafson/sbt-avrohugger | src/sbt-test/avrohugger/filesorter/build.sbt | <gh_stars>100-1000
name := "filesorter-test"
sourceGenerators in Compile += (avroScalaGenerate in Compile).taskValue
|
umontreal-simul/contactcenters | source/umontreal/iro/lecuyer/contactcenters/app/trace/ContactTrace.java | <gh_stars>0
package umontreal.iro.lecuyer.contactcenters.app.trace;
/**
* Represents an object capable of creating a contact-by-contact trace.
* The format and location of the produced trace depends on the
* implementation.
*
* The tracing facility is used as follows.
* An
* implementation of this interface i... |
chenying-wang/usc-ee-coursework-public | ee569/hw4/feature/FeatureMatcher.cpp | <filename>ee569/hw4/feature/FeatureMatcher.cpp<gh_stars>1-10
/**
* Name: <NAME>
* Email: <EMAIL>
* USC ID: ****-****-**
* Date: Friday, March 20, 2020
**/
#include <iostream>
#include <vector>
#include <unordered_map>
#include "opencv2/core.hpp"
#include "opencv2/features2d.hpp"
#include "opencv2/xfeatures2d.hpp"... |
jeffkala/batfish | projects/batfish/src/main/java/org/batfish/vendor/a10/representation/A10Configuration.java | <filename>projects/batfish/src/main/java/org/batfish/vendor/a10/representation/A10Configuration.java
package org.batfish.vendor.a10.representation;
import static com.google.common.base.MoreObjects.firstNonNull;
import static java.util.Comparator.naturalOrder;
import static org.batfish.datamodel.Configuration.DEFAULT_V... |
prizeGit/graphql-demo | src/main/java/io/redintro/graphqldemo/port/in/BookViewPort.java | <gh_stars>0
package io.redintro.graphqldemo.port.in;
import io.redintro.graphqldemo.domain.Book;
import java.util.List;
import java.util.UUID;
public interface BookViewPort {
List<Book> showAll();
Book create(Book book);
Book read(UUID id);
Book update(Book book);
boolean delete(UUID id);
lon... |
Nicanor008/JS-Algorithms-Challenge | hackerrank/InterviewPreparationKit/Strings/making-anagrams.js | // https://www.hackerrank.com/challenges/making-anagrams/problem
const s1 = "aaa";
const s2 = "bbb";
let anagramStrings = (s1, s2) => {
let string1 = {};
let string2 = {};
let output = false;
if (s1.length !== s2.length) {
output = false;
return false;
}
for (let i = 0; i < s1.length; i++) {
... |
Sealdolphin/ParanoiaApp | src/test/java/paranoia/network/interfaces/OptimizeListenerMock.java | <reponame>Sealdolphin/ParanoiaApp
package paranoia.network.interfaces;
public class OptimizeListenerMock {
}
|
io7m/jsx | com.io7m.jsx.parser/src/main/java/com/io7m/jsx/lexer/JSXLexer.java | <gh_stars>0
/*
* Copyright © 2016 <<EMAIL>> http://io7m.com
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS ... |
TheChosenEvilOne/MindustryFork | core/src/io/anuke/mindustry/world/blocks/WeaponBlocks.java | <gh_stars>1-10
package io.anuke.mindustry.world.blocks;
import com.badlogic.gdx.graphics.Color;
import com.badlogic.gdx.math.Vector2;
import io.anuke.mindustry.Vars;
import io.anuke.mindustry.entities.BulletType;
import io.anuke.mindustry.entities.effect.Fx;
import io.anuke.mindustry.entities.effect.TeslaOrb;
import ... |
fighting41love/TextAttack | textattack/models/classification/bert/bert_for_imdb_sentiment_classification.py | <filename>textattack/models/classification/bert/bert_for_imdb_sentiment_classification.py<gh_stars>1-10
from textattack.models.helpers import BERTForClassification
class BERTForIMDBSentimentClassification(BERTForClassification):
""" BERT fine-tuned on the IMDb Sentiment dataset for sentiment
classificatio... |
rui278/rui278.github.io | maliCL/search/pages_73.js | <reponame>rui278/rui278.github.io
var searchData=
[
['sgemm',['SGEMM',['../sgemm_tutorial.html',1,'tutorials']]],
['sobel_20filter',['Sobel Filter',['../sobel_tutorial.html',1,'tutorials']]],
['support',['Support',['../support.html',1,'']]]
];
|
richard2018/refactoring | src/main/java/replace/parameter/with/explicit/methods/Refactor.java | package replace.parameter.with.explicit.methods;
public class Refactor {
int _height;
int _width;
void setValue(String name, int value) {
if (name.equals("height")) {
_height = value;
return;
}
if (name.equals("width")) {
_width = value;
return;
}
// Assert.shouldNeverReachHere();
}
// --... |
navalsynergy/jitsi | react/features/video-menu/components/web/VideoMenu.js | <reponame>navalsynergy/jitsi<gh_stars>0
// @flow
import React from 'react';
/**
* The type of the React {@code Component} props of {@link VideoMenu}.
*/
type Props = {
/**
* The components to place as the body of the {@code VideoMenu}.
*/
children: React$Node,
/**
* The i... |
nms-htc/cmts-mo-portlet | docroot/WEB-INF/src/com/cmcti/cmts/domain/model/impl/MerchantModelImpl.java | <reponame>nms-htc/cmts-mo-portlet
/**
* Copyright (c) 2000-present Liferay, Inc. 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 published by the Free
* Software Foundation; either version 2.1 of the Lice... |
xueduany/chii | node_modules/licia/slice.js | exports = function(arr, start, end) {
var len = arr.length;
if (start == null) {
start = 0;
} else if (start < 0) {
start = Math.max(len + start, 0);
} else {
start = Math.min(start, len);
}
if (end == null) {
end = len;
} else if (end < 0) {
end = M... |
PiotrLadyzynski/XChange | xchange-bitcointoyou/src/main/java/com/xeiam/xchange/bitcointoyou/service/BitcoinToYouDigest.java | <reponame>PiotrLadyzynski/XChange
package com.xeiam.xchange.bitcointoyou.service;
import javax.crypto.Mac;
import si.mazi.rescu.RestInvocation;
import com.xeiam.xchange.service.BaseParamsDigest;
import com.xeiam.xchange.utils.Base64;
/**
* @author <NAME>
*/
public class BitcoinToYouDigest extends BaseParamsDigest... |
SevenandTen/CodeLib | CodeLib/MyLib/ED_StringControl/ED_StringControl.h | //
// ED_StringControl.h
// CodeLib
//
// Created by zw on 2019/12/25.
// Copyright © 2019 seventeen. All rights reserved.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@interface ED_StringControl : NSObject
+ (BOOL)isChineseCharacter:(NSString *)target;
+ (BOOL)isEnglishCharacter:(NSString *)t... |
turchin-oleg/Enterprise-Template-API | src/main/java/com/example/api/security/audit/Auditable.java | package com.example.api.security.audit;
import lombok.Getter;
import org.springframework.data.annotation.CreatedBy;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.LastModifiedBy;
import org.springframework.data.annotation.LastModifiedDate;
import org.springframework.... |
Markmu/algo_practicing | leet-code/src/main/java/com/mark/No_69_Sqrt/Solution.java | package com.mark.No_69_Sqrt;
public class Solution {
public int mySqrt(int x) {
if (x == 0) return 0;
long left = 1l;
long right = x >> 1l;
long mid = 0;
while (left <= right) {
mid = left + ((right - left) >> 1);
if (mid*mid <= x) {
... |
cgwalters/origin | pkg/cmd/cli/secrets/subcommand.go | package secrets
import (
"io"
"github.com/spf13/cobra"
cmdutil "github.com/openshift/origin/pkg/cmd/util"
"github.com/openshift/origin/pkg/cmd/util/clientcmd"
)
const SecretsRecommendedName = "secrets"
const (
secretsLong = `Manage secrets in your project.
Secrets are used to store confidential information t... |
wscheep/proto-beam | transform/src/main/java/io/anemos/protobeam/transform/beamsql/ProtoToRowDoFn.java | package io.anemos.protobeam.transform.beamsql;
import com.google.protobuf.Message;
import io.anemos.protobeam.convert.ProtoBeamSqlExecutionPlan;
import org.apache.beam.sdk.transforms.DoFn;
import org.apache.beam.sdk.values.Row;
public class ProtoToRowDoFn<T extends Message> extends DoFn<T, Row> {
private ProtoBe... |
adjohnston/react-pattern-library | example/stories/colours/colours.js | <filename>example/stories/colours/colours.js<gh_stars>1-10
const constants = require('../../constants')
module.exports = {
group: constants.groups.pages,
pageName: 'Our Colours',
notesRef: 'our-colours',
}
|
gokit/dbx | schema/data_type.go | package schema
// the abstract DB type of this column
type DataType string
const (
TypeChar DataType = "char"
TypeString DataType = "string"
TypeText DataType = "text"
TypeMediumText DataType = "mediumText"
TypeLongText DataType = "longText"
TypeTinyInt ... |
sixthedge/cellar | src/thinkspace/api/thinkspace-test/test/timetable/helpers/all.rb | <reponame>sixthedge/cellar
module Test; module Timetable; module Helpers; module All
extend ActiveSupport::Concern
included do
include Casespace::Models
include Timetable::Helpers::Models
include Timetable::Helpers::Assert
end; end; end; end; end
|
Dbevan/SunderingShadows | d/common/mounts/barded_flying_mount.c | <reponame>Dbevan/SunderingShadows
//Added to allow for barded flying mounts off of the Knight swords
//from Demongate. The appropriate flying mounts will be consistent
//with the normal barded horses - Octothorpe 7/6/11
#include <std.h>
inherit "/std/flying_mount.c";
nosave int healingStuff;
int is_warhorse() { ret... |
herokuro/noop-server | test/cli/help-flag.test.js | 'use strict'
const _ = require('../utils')
_.test('cli:help flag', async t => {
const helpFile = await _.readFile(_.path.helpText)
const trimmedHelpFile = helpFile.slice(0, -1)
const { stdout: helpShort } = await _.run(`node ${_.cli} -h`)
t.deepEqual(helpShort, trimmedHelpFile,
'$ noop-server -h should ... |
wohaaitinciu/zpublic | pellets/z_platform/impl/z_platform_win_thread.hpp | <reponame>wohaaitinciu/zpublic
#pragma once
#include <windows.h>
typedef HANDLE zl_thread_handle;
class zl_thread_impl
{
public:
bool create(size_t stack_size, zl_delegate* pdelegate, zl_thread_handle* out_thread_handle)
{
zl_thread_handle h = ::CreateThread(NULL, stack_size, zl_thread_impl::thread_... |
athenianco/athenian-api | server/tests/controllers/miners/github/test_check_run.py | <gh_stars>1-10
from datetime import datetime, timezone
from pathlib import Path
import numpy as np
from numpy.testing import assert_array_equal
import pandas as pd
import pytest
from athenian.api.controllers.features.github.check_run_metrics_accelerated import \
mark_check_suite_types
from athenian.api.controller... |
JRL-CARI-CNR-UNIBS/cari_motion_planning | graph_core/src/graph_core/avoidance_goal_cost_function.cpp | /*
Copyright (c) 2019, <NAME> CNR-STIIMA <EMAIL>
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 conditions... |
opengauss-mirror/DataStudio | code/datastudio/src/org.opengauss.mppdbide.view/src/org/opengauss/mppdbide/view/utils/ProgressMonitorControl.java | <reponame>opengauss-mirror/DataStudio
/*
* Copyright (c) 2022 Huawei Technologies Co.,Ltd.
*
* openGauss is licensed under Mulan PSL v2.
* You can use this software according to the terms and conditions of the Mulan PSL v2.
* You may obtain a copy of Mulan PSL v2 at:
*
* http://license.coscl.org.cn/Mu... |
HedgehogCode/javacpp-presets | tritonserver/src/gen/java/org/bytedeco/tritonserver/global/tritonserver.java | <reponame>HedgehogCode/javacpp-presets
// Targeted by JavaCPP version 1.5.7-SNAPSHOT: DO NOT EDIT THIS FILE
package org.bytedeco.tritonserver.global;
import org.bytedeco.tritonserver.tritonserver.*;
import java.nio.*;
import org.bytedeco.javacpp.*;
import org.bytedeco.javacpp.annotation.*;
import static org.bytedec... |
cyberglot/effectfuljs | packages/cc/transform-minimal.js | module.exports = require("./transform").options({ profile: "defaultMinimal" });
|
connectim/iOS | Connect/Client/Login&Register/View/LocalUserInfoView.h | //
// LocalUserInfoView.h
// Connect
//
// Created by MoHuilin on 2016/12/6.
// Copyright © 2016年 Connect - P2P Encrypted Instant Message. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface LocalUserInfoView : UIControl
@property(nonatomic, strong) UILabel *userNameLabel;
@property(nonatomic, strong) UI... |
kubeform/provider-ibm-api | apis/cos/v1alpha1/codec.go | <reponame>kubeform/provider-ibm-api
/*
Copyright AppsCode Inc. and Contributors
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 ap... |
billcchung/splunk-operator | pkg/splunk/common/names.go | // Copyright (c) 2018-2020 Splunk 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 by appl... |
TrilateralX/TrilateralLimeTriangle | Export/macos/obj/include/trilateral3/color/ColorHelper.h | <reponame>TrilateralX/TrilateralLimeTriangle
// Generated by Haxe 4.2.0-rc.1+cb30bd580
#ifndef INCLUDED_trilateral3_color_ColorHelper
#define INCLUDED_trilateral3_color_ColorHelper
#ifndef HXCPP_H
#include <hxcpp.h>
#endif
HX_DECLARE_CLASS2(trilateral3,color,ColorHelper)
namespace trilateral3{
namespace color{
cla... |
xtoples/LiquidPractice | src/main/java/dev/liquidnetwork/liquidpractice/tournament/command/TournamentLeaveCommand.java | package dev.liquidnetwork.liquidpractice.tournament.command;
import dev.liquidnetwork.liquidpractice.party.Party;
import dev.liquidnetwork.liquidpractice.profile.Profile;
import dev.liquidnetwork.liquidpractice.tournament.Tournament;
import dev.liquidnetwork.liquidpractice.util.command.command.CommandMeta;
import org.... |
x403368945/common-mvc-parent | demo-service/src/main/java/com/ccx/demo/DemoServiceApplication.java | package com.ccx.demo;
import org.springframework.boot.SpringApplication;
/**
* spring-boot 特殊处理:只有 spring-boot 需要该文件
* <pre>
* 参考配置:
* https://docs.spring.io/spring-boot/docs/2.1.5.RELEASE/reference/htmlsingle/
*
* @author 谢长春 2019/1/21
*/
public class DemoServiceApplication {
public static void main(Str... |
codartX/ZCL | zcl/zcl_cluster.c | <reponame>codartX/ZCL
#include <string.h>
#include "zcl_cluster.h"
zcl_attr_t *zcl_cluster_find_attr(zcl_cluster_t *cluster, uint16_t attr_id)
{
uint8_t i = 0;
while (cluster->attr_list[i]) {
if (cluster->attr_list[i].id == attr_id) {
return &(cluster->attr_list[i]);
}
i++... |
chachabooboo/king-phisher | king_phisher/server/letsencrypt.py | <filename>king_phisher/server/letsencrypt.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# king_phisher/letsencrypt.py
#
# 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... |
yuxijian/WxJava | weixin-java-mp/src/main/java/me/chanjar/weixin/mp/bean/WxMpMassPreviewMessage.java | <gh_stars>1000+
package me.chanjar.weixin.mp.bean;
import lombok.Data;
import me.chanjar.weixin.common.api.WxConsts;
import me.chanjar.weixin.mp.util.json.WxMpGsonBuilder;
import java.io.Serializable;
/**
* @author miller
*/
@Data
public class WxMpMassPreviewMessage implements Serializable {
private static final... |
eloemosynator/YbEasyCli | yb_chunk_dml_by_date_part.py | <reponame>eloemosynator/YbEasyCli
#!/usr/bin/env python3
"""
USAGE:
chunk_dml_by_date_part.py [options]
PURPOSE:
Create/execute DML chunked by a date/timestamp column.
OPTIONS:
See the command line help message for all options.
(chunk_dml_by_date_part.py --help)
Output:
Chunked DML sta... |
gza/beats | vendor/gopkg.in/jcmturner/gokrb5.v7/iana/msgtype/constants.go | // Package msgtype provides Kerberos 5 message type assigned numbers.
package msgtype
// KRB message type IDs.
const (
KRB_AS_REQ = 10 //Request for initial authentication
KRB_AS_REP = 11 //Response to KRB_AS_REQ request
KRB_TGS_REQ = 12 //Request for authentication based on TGT
KRB_TGS_REP = 13 //Re... |
jquacinella/nexus | delta/service/src/test/scala/ch/epfl/bluebrain/nexus/delta/service/realms/WellKnownResolverSpec.scala | package ch.epfl.bluebrain.nexus.delta.service.realms
import akka.http.scaladsl.model.{HttpRequest, Uri}
import ch.epfl.bluebrain.nexus.delta.sdk.model.realms.GrantType
import ch.epfl.bluebrain.nexus.delta.sdk.model.realms.GrantType._
import ch.epfl.bluebrain.nexus.delta.sdk.model.realms.RealmRejection.{IllegalEndpoint... |
acionescu/commons | src/main/java/net/segoia/util/execution/test/ControlExecutionEntity.java | <reponame>acionescu/commons
/**
* commons - Various Java Utils
* Copyright (C) 2009 <NAME> - https://github.com/acionescu
*
* 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
*
* ... |
gobuffalo/bufcli | cli/internal/plugins/packr/packager.go | package packr
import (
"context"
"fmt"
"github.com/gobuffalo/buffalo-cli/v2/cli/cmds/build"
"github.com/gobuffalo/packr/v2/jam"
"github.com/gobuffalo/plugins"
"github.com/gobuffalo/plugins/plugcmd"
)
var _ build.BeforeBuilder = &Packager{}
var _ build.Packager = &Packager{}
var _ plugcmd.Namer = &Packager{}
va... |
jturner65/ParticleSim | external/fltk-2.0.x-r5966/fluidOld/Fluid_Image.cxx | //
// "$Id: Fluid_Image.cxx 5738 2007-03-12 18:07:45Z spitzak $"
//
// Pixmap label support for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2006 by <NAME> and others.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Library General Public
// License as... |
Yun-xi/xchat | xchat-common/src/main/java/com/xx/xchat/conf/MybatisPlusConfig.java | <filename>xchat-common/src/main/java/com/xx/xchat/conf/MybatisPlusConfig.java
/*
* Copyright (c) 2011-2020, baomidou (<EMAIL>).
* <p>
* 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
* <p>... |
hafeez3000/expo | ios/versioned-react-native/ABI17_0_0/Exponent/Modules/Api/ABI17_0_0EXFingerprint.h | <reponame>hafeez3000/expo
// Copyright 2016-present 650 Industries. All rights reserved.
#import <ReactABI17_0_0/ABI17_0_0RCTBridgeModule.h>
@interface ABI17_0_0EXFingerprint : NSObject<ABI17_0_0RCTBridgeModule>
@end
|
dbflute/dbflute-core | dbflute-runtime/src/main/java/org/dbflute/exception/SelectedCountExceedMaxCountException.java | <filename>dbflute-runtime/src/main/java/org/dbflute/exception/SelectedCountExceedMaxCountException.java<gh_stars>10-100
/*
* Copyright 2014-2021 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.
* Y... |
zst123/project-fimble_amazon-freertos | vendors/cypress/libraries/internal/command-console/iperf/rtos/AFR/rtos_config.h | <filename>vendors/cypress/libraries/internal/command-console/iperf/rtos/AFR/rtos_config.h
/* config.h. Generated by hand for WICED. */
#ifndef CONFIG_H
#define CONFIG_H
/* ===================================================================
* config.h
*
* config.h is derived from config.h.in -- do not edit config.h... |
MaxWainer/framework | bukkit/command-implementation/src/main/java/dev/framework/bukkit/implementation/command/BukkitCommandManager.java | /*
* MIT License
*
* Copyright (c) 2022 MaxWainer
*
* 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, copy, modify... |
gcbpay/radarj9 | ripple-bouncycastle/src/main/java/org/ripple/bouncycastle/asn1/x509/AttCertValidityPeriod.java | <reponame>gcbpay/radarj9
package org.ripple.bouncycastle.asn1.x509;
import org.ripple.bouncycastle.asn1.ASN1EncodableVector;
import org.ripple.bouncycastle.asn1.ASN1GeneralizedTime;
import org.ripple.bouncycastle.asn1.ASN1Object;
import org.ripple.bouncycastle.asn1.ASN1Primitive;
import org.ripple.bouncycastle.asn1.AS... |
QAQddbest/OJiJ | leetcode/src/main/java/ojij/common/id621/Solution.java | package ojij.common.id621;
/**
* 想法是:
* 1. 用26长度的数组tasks,记录每个任务的数量
* 2. 用26长度的数组pending,记录每个任务最快那个时间点可以运行
* 遍历tasks:
* time跳到最小的pending值那
* 对所有pending相同的任务,找到剩余时间最大的任务,执行并更新pending为n
*/
public class Solution {
public int leastInterval(char[] tasks, int n) throws Exception {
throw new Exception("太太太麻... |
himdel/manageiq-ui-classic | app/helpers/hide_partial_helper.rb | module HidePartialHelper
def hide_x_edit_buttons(action)
%w(snap_vm).include?(action)
end
end
|
gdmuzzillo/samples | test/kafka/CakeConsumerTest.scala | package kafka
import scala.concurrent.duration._
import cakesolutions.kafka.KafkaConsumer
import cakesolutions.kafka.akka.KafkaConsumerActor
import cakesolutions.kafka.KafkaConsumer.Conf
import org.apache.kafka.common.serialization.StringDeserializer
import akka.actor.ActorSystem
import org.apache.kafka.common.network... |
Maledictus/leechcraft | src/plugins/newlife/importers/firefox/firefoximporter.h | /**********************************************************************
* LeechCraft - modular cross-platform feature rich internet client.
* Copyright (C) 2010-2011 <NAME>
*
* Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE or copy at https://www.boost.org/LICENSE_1_0.... |
Coderushnepal/PoojaShrestha | FinalProject/Node/src/seeds/2_category.js | <reponame>Coderushnepal/PoojaShrestha<filename>FinalProject/Node/src/seeds/2_category.js
/**
* Delete existing entries and seed values for `category`.
*
* @param {object} knex
* @returns {Promise}
*/
export function seed(knex) {
return knex('category')
.del()
.then(() => {
return knex('category')... |
vttranlina/james-project | server/protocols/jmap-draft/src/main/java/org/apache/james/jmap/draft/model/deserialization/JmapRuleDTODeserializer.java | <reponame>vttranlina/james-project<filename>server/protocols/jmap-draft/src/main/java/org/apache/james/jmap/draft/model/deserialization/JmapRuleDTODeserializer.java
/****************************************************************
* Licensed to the Apache Software Foundation (ASF) under one *
* or more contributor ... |
m3d/osgar_archive_2020 | subt/ros/robot/src/globalmap_to_localmap.py | <filename>subt/ros/robot/src/globalmap_to_localmap.py
#!/usr/bin/env python
import rospy
import sys
import pdb
from nav_msgs.msg import *
from std_msgs.msg import *
from sensor_msgs.msg import *
import cv2
import numpy as np
import math
import tf
lastMap = None
SUBMAP_RADIUS = 600
lastPose = None
def mapCallback(cos... |
shreyasvj25/turicreate | deps/src/boost_1_65_1/libs/spirit/test/lex/matlib.h | // Copyright (c) 2001-2009 <NAME>
// Copyright (c) 2009 <NAME>
//
// 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)
#ifndef MATLIB_H_05102009
#define MATLIB_H_05102009
#include <boost/spirit/include/lex.hpp>
#inc... |
hww/makerlisp | src/usbkey/mla_v2017_03_06/framework/usb/inc/usb_host.h | <filename>src/usbkey/mla_v2017_03_06/framework/usb/inc/usb_host.h
// DOM-IGNORE-BEGIN
/*******************************************************************************
Copyright 2015 Microchip Technology Inc. (www.microchip.com)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file e... |
faipaz/Algorithms | Optimization/LevmarAndroid/jni/Thirdparty/clapack/TESTING/MATGEN/zlakf2.c | /* zlakf2.f -- translated by f2c (version 20061008).
You must link the resulting object file with libf2c:
on Microsoft Windows system, link with libf2c.lib;
on Linux or Unix systems, link with .../path/to/libf2c.a -lm
or, if you install libf2c.a in a standard place, with -lf2c -lm
-- in that order, at the end of... |
Milxnor/Nacro | Nacro/SDK/FN_RewardInfoButtonWidget_classes.hpp | #pragma once
// Fortnite (1.8) SDK
#ifdef _MSC_VER
#pragma pack(push, 0x8)
#endif
namespace SDK
{
//---------------------------------------------------------------------------
//Classes
//---------------------------------------------------------------------------
// WidgetBlueprintGeneratedClass RewardInfoButtonWi... |
IsyFact/IsyFact-Vorlageanwendung | src/main/java/de/msg/terminfindung/core/datenpflege/Datenpflege.java | package de.msg.terminfindung.core.datenpflege;
import java.time.LocalDate;
import de.msg.terminfindung.common.exception.TerminfindungBusinessException;
/**
* Schnittstelle der Anwendungskomponente "Datenpflege" zur Pflege der Bestandsdaten.
*
* @author msg systems ag, <NAME>
*/
public interface Datenpflege {
... |
dk00/old-stuff | csie/08design-patterns/src/com/sun/tools/javac/processing/ServiceProxy.java | /*
* Copyright 2006-2008 Sun Microsystems, Inc. All rights reserved.
* SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*/
package com.sun.tools.javac.processing;
import java.io.BufferedReader;
import java.io.FileNotFoundException;
import j... |
operativeF/Kvasir | Lib/Chip/CM4/STMicro/STM32L4x2/SYSCFG.hpp | <reponame>operativeF/Kvasir<gh_stars>0
#pragma once
#include <Register/Utility.hpp>
namespace Kvasir {
//System configuration controller
namespace SyscfgMemrmp{ ///<memory remap register
using Addr = Register::Address<0x40010000,0xfffffef0,0x00000000,std::uint32_t>;
///Flash Bank mode selection
... |
hidirektor/AnimationLib | java/me/megamichiel/animationlib/util/pipeline/DoublePipeline.java | package me.megamichiel.animationlib.util.pipeline;
import java.util.concurrent.atomic.AtomicLong;
import java.util.function.*;
public class DoublePipeline extends AbstractPipeline<DoublePredicate> {
public DoublePipeline(PipelineContext ctx) {
super(ctx);
}
public void accept(double d) {
... |
insoft-cloud/go-project-release-sample- | src/api-v3/builds/controller.go | package builds
import (
"PAAS-TA-PORTAL-V3/config"
"encoding/json"
"github.com/gorilla/mux"
"io/ioutil"
"net/http"
"net/url"
)
var uris = "builds"
func BuildPackHandleRequests(myRouter *mux.Router) {
myRouter.HandleFunc("/v3/"+uris, createBuild).Methods("POST")
myRouter.HandleFunc("/v3/"+uris+"/{guid}", getB... |
pks5/ui5strap | www/lib/pks/ui5strap_dev/viewer/library.js | /*
*
* UI5Strap Core Library
*
* pks.ui5strap.core.library
*
* @author <NAME> <<EMAIL>>
*
* Homepage: http://ui5strap.com
*
* Copyright (c) 2013-2014 <NAME> <<EMAIL>>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
... |
Enzime/pipenv | pipenv/vendor/shellingham/__init__.py | import importlib
import os
from ._core import ShellDetectionFailure
__version__ = '1.2.3.dev0'
def detect_shell(pid=None, max_depth=6):
name = os.name
try:
impl = importlib.import_module('.' + name, __name__)
except ImportError:
raise RuntimeError(
'Shell detection not imple... |
Thomas58/Serializer | src/org/jspace/io/test/xml/FileTests.java | <reponame>Thomas58/Serializer
package org.jspace.io.test.xml;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.util.ArrayList;
import java.util.Locale;
import org.jspace.io.test.objects.Family;
import org.jspace.io.test.objects.Numbers;
import org.jspace.io.test.objects.Person;
import org.... |
echisMOH/echisCommCareMOH-core | src/main/java/org/commcare/cases/query/queryset/CaseModelQuerySetMatcher.java | package org.commcare.cases.query.queryset;
import org.commcare.cases.instance.CaseInstanceTreeElement;
import org.javarosa.core.model.instance.TreeReference;
import org.javarosa.model.xform.XPathReference;
import org.javarosa.xpath.expr.XPathEqExpr;
import org.javarosa.xpath.expr.XPathExpression;
import org.javarosa.x... |
a56z/8-kyu | Playing with cubes II objects.rb | <reponame>a56z/8-kyu<gh_stars>0
=begin
Hey Codewarrior!
You already implemented a Cube class, but now we need your help again! I'm talking about constructors. We don't have one. Let's code two: One taking an integer and one handling no given arguments!
Also we got a problem with negative values. Correct the code so n... |
Zaiwen/PMRMP | src/extensionp/CreateExtension.java | <reponame>Zaiwen/PMRMP
package extensionp;
import java.io.File;
import java.io.IOException;
import java.sql.ResultSet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import changecode.Utf8code;
import databaseaccess.Acces... |
OOO-MetaPrime/jprime | main-modules/meta/jprime-common-starter/src/main/java/mp/jprime/security/abac/json/beans/JsonAbacPolicyTarget.java | package mp.jprime.security.abac.json.beans;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import java.util.Collection;
import java.util.Collections;
/**
* Условие - метаописание класса
*/
@JsonIgnoreProperties(ignoreUnknown = true)
@JsonInclude(J... |
wenwei8268/Alink | python/src/main/python/pyalink/alink/tests/examples/from_docs/test_vectorapproxnearestneighborpredictbatchop.py | <filename>python/src/main/python/pyalink/alink/tests/examples/from_docs/test_vectorapproxnearestneighborpredictbatchop.py
import unittest
from pyalink.alink import *
import numpy as np
import pandas as pd
class TestVectorApproxNearestNeighborPredictBatchOp(unittest.TestCase):
def test_vectorapproxnearestneighborpre... |
nakomis/incubator-brooklyn | brooklyn-server/utils/rt-felix/src/main/java/org/apache/brooklyn/rt/felix/ManifestHelper.java | <reponame>nakomis/incubator-brooklyn
/*
* Copyright 2015 The Apache Software Foundation.
*
* 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... |
OpenStack-mobile/summit-app-android | app/src/main/java/org/openstack/android/summit/modules/event_detail/business_logic/IEventDetailInteractor.java | package org.openstack.android.summit.modules.event_detail.business_logic;
import org.openstack.android.summit.common.DTOs.EventDetailDTO;
import org.openstack.android.summit.common.DTOs.FeedbackDTO;
import org.openstack.android.summit.common.business_logic.IScheduleableInteractor;
import java.util.List;
import io.re... |
tiagopereira/glue | glue/logger.py | from __future__ import absolute_import, division, print_function
from logging import getLogger, basicConfig, NullHandler
basicConfig()
logger = getLogger("glue")
# Default to Null unless we override this later
logger.addHandler(NullHandler())
|
valkirilov/FMI-2014-2015 | javascript/exercises/2014-11-19/routes/pages.js |
var express = require('express'),
router = express.Router(),
promise = require('../promise');
module.exports = function() {
router.get('/', function(req, res) {
console.log('Here');
var promise = new Promise();
res.status(200).send({'ok': 'true'});
});
router.get('/test... |
Yonah125/codeql | java/ql/test/library-tests/dataflow/switchexpr/TestSwitchExprStmtConsistency.java | public class TestSwitchExprStmtConsistency {
static int f() { return 0; }
public static void test(int x) {
// Test that getRuleExpression() and getRuleStatement() behave alike for switch expressions and statements using arrow rules.
switch(x) {
case 1 -> f();
case 2 -> f();
default -> ... |
manuel-hegner/conquery | backend/src/test/java/com/bakdata/conquery/util/support/TestConquery.java | package com.bakdata.conquery.util.support;
import static org.assertj.core.api.Assertions.assertThat;
import static org.junit.jupiter.api.Assertions.fail;
import java.io.File;
import java.net.ServerSocket;
import java.time.Duration;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import java.util... |
cor-serpentis/server | src/main/java/gsg/threads/JobRunnerConfiguration.java | <filename>src/main/java/gsg/threads/JobRunnerConfiguration.java
package gsg.threads;
import java.util.concurrent.atomic.AtomicBoolean;
/**
* @author <NAME>, <EMAIL>
* Created: 12.07.15 17:47
*/
public class JobRunnerConfiguration {
private boolean active = true;
private long tickTime = 50;
private boole... |
CoffeePerry/mercury-py | mercury/services/config.py | # coding=utf-8
from os import path
class Config(object):
def __init__(self, app=None):
"""Config constructor.
:param app: Application in which to inject the development settings.
"""
self.app = app
self.DEBUG = False
# Flask
self.SECRET_KEY = None
... |
Md-Sabbir-Ahmed/EEE2110 | Laboratory 5 [Function]/Problem06/problem06.cpp | <reponame>Md-Sabbir-Ahmed/EEE2110
/*
NAME: <NAME>
ID:20200105021
SECTION:A
----------------------
CHAPTER:05
PROBLEM:06
*/
#include <iostream>
using namespace std;
// function to calculate power of x raised to p
double power(double x,int p) {
double result=1;
// to calculate positive power
if(p>0) {
... |
dbmdz/digitalcollections-cms | dc-cudami-server/dc-cudami-server-backend-jdbi/src/main/java/de/digitalcollections/cudami/server/backend/impl/database/migration/V11_05_00__DDL_DML_UrlAlias_replace_targetEntityType_with_targetIdentifiableObjectType.java | package de.digitalcollections.cudami.server.backend.impl.database.migration;
import com.github.openjson.JSONObject;
import de.digitalcollections.model.identifiable.IdentifiableObjectType;
import java.util.List;
import java.util.Map;
import java.util.UUID;
import org.flywaydb.core.api.migration.BaseJavaMigration;
impor... |
antropez/concord | src/invite.c | <reponame>antropez/concord<filename>src/invite.c
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "discord.h"
#include "discord-internal.h"
#include "discord-request.h"
CCORDcode
discord_get_invite(struct discord *client,
char *invite_code,
struct discord_get_i... |
RockHong/railscasts-episodes | episode-146/store/config/environments/development.rb | # Settings specified here will take precedence over those in config/environment.rb
# In the development environment your application's code is reloaded on
# every request. This slows down response time but is perfect for development
# since you don't have to restart the webserver when you make code changes.
config.ca... |
yxcde/RTP_MIT_RECODED | src/scenes/karstenVeraMolnar/karstenVeraMolnar.cpp |
#include "karstenVeraMolnar.h"
void karstenVeraMolnar::setup(){
// setup parameters
// if your original code use an ofxPanel instance dont use it here, instead
// add your parameters to the "parameters" instance as follows.
// param was declared in karstenVeraMolnar.h
// parameters.add(param.se... |
dcsaorg/DCSA-JIT-Notifications | src/main/java/org/dcsa/jit/notifications/service/TimestampNotificationMailService.java | package org.dcsa.jit.notifications.service;
import org.dcsa.core.events.model.Event;
import org.dcsa.core.events.model.TimestampDefinition;
import org.dcsa.jit.notifications.model.PendingEmailNotification;
import reactor.core.publisher.Flux;
public interface TimestampNotificationMailService {
Flux<PendingEmailN... |
schnaustin/cloud-sdk-go | pkg/auth/new_authwriter.go | // Licensed to Elasticsearch B.V. under one or more contributor
// license agreements. See the NOTICE file distributed with
// this work for additional information regarding copyright
// ownership. Elasticsearch B.V. licenses this file to you under
// the Apache License, Version 2.0 (the "License"); you may
// not use ... |
lirui-intel/hadoop | hadoop-ozone/ozone-recon/src/main/java/org/apache/hadoop/ozone/recon/tasks/OMUpdateEventBatch.java | <gh_stars>1-10
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* ... |
sksingh2546-pro/ethernetIp | cip-core/src/main/java/com/digitalpetri/enip/util/TimeoutCalculator.java | package com.digitalpetri.enip.util;
import java.time.Duration;
public class TimeoutCalculator {
private static final int MIN_TIMEOUT = 1;
private static final int MAX_TIMEOUT = 8355840;
public static int calculateTimeoutBytes(Duration timeout) {
int desiredTimeout = (int) timeout.toMillis();
... |
unification-com/mainchain-cosmos | x/enterprise/legacy/v040/migrate.go | package v040
import (
v038 "github.com/unification-com/mainchain/x/enterprise/legacy/v038"
v040 "github.com/unification-com/mainchain/x/enterprise/types"
)
// convertDecision convert an old byte decision to an enum
func convertDecision(oldDecision v038.PurchaseOrderStatus) v040.PurchaseOrderStatus {
switch oldDeci... |
GamingGuyTyler/KAaNE-JE- | src/theBulb.java | /**
* The Bulb
*
* Started work on 6/16/2019 12:44 AM
*
* Finished version 0.1 on 2:38 AM
*
* Version 0.1
*/
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.io.*;
import java.util.*;
public class theBulb {
static JFrame f;
private static int stage = 1;
private static ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.