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 |
|---|---|---|---|---|---|---|---|---|
691b4a20b519a8af8c3656fa17fdad28c8794590a543ed1870e9aee04472ee96 | package graphics.basicShapes;
import graphics.genMath.Math3D;
import graphics.geoShapes.GeoLine;
import java.util.ArrayList;
public class Vector3D extends Point3D {
private double zen;
private double azi;
public Vector3D() {
}
public Vector3D(double x, double y, double z) {
super(x, y, z);
}
public Vect... | Java | NaturalLanguageProcessing/src/graphics/basicShapes/Vector3D.java | dfcf93/RPICS | mit | 2,402 | 102 | codeparrot/github-code |
16b5473d6a9f0339bb7f94931dfa83c029fd804885f506e7efe784f11b9ca088 | <!doctype html>
<!--[if lt IE 7]><html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en"> <![endif]-->
<!--[if (IE 7)&!(IEMobile)]><html class="no-js lt-ie9 lt-ie8" lang="en"><![endif]-->
<!--[if (IE 8)&!(IEMobile)]><html class="no-js lt-ie9" lang="en"><![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en"><!--<!... | HTML | _layouts/map.html | veswill3/VesperAndLaura-website | mit | 2,269 | 51 | codeparrot/github-code |
43f9c8b34693427c1fac420052a43b570266e1da9246267d4da93b7813fc1fa8 | <?php
/**
* The template for displaying the header
*
* Displays all of the head element and everything up until the "container" div.
*
* @package WordPress
* @subpackage FoundationPress
* @since FoundationPress 1.0.0
*/
?>
<!doctype html>
<html class="no-js" <?php language_attributes(); ?> >
<head>
<meta ch... | PHP | header.php | fabianrios/blueprint | mit | 2,631 | 61 | codeparrot/github-code |
6bf12b07b2e07e1cf759298830278aef05185a059e159685e1ed2e9dcbb9ebf9 | <?php
namespace Lassi\App;
use Slim\Slim;
use Lassi\Lassi;
/**
* Base Controller
*
* @author Jabran Rafique <hello@jabran.me>
* @license MIT License
*/
class Controller
{
/**
* @var Lassi
*/
private $lassi;
/**
* @var Slim
*/
private $app;
/**
* Controller construc... | PHP | Lassi/App/Controller.php | jabranr/lassi | mit | 1,971 | 116 | codeparrot/github-code |
c0804c0b59f2cec1ad610bc9f78e59acbdb337f1fb30f93fdfe618038280a6f5 | package com.swfarm.biz.warehouse.web;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.commons.lang.StringUtils;
import org.springframework.web.servlet.ModelAndView;
import ... | Java | pms/src/main/java/com/swfarm/biz/warehouse/web/EnterTransferStockKeepingUnitsController.java | zhangqiang110/my4j | mit | 2,647 | 71 | codeparrot/github-code |
f96f1b80b14a5c7ff454840c46150723265b212812897787aa1da67d52957bf7 | <?php
/*
* This file is part of the symfony package.
* (c) Fabien Potencier <fabien.potencier@symfony-project.com>
* (c) Jonathan H. Wage <jonwage@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
require_once(dirname(__... | PHP | lib/plugins/sfDoctrinePlugin/lib/task/sfDoctrineBuildSqlTask.class.php | nationalfield/symfony | mit | 1,959 | 67 | codeparrot/github-code |
8c41aa8fd5271ce1fa380b9b083e1159f85a75c60f8f52f80dc86a9f7f409319 | /**
* Created by hbzhang on 8/7/15.
*/
'use strict';
/**
* Module dependencies.
*/
var mongoose = require('mongoose'),
Widget = mongoose.model('Widget'),
Upload = mongoose.model('Upload'),
_ = require('lodash'),
grid = require('gridfs-stream');
/**
* Find widget by id
*/
exports.widget = functi... | JavaScript | me/packages/custom/admin/server/controllers/main/adminwidget.js | hbzhang/me | mit | 2,577 | 111 | codeparrot/github-code |
ca2562eb5fe8e192f490ad9383b62329bc916b0c72322de64b66cb301054816b | package main
// Heavily inspired by https://github.com/btcsuite/btcd/blob/master/version.go
import (
"bytes"
"fmt"
"strings"
)
// semanticAlphabet
const semanticAlphabet = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-"
// These constants define the application version and follow the semantic
/... | GO | version.go | BitfuryLightning/lnd | mit | 2,372 | 71 | codeparrot/github-code |
47cdab13e2934b73b2a72fdb04178cb7f610211e778c53f15e8a79a6f6a4f5f5 | const sensor = require('node-dht-sensor');
const logger = require('../logging/Logger');
/**
* Reads pin 4 of the raspberry PI to obtain temperature and humidity information.
* @return {Promise} A promise that will resolve with the results. In the
* case where there was an error reading, will return a zero filled ob... | JavaScript | src/sensor/HumidTemp.js | malbanese/hydroponic-monitoring-system | mit | 943 | 31 | codeparrot/github-code |
570247cfc42d4cecaf9ed73b465afdc2b9488c483fbbec1ac1ccc8e3888fd0bd | /******************************************************************************
* Copyright (C) 2014-2020 Zhifeng Gong <gozfree@163.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... | C | gear-lib/librtmpc/flv_mux.c | gozfree/libraries | mit | 17,065 | 589 | codeparrot/github-code |
623512ef90944648c19ecf3a0dd7993ef6c03d7f3607501790f967b842d85f32 | /**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @emails oncall+relay
* @flow
* @format
*/
// flowlint ambiguous-object-type:error
'use strict';
const React = require('reac... | JavaScript | packages/react-relay/relay-hooks/__tests__/useBlockingPaginationFragment-with-suspense-transition-test.js | atxwebs/relay | mit | 37,656 | 1,294 | codeparrot/github-code |
d8287ff207eabdb0e101f8d6bfc6162ed8300295f575098e6a09804f08fedc88 | /****************************************************************
Evaluate the value of an arithmetic expression in Reverse Polish Notation.
Valid operators are +, -, *, /. Each operand may be an integer or another expression.
Some examples:
["2", "1", "+", "3", "*"] -> ((2 + 1) * 3) -> 9
["4", "13", "5", "/", "+"]... | C++ | 150_EvaluateReversePolishNotation.cpp | kun2012/LeetCode | mit | 1,589 | 46 | codeparrot/github-code |
8b60227fc79d72f16be7e8f0ef01dd70bf5b27b54b79c4941b9fc15f12d807c4 | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<title>Clean Blog - Sample Post</title... | HTML | post.html | themattwilliams/cloudflare | mit | 10,286 | 193 | codeparrot/github-code |
d4688a704a0a81d85a776cd50434864599a36102a63ffdb87e2f9ae6e03e7d6d | <?php
namespace GeekCache\Cache;
use GeekCache\Tag\TagSet;
class TaggedFreshnessPolicy extends AbstractFreshnessPolicy
{
const POLICY_NAMESPACE = 'tg';
private $tagset;
public function __construct(TagSet $tagset)
{
$this->tagset = $tagset;
}
public function computeTtl($ttl)
{
... | PHP | src/Cache/TaggedFreshnessPolicy.php | karptonite/geekcache | mit | 651 | 31 | codeparrot/github-code |
86924d6a296c03d583df93a411f4aa4679c3097706f341300a07b2e87a319fb2 | #include "Application.h"
#include "Globals.h"
#include "ModuleEditor.h"
#include "ModuleWindow.h"
#include "ModuleGOManager.h"
#include "ModuleFileSystem.h"
#include "ModuleRenderer3D.h"
#include "FileParser.h"
#include "UI_Panel.h"
#include "UI_Conf.h"
#include "UI_Console.h"
#include "UI_Hierarchy.h"
#include "UI_In... | C++ | JayEngine/Jay_Engine/ModuleEditor.cpp | Josef212/JayEngine | mit | 14,678 | 580 | codeparrot/github-code |
289fc9c74b44e7e8832e56e3257ed3f97f2b314dc2b2af7c66a1b229079dcf09 | // Base Grab Attach|GrabAttachMechanics|50010
namespace VRTK.GrabAttachMechanics
{
using UnityEngine;
/// <summary>
/// The Base Grab Attach script is an abstract class that all grab attach script inherit.
/// </summary>
/// <remarks>
/// As this is an abstract class, it cannot be app... | C# | apocalypse/Assets/VRTK/Scripts/Interactions/GrabAttachMechanics/VRTK_BaseGrabAttach.cs | sgware/CSCI4675-SP2017 | mit | 12,904 | 275 | codeparrot/github-code |
3997e48cd1f47048dd40ec297c669889b02b35e1930440eec3bb7ce530ab8776 | /*requires core.js*/
/*requires load.js*/
/*requires ajax.js*/
/*requires dom.js*/
/*requires selector.js*/
/*requires ua.js*/
/*requires event.js*/
/*requires ui.js*/
/*requires ui.tab.js*/
/*requires ui.slide.js*/
/*requires ui.nav.js*/
/**
* nova.ui.flow
* 在页面中四处飘浮的广告
* 遇到边界则改变飘浮方向
* @param number width element&... | JavaScript | src/ui/ui.flow.js | qiushilee/frostnova | mit | 2,179 | 115 | codeparrot/github-code |
dd3b4a07a0a92b20dd7e1da7b31725100d251e36eeee4063b83d34556404b929 | <?php
/*
* This file is part of the Sonata project.
*
* (c) Thomas Rabaix <thomas.rabaix@sonata-project.org>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Sonata\Composer\Command;
use Sonata\Composer\JUnit\JUnitMerger;
use ... | PHP | src/Sonata/Composer/Command/MergeJUnitCommand.php | sonata-project/composer-archive-creator | mit | 2,098 | 68 | codeparrot/github-code |
33476e2cf3d327dcb894644a45c0dbbf4e834fc3fae8d5ba9d99da09d5bb9e82 | package force
import (
"bytes"
"fmt"
"io"
"io/ioutil"
"net/http"
"net/url"
"github.com/nimajalali/go-force/forcejson"
)
const (
version = "1.0.0"
userAgent = "go-force/" + version
contentType = "application/json"
responseType = "application/json"
)
// Get issues a GET to the specified path with ... | GO | force/client.go | sarahyablok/go-force | mit | 5,025 | 168 | codeparrot/github-code |
d99f7038553bfd19115b63fb4766ce7ee7f08a5ab768b189c01d3c6e3ca940bd | $(document).ready(function () {
$('#userData').hide();
$('#topScores').show();
// enchanced method addEventListener
function addEventListener(selector, eventType, listener) {
$(selector).on(eventType, listener);
}
function trigerClick($button) {
$button.click();
}
va... | JavaScript | HTML and CSS/JS/04.JS Applications/02.WebStorages/js/ramsAndSheeps.js | Steffkn/TelerikAcademy | mit | 6,640 | 204 | codeparrot/github-code |
489f93c272747d9b2776d890762ceedc010ec92842d76b8dac205177d068c35c | package org.instantlogic.engine.message;
import org.instantlogic.engine.presence.Presence;
import org.instantlogic.engine.presence.Traveler;
import org.instantlogic.fabric.Instance;
import org.instantlogic.interaction.Application;
import org.instantlogic.interaction.util.FlowContext;
import org.instantlogic.interactio... | Java | webapps/presence/src/main/java/org/instantlogic/engine/message/StartMessage.java | johan-gorter/Instantlogic | mit | 1,815 | 47 | codeparrot/github-code |
856ecf5d01ed0f0b370c6b5dbfb88a7532df0c0fa0c3891d3f41eab8dde3b4ea | /*
* This file is part of Sponge, licensed under the MIT License (MIT).
*
* Copyright (c) SpongePowered <https://www.spongepowered.org>
* Copyright (c) contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Softwar... | Java | src/main/java/org/spongepowered/common/event/tracking/phase/generation/GenerationContext.java | Grinch/SpongeCommon | mit | 2,680 | 76 | codeparrot/github-code |
0e7576c94c97ac90bfbf760e2542352532ae5313d2c9326585b086c69597c150 | #include <stdio.h>
#include <math.h>
#include <algorithm>
#include "inter.h"
#include "fortune_weighted_points/geom/distance.h"
#include "fortune_weighted_points/diagram/wsite.h"
#include "common/floating_point.h"
Inter::Inter(){}
Inter::Inter(Boundary _Cqr,Boundary _Crs,double x,double y) : Point(x,y){
this->... | C++ | fortune_weighted_points/algorithm/inter.cpp | matheusdallrosa/voronoi-diagram-construction | mit | 3,061 | 86 | codeparrot/github-code |
c7e4c1fa278e0cee74818a35746ece40da07e5b42c42da6951781486fc73a279 | using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class SimpleBullet : Bullet {
public override void UpdatePosition() {
// Calculating the travelled distance since the last frame
Vector3 newMovement = new Vector3(
Time.deltaTime * BulletSpeed.x,
... | C# | Assets/Scripts/Bullet/SimpleBullet.cs | undebutant/shmup-jin | mit | 1,131 | 37 | codeparrot/github-code |
6a2c074bfb209292e7c051469cb767b6c6d41bc68f17c3b6fd2dd3b0a06b495a | /**
* process_sqlite.js
*/
var fs = require('fs-extra')
var debug = require('debug')('hostview')
var async = require('async')
var sqlite = require('sqlite3')
var utils = require('./utils')
/**
* Process a single sqlite file from Hostview.
*
* We assume that each sqlite file corresponds to a 'session' and
* al... | JavaScript | app/lib/process_sqlite.js | inria-muse/hostview-processing | mit | 29,384 | 898 | codeparrot/github-code |
9632d18cb077dadece2468e0880c9cc3d1d09f7d8eda120e5b931e7ec2001eda | #include <CQPixmapBgButton.h>
#include <CQPixmapEd.h>
#include <CQPixmapColorTip.h>
#include <CQToolTip.h>
#include <CQUtil.h>
#include <QPainter>
class CQPixmapBgButtonTip : public CQToolTipIFace {
public:
CQPixmapBgButtonTip(CQPixmapBgButton *button) :
button_(button), tip_(0) {
}
~CQPixmapBgButtonTip() {... | C++ | src/CQPixmapBgButton.cpp | colinw7/CQPixmapEd | mit | 2,559 | 145 | codeparrot/github-code |
d8bc7c1112a28d1d8252012c46b8c1121be972a67d5c2b26374fa502c7e6543b | <?php
namespace DvsaCommonTest\Input\AuthorisedExaminerPrincipal;
use DvsaCommonTest\TestUtils\XMock;
use Zend\Validator\NotEmpty;
use DvsaCommon\Input\AuthorisedExaminerPrincipal\TownInput;
use Zend\Validator\StringLength;
class TownInputTest extends AepInput
{
/** @var TownInput */
private $input;
pr... | PHP | mot-common-web-module/test/DvsaCommonTest/Input/AuthorisedExaminerPrincipal/TownInputTest.php | dvsa/mot | mit | 2,200 | 84 | codeparrot/github-code |
5a880c0c774710b3bb2a8101e0b26629c3194ceb4933d3ab3b15ab0c731438ae | # -*- coding: utf-8 -*-
from django.db import models
from datetime import datetime
class Place(models.Model):
"""
Holder object for basic info about the rooms
in the university.
"""
room_place = models.CharField(max_length=255)
floor = models.IntegerField()
def __unicode__(self):
... | Python | schedule/models.py | DeltaEpsilon-HackFMI2/FMICalendar-REST | mit | 4,584 | 148 | codeparrot/github-code |
a8e260d8cedf2b14ca63c19c2a821878af5887a7275f6db6cd530248c3af0383 | define(['jquery', 'pubsub'], function($, pubsub) {
function AudioPlayer(audio){
this.audio = audio;
this._initSubscribe();
this.startPos = 0;
this.endPos = 0;
this.loopEnabled = false;
}
AudioPlayer.prototype._initSubscribe = function() {
var self = this;
$.subscribe("AudioCursor-clickedAudio", functi... | JavaScript | modules/Audio/src/AudioPlayer.js | dmmz/LeadsheetJS | mit | 1,676 | 63 | codeparrot/github-code |
fac6212e3e98b34686f8962c0f0bb5ce3a5ed616713daf2940d74f3976994786 | /// <reference path="../globals.d.ts" />
import { expect } from "chai";
import "es6-symbol/implement";
import {
Container, injectable, inject,
named, tagged, multiInject,
unmanaged, optional
} from "../../src/inversify";
describe("Property Injection", () => {
it("Should be able to inject a property",... | TypeScript | test/features/property_injection.test.ts | Dirrk/InversifyJS | mit | 11,998 | 444 | codeparrot/github-code |
1a0551a8eaad4e2502b3a1c9bfaac0fe7104b4aa16d69d2bac34d9d162661681 |
from cherrydo.utils import is_cherrydo_project
class CherryDoException(Exception):
pass
class BaseGenerator(object):
def __init__(self, name, params):
self.name = name
self.params = params
def formatted_name(self):
return self.name.replace('_', ' ').title().replace(' ', '')
... | Python | cherrydo/common.py | mihail-ivanov/cherrydo | mit | 619 | 31 | codeparrot/github-code |
6bd2c9245842923666f51e90d2d7c3520cb7a5a70d6168fe7f7dfa0616198d79 | <?php defined('BASEPATH') OR exit('No direct script access allowed');
class Auth_Controller extends CI_Controller {
function __construct()
{
parent::__construct();
$this->load->database();
$this->load->library('ion_auth');
$this->load->library('form_validation');
$this->load->helper('url'... | PHP | application/backend/controllers/auth_controller.php | radumargina/punctweb_cms | mit | 25,467 | 776 | codeparrot/github-code |
760b9f8eb187ff98b33c06d85eccaca9fb36a7023334b0965fbfcb7a0ecef4c8 | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>metacoq-erasure: Not compatible 👼</title>
<link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" />
<link href="../../../../../bootstrap... | HTML | clean/Linux-x86_64-4.03.0-2.0.5/released/8.8.0/metacoq-erasure/1.0~alpha1+8.8.html | coq-bench/coq-bench.github.io | mit | 8,181 | 189 | codeparrot/github-code |
78172b38dd0816424dc8a54eb84471239683ea3c36a8b79a44acea917f6f7534 | <?php
namespace Flash\Bundle\DefaultBundle\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method;
/**
* @Route("/image")
*/
class ImageController extends \Symfony\Bundle\FrameworkBundle\Controller\Controller {
/**
* @Route("/{a... | PHP | src/Flash/Bundle/DefaultBundle/Controller/ImageController.php | moonlight2/stuff | mit | 8,378 | 247 | codeparrot/github-code |
eefa5fc68ab87041e9daa10b778768b5bc36048ef73f54e391899655cc586019 | // Copyright 2016 The Gogs Authors. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
package models
import (
"errors"
"fmt"
"strings"
)
const ownerTeamName = "Owners"
// Team represents a organization team.
type Team struct {
ID ... | GO | models/org_team.go | willemvd/gitea | mit | 14,531 | 626 | codeparrot/github-code |
ad87135f4e40e4040cdecfc43a6b85a2d2f48d1dacf778f2fb6b03ad553b0991 |
/* this ALWAYS GENERATED file contains the definitions for the interfaces */
/* File created by MIDL compiler version 6.00.0366 */
/* Compiler settings for mimeinfo.idl:
Oicf, W1, Zp8, env=Win32 (32b run)
protocol : dce , ms_ext, c_ext
error checks: allocation ref bounds_check enum stub_data
VC __... | C | ThirdParty/Microsoft/Visual Studio 8/VC/PlatformSDK/Include/MimeInfo.h | baSSiLL/dotnetinstaller | mit | 5,002 | 204 | codeparrot/github-code |
4c3e5eb73c82c6b3af520c4e1565e5bef2d747624cbe243f13ad6106ee1ddbcf | (function( $ ) {
'use strict';
var that;
var fgj2wp = {
plugin_id: 'fgj2wp',
fatal_error: '',
/**
* Manage the behaviour of the Skip Media checkbox
*/
hide_unhide_media: function() {
$("#media_import_box").toggle(!$("#skip_media").is(':checked'));
},
/**
... | JavaScript | www/wordpress/wp-content/plugins/fg-joomla-to-wordpress/admin/js/fg-joomla-to-wordpress-admin.js | Magnition/innova-partnerships | mit | 10,268 | 388 | codeparrot/github-code |
e60f41a633ad5447cceceea528c868ba69df0170c08de8d6dcfe15179197a523 | #pragma once
#ifndef Allocator_$A8F38098_1E72_4B5E_9D8D_0D1FCFF0DC93
#define Allocator_$A8F38098_1E72_4B5E_9D8D_0D1FCFF0DC93 1
#include "KTL.Memory.New.h"
#include "KTL.Memory.h"
#include "KTL.Functional.Function.h"
namespace ktl
{
inline namespace memory
{
template<typename _Type>
class alloc... | C | Ring0/KTL/KTL.Memory.Allocator.h | MeeSong/MBox | mit | 9,375 | 334 | codeparrot/github-code |
c7998ea0dd514bd0ac31fd6834b2f226d20c2783757d13acacb70d70da448c2d | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>mathcomp-field-extra: Not compatible</title>
<link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" />
<link href="../../../../../bootstr... | HTML | clean/Linux-x86_64-4.11.1-2.0.7/released/8.12.1/mathcomp-field-extra/1.6.1.html | coq-bench/coq-bench.github.io | mit | 7,597 | 162 | codeparrot/github-code |
bfa31491b7f1fb3c7c643edafedaa1dfabc36ffb6a211d09de88b857d9e42edf | $(function()
{
$("#content").focus(function()
{
$(this).animate({"height": "85px",}, "fast" );
$("#button_block").slideDown("fast");
return false;
});
$("#cancel").click(function()
{
$("#content").animate({"height": "30px",}, "fast" );
$("#button_block").slideUp("fast");
return false;
});
function dragDrop(drag,i,j... | JavaScript | js/main.js | DarioMundjar/dashpool | mit | 3,272 | 157 | codeparrot/github-code |
08a9c9f10af13d1276b945195200588e4fe735353efaf47cd9707095680fcead | <html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>generic::raw_protocol::endpoint</title>
<link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
<link rel="home" href="../../../boost_... | HTML | deps/boost/doc/html/boost_asio/reference/generic__raw_protocol/endpoint.html | laborautonomo/poedit | mit | 13,904 | 345 | codeparrot/github-code |
ab6909d2ebc1634afea541085c6167ea030ff47f6464f97be9428375a5fcc6cc | #pragma once
#include <GL\glew.h>
#include <glm/gtc/type_ptr.hpp>
class LeapData
{
public:
inline LeapData(){};
inline ~LeapData(){};
LeapData* ptr = this;
glm::vec3 palmPosition = glm::vec3(0.0f, 0.0f, 0.0f);
glm::vec3 tempPalmPosition = glm::vec3(0.0f, 0.0f, 0.0f);
glm::vec3 palmNormal = glm::vec3(0.0f... | C | LeapData.h | lshoek/cellstroll-vr | mit | 781 | 31 | codeparrot/github-code |
fb6a74752c33da95e21340bcd7f3e8a954713e9cae69b53a4523caeb4079e258 | <!DOCTYPE html >
<html>
<head>
<link rel="stylesheet" href="demos.css" type="text/css" media="screen" />
<script src="../libraries/RGraph.common.core.js" ></script>
<script src="../libraries/RGraph.line.js" ></script>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></... | HTML | public/lib/RGraph/demos/line-transparency.html | a95thurow/COEEventTracker | mit | 3,598 | 78 | codeparrot/github-code |
5d1a0c3be8bb3510b6733b5db37c21dd6cdfba23ba8c69e8facd700c9d7d6e5c | # encoding: utf-8
require_relative "base"
module Smartdown
module Model
module Answer
class Money < Base
FORMAT_REGEX = /^£?\W*([\d|,|]+[\.]?[\d]*)$/
def value_type
::Float
end
def to_s
('%.2f' % value).chomp('.00')
end
def humanize
... | Ruby | lib/smartdown/model/answer/money.rb | ministryofjustice/smartdown | mit | 1,205 | 57 | codeparrot/github-code |
416ee06bb6039f0bb2f7907374e27dd8cdca203ad08eadcbaa1cbe51e016ef4c | <!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
<!--[if lte IE 9]><meta http-equiv="refresh" content="0;url=/ie.html"><![endif]-->
<title>JA... | HTML | _site/java/2014/10/02/java-enum.html | tinykong/tinykong.github.io | mit | 6,808 | 157 | codeparrot/github-code |
c1a309d7a7d9aaed8b9e56a896a1810b673d85f5de1fa51e06b53efc9269ad86 | using System.Collections.Generic;
using System.Text.RegularExpressions;
namespace Microsoft.Recognizers.Text.DateTime
{
public class FormatUtil
{
public static readonly Regex HourTimexRegex = new Regex(@"(?<!P)T\d{2}");
public static string LuisDate(int year, int month, int day)
{... | C# | .NET/Microsoft.Recognizers.Text.DateTime/Utilities/FormatUtil.cs | rubio41/Recognizers-Text | mit | 3,472 | 108 | codeparrot/github-code |
616c5d93e5cc4aa33a818f90047a1a8948f8597de8d7431fe505388123997a16 | <?php
namespace Gietos\Dadata\Service;
use Gietos\Dadata\AbstractService;
use Gietos\Dadata\Model\Response\Clean\AddressCollection;
use Gietos\Dadata\Model\Response\Clean\NameCollection;
use Gietos\Dadata\Model\Response\Error;
class Clean extends AbstractService
{
protected function getBaseUri(): string
{
... | PHP | src/Service/Clean.php | gietos/dadata | mit | 1,557 | 69 | codeparrot/github-code |
3ebba76501cf7ef50828f87f81337e5ccff29a57d5bb9f09240f52342003a27c | // -*- Mode: JavaScript; tab-width: 2; indent-tabs-mode: nil; -*-
// vim:set ft=javascript ts=2 sw=2 sts=2 cindent:
require('./lib/webfont');
//jquery
var $ = require('jquery');
var Util = (function(window, undefined) {
var fontLoadTimeout = 5000; // 5 seconds
var monthNames = ['Jan', 'Feb', 'Mar', 'Apr', '... | JavaScript | js/src/util.js | Edilmo/brat-widget | mit | 21,591 | 649 | codeparrot/github-code |
8004a1692ba7b09d5cd6b0f36538d88e033255d9d9cdf986f4f3c1ff9273a536 | <?php
namespace Phpbr\AppBundle\Entity;
use FOS\UserBundle\Model\User as BaseUser;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\ORM\Mapping as ORM;
/**
* User
*/
class User extends BaseUser
{
/**
* @var integer
*/
protected $id;
/**
* @var string
*/
protected $... | PHP | php-br/src/Phpbr/AppBundle/Entity/User.php | php-br-org/php-br | mit | 6,311 | 364 | codeparrot/github-code |
44b4d3ee1a751c329856a4538b88219c5857a098cf8eb0c30206a8275ebbfa3d | require 'json'
require 'rapgenius'
require 'pry'
class RapperData
def self.get name
@songs = get_songs(name)
if @songs.any?
@lyrics = fetch_lyrics @songs
{
name: @songs.first.artist.name,
url: @songs.first.artist.url,
rating: self.rating(@lyrics)
}
end
end
... | Ruby | rapper_data.rb | atleastimtrying/rap_misogyny | mit | 1,100 | 48 | codeparrot/github-code |
c3fb8bca378b34ca20c3057897451e2f08cba9d440b64c34676e71ea9099dc68 | <?php
namespace VintageWest\AdminBundle\Controller;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Sensio\Bundle\FrameworkExtraBundle\Co... | PHP | src/VintageWest/AdminBundle/Controller/TypeBlockController.php | thomaschvt/vw-project | mit | 6,831 | 248 | codeparrot/github-code |
2cce7347a438955119c3850e4a46d860d5855eb24687274629e13f93317c6b0d | const assert = require("assert");
describe("chain of iterators", function() {
it("should conform to ES", function() {
let finallyCalledSrc = 0;
let finallyCalled1 = 0;
let finallyCalled2 = 0;
let cb;
let p1 = new Promise(i => (cb = i));
let tasks = [];
let cbtask;
let p2 = {
the... | JavaScript | packages/es/test/samples/src/asyncGeneratorsTest.js | awto/effectfuljs | mit | 1,934 | 86 | codeparrot/github-code |
f3abc4ee910d988d54680ac29deb82260b3e3c87649e995faa9da641479d5b30 | package jFasta;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
public class DiagonalRun
{
private int id;
private int i, j;
private int score;
private List<HotSpot> hotSpostList;
public List<HotSpot> getHotSpostList() {
return hotSpostList;
}
public DiagonalRun(int i, int... | Java | src/jFasta/DiagonalRun.java | indiependente/jfasta | mit | 1,704 | 97 | codeparrot/github-code |
2f3e96f2317dbf9f5c7c3dfc74fa92b99d7f4eb5c5b235440471f6817b27a5cc | package models;
import java.util.*;
import javax.persistence.*;
import play.db.ebean.*;
import play.data.format.*;
import play.data.validation.*;
import com.avaje.ebean.*;
@Entity
public class VariavelInteresse extends Model {
@Id
public Long id;
@Constraints.Required(message="O campo sigla é obriga... | Java | app/models/VariavelInteresse.java | cleitonpqz/jungle-s-map | mit | 1,261 | 42 | codeparrot/github-code |
0ed89ba18cb7c2d970de941335c9be47606a601a03a55cc2b12e20bbf823b25a | <?php
/**
* @package hubzero-cms
* @copyright Copyright 2005-2019 HUBzero Foundation, LLC.
* @license http://opensource.org/licenses/MIT MIT
*/
defined('_HZEXEC_') or die;
/**
* Recaptcha Plugin.
*
* Based on the official recaptcha library( https://developers.google.com/recaptcha/docs/php )
*/
class pl... | PHP | core/plugins/captcha/recaptcha/recaptcha.php | zweidner/hubzero-cms | mit | 5,627 | 191 | codeparrot/github-code |
53866736616b89a25e151659ced52721e8190cf48b0dca38da6b0ef05f37aaed | using Q42.HueApi;
using Rca.HueSandbox;
using System;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace HueSandbox_Form
{
public class Controller
{
#region Member
HueWrapper m_Hue;
#endregion Member
#region Properties
/// <summary>
... | C# | HueSandbox_Form/Controller.cs | rmmlr/HueSandbox | mit | 3,538 | 123 | codeparrot/github-code |
b093ac8706246e80f52bc387aeeea76e00b8ae39bcd5ab0d0b1002b1e73e5089 | package ch.marc.jmines.entities;
import java.awt.*;
public class Settings {
private String name;
private int themeId; // 0 = Flat, 1 = Metal
private Color backgroundColor;
private Color buttonColor;
public Settings() {
this.name = "Name";
this.backgroundColor = Color.WHITE;
... | Java | src/main/java/ch/marc/jmines/entities/Settings.java | Griell/JMines | mit | 1,003 | 49 | codeparrot/github-code |
393db7d0a56924cebbb6b0f2d95e2ceaac7308e47fd34c119cd92f79acd49d0d | /*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*---------------------------------------------------------------... | TypeScript | src/vs/workbench/contrib/terminal/browser/terminal.ts | Microsoft/vscode | mit | 27,299 | 774 | codeparrot/github-code |
fbe00326fe2b24fa16e31044157a2f3904b2876953298747c3ffef9bcde7be7d | #!/usr/bin/env python
from django import forms
from django.utils.translation import ugettext_lazy as _
from django.utils.html import format_html
from django.forms.util import flatatt
from django.utils.encoding import force_text
from mezzanine.conf import settings
from cartridge.shop.forms import OrderForm
from cartri... | Python | cartridge_braintree/forms.py | ryneeverett/cartridge_braintree | mit | 3,807 | 82 | codeparrot/github-code |
6059b94babdc112e514fc768b274b9c7b1831dff694666d940648034b03b4aba | /* Include files */
#include <stddef.h>
#include "blas.h"
#include "Model_justmodel_sfun.h"
#include "c27_Model_justmodel.h"
#include "mwmathutil.h"
#define CHARTINSTANCE_CHARTNUMBER (chartInstance->chartNumber)
#define CHARTINSTANCE_INSTANCENUMBER (chartInstance->instanceNumber)
#include "Model_justmodel_sfun_... | C | 10 prev work/2014 Orsten/Simulation files/slprj/_sfprj/Model_justmodel/_self/sfun/src/c27_Model_justmodel.c | NTNU-MCS/CS_EnterpriseI | mit | 38,821 | 1,103 | codeparrot/github-code |
384f818a084a5bae2d60bf0f5bce48586a6acef4e9419f824fb6b566567a00de | #include "ycommon/utils/assert.h"
#include <cstdio>
#include <Windows.h>
#include "ycommon/platform/platform_handle_win.h"
namespace {
HWND gMainWindowHandle = NULL;
}
namespace ycommon { namespace utils {
void Assert::Initialize(
const platform::PlatformHandle& platform_handle) {
const platform::WinPlatfo... | C++ | ycommon/utils/assert_win_msg_box.cpp | DavidYen/YEngine | mit | 986 | 39 | codeparrot/github-code |
c58c79242f3582e22ebf6f3276858bdfe436f6d700ffd208876e25b510f8e22d | /*
* Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
* Portions Copyright (c) 1990 The Regents of the University of California.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
... | C | postgres/postgresql-8.3.9/src/port/strtol.c | KMU-embedded/mosbench-ext | mit | 4,409 | 147 | codeparrot/github-code |
009d6a764084d748c76ead9a3bc9a6c717cc0a8fe7ee73fa3d47dcbbb94f6130 | // This code is provided under the MIT license. Originally by Alessandro Pilati.
using Duality;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SnowyPeak.Duality.Plugins.YAUI.Templates
{
public class ControlTemplate
{
public ContentRef<... | C# | SnowyPeak.Duality.Plugins.YAUI/Templates/ControlTemplate.cs | SirePi/duality-ui | mit | 740 | 32 | codeparrot/github-code |
e35153a336a2b62df19cec174c2c4ff5bd68bc5a659b0fd219b5d30a2f8c2595 | // Copyright (c) DotSpatial Team. All rights reserved.
// Licensed under the MIT license. See License.txt file in the project root for full license information.
using System;
using System.ComponentModel;
using System.Diagnostics;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Windows.Forms;... | C# | Source/DotSpatial.Data.Forms/ScrollingControl.cs | CGX-GROUP/DotSpatial | mit | 16,539 | 486 | codeparrot/github-code |
46b59901fe9f4b3da03cf84a3f262eb7308468fa57f16841de3a5f4c28e9a4b9 | <!--
! Excerpted from "Ruby on Rails, 2nd Ed."
! We make no guarantees that this code is fit for any purpose.
! Visit http://www.editions-eyrolles.com/Livre/9782212120790/ for more book information.
-->
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
... | HTML | _template/doc/api/classes/ActionController/Routing/ControllerSegment.html | deild/RubyOnRailsEtudeDeCas | mit | 8,251 | 238 | codeparrot/github-code |
48e34333e8f5530f581f7130b924d6d1f64d18cd998540a6117e9e36f05ee924 | package session
import (
"container/list"
"sync"
"time"
)
// MemProvider Implement the provider interface
type RuntimeStore struct {
lock *sync.RWMutex // locker
sessions map[string]*list.Element // map in memory
list *list.List // for gc
maxlifetime int64
}
func NewR... | GO | session/store_runtime.go | zouyx/dotweb | mit | 3,436 | 128 | codeparrot/github-code |
c381a53e8dd731bc2cb57d0c46c71e972385441aa2507866e271b48828d20da8 | package edu.uw.tacoma.piggy.view.listener;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JOptionPane;
import edu.uw.tacoma.piggy.view.PiggyGUI;
import edu.uw.tacoma.piggy.view.PiggyViewConst;
/**
* The class for menu listener
* @author Varik Hoang
*/
public class Men... | Java | src/main/java/edu/uw/tacoma/piggy/view/listener/MenuListener.java | FavPiggy/EasterEgg | mit | 1,108 | 49 | codeparrot/github-code |
a5d50c7faff0bb44b5ffcfc3f9b2a5440602b17d65ca7f188fbf9288b07a4dfa | <html lang="en">
<head>
<title>Config Names - Debugging with GDB</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Debugging with GDB">
<meta name="generator" content="makeinfo 4.8">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="Installing-GDB.htm... | HTML | toolchain/osx/gcc-arm-none-eabi-6-2017-q1-update/share/doc/gcc-arm-none-eabi/html/gdb/Config-Names.html | ChangsoonKim/STM32F7DiscTutor | mit | 4,042 | 87 | codeparrot/github-code |
e512edf96c51048442913993942f23ab541aa271da0e293935bcd1ad217f7581 | __author__ = 'sarangis'
from src.ir.function import *
from src.ir.module import *
from src.ir.instructions import *
BINARY_OPERATORS = {
'+': lambda x, y: x + y,
'-': lambda x, y: x - y,
'*': lambda x, y: x * y,
'**': lambda x, y: x ** y,
'/': lambda x, y: x / y,
'//': lambda x, y: ... | Python | src/ir/irbuilder.py | ssarangi/spiderjit | mit | 9,697 | 273 | codeparrot/github-code |
e443cb3796046cf4ff656bf9914f7443792c224461bb3ab7d1c996c755368f5e | // 2016-08-22
//
// This is the wrapper for the native side
/*
prelim: start a server from the lib dir:
python -m SimpleHTTPServer (python 2.x) (linux)
python -m http.server (python 3.x) (windows)
1a) load jquery (note: may need a real active file open for this to work)
Note: get message 'VM148:52 Uncaught (in promi... | JavaScript | lib/mta-vs-native.js | vt5491/mta-vs | mit | 2,065 | 53 | codeparrot/github-code |
c4dc5906cd34af14e5bc5d7bd507f71b9d09624449b4b90848f8cda4aa1250dd | # -*- coding: utf-8 -*-
"""
pyvisa.visa
~~~~~~~~~~~
Module to provide an import shortcut for the most common VISA operations.
This file is part of PyVISA.
:copyright: 2014 by PyVISA Authors, see AUTHORS for more details.
:license: MIT, see COPYING for more details.
"""
from __future__ import... | Python | visa.py | MatthieuDartiailh/pyvisa | mit | 1,581 | 44 | codeparrot/github-code |
cb5f7a8a0aac37cd4734bfe262b20c787d3704ecc9ea014fb7450c59d358427d | package de.unibremen.beduino.dcaf;
import de.unibremen.beduino.dcaf.utils.Tuple;
import org.junit.Test;
import java.util.Optional;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.fail;
import static org.mockito.Mockito.mock;
/**
* @author Connor Lanigan
*/
public class ClientAuthorizat... | Java | src/test/java/de/unibremen/beduino/dcaf/ClientAuthorizationManagerTest.java | beduino-project/dcaf-java | mit | 2,671 | 111 | codeparrot/github-code |
8cc0db7ad4e3fe9a7bf6415490d1beef744ef1d346a4070bbe526399d5adb5e0 | angular.module('starter.controllers', [])
// A simple controller that fetches a list of data from a service
.controller('JobIndexCtrl', function($rootScope, PetService) {
// "Pets" is a service returning mock data (services.js)
$rootScope.pets = PetService.all();
})
// A simple controller that shows a tapped it... | JavaScript | www/js/controllers.js | KhanhHB/test | mit | 1,947 | 64 | codeparrot/github-code |
80194ee38dd3d3705d8a69df64e7ce7084fc41634b628b7deda95f2e3f679444 | <!doctype html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
<head>
<meta charset="ut... | HTML | app/ranking.html | jimyuan/xmas-game | mit | 1,801 | 43 | codeparrot/github-code |
77d82ce38edac77a7ba646054b20ce0583f0fa58c7b94024a02c21a4ace3307a | package lr.api;
import lr.core.Data;
import lr.core.Exception.SendException;
import lr.core.Nodes.GossipResource;
import lr.core.Messages.Message.*;
import lr.core.Messages.MessageRequest;
import lr.core.Messages.MessageResponse;
import org.springframework.web.bind.annotation.*;
/**
* Created by luca on 01/03/16.
*... | Java | api/src/main/java/lr/api/PublicAPI.java | lucarin91/PAD-project | mit | 1,529 | 48 | codeparrot/github-code |
a46c2826b0f550c29699587dcee4797e7ea84ea421fe14bcdb140b2d32291483 | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>hammer-tactics: Not compatible 👼</title>
<link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" />
<link href="../../../../../bootstrap.... | HTML | clean/Linux-x86_64-4.10.2-2.0.6/released/8.13.1/hammer-tactics/1.3+8.12.html | coq-bench/coq-bench.github.io | mit | 7,394 | 182 | codeparrot/github-code |
4f166c4b9629b5dd0db53b6692558b94cf7499a97008d352a8bdf6ba934e2ac2 | //--------------------------------------------------------------------------------------
// File: Effects.h
//
// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
// ... | C | VisualStudio/DirectXTK/Inc/Effects.h | L0mion/Makes-a-Click | mit | 15,252 | 443 | codeparrot/github-code |
f65260985688e5131e51ec3d9a26525fa95fa58f85351cc4c3ed6a1785799b14 | package com.github.halab4dev.mongo2j.mapper;
import org.bson.Document;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
import java.util.*;
import static org.junit.jupiter.api.Assertions.*;
/*
*
* @author halab
*/
public class DefaultMapperSimpleAttributesTests {
Mapper mapper = ... | Java | src/test/java/com/github/halab4dev/mongo2j/mapper/DefaultMapperSimpleAttributesTests.java | halab4dev/mongo2j | mit | 5,988 | 145 | codeparrot/github-code |
63023424749950c7c7d6dda20a82b9f178ce0670907a5b923b6a625968084bb8 | <?php
namespace Poirot\AuthSystem\Authenticate;
use Poirot\AuthSystem\Authenticate\Exceptions\AuthenticationError;
use Poirot\AuthSystem\Authenticate\Exceptions\exLoadUserFailed;
use Poirot\AuthSystem\Authenticate\Exceptions\exNotAuthenticated;
use Poirot\AuthSystem\Authenticate\Interfaces\iCredential;
use Poirot\Auth... | PHP | Authenticate/Authenticator.php | phPoirot/AuthSystem | mit | 4,346 | 135 | codeparrot/github-code |
6cb4139bd18866210b4621eebba0c535e1fb1562ef3d34f469835c97796a5223 | /**YEngine2D
* author:YYC
* date:2014-04-21
* email:395976266@qq.com
* qq: 395976266
* blog:http://www.cnblogs.com/chaogex/
*/
describe("CallFunc", function () {
var action = null;
var sandbox = null;
beforeEach(function () {
sandbox = sinon.sandbox.create();
action = new YE.CallFunc(... | JavaScript | test/unit/action/CallFuncSpec.js | yyc-git/YEngine2D | mit | 2,629 | 107 | codeparrot/github-code |
12f1cda92dca36d8ad0ec9151b4096efa55e3ce1c7689aa86cafb5e87bc1667b | """
JavaRef is abstract parent for JavaLocalRef, JavaGlobalRef, and JavaNullRef in the JavaCall Module
It is distinct from its parent type, JavaCall.JNI.AbstractJavaRef, since its use is defined in
JavaCall itself rather than the JNI submodule.
"""
abstract type JavaRef <: JNI.AbstractJavaRef end
"""
... | Julia | src/core.jl | aviks/JavaCall.jl | mit | 20,954 | 590 | codeparrot/github-code |
14eb288c67236398070b4e25045cf989ea7fc8344740b0dd52dd4f5ab72ad5eb | <?php
namespace Oro\Bundle\ActivityBundle\Form\Type;
use Symfony\Component\Form\FormInterface;
use Symfony\Component\Form\FormView;
use Oro\Bundle\EntityConfigBundle\Config\Id\EntityConfigId;
use Oro\Bundle\EntityExtendBundle\Form\Type\MultipleAssociationChoiceType as BaseMultipleAssociationChoiceType;
class Multip... | PHP | src/Oro/Bundle/ActivityBundle/Form/Type/MultipleAssociationChoiceType.php | ramunasd/platform | mit | 1,402 | 52 | codeparrot/github-code |
0a535571fbc98d4f220aad2066b8f136ceae6c6726371fb4a0baedfc66f60148 | ///////////////////////////////////////////////////////////////////////////
// Copyright © 2014 - 2016 Esri. 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
//
// h... | JavaScript | wab/2.2/widgets/Directions/DirectionToFeatureAction.js | cmccullough2/cmv-wab-widgets | mit | 1,584 | 40 | codeparrot/github-code |
dacb04d4f6db26bb5f879677e5b42611411fa5549b751a488e10619e271ea798 | /* eslint-env mocha */
'use strict'
const path = require('path')
const cwd = process.cwd()
const NetSuite = require(path.join(cwd, 'netsuite'))
const chai = require('chai')
const expect = chai.expect
const config = require('config')
describe('NetSuite class', function () {
this.timeout(24 * 60 * 60 * 1000)
it('sh... | JavaScript | test/netsuite-test.js | trujaytim/netsuite-v2017.2 | mit | 2,283 | 63 | codeparrot/github-code |
151043d0d0013d49dfc392638cc208e09679389bb04b0cdfc2b552aa583f6b37 | import { Component, OnInit, NgZone, Inject, OnDestroy } from '@angular/core';
import { DOCUMENT } from '@angular/common';
import { Title } from '@angular/platform-browser';
import { ActivatedRoute, Router } from '@angular/router';
import { ApiService } from '../../services/api.service';
import { TimeService } from '../... | TypeScript | src/app/components/app-build-details/app-build-details.component.ts | irmana/abstruse | mit | 15,547 | 403 | codeparrot/github-code |
ece99f4ffeb1ceb7f5098e005d46f77196cc5618b46b08c072b07f89cdb48d2c | //>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude);
//>>description: Popup windows
//>>label: Popups
//>>group: Widgets
//>>css.theme: ../css/themes/default/jquery.mobile.theme.css
//>>css.structure: ../css/structure/jquery.mobile.popup.css,../css/structure/jquery.mobile.transition.css,../css/structure/jquery... | JavaScript | js/widgets/popup.js | hinaloe/jqm-demo-ja | mit | 30,374 | 970 | codeparrot/github-code |
6c92830e0a76391814471686eb1a07becc130db97e4290655fc55bdee5299d7a | class PresentDeliverer:
present_locations = {}
def __init__(self, name):
self.name = name
self.x = 0
self.y = 0
self.present_locations[self.get_key()]=1
def get_key(self):
return str(self.x)+"-"+str(self.y)
def status(self):
print(self.name + " x: "+str(self.x)+" y: "+str(self.y))
def move(self... | Python | python/day_three_part2.py | caw13/adventofcode | mit | 939 | 44 | codeparrot/github-code |
a173840edf3606de6cd282aabbeb3fdd880a7b7da2f3739f7b4bf1c08fbe61f1 | class Meteorlog::Client
include Meteorlog::Logger::Helper
include Meteorlog::Utils
def initialize(options = {})
@options = options
@cloud_watch_logs = Aws::CloudWatchLogs::Client.new
end
def export(opts = {})
exported = Meteorlog::Exporter.export(@cloud_watch_logs, @options.merge(opts))
Mete... | Ruby | lib/meteorlog/client.rb | winebarrel/meteorlog | mit | 3,476 | 113 | codeparrot/github-code |
99752c04534ae5f29609d3ec60164ae0e9f86296cf76ef1c9eed1bc7a267a39f | <?php
namespace Api\User\Repositories;
use Api\User\Models\Contact;
use App\Database\Eloquent\Repository;
class ContactRepository extends Repository
{
public function getModel()
{
return new Contact();
}
public function create(array $data)
{
$model = $this->getModel();
/... | PHP | api/User/Repositories/ContactRepository.php | enli-io/fusionpbx-api | mit | 1,651 | 68 | codeparrot/github-code |
0a08947d3f2b4759bce4aee12ee1e8b1c2578d4b01b0be1e28c6577ef681bc8a | /**
* main.js: The entry point for MuTube.
* Plays the role of the 'main process' in Electron.
*/
// define constants from various packages for the main process
const {
app,
BrowserWindow,
ipcMain
} = require('electron');
let mainWindow;
// execute the application
app.on('ready', () => {
// create... | JavaScript | main.js | lenku/mu-tube | mit | 1,217 | 48 | codeparrot/github-code |
c51c45035e59028d9563dec0a64f7d86dbb203745d06de218722706d29f8daf6 | package org.littlewings.infinispan.distributedstreams;
import java.io.Serializable;
import java.util.Map;
import java.util.function.Function;
import java.util.stream.Collectors;
import java.util.stream.IntStream;
import org.infinispan.CacheStream;
import org.infinispan.stream.CacheCollectors;
public class EmbeddedDi... | Java | embedded-distributed-streams/src/main/java/org/littlewings/infinispan/distributedstreams/EmbeddedDistributedStreamsParallel.java | kazuhira-r/infinispan-getting-started | mit | 11,289 | 251 | codeparrot/github-code |
28305c7346e34e6417550b3d01a795995947e87ab4c925706e1fa73d10d12316 | function Loader() {
var self = this;
self.cache = {}; // Filename -> {Geometry, Material, [callbacks]}
self.textureCache = {}; // Filename -> Texture
self.loader = new THREE.JSONLoader();
}
Loader.prototype.loadTexture = function(filename, callback) {
var self = this;
var texture = self.textur... | JavaScript | js/util/Loader.js | PhiladelphiaGameLab/Flip | mit | 5,180 | 164 | codeparrot/github-code |
f2382db7d228b993173ae3b7f6774f4ecbeac1f0b083e253a9b8b94cd3974c6f | #!/usr/bin/env bash
set -o pipefail
set -o errexit
set -o nounset
# set -o xtrace
# Set magic variables for current FILE & DIR
__dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
# __file="${__dir}/$(basename "${BASH_SOURCE[0]}")"
# __base="$(basename ${__file} .sh)"
__root="$(cd "$(dirname "${__dir}")" && pwd)"
s... | Shell | test/acceptance.sh | freyproject/frey | mit | 6,385 | 179 | codeparrot/github-code |
77350ebcb93de2d9fff5d7cce89c9c5833d70c6ce03b3da629ca02d79dedb1eb | /* ajax_windows.js. Support for modal popup windows in Umlaut items. */
jQuery(document).ready(function($) {
var populate_modal = function(data, textStatus, jqXHR) {
// Wrap the data object in jquery object
var body = $("<div/>").html(data);
// Remove the first heading from the returned data
var head... | JavaScript | app/assets/javascripts/umlaut/ajax_windows.js | team-umlaut/umlaut | mit | 1,854 | 41 | codeparrot/github-code |
98896d22bef0ba24776ee1494d0270aafe9e6219abe197449ac43b8ad95946cc | // Copyright (c) 2013, Facebook, Inc. All rights reserved.
// This source code is licensed under the BSD-style license found in the
// LICENSE file in the root directory of this source tree. An additional grant
// of patent rights can be found in the PATENTS file in the same directory.
#ifndef STORAGE_ROCKSDB_INCLUDE... | C | extern/rocksdb/include/rocksdb/statistics.h | guileen/ferrydb | mit | 13,089 | 323 | codeparrot/github-code |
89ed2afd5014a6212b45d50c98995e05c2c1ccf6ebcc35a1aba35980dbe46ef0 | /**
* Copyright Murex S.A.S., 2003-2016. All Rights Reserved.
*
* This software program is proprietary and confidential to Murex S.A.S and its affiliates ("Murex") and, without limiting the generality of the foregoing reservation of rights, shall not be accessed, used, reproduced or distributed without the
* ex... | Java | Paris/2016/2016-01-07-TextJustification-Java/src/test/java/com/murex/codingdojo/textjustification/SolutionTest.java | murex/murex-coding-dojo | mit | 2,950 | 71 | codeparrot/github-code |
7ed5ddeb7c380308ac46bff286f8a0160a61f67e670c9c7573eb1cee3363b996 | /*
* A naive algorithm for circular string matching with k mismatches.
*/
#include <stddef.h>
static unsigned char *P;
static size_t m;
void prep(unsigned char *P_, size_t m_, size_t k)
{
P = P_; m = m_; (void)k;
}
size_t exec(unsigned char *T, size_t n, size_t k)
{
size_t i, j, r, neq, occ = 0;
for (... | C | cnaive.c | hirvola/bsa | mit | 655 | 33 | codeparrot/github-code |
e52a9195ce4d3723c1aafba7191c4003f1e0051cf37616f30df0953ff620dd74 | #include "frameon.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <fcntl.h>
#include <linux/fb.h>
#include <sys/mman.h>
#include <sys/ioctl.h>
#include <errno.h>
#define true 1
#define false 0
int frameon_putvinfo(struct fb_var_screeninfo *put){
int res = ioctl(frameon_fbfd... | C | src/frameon.c | AlexRamallo/FrameOn | mit | 4,875 | 205 | codeparrot/github-code |
168c9134563ecf4bebcded593def6b1fb202c9d58a777f5f46dc73e5ae7f8e03 | import json
from sets import Set
from sys import maxint
import math
# tmp hacky functions for vec3
def norm2 (a):
return dot(a, a)
def dot ( a, b ):
return a[0] * b[0] + a[1] * b[1] + a[2] * b[2]
def area (a, b, c):
u = [ b[0] - a[0], b[1] - a[1], b[2] - a[2] ]
v = [ c[0] - a[0], c[1] - a[1], c[2] -... | Python | assets/models/test/txt2json_parser.py | shrekshao/Polyhedron3D | mit | 8,122 | 262 | codeparrot/github-code |
e39dce90fb4aebdce3e07491edf4051c351e30cf7e621a575a193a7d40fc0b54 | namespace gView.MapServer.Lib.UI
{
partial class FormSelectService
{
/// <summary>
/// Erforderliche Designervariable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Verwendete Ressourcen bereinigen.
/// </su... | C# | gView.MapServer.Lib.UI/MapServer/Lib/UI/FormSelectService.Designer.cs | jugstalt/gViewGisOS | mit | 12,675 | 280 | codeparrot/github-code |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.