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 |
|---|---|---|---|---|---|---|---|---|
abb10d13cd4625b78592fe63812d9137c39b40eccea9a096c44768a11769bf8d | extern crate modbus;
use modbus::{Coil,binary,Reason,ExceptionCode,tcp};
use {Code, Count, Address, Values, Value, Quantity};
use {ModbusResponsePDU, ModbusRequestPDU};
use FunctionCode;
use enum_primitive::FromPrimitive;
pub struct BlankRegisters {
holding_registers : Vec<u16>,
input_registers : Vec<u16>,
... | Rust | src/block.rs | ocschwar/modbus-server | mit | 9,869 | 256 | codeparrot/github-code |
7676a39f465853483be76d499d5e8739fabf027959e1e59747d87e6106567abf | <link rel="stylesheet" href="${basePath}/resources/common/libs/fileinput/css/fileinput.min.css">
<script src="${basePath}/resources/common/libs/fileinput/js/fileinput.js"></script>
<script src="${basePath}/resources/common/libs/fileinput/js/locales/zh.js"></script>
<style >
input{
width:100%;
text-a... | HTML | AdminEAP-web/src/main/webapp/WEB-INF/views/safetyManage/newDiary/grlist.html | Squama/Master | mit | 9,093 | 252 | codeparrot/github-code |
eafe0bfa034786f0888d3c3566cce943b6de21afe295539d4034a2a45d317ebe | import React, { Component, PropTypes } from 'react'
import cx from 'classnames'
import { Icon } from '../icon'
import { capitalize } from 'utils/string'
import './button.view.styl'
export class Button extends Component {
static propTypes = {
className: PropTypes.string,
children: PropTypes.oneOfType([
... | JavaScript | web/src/uis/generics/button/button.view.js | seccom/kpass | mit | 1,895 | 97 | codeparrot/github-code |
165ea991ddc4be67472e8920ab71f5c6c61e201dde3df2b8d7cbbb6c5d5fd772 | <?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Kelolapendaftar extends CI_Controller {
public function _construct()
{
parent::_construct();
$this->load->helper('url');
$this->load->helper('form');
$this->load->library('input');
$this->load->library('form_validation');
$this-... | PHP | application/controllers/KelolaPendaftar.php | abdulazieskurniawan/pii_diy | mit | 24,509 | 708 | codeparrot/github-code |
d9d926482cd14fd1e3cb8801cd1f41565e8662db4df8bcaa07db5cf7a6e6159f | /*===========================================================================
* Licensed Materials - Property of IBM
* "Restricted Materials of IBM"
*
* IBM SDK, Java(tm) Technology Edition, v8
* (C) Copyright IBM Corp. 1999, 2009. All Rights Reserved
*
* US Government Users Restricted Rights - Use, duplication... | Java | ibm.jdk8/src/javax/naming/directory/InitialDirContext.java | flyzsd/java-code-snippets | mit | 9,969 | 312 | codeparrot/github-code |
5b06ca34f51239d9acfe64f2b25b7f99ded1edb7833994ed743464e6be2ae567 | package msvcdojo;
import static org.springframework.hateoas.mvc.ControllerLinkBuilder.linkTo;
import org.springframework.hateoas.Resource;
import org.springframework.hateoas.mvc.ResourceAssemblerSupport;
import org.springframework.stereotype.Component;
// tag::ResourceAssembler[]
@Component
public class ContactResou... | Java | kata-spring-restdocs/solution/mysvc/src/main/java/msvcdojo/ContactResourceAssembler.java | Accordance/microservice-dojo | mit | 1,105 | 38 | codeparrot/github-code |
fc676d8ffb5d3828a59dddbd1f7f5caee81ab4a4b065bcc54a814d94415958be | package org.innovateuk.ifs.assessment.invite.controller;
import org.innovateuk.ifs.BaseControllerMockMVCTest;
import org.innovateuk.ifs.assessment.invite.form.ReviewInviteForm;
import org.innovateuk.ifs.assessment.invite.populator.ReviewInviteModelPopulator;
import org.innovateuk.ifs.assessment.invite.viewmodel.Review... | Java | ifs-web-service/ifs-assessment-service/src/test/java/org/innovateuk/ifs/assessment/invite/controller/ReviewInviteControllerTest.java | InnovateUKGitHub/innovation-funding-service | mit | 10,855 | 244 | codeparrot/github-code |
b5e844dd91c05c3e5aa602cc92dc0b653d7b83037b08b70411b705399a7b3eb3 | package org.innovateuk.ifs.registration.service;
import org.springframework.web.context.request.RequestAttributes;
import java.util.HashMap;
import java.util.Map;
/**
* This solves the java.lang.IllegalStateException: Cannot ask for request attribute - request is not active anymore!
* Error, Request attributes are... | Java | ifs-web-service/ifs-web-core/src/main/java/org/innovateuk/ifs/registration/service/CustomRequestScopeAttr.java | InnovateUKGitHub/innovation-funding-service | mit | 2,061 | 68 | codeparrot/github-code |
d2b25fa5b885e11625c9a231f47e9b92228eed0855adab5ffcb2fac619fc9a95 | <?php
/*
* This file is part of the EP-Manager website
*
* (c) 2013 Julien Brochet <julien.brochet@orange.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace EPManager\MainBundle\Controller;
use Sensio\Bundle\Framewor... | PHP | src/EPManager/MainBundle/Controller/GroupController.php | aerialls/EPManager | mit | 4,675 | 165 | codeparrot/github-code |
4ba34883b798d8d050e1aefde3598b2dcc75cabcbd370b2b77c65d174fcefb20 | <?php
namespace Pharam\Generator;
use Doctrine\DBAL\Connection;
use Doctrine\DBAL\Schema\Table;
/**
* Class Database
* @package Pharam\Generator
*/
class Database
{
/**
* @var Connection
*/
private $connection;
/**
* Initailize connection.
* @param Connection $connection
*/
... | PHP | src/Generator/Database.php | kabirbaidhya/pharam | mit | 1,944 | 93 | codeparrot/github-code |
52cbff575aefa0225309bd056525816c904a4b23dc02eeddadbbb7b4a4b51aa0 | from nose.tools import with_setup
import os
import hk_glazer as js2deg
import subprocess
import json
class TestClass:
@classmethod
def setup_class(cls):
cls.here = os.path.dirname(__file__)
cls.data = cls.here + '/data'
def test_1(self):
'''Test 1: Check that json_to_degree works when imported'... | Python | hk_glazer/test/test.py | fmuzf/python_hk_glazer | mit | 1,705 | 58 | codeparrot/github-code |
f50a867f4749e3e1a50adf236cede00e860ab31f035481871ba05711b955bd6c | <div class="navbar navbar-default" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<... | HTML | _includes/navigation 2.html | rebeckaray-project/rebeckaray-project.github.io | mit | 2,769 | 78 | codeparrot/github-code |
a03300a3f80d9adf822a6d4a76bc587d7c40b5dfb7f5230a64e2b64f6cc798b8 | /****************************************************************************
Copyright (c) 2010-2012 cocos2d-x.org
Copyright (c) 2011 Zynga Inc.
Copyright (c) 2013-2014 Chukong Technologies Inc.
http://www.cocos2d-x.org
Permission is hereby granted, free of charge, to any person obtaining a copy
of this... | C | cocos2d/cocos/2d/platform/apple/CCFileUtilsApple.h | MandukaGames/tutorial-puzzle | mit | 2,353 | 65 | codeparrot/github-code |
27863d7f29bc481678b19c0ca1d300048d9a5560937171b6d257e3938ec6b525 | <?php
use Symfony\Component\HttpKernel\Kernel;
use Symfony\Component\Config\Loader\LoaderInterface;
class AppKernel extends Kernel
{
public function registerBundles()
{
$bundles = array(
new Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
new Symfony\Bundle\SecurityBundle\Sec... | PHP | app/AppKernel.php | najibla/Sf2AppSkeleton | mit | 1,779 | 46 | codeparrot/github-code |
1a9c1de3c4fd5ee61168ae62739cda1febbf6d72de198c9b7436ce4fedcc7e16 | /*
* Wegas
* http://wegas.albasim.ch
*
* Copyright (c) 2013, 2014, 2015 School of Business and Engineering Vaud, Comem
* Licensed under the MIT License
*/
package com.wegas.core.security.persistence;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonManagedReference;... | Java | wegas-core/src/main/java/com/wegas/core/security/persistence/User.java | ghiringh/Wegas | mit | 5,838 | 230 | codeparrot/github-code |
dcf60f1b9c510d42cba317967f56f3d812d919b760ba357e41998f11561257b5 | using System;
using System.Linq.Expressions;
using Vulpecula.Scripting.Lexer;
namespace Vulpecula.Scripting.Parser.Expressions
{
// Parsing Script
// RelationalExpression
// EqualityExpression "==" RelationalExpression
// EqualityExpression "!=" RelationalExpression
internal class EqualityExpress... | C# | Vulpecula.Scripting/Parser/Expressions/EqualityExpression.cs | fuyuno/Vulpecula | mit | 1,966 | 73 | codeparrot/github-code |
078b6ab5b7f15a894d4a2296e8b073c6e5870fbfb555112d4f71566ac668c466 | /*
* Copyright (c) 1998-2005 The TCPDUMP project
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that: (1) source code
* distributions retain the above copyright notice and this paragraph
* in its entirety, and (2) distributions including binary code i... | C | print-slow.c | hsluoyz/WinDump | mit | 9,213 | 265 | codeparrot/github-code |
db46e724d5eac3a57d5c21e1d23115730e0cb47bb503b5307c0b2fe8fd4c3c1f | #pragma once
#include <vector>
#include <iostream>
//#include <limits>
//#include <complex>
#include <Eigen/Dense>
#include <Eigen/StdVector>
namespace bezier {
/** Specifies the coordinate dimension */
enum Dimension {
/** 2d coordinates \f$(x, y)\f$ */
k2d = 2,
/** 3d coordinates \f$(x, y, z)\f$ */
k3d
};
usi... | C | splines/SplineHelper.h | hpmachining/splines | mit | 5,253 | 159 | codeparrot/github-code |
77343681f71a23ed68bf09e810d796e3cbf4530e967f6ac7acd2674ae85f83a8 | import { Transform } from './transform.js';
/**
* Calculate the transform for a Cornerstone enabled element
*
* @param {EnabledElement} enabledElement The Cornerstone Enabled Element
* @param {Number} [scale] The viewport scale
* @return {Transform} The current transform
*/
export default function (enabledElemen... | JavaScript | src/internal/calculateTransform.js | google/cornerstone | mit | 2,065 | 66 | codeparrot/github-code |
386440f7ee10b257ed9d2ce77cc3676dc0a62511a676676f06fd272f0822f2f4 | import Express from 'express';
import compression from 'compression';
import mongoose from 'mongoose';
import bodyParser from 'body-parser';
import path from 'path';
import IntlWrapper from '../client/modules/Intl/IntlWrapper';
// Webpack Requirements
import webpack from 'webpack';
import config from '../webpack.confi... | JavaScript | server/server.js | zivkaziv/MazorTech | mit | 8,791 | 357 | codeparrot/github-code |
391093036c1432fda3215cdf5053037b51d7a7dcf0fde9577737738683685a5b | <?php
/*
* This file is part of the symfony package.
* (c) Fabien Potencier <fabien.potencier@symfony-project.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
require_once(dirname(__FILE__).'/sfYamlInline.class.php');
/**
* ... | PHP | library/PHPUnit/Util/YAML/sfYamlDumper.class.php | xenophy/xFrameworkPX | mit | 1,667 | 61 | codeparrot/github-code |
f8feb133282af49f782395e3a97eca0b9cdc12f9578c9edaebd51782c8d0363c | package vhosts
import (
"net/http"
"strings"
"sync"
)
type VirtualHosts struct {
vhosts map[string]http.Handler
mu sync.RWMutex
}
func NewVirtualHosts(vhosts map[string]http.Handler) *VirtualHosts {
v := &VirtualHosts{}
for hosts, h := range vhosts {
for _, host := range strings.Split(hosts, " ") {
i... | GO | vhosts/vhosts.go | alxarch/go-http | mit | 984 | 52 | codeparrot/github-code |
d6e10b5edba226e916ea0f5ce9ac04021d9d1ec4f7bb4309da289b0db2f09713 | #include "optionsmodel.h"
#include "bitcoinunits.h"
#include <QSettings>
#include "init.h"
#include "walletdb.h"
#include "guiutil.h"
OptionsModel::OptionsModel(QObject *parent) :
QAbstractListModel(parent)
{
Init();
}
bool static ApplyProxySettings()
{
QSettings settings;
CService addrProxy(settings... | C++ | src/qt/optionsmodel.cpp | BreakoutCoin/Breakout-Chain-Client | mit | 13,372 | 401 | codeparrot/github-code |
98b11992b2408910bdd6bb238299d15e0f1e24b18a469209089d6446f058a4e9 | /**
* @file singleton.hpp
* @brief dynamic Singleton pattern design template class
* @author Byunghun Hwang<bhhwang@nsynapse.com>
* @date 2015. 8. 2
* @details singleton ÆÐÅÏ ÅÛÇø´ Ŭ·¡½º
*/
#ifndef _COSSB_ARCH_SINGLETON_HPP_
#define _COSSB_ARCH_SINGLETON_HPP_
#include <iostream>
#include <utility>
using... | C++ | include/arch/singleton.hpp | bhhwang/cossb | mit | 1,028 | 58 | codeparrot/github-code |
013ef31288eca92fffd9af2cdb360350e967f63775be5045140f070c79a99157 | <?php
namespace Larablocks\Pigeon;
use Illuminate\Foundation\AliasLoader;
use Illuminate\Support\ServiceProvider;
/**
* Class PigeonServiceProvider
* @package Pigeon
*
*/
class PigeonServiceProvider extends ServiceProvider
{
public function register()
{
// Required for testing
//require ... | PHP | src/Pigeon/PigeonServiceProvider.php | larablocks/pigeon | mit | 1,185 | 46 | codeparrot/github-code |
bf640ae4ea4b92327d7ea4a8caa343b180236f364fe7b8fe83ca0484fdc3ccd2 | /********************************************************************
The Multiverse Platform is made available under the MIT License.
Copyright (c) 2012 The Multiverse Foundation
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "... | Java | server/src/multiverse/server/engine/SearchManager.java | longde123/MultiversePlatform | mit | 7,815 | 223 | codeparrot/github-code |
2e9491efe16e709cceaf14b67233e3079c22e2e0dd8be85516b03ffec26c0cf1 | 'use strict';
const AWS = require('aws-sdk');
let x = "/delegationset/NHKXBB6SHGKLN";
console.log(x.replace('/delegationset/', ''));
return;
const route53 = new AWS.Route53();
route53.listHostedZones({}).promise()
.then(response => {
console.log(response);
return response.HostedZones.find(hostedZone => {
... | JavaScript | .temp/test.js | manapaho/cloudy | mit | 2,248 | 89 | codeparrot/github-code |
da0d94865bc0e7f3bfeb8d4bf9b835a2bb1d26584a84ff51fcf161af8a9d0d9f | package crawler.impl;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.net.UnknownHostException;
import java.util.Date;
import java.util.List;
import main.Constants;
import model.News;
import org.horrabin.horrorss.RssFeed;
import org.horrabin.horrorss.RssItemBean;
imp... | Java | src/crawler/impl/BaiduNewsCrawler.java | RangerWolf/Finance-News-Helper | mit | 2,694 | 104 | codeparrot/github-code |
a72afa0fd7d0af0979993bbc1c1b3797eb72646c987a9b1e9d0414aed5d2769a | using System;
using System.Runtime.InteropServices;
using System.Text;
using System.Collections.Generic;
using OpenHome.Net.Core;
namespace OpenHome.Net.Device.Providers
{
public interface IDvProviderOpenhomeOrgTestLights1 : IDisposable
{
}
/// <summary>
/// Provider for the openhome.org:T... | C# | OpenHome/Net/Bindings/Cs/Device/Providers/DvOpenhomeOrgTestLights1.cs | DoomHammer/ohNetGenerated | mit | 25,734 | 605 | codeparrot/github-code |
9fcf0138896ecfd3d44b1484c20547fe6f0550558bc4c2f10b490ae8d0e66d88 | # encoding: UTF-8
"""
一个ATR-RSI指标结合的交易策略,适合用在股指的1分钟和5分钟线上。
注意事项:
1. 作者不对交易盈利做任何保证,策略代码仅供参考
2. 本策略需要用到talib,没有安装的用户请先参考www.vnpy.org上的教程安装
3. 将IF0000_1min.csv用ctaHistoryData.py导入MongoDB后,直接运行本文件即可回测策略
"""
from ctaBase import *
from ctaTemplate import CtaTemplate
import talib
import numpy as np
###################... | Python | vn.trader/ctaAlgo/strategyAtrRsi.py | lukesummer/vnpy | mit | 8,233 | 270 | codeparrot/github-code |
79d3c492a8c307311e93e400fd3226a7e57984fb406322de0928c3a69c4f230b | var React = require('react-native');
var {
StyleSheet,
View,
Animated,
} = React;
var Dot = React.createClass({
propTypes: {
isPlacedCorrectly: React.PropTypes.bool.isRequired,
},
getInitialState: function() {
return {
scale: new Animated.Value(this.props.isPlacedCorrectly ? 1 : 0.1),
... | JavaScript | src/Dot.js | nosovsh/fifteen | mit | 1,364 | 67 | codeparrot/github-code |
e793deaede533d1c47d599ff93e5ed305f08574c4ffe48c4c6e9373ca157f70f | /*This file has been prepared for Doxygen automatic documentation generation.*/
/*! \file *********************************************************************
*
* \brief MACB driver for EVK1100 board.
*
* This file defines a useful set of functions for the MACB interface on
* AVR32 devices.
*
* - Compiler: ... | C | freeRTOS/FreeRTOSV7.4.0/FreeRTOSV7.4.0/FreeRTOS/Demo/lwIP_AVR32_UC3/DRIVERS/MACB/macb.c | andyOsaft/02_SourceCode | mit | 32,968 | 1,000 | codeparrot/github-code |
59a4439b70ce88fcb532d6dde91dd9969e7092405cd6da4a4d3769b5765b2b25 | <!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
... | HTML | software/distributions/posterior-predictive/index.html | michaellindon/michaellindon.github.io | mit | 7,345 | 233 | codeparrot/github-code |
0f67be23055a3ce0f46b5847e284026899b3d70ba4b56855944d20262846cdc7 | <!DOCTYPE html>
<html lang="en">
<head>
<title>IOU</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<meta name="viewport" id="viewport" content="width=device-width,initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
<meta name="format-detection" cont... | HTML | index.html | jeasonstudio/iou | mit | 4,741 | 103 | codeparrot/github-code |
7608a51cd1da3c25f8f2a1b164de3bd2642e6c29a94ca73002075fa8b0cfae39 | /****************************************************************************
Copyright (c) 2011-2012 cocos2d-x.org
Copyright (c) 2013-2014 Chukong Technologies Inc.
http://www.cocos2d-x.org
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation... | JavaScript | frameworks/cocos2d-html5/extensions/cocostudio/armature/CCBone.js | zry656565/MoonWarriors | mit | 19,960 | 639 | codeparrot/github-code |
c31fe1bbb7ea81bae00c12e8a76414de7529e78ae04b7fa6cc5ae4bff662b8a6 | /*!
* Bootstrap v3.3.6 (http://getbootstrap.com)
* Copyright 2011-2015 Twitter, Inc.
* Licensed under the MIT license
*/
if (typeof jQuery === 'undefined') {
throw new Error('Bootstrap\'s JavaScript requires jQuery')
}
+
function($) {
'use strict';
var version = $.fn.jquery.split(' ')[0].split('.')
... | JavaScript | docs/assets/bootstrap/js/bootstrap.js | octapush/octapushJS | mit | 75,339 | 2,396 | codeparrot/github-code |
c5e9f273da8a937322ba2c622bfd8b8f71d55bf78e5c6f84a7e0b1784eb92b01 | /*
* SonarScanner for MSBuild
* Copyright (C) 2016-2019 SonarSource SA
* mailto:info AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3 o... | C# | src/SonarScanner.MSBuild.Tasks/TaskUtilities.cs | SonarSource/sonar-msbuild-runner | mit | 3,989 | 109 | codeparrot/github-code |
4e063184acd3d397949c32b4b8fa2098522d65e383ba413b3f5b03d59b9d7665 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
<html>
<!-- Standard Head Part -->
<head>
<title>NUnit - Ignore</title>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta http-equiv="Content-Language" content="en-US">
<link rel="stylesheet" type="text/css" href="nunit.css">
<link rel="sh... | HTML | tools/nunit/doc/ignore.html | mvba/ExcelMapper | mit | 6,414 | 250 | codeparrot/github-code |
ef1ff7b9e680f857f52526685ec7d64b828ff57713346be9e7b8fb4c3ba3b02a | #!/usr/bin/env bash
declare -A params=$6 # Create an associative array
declare -A headers=${9} # Create an associative array
declare -A rewrites=${10} # Create an associative array
paramsTXT=""
if [ -n "$6" ]; then
for element in "${!params[@]}"
do
paramsTXT="${paramsTXT}
fastcgi_param ${el... | Shell | scripts/site-types/wordpress.sh | svpernova09/homestead | mit | 4,213 | 147 | codeparrot/github-code |
8a9181bd12a2eb9645bd2b5c3f27d5c156d71f5d41bad4899858b829f0d1254e | <?php
// Composer autoloading
if (file_exists('vendor/autoload.php')) {
$loader = include 'vendor/autoload.php';
}
$zf2Path = false;
if (is_dir('vendor/ZF2/library')) {
$zf2Path = 'vendor/ZF2/library';
} elseif (getenv('ZF2_PATH')) { // Support for ZF2_PATH environment variable or git submodule
$zf2... | PHP | init_autoloader.php | arvind2110/ZF2-Collection-Form | mit | 999 | 34 | codeparrot/github-code |
71534a217b41c2df07c21d345ec1791fef64b3a6fa7cbdbfad3edaa967588217 | <!DOCTYPE html>
<html>
<head>
<title>birds</title>
<style type="text/css">
body{font-family: sans-serif}
/*input{display: block}*/
#map {
height: 500px;
width: 500px;
margin-bottom: 30px;
}
</style>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no">
<meta ... | HTML | public/map.html | benfoxall/birds | mit | 5,698 | 218 | codeparrot/github-code |
a358af5e9f24e64aba64be0b86fb4a6f049667080c7247273158d5ecbd5df080 | using Newtonsoft.Json;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using UnityEngine;
using UnityEngine.SceneManagement;
using UnityStandardAssets.CrossPlatformInput;
using UnityStandardAssets.Vehicles.Car;
public class Environment : MonoBehaviour {
... | C# | simulator/Assets/Scripts/Environment.cs | Amathlog/rl-unity | mit | 10,764 | 324 | codeparrot/github-code |
a787efdba291d12b362b0d6161019c8564bbc594b4a8259ea1e007abb68efb28 | #!/usr/bin/env bash
cat << "EOF"
.`
-dMMs
+MMMMMo
.dMMMMMMN-
+NMMMMMMMMd`
`hMMMMMMMMMMMo
-mMMMMMMMMMMMMN.
... | Shell | addrepo-pin.sh | adafruit/Adafruit-Occidentalis | mit | 2,337 | 65 | codeparrot/github-code |
2beb8daded42cd924fad9f824524d134353ccc558b048e5914d37e2fd7178ffd | /*=============================================================================
Copyright (c) 2012, Ludo Sapiens Inc. and contributors.
See accompanying file LICENSE.txt for details.
=============================================================================*/
#include <Fusion/Widget/Canvas.h>
#include <Fusion/... | C++ | Projects/Fusion/Widget/Canvas.cpp | LudoSapiens/Dev | mit | 7,948 | 338 | codeparrot/github-code |
158ae57e42b47db152822e6ffcf4d1e98cb4de35728c251053ea03c634e119a4 | <!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>HomelessNet | Log in</title>
<!-- Tell the browser to be responsive to screen width -->
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="vie... | HTML | hln/templates/login.html | dpkshrma/SocialCops | mit | 3,240 | 81 | codeparrot/github-code |
74ed62f6b89e99f22b4491ad8dc550dfb7ef4c947f525925efb0633f3de1c6a4 |
#include "Log.h"
#include "Socket.h"
#include <string.h>
#include <iostream>
#include <atomic>
#define SOCKET_MAX_CONNECTIONS 20
#if (defined __CYGWIN__ || defined __GNUC__)
#include <unistd.h>
#include <stdio.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netdb.h>
#define SOC... | C++ | Lib/Core/Src/Socket.cpp | Eelco81/server-test-project | mit | 8,470 | 323 | codeparrot/github-code |
3080cfef7b73f48d1fcd5b581cfa0fb57f131640ce5cf8cae098b7fc0eb04e42 |
CREATE OR REPLACE FUNCTION sp_cancela_reserva()
RETURNS trigger AS
$BODY$
begin
insert into log_cancela_reserva(data,id_reserva) values(now(),old.id_reserva);
return null;
end;
$BODY$
LANGUAGE plpgsql VOLATILE
COST 100;
ALTER FUNCTION sp_cancela_reserva()
OWNER TO postgres;
create trigger tr_cancela_reserv... | SQL | hotel-living-ppi2/sql/8.sql | ceciliassis/UFU | mit | 1,892 | 76 | codeparrot/github-code |
cc316f77f7e097fd6204afef3de2346bc53d8d5a550d98e362ef4a79e03913ba | using System;
using System.Collections.Generic;
using AutomaticTypeMapper;
using Microsoft.Xna.Framework.Graphics;
using SixLabors.ImageSharp;
using SixLabors.ImageSharp.Drawing.Processing;
using SixLabors.ImageSharp.Formats.Png;
using SixLabors.ImageSharp.Processing;
namespace EOLib.Graphics
{
[MappedType(BaseTy... | C# | EOLib.Graphics/NativeGraphicsManager.cs | ethanmoffat/EndlessClient | mit | 3,893 | 113 | codeparrot/github-code |
85eb9620f982f93f681effa52d7aabd54f7e49198d472d3cc826147d7793f0db | using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Xml.Linq;
using TremAn.Decorators.AreaOfInterest;
using TremAn.Models.AreaOfInterest;
namespace TremAn.ViewModels.AreaOfInterest
{
public class TracerViewModel : INotifyPropertyChanged
{
public... | C# | TremAn/ViewModels/AreaOfInterest/TracerViewModel.cs | binao/TremAn | mit | 3,738 | 106 | codeparrot/github-code |
5935b383ae44fce93b8e36e1214429986aec5face8be6067dada8e444d248334 | module Transmat
class Money
module Arithmetic
def -@
Money.new currency, -amount
end
def == other
amount == other.amount && currencies_match?(other)
end
def eql? other
self == other
end
def <=> other
assert_matching_currencies other
... | Ruby | lib/transmat/money/arithmetic.rb | juliogreff/transmat | mit | 873 | 40 | codeparrot/github-code |
e169f40995b5582f774db540a1bd3e880e1e864cb2a03308df9b7834e1a5127f | import json
import os
from pokemongo_bot import inventory
from pokemongo_bot.base_dir import _base_dir
from pokemongo_bot.base_task import BaseTask
from pokemongo_bot.human_behaviour import action_delay
from pokemongo_bot.services.item_recycle_worker import ItemRecycler
from pokemongo_bot.tree_config_builder import Co... | Python | pokemongo_bot/cell_workers/recycle_items.py | dmateusp/PokemonGo-Bot | mit | 5,073 | 131 | codeparrot/github-code |
cee7131eae8cc5bf16a7d44b897184aa0a5b2779d66a74c3c576f91f062941b5 | {-# LANGUAGE Haskell2010
, MagicHash
, FlexibleInstances
, FlexibleContexts
, MultiParamTypeClasses
, FunctionalDependencies
#-}
{-# OPTIONS
-Wall
-fno-warn-missing-signatures
-fno-warn-name-shadowing
#-}
-- | This module contains mostly boiler plate code that is needed
-- for method ... | Haskell | src/Foreign/Java/Types.hs | fehu/haskell-java-bridge-fork | mit | 9,256 | 274 | codeparrot/github-code |
2b7717293c357ab56e76066957d6726c8ac76209932a07f7c0ae2e2b74a3d99e | import org.junit.Test;
import java.util.Stack;
import static junit.framework.Assert.assertEquals;
/**
* https://leetcode.com/problems/min-stack/
*/
public class MinStack {
class StackItem {
int value;
int min;
StackItem(int value, int min) {
this.value = value;
... | Java | min-stack/src/MinStack.java | bunnyc1986/leetcode | mit | 1,302 | 63 | codeparrot/github-code |
6d28888a529c4a0f22c02e27ab6322e53e7691b8bb1adfb4ddcf472177257b2e | <link rel="stylesheet" type="text/css" href="<?php echo base_url(); ?>js/sweetalert2.css">
<script src="<?php echo base_url(); ?>js/sweetalert2.min.js"></script>
<script>
function hapusData(education_id) {
var id = education_id;
swal({
title: 'Are You Sure ?',
text: 'This Dat... | PHP | application/views/master/education_view.php | jamboljack/hrdsystem | mit | 7,566 | 204 | codeparrot/github-code |
12ea81ae8102f1cacf9ef92ec758e523715d8933bda6ebbe86c52f5e7be21b57 | class TreeNode:
def __init__(self, x):
self.val = x
self.left = None
self.right = None
class Solution:
node = parent = None
def deleteNode(self, root: TreeNode, key: int) -> TreeNode:
# search for the node and its parent
self.findNodeAndParent(root, key)
if s... | Python | LeetCode/Session3/DeleteNodeBST.py | shobhitmishra/CodingProblems | mit | 2,274 | 81 | codeparrot/github-code |
a5056b4e5cf298dd9c83ae81d1b6ec9e435454cc1c6e767974c427b9746d5c8e | /*
*
*/
package umlClassMetaModel.diagram.navigator;
import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.emf.common.ui.URIEditorInput;
import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.ecore.util.EcoreUtil;... | Java | src/MetaModels.UmlClass.diagram/src/umlClassMetaModel/diagram/navigator/UmlClassMetaModelNavigatorActionProvider.java | KuehneThomas/model-to-model-transformation-generator | mit | 4,850 | 181 | codeparrot/github-code |
410192785f117aaecc1509057fd1785eccad68329a89b84000af8a2e1795b3a1 | var assert = require('assert');
describe('src/components/model/classes/Collection', function () {
var Collection = require('../../../../src/components/model/classes/Collection');
var collection;
var handler = function (event, changes) {
callbacks[event]++;
};
var callbacks = {
add:... | JavaScript | test/components/model/classes/Collection.js | moduleon/nucleon | mit | 2,216 | 81 | codeparrot/github-code |
50a5caf2e963660cf5448d76995fd516d595bc5c2888bd06fedcb7a549aa5371 | using System.IO;
using System.Numerics;
using OpenSage.Mathematics;
namespace OpenSage.FileFormats.W3d
{
public sealed class W3dRingHeader
{
public uint ChunkType { get; private set; }
public uint ChunkSize { get; private set; }
public uint Version { get; private set; }
publ... | C# | src/OpenSage.FileFormats.W3d/W3dRingHeader.cs | feliwir/openSage | mit | 2,976 | 91 | codeparrot/github-code |
38544bafd7ce789e7589b62b9fa3050d831cc496fcbdb425454f145ff32c3f81 | local pngEncode = require('libs.image_ops.png_encode')
local pngDecode = require('libs.image_ops.png')
local min = math.min
local max = math.max
local floor = math.floor
local png = {}
local function clamp(a)
return max(0, min(a, 255))
end
function png:getPixel(x, y) -- explicit
local i = (x + self.width * y) *... | Lua | libs/png.lua | LazyShpee/discord-egobot | mit | 2,024 | 74 | codeparrot/github-code |
8b35ff0a838343f777e4543968450a3360b2d7ce73717232a78d71407441d5f9 | /*
* This file is part of TechReborn, licensed under the MIT License (MIT).
*
* Copyright (c) 2018 TechReborn
*
* 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, inc... | Java | src/main/java/techreborn/tiles/TileGenericMachine.java | Dimmerworld/TechReborn | mit | 3,620 | 128 | codeparrot/github-code |
38ea5f6e3ad7ae71f12d372413069180c268cc664f7d4f77362a20af489fe72f | <!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>写在学期初:年中总结与规划</title>
<meta name="description" content="转眼已经成为一枚研二老学姐了,趁学期初不算太忙碌,对上半年进行一下小小的总结,并给自己下半年列个To do list。望每一天都充实而有... | HTML | _site/Blog/review-and-plan/index.html | wingcastxp/wingcastxp.github.io | mit | 12,423 | 290 | codeparrot/github-code |
696ed51072b692d949bb9d6264f7cc72b10c1ee77fd6d2577260549133317964 | package com.ke2g.cued_recall;
import android.app.Activity;
import android.content.Intent;
import android.content.SharedPreferences;
import android.preference.PreferenceManager;
import android.support.v7.app.ActionBarActivity;
import android.os.Bundle;
import android.util.Log;
import android.view.Menu;
import android.v... | Java | app/src/main/java/com/ke2g/cued_recall/LoginActivity.java | ke2g/cuedRecall | mit | 5,334 | 153 | codeparrot/github-code |
0bd80cfab293fd3d7e8ca6434924daf11e842799a209d61af7611c8601980d4a | package BusinessLogic.ConnectionStates;
import BusinessLogic.ActualConnection;
import BusinessLogic.Message;
public class MessageMenuState implements ConnectionState{
public void dial(String key, ActualConnection connection)
{
if (key.equals("1"))
{
String output = "";
Messag... | Java | src/BusinessLogic/ConnectionStates/MessageMenuState.java | PatriciaRosembluth/VoiceMailSimulator | mit | 1,243 | 40 | codeparrot/github-code |
77921de949387e17d69494392fb08892ececbeb31c884004660fc41cfa8867f4 | namespace Nettle.Compiler.Parsing
{
using Nettle.Compiler.Parsing.Blocks;
using System;
using System.Linq;
/// <summary>
/// Represents a model binding code block parser
/// </summary>
internal sealed class ModelBindingParser : NettleParser, IBlockParser
{
/// <summary>
... | C# | src/Nettle/Compiler/Parsing/ModelBindingParser.cs | craigbridges/Nettle | mit | 2,243 | 74 | codeparrot/github-code |
f8a9cd97ebf7f9df74623ae9d7509b3ec0c49ef238d3b704dc3ff02d1a1045f6 | # coding=utf-8
"""
Collects all number values from the db.serverStatus() command, other
values are ignored.
#### Dependencies
* pymongo
"""
import diamond.collector
from diamond.collector import str_to_bool
import re
import zlib
try:
import pymongo
pymongo # workaround for pyflakes issue #13
except Impo... | Python | src/collectors/mongodb/mongodb.py | metamx/Diamond | mit | 12,462 | 304 | codeparrot/github-code |
62757562187f0a3c957b92c6abf5a9a89d198e05a89c2669daad221543ea1ab8 | using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Projectile : MonoBehaviour {
public float duration = 1.0f;
public int damage = 1;
public bool destroyOnHit = false;
void Start () {
}
void Update () {
if (duration > 0.0f) {
duration -... | C# | Unity/LD37/Assets/Scripts/Items/Projectile.cs | sasvdw/LD37 | mit | 792 | 35 | codeparrot/github-code |
e3f0efd37b626f3a37fa94286510e43b1e092f017abc7136071371827bc16a43 | namespace Gestion.Forms {
partial class Fibonachi {
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <para... | C# | Forms/Fibonachi.Designer.cs | Altairseven/Gestion | mit | 3,750 | 94 | codeparrot/github-code |
b3dd02ef5c5ca313a68a774963e54870518340b29bf0375a72dbef5b47ee78ec | # -*- coding: utf-8 -*-
# @Author: yancz1989
# @Date: 2017-01-17 23:43:18
# @Last Modified by: yancz1989
# @Last Modified time: 2017-02-22 20:33:29
import utilities as util
from utilities import parse_image_file, filterBoxes, voxel_2_world, mkdir
import numpy as np
import os
import json
import sys
from PIL import I... | Python | scan.py | yancz1989/cancer | mit | 2,610 | 79 | codeparrot/github-code |
9b4b7534245f5d7409e11f2c4d25eb1c30797b2d5e403838f2b68b1a98bfb34d | /**
* Created by JiaHao on 27/10/15.
*/
var fs = require('fs');
var path = require('path');
var normalizeNewline = require('normalize-newline');
function occurenceIndexes(inp, toFind) {
var indices = [];
var element = toFind;
var idx = inp.indexOf(element);
while (idx != -1) {
indices.push(i... | JavaScript | lib/parser.js | jiahaog/brat | mit | 2,364 | 100 | codeparrot/github-code |
92401e78a880c38ddf3c19a8edcd1e6c92fae5da3e7cb6b41f0bb7323750b8bd | import React, { Component } from 'react'
import {
Circle,
FeatureGroup,
LayerGroup,
Map,
Popup,
Rectangle,
TileLayer,
} from '../../src'
export default class OtherLayersExample extends Component {
render () {
const center = [51.505, -0.09]
const rectangle = [
[51.49, -0.08],
[51.5,... | JavaScript | example/components/other-layers.js | yavuzmester/react-leaflet | mit | 1,171 | 45 | codeparrot/github-code |
92b73be1c953094a8bde9aad57b3bc69cc961a629a716c2ea078fe042baf58b4 | <?php
/*
* Gwatkin, 15146508
*/
namespace cgwatkin\a3\model;
use cgwatkin\a3\exception\MySQLDatabaseException;
use mysqli;
/**
* Class Model
*
* Connects to and configures the MySQL database with dummy data for testing.
*
* Base code provided by Andrew Gilman <a.gilman@massey.ac.nz>
*
* @package cgwatkin/a3
... | PHP | web/src/model/Model.php | CaiGwatkin/PHP_StockControlSystem | mit | 4,842 | 122 | codeparrot/github-code |
7291ed0499c214976122e7ab69d74e8fee8ba974f1353bdfdcb7a5219a8f0df5 | namespace ProjectManagement
{
partial class EntryForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/... | C# | ProjectManagement/EntryForm.Designer.cs | RuzmanovDev/ProjectManagementSystem | mit | 4,124 | 106 | codeparrot/github-code |
3637f2b3b045089844aa9a7b1d681800a67c4bb2dab058dbc9d3b83015b45d2a | <?php
namespace Frontiernxt\Models;
use Illuminate\Notifications\Notifiable;
use Illuminate\Foundation\Auth\User as Authenticatable;
class User extends Authenticatable
{
use Notifiable;
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'... | PHP | src/Models/User.php | codelust/laravel-skeleton | mit | 689 | 38 | codeparrot/github-code |
9c45f627023100806b72bed2330bb79265377f38d0d8fd87e84f460924110a5c | /**
*
*/
package com.sivalabs.jcart.common.services;
import javax.mail.MessagingException;
import javax.mail.internet.MimeMessage;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.mail.MailException;
import org.spri... | Java | jcart-core/src/main/java/com/sivalabs/jcart/common/services/EmailService.java | sivaprasadreddy/jcart | mit | 1,464 | 55 | codeparrot/github-code |
41067d450ff200635610b5c2144918597d6dbc4da0fb26b4c1ea332f61a4f394 | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Http\Requests;
use Auth;
// models
use App\User;
use App\models\Student;
use App\models\Opd;
class AdminStudents extends Controller
{
/*
* E S T U D I A N T E S
* ----------------------------------------------------------------
*... | PHP | app/Http/Controllers/AdminStudents.php | GobiernoFacil/vinculacion | mit | 2,152 | 77 | codeparrot/github-code |
75151a1ea2276b1525aea1bd2998cafc0e2f27f0afa588b8c69376762da08868 | <?php
/* TwigBundle:Exception:exception_full.html.twig */
class __TwigTemplate_c7b8e0c7c14064ee8fe3074f2af4519e extends Twig_Template
{
public function __construct(Twig_Environment $env)
{
parent::__construct($env);
$this->parent = $this->env->loadTemplate("TwigBundle::layout.html.twig");
... | PHP | app/cache/prod/twig/c7/b8/e0c7c14064ee8fe3074f2af4519e.php | hechec/StoNinoSF | mit | 3,162 | 76 | codeparrot/github-code |
ab27a5dc3c287b348574cf5ba3dcdefcde83d5cefca7826d9e735dda7fd7fbf9 | --[[
# Element: ClassPower
Handles the visibility and updating of the player's class resources (like Chi Orbs or Holy Power) and combo points.
## Widget
ClassPower - An `table` consisting of as many StatusBars as the theoretical maximum return of [UnitPowerMax](http://wowprogramming.com/docs/api/UnitPowerMax.html).
... | Lua | elements/classpower.lua | oUF-wow/oUF | mit | 10,588 | 358 | codeparrot/github-code |
ba89bd976b6c241fdb6c200f22b6bdbe13cb821d53c6748f6f974a69d85fcb7d | package cz.vhromada.utils.file.gui;
import java.io.IOException;
import java.nio.file.FileVisitResult;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.nio.file.SimpleFileVisitor;
import java.nio.file.attribute.BasicFileAttributes;
import java.util.ArrayList;
import java.ut... | Java | src/main/java/cz/vhromada/utils/file/gui/CopyingFileVisitor.java | vhromada/File_utils | mit | 5,102 | 146 | codeparrot/github-code |
738abd7bd0e2a484441ca5318147d186d9195023bf23d02e88e3e28b37ce0743 | #ifndef Magnum_SceneGraph_Drawable_h
#define Magnum_SceneGraph_Drawable_h
/*
This file is part of Magnum.
Copyright © 2010, 2011, 2012, 2013, 2014, 2015
Vladimír Vondruš <mosra@centrum.cz>
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and a... | C | src/Magnum/SceneGraph/Drawable.h | ashimidashajia/magnum | mit | 10,571 | 288 | codeparrot/github-code |
c7ed7087842e69ce83bb798fb566417d9560a5fa9f4c1e20ae5566c8cb9e24b6 | package api
import (
"net/http"
"strconv"
"time"
"gopkg.in/gin-gonic/gin.v1"
"github.com/knopt/iot/backend/api/model"
"github.com/knopt/iot/backend/error"
)
// GetStatisticsByDeviceDataType by given requests parameters
func (api *Api) GetStatisticsByDeviceDataType(context *gin.Context) {
deviceID := context.... | GO | backend/api/statistic.go | knopt/iot | mit | 2,234 | 88 | codeparrot/github-code |
eede5ec585fe5d8a1606d85bbaac5d3d30d1d3197c9f054638db5cf4b930485b | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="">
<meta name="author" content="">
<title>Solar Energy</title>
<!-- Bootstrap core CSS -->
<link href=... | HTML | index.html | hindaljabr/solarenergysavings | mit | 9,222 | 250 | codeparrot/github-code |
f4d62e3b83a3a93edcbd6996b2928da3e72951f5db0fa0f328ed36d531783a03 | angular.module('green-streak.controllers', ['LocalStorageModule'])
.controller('MenuController', function ($scope, $location, MenuService) {
// "MenuService" is a service returning mock data (services.js)
$scope.list = MenuService.all();
$scope.goTo = function (page) {
console.... | JavaScript | www/js/controllers.js | GeorgiCodes/green-streak-ui | mit | 4,242 | 133 | codeparrot/github-code |
ce61307e05b42b3e03055a26f111a900793f2da9e948d7d6b7479eddb8ce49eb | <?php //-->
/**
* This file is part of the Cradle PHP Command Line
* (c) 2016-2018 Openovate Labs
*
* Copyright and license information can be found at LICENSE
* distributed with this package.
*/
namespace Cradle\Framework\CommandLine;
use Cradle\Framework\CommandLine;
use Cradle\Framework\Exception;
use Cradle... | PHP | src/CommandLine/Package.php | CradlePHP/framework | mit | 5,588 | 206 | codeparrot/github-code |
ba34460d239fcace110d9ceb9ecb024039e3a307e83e2937d5316f6766cb8715 | // Copyright (c) 2014-2017 The Innova Core developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "activemasternode.h"
#include "consensus/validation.h"
#include "darksend.h"
#include "init.h"
#include "governan... | C++ | src/masternode.cpp | innovacoin/innova | mit | 36,708 | 923 | codeparrot/github-code |
52c5ce8a2186d15f0a1132e8833ad58808071fac4d02f5b1e9888b48ed9145a6 | // Copyright 2014 Manu Martinez-Almeida. All rights reserved.
// Use of this source code is governed by a MIT style
// license that can be found in the LICENSE file.
package gin
import (
"log"
"os"
)
const GIN_MODE = "GIN_MODE"
const (
DebugMode string = "debug"
ReleaseMode string = "release"
TestMode st... | GO | mode.go | bfosberry/gin | mit | 875 | 54 | codeparrot/github-code |
d535eeece0ab1e3136f7f95ec412fd387d115e39fc4a614e5e742b7ec3b55b13 | const mongoose = require('mongoose')
let literatureSchema = mongoose.Schema({
category: { type: String, required: true},
name: { type: String, required: true },
description: { type: String },
content: { type: String, required: true },
author: { type: mongoose.Schema.Types.ObjectId, required: true, ... | JavaScript | server/data/Literature.js | losko/CodeNameSite | mit | 1,477 | 47 | codeparrot/github-code |
98f2908c66744b87d31e0f019bf2e95063cc737356df876facff839c0aa45f66 | /*
*
* Copyright (C) 2008-2012, OFFIS e.V. and ICSMED AG, Oldenburg, Germany
* Copyright (C) 2013-2015, J. Riesmeier, Oldenburg, Germany
* All rights reserved. See COPYRIGHT file for details.
*
* Source file for class DRTBeamLimitingDeviceLeafPairsSequence
*
* Generated automatically from DICOM PS 3.3-201... | C++ | conversion/dcmtk/dcmrt/libsrc/drtbldls.cc | cronelab/radroom | mit | 17,508 | 583 | codeparrot/github-code |
52025e4e68dd4e7922eb020e895d6a4d42a0cc03f7f0f5fbe2f1365bef4fdf3d |
// Saves options to chrome.storage
function save_options () {
var saveDict = []
var i = 1
$('input').map(function () {
var dict = {
id: 'scbcc' + i,
value: this.value
}
i++
console.log('save: ', dict)
ga('send', 'event', 'setting', 'save', this.value)
saveDict.push(dict)
}).... | JavaScript | options.js | samcheuk/boring-copy-cat | mit | 2,881 | 85 | codeparrot/github-code |
a488e3af7024cd0130a85039c777c2c5779dcc7d262edba055418f4b8b0f3d28 | <?php
namespace Service;
use Core\Service;
use Db\Group\GetInvitations;
use Db\Group\Search;
use Model\Group as GroupModel;
use Db\Group\GetByUserId;
use Db\Group\GetById;
use Db\Group\Store;
class Group extends Service
{
/**
* @param $userId
* @return GroupModel[]
* @throws \Core\Query\NoResultException
*... | PHP | library/Service/Group.php | dnl-jst/ownsocial | mit | 1,829 | 90 | codeparrot/github-code |
4c71930b0a221c3515374e7d2038156ea9788e5969e295a0a34bd0ba6902aa6b | class User < ApplicationRecord
attr_accessor :remember_token, :activation_token, :reset_token
before_save :downcase_email
before_create :create_activation_digest
VALID_EMAIL_REGEX = /\A[\w+\-.]+@[a-z\d\-]+(?:\.[a-z\d\-]+)*\.[a-z]+\z/i
validates :email, presence: true, length: { maximum: 255 }, format: { with:... | Ruby | app/models/user.rb | professorNim/blorg | mit | 2,289 | 80 | codeparrot/github-code |
59c0e9fef01575bc81d79945eabf3f6f323ea6e7f6cbbb16c2d20e6bdc2d6ea1 | int reqAuthenticate(const dict &req, int reqid);
int reqUserLogin(const dict &req, int reqid);
int reqUserLogout(const dict &req, int reqid);
int reqUserPasswordUpdate(const dict &req, int reqid);
int reqTradingAccountPasswordUpdate(const dict &req, int reqid);
int reqUserLogin2(const dict &req, int reqid);
int r... | C | vnpy/api/nh/generator/futures/nh_futures_header_function.h | bigdig/vnpy | mit | 4,309 | 155 | codeparrot/github-code |
3db52228f9230b1240697fd01aab50cff51ccd967d22a3a8c17ada3ec5a86f4f | package orestes.bloomfilter.redis.helper;
import java.util.ArrayList;
import java.util.List;
import java.util.Map.Entry;
import java.util.Random;
import java.util.Set;
import redis.clients.jedis.Jedis;
import redis.clients.jedis.JedisPool;
import redis.clients.jedis.JedisPoolConfig;
import redis.clients.jedis.Pipelin... | Java | src/main/java/orestes/bloomfilter/redis/helper/RedisPool.java | Crystark/Orestes-Bloomfilter | mit | 4,691 | 148 | codeparrot/github-code |
b1168b1e5e38837b1cb4bd994e7484da19f9bbb8b90f7a10729cdd864a6c6cc8 | <?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*
| -------------------------------------------------------------------
| DATABASE CONNECTIVITY SETTINGS
| -------------------------------------------------------------------
| This file will contain the settings needed to access your database.
|
|... | PHP | application/config/database.php | ucantseeme/p2 | mit | 4,531 | 97 | codeparrot/github-code |
57a45e2ef077d6044b1af35277a900ea91ec28eba6fd46da855665dfb4713b65 | /* Copyright (c) 2020-2022 hors<horsicq@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
* to use, copy, mod... | C | xne.h | horsicq/Formats | mit | 5,766 | 146 | codeparrot/github-code |
969a43bc421274da4a4bd0ebe91c8a1ee76b7f72d8c0208b2f5edcda72b9a222 | /**
* @Author: Yingya Zhang <zyy>
* @Date: 2016-07-08 11:29:00
* @Email: zyy7259@gmail.com
* @Last modified by: zyy
* @Last modified time: 2016-07-10 22:18:85
*/
import {
notexist,
isEmpty
} from 'type'
import {
calcHeight,
remove,
dataset
} from 'dom'
describe('dom', () => {
it('calcHeight', () => ... | JavaScript | test/unit/specs/dom/index_spec.js | zoro-js/zoro-base | mit | 1,346 | 57 | codeparrot/github-code |
c7ec963b27f891bb01624514872702323875d504be2242046e68c42a50815332 | using UnityEngine;
using System.Collections;
public class EnemyAI : MonoBehaviour {
public Transform Target;
public float TargetDist;
public bool WillChase;
public float WalkingSpeed;
public Vector3 TopPatrolStart;
public Vector3 TopPatrolEnd;
public Vector2 SidePatrolStart;
pub... | C# | PortoGameJam2016/Assets/Scripts/EnemyAI.cs | NamefulTeam/PortoGameJam2016 | mit | 3,120 | 94 | codeparrot/github-code |
90ff4c668003bb971d8b962a64b68e4df0e8cb97635a5e45e3dee4a5445dbeb3 | package service
import (
"math"
"math/rand"
"time"
"github.com/rlister/let-me-in/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws"
"github.com/rlister/let-me-in/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/request"
)
// DefaultRetryer implements basic retry logic using exponential backoff for
// most ... | GO | Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/service/default_retryer.go | rlister/let-me-in | mit | 1,638 | 52 | codeparrot/github-code |
ec39fe609800682552c683561fd3cabf1e507e8be0d99d35c64edd3829fa2e68 | using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Diagnostics.CodeAnalysis;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Net.Http;
using System.Net.Http.Formatting;
using System.Net.Http.Headers;
using System.W... | C# | FineBot/FineBot.WepApi/Areas/HelpPage/SampleGeneration/HelpPageSampleGenerator.cs | prinzo/Attack-Of-The-Fines-TA15 | mit | 17,175 | 372 | codeparrot/github-code |
6ae9b857d3076aaebcf7e9362f7648978e36fbe39c564ddf5bf8369241394c95 | export function Fragment(props, ...children) {
return collect(children);
}
const ATTR_PROPS = '_props';
function collect(children) {
const ch = [];
const push = (c) => {
if (c !== null && c !== undefined && c !== '' && c !== false) {
ch.push((typeof c === 'function' || typeof c === 'obje... | JavaScript | esm/vdom-my.js | yysun/apprun | mit | 10,531 | 290 | codeparrot/github-code |
4efad85aa246e0192ba4b77fe9760d28af62eda93eccb875844cf9d91b10cd44 | <?php
/**
* LitePubl CMS
*
* @copyright 2010 - 2017 Vladimir Yushko http://litepublisher.com/ http://litepublisher.ru/
* @license https://github.com/litepubl/cms/blob/master/LICENSE.txt MIT
* @link https://github.com/litepubl\cms
* @version 7.08
*/
namespace litepubl\comments;
use litepubl\view\Lang;... | PHP | lib/comments/Json.php | litepubl/cms | mit | 5,142 | 208 | codeparrot/github-code |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.