id stringlengths 64 64 | content stringlengths 500 100k | language stringclasses 29
values | path stringlengths 4 333 | repo stringlengths 5 116 | license stringclasses 15
values | size int64 500 100k | lines int64 26 8.06k | source stringclasses 1
value |
|---|---|---|---|---|---|---|---|---|
03d324fdaf0a15be7c13c7d99dcb95afa58301f6876248b9359f01aeabca9730 | package timer
import (
"container/heap"
"time"
"github.com/idealeak/goserver/core"
"github.com/idealeak/goserver/core/basic"
)
type startTimerCommand struct {
src *basic.Object
ta TimerAction
ud interface{}
interval time.Duration
times int
h TimerHandle
}
func (stc *startTimerCo... | GO | core/timer/command_start_timer.go | idealeak/goserver | apache-2.0 | 1,427 | 63 | codeparrot/github-code |
ee8e24a99221acd6367f7fc5078275ca6634f265eb749ba7dd14250db422cb7d | package org.ayo.view.pullrefresh;
import android.view.View;
import android.widget.AbsListView;
public abstract class PtrDefaultHandler implements PtrHandler {
public static boolean canChildScrollUp(View view) {
if (android.os.Build.VERSION.SDK_INT < 14) {
if (view instanceof AbsListView) {
... | Java | ayoview/src/main/java/org/ayo/view/pullrefresh/PtrDefaultHandler.java | cowthan/AyoWeibo | apache-2.0 | 1,267 | 40 | codeparrot/github-code |
3565ed4fffddb8893238a78280715c98c53a8fac6d3e69fe710fb77553b7301c | package com.baidu.unbiz.olap.demo.zzz.palo.service.impl;
import java.util.LinkedList;
import java.util.List;
import org.springframework.stereotype.Service;
import com.baidu.unbiz.olap.demo.zzz.palo.bo.SiteViewItem;
import com.baidu.unbiz.olap.demo.zzz.palo.service.SiteRequest;
import com.baidu.unbiz.olap.demo.zzz.pa... | Java | src/test/java/com/baidu/unbiz/olap/demo/zzz/palo/service/impl/SiteStatServiceImpl.java | wangchongjie/olap-access | apache-2.0 | 1,201 | 34 | codeparrot/github-code |
d9b9b6d6351a654cb7a58b6dfff0c3a76add436f7088109e86483c211ff68414 | import CheckOptionalMatchStatusModule from './checkOptionalMatchStatus'
import CheckOptionalMatchStatusController from './checkOptionalMatchStatus.controller';
import CheckOptionalMatchStatusComponent from './checkOptionalMatchStatus.component';
import CheckOptionalMatchStatusTemplate from './checkOptionalMatchStatus.h... | JavaScript | client/app/components/checkOptionalMatchStatus/checkOptionalMatchStatus.spec.js | shenitzky/SoclializeClient | apache-2.0 | 1,811 | 56 | codeparrot/github-code |
a94533c057f64aa01c20ea35d42ab3d7a214b501a222f5d28f9cecb196f04093 | <!DOCTYPE html>
<!--[if IE]><![endif]-->
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Class EstimoteBeaconProbe
| Sensus Documentation </title>
<meta name="viewport" content="width=device-width">
<meta name="title" cont... | HTML | docs/api/Sensus.Probes.Location.EstimoteBeaconProbe.html | predictive-technology-laboratory/sensus | apache-2.0 | 36,781 | 814 | codeparrot/github-code |
c4d1506671e7bb1be009b9f79009936c658a0c64a7a3851c0738a4b37e02d926 | /*
* Copyright 2013-2016 consulo.io
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to ... | Java | src/main/java/consulo/play1/template/base/psi/PlayBaseTemplateFile.java | consulo/consulo-play | apache-2.0 | 1,275 | 44 | codeparrot/github-code |
229c00713b88ec85554104ee2639c85648e5abdd9bf1abb3188654036e1c40f8 | /* * * * *
* Rackspace Node.js API Library
* api.js
*
* This object (Api) represents an entry point to the Rackspace Cloud API via
* the authentication gate and service catalog.
* * */
exports.serializeQueryString = function(values) {
var qsArr = [];
for (var key in values) {
if (Object.prototype.toStr... | JavaScript | lib/api.js | GradysGhost/node-rackspace-api | apache-2.0 | 7,651 | 264 | codeparrot/github-code |
8337e0959ef8ec0b9005d1d4e0fda68430ca46689950f83c11eddce226cd9817 | /*******************************************************************************
* Copyright 2016 Intuit
* <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>
* http://www.apache.o... | Java | modules/experiment-objects/src/test/java/com/intuit/wasabi/experimentobjects/PrioritizedExperimentListTest.java | intuit/wasabi | apache-2.0 | 2,112 | 68 | codeparrot/github-code |
117d430b8e6a453d7e8d9dd559b99a0c22d20d14717f3d45b56eb113d59eea6a | /**
* Copyright (C) 2015 Red Hat, 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... | Java | kubernetes-examples/src/main/java/io/fabric8/kubernetes/examples/ServiceExample.java | fabric8io/kubernetes-client | apache-2.0 | 2,230 | 64 | codeparrot/github-code |
4fd819a7aefe65b6072039499207c3cc916e603a31473af2529cbdc82b325c4c | package com.bplow.netconn.query.module;
public class ReqForm {
private String id;
private String c;
private String ext;
private String cnidx;
private String refUrl;//媒体地址
private String sessionId;
private String queryStr;
public ReqForm() {
super();
}
public String getId() {
return id... | Java | ads/src/main/java/com/bplow/netconn/query/module/ReqForm.java | ahwxl/ads | apache-2.0 | 1,235 | 70 | codeparrot/github-code |
f355eb703b751bc84ce6bf24bfe62fe61976ee808424a1e29db418cb77b8d1e4 | package ru.job4j.collection.statistickollection;
import org.junit.Before;
import org.junit.Test;
import java.util.ArrayList;
import java.util.List;
import static org.hamcrest.Matchers.is;
import static org.junit.Assert.assertThat;
public class InfoTest {
List<Store.User> previoues;
List<Store.User> current... | Java | chapter_002/src/test/java/ru/job4j/collection/statistickollection/InfoTest.java | ogneyar79/Sirotkin_M | apache-2.0 | 2,330 | 68 | codeparrot/github-code |
3b9b9d942e72566ba8aa3d260d0c5b9ad1b18b9949f4b1fc763b7fc945135b2a | from charmhelpers.cli import cmdline
from charmhelpers.core import hookenv
from charmhelpers.core import unitdata
from charms.reactive.bus import FlagWatch
from charms.reactive.trace import tracer
__all__ = [
'set_flag',
'clear_flag',
'toggle_flag',
'register_trigger',
'is_flag_set',
'all_fla... | Python | charms/reactive/flags.py | juju-solutions/charms.reactive | apache-2.0 | 9,936 | 349 | codeparrot/github-code |
8ba2dbc53a6874a8006aa1e36fc040760d2c672d3ebc12f2cedf05745ad5da24 | package com.plugin.commons.api;
import android.util.Log;
import com.google.gson.Gson;
import com.plugin.commons.helper.FuncUtil;
import com.plugin.commons.model.RadioVideoModel;
import com.plugin.commons.model.RspResultModel;
import com.plugin.commons.model.XinHuaModel;
import com.zq.types.StBaseType;
public class ... | Java | library_common/src/com/plugin/commons/api/JsonParse.java | zhanggh/andr_puligins | apache-2.0 | 2,065 | 97 | codeparrot/github-code |
d53acad7ceb16f51ddc44fb70993bfe75b3ac5c6f2a87549fae5e0eec1cdbd3f | // Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package org.intellij.plugins.markdown.ui.preview;
import com.intellij.openapi.Disposable;
import com.intellij.openapi.application.ApplicationManager;
import com.intellij.openapi.... | Java | plugins/markdown/src/org/intellij/plugins/markdown/ui/preview/MarkdownCodeFencePluginCache.java | leafclick/intellij-community | apache-2.0 | 5,074 | 124 | codeparrot/github-code |
9d97c7e2ca0c8e378064670c6bdb50b27391431b0ca3c863f43081a709421418 | // Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package org.editorconfig.configmanagement;
import com.intellij.openapi.actionSystem.AnAction;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.vfs.Virtual... | Java | plugins/editorconfig/src/org/editorconfig/configmanagement/EditorConfigIndentStatusBarUIContributor.java | leafclick/intellij-community | apache-2.0 | 1,762 | 54 | codeparrot/github-code |
b47550ef93247213dffadc67a8998cab3f0d94a29871c31b0028171ec6145ba2 | package com.point.iot.mina.codc.factory;
import java.nio.charset.Charset;
import java.util.Iterator;
import java.util.Map;
import org.apache.mina.filter.codec.demux.DemuxingProtocolCodecFactory;
import org.apache.mina.filter.codec.demux.MessageDecoder;
import org.apache.mina.filter.codec.demux.MessageEncoder;... | Java | proxy-service/src/main/java/com/point/iot/mina/codc/factory/MessageCodecFactory.java | langxianwei/iot-plat | apache-2.0 | 1,473 | 49 | codeparrot/github-code |
f8372755b60c87dd6c247001b1b4926b42783bcf3c81e81169c5dd9e6bc5372d | package com.iclockwork.percy.base.model.entity;
import com.iclockwork.percy.framework.data.JpaEntity;
import org.hibernate.annotations.GenericGenerator;
import javax.persistence.*;
import java.io.Serializable;
/**
* App
*
* @author: fengwang
* @date: 2016/4/8 13:06
* @version: 1.0
* @since: JDK 1.7
*/
@Entity... | Java | base/src/main/java/com/iclockwork/percy/base/model/entity/App.java | iclockwork/percy | apache-2.0 | 3,303 | 117 | codeparrot/github-code |
d94405e99030ac1da0d22a30c01d9c787b84bbd2183753a3514bbdd8912abc6a | /*
* Copyright 2010-2014 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "l... | C# | sdk/src/Services/EC2/Generated/Model/Internal/MarshallTransformations/AddressUnmarshaller.cs | rafd123/aws-sdk-net | apache-2.0 | 5,439 | 139 | codeparrot/github-code |
94499ac1a51624918f603560b7405a044aba46d96109711f088bf788b7a04d61 | // SPDX-License-Identifier: Apache-2.0
// Copyright 2020 Authors of Cilium
package server
import (
"crypto/tls"
"strings"
"time"
"github.com/sirupsen/logrus"
"github.com/cilium/cilium/pkg/crypto/certloader"
"github.com/cilium/cilium/pkg/hubble/relay/defaults"
"github.com/cilium/cilium/pkg/hubble/relay/observ... | GO | pkg/hubble/relay/server/option.go | michi-covalent/cilium | apache-2.0 | 5,351 | 168 | codeparrot/github-code |
c792dbaddfd3a6fddedd0f1089fa0c6e068ec36a1a802ed7e801dcfff6f0fdcc | // <copyright file="PageFactory.cs" company="WebDriver Committers">
// Copyright 2007-2011 WebDriver committers
// Copyright 2007-2011 Google Inc.
// Portions copyright 2007 ThoughtWorks, Inc
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance w... | C# | dotnet/src/WebDriver.Support/PageObjects/PageFactory.cs | akiellor/selenium | apache-2.0 | 7,497 | 177 | codeparrot/github-code |
cdc93f6f84f4324f8861fd535b3d8b4ce174be9d2acf56eff99f10cd6cc8470a | /*
* 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 ... | Scala | integration/spark2/src/test/scala/org/apache/carbondata/spark/testsuite/partition/TestAlterPartitionTable.scala | HuaweiBigData/carbondata | apache-2.0 | 50,672 | 905 | codeparrot/github-code |
c6f461b69996f2e487a34f0f0d9a3a3e7c7d328fc923d7db6f6a9422e0c3f16b | class Onboard2Controller {
constructor($element, $timeout) {
"ngInject";
const imageEl = $element.find('img');
const hoverEl = $element.find('h5');
const setPosition = event => {
hoverEl.addClass('show');
hoverEl.prop('style', `top: ${event.pageY - 25}px; left: ${event.pageX - 25}px`);
... | JavaScript | client/app/components/createListing/onboard2/onboard2.controller.js | rhysp/pimple | apache-2.0 | 792 | 39 | codeparrot/github-code |
7be0ea2c5a376d57e206b1e8e2bd9ef6db0c48c87c78ea3e92f3e75b57112a30 | using UnityEngine;
using System.Collections;
using UIWidgets;
namespace UIWidgetsSamples {
[RequireComponent(typeof(Combobox))]
public class SampleFilter : MonoBehaviour
{
public GameObject Container;
Combobox combobox;
void Start()
{
combobox = GetComponent<Combobox>();
if (combobox!=null)
{
... | C# | TextInlineSpritePro/Assets/UIWidgets/Sample Assets/TestScripts/SampleFilter.cs | carlosCn/Unity-EmojiText | apache-2.0 | 721 | 38 | codeparrot/github-code |
3c9cc42cf59db02cf2d936c6d30c632b44478ada7498a94ccd2f43c20ea38ca0 | /*
* Copyright 2016 MovingBlocks
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in... | Java | src/test/java/org/terasology/math/geom/Rect2fTransformerTest.java | MovingBlocks/TeraMath | apache-2.0 | 1,414 | 44 | codeparrot/github-code |
3027e54c805f0446473b54e318714bf2f5ce9d7070876ecd1c528f49f710169f | /*
* Copyright 2014 Google 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 appli... | Java | bigtable-hbase/src/test/java/com/google/cloud/bigtable/hbase/adapters/TestTableMetadataSetter.java | dmmcerlean/cloud-bigtable-client | apache-2.0 | 1,358 | 41 | codeparrot/github-code |
f89c379241264772c2ae14ac37c9054915f7dd821be9d624a6ba60ba06fe4c2c | <!doctype html>
<html class="theme-next pisces use-motion" lang="zh-Hans">
<head>
<meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
<meta http-equiv="Cache-Control" content="no-transform" />... | HTML | tags/youdao/index.html | JohnTian/JohnTian.github.io | apache-2.0 | 20,089 | 819 | codeparrot/github-code |
cb10058af7a0843bd265b1b55328333a95ee2a2b39dec74d952c31298f71111a | /*
* Copyright (c) 2002-2018 "Neo Technology,"
* Network Engine for Objects in Lund AB [http://neotechnology.com]
*
* This file is part of Neo4j.
*
* Neo4j is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundatio... | Java | community/kernel/src/main/java/org/neo4j/kernel/impl/store/RecordStore.java | HuangLS/neo4j | apache-2.0 | 9,469 | 301 | codeparrot/github-code |
fb0bbb02ccf7663c78adf3e097f76bd6e4202888985f57fceba3a1405eb60eca | /*******************************************************************************
* Copyright 2015 InfinitiesSoft Solutions 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
*
* ... | Java | src/main/java/com/infinities/skyport/cache/service/CachedComputeServices.java | infinitiessoft/skyport-api | apache-2.0 | 1,901 | 51 | codeparrot/github-code |
013a2e4448101571c23dc720c0c78af3afb198b122781fab894ed1a725089e88 | /**
Copyright 2009 OpenEngSB Division, Vienna University of Technology
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless requ... | Java | core/config/jbi/src/test/java/org/openengsb/config/jbi/ServiceUnitInfoTest.java | tobster/openengsb | apache-2.0 | 3,423 | 95 | codeparrot/github-code |
5e5afb49637856b683426e3ab58cb02e773978098cc70c627801535cddfb8fcc | function Get-VSS3BucketLocation {
<#
.SYNOPSIS
Gets the location of a specific S3 bucket
.PARAMETER BucketName
The name of the bucket you are trying to locate.
.PARAMETER ProfileName
The name of the configuration profile to deploy the stack with. Defaults to $env:AWS_PROFILE, if set.
... | PowerShell | VaporShell/Public/SDK Wrappers/S3/Get-VSS3BucketLocation.ps1 | scrthq/Vaporshell | apache-2.0 | 1,219 | 46 | codeparrot/github-code |
da2d1a4491b46c46acbcc755496e947f010b39da98c0bd15b88212a9d8abbd39 | import datetime
import json
import math
import re
import time
import uuid
from django import forms
from django.http import HttpResponseRedirect
from django.shortcuts import render
from django.utils import timezone
from keychain import captcha as captcha_generator
from keychain import cryptool
from keychain.models imp... | Python | keychain/views/web/userview.py | osgee/keychainserver | apache-2.0 | 10,760 | 283 | codeparrot/github-code |
794c1e2c74df007bfad8b7b0413706a4aaa064834328442bd63748f9e9831053 | /*
* Copyright (C) 2015 Stratio (http://stratio.com)
*
* 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 app... | JavaScript | web/src/scripts/app.js | danielcsant/sparta | apache-2.0 | 4,383 | 152 | codeparrot/github-code |
f9641c80b91b072a19ef65650948f468f3d6c30a605a17e14e631cd4ef0e5294 | /*
* 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 not u... | Java | common/unsafe/src/test/java/org/apache/spark/unsafe/types/UTF8StringSuite.java | caneGuy/spark | apache-2.0 | 37,280 | 856 | codeparrot/github-code |
c4f764dcfc36819961cb7e88af27eb1399031161152b02d7ce261ac5280396e4 | package lecho.lib.hellocharts.samples;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v7.app.ActionBarActivity;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android... | Java | hellocharts-samples/src/lecho/lib/hellocharts/samples/LineChartActivity.java | Nicasso/hellocharts-android | apache-2.0 | 11,767 | 436 | codeparrot/github-code |
392d0a6c3e42c066cea43608852d7946dccc300711164f49a3b611ae5c72395d | <?php
/*
Copyright 2014 Aaron Gong Hsien-Joen <aaronjxz@gmail.com>
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 ... | PHP | classes/ais.php | 86bjorn/phpais | apache-2.0 | 10,238 | 351 | codeparrot/github-code |
7f73eaaf226ac43b49b0085e34a500af0c6616a9b3ad7aa99f10d26bb52d79d3 | 'use strict';
const EventEmitter = require('eventemitter3');
const Element = require('./element');
const LinkedList = Element.LinkedList;
const ObjectGenerator = require('./object-generator');
/**
* The event constant.
*/
const Events = {
'Cancel': 'Document::Cancel'
};
/**
* The id field.
*/
const ID = '_id';... | JavaScript | src/document.js | mongodb-js/hadron-document | apache-2.0 | 4,956 | 233 | codeparrot/github-code |
325aed8ec84af6a0fe62231697409640cbe864307d79f287cd6ad6424653d72a | package org.codereligion.flux;
import com.codereligion.flux.Capacitor;
import com.codereligion.flux.Feature;
import com.codereligion.flux.Features;
import com.codereligion.flux.Flux;
import com.codereligion.flux.UnknownConversionException;
import org.junit.Assert;
import org.junit.Test;
import com.codereligion.flux.c... | Java | src/test/java/org/codereligion/flux/UnboxingFeatureTest.java | codereligion/flux | apache-2.0 | 11,725 | 311 | codeparrot/github-code |
b6be28ea4a50bdf27c48172c1f1a93de4535f8be35b8d09925cac2b9621d851d | using Lidgren.Network;
using Microsoft.Xna.Framework;
namespace Battleship438Game.Network.Messages
{
public class VectorMessage : IGameMessage
{
public int X;
public int Y;
public VectorMessage(NetIncomingMessage im){
this.Decode(im);
}
publ... | C# | Battleship438/Network/Messages/VectorMessage.cs | kflo/Battleship2 | apache-2.0 | 792 | 36 | codeparrot/github-code |
c975bdedd8ba43a275557154c305fed27155e40cde47653c0cf3a1e3c823fde0 | # coding=utf-8
# Copyright 2022 The Google Research 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
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | Python | structformer/utils.py | google-research/google-research | apache-2.0 | 1,703 | 59 | codeparrot/github-code |
8ca7ef78ae6976c160d5db4ee8791463d9ab279344d72f55a6198cf2de5f6a37 | # coding=utf-8
# Copyright 2018 The Google AI Language Team 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
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by ... | Python | language/mentionmemory/encoders/mauto_encoder.py | google-research/language | apache-2.0 | 8,445 | 214 | codeparrot/github-code |
09ed8fa9492822ec508df7fb7faa2d88d6d28bbaec6b2e6cc9d7158c05cceb7d | /*
* Received Management frame processing
* Copyright (c) 2010-2015, Jouni Malinen <j@w1.fi>
*
* This software may be distributed under the terms of the BSD license.
* See README for more details.
*/
#include "utils/includes.h"
#include "utils/common.h"
#include "common/defs.h"
#include "common/ieee802_11_defs.... | C | hostapd-OpenWrt/wlantest/rx_mgmt.c | wangybgit/Chameleon | apache-2.0 | 33,480 | 1,219 | codeparrot/github-code |
3fe04b12ae7bebca4deb7eff6e9afb5d76c32f00287bfe36048774e653edf14e | /*
Copyright 2012 Twitter, 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 agreed to in writing, software
distr... | Scala | bijection-core/src/main/scala/com/twitter/bijection/NumericInjections.scala | twitter/bijection | apache-2.0 | 6,238 | 174 | codeparrot/github-code |
43a9edba2740afce7b9a6432678cc6deae6876dc32bc84d8fd750c00ed210c69 | package com.github.agourlay.cornichon.http
import com.github.agourlay.cornichon.core.{ Scenario, ScenarioRunner, Session }
import com.github.agourlay.cornichon.http.HttpService._
import com.github.agourlay.cornichon.http.steps.HeadersSteps.HeadersStepBuilder
import com.github.agourlay.cornichon.testHelpers.CommonTestS... | Scala | cornichon-core/src/test/scala/com/github/agourlay/cornichon/http/HeaderStepsSpec.scala | agourlay/cornichon | apache-2.0 | 3,317 | 78 | codeparrot/github-code |
1eefc80a26b464e6058eec7d2dc299b3b2c6f45bde719e4f3f57f2aaa3b4eaeb | package vgnumerical;
/**
* Title: Gravity Simulation
* Description:
* Copyright: Copyright (c) 2001
* Company:
* @author Randall Britten
* @version 1.0
*/
public class Vector {
public Vector(double[] elements) {
this.elements = elements;
}
/**
* Copies all elements from a into t... | Java | src/vgnumerical/Vector.java | vertexcite/gravity3d | apache-2.0 | 2,520 | 98 | codeparrot/github-code |
35e923265121da93c01ebd7b2930f4493a7593d94ef77f4bc0293eda17d507d3 | /*
* Copyright (C) 2000-2013 Heinz Max Kabutz
*
* See the NOTICE file distributed with this work for additional
* information regarding copyright ownership. Heinz Max Kabutz licenses
* this file to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with th... | Java | src/main/java/eu/javaspecialists/tjsn/examples/issue076/AsTimeGoesBy.java | kabutz/javaspecialists | apache-2.0 | 1,979 | 76 | codeparrot/github-code |
dadd57c50bad00d849379292ecd47f93c954b5296b02a478d0d1afeeb238c62c | <div class="cluster-wrapper"
[routerLink]="['/clusters', cluster.id]"
[ngClass]="{
'deleting': cluster.state == 'deleting'}">
<div class="cluster-info"
[ngClass]="{
'provisioning-table': cluster.state == 'provisioning',
'failed': cluster.state == 'failed'}">
<div class="cluster-... | HTML | cmd/ui/assets/src/app/dashboard/cluster-table/cluster-table.component.html | supergiant/supergiant | apache-2.0 | 3,787 | 93 | codeparrot/github-code |
577f5a9214ef4298d01c77c05f1ea65913110dadebe50bcce0073219e58e5675 | #pragma once
#include "../acl_cpp_define.hpp"
#include <vector>
#include "../stdlib/string.hpp"
namespace acl
{
class redis_result;
/**
* ÔÚ´Ó disque ¶ÓÁÐÖлñµÃµÄÈÎÎñÐÅÏ¢µÄÀà
*/
class ACL_CPP_API disque_job
{
public:
disque_job();
~disque_job();
/**
* get the ID of the job
* »ñµÃµ±Ç°ÈÎÎñµÄ ID ºÅ
* @retur... | C++ | acl/include/acl_cpp/disque/disque_job.hpp | feixiao/c_practice | apache-2.0 | 2,018 | 129 | codeparrot/github-code |
8f82157c213981a0d4a77c7a0a26bb92025ed421d6c8e5a6927454b994346dea | using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;
namespace TextBoxWithListBox
{
public partial class TextBoxWithListBox : TextBox
{
public TextBoxWithListBox()
{
Init... | C# | 控件/TextBoxWithButton/TextBoxWithButton/TextBoxWithListBox.cs | haowenbiao/His6C- | apache-2.0 | 5,055 | 208 | codeparrot/github-code |
df88ec86997456e551b19b35be990418f310ec52ef1641bbf7d41fd9a62c422b | package cinoketabke;
import functions.User;
import org.junit.Test;
import static org.junit.Assert.*;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.CompletionStage;
import java.util.concurrent.ExecutorService;
import java.util.concurrent... | Java | Java8-Demo/test/cinoketabke/CompletableDemoTest.java | songzhw/Hello-kotlin | apache-2.0 | 7,463 | 238 | codeparrot/github-code |
330f2a3ad7bc2d5abddf8c113427d17a70828bd4c2eb5753e9bef8c663463f28 | package org.apache.helix.integration;
/*
* 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 Licens... | Java | helix-core/src/test/java/org/apache/helix/integration/TestCarryOverBadCurState.java | kongweihan/helix | apache-2.0 | 3,452 | 92 | codeparrot/github-code |
f894fa4a9307cbede0e62734d8631cb86bb0081fae158696b8da9c78b101212d | #ifndef CLIENT_H
#define CLIENT_H
#include <QDialog>
#include <QTcpSocket>
QT_BEGIN_NAMESPACE
class QDialogButtonBox;
class QLabel;
class QLineEdit;
class QPushButton;
class QTcpSocket;
class QTextEdit;
QT_END_NAMESPACE
struct _xyze10_stat_t;
class Plotter;
class TopWindow : public QDialog
{
Q_OBJECT
public:
To... | C | utilities/seismo-diag/diag.h | sergev/vak-opensource | apache-2.0 | 1,401 | 66 | codeparrot/github-code |
6f4ea5ee9a66a3676caf8e86d8ef209f0d464e29ad66b3bb520f22fb40627772 | class ContactsController < ApplicationController
before_filter :authenticate_user!
def create
@contact = Contact.new(contact_params)
if @contact.save # when save is successful
flash["notice"] = "New contact created."
redirect_to contacts_path
else
render "new"
end
end
def upd... | Ruby | app/controllers/contacts_controller.rb | clbarrell/pmd_app | apache-2.0 | 1,202 | 57 | codeparrot/github-code |
5aabae5ca4473f3dd39b4baa8b9958d3cda5c82c905ab50f83be3ec93ca6a6ce | /*
* 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... | Java | src/protocol/jms/org/apache/jmeter/protocol/jms/sampler/FixedQueueExecutor.java | botelhojp/apache-jmeter-2.10 | apache-2.0 | 4,115 | 110 | codeparrot/github-code |
fce6c68c6ab608607ff7fcf16f576689aea382630ae45d1b9a27485c8767e2af | """
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 not use this ... | Python | ambari-server/src/main/resources/stacks/ADH/1.0/services/YARN/package/scripts/service_check.py | alexryndin/ambari | apache-2.0 | 5,633 | 151 | codeparrot/github-code |
6d4f42ded059b3b685ce8ce7a99b8b6dcbcb68d9ad5f37888c05868ed2c68b2d | <html dir="LTR">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252" />
<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5" />
<title>ManagedColoredConsoleAppender Members</title>
<xml>
</xml>
<link rel="stylesheet" type="tex... | HTML | manualisator/log4net-1.2.13/doc/release/sdk/log4net.Appender.ManagedColoredConsoleAppenderMembers.html | gersonkurz/manualisator | apache-2.0 | 11,309 | 105 | codeparrot/github-code |
bf751248508d80b861ccd94692021fd907b95278a616e6df3e8e4e0dec973230 | /**
* 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"... | Java | contrib/haox-config/src/main/java/org/apache/haox/config/XmlConfigLoader.java | HazelChen/directory-kerberos | apache-2.0 | 5,171 | 159 | codeparrot/github-code |
a90e688ee39443d96ebb39c3e353f79e28a2ea1a7de72b5d708828ebb71f6211 | package org.tiltedwindmills.fantasy.mfl.model.weeklyresults;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import org.tiltedwindmills.fantasy.mfl.model.AbstractObject;
import org.tiltedwindmills.fantasy.mfl.services.util.BooleanDeserializer;
import org.til... | Java | src/main/java/org/tiltedwindmills/fantasy/mfl/model/weeklyresults/TeamResultDetails.java | tiltedwindmills/mfl-api | apache-2.0 | 5,891 | 250 | codeparrot/github-code |
1a39a39689e85c53d43cec006cd05edb12562ff7393d0676a525994edfc004c8 | /*
* Copyright 2014-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
* the License. A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "licen... | Java | aws-java-sdk-iotthingsgraph/src/main/java/com/amazonaws/services/iotthingsgraph/model/transform/SystemTemplateSummaryMarshaller.java | jentfoo/aws-sdk-java | apache-2.0 | 2,969 | 65 | codeparrot/github-code |
2caf3b23403c11d655c6c46d8c59727900d14a8f962d34397ef8973136301204 | package org.radarcns.management.service.dto;
import java.io.Serializable;
import java.util.Objects;
import javax.validation.constraints.NotNull;
import org.radarcns.management.domain.enumeration.ProcessingState;
/**
* A DTO for the SourceData entity.
*/
public class SourceDataDTO implements Serializable {
pri... | Java | src/main/java/org/radarcns/management/service/dto/SourceDataDTO.java | RADAR-CNS/ManagementPortal | apache-2.0 | 4,353 | 191 | codeparrot/github-code |
a68445544e0a5ccc3607ccf0fd210db14792df07f418d33fe2e460dcd7e502cf | /*
* 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 edu.toronto.cs.xcurator.eval;
/**
*
* @author amir
*/
public class Accuracy {
final private double pr;
final priva... | Java | src/edu/toronto/cs/xcurator/eval/Accuracy.java | xcurator/xcurator | apache-2.0 | 679 | 34 | codeparrot/github-code |
48902da033a98e35f3256dd12584c24469fb4eca99de14b4633251461eebbbbe | package org.hy.common.report.event;
import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.CellStyle;
import org.apache.poi.ss.usermodel.FillPatternType;
import org.apache.poi.ss.usermodel.IndexedColors;
import org.apache.poi.ss.usermodel.Row;
import org.hy.common.report.bean.RSystemValue;
import ... | Java | src/org/hy/common/report/event/ColorListener.java | HY-ZhengWei/hy.common.report | apache-2.0 | 3,508 | 162 | codeparrot/github-code |
6887d6a2343d3802efeaa96cf87aa0d6ced68f69124b5acbf977b7d0a5ea8954 | /*
* Copyright 2015 Red Hat, Inc.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* and Apache License v2.0 which accompanies this distribution.
*
* The Eclipse Public License is available at
* http://www.eclipse.o... | Java | vertx-auth-htdigest/src/main/java/io/vertx/ext/auth/htdigest/impl/HtdigestUser.java | nevenr/vertx-auth | apache-2.0 | 1,474 | 60 | codeparrot/github-code |
792c8e0b48c11f51e2884d3792fbf8368d9f61bbe907902ee8ac396d06aeb584 | /*
* Copyright 2010-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file... | C++ | aws-cpp-sdk-autoscaling/source/model/DescribeAutoScalingInstancesResult.cpp | wates/aws-sdk-cpp | apache-2.0 | 2,374 | 71 | codeparrot/github-code |
af8e1b88eac28a29445d811328fbc563c9ca2288033703f9a51298dab92901df | package com.ybh.lovemeizi.utils;
import android.app.Activity;
import android.support.v4.content.ContextCompat;
import com.ybh.lovemeizi.R;
import com.ybh.lovemeizi.widget.slidr.Slidr;
import com.ybh.lovemeizi.widget.slidr.model.SlidrConfig;
import com.ybh.lovemeizi.widget.slidr.model.SlidrInterface;
import com.ybh.lo... | Java | app/src/main/java/com/ybh/lovemeizi/utils/SlidrUtil.java | yihaha/YGank | apache-2.0 | 2,364 | 69 | codeparrot/github-code |
cede293a9db1738b4fb2c2424fbc53978cf4ef7e78f68d852ec448fbd8b68c47 | using Abot.Poco;
using System;
using System.Configuration;
namespace Abot.Core
{
[Serializable]
public class AbotConfigurationSectionHandler : ConfigurationSection
{
public AbotConfigurationSectionHandler()
{
}
[ConfigurationProperty("crawlBehavior")]
... | C# | Abot/Core/AbotConfigurationSectionHandler.cs | tru3d3v/abot | apache-2.0 | 11,705 | 330 | codeparrot/github-code |
0f925b2b7b22e8a7c81c8f4731f0a7c4048f43fc6c250136657d48d791cb37d7 | <html>
<head>
<title>Button Incrementer</title>
<script src="https://cdn.socket.io/socket.io-1.4.5.js"></script>
</head>
<body>
<button type="button" onClick="onClick()">Click me</button>
<p>Clicks: <a id="clicks">0</a></p>
<p>Opponent: <a id="oclicks">0</a></p>
</body>
<script>
//sorry... | HTML | static/public/html/test.html | MultiIdle/MultiIdle | apache-2.0 | 1,376 | 54 | codeparrot/github-code |
71ec399ec91164b28e9480f75bf5fa5e95037ce1af38e01ef06bf7ff006d22d2 | /*
* Copyright 2000-2014 JetBrains s.r.o.
*
* 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 agre... | Java | plugins/ui-designer/src/com/intellij/uiDesigner/binding/FormClassIndex.java | leafclick/intellij-community | apache-2.0 | 4,575 | 137 | codeparrot/github-code |
45c9c7261b0b8cce3c46663f35134701a86a8f194f4d0519ce35dc937d33ab58 | package org.timedesk.web.util;
import org.springframework.validation.BindingResult;
import org.springframework.validation.ObjectError;
public class ErrorHandler
{
public static void addError(Object entity, BindingResult result, Exception e)
{
if(e.getMessage().indexOf("Duplicate entry") > 0)
{
Obje... | Java | src/main/java/org/timedesk/web/util/ErrorHandler.java | timedesk/timedesk | apache-2.0 | 955 | 36 | codeparrot/github-code |
e4535ca3105c2b81ee144ebdc57178eec44c94185923e91c33f554e27a34c128 | /*
* Copyright 2016 The BigDL 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
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agr... | Scala | spark/dl/src/main/scala/com/intel/analytics/bigdl/nn/Reverse.scala | psyyz10/BigDL | apache-2.0 | 2,616 | 85 | codeparrot/github-code |
4a4bcfe7c9f1353b2d23f456641b147320e48f7a4c631486559396bdab6f8a2d | package au.com.dius.pact.provider.junit;
import java.util.List;
import java.util.Optional;
import java.util.Set;
import au.com.dius.pact.model.Pact;
import au.com.dius.pact.provider.junit.loader.PactFilter;
import org.junit.runners.model.InitializationError;
import com.google.common.collect.Sets;
public class Filt... | Java | pact-jvm-provider-junit/src/main/java/au/com/dius/pact/provider/junit/FilteredPactRunner.java | Fitzoh/pact-jvm | apache-2.0 | 1,129 | 35 | codeparrot/github-code |
df96d024fb003de35be196ec98dad49135f31f9f5ca0bf46e571d83565c81bb8 | #!/homes/janeway/zhuww/bin/py
import numpy
import pyfits
from pylab import *
#from Pgplot import *
#from ppgplot import *
#import ppgplot
from numpy import *
class Cursor:
badtimestart=[]
badtimeend=[]
lines = []
def __init__(self, ax):
self.ax = ax
#self.lx = ax.axhline(color='k') #... | Python | gti.py | zhuww/planetclient | apache-2.0 | 6,453 | 203 | codeparrot/github-code |
bf413025f3c2b2ab7f3fc3cd05d5f106b7eacd872884ca3539770616c7ebbc98 | package com.IanThomas.resume.views;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.util.AttributeSet;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.T... | Java | src/com/IanThomas/resume/views/CreativeWorksItemView.java | ToxicBakery/Resume-App | apache-2.0 | 1,931 | 71 | codeparrot/github-code |
038dbe1775f4e31ccf9fb0591237622d6dcea91e1bcba07cdadef3198ccef67f | /**
* This file is part of SIMPL4(http://simpl4.org).
*
* Copyright [2017] [Manfred Sattler] <manfred@ms123.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.ap... | Java | bundles/form/src/main/java/org/ms123/common/form/ClassBuilder.java | ms123s/simpl4-src | apache-2.0 | 5,912 | 175 | codeparrot/github-code |
755c34f43dc0ee194c654bcc0acbd9d61e7d5f0f8cae0bb5d9e0b69d2ebde90b | /*
* Copyright 2009-2013 by The Regents of the University of California
* 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 from
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless... | Java | hyracks/hyracks-dataflow-common/src/main/java/org/apache/hyracks/dataflow/common/data/normalizers/IntegerNormalizedKeyComputerFactory.java | tectronics/hyracks | apache-2.0 | 1,515 | 35 | codeparrot/github-code |
764468a29ef4a34c8753af733b6148b5daf195d13bb62a6f0da273c76664c844 | package cmd
import (
"bytes"
"fmt"
"io"
"os"
"path/filepath"
"text/template"
"errors"
)
type Project int
var projects = map[string]Project{
"web": WEB,
}
const (
WEB Project = iota
)
func errDie(msg interface{}) {
fmt.Println("Error:", msg)
os.Exit(-1)
}
func WriteProject(project Project) {
switch p... | GO | cmd/helper.go | lursu/skelly | apache-2.0 | 2,246 | 124 | codeparrot/github-code |
cda39e7a768676f6a4f10cc2598c92a94b6f0345385425fec006fcf8a7b90b98 | /* See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* Esri 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... | Java | src/com/esri/gpt/catalog/schema/InputSelectManyCheckbox.java | usgin/usgin-geoportal | apache-2.0 | 7,413 | 212 | codeparrot/github-code |
a531ea7880918ab56cbc3e9bf6d8e5eb9c294791394a6fd3088ea25626106cd5 | /* Copyright 2017 The TensorFlow 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 License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or a... | C++ | tensorflow/core/graph/mkl_tfconversion_pass.cc | kobejean/tensorflow | apache-2.0 | 17,558 | 453 | codeparrot/github-code |
8e36a58bf4f82e10aa425b0b83ff5c5c1fa66454d6d9784ec37c8a366bc754ff | /*
* Licensed to Elastic Search and Shay Banon under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. Elastic Search licenses this
* file to you under the Apache License, Version 2.0 (the
* "License"); you m... | Java | src/test/java/org/elasticsearch/search/highlight/HighlighterSearchTests.java | lmenezes/elasticsearch | apache-2.0 | 96,223 | 1,666 | codeparrot/github-code |
fb9767a00dac68332e9bf7ba17b91f74b6deb0c39113bd3c3349180094a7ff16 | //===--- LangOptions.h - Language & configuration options -------*- C++ -*-===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/L... | C | include/swift/Basic/LangOptions.h | codestergit/swift | apache-2.0 | 10,473 | 290 | codeparrot/github-code |
713c9d41f4142b4239b4986bc0d6e41fb2f9384d0ff3b148dd2376429fd5212c | // Copyright 2017 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
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in ... | C++ | sling/nlp/wiki/wiki.cc | google/sling | apache-2.0 | 4,645 | 180 | codeparrot/github-code |
e4292d4b612eeb726e4918d5e2fbfe352c29a15645f3a6b7127d6d21600814b2 | /*
* Copyright 2019 The TensorFlow 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 License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless r... | Java | tensorflow-core/tensorflow-core-api/src/test/java/org/tensorflow/types/TInt64Test.java | tensorflow/java | apache-2.0 | 1,204 | 41 | codeparrot/github-code |
b9ab04c4a0deec91e383383d8ea29f45e01c872047feae426250d6f17453b204 | package co.nstant.in.cbor.examples;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.InputStream;
import java.util.List;
import org.junit.Assert;
import org.junit.Test;
import co.nstant.in.cbor.CborBuilder;
import co.nstant.in.cbor.CborDecoder;
import co.nstant.in.cbor.CborEn... | Java | src/test/java/co/nstant/in/cbor/examples/Example75Test.java | itiu/cbor-java | apache-2.0 | 1,925 | 57 | codeparrot/github-code |
a2aee62b30639e597a2eab4475e43fcf226a2cf76b035bf66bca6db140cc14d4 | package com.twitter.io
import java.io.{ByteArrayInputStream, DataInputStream}
import java.nio.charset.StandardCharsets
import java.util.Arrays
import org.scalatest.wordspec.AnyWordSpec
class TempFileTest extends AnyWordSpec {
"TempFile" should {
"load resources" in {
val f1 = TempFile.fromResourcePath("... | Scala | util-core/src/test/scala/com/twitter/io/TempFileTest.scala | twitter/util | apache-2.0 | 1,023 | 33 | codeparrot/github-code |
29f07d0c0af72d345c697048744ce02e02526b33bbe39ce727558001af96468c | #!/usr/bin/env python
#
# Copyright 2010-2011 The Regents of the University of California
#
# 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
#... | Python | fuzzyjoin-hadoop/src/test/scripts/plot/timeline.py | TonyApuzzo/fuzzyjoin | apache-2.0 | 2,845 | 106 | codeparrot/github-code |
28db676916fc72d53efba7ddc572b92dbd3d6fc9c24630d641f395d0c3e5e6c7 | /*
* Copyright 2014 Groupon.com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to ... | TypeScript | remet-gui/app/assets/javascripts/classes/GraphVM.ts | groupon/metrics | apache-2.0 | 8,577 | 258 | codeparrot/github-code |
19c16f70584c9e353aa7f2901e6e0c2be5ef64f395e5f81355dfa1852716c2ae | /**
* 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... | JavaScript | ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsCreateCtrl.js | alexryndin/ambari | apache-2.0 | 18,752 | 586 | codeparrot/github-code |
f95b53855b4a78895a3a42a62e1945443ffef6c85b8808604f416024be499c08 | package easysqoop;
import java.io.IOException;
import java.sql.SQLException;
import org.junit.Before;
import org.junit.Test;
import com.hardthing.easysqoop.Configration;
import com.hardthing.easysqoop.CreateHiveTableTool;
import com.hardthing.easysqoop.Main;
import com.hardthing.easysqoop.manager.ColManag... | Java | src/test/java/easysqoop/TestCreateHiveTableTool.java | xiangtao/easysqoop | apache-2.0 | 1,662 | 62 | codeparrot/github-code |
7aa4d3f30461d21ae49c431f87fff32ed4e1ec292714bcdee477c46c953ef598 | package com.teamo.app.security.controller;
import com.teamo.app.security.dto.JwtAuthenticationRequest;
import com.teamo.app.security.dto.JwtAuthenticationResponse;
import com.teamo.app.security.service.JwtTokenService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.a... | Java | src/main/java/com/teamo/app/security/controller/AuthenticationController.java | Icyr/team-o-prototype-backend | apache-2.0 | 2,067 | 51 | codeparrot/github-code |
1d9453fb95d1d191e6691e392b5f6f88ca0214ed4618c85352deef2b99616a0d | package org.sistemafinanciero.controller;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.Calendar;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import javax.ejb.EJB;
import javax.ejb.EJBException;
import javax.ejb.Remote;
import javax.ejb.Stateless;
import javax.e... | Java | SistCoopREST/src/main/java/org/sistemafinanciero/controller/BovedaServiceBeanTS.java | Softgreen/SistCoop | apache-2.0 | 27,599 | 659 | codeparrot/github-code |
c780fa291ff04e3fd3b63433ebae4698113f1749e146a9a31e43c63561c4213f | #ifndef CLIPPER_LIB_CONTAINERS_HPP
#define CLIPPER_LIB_CONTAINERS_HPP
constexpr int DEFAULT_BATCH_SIZE = -1;
#include <memory>
#include <unordered_map>
#include <boost/circular_buffer.hpp>
#include <clipper/datatypes.hpp>
#include <clipper/metrics.hpp>
#include <clipper/util.hpp>
namespace clipper {
// We use the... | C++ | src/libclipper/include/clipper/containers.hpp | dcrankshaw/clipper | apache-2.0 | 3,682 | 110 | codeparrot/github-code |
93f6f6946bb9b1545f054995a46610e32cbd28897309ed5006abfd8587db043b | /*
* Copyright 2018 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.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by app... | Java | kie-wb-common-stunner/kie-wb-common-stunner-extensions/kie-wb-common-stunner-forms/kie-wb-common-stunner-forms-client/src/main/java/org/kie/workbench/common/stunner/forms/client/widgets/container/FormsContainer.java | etirelli/kie-wb-common | apache-2.0 | 4,853 | 136 | codeparrot/github-code |
e6bd716e2677ea397ff57db10b6e2bd835bfe38e5281de00017716d361be6036 | package com.mck.icndbclient;
import android.content.ContentResolver;
import android.content.ContentValues;
import android.database.Cursor;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.Drawable;
import a... | Java | app/src/viewPagerFlavor/java/com/mck/icndbclient/JokeFragment.java | iammck/my_icndb_client | apache-2.0 | 6,902 | 174 | codeparrot/github-code |
8a03cd4a4f6b53ce7563d4162a342272a3a6f8a19bdaca468faed42cdbae6003 | /*
* 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 ... | Java | asterixdb/asterix-app/src/main/java/org/apache/asterix/app/replication/message/StartupTaskRequestMessage.java | waans11/incubator-asterixdb | apache-2.0 | 2,826 | 72 | codeparrot/github-code |
cb68ffaabe06ea1c6988ccdca3cf118bc71dcd94feb4aaa95f24cbc2892e48fc | /*******************************************************************************
* (c) Copyright IBM Corporation 2019.
*
* 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... | Java | liberty-maven-plugin/src/it/dev-it/resources/basic-dev-project/src/main/java/com/demo/HelloServlet.java | WASdev/ci.maven | apache-2.0 | 1,540 | 39 | codeparrot/github-code |
a8e50b1077a0172dc04686cbad38334ab37473cad6687b021d0d01eb1b8fb771 | 'use strict';
angular.module("ngLocale", [], ["$provide", function($provide) {
var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
function getDecimals(n) {
n = n + '';
var i = n.indexOf('.');
return (i == -1) ? 0 : n.length - i - 1;
}
function getVF(n... | JavaScript | nutrif-web/lib/angular/i18n/angular-locale_yo-bj.js | LADOSSIFPB/nutrif | apache-2.0 | 3,389 | 129 | codeparrot/github-code |
5e07ff1f05aabbd43f81fc6eba5697b48c14deedd93e641bb5efe30f3d7821be | /*
* Copyright 2017-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
* the License. A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "licen... | Java | aws-java-sdk-appmesh/src/main/java/com/amazonaws/services/appmesh/model/transform/RouteDataJsonUnmarshaller.java | aws/aws-sdk-java | apache-2.0 | 3,847 | 95 | codeparrot/github-code |
19d88228fccd1495c2a90b5d3ce77351dd353ab26221106d7c3ca2002d4766c8 | /*
* Copyright 2010-2011 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "l... | Java | src/main/java/com/amazonaws/services/ec2/model/transform/DescribeSecurityGroupsRequestMarshaller.java | apetresc/aws-sdk-for-java-on-gae | apache-2.0 | 3,696 | 88 | codeparrot/github-code |
739c68cbc9d817eda8f5c7fb652ffecf7c7ea7c19bfb4b45e0d1345ed906ccd1 | // Copyright 2015 CoreOS, 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 agreed to in... | GO | Godeps/_workspace/src/github.com/coreos/etcd/wal/encoder.go | mischief/mantle | apache-2.0 | 1,970 | 90 | codeparrot/github-code |
0bcd48104822e1f8ea7110a52dc658037447aeae6accd9000dfe640ae9f95e7c | package com.txmcu.iair.adapter;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
/**
* 创建新家,和购买设备的信息
* @author Administrator
*
*/
public class DeviceHomeEntry implements Serializable {
private static final long serialVersionUID = 7679994356736512440L;
// private static int imaxid... | Java | iair/src/com/txmcu/iair/adapter/DeviceHomeEntry.java | arventwei/iAirAndroid | apache-2.0 | 535 | 32 | codeparrot/github-code |
0f1377edc37b121b17e3d073e9a6dfc9fe4b768f860233bb5b5b7d8122d44de8 | <?php
require_once 'db_connection.php';
//TODO : add session to be able detect if user voted
function update_rate($id){
echo "rate UP ";
$mysqli = connect_to_db();
$res = "";
/* Connect to database and set charset to UTF-8 */
if ($mysqli->connect_error) {
echo 'Database connection failed..... | PHP | js/upgrade_downgrade.php | 23future/work | apache-2.0 | 1,949 | 69 | codeparrot/github-code |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.