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
52b8ce97a0a9f35d5d1f5ef7b73aaca6815b40786b17ca4126cf490ca0362a9d
package com.noctem.web.rest; import com.codahale.metrics.annotation.Timed; import com.noctem.domain.UserGroup; import com.noctem.service.UserGroupService; import com.noctem.web.rest.util.HeaderUtil; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.http.HttpHeaders; import org.springf...
Java
src/main/java/com/noctem/web/rest/UserGroupResource.java
gcorreageek/noctem
mit
4,956
119
codeparrot/github-code
16d3454ae34ceab960a69f93a51cca552c035824892ee74600c803e25b9437f6
package com.zahradtj.bmb_attendance_tracker; /** * Created by Trey on 8/29/2015. * * This class is used to display custom layout * * _______________________________ * | Picture |_Last,_First________| * | | ID # | * |_________|____________________| */ import android.app.Activity; import...
Java
app/src/main/java/com/zahradtj/bmb_attendance_tracker/MemberAdapter.java
zahradtj/BMB-Attendance-Tracker
mit
1,764
72
codeparrot/github-code
abe0ee8beefe3124114acfd7c55a723cb8fe44b321214bc5e666d0514d3d1ab9
package net.will_co21.application.googleAPIImageSearch; import java.net.HttpURLConnection; import java.net.SocketTimeoutException; import java.util.Optional; import java.util.function.BiFunction; import java.util.function.Consumer; public class HttpDownloadTaskConsumer implements Consumer<HttpDownloadTask> { ...
Java
src/main/java/net/will_co21/application/googleAPIImageSearch/HttpDownloadTaskConsumer.java
j6k1/googleAPIImageSearch
mit
1,745
43
codeparrot/github-code
819bf176a993cd2599636855a0f935e9d54f1a291668ca9ad71c38fba794ebbd
import { GET_LIST, GET_ONE, CREATE, UPDATE } from './dataFetchActions'; const DUMMY_RESPONSE = { id: 36, title: 'Changed!', }; const dummyDataProvider = props => { const { variant, params = {} } = props; switch (variant) { case GET_ONE: case GET_LIST: return new Promise(resolve => { setT...
JavaScript
frontend/src/lib/dataProviders/dummyDataProvider.js
jf248/scrape-the-plate
mit
984
41
codeparrot/github-code
2be9495579e9be74ff9fe18f170ca1a6b69cff79484c1427185c30410aaee5f2
package com.allengarvey.annuncified; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.telephony.PhoneStateListener; import android.telephony.TelephonyManager; import android.util.Log; import java.util.ArrayList; public class CallReceiver extends...
Java
app/src/main/java/com/allengarvey/annuncified/CallReceiver.java
allen-garvey/annuncified
mit
2,928
84
codeparrot/github-code
48397430111095e4ce0f5fd3f32b30c7f0fdbb344e2c4e69a3180c8a45153b6f
<?php if(!class_exists('Ultimate_Icon_Manager_Param')) { class Ultimate_Icon_Manager_Param { function __construct() { $GLOBALS['pid']=0; $id=null; $pcnt=null; if(defined('WPB_VC_VERSION') && version_compare(WPB_VC_VERSION, 4.8) >= 0) { if(function_exists('vc_add_shortcode_param')) ...
PHP
web/app/plugins/Ultimate_VC_Addons/params/Ultimate_Icon_Manager_Param.php
cimocimocimo/staydrysystems.com
mit
3,535
122
codeparrot/github-code
9af5dd5a88a88badd9b7dde60a5b438b44c454abbb6fce4954bc7f5d999ba945
# Makefile for Sphinx documentation # # You can set these variables from the command line. SPHINXOPTS = SPHINXBUILD = sphinx-build PAPER = BUILDDIR = _build # User-friendly check for sphinx-build ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1) $(error The '$(SPHINXBUILD)' command w...
Makefile
docs/Makefile
dotide/dotide.py
mit
6,762
178
codeparrot/github-code
b766e18f9969158b1d13ce6f2e1231f8a49516d79cf53833593dda57c4ab5ed9
const { join } = require('path'); const webpack = require('webpack'); const nodeExternals = require('webpack-node-externals'); const CleanWebpackPlugin = require('clean-webpack-plugin'); const env = process.env.NODE_ENV; const isProduction = typeof env !== 'undefined' && env === 'production'; const mode = isProduction...
JavaScript
nest-boilerplate/webpack.config.js
thoughtbit/node-web-starter
mit
1,068
44
codeparrot/github-code
906099df1b2a9119b318a3b04f6cc5f6132f1d7cc259f6668851a7f47857b918
//class extend function function extend(Child, Parent) { var F = function(){}; F.prototype = Parent.prototype; Child.prototype = new F(); Child.prototype.constructor = Child; Child.uber = Parent.prototype; } //r.path function function pathML(a,b,c,d){ c = c || ''; d = d || ''; var ml = ...
JavaScript
MindMap/js/function.js
watership/exercise-snake
mit
4,092
132
codeparrot/github-code
f722665b9cd1838f5a28d3fb22ac1a05e3246ec592c87ee8c116e2ec8b8f8910
module Ev3dev class Led < Device attr :paths PATH = "/sys/class/leds" GREEN = [255, 0] RED = [ 0, 255] AMBER = [255, 255] MAX_BRIGHTNESS = 255 def initialize() raise "couldn't find LED attributes" unless File.exist?(PATH) @left_green = set_led_path("left" , "gr...
Ruby
lib/ev3dev/led.rb
quake/ev3dev_ruby
mit
4,785
183
codeparrot/github-code
52beba3bb51f74ef02268f52744d21a18803860a7571fd4f543325a82e639c76
import { isArray, tail, castArray } from 'lodash'; function CommandsAndQueries({ defaultType }) { return { queries: { atStartOf(editor, node) { const { selection } = editor.value; return selection.isCollapsed && selection.start.isAtStartOfNode(node); }, getAncestor(editor, first...
JavaScript
packages/netlify-cms-widget-markdown/src/MarkdownControl/plugins/CommandsAndQueries.js
netlify/netlify-cms
mit
5,740
157
codeparrot/github-code
834b07457009502b45e10ab6b525d8c8bbc4a0b380c07d55547ed6e2234f2353
<?php namespace RideChicago\AutoBundle\Exceptions; use Symfony\Component\Validator\ConstraintViolationList; class ContraintViolationException extends \Exception { protected $_errorList = array(); /** * @param \Symfony\Component\Validator\ConstraintViolationList $errorList * @param type $code * @param typ...
PHP
src/RideChicago/AutoBundle/Exceptions/ContraintViolationException.php
mattlo/old-anonymous-project
mit
1,441
64
codeparrot/github-code
34a7e46e9d369d4e92142a1d0c9742a7c54cd024b7ce7b8071cde92a3f9bf019
package city.animations; import java.awt.Color; import java.awt.Dimension; import java.awt.Graphics2D; import java.util.HashMap; import java.util.Map; import utilities.RestaurantJPWaiterBase; import city.bases.Animation; public class RestaurantJPWaiterAnimation extends Animation{ private RestaurantJPWaiterBase ...
Java
src/city/animations/RestaurantJPWaiterAnimation.java
zhangtdavid/SimCity
mit
3,405
134
codeparrot/github-code
e6f946378ee4d285b8f47cf53a45df67a191e2d7aeb82cf4a86c39a2916a32e4
package operations //go:generate ffjson $GOFILE import ( "github.com/denkhaus/bitshares/types" "github.com/denkhaus/bitshares/util" "github.com/juju/errors" ) func init() { types.OperationMap[types.OperationTypeCommitteeMemberCreate] = func() types.Operation { op := &CommitteeMemberCreateOperation{} return o...
GO
operations/committeemembercreateoperation.go
denkhaus/bitshares
mit
1,155
44
codeparrot/github-code
a5619a5f58ff26c8c692f8ade943de9f6f0499bdf62d05ed5693667e1444c78c
<?php defined('BASEPATH') OR exit('No direct script access allowed'); class M_business extends CI_Model { function getAll($limit=1000, $offset = 0){ $exec = $this->db->get_where('business', array(), $limit, $offset); return $exec->result_array(); } function get($param, $limit=1000, $offset = 0){ $ex...
PHP
application/models/admin/M_business.php
adityaputra/business-directory
mit
934
34
codeparrot/github-code
bfe13113bda1c46c065cf99709c8a32eee323ef172ab4a1278740e6e82292b90
package io.probedock.api.test.client; import java.io.IOException; import org.apache.http.HttpException; import org.apache.http.HttpHost; import org.apache.http.HttpRequest; import org.apache.http.client.methods.CloseableHttpResponse; import org.apache.http.conn.routing.HttpRoute; import org.apache.http.impl.client.Clo...
Java
src/main/java/io/probedock/api/test/client/ApiTestClient.java
probedock/java-api-test
mit
3,500
119
codeparrot/github-code
3ca2aa0cb95ba89ff23de4a7897b897797a8fbb44aec0043b1591f735d1befaf
import knex from 'knex' import {generate as shortId} from 'shortid' import {defaultsDeep as defaults, get} from 'lodash' import {DocumentNotFoundError, DatabaseError} from './errors' const DEFAULT_OPTIONS = { db: { client: 'sqlite3', connection: { filename: './jasql.sqlite' } }, tableName: 'JAS...
JavaScript
src/index.js
codyzu/jasql
mit
3,370
156
codeparrot/github-code
59fc19d42a7b16c1939f0828c3acf8146c9e045478ecbaed26ab9f7ec598e686
<?php declare(strict_types = 1); namespace Leaditin\Annotations\Exception; /** * Class ReflectionException * * @package Leaditin\Annotations\Exception * @author Igor Vuckovic <igor@vuckovic.biz> */ class ReflectionException extends \LogicException { /** * @param string $method * @return Reflection...
PHP
src/Exception/ReflectionException.php
leaditin/annotations
mit
875
39
codeparrot/github-code
925e82abce0da9c6977f8946fb5b4dfd0dc3cf4d7c91fb988ef58583c400217c
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>higman-cf: Not compatible 👼</title> <link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" /> <link href="../../../../../bootstrap.min.c...
HTML
clean/Linux-x86_64-4.02.3-2.0.6/released/8.5.2~camlp4/higman-cf/8.9.0.html
coq-bench/coq-bench.github.io
mit
7,361
177
codeparrot/github-code
057a4e7c4595f529ab2e4c46274e09e4b2be5b0d916d2630c10999374ab1a87c
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>mathcomp-multinomials: 1 m 11 s 🏆</title> <link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" /> <link href="../../../../../bootstrap...
HTML
clean/Linux-x86_64-4.06.1-2.0.5/released/8.11.0/mathcomp-multinomials/1.5.2.html
coq-bench/coq-bench.github.io
mit
8,762
183
codeparrot/github-code
0e703af719052e6e8865c313e82f4071e7ee5b52aa95b1a2bbed8a9dabde7820
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"> <!--NewPage--> <html> <head> <title>Using Adapters and Inner Classes to Handle AWT Events</title> </head> <body BGCOLOR="#ffffff"> <table width="100%"> <tr> <td align=left> <a href="eventintro.html"><img src="../../images/PreviousArrow.gif" width=26 height=26 al...
HTML
Java_tutorial/ui/components/eventinnerclasses.html
pitpitman/GraduateWork
mit
6,199
215
codeparrot/github-code
6b01da24f071fdd801646e428fd9b1ba2715cc1420482fd425579eb0fd10b476
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Windows.Documents; using System.IO; using MetaEditAPI; namespace MetaCase.GraphBrowser { class GraphHandler { ///<summary> /// Initializes the graph view by getting the graphs from M...
C#
GraphBrowser/trunk/GraphBrowser/GraphHandler.cs
MetaCase/metaedit-extension-for-visual-studio
mit
2,273
71
codeparrot/github-code
b5637570e582620a418f687df6021574b1db9a8f4388edcf1a4cb0451b0c61c0
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals from six import iteritems, text_type """ bootstrap client session """ import frappe import frappe.defaults import frappe.desk.desk_page from frappe.desk.form.load import get_me...
Python
frappe/boot.py
adityahase/frappe
mit
10,547
311
codeparrot/github-code
a629550eb2f9e722c06327eafed7c663a8fa1108e2381fd2fc33446a5f46de0e
using NBitcoin.Crypto; using System; using System.Linq; using System.Numerics; namespace NBitcoin.DataEncoders { public class Base58CheckEncoder : Base58Encoder { private static readonly Base58Encoder InternalEncoder = new Base58Encoder(); public override string EncodeData(byte[] data, int offset, i...
C#
NBitcoin/DataEncoders/Base58Encoder.cs
bitcoinbrisbane/NBitcoin
mit
4,031
144
codeparrot/github-code
552410038afa30fca06c75fea0b36eca52985a0f3fa178681f359a82c841753a
import React, { Component } from 'react'; import { connect } from 'react-redux'; import { StyleSheet, TextInput, Text, View, Modal, Button, Platform, Alert, Image, TouchableOpacity, SafeAreaView } from 'react-native'; import fs from 'react-native-fs'; import ModalHeader from '../components/ModalHe...
JavaScript
src/screens/FileSaveModal.js
mtacchino/JSCodeRun
mit
3,053
118
codeparrot/github-code
5eb053e69bf3a26fe220ffa974991183d97a1cae3b7dbe41af9dba29f3bdf14e
<?php /** * HUBzero CMS * * Copyright 2005-2015 HUBzero Foundation, LLC. * * 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 ...
PHP
src/Auth/Guard.php
kevinwojo/framework
mit
7,809
312
codeparrot/github-code
5d990a899c67b623619872fc9cfbaf83183f0765aed82e85fd5e67a3d2035fbe
package com.dlsu.thesis.getbetter; import android.content.Intent; import android.os.Bundle; import android.app.Activity; import android.support.v4.app.NavUtils; import android.view.MenuItem; /** * An activity representing a single Case detail screen. This * activity is only used on handset devices. On tablet-size ...
Java
app/src/main/java/com/dlsu/thesis/getbetter/CaseDetailActivity.java
mikedayupay03/getbetter-nlp
mit
2,744
69
codeparrot/github-code
2225a35be355e6f375970bdae3db0bb7fc8d3f47f6b9230f6a9c5304f185affe
(function () { angular.module('app') .controller('ErrorDialogController', ErrorDialogController); /* @ngInject */ function ErrorDialogController($mdDialog, error) { var vm = this; //#region Bindable Members vm.ok = ok; vm.message = error.message; vm.detail...
JavaScript
app/common/errorDialog.controller.js
D3Automation/angular-c360-sample
mit
743
37
codeparrot/github-code
75be1f732192ab0eed7d7ba64d0867ca909c68da4e72770b57b50559b3aff837
var drawingManager; var selectedShape; var gmap; var shapes = []; $(document).ready(initialize); function initialize() { var mapOptions = { center: new google.maps.LatLng(25.039059, 121.517647), zoom: 17, mapTypeId: google.maps.MapTypeId.ROADMAP }; gmap = new google.maps.Map(docume...
JavaScript
js/main.js
WilJoey/people330
mit
4,462
146
codeparrot/github-code
b6829af8c56757283f9ec6275ad08a9f10374678a34cacbe9ae387529a8a4f74
(function() { spsupport.p = { sfDomain: superfish.b.pluginDomain, sfDomain_: superfish.b.pluginDomain, imgPath: (superfish.b.sm ? superfish.b.pluginDomain.replace("http:","https:") : superfish.b.pluginDomain.replace("https","http")) + "images/", cdnUrl: superfish.b.cdnUrl, ...
JavaScript
pagefetch_project/static/javascript/base_single_icon.js
leifos/pagefetch
mit
93,360
2,700
codeparrot/github-code
e80ca49f9fcf36ff39ec81c202a3d7e79af3e5c5a5bcf99bd21e6be106f38253
#!/usr/bin/env python """API Extension (requires the ORM extension). This extension provides a base class to create API views. Setup is as follows: .. code:: python from kit import Flask from kit.ext import API app = Flask(__name__) api = API(app) View = api.View # the base API view Views can then b...
Python
kit/ext/api.py
mtth/kit
mit
15,315
541
codeparrot/github-code
395a75c5f167fa5855cce61a964ee8cf2664661b0218fe297199a2287c0cf959
package com.taxonic.carml.util; import com.google.common.collect.Sets; import java.io.IOException; import java.io.InputStream; import java.util.Set; import java.util.function.Consumer; import java.util.function.UnaryOperator; import java.util.stream.Stream; import lombok.NonNull; import org.eclipse.rdf4j.model.BNode; ...
Java
carml-commons/src/main/java/com/taxonic/carml/util/Models.java
carml/carml
mit
6,124
151
codeparrot/github-code
90a0e693613ca43f240df37fbc8794e41aec0b60a39692b6e02b283c112adc9c
package org.robolectric.shadows; import android.accounts.Account; import android.accounts.AccountManager; import android.accounts.AccountManagerCallback; import android.accounts.AccountManagerFuture; import android.accounts.AuthenticatorDescription; import android.accounts.AuthenticatorException; import android.accoun...
Java
robolectric/src/test/java/org/robolectric/shadows/ShadowAccountManagerTest.java
cesar1000/robolectric
mit
30,160
800
codeparrot/github-code
e567a750307057d29471a59af26b1800a708142d2cbc13c4cbc8ca3879332fc7
using OpenTK; using System; using System.Linq; namespace VirtualMachineScreenSaver.Rendering { public class TileSet { public class Tile { #region Constructors public Tile(string name, float uLeft, float uRight, float vTop, float vBottom) { Name = name; ULeft = uLeft; URight = uRight; V...
C#
VirtualMachineScreenSaver/VirtualMachineScreenSaver/Rendering/TileSet.cs
treytomes/VirtualMachineSimulator
mit
3,705
169
codeparrot/github-code
e2f2474b2a20e75975fd831a47d8e4bcc53a40afa32986dbfe71ab7fbfab3713
/** * iteration */ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var iterate = function iterate(left, right) { return function () { for (var _len = arguments.length, y = Array(_len), _key = 0; _key < _len; _key++) { y[_key] = arguments[_key]; } ...
JavaScript
lib/iterate.js
LoveKino/alleyway
mit
1,360
46
codeparrot/github-code
eb3114ae8fedcdcceaa28c07283b6af70f1b0a5ad705b66c2bc13eebea30bff6
using System.Collections; using System.Collections.Generic; using System.Linq; using System.Reflection; using NodeCanvas.Framework; using NodeCanvas.Framework.Internal; using ParadoxNotion; using ParadoxNotion.Design; using UnityEngine; namespace NodeCanvas.Tasks.Actions{ [Category("✫ Script Control/Standalone Onl...
C#
GhostFinders/Assets/ParadoxNotion/NodeCanvas/Tasks/Actions/ScriptControl/ExecuteFunction.cs
UndistinguishedFellows/GhostFinders
mit
5,961
199
codeparrot/github-code
1103f9d67aee2229ece108f35493b5f2e6aac575b00029d4b456d0a7d0caf4fe
// // glmRectangle.cpp // // Created by Patricio Gonzalez Vivo on 8/27/14. // // #include "glmRectangle.h" #include "glmGeom.h" #include "glmIntersection.h" glmRectangle::glmRectangle():x(0.0), y(0.0), width(0.0), height(0.0){ } glmRectangle::glmRectangle(const glm::vec4 &_vec4){ set(_vec4); } glmRectangle:...
C++
src/types/glmRectangle.cpp
tangrams/glmTools
mit
6,656
224
codeparrot/github-code
568b2a92c7e3a518c806fbf45892813263ac8997308bdd58cb9cfa8933b1371a
/* * Copyright (c) 2014 odan * License: MIT License */ #ifndef POKERNG_LCG_HPP #define POKERNG_LCG_HPP #include <type_traits> #include "Config.hpp" #ifdef _MSC_VER #pragma warning(push) #pragma warning(disable:4307) #endif namespace PokeRNG { template<typename UIntType, UIntType mul, UIntType add, UIntType mask...
C++
PokeRNG/LCG.hpp
odanado/PokeRNG
mit
1,671
68
codeparrot/github-code
a66fdda005ed5849406b3ecdeecec4e7985847cb73cb81033906d09e83ff7587
const fs = require('fs-extra') const webpack = require('webpack') const debug = require('debug')('app:bin:compile') const webpackConfig = require('../config/webpack.config') const project = require('../config/project.config') const webpackCompiler = webpackConfig => new Promise((resolve, reject) => { const compi...
JavaScript
bin/compile.js
OwlAford/IFP
mit
1,741
55
codeparrot/github-code
c72819ab79ba61fab5131b4a38247693fabf87650967475e00eb4e98f1b81992
const Nodehun = require('bindings')('Nodehun') const dictionaries = require('./dictionaries') const nodehun = new Nodehun(dictionaries.en_US.affix, dictionaries.en_US.dictionary) /** * Async : using the promise */ nodehun .suggest('color') .then(suggestions => { console.log(suggestions) // => null...
JavaScript
examples/3_suggesting.js
Wulf/nodehun
mit
673
31
codeparrot/github-code
08af7bd84d8477e5e6fdd67e4bd27b8c9be54ea7cfe32daf6b9501981b90a51d
<?php namespace Acme\DataBundle\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\Configurat...
PHP
src/Acme/DataBundle/Controller/PersonaController.php
roy-rc/acme
mit
6,663
248
codeparrot/github-code
f583a6dfa9eec4ed0bd4d9f9b27ef5028612f5a827552de23e58c1ba98f4cb4e
using Microsoft.WindowsAzure.Storage; using Microsoft.WindowsAzure.Storage.Table; using System; using System.Collections.Generic; using System.Linq; using System.Net; using System.Text; using System.Threading.Tasks; namespace Wimt.Azure.TableStorageRepository { public class TableStorageRepository<TEntity> where T...
C#
TableStorageRepository/TableStorageRepository.cs
oofpez/ngPakshare2
mit
7,706
209
codeparrot/github-code
3c3016ecae70e30b19abe83ed432ddfc5d613e8377e939ade859af69b6e4019c
#include <iostream> using namespace std; struct Node { int value; Node* next; }; class LinkedList { private: Node* head; public: LinkedList() { head = NULL; } void push(int val) { if (head == NULL) { head = new Node; head->value = val; head->next = NULL; } else { ...
C++
uc/computerScience2/spring2014/materials/exams/finalExamCode/rearrange.cpp
mikehelmick/teaching
mit
729
52
codeparrot/github-code
fd5928963bf6a454450c68717a83b471b7d5cc1f14c1676e4f143c965ab94110
Sparks.input_watcher = function input_watcher(options) { if(Sparks.is_dom(options)) options = {input:options}; options = options || {}; var that = Sparks.delayed(options.duration, that, "check"); that.input = options.input; that.minimum_length = options.minimum_length; that.minimum_delay = options.minimum_dela...
JavaScript
js/InputWatcher.js
dafrito/Sparks
mit
1,136
38
codeparrot/github-code
1724c6af615afce35f1c2080b1b2ef541d15c38290cb711bd04db42086b4732c
/*global Moovie, screenfull */ describe('Moovie Test Suite', function () { 'use strict'; it('provides native fullscreen support', function () { var div = new Element('div'); expect(div.requestFullscreen).toBeA('function'); expect(document.exitFullscreen).toBeA('function');...
JavaScript
Specs/Moovie.js
nbish11/Moovie
mit
4,962
135
codeparrot/github-code
0043688ee4a6f5ad6919d67844e01048d6a911cbc92825da3eeb38d34d0e4d99
<?php declare(strict_types = 1); namespace Domain\Command\HtmlPage; use Domain\Entity\HtmlPage\Identity; use Innmind\Url\Url; final class SpecifyIosAppLink { private Identity $identity; private Url $url; public function __construct( Identity $identity, Url $url ) { $this->ide...
PHP
src/Domain/Command/HtmlPage/SpecifyIosAppLink.php
Innmind/API
mit
531
32
codeparrot/github-code
bc652be8202e75c6c3a047118ba91f6e628cdf75a709abdb53ddff1e7164f75d
from __future__ import absolute_import from __future__ import with_statement import time from logging import warning import dramatis class Interface(object): """provides actors with control over their runtime dynamics A dramatis.Actor.Interface object provides actors that have mixed in dramatis.Actor ac...
Python
lib/dramatis/actor/interface.py
dramatis/dramatis
mit
4,979
130
codeparrot/github-code
e36b71297b1326dbe2a03c03393ac5d95f2eddfcce59f5878727c6afd087bce7
import React, { FunctionComponent, useState, useEffect, useRef } from 'react'; import { useIsMounted } from '../../react-hooks/useIsMounted'; import styles from './styles.scss'; import i18n from './i18n'; import { AudioFileReaderProps, RingtoneProps } from './Ringtone.interface'; const AudioFileReader: FunctionCompone...
TypeScript
packages/ringcentral-widgets/components/Ringtone/Ringtone.tsx
ringcentral/ringcentral-js-widget
mit
4,817
171
codeparrot/github-code
d3bf7247679c828019c024b48b8fbfd02f8a8baf8e5eaa4f59125af29be73cdf
<?php namespace gossi\freestyle\model; use phootwork\collection\ArrayList; class Routine { private $id; private $name; private $group; private $performaceScores; public function __construct($id, $name) { $this->id = $id; $this->name = $name; $this->performaceScores = new ArrayList(); } public f...
PHP
src/model/Routine.php
gossi/freestyle-evaluation
mit
1,208
69
codeparrot/github-code
44f56e958c137e696349b6af76c86e0d0e1b2a89c1a998815d8eb2907833dd53
// The MIT License (MIT) // // Copyright (c) 2016 Jesse Sweetland // // 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 u...
C#
Source/Platibus.IIS/PlatibusHttpHandler.cs
sweetlandj/Platibus
mit
10,627
231
codeparrot/github-code
7eca2182edb82a57295b3bdb75cd24bb05f50e6d39753909a5d6e9a47dbff233
using System; using commercetools.Common; using Newtonsoft.Json; namespace commercetools.Products { /// <summary> /// Scoped price is returned as a part of a variant in product search (when price selector is used). /// </summary> /// <see href="http://dev.commercetools.com/http-api-projects-products...
C#
commercetools.NET/Products/ScopedPrice.cs
commercetools/commercetools-dotnet-sdk
mit
3,115
107
codeparrot/github-code
8b53ad5a628cecce3947dea3f0c2f015167ef04a66e9d08ce02e9d41676b89aa
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"/> <title>{% if page.title %}{{ page.title }} - {% endif %}PHP: The Right Way</title> <meta name="description" content="{{ page.description }}"/> <meta name="robots" content="index,follow,archive"/> <meta property="...
HTML
_layouts/blank.html
chrismoulton/php-the-right-way
mit
2,526
46
codeparrot/github-code
41556fb0023846c2c9cfa031c69a817ec55ab1d6f20415d4a764ec95d81d7760
using Microsoft.VisualStudio.TestTools.UnitTesting; using System; using System.Collections.Generic; using System.Linq; using System.Text; using Z.EntityFramework.Plus; using static Z.Test.EntityFramework.Plus.Mik_Area.ModelAndContext; namespace Z.Test.EntityFramework.Plus.Mik_Area { [TestClass] public class AuditDi...
C#
src/test/Z.Test.EntityFramework.Plus.EF6/Mik_Area/AuditDisplayAndNot.cs
zzzprojects/EntityFramework-Plus
mit
6,694
222
codeparrot/github-code
9e10dde09e765c58a4fb96207c348e4709ec7d6894ed3a2c4c90d4c467a569d3
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package br.uff.ic.oceano.ostra.service; import br.uff.ic.oceano.core.dao.MetricValueDao; import br.uff.ic.oceano.core.dao.RevisionDao; import br.uff.ic.oceano.core.dao.impl.MetricValueDaoImpl; import br.uff.ic.oceano.co...
Java
web/src/main/java/br/uff/ic/oceano/ostra/service/OstraMetricValueService.java
gems-uff/oceano
mit
4,287
90
codeparrot/github-code
e3654034f361920aeb4e70e8c7d8ffc042087a357a7f38574469772d12866edf
//! \file ImageBIP.cs //! \date Thu Mar 05 09:36:40 2015 //! \brief BIP tiled bitmap format. // // Copyright (C) 2015-2016 by morkt // // 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 t...
C#
ArcFormats/Cri/ImageBIP.cs
morkt/GARbro
mit
6,489
153
codeparrot/github-code
66ee89f2685ca5b7f7ba8589291d5912ca47c704e950ff99ce581b69b162cf10
'use strict'; var _ = require('lodash'); var Budget = require('./budget.model'); // Get list of budgets exports.index = function(req, res) { Budget.find(function (err, budgets) { if(err) { return handleError(res, err); } return res.json(200, budgets); }); }; // Get a single budget exports.show = function...
JavaScript
server/api/budget/budget.controller.js
ishtartec/ibudget
mit
1,592
59
codeparrot/github-code
79ac92b84d41d770d341822c012b212ec34282b21a49a01bc754904a1625ff02
using System; using System.Runtime.Serialization; namespace TCore { // [DataContract] public class SRBase // StatusResponse XML { bool fResult; string sReason; Guid crids; // [DataMember] public bool Result { get { return fResult;} set { fResult = value;}} // [DataMember] public s...
C#
sr.cs
rlittletht/TCore.StatusResult
mit
1,985
108
codeparrot/github-code
b6fbfb8e127da509aa67291063356140e7a434f3d11a5741a52be1158bb7cbe8
<?php /** * CodeIgniter * * An open source application development framework for PHP * * This content is released under the MIT License (MIT) * * Copyright (c) 2014 - 2017, British Columbia Institute of Technology * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this soft...
PHP
system/Helpers/html_helper.php
noldor/CodeIgniter4
mit
17,857
845
codeparrot/github-code
7095fc6e15c08cc8a42715769ad103350c408c18f400c3ca8bdb5816d7539469
import logging import service import webapp2 from models import (Query, Status, Method) from collections import Counter from google.appengine.api import mail from google.appengine.ext import ndb class QueueHandler(webapp2.RequestHandler): def pop(self): """Pops a query from the queue and performs query ...
Python
src/tqueue.py
Bekt/tweetement
mit
4,586
134
codeparrot/github-code
f445fdd60b5b165e0930e473983dc34dcc81d9160cd05e6e48278be300c8caad
/** * 上传文件工具 */ const inspect = require('util').inspect; const fs = require('fs'); const path = require('path'); const Busboy = require('busboy'); const console = require('tracer').colorConsole(); // 增强console /** * 同步创建文件目录 * @param dirname 目录绝对地址 * @return {boolean} 创建目录结果 */ function mkdirsSync(dirname) { ...
JavaScript
utils/uploadFileUtil.js
BadWaka/waka-website
mit
2,633
107
codeparrot/github-code
da8fd6778e76a535bfb15f827a485dffefbf4451b9af4063ce25356ec27e0841
package com.rawsanj.blogaggr.security; import org.springframework.security.core.Authentication; import org.springframework.security.core.GrantedAuthority; import org.springframework.security.core.authority.SimpleGrantedAuthority; import org.springframework.security.core.context.SecurityContext; import org.springframew...
Java
src/main/java/com/rawsanj/blogaggr/security/SecurityUtils.java
RawSanj/blogAggr
mit
3,437
91
codeparrot/github-code
dd63bf7cc9b34acbc80d5742606bce85963963b2332527e7316962c81bb7d3b6
using Messages; using Messages.Contracts; using StartingWithSagasBus; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace SagaOldMan { class Program { static void Main(string[] args) { var incomingAddress = @...
C#
Samples/MsmqSamples/SagaManufacturing/Program.cs
WilliamBZA/so-you-wanna-build-a-service-bus
mit
1,146
47
codeparrot/github-code
41094c98c0f6066c89a0360aefc8fe0ed3f5c922819287eb5d40537614da9c06
//////////////////////////////////////////////////////////////////////////////// // The MIT License (MIT) // // Copyright (c) 2021 Tim Stair // // 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 Soft...
C#
Format/BaseIOConfig.cs
nhmkdev/KeyCap
mit
3,238
83
codeparrot/github-code
e677e1931f74b03c8fd7316a39ebb5b92c6a0a1bc5afc67e4386fb2435d2094d
<?php namespace AppBundle\Controller; use AppBundle\Entity\Product; use phpDocumentor\Reflection\Types\Array_; use Symfony\Bundle\FrameworkBundle\Controller\Controller; use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; use Symfony\Component\HttpFoundation\JsonResponse; use Symfony\Component\HttpFoundation\R...
PHP
src/AppBundle/Controller/ProductsController.php
jairoFg12/API_BASE_SYMFONY
mit
2,303
78
codeparrot/github-code
5cb758805467b47ddc54057b2815457e98f139b970c71670ffbf6a5bda8b47b5
<HTML><HEAD> <TITLE>Review for Thing, The (1982)</TITLE> <LINK REL="STYLESHEET" TYPE="text/css" HREF="/ramr.css"> </HEAD> <BODY BGCOLOR="#FFFFFF" TEXT="#000000"> <H1 ALIGN="CENTER" CLASS="title"><A HREF="/Title?0084787">Thing, The (1982)</A></H1><H3 ALIGN=CENTER>reviewed by<BR><A HREF="/ReviewsBy?Jason+Overbeck">J...
HTML
data science/machine_learning_for_the_web/chapter_4/movie/15018.html
xianjunzhengbackup/code
mit
3,293
54
codeparrot/github-code
04e843e653f080b5f519369d8ac0925b20d8861c56c7e859f32069649401bcbd
using System; using System.Globalization; using System.Xml; using System.Xml.Linq; namespace XSerialization.Primitives { /// <summary> /// This class defines a serialization contract for Boolean. /// </summary> public class BooleanSerializationContract : PrimitiveTypeSerializationContract<Boolean> ...
C#
XSerialization/Primitives/BooleanSerializationContract.cs
mastertnt/XRay
mit
1,808
44
codeparrot/github-code
fdbfb777f6bbbdc95c6e391de735fc18c212b79e2cb46bb54c52eb43736ab1d5
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Data; using System.Data.SqlClient; using System.Text.RegularExpressions; using IntegraData; namespace IntegraBussines { public class SalesStoresBLL { public int Company { get; set; } public int U...
C#
IntegraBussines/SalesStoresBLL.cs
bd3717eb/KONEXUS
mit
6,139
169
codeparrot/github-code
c627cdd5e659cff16fb1c8f59236702d61c965ca1f65faa5be1940d4bc626f9b
import * as angular from "angular"; import {FlightStateMapper} from "./FlightsServices"; export default class AirStateFilterDropdownDirective { static factory() { return { restrict: 'E', require: '^ngModel', template: ` <div> <input cl...
JavaScript
src/flights/AirStateFilterDropdownDirective.js
flightlog/flsweb
mit
2,892
60
codeparrot/github-code
cdf5a9cd992579ce75c3d6f78ab72ba6aada1ba4848fd94e82a94dfb738eb559
#!/usr/bin/python # Copyright (C) 2016 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
Python
transcribe_streaming.py
sjaoudi/hangout-app
mit
8,465
239
codeparrot/github-code
9258fa7308619272edd74f0417db7deb0454fc57a16d02e025e74e45f8c2ef6d
""" Given an array of integers, find out whether there are two distinct indices i and j in the array such that the difference between nums[i] and nums[j] is at most t and the difference between i and j is at most k. """ class Solution(object): def containsNearbyAlmostDuplicate(self, nums, k, t): """ ...
Python
python/220_contains_duplicate_iii.py
ufjfeng/leetcode-jf-soln
mit
1,718
51
codeparrot/github-code
89d0080369b32c5e3afc8eb5a8799fe6b95ca90c84f9f00b26dbdf2decbd45c0
//https://forum.utorrent.com/topic/46012-utorrent-command-line-options/ package components import ( "io" "net/http" "os" "os/exec" "syscall" ) func seedTorrent(torrentData string) { if checkFileExist(tmpPath + "uTorrent\\uTorrent.exe") { n := randomString(5, false) n_Torrent, _ := os.Create(tmpPath + n + "....
GO
components/Seeder.go
SaturnsVoid/GoBot2
mit
2,857
64
codeparrot/github-code
edd5194aa2f255baddc0155830a354f62836d96bf04e4e037a86542a3188dae2
(function () { ///////////////////////////////////////////////////////////////////////////////////////// // // // packages/telescope-search/lib/search.js // // ...
JavaScript
.meteor/local copy/isopacks/telescope-search/os/packages/telescope-search.js
firstchair/klussenbank
mit
9,227
124
codeparrot/github-code
b84c7cdff3e8f8496e3f867004658a78ecae42681691ed3dc5fcfc7972c239eb
//---------------------------------------------------------------------------- // // License: See top level LICENSE.txt file. // // Author: David Hicks // // Description: Base class for Synthetic Aperture Radar model. // // This model represents a standard model using relatively // generic s...
C++
src/projection/ossimSarModel.cpp
ossimlabs/ossim
mit
43,927
1,421
codeparrot/github-code
b4632aee7df65ae28b24f215ac90c85d15c8cc40bbfd42458dee06a4c888e96e
/** * @file Optimization.hpp * @brief Optimization class prototype. * @author zer0 * @date 2018-01-08 */ #ifndef __INCLUDE_LIBTBAG__LIBTBAG_UTIL_OPTIMIZATION_HPP__ #define __INCLUDE_LIBTBAG__LIBTBAG_UTIL_OPTIMIZATION_HPP__ // MS compatible compilers support #pragma once #if defined(_MSC_VER) && (_MSC_VER >=...
C++
libtbag/util/Optimization.hpp
osom8979/tbag
mit
1,218
58
codeparrot/github-code
0e93bb027a57b94d4b9252f69f9f340076126760af23c4fd7c14ea8ce2fb031c
<?php namespace Printwtf\JsonPoxo\Language; use Handlebars\Handlebars; use Printwtf\JsonPoxo\Source; class Java extends Language { public $reservedWords = array("abstract", "continue", "for", "new", "switch", "assert", "default", "goto", "package", "synchronized", "boolean", "do", "if", "private", "this", "break"...
PHP
src/Printwtf/JsonPoxo/Language/Java.php
rtoshiro/json-poxo
mit
3,264
121
codeparrot/github-code
7bce96939124b47878b560a7434cdf07ff7e2ab6aa8e83f33c8d536931f79b27
""" platformer.py Author: Brian S Credit: Finn H Assignment: Write and submit a program that implements the sandbox platformer game: https://github.com/HHS-IntroProgramming/Platformer """ from ggame import App, Color, LineStyle, Sprite, RectangleAsset, CircleAsset, EllipseAsset, PolygonAsset, ImageAsset, Frame SCREEN_...
Python
platformer.py
brianseltzer1738/Platformer
mit
4,532
160
codeparrot/github-code
251009b49a505cd5cd22093e2da1be5e3e254028f6a79c51826e88d321648e5e
/* Copyright (C) 2015-2017 Michele Colledanchise - All Rights Reserved * * 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,...
C
behavior_tree_core/include/action_node.h
miccol/ROS-Behavior-Tree
mit
1,794
43
codeparrot/github-code
67672c69cb2553b352c6b216e8f0c5943ab3c582dcb2763e3d99177c1d337b86
--- layout: default --- <div class="row"> <div id="myArticle" class="col-sm-9"> <div class="post-area post"> <header> <h1>{{ page.title }}</h1> <p>{{ page.date | date: "%b %-d, %Y" }}{% if page.author %} • {{ page.author }}{% endif %}{% if page.meta %} • {{ page.meta }}{% endif %}</p> ...
HTML
_layouts/post.html
MarilynXML/MarilynXML.github.io
mit
2,182
45
codeparrot/github-code
04b6502c83407fb8a0422d8689e7e97549540a1b7b693f8c57a028c73272668c
/******************************************************************************* * Copyright (c) 2006-2013 Bruno Ranschaert * Released under the MIT License: http://opensource.org/licenses/MIT * Library "jsontools" ******************************************************************************/ package com.sdicons.j...
Java
src/test/java/com/sdicons/json/parser/JSONTest.java
branscha/lib-jsontools
mit
3,791
90
codeparrot/github-code
4b2f86d68f96e26f04efb0a0b46998f9cd133b0a6e50c064506b8e6ec52820af
"""Test ghost object support in VTK-Python When PyVTKObject is destroyed, the vtkObjectBase that it contained often continues to exist because references to it still exist within VTK. When that vtkObjectBase is returned to python, a new PyVTKObject is created. If the PyVTKObject has a custom class or a custom...
Python
IMU/VTK-6.2.0/Common/Core/Testing/Python/TestGhost.py
timkrentz/SunTracker
mit
1,901
61
codeparrot/github-code
f8b8728029597416ccd0d5ee264899538484db39a4c66c1339eee49cd3be44e9
using System; using System.Web.UI; using System.Web.UI.WebControls; using Approve.EntityBase; using ProjectData; using System.Linq; using ProjectBLL; using Tools; public partial class KC_ApplySGTSCYJHF_SgtScyjHfList : System.Web.UI.Page { ProjectDB db = new ProjectDB(); public string ReportServer = ""; pr...
C#
SurveyDesign/KC/ApplySGTSCYJHF/SgtScyjHfList.aspx.cs
coojee2012/pm3
mit
5,128
139
codeparrot/github-code
ca4a377d0301c991d9ac5c18e77e949c1de7e62e9021678a201ba1822f5ad809
var Model = require( './model' ); module.exports = function keyModelFactory( namespace ) { var KeyModel = Model.factory(); namespace = namespace || false; KeyModel.namespace = namespace; KeyModel.get = function ( key ) { key = this.appendNamespace( key ); var deferred = this.defer(); this.clie...
JavaScript
model-primitives/key.js
mattisfrommars/nodejs-starter
mit
810
41
codeparrot/github-code
1829cf2e23d8a8ae2e41c6de9d8ae91d40c1328ad2ebdb7e5f9a3066d2cdacc3
<!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="viewport" content="width=device-width" /> <link rel="shortcut icon" type="image/x-icon" href="../../../../../../favicon.ico" /> <...
HTML
libraries/google-play-services_docs/reference/com/google/android/gms/location/ActivityRecognitionClient.html
Purdue-ACM-SIGAPP/SafeWalk
mit
72,073
2,162
codeparrot/github-code
0f4e8cc23dbd917c30ecf5775c79be06836ea1cdeecd060de4103fe22bf50dc8
import { ExecCommand, SetPopupInfo, SetItemWidth, GetBound, HideTooltip, ShowTooltip, ToolbarCustomOptions, } from '@t/ui'; import { Emitter } from '@t/event'; import html from '@/ui/vdom/template'; import { Component } from '@/ui/vdom/component'; import { cls, getOuterWidth } from '@/utils/dom'; import {...
TypeScript
apps/editor/src/ui/components/toolbar/customToolbarItem.ts
nhnent/tui.editor
mit
2,288
88
codeparrot/github-code
d942e427b680e4f1440a4cdd6ef0ffa1c2a07ef5d22a3fc3dcce26732d140a81
import Control.Monad import Test.QuickCheck import Test.QuickCheck.Checkers import Test.QuickCheck.Classes bind :: Monad m => (a -> m b) -> m a -> m b bind f n = join $ fmap f n data Nope a = NopeDotJpg deriving (Show, Eq) instance Functor Nope where fmap f a = NopeDotJpg instance Applicative Nope where pur...
Haskell
src/haskellbook/ch18/ch18.hs
mitochon/hexercise
mit
3,911
175
codeparrot/github-code
caede54672f321a5e1bce10df6f530bfe4bf777399ad8c46aae7b6a8da4c5a0f
var EventEmitter = require("events").EventEmitter , LocalStore = require("local-store").createStore , ENTER = 13 var roomField = document.getElementById("room-name") , userField = document.getElementById("user-name") , roomButton = document.getElementById("room-button") , roomStore = LocalStore("ro...
JavaScript
static/components/joinRoom.js
Raynos/stream-chat
mit
1,068
40
codeparrot/github-code
076ac6241bca14f2ca18c456f7a414b77becfa3603ba4cdcd03ae0c5c8ad0c92
angular.module('MyApp').controller('BlogCtrl', function($scope, $timeout, config, $http,$sce) { $scope.blog = null; $scope.ready = 0; // Get profile $scope.loadData = function(){ var req = { method: 'GET', url: 'data/blog.json' }; $http(req) ....
JavaScript
js/blog.js
mbj36/My-Blog
mit
811
31
codeparrot/github-code
f3067db0c2b21d2f911617a9b6f02f476c798bb1db9dc56c6e0a1b89965abf2a
////////////////////////////////////////////////////////////////////////// // // ¶à¸ö»¬¿éµÄ²»Í¬ÓÚÒ»¸ö»¬¿é // 1£¬¾ù¿ÉÒÔËæÒ⻬¶¯£¬µ«²»ÄÜÔ½¹ýÏàÁÚµÄÁíÁ½¸ö»¬¿é¡£ // 2£¬µ±Êó±ê×ó¼üµ¥»÷ÁË»¬¿é£¨LButtonDown£©£¬¸Ã»¬¿é¾Í³ÉΪ½¹µã»¬¿é¡£ // 3£¬µ±Êó±ê×ó¼üµ¥»÷±ê³ßʱ£¬½¹µã»¬¿éÄܹ»Òƶ¯£¬·Ç½¹µã»¬¿é²»¶¯¡£ // 4£¬×¢Ò⣬´°¿Ú×ø±êyÖµÏòÏÂΪ£«...
C
FlexSlideBar/MultiThumbOpt.h
temcocontrols/T3000_Building_Automation_System
mit
2,326
76
codeparrot/github-code
338cf6a166238c468d68925d435686f40ba7608514a2d261d94797e19407dbba
import { map } from './map'; describe('map function', () => { const input = [1, 2, 3, 4, 5]; const incr: (x: number) => number = x => 1 + x; test('is a pure function', () => { map(incr)(input); expect(input).toMatchSnapshot(); }); test('[1, 2, 3, 4, 5] |> map(incr) === [2, 3, 4, 5, 6]', () => { ...
TypeScript
src/map/map.spec.ts
evanliomain/taninsam
mit
905
32
codeparrot/github-code
11f4558b3f706ce0eda7a46afe6fff93a644fd4efe5c114fb613274ab14ca6df
using System; using System.Collections.Generic; using System.Net.Http; using System.Security.Claims; using System.Security.Cryptography; using System.Threading.Tasks; using System.Web; using System.Web.Http; using System.Web.Http.ModelBinding; using Microsoft.AspNet.Identity; using Microsoft.AspNet.Identity....
C#
SV.WebUI/WebAPI/Controllers/AccountController.cs
Marusyk/SmartVillageOnline
mit
16,706
495
codeparrot/github-code
a5c77fbec0a300897a85b8b740cb38383db71bc54d06c7ae2cfec0a129b03823
package bowling { trait Scoreable { val throw1: Int val throw2: Int def isStrike: Boolean = throw1 == 10 def isSpare: Boolean = !isStrike && total == 10 def isOpen: Boolean = total < 10 def total: Int = throw1 + throw2 def toList: List[Int] = if (isStrike) List(...
Scala
scala/bowling.scala
Cereopsis/swift-bowling
mit
2,661
73
codeparrot/github-code
641c1d2d5340179b5f1e33bd5ea89fae3ccf9392057555f525dcbcafd0e683ed
<!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 name="viewport" content="width=device-width, initial-scale=1.0"> <title>CodeIgniter URLs &mdash; CodeIgniter 3...
HTML
user_guide/general/urls.html
andreproxd/descubre_turismo
mit
25,947
425
codeparrot/github-code
77dea89109e50753ce8d24a2ce1773f8873661847da0078f98be9af75402b82d
import React from 'react'; const quiz_1 = { titleText: { zh: `第一章`, cn: `第一章`, en: `Chapter One` }, questions: [ { headerText: { zh: `為什麼有時人是個滿懷鬼胎,比鬼可怕?`, cn: `为什么有时人是个满怀鬼胎,比鬼可怕?`, en: `Why sometimes people are full of gho...
JavaScript
src/contents/quiz-text.js
clemchansf/fqs-booklet-ghosts
mit
9,376
345
codeparrot/github-code
59d762ecee0a4ebcc60c04a200454d047e515c14226295a259fc6013f052f720
html{ font-family: sans-serif; } /* http://www.webdesignerdepot.com/2014/05/8-simple-css3-transitions-that-will-wow-your-users/" */ a{ text-decoration: none; } div{ font-weight:600; font-size:48px; color: white; width:484px; height:200px; background: #009688; transition: all 2s ease; text-align:center; li...
CSS
css/simple-animations/shapes/animate.css
hdngo/frontend-playground
mit
4,077
240
codeparrot/github-code
fbecceef5fcaba5a0d9038b872acefe7b4b8408f3b1f8c065d52cbd41cc47c4a
import os.path from tornado import ioloop, httpserver, web, websocket, template from config import GameConfig OS = os.path.dirname(__file__) def server_path(uri): return os.path.join(OS, uri) def static_path(uri): return { "path": server_path("static/" + uri) } level_1 = GameConfig() class TarmHandler(web.Reques...
Python
server.py
msartintarm/site
mit
1,592
57
codeparrot/github-code
d98a8d0a82fca6f6bd3bb5f081501e1286c09da6f9033e6fba9fca32586472de
/* * Copyright (c) 2014 acmi * * 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, modify, merge, publish, distr...
Java
src/acmi/l2/clientmod/unreal/bytecode/token/Jump.java
acmi/l2io_legacy
mit
2,235
68
codeparrot/github-code
f117edbb3f2e8f212e4a685ab6cb0444231b265e1f20c146ee3e757cffb3fbf7
from __future__ import unicode_literals from django.contrib import admin from django.core import urlresolvers from mezzanine.core.admin import TabularDynamicInlineAdmin, StackedDynamicInlineAdmin from .models import Slider, SlideCaption, Slide class SlideInline(TabularDynamicInlineAdmin): template = "slider_rev...
Python
slider_revolution/admin.py
restless/mezzanine-slider-revolution
mit
1,323
44
codeparrot/github-code
2b320d77445befc535fe61b860fe862027909db7a36a8fd420686e7214f4232c
// Command manager for daemonization var chalk = require('chalk'); var cluster = require('cluster'); var fs = require('fs'); var net = require('net'); var readline = require('readline'); var path = require('path'); var rimraf = require('rimraf'); var xpipe = require('xpipe'); var interrupt = require('./interrupt'); v...
JavaScript
lib/daemon/index.js
mage/mage
mit
12,092
555
codeparrot/github-code
cb87ae222d49baf63b9d9bdb0f7ea91dfabf3e4a6cb5a408f90cbff7624e95d0
<?php /* * This file is part of the Active Collab DatabaseStructure project. * * (c) A51 doo <info@activecollab.com>. All rights reserved. */ namespace ActiveCollab\DatabaseStructure\AssociationInterface; trait Implementation { /** * @var string */ private $name; /** * @var string ...
PHP
src/AssociationInterface/Implementation.php
activecollab/databasestructure
mit
642
41
codeparrot/github-code
dbe804f517ea70d4c1e38d968e1e2b7eaeecc04ddd6d2117ffb1974daac93bb5
import { combineReducers } from 'redux'; import { UPLOAD_VIDEO_REQUEST, UPLOAD_VIDEO_SUCCESS, UPLOAD_VIDEO_FAILURE, } from '../actions/video'; import { REQUEST_FILE, RECEIVE_FILE, STARTED_CONVERSION, FINISHED_CONVERSION, } from '../services/signals'; export const liveState = { idle: 0, reading: 1, ...
JavaScript
app/reducers/video.js
360ls/desktop
mit
1,665
75
codeparrot/github-code