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
d715921d4782dea686cc4b5f6250fc7f1184d461acd0e29536aacce500c00b81
<!doctype html> <html class="theme-next pisces use-motion"> <head> <meta charset="UTF-8"/> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/> <meta http-equiv="Cache-Control" content="no-transform" /> <meta...
HTML
public/archives/2015/09/index.html
HankCoder/BlogBackup
mit
16,843
675
codeparrot/github-code
111fcf6627d9842d02c7c5d9e67d4e97777212c1a710569694bf9abe2e551ec0
package org.usfirst.frc.team5518.robot.subsystems; import org.usfirst.frc.team5518.robot.RobotMap; import org.usfirst.frc.team5518.robot.commands.ArcadeDriveJoystick; import edu.wpi.first.wpilibj.GenericHID; import edu.wpi.first.wpilibj.Joystick; import edu.wpi.first.wpilibj.RobotDrive; import edu.wpi.first.wpilibj.S...
Java
JoystickDemo2/src/org/usfirst/frc/team5518/robot/subsystems/DrivingSys.java
TechnoWolves5518/2015RobotCode
mit
1,232
46
codeparrot/github-code
d5599160671413403ada32d42dad78e4141200d63e170994938e65eaf450f205
<?php session_start(); if (isset($_SESSION['username'])) { $username = $_SESSION['username']; } $veza = new PDO('mysql:host=' . getenv('MYSQL_SERVICE_HOST') . ';port=3306;dbname=developer_blog', 'admin', 'user'); $veza->exec("set names utf8"); if (isset($_POST['update'])) { ...
PHP
shareProblem.php
NerminImamovic/developer-Blog
mit
4,871
136
codeparrot/github-code
e3fc100ecd34565fe59c4e26d0aadd54193da31d41bbf42df67471bfe87ce3bf
function initBtnStartAlgo(){ $('#btn_startDispatch').bind('click', function(event) { event.preventDefault(); initAlgo(); createResultPanel("div_resultPanel"); doRound(); printRound("resultRegion"); printResultPersonal("resultPersonal"); createDownloadableContent(); }); } // 初始化變數、將 htm...
JavaScript
js/algo.js
johnyluyte/EPA-SMS-Dispatcher
mit
6,523
188
codeparrot/github-code
56bc2763db696bc7949e9403c6b21ca60836c9d14e5497655c38c071afdfec58
/* * Velcro Physics: * Copyright (c) 2017 Ian Qvist */ using System.Collections.Generic; using Microsoft.Xna.Framework; using QEngine.Physics.Shared; using QEngine.Physics.Tools.Triangulation.Delaunay.Delaunay; using QEngine.Physics.Tools.Triangulation.Delaunay.Delaunay.Sweep; namespace QEngine.Physics.Tools.Triangu...
C#
QEngine/Code/Physics/Tools/Triangulation/Delaunay/CDTDecomposer.cs
Quincy9000/QEngine.Framework
mit
2,415
73
codeparrot/github-code
d0c777490924eca3c10b395e57f2e7f7eb2e5107c6fed3ed2af083cc3704a66c
import * as _ from 'lodash'; import Vuex from 'vuex'; import {Deck} from '../models/Deck' import DeckState from '../models/state/DeckState' const store = { state: new DeckState(), mutations: { addToDeck(state, card) { if (!card) { return; } state.currentDeck.cards...
TypeScript
Deckard/Frontend/src/deckard/state/DeckModule.ts
jmazouri/Deckard
mit
2,091
73
codeparrot/github-code
e023046c9b04b8a8b6430d674f2e57be4b7684e607bbee4368e09e15dd9f601d
namespace _01.SchoolClasses { // Disciplines have name, number of lectures and number of exercises using System; class Disciplines : BasicInfoPeopleAndObjects { private int lecturesNumber; private int exercisesNumber; public Disciplines(string name, int lecturesNumber, int ex...
C#
03_CSharp-OOP/OOP-Principles-Part1-Homework/01.SchoolClasses/Disciplines.cs
clangelov/TelerikAcademyHomework
mit
1,438
55
codeparrot/github-code
12b91bfd8457d651729817274c5e30cee9f5ad904b8e6c8ba8cd464810a25feb
module Language.Aspell ( -- * Constructors SpellChecker, spellChecker, spellCheckerWithOptions, spellCheckerWithDictionary, -- * Using the spell checker check, suggest ) where import Data.ByteString.Char8 import Foreign #if !MIN_VERSION_base(4,7,0) hiding (unsafePerformIO) #endif ...
Haskell
Language/Aspell.hs
pikajude/haspell
mit
9,412
237
codeparrot/github-code
f799bb105f5174784b009b6acb1b1c18db57c51935663568601ebc32220b6a77
# == Schema Information # # Table name: github_stargazers # # id :integer not null, primary key # linked_account_id :integer not null # tracker_id :integer not null # stargazer :boolean # subscriber :boolean # forker :boolean # synced_at ...
Ruby
app/models/github_stargazer.rb
bountysource/core
mit
6,853
179
codeparrot/github-code
bf83329906707298173ca8cd32206f724917cca33bab4db6a4a3fecb58391d7a
'use strict'; angular.module('articles').controller('ChangeHeaderImageController', ['$scope', '$timeout', '$stateParams', '$window', 'Authentication', 'FileUploader', 'Articles', function ($scope, $timeout, $stateParams, $window, Authentication, FileUploader, Articles) { $scope.user = Authentication.user; $s...
JavaScript
modules/articles/client/controllers/change-header-image.client.controller.js
davidsbelt/bacca-app
mit
2,451
79
codeparrot/github-code
6193d9b12092f840805ed73df6908937447ccd5863895c0f69f45caf6a4fb783
package main import ( "net/http" "sync" "time" "github.com/1lann/airlift/airlift" humanize "github.com/dustin/go-humanize" "github.com/gin-gonic/contrib/renders/multitemplate" "github.com/gin-gonic/contrib/sessions" "github.com/gin-gonic/gin" ) func formatBasicTime(t time.Time) string { return getDay(t) + "...
GO
notes.go
1lann/airlift
mit
2,768
131
codeparrot/github-code
8f411167f4be0c9ea574433fe62747963c42f8257fda4a82110bc49b2d70b4cf
<?php namespace Metro; use Monolog\Handler\HandlerInterface; use Monolog\Handler\PsrHandler; use Monolog\Logger; use Psr\Log\LoggerInterface; class Worker { /** @var ConsumableQueue */ private $metro; /** @var JobExecutor */ private $jobExecutor; /** @var string[] */ private $queues; /...
PHP
src/Worker.php
metro-q/metro
mit
3,524
134
codeparrot/github-code
45345d90fbd1f1b082b009a684532d6b9335fd184b37d02e7d4945c0e347ff83
require 'resque' require 'resque/plugins/heroku_scaler/version' require 'resque/plugins/heroku_scaler/config' require 'resque/plugins/heroku_scaler/manager' require 'resque/plugins/heroku_scaler/worker' require 'resque/plugins/heroku_scaler/resque' module Resque module Plugins module HerokuScaler class <<...
Ruby
lib/resque/plugins/heroku_scaler.rb
aarondunnington/resque-heroku-scaler
mit
2,946
134
codeparrot/github-code
6b1d9d8d292ae44d713456f4781411fac13fac40a6bb2ae2832b4e7a297ec0bb
from datetime import datetime from flask import Blueprint, render_template from flask_cas import login_required from timecard.api import current_period_start from timecard.models import config, admin_required admin_views = Blueprint('admin', __name__, url_prefix='/admin', template_folder='templates') @admin_views....
Python
timecard/admin/views.py
justinbot/timecard
mit
885
32
codeparrot/github-code
343e2fd0953d3d3a5aa5752ee7126568e90e77a9a8ca07aa60d735a973591a4b
/* * The Life Simulation Challenge * https://github.com/dankrusi/life-simulation-challenge * * Contributor(s): * Dan Krusi <dan.krusi@nerves.ch> (original author) * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "So...
C#
Core/GUI/StartScreen.cs
dankrusi/life-simulation-challenge
mit
4,607
160
codeparrot/github-code
45d26166b67cb6f7b0967a1755248de2db069f3e741c1bdba09bfdd96b857208
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace HTLib2.Bioinfo { public partial class ForceField { public class PwVdw : INonbonded, IHessBuilder4PwIntrAct { public virtual string[] FrcFldType { get { return new string[] { "...
C#
HCsbLib/HCsbLib/HTLib2.Bioinfo/ForceField/ForceField.Pw/ForceField.PwVdw.cs
htna/HCsbLib
mit
10,122
176
codeparrot/github-code
acb3dde1b5be78e64edc25e4277fe39401ba0ca40f45101bffc9924e894ea07f
import re import urllib import hashlib from django import template from django.conf import settings URL_RE = re.compile(r'^https?://([-\w\.]+)+(:\d+)?(/([\w/_\.]*(\?\S+)?)?)?', re.IGNORECASE) EMAIL_RE = re.compile(r'^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$', re.IGNORECASE) GRAVATAR_URL_PREFIX = 'http...
Python
django_gravatar/templatetags/gravatar_tags.py
santa4nt/django-gravatar
mit
4,346
132
codeparrot/github-code
47a0f9102f9d8063056dc528132cf591ae1f32efbe9b83a1d447df01041c0ca8
package viewModel import java.net.URI import com.thetestpeople.trt.model._ import com.thetestpeople.trt.model.jenkins._ import com.thetestpeople.trt.utils.http.Credentials object EditableJenkinsConfiguration { def apply(fullConfig: FullJenkinsConfiguration): EditableJenkinsConfiguration = EditableJenkinsConfig...
Scala
app/viewModel/EditableJenkinsConfiguration.scala
thetestpeople/trt
mit
1,289
40
codeparrot/github-code
33a262201a20ffab443434abf94edb3c2cf5f8f8088520fcfd8f4c36ce5b2f0b
import Client from '@bugsnag/core/client' import _NetInfo, { NetInfoState } from '@react-native-community/netinfo' import plugin from '../' jest.mock('@react-native-community/netinfo', () => ({ addEventListener: jest.fn() })) const NetInfo = _NetInfo as jest.Mocked<typeof _NetInfo> describe('plugin: react native c...
TypeScript
packages/plugin-react-native-connectivity-breadcrumbs/test/connectivity.test.ts
bugsnag/bugsnag-js
mit
2,475
59
codeparrot/github-code
b38b4aa3c4eebb532398b78e6e8b1e5e166643c77bea1ca2329131f15c8dbeae
require 'rails/generators/active_record' module ActiveRecord module Generators class ModelGenerator < Base argument :attributes, :type => :array, :default => [], :banner => "field:type field:type" check_class_collision class_option :timestamps, :type => :boolean class_option :parent, ...
Ruby
lib/generators/active_record/model/model_generator.rb
cloudcastle/activerecord-simpledb-adapter
mit
786
31
codeparrot/github-code
92cb19ed757fdde1a47ef7602b75cd4a10d22b21d3fe2e3147980f1408d6813e
<?php declare(strict_types=1); namespace TSwiackiewicz\AwesomeApp\Application\User\Command; use TSwiackiewicz\AwesomeApp\DomainModel\User\Password\UserPassword; use TSwiackiewicz\AwesomeApp\SharedKernel\User\UserId; /** * Class ChangePasswordCommand * @package TSwiackiewicz\AwesomeApp\Application\User\Command */ ...
PHP
src/Application/User/Command/ChangePasswordCommand.php
tswiackiewicz/ddd-workshops
mit
1,054
54
codeparrot/github-code
940fae85078e6b29d1d5b03241646b02891b07c756e721ce6b340aa702783424
module SfdcConnect # Utility for validating reponses from SFDC REST calls module ResponseValidator def validate_response(response) raise "HTTP Error #{response.code}: #{response.parsed_response}" if response.code >= 400 raise "SFDC Error: #{response['error']} - #{response['error_description']}"...
Ruby
lib/sfdc-support.rb
scottweaver/sfdc-connect
mit
1,362
45
codeparrot/github-code
8cdfe828002ef054217dfb6105117835d6f8f6be53666fa25bda31566302577a
// "node scripts/create-package-app-test.js && node packages/app-test/synchronize.js && node packages/react-boilerplate-app-scripts/scripts/link-react-boilerplates.js && lerna bootstrap", 'use strict'; require('./create-package-app-test.js'); require('../packages/app-test/synchronize.js'); require('../packages/react-b...
JavaScript
scripts/bootstrap.js
dog-days/create-react-boilerplate-app
mit
1,390
40
codeparrot/github-code
f2c4a89330309d4c95a032e5700dc85bdd04dd849783220c15d899964e7f1abb
'use strict'; var mongoose = require('mongoose'); var bcrypt = require('bcrypt'); var eat = require('eat'); var userSchema = new mongoose.Schema({ name: { type: String, required: true }, email: { type: String, required: true, unique: true, trim: true }, username: { type: String, ...
JavaScript
models/user.js
mskalandunas/parcel
mit
997
53
codeparrot/github-code
3137fa7312c9d32d01db9b9dd34746580f315ac7e1a4a26d4352b8c8e7eb57b4
#include "math.h" #include "robot.h" #include "stdio.h" #include "stdlib.h" #include "sys/time.h" #include "time.h" #define TIMES 500 int get_info(int argc, char **argv, double *arms, double *angles, double *gx, double *gy); void moveArm(int arm, double angle); void output(mat3_t m, double error, struct timeval tv, c...
C
src/pc_demo.c
benjamin-james/robot
mit
2,708
104
codeparrot/github-code
45c905abf8e0bedfd15c8509fcf9122328369a48e0962f0e55be28814405900f
import matplotlib.pyplot as plt import numpy as np def logHist(X, N=30,fig=None, noclear=False, pdf=False, **kywds): ''' Plot logarithmic histogram or probability density function from sampled data. Args: X (numpy.ndarray): 1-D array of sampled values N (Optional[int]): Number of bins ...
Python
miscpy/PlotFun/logHist.py
dsavransky/miscpy
mit
1,435
48
codeparrot/github-code
78f7364dd4659fcd2a575247622693b8850e0792796ab3ce42983f5d9a8dd823
#include <ncore/sys/wait.h> #include "thread_pool.h" namespace ncore { ThreadPool::ThreadPool() : work_threads_(), running_(0) { exec_proc_.Register(this, &ThreadPool::DoJobs); } ThreadPool::~ThreadPool() { fini(); } bool ThreadPool::init(size_t thread_number) { if(!thread_numb...
C++
ncore/utils/thread_pool.cpp
shileiyu/ncore
mit
2,798
148
codeparrot/github-code
23582638454f79aa52cf331c3424d69a41a356725b4b2f04ef15061140b3dfc8
import * as React from "react"; import * as noUiSlider from "nouislider"; export interface SVSliderProps { value: number; maxSvs: number; max: number; onUpdate: (svs: number) => void; } export class SingularValuesSlider extends React.Component<SVSliderProps> { private sliderElRef: React.RefObject<HTMLDivEle...
TypeScript
src/main-app/SingularValuesSlider.tsx
timjb/svd-image-compression-demo
mit
3,237
117
codeparrot/github-code
9fbe3e4e316f9c559b65a0ac3637070cb3bacaf8c422c51e1d64cd085cc56d1a
<?php defined('BASEPATH') OR exit('No direct script access allowed'); class PD_IS_10_model extends CI_Model { protected $db2; protected $db3; public function __construct() { parent:: __construct(); $this->db2 = $this->load->database('lib', TRUE); $this->db3 = $this->load->datab...
PHP
application/models/qualidade_fibra/PD_IS_10_model.php
teorges/fmobile
mit
2,567
73
codeparrot/github-code
161384874d1dfe65048844969514a24d419d53d0edab6ac1c552b9ce8204cfd2
<!DOCTYPE html> <!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]--> <!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]--> <!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]--> <!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]--> <head> <!-- Meta-Information --> <title>Ka...
HTML
index.html
fezimmer89/kaleoChallenge
mit
3,034
60
codeparrot/github-code
0ebdded48321759fce2ee78293dd0bac6203ad19913669b73d35cad909457b3b
/******************************************************************************* * * MIT License * * Copyright (c) 2017 Advanced Micro Devices, Inc. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * ...
C++
src/operator.cpp
ROCmSoftwarePlatform/MIOpen
mit
3,112
74
codeparrot/github-code
16cf4e0b96aae6555d9ddf5a004b12298b0f85c80234a254b784e8a300b07bb8
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package com.semantic.swing.tree.querybuilder; import java.util.ArrayList; import java.util.List; import org.apache.lucene.search.BooleanQuery; import org.apache.lucene.search.Query; /** * * @author Christian Plonka (...
Java
search-core/src/main/java/com/semantic/swing/tree/querybuilder/QueryPipeline.java
julianmendez/desktop-search
mit
1,651
66
codeparrot/github-code
3a887053f8e83e5e404abf27f73b84b366f3e5b5862aa0d6d2371d83280dc2b6
/* The MIT License(MIT) ===================== Copyright(c) 2008, Cagatay Dogan Permission is hereby granted, free of charge, to any person obtaining a cop of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the right to use...
C#
Sweet.BRE/BRE/Statements/BreakStm.cs
ocdogan/Sweet.BRE
mit
3,476
117
codeparrot/github-code
36bd78f3e3affe041bf39cc77e4bd71d9b1c98cbb2d3e8af851581ea6b2da413
#include <psl1ght/lv2/net.h> #include <psl1ght/lv2/errno.h> #include <sys/socket.h> #include <sys/select.h> #include <netinet/in.h> #include <arpa/inet.h> #include <netdb.h> #include <stdio.h> #include <string.h> #define __LINUX_ERRNO_EXTENSIONS__ #include <errno.h> int h_errno = 0; #define FD(socket) (socket & ~...
C
sprx/libnet/socket.c
andoma/PSL1GHT
mit
10,924
441
codeparrot/github-code
c2d43a267bf311b4922e3164fe8310b5bcc13072d0852550797ba8a9c5adf70d
const UrlPathValidator = require('../../../services/validators/url-path-validator') const referenceIdHelper = require('../../helpers/reference-id-helper') const BenefitOwner = require('../../../services/domain/benefit-owner') const ValidationError = require('../../../services/errors/validation-error') const insertBenef...
JavaScript
app/routes/apply/new-eligibility/benefit-owner.js
ministryofjustice/apvs-external-web
mit
2,796
76
codeparrot/github-code
5c7cf430ea77fd8da54e99d7ecf12d8aed7fa53bcae99c2ea6003d394c592e63
<?php declare(strict_types=1); namespace Cortex\Foundation\Http\Middleware; use Closure; use Exception; use Illuminate\Http\Request; class SetCrawlingRobotsHeaders { protected $response; /** * Handle an incoming request. * * @param \Illuminate\Http\Request $request * @param \Closure ...
PHP
src/Http/Middleware/SetCrawlingRobotsHeaders.php
rinvex/cortex-foundation
mit
1,444
63
codeparrot/github-code
3b8d1418028e104668cb2beac5327ef05ffc54cb97d932b7599bef85db82a236
(function($) { "use strict"; /** * Main controller class for jaoselect input * @param {Object} settings for widget * @param {JQuery} model initial <select> element, we hide it and use like a "model" layer */ var JaoSelect = function(settings, model) { // Delete previously created element if exists mode...
JavaScript
src/jquery.jaoselect.js
PieceOfMeat/jaoselect
mit
10,820
431
codeparrot/github-code
1e6057be77d3dfb26e35fd56bdbc349d88ad5a99326c45b03ae9d0be055b7340
#pragma once //----------------------------------------------------------------------------- // Copyright (c) 2013 GarageGames, 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 witho...
C
Engine/source/T3D/assets/GUIAsset.h
JeffProgrammer/Torque3D
mit
3,790
106
codeparrot/github-code
be7de12305c5e950782f7904106d8b091caab4059d2699080eb72c29cac2a02d
/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ import {ElementRef, NgZone} from '@angular/core'; import {Direction} from '@angular/cdk/bidi'; import {coerceElement}...
TypeScript
src/cdk/drag-drop/drop-list-ref.ts
andrewseguin/material2
mit
41,996
1,068
codeparrot/github-code
7829a6ab4ac6bb9b3610366237e65ecd8a1e39cda63367035b29d59fb442d985
// Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2012 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "chainparams.h" #include "db.h" #include "net.h" #include "main.h" #inclu...
C++
src/net.cpp
altcommunitycoin/altcommunitycoin-skunk
mit
56,430
1,855
codeparrot/github-code
5e54709ec909c87aa807aa96dc46cb88346ac0f6a28a6edc6c3ef5ec421348d9
<head> <title>survey-app</title> </head> <body> <nav class="navbar navbar-default"> <ol class="breadcrumb"> <li><h2><a class="homeLink" href="#">Survey App</a></h2></li> <li><a href="#">About</a></li> <li> {{> loginButtons }} </li> {{#if currentUser}} <li><a class="profileLink" href="#">Pro...
HTML
survey-app.html
joshuajharris/ODUHackathon2015
mit
2,545
90
codeparrot/github-code
6497ea1dcd33002acac285799a6d906d3d63fac9524b1140172407b2e067d0f3
package org.droidplanner.core.MAVLink; import com.MAVLink.Messages.MAVLinkMessage; import com.MAVLink.common.msg_mission_ack; import com.MAVLink.common.msg_mission_count; import com.MAVLink.common.msg_mission_current; import com.MAVLink.common.msg_mission_item; import com.MAVLink.common.msg_mission_item_reached; impor...
Java
Tower_with_3drservices/dependencyLibs/Core/src/org/droidplanner/core/MAVLink/WaypointManager.java
Yndal/ArduPilot-SensorPlatform
mit
11,062
348
codeparrot/github-code
d5e462bef8e2201e150dd3b690a0222bc2871640adb7c86dd222e902b95c3492
<HTML><HEAD> <TITLE>Review for Quills (2000)</TITLE> <LINK REL="STYLESHEET" TYPE="text/css" HREF="/ramr.css"> </HEAD> <BODY BGCOLOR="#FFFFFF" TEXT="#000000"> <H1 ALIGN="CENTER" CLASS="title"><A HREF="/Title?0180073">Quills (2000)</A></H1><H3 ALIGN=CENTER>reviewed by<BR><A HREF="/ReviewsBy?Harvey+S.+Karten">Harvey ...
HTML
data science/machine_learning_for_the_web/chapter_4/movie/26812.html
xianjunzhengbackup/code
mit
9,484
167
codeparrot/github-code
f3b3a12020cd1d5e2193b2958e8e89355ae484748f026d90ca6c59bfcebf1dd2
package org.jsense.serialize; import com.google.common.collect.ImmutableList; import org.joda.time.Instant; import org.joda.time.ReadableInstant; import org.jsense.AccelerometerEvent; import org.jsense.ModelFactory; import org.junit.Before; import org.junit.Test; import java.io.ByteArrayInputStream; import java.io.By...
Java
jsense-protobuf/src/test/java/org/jsense/serialize/TestProtocolBuffersDeserializers.java
markuswustenberg/jsense
mit
3,942
100
codeparrot/github-code
ab93f48fc8a14db071556c5cae5ae67c71459db73ab3605e7fb042b16b257a16
const jwt = require("jwt-simple"); const co = require('co'); const config = require('../config'); const dbX = require('../db'); const coForEach = require('co-foreach'); module.exports = (io) => { const collectionVersionsNS = io.of('/collectionVersions'); collectionVersionsNS.use((socket, next) => { let token...
JavaScript
sockets/collection-versions.js
rxjs-space/lyback
mit
3,763
100
codeparrot/github-code
bbcf30da1bd2f028d9b5d56ee3b75f3667b6c27d02e36a383e71f74a4835a67c
<?php /** * This file is part of the vardius/list-bundle package. * * (c) Rafał Lorenz <vardius@gmail.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Vardius\Bundle\ListBundle\Filter\Types\Type; use Doctrine\ORM\Qu...
PHP
Filter/Types/Type/DateType.php
Vardius/list-bundle
mit
1,879
61
codeparrot/github-code
1965bf7025898f0cac29229592549b55cf6bb0c822ba98cce8e5d0bdddb25125
var gulp = require('gulp'); var setup = require('web3-common-build-setup'); var DEPS_FOLDER = setup.depsFolder; // Build tools var _ = require(DEPS_FOLDER + 'lodash'); var insert = require(DEPS_FOLDER + 'gulp-insert'); var del = require(DEPS_FOLDER + 'del'); var plugins = {}; plugins.s...
JavaScript
gulpfile.js
toefel/web3-demo
mit
3,495
112
codeparrot/github-code
6e8e55e2af09e14ee34322d1c49cccfde894738d0cbf99c73c579ae26336f929
// ⚪ Initialization let canvas = document.getElementById('game') as HTMLCanvasElement; var gl = canvas.getContext('webgl'); if (!gl) { throw new Error('Could not create WebGL Context!'); } // 🔲 Create NDC Space Quad (attribute vec2 position) let ndcQuad = [ 1.0, -1.0, -1.0, -1.0, 1.0, 1.0, -1.0, 1.0 ]; let indices ...
TypeScript
packages/portfolio/blog/image-editor-effects/example.ts
alaingalvan/alain.xyz
mit
4,406
153
codeparrot/github-code
1f3d4c825e5f02862f49c6f902d66c39728f81a882fe27842e9928c7dffedbb9
var REGEX = require('REGEX'), MAX_SINGLE_TAG_LENGTH = 30, create = require('DIV/create'); var parseString = function(parentTagName, htmlStr) { var parent = create(parentTagName); parent.innerHTML = htmlStr; return parent; }; var parseSingleTag = function(htmlStr) { if (htmlStr.length > MAX_SIN...
JavaScript
src/parser.js
JosephClay/d-js
mit
975
38
codeparrot/github-code
98635e3c992be888c712cb5d9dcf77d1370c87396deae0380743d9b58d14e62e
package seedu.jobs.logic.commands; import java.io.IOException; import com.google.common.eventbus.Subscribe; import seedu.jobs.commons.core.EventsCenter; import seedu.jobs.commons.events.storage.SavePathChangedEventException; /* Change save path */ //@@author A0130979U public class PathCommand extends Command { ...
Java
src/main/java/seedu/jobs/logic/commands/PathCommand.java
CS2103JAN2017-F11-B1/main
mit
1,421
50
codeparrot/github-code
147049dabbbde8c3253fe0b31b0ed1da5e18778c22e72ed85f121cbdbc5cd318
// // AppController.h // Spotify Menubar // // Created by Ruaridh Thomson on 06/06/2010. // Copyright 2010 Life Up North/Ruaridh Thomson. All rights reserved. // // This software is distributed under licence. Use of this software // implies agreement with all terms and conditions of the accompanying // software lic...
C
AppController.h
ruaridht/Spotify-Menubar
mit
3,729
140
codeparrot/github-code
a42482b540f136be8871d8a2961538e9a12519de451c8b90241ea5e389b5a092
package mobi.qubits.tradingapp.query; import java.util.Date; import org.springframework.data.annotation.Id; public class QuoteEntity { @Id private String id; private String symbol; private String name; private float open; private float prevClose; private float currentQuote; private float ...
Java
src/main/java/mobi/qubits/tradingapp/query/QuoteEntity.java
yizhuan/tradingac
mit
1,859
124
codeparrot/github-code
10418a0251c750c82436238dfd09c6cbbceed05d33fcd9bd9c9292550b79f304
#!/usr/bin/python """ fanhaorename.py """ import os import os.path import logging import fileorganizer from fileorganizer import _helper from fileorganizer.replacename import _replacename __author__ = "Jack Chang <wei0831@gmail.com>" def _tagHelper(tag): """ TODO """ result = "" for c in tag: ...
Python
fileorganizer/fanhaorename.py
wei0831/fileorganizer
mit
2,156
72
codeparrot/github-code
ce7ab9d9c2432e0562aee8221b34d7b34fd201865afed52005e8170b18824aff
<?php namespace Mitch\EventDispatcher; class Dispatcher { private $listeners = []; public function dispatch($event) { if (is_array($event)) { $this->fireEvents($event); return; } $this->fireEvent($event); } public function addListener($name, Listen...
PHP
src/Dispatcher.php
mitchellvanw/event-dispatcher
mit
1,085
56
codeparrot/github-code
c6836c0a656effcf9212a1da3b9042c7e448cefb8eaa3b93c4e625efa2ec85b4
using System; using System.Runtime.InteropServices; namespace UnityMathReference { [StructLayout(LayoutKind.Sequential)] public struct Point3 { #region Properties public int x, y, z; public static readonly Point3 one = new Point3(1); public static readonly Point3 minusOne = new Point3(-1); public static...
C#
Assets/Math/Point3.cs
zezba9000/UnityMathReference
mit
5,083
214
codeparrot/github-code
c4efb3fe5130469fcdadf53dfe8a3af5b25c376c961cdf03cb8cde078e6c1577
<?php namespace AppBundle\Form; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\OptionsResolver\OptionsResolverInterface; class OrganizationType extends AbstractType { /** * @param FormBuilderInterface $builder * @param array $options ...
PHP
src/AppBundle/Form/OrganizationType.php
Gordondalos/ereport-two
mit
995
43
codeparrot/github-code
5ab86652d4ef42be7ec37fa803ce8bb04bd37edb8d88f706af3723bd76eeb638
import * as React from './dfvReact' import { dfvFront } from "./dfvFront"; export interface PopWindowPara { /** * 是否不覆盖全屏 */ notCover?: boolean; /** * 是否显示红色背景的错误提示框 */ isErr?: boolean; /** * 自动关闭时间,为0则不自动关闭 */ closeTime?: number; } export class dfvWindow { ...
TypeScript
src/public/dfvWindow.tsx
rxaa/dfv
mit
5,853
232
codeparrot/github-code
f19d146a97b1d95c3d6cafbbdd3b2205b86863b8d3c57e68c236eb47d50e8a81
<?php namespace Nf; class Db { const FETCH_ASSOC = 2; const FETCH_NUM = 3; const FETCH_OBJ = 5; const FETCH_COLUMN = 7; private static $_connections = array(); public static $_forceStoreConnectionInInstance = null; public static function factory($config) { if (! is_array(...
PHP
Nf/Db.php
jarnix/nofussframework
mit
3,365
92
codeparrot/github-code
eb974d6e3ded48f3723e327963f1e4cce51e3e020d3e959ef4c2d268cf105353
/** * Created by Administrator on 2015/2/3. */ var Task = require('../models/task') ; //add task exports.addTask = function(req,res){ var title = req.body.title, content = req.body.content, date = req.body.date, duration = req.body.duration, done = req.body.done, frequency...
JavaScript
controllers/taskController.js
lakb248/CouplesWallet
mit
6,193
177
codeparrot/github-code
3f131de5a885e4717e5fd9f093633f18310b8602d96427210f3211cad8a67eae
<?php namespace LaravelBox\Commands\Files; use GuzzleHttp\Client; use GuzzleHttp\Exception\ClientException; use GuzzleHttp\Exception\ServerException; use GuzzleHttp\Exception\RequestException; use GuzzleHttp\Exception\TransferException; use LaravelBox\Factories\ApiResponseFactory; class DownloadFileCommand extends A...
PHP
src/LaravelBox/Commands/Files/DownloadFileCommand.php
ryanvade/laravel-box
mit
1,523
51
codeparrot/github-code
316f3dede579d33704fbd06517a1c70d21672ba48b89f442c9efced46d8b16b3
<?php /* * This file is part of KoolKode BPMN. * * (c) Martin Schröder <m.schroeder2007@gmail.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ declare(strict_types = 1); namespace KoolKode\BPMN\Runtime\Behavior; use KoolKod...
PHP
src/Runtime/Behavior/MessageBoundaryEventBehavior.php
koolkode/bpmn
mit
1,722
59
codeparrot/github-code
e0b4b68e1cc591d9517f9cc81e7445765556cd1642225ec6ea48037c219dd7ce
# class DesignComponent class Mucomo::Model::DesignComponent # @todo participant, meta, description # this include adds the attributes id, name, title to this class. include Mucomo::Model::HasIdentifiers attr_accessor :media_type # media_type's range is a restricted vocabulary, see XML schema file a...
Ruby
lib/mucomo/model/design_component.rb
pmenke/mucomo
mit
733
33
codeparrot/github-code
7764403665bccff33609da05488e25b728dd1828922b411fe3ad8f6d69e2d32e
import auth from '../auth'; import clone from 'clone'; import storage from './storage'; async function addBlockOrItem(dbConn, token, codeObj, props, type) { let user = await auth.getUser(token); console.log(`Adding new ${type} for user ${user.login}`); let add; let newType = { code: codeObj, name: pr...
JavaScript
src/inventory/controller.js
UnboundVR/metavrse-server
mit
2,973
108
codeparrot/github-code
0adc7b850537e593f0b66947674bde2423165541158642bdba1257c550e7aa59
<?php /** * Main DAV server class * * @package Sabre * @subpackage DAV * @copyright Copyright (C) 2007-2012 Rooftop Solutions. All rights reserved. * @author Evert Pot (http://www.rooftopsolutions.nl/) * @license http://code.google.com/p/sabredav/wiki/License Modified BSD License */ class Sabre_DAV_Server { ...
PHP
example/dav/protected/lib/Sabre/DAV/Server.php
harrydeluxe/mongofilesystem
mit
68,178
1,988
codeparrot/github-code
b1b32a7438ad08ae420bb1a2836e2471ef8338c0cea774c354687b58410e049b
<?php use Stecman\Passnote\Object\ReadableEncryptedContent; use Stecman\Passnote\Object\ReadableEncryptedContentTrait; class ObjectController extends ControllerBase { public static function getObjectUrl(StoredObject $object) { return 'object/' . $object->getUuid(); } public function indexActi...
PHP
app/controllers/ObjectController.php
stecman/passnote
mit
6,009
191
codeparrot/github-code
ce8b9fe21608dd507bbbbe6a2dbe7775e8b676032f2f08ed839684b671e49fc6
<?php /** * Přidá parametr lang=LANG_CODE za každý odkaz na stránce * * @param String $link upravovaný odkaz * @return String upravený $link */ function icom_edit_permalink($link) { if (icom_is_permalink_struct()) { return ICOM_ABSPATH . icom_current_lang() . "/" . str_replace(ICOM_ABSPATH, "", $link);...
PHP
stream-api_loading_pages.php
idiomaCoLtd/StreamAPI-wordpress-plugin
mit
15,528
477
codeparrot/github-code
0ecf235f401bd0414f76c700faf172733b7475cc3e10be353bd7bc9e7f86e35a
/** * @package EntegreJS * @subpackage Widgets * @subpackage fontawesome * @author James Linden <kodekrash@gmail.com> * @copyright 2016 James Linden * @license MIT */ E.widget.fontawesome = class extends E.factory.node { constructor( icon ) { super( 'i' ); this.attr( 'class', `fa fa-${icon.toString().toLo...
JavaScript
src/widget/fontawesome.js
entegreio/entegre-js
mit
1,327
70
codeparrot/github-code
327e404f3cbf7352c71df89b9e04f570038b50b74d5225807e99d15c720bde39
//https://omegaup.com/arena/problem/El-Arreglo-de-Nieves #include <cstdio> #include <iostream> #include <stack> using namespace std; struct inf { int p, v; }; int nums, totes, mint, stval; int nlist[1000005], tol[1000005], tor[1000005], seen[1000005]; inf lastnp[1000005]; int main() { scanf("%d", &nums); ...
C++
OmegaUp/El-Arreglo-de-Nieves.cpp
JFAlexanderS/Contest-Archive
mit
1,363
67
codeparrot/github-code
10c0c09b86a3cbd29fde44e578a55665e2b64f8aedb4a43b236eeb2923262e1f
<?php if (!class_exists('Paymentwall_Config')) include(getcwd() . '/components/gateways/lib/paymentwall-php/lib/paymentwall.php'); /** * Paymentwall * * @copyright Copyright (c) 2015, Paymentwall, Inc. * @link http://www.paymentwall.com/ Paymentwall */ class Brick extends NonmerchantGateway { ...
PHP
src/components/gateways/nonmerchant/brick/brick.php
paymentwall/module-blesta
mit
16,335
443
codeparrot/github-code
cca669898d4d6f0e0683fbd6d184baf5785015ce899fbeacd51634a1974b2697
package org.butioy.framework.security; import org.apache.commons.lang3.StringEscapeUtils; import org.apache.commons.lang3.StringUtils; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequestWrapper; /** * Created with IntelliJ IDEA. * Author butioy * Date 2015-09-18 2...
Java
butioy-framework-src/org/butioy/framework/security/XSSHttpServletRequestWrapper.java
butioy/webIM
mit
2,271
85
codeparrot/github-code
c71503d48eae6d02ced3baf1482f74c4c776e39d01f2a5c1f68e5bc10090721c
#include <Esp.h> #include "FS.h" #ifdef ESP32 #include <SPIFFS.h> #endif #include "iotsaFilesUpload.h" #ifdef IOTSA_WITH_WEB void IotsaFilesUploadMod::setup() { } static File _uploadFile; static bool _uploadOK; void IotsaFilesUploadMod::uploadHandler() { if (needsAuthentication("uploadfiles")) return; HTTPUpload...
C++
src/iotsaFilesUpload.cpp
cwi-dis/iotsa
mit
2,362
68
codeparrot/github-code
ecfea570e3cf2f05cb57ae4cb98d5bd14ad49460c2b7e8ceb1976ba6fff89900
<?php declare(strict_types=1); /* * This file is part of the humbug/php-scoper package. * * Copyright (c) 2017 Théo FIDRY <theo.fidry@gmail.com>, * Pádraic Brady <padraic.brady@gmail.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed ...
PHP
specs/static-method/namespace-two-parts-with-single-level-use.php
webmozart/php-scoper
mit
2,098
126
codeparrot/github-code
7700bd6e922ce51df2393fdef99b12fd42586463f9c9a4bbe50a7055274ebce9
<?php class Auth_Model extends CoreApp\DataModel { public function __construct() { parent::__construct(); $this->PDO = $this->database->PDOConnection(CoreApp\AppConfig::getData("database=>autchenticationDB")); $this->database->PDOClose(); } public function get...
PHP
App/_models/Auth_Model.php
LetsnetHungary/letsnet
mit
1,452
44
codeparrot/github-code
2c04c07171f602e44432dcd65428e0d66a7637ea50547ae9f51d3997465ab103
package lua type lValueArraySorter struct { L *LState Fn *LFunction Values []LValue } func (lv lValueArraySorter) Len() int { return len(lv.Values) } func (lv lValueArraySorter) Swap(i, j int) { lv.Values[i], lv.Values[j] = lv.Values[j], lv.Values[i] } func (lv lValueArraySorter) Less(i, j int) bool {...
GO
table.go
evanphx/gopher-lua
mit
4,410
240
codeparrot/github-code
cd88b289bc69d0379316dc0a516f4850487e05a4285274149ec0e7fcec316329
import URL from 'url'; import * as packageCache from '../../util/cache/package'; import { GitlabHttp } from '../../util/http/gitlab'; import type { GetReleasesConfig, ReleaseResult } from '../types'; import type { GitlabTag } from './types'; const gitlabApi = new GitlabHttp(); export const id = 'gitlab-tags'; export ...
TypeScript
lib/datasource/gitlab-tags/index.ts
singapore/renovate
mit
1,669
67
codeparrot/github-code
6378fe1793e747d8662679b660f7ea41524af0665be117d79559a8a4cb488425
package org.mdo.storyline.character.config; import com.codahale.metrics.MetricRegistry; import com.codahale.metrics.servlet.InstrumentedFilter; import com.codahale.metrics.servlets.MetricsServlet; import org.mdo.storyline.character.web.filter.CachingHttpHeadersFilter; import org.mdo.storyline.character.web.filter.Stat...
Java
src/main/java/org/mdo/storyline/character/config/WebConfigurer.java
dohr-michael/storyline-character
mit
6,892
148
codeparrot/github-code
cd57ae25dbbc7476ceb6f7275a5a5d7460eab44bc43bd25ea66d9a18ce76cc8b
/* External utility functions for Modelica packages Modelica_Utilities.Internal The functions are mostly non-portable. The following #define's are used to define the system calls of the operating system _WIN32 : System calls of Windows'95, Windows'NT (Note, that these sy...
C
metamorphosys/META/analysis_tools/FAME/MSL/3.2/Modelica/Resources/C-Sources/ModelicaInternal.c
pombredanne/metamorphosys-desktop
mit
25,865
781
codeparrot/github-code
7245607dba5578e2f0fc65e107478ad3a9745ae32ec49d94ae098ba01007e730
<?php namespace EloquentJs\ScriptGenerator\Model; class Metadata { /** * @var string */ public $name; /** * @var string */ public $endpoint; /** * @var array */ public $dates; /** * @var array */ public $scopes; /** * @var array ...
PHP
src/ScriptGenerator/Model/Metadata.php
parsnick/eloquentjs
mit
772
47
codeparrot/github-code
8c37c47976379159506c1216d047f57deb7068e3522e08656a2ddd26712145bf
#ifndef HKBGETWORLDFROMMODELMODIFIER_H #define HKBGETWORLDFROMMODELMODIFIER_H #include "hkbmodifier.h" class hkbGetWorldFromModelModifier final: public hkbModifier { friend class GetWorldFromModelModifierUI; public: hkbGetWorldFromModelModifier(HkxFile *parent, long ref = 0); hkbGetWorldFromModelModifier&...
C
src/hkxclasses/behavior/modifiers/hkbgetworldfrommodelmodifier.h
Zartar/Skyrim-Behavior-Editor-
mit
1,324
42
codeparrot/github-code
bff93b67499a59b4a224210be27b026448bf96c4a3e379f7c567b6e38088d9a0
struct stat; struct rtcdate; // system calls int fork(void); int exit(void) __attribute__((noreturn)); int wait(void); int pipe(int*); int write(int, void*, int); int read(int, void*, int); int close(int); int kill(int); int exec(char*, char**); int open(char*, int); int mknod(char*, short, short); int unlink(char*); ...
C
user.h
dswann5/os_assignment_3
mit
889
42
codeparrot/github-code
52a7d1f8dd9d07ed04d1114b794e705e627757a8f1793076df5caa0cc324a523
/* * 5-high FONT FOR RENDERING TO THE LED SCREEN. * Includes kerning support * Gaurav Manek, 2011 */ #ifndef __FONT5X4_H #define __FONT5X4_H #include <avr/pgmspace.h> #define FONT_5X4_HEIGHT 5 #define FONT_5X4_STEP_GLYPH 10 // Number of bytes per glyph const char FONT_5X4 [] PROGMEM = { 0b0000, 0b0000, 0b...
C
Arduino/HT1632/font_5x4.h
flavio-fernandes/HT1632-for-Arduino
mit
6,202
103
codeparrot/github-code
6e3627ba218677867d2f0ef6483c0bef124fb8844d172c7baa41367f1b77b293
namespace Meeko { partial class Form1 { /// <summary> /// Required designer variable. /// </summary> private System.ComponentModel.IContainer components = null; /// <summary> /// Clean up any resources being used. /// </summary> /// <param name="...
C#
Meeko/Meeko/Form1.Designer.cs
henrikac/Me-e-ko
mit
1,732
52
codeparrot/github-code
d36f8a6342ee979c9f2073a1daf0524ea7bc9144e3d5a1ba00843cc1b9c3d71b
require "day/tracker/version" module Day module Tracker class Cli < Thor FILE_PATH = File.expand_path("~/.day-tracker") def initialize(*args) super FileUtils.touch FILE_PATH end desc "list", "list recorded days" def list puts File.read(FILE_PATH) end desc "add PROJECT_NAM...
Ruby
lib/day/tracker.rb
opsb/day-tracker
mit
1,005
52
codeparrot/github-code
04c34b283aafb94dd2a57ea67955d811a65a412b3df0dced0a14333b0820e7ed
using System; using System.Collections.Generic; using System.Linq; using System.Net; using System.Net.Http; using System.Web.Http; namespace ContosoUniversity.WebApi.Controllers { public class ValuesController : ApiController { // GET api/values public IEnumerable<string> Get() { ...
C#
src/ContosoUniversity.WebApi/Controllers/ValuesController.cs
ChauThan/WebApi101
mit
789
40
codeparrot/github-code
2f5624504bd4c84cd299e89aa2c08ccd3c98fa2363f8f7084f40f99ea94e0666
/** * A debounce method that has a sliding window, there's a minimum and maximum wait time **/ module.exports = function (cb, min, max, settings) { var ctx, args, next, limit, timeout; if (!settings) { settings = {}; } function fire() { limit = null; cb.apply(settings.context || ctx, args); } function ...
JavaScript
src/flow/window.js
b-heilman/bmoor
mit
935
60
codeparrot/github-code
ab13a1600aa6a80253e69db70af3569963a9f63020c3f528c74ef01ffee99d53
<?php namespace App; use Doctrine\ORM\Mapping as ORM; /** * @ORM\MappedSuperclass * @ORM\HasLifecycleCallbacks() */ abstract class Entity { /** * @var integer * * @ORM\Column(name="id", type="integer") * @ORM\Id * @ORM\GeneratedValue(strategy="AUTO") */ private $id; /** ...
PHP
src/App/Entity.php
Meshredded/slim-framework_doctrine_mini_web-service
mit
1,676
101
codeparrot/github-code
624d3731dc6f1fce67152bf3c34eee1e5c371402e4528007e79f4e64a5e92fc7
var gulp = require('gulp'), jshint = require('gulp-jshint'), mocha = require('gulp-mocha'), cover = require('gulp-coverage'), jscs = require('gulp-jscs'); gulp.task('default', ['jscs', 'lint', 'test'], function () { }); gulp.task('lint', function () { return gulp.src(['./lib/*.js', './test/*.js'])...
JavaScript
gulpfile.js
olavhaugen/telldus-live-promise
mit
875
32
codeparrot/github-code
65b520dff55dfce01f62faa78d0d3f1178877ce3d5cbb422c0b4ee87168641b7
using System.ComponentModel.DataAnnotations; using EPiServer; using EPiServer.DataAbstraction; using EPiServer.DataAnnotations; using ImageProcessor.Web.Episerver.UI.Blocks.Business; namespace ImageProcessor.Web.Episerver.UI.Blocks.Models.Blocks { [ContentType(DisplayName = "Detect Edges", GUID = "d490901...
C#
src/ImageProcessor.Web.Episerver.UI.Blocks/Models/Blocks/DetectEdgesBlock.cs
vnbaaij/ImageProcessor.Web.Episerver
mit
1,123
34
codeparrot/github-code
ba01016abe8281c45482bd64de1164728a64baefacced7bf22b0c8e45679c8c0
if (typeof window !== 'undefined') { var less = require('npm:less/lib/less-browser/index')(window, window.less || {}) var head = document.getElementsByTagName('head')[0]; // get all injected style tags in the page var styles = document.getElementsByTagName('style'); var styleIds = []; for (va...
JavaScript
less.js
Aaike/jspm-less-plugin
mit
2,820
80
codeparrot/github-code
0f71e97c435a1c9b49ee841df6f3d446dfd9b46c4d01c3c877e3ad8570f111db
import numpy as np from pycqed.analysis import measurement_analysis as ma from pycqed.analysis_v2 import measurement_analysis as ma2 from pycqed.measurement import sweep_functions as swf from pycqed.measurement import detector_functions as det MC_instr = None VNA_instr = None def acquire_single_linear_frequency_span...
Python
pycqed/measurement/VNA_module.py
DiCarloLab-Delft/PycQED_py3
mit
12,353
295
codeparrot/github-code
ae8256a30ddd27da80ee326f7febc165b67697a9c4b93153092b5d94d406eba9
#include <stdbool.h> #include <string.h> #include <stdio.h> #include <assert.h> #include "hkl_tree.h" #include "hkl_alloc.h" /* * HklPair */ HklPair* hkl_pair_new() { HklPair* pair = hkl_alloc_object(HklPair); pair->key = hkl_string_new(); pair->value = NULL; return pair; } HklPair* hkl_pair_new_from_d...
C
src/hkl_tree.c
hkl/hkl
mit
9,955
485
codeparrot/github-code
853be55024f780e5ca33bd87128dc31f246081b9537f0ff4aead1e0be4f82c7c
// Copyright Joyent, Inc. and other Node contributors. // // 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, modi...
JavaScript
plugins/languageAPI/jsAPI/3rdParty/nodejs/10.1.0/source/test/parallel/test-fs-write.js
MTASZTAKI/ApertusVR
mit
4,804
153
codeparrot/github-code
50492d4b1788466f60ec02c12434838eb56b83f00c9bdbd85fd5b13a6efd6c99
using System; using Microsoft.Extensions.DependencyInjection; using ZptSharp.Dom; using ZptSharp.Hosting; namespace ZptSharp { /// <summary> /// Extension methods for <see cref="IBuildsHostingEnvironment"/> instances. /// </summary> public static class XmlHostingBuilderExtensions { /// <sum...
C#
DocumentProviders/ZptSharp.Xml/XmlHostingBuilderExtensions.cs
csf-dev/ZPT-Sharp
mit
1,301
33
codeparrot/github-code
8610e8c3a7e8b4276d555bd62325f66c388b99e0fb4c1454fdcf5b724dcc3887
abstract sealed class Action case class Atom(atom: Unit => Action) extends Action { override def toString() = "atom" } case class Fork(a1: Action, a2: Action) extends Action { override def toString = s"fork ${a1 toString} ${a2 toString}" } case class Stop() extends Action { override def toString = "stop" ...
Scala
src/mooc/fp101/Lab5Scala/Concurrent.scala
mitochon/hexercise
mit
1,856
65
codeparrot/github-code
349d92de0fdfa138c6736d215262d0cc8837d624c44166c5bf38e5ad672230fb
var through = require('through2'); var cheerio = require('cheerio'); var gulp = require('gulp'); var url = require('url'); var path = require('path'); var fs = require('fs'); var typeMap = { css: { tag: 'link', template: function(contents, el) { var attribute = el.attr('media'); attribute = attri...
JavaScript
index.js
jonnyscholes/gulp-inline
mit
3,543
152
codeparrot/github-code
1c2a9d34f5c11bd6293c8e7ee2cbb090634712d9ab9608e7c4c8e498ce50532d
package strain type Ints []int type Lists [][]int type Strings []string func (i Ints) Keep(filter func(int) bool) Ints { if i == nil { return nil } filtered := []int{} for _, v := range i { if filter(v) { filtered = append(filtered, v) } } i = filtered return i } func (i Ints) Discard(filter func(int...
GO
go/strain/strain.go
rootulp/exercism
mit
862
57
codeparrot/github-code
4c5691475287456e090f53eb1cc1c1c773dbc728665610c533a1654b603ce3bc
/************************************************************************************ PublicHeader: OVR.h Filename : OVR_Math.h Content : Implementation of 3D primitives such as vectors, matrices. Created : September 4, 2012 Authors : Andrew Reisse, Michael Antonov, Steve LaValle, Anna Yershov...
C
JRiftLibrary/LibOVR/Src/Kernel/OVR_Math.h
StellaArtois/JRift
mit
39,173
1,071
codeparrot/github-code
aa4b2ab0c4e4fa31195f8b68f3d1c3604ada4ae6d6ae65e57a2dfd5136d600e4
<?php namespace Renovate\MainBundle\Controller; use Symfony\Bundle\FrameworkBundle\Controller\Controller; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; use Renovate\MainBundle\Entity\Vacancy; use Renovate\MainBundle\Entity\Document; class VacanciesController extends Con...
PHP
src/Renovate/MainBundle/Controller/VacanciesController.php
oligarch777/renovate
mit
3,444
105
codeparrot/github-code
6793797121714545cc5395ddf2670b3f1110dd3920227db566ae1eeefbbc36b5
using System; using System.ComponentModel; using System.Diagnostics; using System.Runtime.InteropServices; // https://stackoverflow.com/a/34384189 namespace PS4Macro.Classes.GlobalHooks { public class GlobalKeyboardHookEventArgs : HandledEventArgs { public GlobalKeyboardHook.KeyboardState Ke...
C#
PS4Macro/Classes/GlobalHooks/GlobalKeyboardHook.cs
komefai/PS4Macro
mit
9,188
207
codeparrot/github-code
85578d8b65a64531021a4c1b74c96be9328f2d096787c100aedc0e08f6676e69
/** * \file * \brief Implementions of RL domains, Mountain Car (MC), HIV, and Bicycle. * * Copyright (c) 2008-2014 Robert D. Vincent. */ #include <vector> #include <utility> #include <cmath> #include <string.h> using namespace std; #include "domain.h" #include "random.h" /** Returns the sign of a real number. ...
C++
domain.cpp
rdvincent/fqi
mit
13,528
442
codeparrot/github-code