repo_name stringlengths 6 101 | path stringlengths 4 300 | text stringlengths 7 1.31M |
|---|---|---|
andrewdotn/concurrent-ruby | examples/go-by-example-channels/rate-limiting.rb | <filename>examples/go-by-example-channels/rate-limiting.rb
#!/usr/bin/env ruby
$: << File.expand_path('../../../lib', __FILE__)
require 'concurrent-edge'
require 'time'
Channel = Concurrent::Channel
## Go by Example: Rate Limiting
# https://gobyexample.com/rate-limiting
requests = Channel.new(buffer: :buffered, cap... |
cyberfined/qna | vendor/bundle/ruby/2.7.0/gems/diff-lcs-1.4.4/spec/traverse_sequences_spec.rb | # frozen_string_literal: true
require 'spec_helper'
describe 'Diff::LCS.traverse_sequences' do
describe 'callback with no finishers' do
describe 'over (seq1, seq2)' do
before(:each) do
@callback_s1_s2 = simple_callback_no_finishers
Diff::LCS.traverse_sequences(seq1, seq2, @callback_s1_s2)
... |
herb-go/DEPRECATED | member/data.go | <gh_stars>0
package member
//DEPRECATED
import (
"github.com/herb-go/deprecated/cache"
"github.com/herb-go/deprecated/cache/datastore"
)
//ServiceData member user data module.
//DEPRECATED
type ServiceData struct {
service *Service
}
//Cache Return member user data cache.
//DEPRECATED
func (s *ServiceData) Cache(... |
toponinja/nakarte | src/lib/leaflet.control.printPages/pageFeature.js | <reponame>toponinja/nakarte<filename>src/lib/leaflet.control.printPages/pageFeature.js
import L from 'leaflet';
import './page-feature.css';
const PageFeature = L.Marker.extend({
initialize: function(centerLatLng, paperSize, scale, label) {
this.paperSize = paperSize;
this.scale = scale... |
iplo/Chain | chrome/browser/ui/find_bar/find_bar_state_factory.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/ui/find_bar/find_bar_state_factory.h"
#include "chrome/browser/profiles/incognito_helpers.h"
#include "chrome/browser/profil... |
Doctusoft/gwt-bootstrap-mock-2.3.2.0 | src/main/java/com/github/gwtbootstrap/client/ui/AlertBlock.java | /*
* Copyright 2012 GWT-Bootstrap
*
* 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 ag... |
Rainloury/node-api | app.redis.js | <reponame>Rainloury/node-api<gh_stars>0
'use strict';
const seneca = require('seneca');
const schedule = require('node-schedule');
const apollo = require('node-apollo');
const config = {
configServerUrl: process.env.APOLLO,
appId: 'node-api',
clusterName: 'default',
namespaceName: ['application']
};
apollo.re... |
axelpavageau/django-DefectDojo | dojo/authorization/authorization_decorators.py | <filename>dojo/authorization/authorization_decorators.py
import functools
from django.conf import settings
from django.core.exceptions import PermissionDenied
from django.shortcuts import get_object_or_404
from dojo.authorization.authorization import user_has_permission_or_403
from dojo.user.helper import user_is_autho... |
hsqStephenZhang/leetcode-go | leetcode/lc24/main.go | package main
import "fmt"
type ListNode struct {
Val int
Next *ListNode
}
func swapPairs(head *ListNode) *ListNode {
dummy := &ListNode{Next: head}
cur := dummy
for {
first := cur.Next
if first == nil || first.Next == nil {
break
}
second := first.Next
secondNext := second.Next
cur.Next = seco... |
onesword0618/leetcode | src/test/arrayStringsAreEqual.test.js | <reponame>onesword0618/leetcode<gh_stars>0
const arrayStringsAreEqual = require("./../main/arrayStringsAreEqual");
// Question
// Given two string arrays word1 and word2,
// return true if the two arrays represent the same string, and false otherwise.
// A string is represented by an array
// ... |
reevespaul/firebird-qa | tests/bugs/core_4200_test.py | <gh_stars>0
#coding:utf-8
#
# id: bugs.core_4200
# title: An uncommitted select of the pseudo table sec$users blocks new database connections
# decription:
# Checked on: 4.0.0.1635: OK, 1.866s; 3.0.5.33180: OK, 1.869s.
#
# tracker_id: CORE-4200
# min_versions: ['3... |
Kirito56/lsm-matlab | csim/src/forceable.h | <reponame>Kirito56/lsm-matlab
/*! \file forceable.h
** \brief Class definition of Forcable
*/
#ifndef _FORCEABLE_H_
#define _FORCEABLE_H_
#include "advanceable.h"
class Teacher;
//! Base class for all objects we can be forced (by some teacher; see class Teacher) to produce a given target output
/**
<b>Forcing a... |
Skrrrrrrrrrrrr/802.11-TDMA-WIFI | sboot/magpie_1_1/sboot/dma_engine/src/desc.c | /*
* Copyright (c) 2013 Qualcomm Atheros, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted (subject to the limitations in the
* disclaimer below) provided that the following conditions are met:
*
* * Redistributions of source code ... |
coolJenny/DMPtool-roadmap | app/controllers/org_admin/sections_controller.rb | <filename>app/controllers/org_admin/sections_controller.rb<gh_stars>0
module OrgAdmin
class SectionsController < ApplicationController
include Versionable
respond_to :html
after_action :verify_authorized
# GET /org_admin/templates/[:template_id]/phases/[:phase_id]/sections
def index
au... |
lrlucena/Scala_AlunoProfessor_Simple | app/models/Usuario.scala | <filename>app/models/Usuario.scala
package models
import java.util.UUID
import com.mohiva.play.silhouette.api.{ Identity, LoginInfo }
case class Usuario(
id: UUID,
loginInfo: LoginInfo,
papel: String,
nomeCompleto: String,
email: String,
avatarURL: Option[String],
ativado: Boolean) extends Identity
|
Gwenio/synafis | src/datatypes/state_type.cpp |
/*
ISC License (ISC)
Copyright 2018 <NAME>
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 IS" AND THE AUTHOR DISCLAIMS ALL W... |
ucsd-progsys/nate | eval/ocaml/otherlibs/unix/socketpair.c | /***********************************************************************/
/* */
/* OCaml */
/* */
/* <NAME>, <N... |
PhoenixHuang/Kantar | SharedContent/SE/2.3/source/js/SurveyTools/qcbtnmatrixgridset.js | /**
* qcbtnmatrixgridset class
* Inherits from SESurveyTool
*/
function qcbtnmatrixgridset(questionContainers, json, globalOpts) {
SESurveyTool.prototype.init.call(this, questionContainers, json, globalOpts);
}
qcbtnmatrixgridset.prototype = Object.create(SESurveyTool.prototype);
qcbtnmatrixgridset.prototype.typ... |
Sgitario/jcloud-unit | examples/quarkus-oidc/src/test/java/io/jester/examples/quarkus/oidc/KubernetesKeycloakGreetingResourceIT.java | package io.jester.examples.quarkus.oidc;
import io.jester.api.RunOnKubernetes;
@RunOnKubernetes
public class KubernetesKeycloakGreetingResourceIT extends KeycloakGreetingResourceIT {
@Override
protected String getRealmUrl() {
return String.format("http://keycloak:8080/auth/realms/%s", REALM);
}
}... |
romsom/HISE | tools/snex_playground/test_files/struct/struct_member_call.h | /*
BEGIN_TEST_DATA
f: main
ret: int
args: int
input: 12
output: 120
error: ""
filename: "struct/struct_member_call"
END_TEST_DATA
*/
struct X
{
int v = 120;
int getX()
{
return v;
}
};
X x;
int main(int input)
{
//return x.v;
return x.getX();
}
|
laokingshineUAV/VoTT | node_modules/@azure/storage-blob/dist-esm/lib/AccountSASResourceTypes.js | /**
* ONLY AVAILABLE IN NODE.JS RUNTIME.
*
* This is a helper class to construct a string representing the resources accessible by an AccountSAS. Setting a value
* to true means that any SAS which uses these permissions will grant access to that resource type. Once all the
* values are set, this should be serializ... |
CARV-ICS-FORTH/scoop | banshee/cparser/expr.c | /* This file is part of the RC compiler.
This file is derived from the GNU C Compiler. It is thus
Copyright (C) 1987, 88, 89, 92-7, 1998 Free Software Foundation, Inc.
and
Copyright (C) 2000-2001 The Regents of the University of California.
RC is free software; you can redistribute it and/or modify
it under the... |
ying-css/optiga-trust-m | examples/utilities/pkcs11_trustm.c | /**
* MIT License
*
* Copyright (c) 2020 Infineon Technologies AG
*
* 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... |
bearxiong99/CodeLibrary | GnuWin32/libgw32c/include/winx/direntx.h | #ifndef __WINX_DIRENTX_H__
#define __WINX_DIRENTX_H__
#ifdef __GW32__
#ifdef _DIRENT_H_
# define _DIRENT_H
#endif
#include <features.h>
#include <sys/types.h>
__BEGIN_DECLS
#include <bits/dirent.h>
#define INVALID_DIRFD (-1)
#if (defined __USE_BSD || defined __USE_MISC) && !defined d_fileno
//# de... |
BearerPipelineTest/gaia | workers/server/server_test.go | package server
import (
"io/ioutil"
"os"
"testing"
"time"
"github.com/gaia-pipeline/gaia/security"
"github.com/gaia-pipeline/gaia"
hclog "github.com/hashicorp/go-hclog"
)
func TestStart(t *testing.T) {
// Create tmp folder
tmpFolder, err := ioutil.TempDir("", "TestStart")
if err != nil {
t.Fatal(err)
}... |
nt-tuan/dmcit-react | src/views/Base/Person/index.js | export * from './PersonDetail';
|
WhitesteinTechnologies/SetupBuilder | testBuilds/src/com/inet/testapplication/TestLauncher.java | package com.inet.testapplication;
import javax.swing.JFrame;
import javax.swing.JOptionPane;
import javax.swing.UIManager;
/**
* Test Program
*/
public class TestLauncher {
/**
* Startpunkt vom Installer
*
* @param args ignored
* @throws Exception if any error occur on connect... |
Stegosawr/Albedo | static/types.go | package static
import "github.com/bwmarrin/discordgo"
// Command Describes a command
type Command struct {
Description string
SpecialPermissions string
}
// Embeder of different types of content mostly website content
type Embeder interface {
Embed(s *discordgo.Session, m *discordgo.MessageCreate) (*discor... |
PrakashThapa/basex | basex-core/src/main/java/org/basex/util/ft/Stemmer.java | package org.basex.util.ft;
import java.util.*;
import org.basex.util.*;
/**
* Implementation of common stemmer methods.
*
* @author BaseX Team 2005-15, BSD License
* @author <NAME>
*/
public abstract class Stemmer extends LanguageImpl {
/** List of available stemmers. */
static final ArrayList<Stemmer> IMPL... |
mgsx-dev/gdx-kit | demo-core/src/net/mgsx/game/examples/platformer/game/PlatformerGameState.java | package net.mgsx.game.examples.platformer.game;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.Input;
import com.badlogic.gdx.ai.fsm.State;
import com.badlogic.gdx.ai.msg.Telegram;
import com.badlogic.gdx.graphics.Color;
import net.mgsx.game.core.screen.TransitionListener;
import net.mgsx.game.core.screen.Trans... |
moonshadowmobile/cast | lib/deployment/constants.js | /*
* Licensed to Cloudkick, Inc ('Cloudkick') under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* Cloudkick licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not us... |
sudeshana/carbon-governance | components/governance/org.wso2.carbon.governance.list/src/main/java/org/wso2/carbon/governance/list/services/ListMetadataService.java | /*
* Copyright (c) 2005-2010, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
*
* WSO2 Inc. licenses this file to you 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.o... |
rudylee/expo | packages/expo-permissions/index.js | <filename>packages/expo-permissions/index.js<gh_stars>1000+
module.exports = {
get Permissions() {
return require('./src/Permissions');
},
};
|
lf-shaw/operon | include/operon/core/constants.hpp | // SPDX-License-Identifier: MIT
// SPDX-FileCopyrightText: Copyright 2019-2021 Heal Research
#ifndef OPERON_CONSTANTS_HPP
#define OPERON_CONSTANTS_HPP
namespace Operon {
// hashing mode for tree nodes:
// - Strict: hash both node label and coefficient (for leaf nodes)
// - Relaxed: hash only the node labe... |
lrlarson/SF-Arts | scripts/ajax/ext/build/data/ArrayReader-min.js | /*
* Ext JS Library 1.1.1
* Copyright(c) 2006-2007, Ext JS, LLC.
* <EMAIL>
*
* http://www.extjs.com/license
*/
Ext.data.ArrayReader=function(A,B){Ext.data.ArrayReader.superclass.constructor.call(this,A,B)};Ext.extend(Ext.data.ArrayReader,Ext.data.JsonReader,{readRecords:function(C){var B=this.meta?this.meta.id:... |
jbfavre/clickhouse-debian | dbms/src/Analyzers/AnalyzeColumns.cpp | #include <vector>
#include <DB/Analyzers/AnalyzeColumns.h>
#include <DB/Analyzers/CollectAliases.h>
#include <DB/Parsers/formatAST.h>
#include <DB/Parsers/ASTSelectQuery.h>
#include <DB/Parsers/ASTTablesInSelectQuery.h>
#include <DB/Parsers/ASTAsterisk.h>
#include <DB/Parsers/ASTQualifiedAsterisk.h>
#include <DB/Parser... |
Darknez07/Codeforces-sol | B/B1567.cpp | #include <iostream>
using namespace std;
int main(){
int t,a,b,x;
cin>>t;
while(t--){
cin>>a>>b;
if(a == 1 && b >= 2){
cout<<2<<endl;
continue;
}
if(a % 4 == 1){
x = a - 1;
}else if( a % 4 == 2){
x = 1;
}else if(... |
gedorinku/tsugidoko-server | app/server/errors.go | <reponame>gedorinku/tsugidoko-server
package server
import (
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
)
// ErrInvalidSession is returned when session is invalid
var ErrInvalidSession = status.Error(codes.Unauthenticated, "Unauthenticated")
|
yfirmy/eternity2-server | src/main/java/fr/firmy/lab/eternity2server/model/dto/serializer/BoardDescriptionSerializer.java | package fr.firmy.lab.eternity2server.model.dto.serializer;
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.databind.JsonSerializer;
import com.fasterxml.jackson.databind.SerializerProvider;
import fr.firmy.lab.eternity2server.model.dto.BoardDescription;
import org.springframework.boot.jac... |
ECUST-CST163-ZhangBaiLi/moonlight | core/src/main/java/zbl/moonlight/core/protocol/Parser.java | <filename>core/src/main/java/zbl/moonlight/core/protocol/Parser.java
package zbl.moonlight.core.protocol;
import lombok.Setter;
import zbl.moonlight.core.protocol.schema.SchemaEntry;
import zbl.moonlight.core.protocol.nio.NioReader;
import zbl.moonlight.core.protocol.schema.SchemaUtils;
import java.lang.reflect.Invoc... |
thotho19/lagotto | src/test/scala/io/github/binaryfoo/lagotto/AggregateLogEntryTest.scala | <gh_stars>0
package io.github.binaryfoo.lagotto
import io.github.binaryfoo.lagotto.JposTimestamp.DateTimeExtension
import io.github.binaryfoo.lagotto.output.Xsv.SeqToXsv
import io.github.binaryfoo.lagotto.reader.FileIO
import org.joda.time.DateTime
class AggregateLogEntryTest extends LagoTest {
private def threeSt... |
cyberatz/go-choria | validator/example_maxlength_test.go | // Copyright (c) 2020-2021, <NAME> and the Choria Project contributors
//
// SPDX-License-Identifier: Apache-2.0
package validator_test
import (
"fmt"
"github.com/choria-io/go-choria/validator/maxlength"
)
func Example_maxlength() {
ok, err := maxlength.ValidateString("a short string", 20)
if !ok {
panic(err)... |
isabella232/countly-sdk-java | core/src/main/java/ly/count/sdk/internal/UserImpl.java | <reponame>isabella232/countly-sdk-java
package ly.count.sdk.internal;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
imp... |
yumin/SMTK | smtk/extension/qt/qtTableWidget.h | //=========================================================================
// Copyright (c) Kitware, Inc.
// All rights reserved.
// See LICENSE.txt for details.
//
// This software is distributed WITHOUT ANY WARRANTY; without even
// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
// PURPOSE... |
skonzem/model-t | src/app_mt/recovery_img.c | <filename>src/app_mt/recovery_img.c
#include "ch.h"
#include "recovery_img.h"
#include "message.h"
#include "dfuse.h"
#include "app_hdr.h"
#include <stdio.h>
static msg_t
recovery_img_thread(void* arg);
void
recovery_img_init()
{
recovery_img_load_state_t state = RECOVERY_IMG_CHECKING;
msg_send(MSG_RECOVERY_IM... |
scbedd/azure-sdk-for-node | lib/services/luis/authoring/lib/models/modelTrainingInfo.js | /*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is
* regenerated.
*/
'... |
t4d-classes/react_10142020 | apollo2-hoc/src/mutations/RemoveSelectedWidgetIdMutation.js | <reponame>t4d-classes/react_10142020
import { graphql } from 'react-apollo';
import gql from 'graphql-tag';
export const REMOVE_SELECTED_WIDGET_ID_MUTATION = gql`
mutation RemoveSelectedWidgetId($widgetId: ID) {
removeSelectedWidgetId(widgetId: $widgetId) @client
}
`;
export const withRemoveSelectedWidgetIdMu... |
xiaohh2016/python-25 | P25010-Guangzhou-Jiachengwu/week07/ex_copy.py | # 以下代码输出什么,请解释原因(写到问题下方):
li = [ [ ] ] * 5
li[0].append(10)
print(li)
li[1].append(20)
print(li)
li.append(30)
print(li)
'''
因为[[]]是一种复杂结构,一开始[[]]相当于引用了5次一样的内存地址,所以他们id值都一样的
当向这个列表里面的第0个元素追加内容时,相当于对[[]]内存地址上面的值进行了修改,所以5个都改了
同理,当对这个列表第1个元素追加里面时,也会修改到5个元素里面的值,毕竟是引用的统一个地址
最后真正向li列表进行追加时,就相当于修改了li的值,所以就多了个30的元素了
'''
"""... |
The-Fireplace-Minecraft-Mods/Fireplace-Lib | src/main/java/dev/the_fireplace/lib/mixin/ArgumentTypesMixin.java | <reponame>The-Fireplace-Minecraft-Mods/Fireplace-Lib<filename>src/main/java/dev/the_fireplace/lib/mixin/ArgumentTypesMixin.java
package dev.the_fireplace.lib.mixin;
import com.mojang.brigadier.arguments.ArgumentType;
import dev.the_fireplace.lib.command.helpers.ArgumentTypeFactoryImpl;
import dev.the_fireplace.lib.com... |
BauweraertsWouter/programmeren3 | repaircafe/src/main/java/be/kdg/repaircafe/backend/dom/users/roles/Client.java | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package be.kdg.repaircafe.backend.dom.users.roles;
import be.kdg.repaircafe.backend.dom.repairs.Repair;
import org.springframework.se... |
TheEmidee/UEGameBaseFramework | Source/GameBaseFramework/Private/Engine/SubSystems/GBFGameInstanceCoreDelegatesSubsystem.cpp | <filename>Source/GameBaseFramework/Private/Engine/SubSystems/GBFGameInstanceCoreDelegatesSubsystem.cpp
#include "Engine/SubSystems//GBFGameInstanceCoreDelegatesSubsystem.h"
#include "GameFramework/GBFGameModeBase.h"
#include "GBFLog.h"
#include <Engine/Canvas.h>
#include <Framework/Application/SlateApplication.... |
BlueCannonBall/cppparser | test/e2e/test_input/wxWidgets/include/wx/qt/dirdlg.h | <filename>test/e2e/test_input/wxWidgets/include/wx/qt/dirdlg.h
/////////////////////////////////////////////////////////////////////////////
// Name: wx/qt/dirdlg.h
// Author: <NAME>
// Copyright: (c) 2014 <NAME>
// Licence: wxWindows licence
///////////////////////////////////////////////////////////... |
BritClousing/EOSAI | EOSAI/EOSAIStrategicAIOrder_AIResigns.h |
#pragma once
#include "EOSAIStrategicAIOrder.h"
//
// This tells the game that the AI player is resigning.
// In general, the 'ConcedeGame' action happens before this order is given.
//
class CEOSAIStrategicAIOrder_AIResigns : public CEOSAIStrategicAIOrder
{
public:
CEOSAIStrategicAIOrder_AIResigns( CEOSAIStra... |
gtd-checklist/checklist-web | webpack/parts.js | const webpack = require('webpack');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const CleanWebpackPlugin = require('clean-webpack-plugin');
const paths = require('./paths');
const restConfig = require('./rest-config');
exports.entry = ({ hotReload }) => {
const entry = {
app: [paths.appIndex]
};... |
vlcmodan/JavaMainRepo | Students/Socaci Ioana/Assignment 1.2/src/Twist2.java | <gh_stars>10-100
public class Twist2 {
/**
*
* @param args
* we calculate the sum knowing that after 3 positions there is
* an even number
*/
public static void main(String[] args) {
int n = 2, sumOfEven = 0;
while (obtainFibNum(n) <= 4000000) {
sumOfEven += obtainFibNum(n);
... |
geertjanw/ignite | modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheMvccSqlTestSuite.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... |
hiyouka/spring-cloud-resources | source-transaction/src/main/java/com/hiyouka/source/code/TestClass.java | <reponame>hiyouka/spring-cloud-resources
package com.hiyouka.source.code;
import org.springframework.transaction.annotation.Transactional;
/**
* @author hiyouka
* @since JDK 1.8
*/
@Transactional
public class TestClass {
} |
Acidburn0zzz/dnsimple-java | src/main/java/com/dnsimple/exception/DnsimpleException.java | package com.dnsimple.exception;
import com.google.api.client.http.HttpResponseException;
public class DnsimpleException extends Exception {
private String requestId;
private Integer statusCode;
public DnsimpleException(String message, String requestId, Integer statusCode) {
super(message, null);
this.... |
bautes/react-native-dictionary | src/styles/_palette.js | <filename>src/styles/_palette.js
export const WHITE = '#fff'
export const BLACK = '#000'
export const RED = '#f00'
|
sho25/hive | serde/src/java/org/apache/hadoop/hive/serde2/io/HiveBaseCharWritable.java | <filename>serde/src/java/org/apache/hadoop/hive/serde2/io/HiveBaseCharWritable.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 NOTICE file * distributed with this... |
gburd/Kundera | src/kundera-hbase/kundera-hbase-v2/src/test/java/com/impetus/client/hbase/crud/association/HbaseManyToManyTest.java | <filename>src/kundera-hbase/kundera-hbase-v2/src/test/java/com/impetus/client/hbase/crud/association/HbaseManyToManyTest.java
/*******************************************************************************
* * Copyright 2015 Impetus Infotech.
* *
* * Licensed under the Apache License, Version 2.0 (the "License");... |
jippo015/Sub-Zero.bundle | Contents/Libraries/Shared/pysrt/srtitem.py | <reponame>jippo015/Sub-Zero.bundle<gh_stars>1000+
# -*- coding: utf-8 -*-
"""
SubRip's subtitle parser
"""
from pysrt.srtexc import InvalidItem, InvalidIndex
from pysrt.srttime import SubRipTime
from pysrt.comparablemixin import ComparableMixin
from pysrt.compat import str, is_py2
import re
class SubRipItem(Comparab... |
jennalandy/jupyterlab-blueprint | node_modules/@uifabric/utilities/lib-commonjs/keyboard.js | "use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var DirectionalKeyCodes = (_a = {},
_a[38 /* up */] = 1,
_a[40 /* down */] = 1,
_a[37 /* left */] = 1,
_a[39 /* right */] = 1,
_a[36 /* home */] = 1,
_a[35 /* end */] = 1,
_a[9 /* tab */] = 1,
_a[33 /*... |
Mu-L/Jpom | modules/server/src/main/java/io/jpom/common/interceptor/OpenApiInterceptor.java | /*
* The MIT License (MIT)
*
* Copyright (c) 2019 Code Technology Studio
*
* 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 ... |
ExpediaGroup/plunger | src/test/java/com/hotels/plunger/DataTest.java | /**
* Copyright (C) 2014-2019 Expedia Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agr... |
TsvetomirN1/Soft-Uni-Programming-Bassics-With_JAVA | PastExams/ExamsPractice4Problem/WeddingDecoration.java | package ExamsPractice4;
import java.util.Scanner;
public class WeddingDecoration {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
double balloonPrice = 0.1;
double flowerPrice = 1.5;
double candlePrice = 0.5;
doubl... |
VladTrach/elda | json-rdf/src/main/java/com/epimorphics/jsonrdf/JSONWriterFacade.java | /*
See lda-top/LICENCE (or https://raw.github.com/epimorphics/elda/master/LICENCE)
for the licence for this software.
(c) Copyright 2011 Epimorphics Limited
$Id$
File: JSONWriterFacade.java
Created by: <NAME>
Created on: 3 Feb 2010
*/
package com.epimorphics.jsonrdf... |
JasonLGJ/Resume-About-repository | SWUSTmate/app/src/main/java/com/swust/admins/Base/dialog/ProgressDialog.java | package com.swust.admins.Base.dialog;
import android.app.Dialog;
import android.content.Context;
import android.content.DialogInterface;
import android.support.annotation.NonNull;
import android.view.KeyEvent;
import android.widget.TextView;
import com.swust.admins.R;
/**
* Created by sky on 05/09/2018.
*/
public... |
CrimsonJacket/modsUni | src/test/java/seedu/modsuni/testutil/TypicalUsers.java | <reponame>CrimsonJacket/modsUni
package seedu.modsuni.testutil;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import seedu.modsuni.model.user.User;
import seedu.modsuni.model.user.student.Student;
/**
* A utility class containing a list of {@code User} objects to be used in
* tests.
... |
sebasgraciavalderrama/javascript-complete-guide | Fundamentals pt2/Assignments/Arrays/arrays.js | 'use strict';
const worldPopulation = 7900000000;
function percentageOfWorld1(population=1441000000) {
return (population/worldPopulation)*100;
}
const populations = [83190556, 10678362, 50372424]
console.log(populations.length >= 4);
const percentages = [percentageOfWorld1([populations[0]]), percentageOfWorld1... |
raphaelmolesim/agile_brazil | app/controllers/reviews_listing_controller.rb | # encoding: UTF-8
class ReviewsListingController < ApplicationController
def index
respond_to do |format|
format.html do
redirect_to reviewer_reviews_path(@conference)
end
format.js do
if @conference.in_early_review_phase?
sessions_to_review = Session.for_review_in(@con... |
highiq/angular.next | client/app/components/pages/company/team-members/team-members.controller.js | class TeamMembersController {
constructor() {
this.name = '<NAME>';
}
}
export default TeamMembersController;
|
RanjeethaChandreGowda/test | singtel-test1/src/test/java/com/example/singteltest1/TestSolution.java | package com.example.singteltest1;
import static org.junit.jupiter.api.Assertions.assertEquals;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
@SpringBootTest
public class TestSolution {
// Commenting this test method as the Animal class become the Abstract
/*@Te... |
discourse/discourse-ember-source | dist/es/@ember/-internals/routing/tests/ext/controller_test.js | import { setOwner } from '@ember/-internals/owner';
import Controller from '@ember/controller';
import { buildOwner, moduleFor, AbstractTestCase } from 'internal-test-helpers';
moduleFor('@ember/-internals/routing/ext/controller', class extends AbstractTestCase {
["@test transitionToRoute considers an engine's mountP... |
gburd/wave | src/org/waveprotocol/wave/model/wave/data/DocumentFactory.java | <reponame>gburd/wave<filename>src/org/waveprotocol/wave/model/wave/data/DocumentFactory.java
/**
* Copyright 2008 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* h... |
jnthn/intellij-community | java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/sortContent/beforeEnumWithMembers.java | <filename>java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/sortContent/beforeEnumWithMembers.java<gh_stars>1-10
// "Sort content" "true"
enum e {
Foo(1),
Bar(2),<caret>
Baz(5);
int i;
e(int i) {
this.i = i;
}
void doSomething() {
}
}
|
zhugenihao/tp5 | public/static/plugin/image-process/dist/image-scale.js | /*!
* image-process v0.0.1
* (c) 2017-2017 dailc
* Released under the MIT License.
* https://github.com/dailc/image-process
*/
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
... |
ExaByt3s/hack_scripts | Dark soft/Carberp Botnet/source - absource/pro/all source/RemoteCtl/hvnc/libs/hvnc/hvnc/injlib/vncmsg.h | <gh_stars>1-10
#ifndef VNCTHREAD_H_INCLUDED
#define VNCTHREAD_H_INCLUDED
#define DEFPROC_PROLOG(hWnd) if ((lpServer) && (lpServer->bIsVNC) && (lpServer->lpGlobalVNCData))\
{\
DWORD tmp=__LINE__;\
if (uMsg == lpServer->lp... |
itcastopen/itcast-sms | itcast-sms-api/src/main/java/com/itheima/sms/service/TimingPushService.java | <reponame>itcastopen/itcast-sms
package com.itheima.sms.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.itheima.sms.entity.TimingPushEntity;
/**
* 定时发送
*
* @author 传智播客
*
*/
public interface TimingPushService extends IService<TimingPushEntity> {
}
|
netease-im/Wawaji | Wawaji-Server-Windows/wwj_demo/libs/nim_sdk_desktop/nim_chatroom_c_sdk/nim_chatroom_sdk_util.h | <reponame>netease-im/Wawaji<filename>Wawaji-Server-Windows/wwj_demo/libs/nim_sdk_desktop/nim_chatroom_c_sdk/nim_chatroom_sdk_util.h
/** @file nim_chatroom_sdk_util.h
* @brief 接口工具方法
* @copyright (c) 2015-2017, NetEase Inc. All rights reserved
* @author Oleg
* @date 2017/01/01
*/
#include <string>
std::strin... |
doug0162/filebot | source/net/filebot/NativeRenameAction.java | <reponame>doug0162/filebot
package net.filebot;
import static java.util.Collections.*;
import static net.filebot.util.FileUtilities.*;
import java.io.File;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.concurrent.CancellationException;
import com.sun.jna.Platform;
import c... |
winiar93/viadot | tests/integration/flows/test_flow_of_flows.py | <gh_stars>0
import pytest
from unittest import mock
from viadot.flows import Pipeline
from prefect.engine.state import Success
from prefect.engine.state import State
def test_pipeline_init():
instance = Pipeline(
"test_pipeline_flow",
project_name="example_project",
extract_flows_names=["f... |
andreimaftei28/projects-on-JetBrainAcademy | EasyRiderBusCompany_beta/easyrider.py | # Write your awesome code here
import json
import re
class EasyRider:
def __init__(self ,data):
self.data = json.loads(data)
self.errors = {}
def find_errors(self):
data_names = ["bus_id", "stop_id", "stop_name", "next_stop", "stop_type", "a_time"]
self.errors = dict.fromkeys(... |
maallen/mojito | common/src/main/java/com/box/l10n/mojito/phabricator/payload/TargetSearchResult.java | package com.box.l10n.mojito.phabricator.payload;
public class TargetSearchResult extends ListResultWithError<TargetSearchFields> {
}
|
jeffblankenburg/AchievementUnlocked | lambda/custom/node_modules/jmespath/test/jmespath.js | var assert = require('assert');
var jmespath = require('../jmespath');
var tokenize = jmespath.tokenize;
var compile = jmespath.compile;
var strictDeepEqual = jmespath.strictDeepEqual;
describe('tokenize', function() {
it('should tokenize unquoted identifier', function() {
assert.deepEqual(tokenize('foo')... |
oidc-proxy-ecosystem/proxy-server | plugin/modify/main.go | package main
import (
"bytes"
"html/template"
"net/http"
"strings"
"github.com/hashicorp/go-plugin"
"github.com/oidc-proxy-ecosystem/proxy-server/internal"
"github.com/oidc-proxy-ecosystem/proxy-server/internal/plugins"
"github.com/oidc-proxy-ecosystem/proxy-server/plugin/modify/files"
"github.com/oidc-proxy... |
rodekruis/shelter-database | src/web/forms/profile.py | <gh_stars>1-10
#! /usr/bin/env python
#-*- coding: utf-8 -*-
# ***** BEGIN LICENSE BLOCK *****
# This file is part of Shelter Database.
# Copyright (c) 2016 Luxembourg Institute of Science and Technology.
# All rights reserved.
#
#
#
# ***** END LICENSE BLOCK *****
__author__ = "<NAME>"
__version__ = "$Revision: 0.1 ... |
adamsaparudin/portfolio-hacktiv8 | 11. Something Cool/server/models/user.js | const mongoose = require('mongoose');
let db = require('../db')
let Schema = mongoose.Schema
let userSchema = new Schema({
username: {type: String, unique: true, required: true},
password: {type: String},
email: {type: String},
name: {type: String},
bio: {type: String},
listQuestion: [{type: Schema.Types.... |
mrbongiolo/viu | test/support/dummy/app/views/haml_view.rb | <reponame>mrbongiolo/viu
# frozen_string_literal: true
class HamlView < ApplicationView
end
|
digital-ECMT/acuity-vahub | vahub/src/main/java/com/acuity/visualisations/rest/resources/timeline/TimelineConmedsResource.java | /*
* Copyright 2021 The University of Manchester
*
* 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 ... |
guanghuan3/myReposity | sample/src/main/java/com/service/LinuxCondition.java | package com.service;
import org.springframework.context.annotation.Condition;
import org.springframework.context.annotation.ConditionContext;
import org.springframework.core.type.AnnotatedTypeMetadata;
/**
* Created by Administrator
* on 2017/3/29.
*/
public class LinuxCondition implements Condition
{
... |
kingcong/MindSpore_Code | stpm/src/stpm.py | <reponame>kingcong/MindSpore_Code
# Copyright 2022 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requi... |
dcebotarenco/Work_book | Chapter_3_Osnovnie_konstruktii/src/While_Statement/While1.java | package While_Statement;
import java.util.Scanner;
public class While1
{
public static void main (String[] args)
{
Scanner in = new Scanner(System.in);
System.out.println("Enter your balance: ");
double balance = in.nextDouble();
System.out.println("Enter your Goal: ");
double goal = in.nextDouble();
... |
7-wolf/cc3172 | libpro/sDyes.cpp | <reponame>7-wolf/cc3172
#include "sDyes.h"
const int sDyes::c4 = 4;
sDyes::sDyes()
{
reset(1);
}
void sDyes::reset(int partsCount)
{
while (_idxs.size() > partsCount)
{
_idxs.pop_back();
}
while (_idxs.size() < partsCount)
{
_idxs.push_back(cDye::sIdxs());
resetZero(_idxs.back());
}
}
void sDyes::resetZ... |
gyselroth/docxbox | docxbox/docx/component/media.cc | <reponame>gyselroth/docxbox
// Copyright (c) 2020 gyselroth GmbH
// Licensed under the MIT License - https://opensource.org/licenses/MIT
#include <docxbox/docx/component/media.h>
#include <utility>
media::media(std::string path_extract) {
path_media_ = path_extract + "/word/media";
path_extract_ = std::move(path... |
slliac/Ljus4Food | application/html/namespace_prophecy_1_1_util.js | var namespace_prophecy_1_1_util =
[
[ "ExportUtil", "class_prophecy_1_1_util_1_1_export_util.html", null ],
[ "StringUtil", "class_prophecy_1_1_util_1_1_string_util.html", "class_prophecy_1_1_util_1_1_string_util" ]
]; |
tommyTT/Cyclic | src/main/java/com/lothrazar/cyclicmagic/item/storagesack/GuiStorage.java | /*******************************************************************************
* The MIT License (MIT)
*
* Copyright (C) 2014-2018 <NAME> (aka Lothrazar)
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to ... |
Justintime50/easypost-tools | src/tools/node/refund-labels.js | <reponame>Justintime50/easypost-tools
require("dotenv").config();
require("babel-polyfill");
const Easypost = require("@easypost/api");
const api = new Easypost(process.env.prodkey);
// Attribution: [<NAME>](https://github.com/LoganSimonsen)
// WARNING: this will refund/void all production labels in "pre_transit" or... |
LinXueyuanStdio/SAMView | component/Theme/src/main/java/com/same/lib/theme/Theme.java | package com.same.lib.theme;
import android.app.Activity;
import android.content.Context;
import android.content.SharedPreferences;
import android.content.res.Configuration;
import android.graphics.Color;
import android.graphics.PorterDuffColorFilter;
import android.hardware.Sensor;
import android.hardware.SensorManage... |
aTiKhan/nuxeo | modules/platform/nuxeo-platform-importer/nuxeo-importer-core/src/test/java/org/nuxeo/ecm/platform/importer/tests/TestImporterWithFileManager.java | <reponame>aTiKhan/nuxeo<gh_stars>0
/*
* (C) Copyright 2010-2017 Nuxeo SA (http://nuxeo.com/) and others.
*
* 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/l... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.