code stringlengths 3 1.05M | repo_name stringlengths 4 116 | path stringlengths 4 991 | language stringclasses 9
values | license stringclasses 15
values | size int32 3 1.05M |
|---|---|---|---|---|---|
# -*- coding: utf-8 -*-
# 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, softw... | jprovaznik/tripleo-common | tripleo_common/exception.py | Python | apache-2.0 | 1,750 |
#!/usr/local/bin/python2.7
# -*- coding: utf-8 -*-
__author__ = 'https://github.com/password123456/'
import sys
reload(sys)
sys.setdefaultencoding('utf-8')
import requests
import urllib
import urllib2
import json
import datetime
class bcolors:
HEADER = '\033[95m'
OKBLUE = '\033[94m'
OKGREEN = '\033[92m'
... | password123456/lotto | get_recent_lotto.py | Python | apache-2.0 | 1,787 |
/*
* Licensed to the Sakai Foundation (SF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The SF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use th... | sakai-mirror/k2 | agnostic/shared/src/main/java/org/sakaiproject/kernel/api/ClassLoaderService.java | Java | apache-2.0 | 1,593 |
/*
* Copyright (c) Created by Cody.yi on 2016/9/5.
*/
package com.cody.handler.framework.viewmodel;
/**
* Created by cody.yi on 2016/8/24.
* <p>
* 不包含头部的list view
*
* @param <ItemViewModel> ListView中的item ViewModel
*/
public class ListWithSearchViewModel<ItemViewModel extends XItemViewModel> extends ListView... | codyer/CleanFramework | handler/src/main/java/com/cody/handler/framework/viewmodel/ListWithSearchViewModel.java | Java | apache-2.0 | 589 |
// Copyright © 2013-2020 Andy Goryachev <andy@goryachev.com>
package goryachev.common.io;
public class BitStreamCommon
{
protected static final int BITS_PER_BYTE = 8;
protected static final int MASK[] =
{
0x00000000,
0x00000001,
0x00000003,
0x00000007,
0x0000000f,
0x0000001f,
0x0... | andy-goryachev/JsonPretty | src/goryachev/common/io/BitStreamCommon.java | Java | apache-2.0 | 828 |
package br.ufrn.Myeclone.model;
import javax.persistence.Entity;
@Entity
public class Acao extends Tarefa{
}
| JorgePereiraUFRN/Myeclone | Myeclone/src/br/ufrn/Myeclone/model/Acao.java | Java | apache-2.0 | 123 |
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
var __decorate = (this && this.__decorate) || function (decora... | aciccarello/typedoc | lib/converter/types/alias.js | JavaScript | apache-2.0 | 2,391 |
/*
* 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... | jaikiran/ant-ivy | src/java/org/apache/ivy/plugins/conflict/AbstractConflictManager.java | Java | apache-2.0 | 1,770 |
/* Copyright 2015 1060 Research 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 required by applicable law or agreed to in ... | tonbut/polestar | module/urn.io.polestar/src/io/polestar/data/login/AuthenticationDataAccessor.java | Java | apache-2.0 | 2,279 |
using System.Collections.Generic;
namespace Angular_ASPNETCore_Seed.Models
{
public struct PagingResult<T>
{
public IEnumerable<T> Records { get; set; }
public int TotalRecords { get; set; }
public PagingResult(IEnumerable<T> items, int totalRecords)
{
TotalRecords... | HadwinJ/PerfectDemo | PerfectSolution/Angular_ASPNETCore_Seed/Models/PagingResult.cs | C# | apache-2.0 | 386 |
/*
* Copyright (C) 2015-2021 KeepSafe Software
*
* 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 l... | KeepSafe/dexcount-gradle-plugin | src/main/java/com/getkeepsafe/dexcount/plugin/TaskApplicators.java | Java | apache-2.0 | 1,649 |
/**
* @file
* Declares the array type.
*/
#pragma once
#include "tuple.hpp"
#include "data.hpp"
#include "../values/array.hpp"
#include "../../cast.hpp"
#include <boost/functional/hash.hpp>
#include <boost/variant.hpp>
#include <limits>
#include <ostream>
#include <functional>
namespace puppet { namespace runtime ... | iankronquist/puppetcpp | lib/include/puppet/runtime/types/array.hpp | C++ | apache-2.0 | 7,145 |
public class Test5
{
public static void main(String[] args)
{
Goods iphone = new Iphone();
iphone.setName("iphone");
iphone.setPrice(5000.0);
Goods shoes =new Shoes();
shoes.setName("鞋");
shoes.setPrice(123.0);
Item item =new Item();
item.setGoods(iphone);
item.setAmount(2);
Ite... | JAVA201708/Homework | 201709/20170915/Team1/Malanlan/编程题/ex05/Test5.java | Java | apache-2.0 | 2,394 |
/**
* 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... | segfault/apache_cassandra | src/java/org/apache/cassandra/db/HintedHandOffManager.java | Java | apache-2.0 | 15,835 |
/*
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 f... | Tochemey/NetFreeSwitch.Framework | NetFreeSwitch.Framework/FreeSwitch/Commands/DivertEventsCommand.cs | C# | apache-2.0 | 1,199 |
# Copyright (c) 2010-2011 OpenStack, LLC.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to ... | genius1611/Keystone | keystone/logic/types/user.py | Python | apache-2.0 | 9,678 |
// Copyright 2022 Google LLC. 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 ... | apigee/registry | server/registry/internal/storage/get.go | GO | apache-2.0 | 5,445 |
package com.cody.app.framework.hybrid.core;
import com.cody.xf.common.NotProguard;
/**
* Created by cody.yi on 2017/4/13.
* 所有Js处理类实现这个接口
* Js调用的方法必须按照一定的格式定义,否则不生效
* 格式:
* public static void ***(WebView webView, JsonObject data, JsCallback callback){}
*/
@NotProguard
public interface JsHandler {
}
| codyer/CleanFramework | app/src/main/java/com/cody/app/framework/hybrid/core/JsHandler.java | Java | apache-2.0 | 380 |
var SPI = require('spi');
var extend = require('util')._extend;
var openSpi = function() {
var device = '/dev/spidev0.0';
return new SPI.Spi(device, [], function(s) {
s.open();
});
};
var Adc = function(options) {
var self = this;
var settings = extend( {
voltage: 3.3, //3.3V by ... | anha1/mcp-adc | mcp-adc.js | JavaScript | apache-2.0 | 2,219 |
package org.estatio.module.turnover.dom.entry;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.List;
import javax.inject.Inject;
import org.joda.time.LocalDate;
import org.apache.isis.applib.annotation.Action;
import org.apache.isis.applib.annotation.ActionLayout;
import org.apache.isis.a... | estatio/estatio | estatioapp/app/src/main/java/org/estatio/module/turnover/dom/entry/TurnoverEntryRequest.java | Java | apache-2.0 | 2,742 |
<?php
@session_start();
@require_once("db.php");
@header("Content-Type: application/json; charset=utf8");
if(!empty($_SESSION['username'])) {
$username = $_SESSION['username'];
$cn = connect();
$valid = true;
$isPasswordCorrect = false;
$message = "";
// Checking form data.
if(!empty($_POST['changePasswordNewPa... | gluons/Cooking-Community | changepassword.php | PHP | apache-2.0 | 1,922 |
# Copyright (c) 2015 The Pycroft Authors. See the AUTHORS file.
# This file is part of the Pycroft project and licensed under the terms of
# the Apache License, Version 2.0. See the LICENSE file for details.
from sqlalchemy import Column, ForeignKey, CheckConstraint, \
PrimaryKeyConstraint, func, or_, and_, true, ... | agdsn/pycroft | pycroft/model/traffic.py | Python | apache-2.0 | 8,996 |
# Copyright (c) 2013 MaestroDev. All rights reserved.
require 'maestro_plugin'
require 'maestro_shell'
require 'open-uri'
require 'xmlsimple'
module MaestroDev
module Plugin
class MavenWorker < Maestro::MaestroWorker
def execute
validate_execute_parameters
Maestro.log.info "Inputs: goal... | maestrodev/maestro-maven-plugin | src/maven_worker.rb | Ruby | apache-2.0 | 8,897 |
var nbinput = 1;
var $collectionHolder;
$(function() {
var $alreadyUsed = $("#alreadyExistVar").html();
if ($alreadyUsed) {
showDialog("#some-exists-dialog");
}
// Get the ul that holds the collection of tags
$collectionHolder = $('#inputBlock');
// count the current form inp... | adrienManikon/docmanager | src/SW/DocManagerBundle/Resources/public/js/upload.js | JavaScript | apache-2.0 | 4,586 |
package org.jfrog.hudson.pipeline.scripted.steps.conan;
import com.google.inject.Inject;
import hudson.EnvVars;
import hudson.Extension;
import hudson.FilePath;
import hudson.Launcher;
import hudson.model.Run;
import hudson.model.TaskListener;
import hudson.util.ArgumentListBuilder;
import org.apache.commons.lang.Stri... | AlexeiVainshtein/jenkins-artifactory-plugin | src/main/java/org/jfrog/hudson/pipeline/scripted/steps/conan/InitConanClientStep.java | Java | apache-2.0 | 4,174 |
package it.unibz.inf.ontop.ontology.impl;
/*
* #%L
* ontop-obdalib-core
* %%
* Copyright (C) 2009 - 2014 Free University of Bozen-Bolzano
* %%
* 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
... | srapisarda/ontop | obdalib-core/src/main/java/it/unibz/inf/ontop/ontology/impl/DataSomeValuesFromImpl.java | Java | apache-2.0 | 2,538 |
using MvcRouteTester.Assertions;
using NUnit.Framework;
namespace MvcRouteTester.AttributeRouting.Test
{
public class NunitAssertEngine : IAssertEngine
{
[System.Diagnostics.DebuggerNonUserCode]
public void Fail(string message)
{
Assert.Fail(message);
}
/// <summary>
/// This could be a wrapper ove... | AnthonySteele/MvcRouteTester | src/MvcRouteTester.AttributeRouting.Test/NunitAssertEngine.cs | C# | apache-2.0 | 762 |
package org.deepjava.runtime.mpc555;
import org.deepjava.runtime.ppc32.Ippc32;
// Auto generated file (2021-02-17 13:57:50)
public interface Impc555 extends Ippc32 {
// System constants of CPU mpc555
public static final int SRR1init = 0x3802;
public static final int stackSize = 0x2000;
public static final int s... | deepjava/runtime-library | src/org/deepjava/runtime/mpc555/Impc555.java | Java | apache-2.0 | 17,248 |
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Diagnostics;
using Roslyn.Utilities;
namespace Microsoft.Co... | ericfe-ms/roslyn | src/Compilers/CSharp/Portable/CSharpParseOptions.cs | C# | apache-2.0 | 8,998 |
package com.ctrip.xpipe.redis.integratedtest.keeper;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
import org.junit.runners.Suite.SuiteClasses;
/**
* @author wenchao.meng
*
* May 17, 2016 2:09:41 PM
*/
@RunWith(Suite.class)
@SuiteClasses({
KeeperPsync2.class,
KeeperPsync2Continue.cla... | Yiiinsh/x-pipe | redis/redis-integration-test/src/test/java/com/ctrip/xpipe/redis/integratedtest/keeper/AllKeeperTest.java | Java | apache-2.0 | 833 |
// Copyright 2013 Marc-Antoine Ruel. All rights reserved.
// Use of this source code is governed under the Apache License, Version 2.0
// that can be found in the LICENSE file.
package fortuna
import (
"bytes"
"compress/flate"
"crypto/aes"
"crypto/cipher"
"crypto/md5"
"crypto/sha256"
"encoding/hex"
"encoding/... | maruel/fortuna | generator_test.go | GO | apache-2.0 | 7,636 |
/* */
"format esm";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r... | tzerb/Learning | WebApplication3/src/WebApplication3/jspm_packages/npm/angular2@2.0.0-beta.17/es6/prod/src/core/linker/debug_context.js | JavaScript | apache-2.0 | 4,102 |
<?php
class Radios_FormItem_Core extends FormItem {
protected function options() {
return $this->options;
}
protected function inputType() {
return "radio";
}
}; | erichoglander/qf | core/form_item/radios_form_item.php | PHP | apache-2.0 | 193 |
// Copyright 2016-2022 The Libsacloud 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... | sacloud/libsacloud | v2/helper/service/sim/update_test.go | GO | apache-2.0 | 2,609 |
/*
Copyright 2015 Jenna Hatchard
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... | hatchard/Assignment1-CMPUT301 | app/src/main/java/com/mycompany/assignment1/SortStats.java | Java | apache-2.0 | 4,882 |
/**
*
*/
/**
* @author Vladimir Kornienko
*
*/
package org.openntf.red.security.authorization; | hyarthi/project-red | src/java/org.openntf.red.main/src/org/openntf/red/security/authorization/package-info.java | Java | apache-2.0 | 100 |
package io.fabric8.kubernetes.api.model;
import java.util.HashMap;
import java.util.Map;
import com.fasterxml.jackson.annotation.JsonAnyGetter;
import com.fasterxml.jackson.annotation.JsonAnySetter;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fas... | fabric8io/kubernetes-client | kubernetes-model-generator/kubernetes-model-core/src/generated/java/io/fabric8/kubernetes/api/model/ServiceAccountTokenProjection.java | Java | apache-2.0 | 2,936 |
"use strict";
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
var __decorate = (this && this.__decorate) || fu... | tzerb/Learning | WebApplication3/src/WebApplication3/jspm_packages/npm/dist/js/cjs/src/mock/view_resolver_mock.js | JavaScript | apache-2.0 | 6,175 |
#!/usr/bin/env python
# Copyright 2020 gRPC 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 o... | nicolasnoble/grpc | tools/run_tests/run_xds_tests.py | Python | apache-2.0 | 148,710 |
// ===========================================================================================================
//
// Class/Library: ListBox Control - Main Script
// Author: Michael Marzilli ( http://www.linkedin.com/in/michaelmarzilli , http://www.develteam.com/Developer/Rowell/Portfolio )
// Created: J... | RowellKataan/Unity-List-Box | Assets/Unity UI Controls/Scripts/ListBox Scripts/ListBoxControl.cs | C# | apache-2.0 | 40,922 |
package org.docksidestage.dockside.dbflute.whitebox.cbean.bigartist.innerjoin;
import org.dbflute.cbean.result.ListResultBean;
import org.docksidestage.dockside.dbflute.bsentity.dbmeta.MemberAddressDbm;
import org.docksidestage.dockside.dbflute.bsentity.dbmeta.MemberDbm;
import org.docksidestage.dockside.dbflute.bsent... | dbflute-test/dbflute-test-active-dockside | src/test/java/org/docksidestage/dockside/dbflute/whitebox/cbean/bigartist/innerjoin/WxCBInnerJoinStructuralPossibleTest.java | Java | apache-2.0 | 10,990 |
package com.mx.dic.holder;
import javax.sql.DataSource;
public class DataSourceHolder {
public static DataSource dataSource=null;
public static DataSource getDataSource() {
return dataSource;
}
public void setDataSource(DataSource dataSource) {
DataSourceHolder.dataSource = dataSource;
}
}
| minxinjituan/micro | dicServiceBean/src/main/java/com/mx/dic/holder/DataSourceHolder.java | Java | apache-2.0 | 314 |
/*
* Copyright (c) 2017 by E. A. Graham, Jr.
*
* 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... | EAGrahamJr/jinks | src/main/java/org/thevortex/lighting/jinks/devices/hubs/HubLastReading.java | Java | apache-2.0 | 2,817 |
package com.planet_ink.coffee_mud.Items.Basic;
import com.planet_ink.coffee_mud.core.interfaces.*;
import com.planet_ink.coffee_mud.core.*;
import com.planet_ink.coffee_mud.core.collections.*;
import com.planet_ink.coffee_mud.Abilities.interfaces.*;
import com.planet_ink.coffee_mud.Areas.interfaces.*;
import com.planet... | vjanmey/EpicMudfia | com/planet_ink/coffee_mud/Items/Basic/Chair.java | Java | apache-2.0 | 1,893 |
/*
* Copyright 2017 Young Digital Planet S.A.
*
* 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... | YoungDigitalPlanet/empiria.player | src/test/java/eu/ydp/empiria/player/client/module/sourcelist/view/SourceListViewImplTest.java | Java | apache-2.0 | 8,356 |
// Copyright (c) Martin Costello, 2017. All rights reserved.
// Licensed under the Apache 2.0 license. See the LICENSE file in the project root for full license information.
using Alexa.NET.Request;
using Alexa.NET.Request.Type;
using Alexa.NET.Response;
using Amazon.Lambda.Core;
namespace MartinCostello.LondonTravel... | martincostello/alexa-london-travel | test/LondonTravel.Skill.Tests/AlexaFunctionTests.cs | C# | apache-2.0 | 3,076 |
package com.cloudera.sa.hcu.io.utils;
import java.io.File;
import java.util.ArrayList;
public class LocalFileUtils
{
public static File[] createFileArray(String[] filePathArray)
{
ArrayList<File> fileList = new ArrayList<File>();
File[] tempFileArray;
for (String filePath: filePathArray)
{
File orig... | tmalaska/hadcom.utils | src/main/java/com/cloudera/sa/hcu/io/utils/LocalFileUtils.java | Java | apache-2.0 | 1,160 |
using System.Reflection;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("DequeNet.Tests")]
[assembly: AssemblyDesc... | dcastro/DequeNET | tests/DequeNet.Tests/Properties/AssemblyInfo.cs | C# | apache-2.0 | 1,364 |
require 'ffi'
require_relative '../sodium/utils'
require_relative '../random_bytes'
require_relative '../sodium/secret_buffer'
require_relative '../sodium'
module Crypto
module SecretBox
extend FFI::Library
extend Sodium::Utils
ffi_lib :libsodium
attach_function :primitive, :crypto_secretbox_pri... | Asmod4n/ruby-ffi-libsodium | lib/crypto/secret_box.rb | Ruby | apache-2.0 | 5,944 |
/*
* Copyright 2014 Massachusetts General Hospital
*
* 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... | domeo/DomeoClient | src/org/mindinformatics/gwt/domeo/plugins/persistence/annotopia/serializers/SAnnotationSetSerializer.java | Java | apache-2.0 | 5,833 |
# Copyright © 2012 The Pennsylvania State University
#
# 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... | ndlib/scholarsphere | app/models/batch_update_job.rb | Ruby | apache-2.0 | 2,932 |
/*
* 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 ... | endian675/ignite | modules/platforms/dotnet/Apache.Ignite.Core/Impl/Transactions/TransactionImpl.cs | C# | apache-2.0 | 13,246 |
package com.nwea.dao;
import com.nwea.bean.Blogpost;
import java.sql.SQLException;
/**
* This interface will be used to invoke the database related operations.
*
*
* Created by tahmidchowdhury on 2/9/17.
*/
public interface BlogpostDAO {
//This method returns all the Blogposts from the database
public ... | tahmid29/blogpostapi | src/main/java/com/nwea/dao/BlogpostDAO.java | Java | apache-2.0 | 502 |
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/api/quota.proto
require 'google/protobuf'
Google::Protobuf::DescriptorPool.generated_pool.build do
add_file("google/api/quota.proto", :syntax => :proto3) do
add_message "google.api.Quota" do
repeated :limits, :message, 3, "google.... | googleapis/common-protos-ruby | googleapis-common-protos-types/lib/google/api/quota_pb.rb | Ruby | apache-2.0 | 1,330 |
/*
* (c) Copyright 2018 Palantir Technologies 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 ... | palantir/atlasdb | atlasdb-commons/src/test/java/com/palantir/util/CachedComposedSupplierTest.java | Java | apache-2.0 | 5,427 |
<?php
/**
* Copyright 2015 yannick.
* 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 ... | yroffin/wordpress | themes/yrosimple/inc/bootstrap.php | PHP | apache-2.0 | 12,965 |
<?php
/**
Copyright 2013 Nikhil Patil
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, so... | nikhilapatil/solr-monitor | lib/basic.php | PHP | apache-2.0 | 1,380 |
package io.github.tramchamploo.bufferslayer;
import io.github.tramchamploo.bufferslayer.Message.MessageKey;
import io.github.tramchamploo.bufferslayer.OverflowStrategy.Strategy;
import java.util.concurrent.TimeUnit;
import org.openjdk.jmh.annotations.BenchmarkMode;
import org.openjdk.jmh.annotations.Fork;
import org.o... | tramchamploo/buffer-slayer | benchmark/src/main/java/io/github/tramchamploo/bufferslayer/ConcurrentSizeBoundedQueueBenchmark.java | Java | apache-2.0 | 1,452 |
/*
* Copyright 2014 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 agreed to... | tsegismont/simone | src/main/java/org/rhq/simone/system/SystemServiceFactory.java | Java | apache-2.0 | 1,715 |
// app/routes/form.js
import Ember from 'ember';
export default Ember.Route.extend({
actions: {
willTransition: function(transition) {
// 如果是使用this.get('key')获取不了页面输入值,因为不是通过action提交表单的
var v = this.controller.get('firstName');
// 任意获取一个作为判断表单输入值
if (v && !confirm("你确定要离开这个页面吗??"))... | ubuntuvim/my_emberjs_code | chapter3_routes/app/routes/form.js | JavaScript | apache-2.0 | 532 |
// 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 com.intellij.psi;
import com.intellij.model.SymbolResolveResult;
import com.intellij.util.containers.ContainerUtil;
import org.jetbrains.annotations.NotNull;
import java... | leafclick/intellij-community | platform/core-api/src/com/intellij/psi/PsiPolyVariantReference.java | Java | apache-2.0 | 1,460 |
/* General Loops - Abstract Case - Free variable */
function f1() { return 1; }
function f2() { return 2; }
function f3() { return 3; }
var b = !Date.now(); // non-deterministic boolean value.
var o1 = {x: f1, y: f2, z: f3};
var o2 = {};
var arr = [];
if (b) {
arr.push("x");
arr.push("y");
} else {
arr.pu... | cs-au-dk/TAJS | test-resources/src/micro-different-loop-kinds/AGHeap.js | JavaScript | apache-2.0 | 813 |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ISAAR.MSolve.FEM.Entities
{
public class Cluster
{
private readonly IList<Subdomain> subdomains = new List<Subdomain>();
public IList<Subdomain> Subdomains
{
get { return subdom... | GoatOfRafin/MSolve | ISAAR.MSolve.FEM/Entities/Cluster.cs | C# | apache-2.0 | 385 |
<?php
namespace Atos\MissionRecensementBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* Mission
*
* @ORM\Table()
* @ORM\Entity(repositoryClass="Atos\MissionRecensementBundle\Entity\MissionRepository")
*/
class Mission
{
/**
* @var integer
*
* @ORM\Column(name="id", type="integer")
*... | kfrapin/mission-recensement | src/Atos/MissionRecensementBundle/Entity/Mission.php | PHP | apache-2.0 | 9,462 |
function f() { return 42}
TAJS_assert(f.call.call.call(f) === 42)
TAJS_assert(f.apply.apply.apply(f) === 42)
TAJS_assert(Function.prototype.apply.apply(f) == 42)
TAJS_dumpValue(f.apply.apply.apply(f))
function g(x) { return x + 1}
TAJS_assert(Function.prototype.call(g,45) === undefined)
TAJS_assert(isNaN(g.cal... | cs-au-dk/TAJS | test-resources/src/micro/test109.js | JavaScript | apache-2.0 | 514 |
#-*- coding: utf-8 -*-
'''
Created on Jul 4, 2013
@author: jin
'''
from django.contrib import admin
from apps.agent.models import Client, RecommendRecord
class ClientAdmin(admin.ModelAdmin):
search_fields = ('username','user_username','IDCard')
class RecommendRecordAdmin(admin.ModelAdmin):
search_fields = ... | SnailJin/house | apps/agent/admin.py | Python | apache-2.0 | 461 |
package com.ibuildapp.romanblack.CustomFormPlugin.xmlparser;
/**
* Entity class that form submit button.
*/
public class FormButton {
private String label = "";
/**
* Returns the button label.
* @return the label
*/
public String getLabel() {
return label;
}
/**
* S... | iBuildApp/android_module_CustomForm | src/main/java/com/ibuildapp/romanblack/CustomFormPlugin/xmlparser/FormButton.java | Java | apache-2.0 | 464 |
/*
* Copyright (c) Created by Cody.yi on 2016/8/26.
*/
package com.cody.app.framework.fragment;
import android.databinding.ViewDataBinding;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
im... | codyer/CleanFramework | app/src/main/java/com/cody/app/framework/fragment/WithHeaderFragment.java | Java | apache-2.0 | 1,317 |
require File.expand_path('../boot', __FILE__)
# Pick the frameworks you want:
require "active_record/railtie"
require "action_controller/railtie"
require "action_mailer/railtie"
require "action_view/railtie"
require "sprockets/railtie"
# require "rails/test_unit/railtie"
Bundler.require(*Rails.groups)
require "elemen... | josetonyp/elements | spec/test_app/config/application.rb | Ruby | artistic-2.0 | 1,226 |
<?php
/*
mod_siokara : Pixmicat! siokara management subset (Alpha)
by: scribe
*/
class mod_siokara extends ModuleHelper {
private $mypage;
private $LANGUAGE=array(
'zh_TW' => array(
'siokara_admin_fsage' => '強制sage',
'siokara_admin_ufsage' => '解除強制sage',
'siokara_admin_htmb' => '替換縮圖',
... | miyorineko/pixmicat-materialize | module/mod_siokara.php | PHP | artistic-2.0 | 10,573 |
<?php
class view_conf extends admin_common
{
public $message = false;
private function set_tinymce_vars($section=array())
{
$tmp = 'var all_tinymce=" ';
//$tmpA = array('tinymce');
$tmp .='";';
$tmp .= 'var content_css_set="'.make_path("css","admin","css",false,true).'";';
... | eos-13/YaCMS | main/admin/view/conf.php | PHP | artistic-2.0 | 6,240 |
#!/usr/bin/env python
"""
Created by _UserName_
11/28/2013
"""
import Connect, DB
import uuid
def Register():
# Generate A Unique Idenfifier
ident = uuid.uuid4().hex
# Allow For Database Manipulation
database = DB.DB()
# Create Database
database.create()
# Add Self To Datab... | Us3rNam/F2F-Network | Register.py | Python | artistic-2.0 | 398 |
/*
* Copyright (c) 2011 Tamas Cservenak. All rights reserved.
*
* <tamas@cservenak.com>
* http://www.cservenak.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
*
* ht... | speakeasy/SKYEngine | src/com/speakeasy/skyengine/resources/io/lzma/streams/cs/CoderOutputStream.java | Java | artistic-2.0 | 2,095 |
"""
hmmer module
"""
from __future__ import print_function
from mungo.mungoCore import *
import blast, sequence
from mungo.useful import smartopen, extractRootName, ClassFromDict, warnDeprecated
import sys, re, warnings
hmmer2frame = {0: 1, 1: 2, 2: 3, 3: -1, 4: -2, 5: -3}
frame2hmmer = dict([(v,k) for k,v in hmmer... | PapenfussLab/Mungo | mungo/hmmer.py | Python | artistic-2.0 | 15,959 |
package ttftcuts.atg.api;
import java.util.List;
import ttftcuts.atg.api.events.*;
import ttftcuts.atg.api.events.listenable.ATGBiomeGroupAssignmentEvent.ATGGroupActivationEvent;
import net.minecraft.world.World;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraftforge.common.MinecraftForge;
import ... | reteo/CustomOreGen | src/api/java/ttftcuts/atg/api/ATGBiomes.java | Java | artistic-2.0 | 9,346 |
#! /usr/bin/env python
"""
stats -- Prints some channel information.
disconnect -- Disconnect the bot. The bot will try to reconnect
after 60 seconds.
die -- Let the bot cease to exist.
"""
import liblo
import irc.bot
import irc.strings
from irc.client import ip_numstr_to_quad, ip_quad_... | sonoprob/0x56 | bot/py/ircoscbot.py | Python | artistic-2.0 | 3,668 |
// Machine generated IDispatch wrapper class(es) created by Microsoft Visual C++
// NOTE: Do not modify the contents of this file. If this class is regenerated by
// Microsoft Visual C++, your modifications will be overwritten.
#include "stdafx.h"
#include "printer.h"
////////////////////////////////////////////... | ChIna-king-Arthur/MFC | cow2/TeeChartAPI/printer.cpp | C++ | artistic-2.0 | 5,140 |
package com.work.pm25;
import android.text.TextUtils;
import bean.City;
import bean.County;
import bean.Province;
/**
* Created by KalinaRain on 2015/5/20.
*/
public class Utility {
/**
* 解析和处理服务器返回的省级数据
*/
public synchronized static boolean handleProvincesResponse(PM25DB pm25DB, String response)... | KalinaRain/MyWorkSpace | pmdetection/src/main/java/com/work/pm25/Utility.java | Java | artistic-2.0 | 2,771 |
package com.germi.indrob.utility;
import javax.swing.filechooser.FileFilter;
import javax.swing.filechooser.FileNameExtensionFilter;
public class UtilityExtension{
protected String name;
protected String[] defs;
protected FileFilter filt;
public UtilityExtension(String a, String... b) {
this.name=a;
this.... | el-germi/industrial-robot | src/main/java/com/germi/indrob/utility/UtilityExtension.java | Java | artistic-2.0 | 619 |
# -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'Event.location'
db.add_column(u'calendar_event', 'location',
self.gf('... | orlenko/sfpirg | mezzanine/calendar/migrations/0006_auto__add_field_event_location__add_field_event_link_url.py | Python | bsd-2-clause | 12,037 |
from django.conf import settings
from django.db.models.loading import get_model
from models import MasterSetting, SettingTypes
def get(name, default=None):
try:
setting = MasterSetting.objects.get(name=name)
if setting.type == SettingTypes.INT:
return int(setting.value)
elif se... | MasterAlish/django-ma-settings | ma_settings/master_settings.py | Python | bsd-2-clause | 1,876 |
# coding: utf-8
"""
MINDBODY Public API
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501
OpenAPI spec version: v6
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
impo... | mindbody/API-Examples | SDKs/Python/test/test_get_session_types_request.py | Python | bsd-2-clause | 1,006 |
package battleship
type ShipType uint8
const (
Missed ShipType = iota
Hit
AircraftCarrier
Battleship
Submarine
Destroyer
Cruiser
PatrolBoat
)
func (st ShipType) Mark() string {
s := "\u2573\u29BFA*CARRIERDESTR*SUB*SHIP*BCRUIS"
switch st {
case Missed:
return s[0:3] //"\u2573"
case Hit:
return s[3:6] ... | gdey/go-challange-battleship | battleship/ship_type.go | GO | bsd-2-clause | 1,552 |
package utwil
import (
"encoding/json"
"fmt"
"testing"
)
// This test calls ToPhoneNumber and also forwards the call to ToPhoneNumber.
// ToPhoneNumber should expect two calls.
func TestCall(t *testing.T) {
callbackPostURL := fmt.Sprintf("http://twimlets.com/forward?PhoneNumber=%s", ToPhoneNumber)
call, err := T... | wyc/utwil | call_test.go | GO | bsd-2-clause | 584 |
/*********************************************************************
* Maxeler Technologies: BrainNetwork *
* *
* Version: 1.2 *
* Date: 05 July 2013 ... | maxeler/Brain-Network | APP/CPUCode/gui/src/com/maxeler/brainnetwork/gui/ComputeButton.java | Java | bsd-2-clause | 2,215 |
<?php
/**
* This file is part of the PHP Generics package.
*
* @package Generics
*/
namespace Generics\Streams;
use Generics\Streams\Interceptor\StreamInterceptor;
use Countable;
/**
* This class provides a stream for standard output
*
* @author Maik Greubel <greubel@nkey.de>
*/
class StandardOutputStream imp... | maikgreubel/phpgenerics | src/Generics/Streams/StandardOutputStream.php | PHP | bsd-2-clause | 2,960 |
# Copyright (c) 2003-present, Jodd Team (http://jodd.org)
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice,
# thi... | vilmospapp/jodd | jodd-core/src/main/python/ConvertBean.py | Python | bsd-2-clause | 4,825 |
package com.kbsriram.keypan.core;
import java.io.IOException;
import java.io.Reader;
import java.util.regex.Pattern;
public final class CUtils
{
public final static String byte2hex(byte[] b)
{
StringBuilder sb = new StringBuilder();
for (int i=0; i<b.length; i++) {
int v = b[i] & 0... | kbsriram/keypan | src/core/com/kbsriram/keypan/core/CUtils.java | Java | bsd-2-clause | 3,841 |
package cs499blue.models;
import cs499blue.algorithms.Distance;
/**
* author: vwilson
* date: 4/1/14
*/
public class Edge {
private Vertex a, b;
public Edge(Vertex a, Vertex b) {
this.a = a;
this.b = b;
}
public Vertex getA() {
return a;
}
public Vertex getB() {
... | vwilson/CS499-Shortest-Path | CS499/src/main/java/cs499blue/models/Edge.java | Java | bsd-2-clause | 887 |
var express = require('express');
var router = express.Router();
/* GET home page. */
router.get('/', function(req, res, next) {
res.render('index', { title: 'Express' });
});
router.get('/socket', function(req, res, next){
res.render('socket', {title: 'socket.io test'})
});
module.exports = router;
| wushuyi/newClassSystem | server/routes/index.js | JavaScript | bsd-2-clause | 309 |
#!/usr/bin/env python
#
# :copyright: (c) 2013 by Mike Taylor
# :author: Mike Taylor
# :license: BSD 2-Clause
#
# See LICENSE file for details
#
import os
import time
import json
import argparse
import pyrax
_data_centers = [ 'DFW', 'ORD' ]
_commands = [ 'list' ]
_config_file = '~/.rackspace.... | bear/rsinfo | rsinfo.py | Python | bsd-2-clause | 6,094 |
class PerconaServerAT56 < Formula
desc "Drop-in MySQL replacement"
homepage "https://www.percona.com"
url "https://www.percona.com/downloads/Percona-Server-5.6/Percona-Server-5.6.37-82.2/source/tarball/percona-server-5.6.37-82.2.tar.gz"
version "5.6.37-82.2"
sha256 "3cf04b64c8bf5b9cc1ea1a68c54ba77a4709d9c9051... | bfontaine/homebrew-core | Formula/percona-server@5.6.rb | Ruby | bsd-2-clause | 5,617 |
// This file was procedurally generated from the following sources:
// - src/dstr-assignment/obj-id-identifier-resolution-last.case
// - src/dstr-assignment/default/for-of.template
/*---
description: Evaluation of DestructuringAssignmentTarget (last of many) (For..of statement)
esid: sec-for-in-and-for-of-statements-ru... | sebastienros/jint | Jint.Tests.Test262/test/language/statements/for-of/dstr-obj-id-identifier-resolution-last.js | JavaScript | bsd-2-clause | 1,252 |
/*
* Copyright (c) 2014 Abdul Hannan Ahsan <abdulhannan.ahsan@gmail.com>
*
* 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
... | aha0x0x/snippets | java/aha/datastructure/DoubleLinkedList.java | Java | bsd-2-clause | 3,509 |
# Example: How to prepare a new refund with the Mollie API.
#
import os
from mollie.api.client import Client
from mollie.api.error import Error
def main():
try:
#
# Initialize the Mollie API library with your API key.
#
# See: https://www.mollie.com/dashboard/settings/profiles
... | mollie/mollie-api-python | examples/11-refund-payment.py | Python | bsd-2-clause | 1,522 |
class GitGui < Formula
desc "Tcl/Tk UI for the git revision control system"
homepage "https://git-scm.com"
# NOTE: Please keep these values in sync with git.rb when updating.
url "https://mirrors.edge.kernel.org/pub/software/scm/git/git-2.31.1.tar.xz"
sha256 "9f61417a44d5b954a5012b6f34e526a3336dcf5dd720e2bb7a... | cblecker/homebrew-core | Formula/git-gui.rb | Ruby | bsd-2-clause | 2,119 |
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
namespace Free.Controls.TreeView.Tree
{
/// <summary>
/// Provides a simple ready to use implementation of <see cref="ITreeModel"/>. Warning: this class is not optimized
/// to work with big amount of data. In this case create yo... | shintadono/Free.Controls.TreeView | Tree/TreeModel.cs | C# | bsd-2-clause | 2,834 |
/*
* Copyright (c) 2012, JInterval Project.
* 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 o... | jinterval/jinterval | jinterval-field/src/main/java/net/java/jinterval/field/RationalField.java | Java | bsd-2-clause | 2,936 |
# -*- coding: utf-8 -*-
# This code is distributed under the two-clause BSD license.
# Copyright (c) 2012-2013 Raphaël Barrois
from __future__ import absolute_import, unicode_literals
import logging
from django.core import exceptions
from django.db import models
from . import conf
PERM_USER = 'user'
PERM_GROUP_... | Polytechnique-org/django-authgroupex | django_authgroupex/auth.py | Python | bsd-2-clause | 8,966 |
// Copyright (C) 2017 Robin Templeton. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
description: Octal BigInt literal containing an invalid digit
esid: prod-NumericLiteral
info: |
NumericLiteral ::
NumericLiteralBase NumericLiteralSuffix
NumericLiteralBase ... | sebastienros/jint | Jint.Tests.Test262/test/language/literals/bigint/octal-invalid-digit.js | JavaScript | bsd-2-clause | 578 |