repo_name stringlengths 4 116 | path stringlengths 4 379 | size stringlengths 1 7 | content stringlengths 3 1.05M | license stringclasses 15
values |
|---|---|---|---|---|
TaoPengFei/DashboardUI | JS/StoreOperation.js | 24544 | let StoreOperation = {};
/*-------------------------------------------------------------------------*
* StoreOperation functions && settings *
*-------------------------------------------------------------------------*/
StoreOperation.addCommas = ( nStr ) => {
nStr += '';
... | mit |
0704681032/Java8InAction | 清华大学邓俊辉老师数据结构资料/dsa/src/_java/dsa/vector_array.java | 2145 | /******************************************************************************************
* Data Structures in C++
* ISBN: 7-302-33064-6 & 7-302-33065-3 & 7-302-29652-2 & 7-302-26883-3
* Junhui DENG, deng@tsinghua.edu.cn
* Computer Science & Technology, Tsinghua University
* Copyright (c) 2006-2013. All rig... | mit |
dewanee-es/tipi | tipi/js/markdown/plugins/markdown-it-container.js | 5174 | /*! markdown-it-container 2.0.0 https://github.com//markdown-it/markdown-it-container @license MIT */(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof ... | mit |
stfalcon-studio/rock-events | src/AppBundle/Tests/Entity/RequestManagerTest.php | 2453 | <?php
namespace AppBundle\Tests\Entity;
use AppBundle\DBAL\Types\RequestManagerStatusType;
use AppBundle\Entity\RequestManager;
use AppBundle\Entity\RequestManagerGroup;
use Doctrine\Common\Collections\ArrayCollection;
/**
* RequestRightTest class
*
* @author Yevgeniy Zholkevskiy <blackbullet@i.ua>
*/
class Requ... | mit |
hirtie-maxim/gulp-runner | lib/gulp-runner/gulp.rb | 590 | module GulpRunner
class Gulp
def self.list
`#{gulp} --cwd #{cwd} --tasks`
end
def self.run(task_name = "default")
`#{gulp} --cwd #{cwd} #{task_name}`
end
private
def self.gulp_file_path
GulpRunner.gulp_file_path
end
def self.cwd
GulpRunner.node_modules_path
end
def self.gulp
b... | mit |
PhilipDaniels/Lithogen | Lithogen.Examples/Gitcheatsheet/scripts/consoleshim.js | 742 | // Avoid `console` errors in browsers that lack a console.
(function () {
var method;
var noop = function () { };
var methods = [
'assert', 'clear', 'count', 'debug', 'dir', 'dirxml', 'error',
'exception', 'group', 'groupCollapsed', 'groupEnd', 'info', 'log',
'markTimeline', ... | mit |
garywong89/phase-0 | week-9/ruby-review-1/ruby-review.rb | 6401 | # Cipher Challenge
# I worked on this challenge by myself.
# I spent [3.5] hours on this challenge.
# 1. Solution
# Write your comments on what each thing is doing.
# If you have difficulty, go into IRB and play with the methods.
def dr_evils_cipher(coded_message)
input = coded_message.downcase.split("") # Check ... | mit |
alChaCC/mongoid_sortable_tree | test/test_helper.rb | 1283 | # Configure Rails Environment
ENV["RAILS_ENV"] = "test"
require File.expand_path("../../test/dummy/config/environment.rb", __FILE__)
require "rails/test_help"
require 'mongoid'
require 'mongoid/tree'
require "minitest/rails"
require 'simplecov'
require "minitest/rails/capybara"
SimpleCov.start 'rails'
require "minite... | mit |
xnuter/java-spring-angular-material-seed | src/main/frontend/src/app/scripts/dashboard/controllers/ConversionController.js | 1342 | (function () {
'use strict';
angular
.module('app')
.controller('ConversionController', [
ConversionController
]);
function ConversionController() {
var ctrl = this;
// actually we need to request it from the server
// not in the scope of th... | mit |
baoky2/EQcoin | src/init.cpp | 43190 | // Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2012 The Bitcoin developers
// Copyright (c) 2013 eqcoin developers
// Copyright (c) 2014 EQcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#d... | mit |
victorwins/techan.js | test/spec/bundle/_fixtures/data/atrtrailingstop.js | 581 | module.exports = {
plot: [
{ date: new Date("2014-03-05"), up: 2, down: null },
{ date: new Date("2014-03-06"), up: null, down: 3 }
],
input: require('./ohlc').facebook.slice(31, 50),
expected: [
{ date: new Date(2012, 6, 24), up: 25.20357142857143, down: null },
{ date: new Date(2012, 6, 25), u... | mit |
totem/cluster-deployer | deployer/tasks/__init__.py | 109 | from deployer.celery import app
@app.task
def backend_cleanup():
app.tasks['celery.backend_cleanup']()
| mit |
xuru/pyvisdk | pyvisdk/do/host_parallel_scsi_hba.py | 1083 |
import logging
from pyvisdk.exceptions import InvalidArgumentError
########################################
# Automatically generated, do not edit.
########################################
log = logging.getLogger(__name__)
def HostParallelScsiHba(vim, *args, **kwargs):
'''The ParallelScsiHba data object type de... | mit |
afton77/p2e-lib-dev | assets/angular-javantech/register.js | 2908 | 'use strict';
var myJavanTech = angular.module('myJavanTech', ['ui.bootstrap', 'ngFileUpload', 'ngDialog', 'ngRoute']);
/**
*
* @param int ID
* @param object form
*/
myJavanTech.factory("registerServicesJT", ['$http', function ($http) {
var serviceBase = 'http://localhost:7777/p2e-lib-dev/';
var obj = {};... | mit |
jubianchi/neutron | lib/downloaders/local/release.js | 383 | import path from "path";
import fs from "fs";
export default class LocalReleaseDownloader {
constructor(dir) {
this.dir = dir;
}
async download(app, release, name) {
return async ctx => {
ctx.attachment("update.zip");
ctx.body = await fs.createReadStream(path.join(t... | mit |
yuxiang-zhou/MarketAnalysor | AngularJSClient/public/scripts/directives/header/header.js | 320 | 'use strict';
/**
* @ngdoc directive
* @name izzyposWebApp.directive:adminPosHeader
* @description
* # adminPosHeader
*/
angular.module('marketApp')
.directive('header',function(){
return {
templateUrl:'scripts/directives/header/header.html',
restrict: 'E',
replace: true,
}
});
| mit |
absunstar/isite | lib/routing.js | 52076 | module.exports = function init(____0) {
____0.on(____0.strings[4], (_) => {
if (!_) {
_0xrrxo.list = [];
}
});
let _0xrrxo = function () {};
_0xrrxo.list = [];
_0xrrxo.endResponse = function (req, res) {
let route = req.route;
if (route.e... | mit |
sazid/codes | cpp/friend_function_1.cpp | 741 | #include <iostream>
using namespace std;
class Truck;
class Car;
class Car {
int passenger;
int speed;
public:
Car(int p, int s) {
passenger = p;
speed = s;
}
friend void compare_speed(Car c, Truck t);
};
class Truck {
int weight;
int speed;
public:
Truck(int w, int s) {
weight = w;
speed = s;
}
... | mit |
chrisprice/t-d3fc | server/src/sinbin.js | 365 | 'use strict';
const bannedUserIds = [
'BackwardSpy',
'andygmb1'
];
const bannedStatusIdStrs = [
'695016836237172737',
'694646309614174208',
'694938865489047556',
'695014425326059521',
'706040109427093505'
];
module.exports = (status) =>
bannedStatusIdStrs.indexOf(status.id_str) === -1 &&
bannedUser... | mit |
DonaldTdz/tz | aspnet-core/src/tzky.saas.Core/Authorization/Users/User.cs | 790 | using System;
using Abp.Authorization.Users;
using Abp.Extensions;
namespace tzky.saas.Authorization.Users
{
public class User : AbpUser<User>
{
public const string DefaultPassword = "123qwe";
public static string CreateRandomPassword()
{
return Guid.NewGuid().ToString("N"... | mit |
tarciosaraiva/katas | KataRomanCalculator/ruby/romancalculator/lib/romancalculator.rb | 89 | require "romancalculator/version"
module Romancalculator
# Your code goes here...
end
| mit |
driver733/VKMusicUploader | src/main/java/com/driver733/vkuploader/wallpost/attachment/support/fields/AttachmentsFields.java | 1602 | /*
* The MIT License (MIT)
*
* Copyright (c) 2018 Mikhail Yakushin
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to ... | mit |
non/spire | tests/src/test/scala/spire/math/RealCheck.scala | 6735 | package spire
package math
import spire.implicits._
import spire.laws.arb.{rational, real}
import org.scalatestplus.scalacheck.ScalaCheckDrivenPropertyChecks
import ArbitrarySupport._
import Ordinal._
import org.scalatest.matchers.should.Matchers
import org.scalatest.propspec.AnyPropSpec
class RealCheck extends Any... | mit |
tomfunkhouser/gaps | pkgs/R2Shapes/R2Kdtree.cpp | 18099 | // Source file for R2Kdtree class
#ifndef __R2KDTREE__C__
#define __R2KDTREE__C__
////////////////////////////////////////////////////////////////////////
// Include files
////////////////////////////////////////////////////////////////////////
#include "R2Shapes.h"
////////////////////////////////////////////... | mit |
leandrodvd/tjbot-tdc2017 | config.js | 601 | // uncomment and update the configuratin parameters
// that you want to overwrite
module.exports =
{ log: { level: 'info' },
robot:
{
gender: 'female',
name: 'Rose'
},
listen:
{
// microphoneDeviceId: 'plughw:1,0',
//inactivityTimeout: -1,
language: 'pt-BR'
},
// wave: {
// serv... | mit |
SocialVisions/Syria-On-The-Move | app/File.php | 1935 | <?php
namespace App;
use Illuminate\Database\Eloquent\Model;
/**
* @property int $image_id
* @property string $size
*/
class File extends Model
{
public function image()
{
return $this->belongsTo(Image::class);
}
public function createFromOriginal($filepath, $name, array $filesize)
{
... | mit |
tpopov94/Telerik-Academy-2016 | OOP/ExtensionMethodsDelegatesLambdaLINQ - Homework/StudentGroups/StudentTest.cs | 12454 | namespace StudentGroups
{
using System;
using System.Collections.Generic;
using System.Linq;
public class StudentTest
{
public static List<Student> studentList = new List<Student> // Task 9 Making list of Students
{
new Student("Blagoi", "Kirov", "100006", "0292... | mit |
uesteibar/changebook | config/application.rb | 1548 | require File.expand_path('../boot', __FILE__)
require "rails"
# Pick the frameworks you want:
require "active_model/railtie"
require "active_job/railtie"
require "active_record/railtie"
require "action_controller/railtie"
require "action_mailer/railtie"
require "action_view/railtie"
require "sprockets/railtie"
# requi... | mit |
amironov73/ManagedIrbis | Source/Classic/Libs/AM.Suggestions/AM/Suggestions/TodayEditor.cs | 2576 | /* TodayEditor.cs --
* Ars Magna project, http://arsmagna.ru
* -------------------------------------------------------
* Status: poor
*/
#region Using directives
using System;
using System.ComponentModel;
using System.Drawing.Design;
using System.Windows.Forms.Design;
using CodeJam;
using JetBrains.Annotations... | mit |
marielb/towerofbabble | node_modules/download.jqueryui.com/jquery-ui.prev/1.11.0.bck/ui/i18n/jquery.ui.datepicker-fr-CA.js | 1153 | /* Canadian-French initialisation for the jQuery UI date picker plugin. */
(function( factory ) {
if ( typeof define === "function" && define.amd ) {
// AMD. Register as an anonymous module.
define([
"jquery",
"../jquery.ui.datepicker"
], factory );
} else {
// Browser globals
factory( jQuery );
}
}(... | mit |
sharemyscreen/common | gulpfile.js | 716 | const fs = require('fs');
const gulp = require('gulp');
const eslint = require('gulp-eslint');
const changelog = require('gulp-changelogmd');
gulp.task('default', function () {
});
gulp.task('lint', function () {
return gulp.src(['./*.js', './lib/**/*.js', './test/**/*.js'])
.pipe(eslint())
.pipe(eslint.fo... | mit |
chadly/Geocoding.net | src/Geocoding.Core/Location.cs | 2432 | using System;
using Newtonsoft.Json;
namespace Geocoding
{
public class Location
{
double latitude;
double longitude;
[JsonProperty("lat")]
public virtual double Latitude
{
get { return latitude; }
set
{
if (value < -90 || value > 90)
throw new ArgumentOutOfRangeException("Latitude", val... | mit |
canmogol/design-patterns | src/main/java/com/fererlab/pattern/creational/prototype/Axe.java | 444 | package com.fererlab.pattern.creational.prototype;
public class Axe extends Item {
private double weight;
public double getWeight() {
return weight;
}
public void setWeight(double weight) {
this.weight = weight;
}
@Override
public String toString() {
return "Axe{... | mit |
h2obandtec/Site-H2O | WebH2O/default.aspx.designer.cs | 1526 | //------------------------------------------------------------------------------
// <gerado automaticamente>
// Este código foi gerado por uma ferramenta.
//
// As alterações ao arquivo poderão causar comportamento incorreto e serão perdidas se
// o código for recriado
// </gerado automaticamente>
//------... | mit |
jeevad/pm-university | database/migrations/2016_06_20_081039_create_password_resets_table.php | 672 | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreatePasswordResetsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('password_resets', function (Blueprint $table) {... | mit |
rightlag/jsonfeed | main.go | 541 | package main
import (
"flag"
"io/ioutil"
"log"
)
var (
file string
)
func init() {
flag.StringVar(&file, "file", "", "")
}
func main() {
flag.Parse()
if file == "" {
log.Fatal("main: argument -file is required")
}
b, err := ioutil.ReadFile(file)
if err != nil {
log.Fatal(err)
}
var parser FeedParser... | mit |
wesleyegberto/study-ocbcd | Ejb2ProjectBankClientTest/src/study/ejb3/projectbank/test/Util.java | 857 | package study.ejb3.projectbank.test;
import java.util.Properties;
import javax.naming.Context;
public class Util {
public static Properties getJndiJbossProperties() {
// These properties are used to initialize the InitialContext object of java naming service from JBoss
// and we need use the jar from %JBOSS_H... | mit |
codeforamerica/michigan-benefits | app/controllers/integrated/student_loan_interest_controller.rb | 392 | module Integrated
class StudentLoanInterestController < FormsController
include SingleExpense
def self.skip_rule_sets(application)
[
SkipRules.must_be_applying_for_healthcare(application),
]
end
def expense_type
:student_loan_interest
end
def expense_collection
... | mit |
EVAST9919/osu-framework | osu.Framework.Tests/Visual/Layout/TestSceneGridContainer.cs | 34589 | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System;
using System.Linq;
using NUnit.Framework;
using osu.Framework.Extensions;
using osu.Framework.Extensions.IEnumerableExtensions;
using osu.Framework.Graphics... | mit |
welphexa/hexabot | src/main/java/Triggers.java | 3679 | import pro.zackpollard.telegrambot.api.TelegramBot;
import pro.zackpollard.telegrambot.api.chat.ChatType;
import pro.zackpollard.telegrambot.api.chat.message.send.SendableTextMessage;
import pro.zackpollard.telegrambot.api.event.Listener;
import pro.zackpollard.telegrambot.api.event.chat.ParticipantJoinGroupChatEve... | mit |
dclaysmith/generator | src/dclaysmith/Generator/Database/Table/Column.php | 402 | <?php
/*
* This file is part of Generator.
*
* (c) D Clay Smith <dclaysmith@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace dclaysmith\Generator\Database\Table;
/**
* Representation of a single column in a ... | mit |
bartsch-dev/jabref | src/main/java/org/jabref/logic/importer/fileformat/BibtexImporter.java | 5377 | package org.jabref.logic.importer.fileformat;
import java.io.BufferedReader;
import java.io.IOException;
import java.nio.charset.Charset;
import java.nio.file.Path;
import java.util.Objects;
import java.util.Optional;
import org.jabref.logic.exporter.SavePreferences;
import org.jabref.logic.importer.ImportFormatPrefe... | mit |
vorquel/SimpleSkyGrid | src/main/java/vorquel/mod/simpleskygrid/config/prototype/generation/PGeneric.java | 3996 | package vorquel.mod.simpleskygrid.config.prototype.generation;
import net.minecraft.block.Block;
import net.minecraft.init.Blocks;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraftforge.oredict.OreDictionary;
import vorquel.mod.simpleskygrid.config.SimpleSkyGridConfigReader;
imp... | mit |
vr-the-feedback/vr-the-feedback-unity | Assets/VRTheFeedback/Scripts/OggVorbisEncoder/Setup/Templates/BookBlocks/Stereo44/Coupled/Chapter9/Page5_0.cs | 872 | namespace OggVorbisEncoder.Setup.Templates.BookBlocks.Stereo44.Coupled.Chapter9
{
public class Page5_0 : IStaticCodeBook
{
public int Dimensions { get; } = 4;
public byte[] LengthList { get; } = {
1, 4, 4, 5, 7, 7, 6, 7, 7, 4, 7, 6, 9,10,10,10,
10, 9, 4, 6, 7, 9,10,10,10, 9,10,... | mit |
isysd/apistore | test/unit/controllers/CategoryController.test.js | 4386 | var request = require('supertest');
var should = require('should');
var REQUIRED_CATEGORY = "Bill Pay";
var mpath = '/category';
describe('CategoryController', function() {
describe('find()', function() {
it('Can find default list', function (done) {
request(sails.hooks.http.app)
.get(mpath)
.... | mit |
VincentTide/vincenttide | app/__init__.py | 706 | from flask import Flask
from flask.ext.sqlalchemy import SQLAlchemy
from flask.ext.login import LoginManager
from flask.ext.moment import Moment
from flask.ext.script import Manager
from flask.ext.migrate import Migrate, MigrateCommand
app = Flask(__name__)
app.config.from_object('config')
# Make sure we declare db ... | mit |
cameronhunter/glacier-cli | src/main/java/uk/co/cameronhunter/aws/glacier/actions/Upload.java | 2444 | package uk.co.cameronhunter.aws.glacier.actions;
import com.amazonaws.services.glacier.transfer.ArchiveTransferManager;
import com.amazonaws.services.glacier.transfer.UploadResult;
import org.apache.commons.lang.Validate;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.j... | mit |
HosseinChibane/CFPMS | var/cache/dev/twig/1c/1cf8ae9dcb7677f5a03f123ccbee932a540b154df999e8e5d5e3b05d8bfc7b69.php | 3506 | <?php
/* @EasyAdmin/default/field_float.html.twig */
class __TwigTemplate_ed68c5c81f73a7689211885813593f78d04915255b1162e4c169b418470ac099 extends Twig_Template
{
public function __construct(Twig_Environment $env)
{
parent::__construct($env);
$this->parent = false;
$this->blocks = arr... | mit |
marteserede/opensourcepos | application/views/giftcards/manage.php | 2609 | <?php $this->load->view("partial/header"); ?>
<script type="text/javascript">
$(document).ready(function()
{
init_table_sorting();
enable_select_all();
enable_checkboxes();
enable_row_selection();
enable_search({suggest_url: '<?php echo site_url("$controller_name/suggest")?>',
confirm_search_messs... | mit |
whuailin/dogdie | vendor/anomaly/streams-platform/migrations/core/2015_03_15_171506_create_applications_domains_table.php | 1150 | <?php
use Anomaly\Streams\Platform\Database\Migration\Migration;
use Illuminate\Database\Schema\Blueprint;
/**
* Class CreateApplicationsDomainsTable
*
* @link http://pyrocms.com/
* @author PyroCMS, Inc. <support@pyrocms.com>
* @author Ryan Thompson <ryan@pyrocms.com>
*/
class CreateApplicationsDomainsTable e... | mit |
DarthJonathan/GrandABEHotel | application/views/admin/location/add_location_view.php | 2457 | <?php defined('BASEPATH') OR exit('No direct script access allowed');?>
<script type="text/javascript">
tinymce.init({
selector:'#ta_locationDesc'
});
</script>
<div class="container">
<div class="col-lg-10 col-lg-offset-1">
<div class="col-lg-12 text-center">
<h3>Add Location</h3>
</div>
<?php echo form... | mit |
hoya0704/resortPrice | application/helpers/alert_helper.php | 1052 | <?php
defined('BASEPATH') OR exit('No direct script access allowed');
//메시지 출력 후 이동
function alert($msg='이동합니다.', $url = '')
{
$CI =& get_instance();
echo "<meta http-equiv = \"content-type\" content = \"text/html; charset = " .$CI->config->item('charset') . "\">";
echo "<script>
alert('".$msg."');
locati... | mit |
Karasiq/scalajs-highcharts | src/main/scala/com/highcharts/config/PlotOptionsVectorPathfinderStartMarker.scala | 5769 | /**
* Automatically generated file. Please do not edit.
* @author Highcharts Config Generator by Karasiq
* @see [[http://api.highcharts.com/highcharts]]
*/
package com.highcharts.config
import scalajs.js, js.`|`
import com.highcharts.CleanJsObject
import com.highcharts.HighchartsUtils._
/**
* @note JavaScri... | mit |
Karasiq/scalajs-highcharts | src/main/scala/com/highcharts/config/PlotOptionsSeriesMarkerStatesHover.scala | 6280 | /**
* Automatically generated file. Please do not edit.
* @author Highcharts Config Generator by Karasiq
* @see [[http://api.highcharts.com/highcharts]]
*/
package com.highcharts.config
import scalajs.js, js.`|`
import com.highcharts.CleanJsObject
import com.highcharts.HighchartsUtils._
/**
* @note JavaScri... | mit |
expectation-php/expectation | spec/Configurable.spec.php | 1046 | <?php
/**
* This file is part of expectation package.
*
* (c) Noritaka Horio <holy.shared.design@gmail.com>
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/
use Assert\Assertion;
use expectation\spec\fixture\FixtureExpectation;
describe('Confi... | mit |
junctiontech/dbho | application/views/propertylog.php | 10790 | <!-- page content -->
<div class="right_col" role="main">
<div class="">
<div class="page-title">
<div class="title_left">
<h3>Property Log</h3>
</div>
</div>
<div class="clearfix"></div>
<script type="text/javascript">
... | mit |
nice-shot/FacebookFilter | manage.py | 258 | #!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "facebook_filter.settings")
from django.core.management import execute_from_command_line
execute_from_command_line(sys.argv)
| mit |
r-portas/tv-shows-notifier | src/FileDownloader/FileDownloader.java | 1686 | package FileDownloader;
import java.io.File;
import java.net.URL;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.nio.file.StandardCopyOption;
import java.util.Enumeration;
import java.util.zip.ZipEntry;
import java.util.zip.ZipFile;
/**
*
* @author roy
*/
public class FileDownloader {
/**
... | mit |
carlgao/lenga | images/lenny64-peon/usr/share/python-support/python-subversion/libsvn/diff.py | 24293 | # This file was automatically generated by SWIG (http://www.swig.org).
# Version 1.3.36
#
# Don't modify this file, modify the SWIG interface instead.
# This file is compatible with both classic and new-style classes.
import _diff
import new
new_instancemethod = new.instancemethod
def _swig_setattr_nondynamic(self,cla... | mit |
coteries/react-native-navigation | android/app/src/main/java/com/reactnativenavigation/views/SideMenu.java | 6199 | package com.reactnativenavigation.views;
import android.content.Context;
import android.support.annotation.Nullable;
import android.support.v4.widget.DrawerLayout;
import android.view.Gravity;
import android.view.View;
import android.view.ViewGroup;
import android.widget.RelativeLayout;
import com.reactnativenavigati... | mit |
jonathanpoelen/falcon | test/string/concat.cpp | 645 | #include <test/test.hpp>
#include <string>
#include <falcon/cstring.hpp>
#include <falcon/string/concat.hpp>
#include "concat.hpp"
void concat_test()
{
char s[] = "i";
falcon::cstring cs(s);
falcon::const_cstring ccs2(cs);
std::string ret = falcon::concat(
std::string(),
falcon::const_cstring("plo"),
"p",
... | mit |
bfontaine/Teebr | teebr/admin.py | 851 | # -*- coding: UTF-8 -*-
# ref: https://github.com/mrjoes/flask-admin/blob/master/examples/peewee/app.py
from __future__ import absolute_import, unicode_literals
from flask.ext import admin
from flask.ext.admin.contrib.peewee import ModelView
from .models import Producer, Consumer, Status
# Note: no authentication ... | mit |
EnSoftCorp/AuditMon | com.ensoftcorp.open.auditmon/src/com/ensoftcorp/open/auditmon/charts/ObservedTimeAllocationsChart.java | 5246 | package com.ensoftcorp.open.auditmon.charts;
import java.awt.Font;
import java.util.HashMap;
import java.util.Map.Entry;
import java.util.TreeMap;
import org.jfree.chart.ChartFactory;
import org.jfree.chart.JFreeChart;
import org.jfree.chart.plot.PiePlot;
import org.jfree.data.general.DefaultPieDataset;
import org.jf... | mit |
YY030913/tg | packages/tagt-importer/package.js | 1957 | Package.describe({
name: 'tagt:importer',
version: '0.0.1',
summary: 'TAGT importer library',
git: ''
});
Package.onUse(function(api) {
api.use([
'ecmascript',
'templating',
'coffeescript',
'check',
'tagt:lib'
]);
api.use('tagt:logger', 'server');
api.use('templating', 'client');
//Import Framewor... | mit |
lasote/conan | conans/test/integration/symlinks_test.py | 5995 | import unittest
from conans.test.utils.tools import TestClient, TestServer
from conans.util.files import load, save
from conans.model.ref import PackageReference, ConanFileReference
import os
import platform
conanfile = """
from conans import ConanFile
from conans.util.files import save
import os
class HelloConan(Con... | mit |
alltiny/alltiny-chorus | chorus/src/main/java/org/alltiny/chorus/model/SongBean.java | 879 | package org.alltiny.chorus.model;
import org.alltiny.chorus.dom.Song;
import java.beans.PropertyChangeSupport;
import java.beans.PropertyChangeListener;
/**
* This class represents
*
* @author <a href="mailto:ralf.hergert.de@gmail.com">Ralf Hergert</a>
* @version 04.02.2009 21:34:42
*/
/*package-local*/class So... | mit |
Skiftet/php-speakout-api | src/Api/ResourceInterface.php | 1371 | <?php
namespace Skiftet\Speakout\Api;
use Skiftet\Speakout\Models\BaseModel;
/**
*
*/
interface ResourceInterface
{
/**
*
*/
public function subResourcePaths(): array;
/**
* @param BaseResource $resource
*/
public function registerSubResource(Bas... | mit |
he9qi/achievable | test/integration/navigation_test.rb | 84 | require 'test_helper'
class NavigationTest < ActiveSupport::IntegrationCase
end
| mit |
Faucetcoin/faucetcoin | src/qt/locale/bitcoin_bs.ts | 96851 | <?xml version="1.0" ?><!DOCTYPE TS><TS language="bs" version="2.0">
<defaultcodec>UTF-8</defaultcodec>
<context>
<name>AboutDialog</name>
<message>
<location filename="../forms/aboutdialog.ui" line="+14"/>
<source>About Faucetcoin</source>
<translation>O Faucetcoinu</translation>
</m... | mit |
francoishill/generator-aurelia-auth-go | generators/app/templates/Interface/Authentication/AuthenticationService.go | 286 | package Authentication
import (
. "github.com/francoishill/golang-common-ddd/Interface/Security/Authentication"
"net/http"
. "<%= OWN_GO_IMPORT_PATH %>/Entities/User"
)
type AuthenticationService interface {
BaseAuthenticationService
GetUserFromRequest(r *http.Request) User
}
| mit |
SashaSansay/nanabe-wp | wp-content/themes/naba/inc/ajax.php | 254 | <?php
add_action('wp_ajax_shares', 'inc_shares');
add_action('wp_ajax_nopriv_shares', 'inc_shares');
function inc_shares(){
$id = absint($_POST['post_id']);
$sc = get_shares($id);
$sc++;
update_post_meta($id,'naba_shares-count',$sc);
}
| mit |
maurer/tiamat | samples/Juliet/testcases/CWE789_Uncontrolled_Mem_Alloc/s01/CWE789_Uncontrolled_Mem_Alloc__malloc_char_connect_socket_83_bad.cpp | 4458 | /* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE789_Uncontrolled_Mem_Alloc__malloc_char_connect_socket_83_bad.cpp
Label Definition File: CWE789_Uncontrolled_Mem_Alloc__malloc.label.xml
Template File: sources-sinks-83_bad.tmpl.cpp
*/
/*
* @description
* CWE: 789 Uncontrolled Memory Allocation
* BadSource: co... | mit |
aakselrod/lnd | routing/chainview/interface_test.go | 27479 | package chainview
import (
"bytes"
"fmt"
"io/ioutil"
"math/rand"
"os"
"os/exec"
"path/filepath"
"runtime"
"testing"
"time"
"github.com/btcsuite/btcd/btcec"
"github.com/btcsuite/btcd/btcjson"
"github.com/btcsuite/btcd/chaincfg"
"github.com/btcsuite/btcd/chaincfg/chainhash"
"github.com/btcsuite/btcd/inte... | mit |
scratch2mcpi/scratch2mcpi | bullseye/scratch2mcpi.py | 11968 | #!/usr/bin/env python2
import sys
import os
import gettext
import scratch
import mcpi.minecraft as minecraft
import mcturtle.minecraftturtle as turtle
import mcstuff.minecraftstuff as stuff
import mcpi.block as block
import time
VERSION = "2.1.0"
localedir = os.path.join(os.path.dirname(__file__), 'locale')
_ = gette... | mit |
anselmobd/fo2 | src/manutencao/migrations/0002_fo2_tipo_maquina_loaddata.py | 709 | # -*- coding: utf-8 -*-
# Generated by Django 1.11.5 on 2018-11-23 18:57
from __future__ import unicode_literals
from django.db import migrations, models
def load_tipo_maquina_from_fixture(apps, schema_editor):
from django.core.management import call_command
call_command("loaddata", "0002_fo2_tipo_maquina_lo... | mit |
MoeOrganization/moe | src/main/scala/org/moe/runtime/builtins/ClassClass.scala | 1488 | package org.moe.runtime.builtins
import org.moe.runtime._
/**
* setup class Class
*/
object ClassClass {
def apply(r: MoeRuntime): Unit = {
val env = new MoeEnvironment(Some(r.getCorePackage.getEnv))
val classClass = r.getCoreClassFor("Class").getOrElse(
throw new MoeErrors.MoeStartupErro... | mit |
Condors/TunisiaMall | src/Condors/TnMallBundle/Entity/Panier.php | 1112 | <?php
namespace Condors\TnMallBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* Panier
*
* @ORM\Table(name="panier", indexes={@ORM\Index(name="id_client", columns={"id_client"})})
* @ORM\Entity
*/
class Panier
{
/**
* @var integer
*
* @ORM\Column(name="id_panier", type="i... | mit |
rkadyb/slack-ruby-client | spec/slack/real_time/event_handlers/bot_spec.rb | 1280 | require 'spec_helper'
RSpec.describe Slack::RealTime::Client, vcr: { cassette_name: 'web/rtm_start' } do
include_context 'connected client'
context 'bot' do
it 'sets bot data on rtm.start' do
expect(client.bots.count).to eq 16
end
it 'bot_added' do
expect do
event = Slack::RealTime... | mit |
colitman/ShoppingList-webapp | src/main/java/ua/romenskyi/webapp/shopping/domain/UniqueNamedEntityInterface.java | 303 | /**
* This software is licensed under the terms of the MIT license.
* Copyright (C) 2016 Dmytro Romenskyi
*/
package ua.romenskyi.webapp.shopping.domain;
/**
* @author dmytro.romenskyi - Jun 28, 2016
*
*/
public interface UniqueNamedEntityInterface extends NamedEntityInterface {
}
| mit |
torbjornvatn/powerline-shell | segments/kube.py | 408 | from subprocess import Popen, PIPE
from shlex import split
def add_kube_segment(powerline):
try:
cmd = "kubectl config view -o=jsonpath={.current-context} | sed -e 's/gke_uc-prox-//g;s/_europe-west1-b_/-/g' | tr -d '\n' "
output = Popen("%s " % cmd, stdout=PIPE, shell=True).communicate()[0]
ex... | mit |
lionfire/Core | src/LionFire.Info/Info/HierarchicalTags/HierarchicalTagNode.cs | 2783 | using LionFire.FlexObjects;
using LionFire.Referencing;
using System.Collections.Concurrent;
namespace LionFire.Info
{
//public interface INamedNode
//{
// INamedNode? Parent { get; set; }
//}
public class HierarchicalNamedNodeBase<TConcrete>
where TConcrete : HierarchicalNamedNodeBase... | mit |
valorin/pinpusher | tests/Pin/Layout/WeatherTest.php | 681 | <?php
namespace tests\Pin\Layout;
use Valorin\PinPusher\Pin\Icon;
use Valorin\PinPusher\Pin\Layout\Weather;
class WeatherTest extends \PHPUnit_Framework_TestCase
{
public function test_defaults()
{
$generated = (new Weather('weather title', Icon::SUNRISE, Icon::SUNSET, 'location name'))
->... | mit |
ur92/ng-bitwise-enum | bitwiseEnum.module.js | 110 | (function () {
'use strict';
angular.module('optiApp.services.bitwise-enum', [
]);
})(); | mit |
CodeLiftSleep/Electron-GoalLineStand-Football | app/main.js | 526 | const electron = require('electron');
//const {app, BrowserWindow} = electron;
const app = electron.app;
const BrowserWindow = electron.BrowserWindow;
var mainWindow = null;
app.on('window-all-closed', function() {
if (process.platform != 'darwin')
app.quit();
});
app.on('ready', function() {
mainWindow ... | mit |
DJCordhose/javascript-einfuehrung | coding-sessions/wjax2015/src/util.js | 266 | export function displayInPage(text) {
if (typeof text !== 'string') {
text = JSON.stringify(text);
}
if (typeof document !== 'undefined') {
return document.body.innerHTML += `${text}<br>`;
} else {
console.log(text);
}
}
| mit |
freeman-lab/station | station/__init__.py | 84 | from .station import (start, stop, engine, mode, credentials)
__version__ = '2.0.0' | mit |
orgasmicnightmare/cakephp-seo | src/Model/Behavior/SeoBehavior.php | 12246 | <?php
namespace Seo\Model\Behavior;
use ArrayObject;
use Cake\Event\Event;
use Cake\I18n\I18n;
use Cake\ORM\Behavior;
use Cake\ORM\Entity;
use Cake\ORM\Table;
use Cake\ORM\TableRegistry;
use Cake\Routing\Router;
use Cake\Utility\Inflector;
/**
* Seo behavior
*/
class SeoBehavior extends Behavior
{
use \Seo\Mod... | mit |
github/codeql | javascript/ql/test/library-tests/Expr/legacyletexpr.js | 41 | console.log(let (x = 23, y = 19) x + y);
| mit |
Dynatrace/superdump | src/SuperDumpService/Services/Analyzers/AnalyzerJob.cs | 1729 | using System.Collections.Generic;
using System.IO;
using System.Threading.Tasks;
using SuperDumpService.Models;
namespace SuperDumpService.Services.Analyzers {
public enum AnalyzerState {
/// <summary>
/// No Further Analyzers should be executed.
/// </summary>
Cancelled,
/// <summary>
/// A primary dum... | mit |
MontyThibault/Force-Sensor-Integration | MayaIntegration/SixAxis.py | 2895 | from ctypes import *
import maya.cmds as cmds
import Calibration as C
import unittest
class SixAxis(object):
def __init__(self, device, channels, name, load = True):
""" Maps a single six-axis sensor to a Maya transform
Device: An instance of PAIO.AIODevice()
Channels: The channel indicies for the sensor in th... | mit |
peachyang/py_website | sql.php | 555 | <?php
/*
* cms_block
* cms_block_language
* cms_category
* cms_category_language
* cms_category_page
* cms_page
* cms_page_language
* core_config
* eav_attribute
* eav_attribute_label
* eav_attribute_group
* eav_attribute_group_label
* eav_attribute_option
* eav_attribute_option_label
* e... | mit |
motherjones/datawrapper | lib/utils/chart_content.php | 9582 | <?php
function get_chart_content($chart, $user, $published = false, $debug = false) {
$theme_css = array();
$theme_js = array();
$protocol = !empty($_SERVER['HTTPS']) ? "https" : "http";
$next_theme_id = $chart->getTheme();
$locale = DatawrapperSession::getLanguage();
while (!empty($next_the... | mit |
warehouseman/pkgd-todos | packages/todos-pkg/client/todos-pkg.js | 1949 | Meteor.subscribe("tasks");
Template.todos.helpers({
tasks: function () {
if (Session.get("hideCompleted")) {
// If hide completed is checked, filter tasks
return Tasks.find({checked: {$ne: true}}, {sort: {createdAt: -1}});
} else {
// Otherwise, return all of the tasks
r... | mit |
ppot14/chinchilla | src/main/java/com/chinchilla/persistence/dao/ElectricidadDAO.java | 1054 | package com.chinchilla.persistence.dao;
import com.chinchilla.persistence.MyBatisDAO;
import com.chinchilla.persistence.objects.Electricidad;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.IOException;
import org.springframework.stereotype.Repository;
/**
* Simple example DAO which uses the ... | mit |
thomasfrei/Nova | Library/Nova/Http/Request.php | 4843 | <?php
/**
* Nova - PHP 5 Framework
*
* @package Http
* @author Thomas Frei <thomast.frei@gmail.com>
* @copyright 2013 Thomas Frei
* @license https://github.com/thomasfrei/Nova/blob/master/License.txt
* @link https://github.com/thomasfrei/Nova
*/
Namespace Nova\Http;
use Nova\Http\Abstra... | mit |
praktijkindex/ransack | spec/ransack/predicate_spec.rb | 4826 | require 'spec_helper'
module Ransack
describe Predicate do
before do
@s = Search.new(Person)
end
shared_examples 'wildcard escaping' do |method, regexp|
it 'automatically converts integers to strings' do
subject.parent_id_cont = 1
expect { subject.result }.to_not raise_error... | mit |
fr43nk/vscode-clearcase | src/ccIgnoreHandler.ts | 3239 | import { workspace, WorkspaceFolder, Uri, EventEmitter } from "vscode";
import { existsSync, readFileSync, statSync } from "fs";
import { join, dirname, sep } from "path";
import ignore from "ignore";
import { Model, ModelHandler } from "./model";
export class IgnoreHandler {
private fileIgnores: FileIgnore[];
pri... | mit |
wappulehti-apy/diilikone-api | autoapp.py | 55 | from diilikone import Application
app = Application()
| mit |
ronency/ajaxDebounce | jquery.ajaxDebounce.js | 1568 | (function ($) {
var count = 0;
var lastFetchId = 0,
timeoutActive,
defaults = {
delay: 250,
};
$.ajaxDebounce = function( options ) {
var settings = $.extend(defaults, options );
var doAjax = function(ajaxOptions){
var currentFetchId = new Date().getTime();
timeoutActive = n... | mit |
tcdl/msb-java | core/src/main/java/io/github/tcdl/msb/threading/ConsumerExecutorFactoryImpl.java | 1190 | package io.github.tcdl.msb.threading;
import org.apache.commons.lang3.concurrent.BasicThreadFactory;
import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.Thre... | mit |