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
80e61e0797c91f74f62fbde744a0cdc4998ae2845549efc6f7919e3e19d29d2e
// // SMActivityEventBuilder.h // SessionMEventsKit // // Copyright © 2018 SessionM. All rights reserved. // #ifndef __SM_ACTIVITY_EVENT_BUILDER__ #define __SM_ACTIVITY_EVENT_BUILDER__ #import "SMEventBuilder.h" #import "SMActivityEvent.h" NS_ASSUME_NONNULL_BEGIN /*! @class SMActivityEventBuilder @abstract Cla...
C
Pods/SessionMSDK/SessionM_iOS_v3.0.0/SessionMEventsKit.framework/Headers/SMActivityEventBuilder.h
sessionm/ios-smp-example
mit
818
33
codeparrot/github-code
b30f439b8a2d49671d2c9618dd8eb777a7abc9c3e2273b4a01357315850e8ce0
import java.awt.Dimension; import java.awt.Toolkit; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax.swing.ImageIcon; import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.JTextPane; import java.awt.SystemColor; /** * The GUIError object is used to show an erro...
Java
LadderTracker/src/GUIError.java
jkjoschua/poe-ladder-tracker-java
mit
2,387
78
codeparrot/github-code
ff51ccb0f92a03ae59c5ebbca19d073e9e323c739034828b3edde7336e9dba98
import { GraphQLError } from '../../error/GraphQLError'; import type { SchemaDefinitionNode, SchemaExtensionNode, } from '../../language/ast'; import type { ASTVisitor } from '../../language/visitor'; import type { SDLValidationContext } from '../ValidationContext'; /** * Unique operation types * * A GraphQL ...
TypeScript
src/validation/rules/UniqueOperationTypesRule.ts
graphql/graphql-js
mit
1,903
67
codeparrot/github-code
17b14b8ace732eaffb5825fadf30145e703f713db40e186d2fc6e3c3e77f70dc
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Windows.UI.Xaml; using Windows.UI.Xaml.Data; namespace Podcasts.Converters { public class PodcastDurationConverter : TypedConverter<TimeSpan?, string> { public override string Conv...
C#
Podcasts.Shared/Converters/PodcastDurationConverter.cs
AndrewGaspar/Podcasts
mit
902
34
codeparrot/github-code
41df065190d926899c9053edf492ca701987746a05da4ffd8df5ad67c6285f77
include(Util) once() include (Plugins) if (ANDROID) set (Android_List_dir ${CMAKE_CURRENT_LIST_DIR}) if (NOT ANDROID_SDK) MESSAGE(SEND_ERROR "No ANDROID_SDK location provided!") endif() MESSAGE(STATUS "Targeting Android-SDK version: ${ANDROID_PLATFORM_LEVEL}") file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/grad...
CMake
cmake/platform/android.cmake
MadManRises/Madgine
mit
2,666
82
codeparrot/github-code
9673ea30e9580b330b69c38a16e51f83be4adff3086b77ca9397789e553a82a2
package com.lamost.update; import java.io.IOException; import org.ksoap2.SoapEnvelope; import org.ksoap2.serialization.SoapObject; import org.ksoap2.serialization.SoapSerializationEnvelope; import org.ksoap2.transport.HttpTransportSE; import org.xmlpull.v1.XmlPullParserException; import android.util.Log; /** * Cre...
Java
app/src/main/java/com/lamost/update/UpdateWebService.java
SummerBlack/MasterServer
mit
2,398
86
codeparrot/github-code
8cba83f27b773f5a92ce9ed728750899732a83462155ea1edea3c55e7cf478cb
<?php /* * jQuery File Upload Plugin PHP Class 6.1.1 * https://github.com/blueimp/jQuery-File-Upload * * Copyright 2010, Sebastian Tschan * https://blueimp.net * * Licensed under the MIT license: * http://www.opensource.org/licenses/MIT */ class UploadHandler { protected $options; // PHP File Upload e...
PHP
example/bin/data/jQuery-File-Upload-master/server/php/UploadHandler.php
bakercp/ofxIpVideoServer
mit
30,399
772
codeparrot/github-code
50c66358a04505002dbac462083d75a1d30e584cf15c963b95112630ae97493c
"use strict"; var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Refl...
JavaScript
public/app/services/register/register.service.js
AkshayRaul/MEAN_ToDo
mit
1,804
35
codeparrot/github-code
ee7e6ea5b4bc14bf1e1a650920a517dbef7520c55333872aa3d97e28148d8b21
package cn.winxo.gank.module.view; import android.content.Intent; import android.os.Bundle; import android.support.v4.widget.SwipeRefreshLayout; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.support.v7.widget.Toolbar; import android.util.Log; import...
Java
app/src/main/java/cn/winxo/gank/module/view/DetailActivity.java
yunxu-it/GMeizi
mit
3,387
100
codeparrot/github-code
126651c83b28a2284e8e26f1ecb692587ae852848b9b62f38a9ce3524f86a95c
<?php /* UserFrosting Version: 0.2.2 By Alex Weissman Copyright (c) 2014 Based on the UserCake user management system, v2.0.2. Copyright (c) 2009-2012 UserFrosting, like UserCake, is 100% free and open-source. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associat...
PHP
models/funcs.php
AmazinGears/CoinC
mit
18,102
626
codeparrot/github-code
77536d584e1fdf88ee02d6fd0bc2d2b6a01033cef432820a6923868acf76cf59
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. package com.azure.ai.formrecognizer.administration; import com.azure.ai.formrecognizer.administration.models.AccountProperties; import com.azure.ai.formrecognizer.administration.models.BuildModelOptions; import com.azure.a...
Java
sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/administration/DocumentModelAdminAsyncClientJavaDocCodeSnippets.java
Azure/azure-sdk-for-java
mit
24,260
415
codeparrot/github-code
7f4bfac396a9e8f9f8bfd02085a02051ba32296447075f335ad02b3dca8ceed6
using System; using System.Collections.Generic; using System.Runtime.InteropServices; using System.Windows.Forms; namespace NetsuiteEnvironmentViewer { //http://stackoverflow.com/questions/6442911/how-do-i-sync-scrolling-in-2-treeviews-using-the-slider public partial class MyTreeView : TreeView { publi...
C#
NetsuiteEnvironmentViewer/windowsFormClients/treeViewClient.cs
zacarius89/NetsuiteEnvironmentViewer
mit
3,734
113
codeparrot/github-code
66a6d37eaabeae15be6737e0800098fb6d028d231d20680d883537c6334c8007
/** * University of Campinas - Brazil * Institute of Computing * SED group * * date: February 2009 * */ package br.unicamp.ic.sed.mobilemedia.copyphoto.impl; import javax.microedition.lcdui.Command; import javax.microedition.lcdui.Display; import javax.microedition.lcdui.Displayable; import javax.microedition....
Java
src/br/unicamp/ic/sed/mobilemedia/copyphoto/impl/PhotoViewController.java
leotizzei/MobileMedia-Cosmos-VP-v6
mit
3,765
132
codeparrot/github-code
9540aae90ff1fda791af989090ff0bade80edf31bb135a7e3f3a8a776ce21edd
const pug = require("pug"); const pugRuntimeWrap = require("pug-runtime/wrap"); const path = require("path"); const YAML = require("js-yaml"); const getCodeBlock = require("pug-code-block"); const detectIndent = require("detect-indent"); const rebaseIndent = require("rebase-indent"); const pugdocArguments = require("....
JavaScript
lib/parser.js
Aratramba/jade-doc
mit
8,383
320
codeparrot/github-code
c8cf4cf47546ae3d11f88f19d35463a4fc8de5003d323ca519e9c94ba257f4fd
module SimpleForm class FormBuilder < ActionView::Helpers::FormBuilder attr_reader :template, :object_name, :object, :wrapper # When action is create or update, we still should use new and edit ACTIONS = { :create => :new, :update => :edit } extend MapType include SimpleForm::Inp...
Ruby
lib/simple_form/form_builder.rb
chandresh/simple_form
mit
16,464
449
codeparrot/github-code
66f63a7c02f15355dc464b49c6f155c81dd1ef8c27eac183afb4fbaf70588bb4
import zmq import datetime import pytz from django.core.management.base import BaseCommand, CommandError from django.conf import settings from registrations.models import Registration from registrations import handlers from registrations import tasks class Command(BaseCommand): def log(self, message): f...
Python
registrations/management/commands/registration_worker.py
greencoder/hopefullysunny-django
mit
1,481
45
codeparrot/github-code
c7281072656755c7cd93df723241f1087e7ef6dc080d04a008e47ec264f63f84
import Ember from 'ember'; export default Ember.Component.extend({ tagName: 'img', attributeBindings: ['src'], height: 100, width: 100, backgroundColor: 'aaa', textColor: '555', format: undefined, // gif, jpg, jpeg, png text: undefined, src: Ember.computed('height', 'width', 'backgroundColor', 'textColor'...
JavaScript
app/components/placehold-it.js
adamsrog/ember-cli-placeholdit
mit
791
35
codeparrot/github-code
fb7ea464bc57e7a496c8be83bd72281290b359d35108c7dc6496927f557bbd20
// <copyright file="DataTypeDefinitionMappingRegistrar.cs" company="Logikfabrik"> // Copyright (c) 2016 anton(at)logikfabrik.se. Licensed under the MIT license. // </copyright> namespace Logikfabrik.Umbraco.Jet.Mappings { using System; /// <summary> /// The <see cref="DataTypeDefinitionMappingRegistrar...
C#
src/Logikfabrik.Umbraco.Jet/Mappings/DataTypeDefinitionMappingRegistrar.cs
aarym/uJet
mit
1,635
43
codeparrot/github-code
4a2f48262e22815c4dc645eb7812ddb6c685fc327265fd6ea62c705d3172392c
import java.util.Scanner; public class BinarySearch { public static int binarySearch(int arr[], int num, int startIndex, int endIndex) { if (startIndex > endIndex) { return -1; } int mid = startIndex + (endIndex - startIndex) / 2; if (num == arr[mid]) { return mid; } else if (num > arr[mid]) { ...
Java
Searching/BinarySearch.java
CodersForLife/Data-Structures-Algorithms
mit
932
40
codeparrot/github-code
40f90fdec10a90ec3ea4dedaa38844e6d0705322098113d5b718ed30d0be0fcf
package com.docuware.dev.schema._public.services.platform; import javax.xml.bind.annotation.XmlEnum; import javax.xml.bind.annotation.XmlEnumValue; import javax.xml.bind.annotation.XmlType; @XmlType(name = "SortDirection") @XmlEnum public enum SortDirection { @XmlEnumValue("Default") DEFAULT("Default"), ...
Java
src/main/java/com/docuware/dev/schema/_public/services/platform/SortDirection.java
dgautier/PlatformJavaClient
mit
808
45
codeparrot/github-code
6d7f286ce669e3cb55a69eb4b168d4f88716c2015466a0399ed625212f72cc1a
use std::borrow::Cow; use std::collections::HashMap; use std::io::Write; use serde_json::{to_string_pretty, to_value, Number, Value}; use crate::context::{ValueRender, ValueTruthy}; use crate::errors::{Error, Result}; use crate::parser::ast::*; use crate::renderer::call_stack::CallStack; use crate::renderer::for_loop...
Rust
src/renderer/processor.rs
Keats/tera
mit
43,679
1,070
codeparrot/github-code
1d10eff82eb6a87db419ba4050e3213e18cf09bc56808fa329282636123839c7
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace VaiFundos { class Program { static void Main(string[] args) { GerenciadorCliente gerenciador = new GerenciadorCliente(); FundosEmDolar fundo_dol...
C#
VaiFundos/VaiFundos/Program.cs
jescocard/VaiFundosUCL
mit
15,662
317
codeparrot/github-code
4afd3c64cd305634369603cd0ad1ac57583cfbee258d8d3eafb00abf4379a438
<?php /** @var Illuminate\Pagination\LengthAwarePaginator $users */ ?> @section('header') <h1><i class="fa fa-fw fa-users"></i> {{ trans('auth::users.titles.users') }} <small>{{ trans('auth::users.titles.users-list') }}</small></h1> @endsection @section('content') <div class="box box-primary"> <div ...
PHP
resources/views/admin/users/index.blade.php
ARCANESOFT/Auth
mit
18,908
376
codeparrot/github-code
e3e3e87233ff75460f809c02432405844362eb7f316c97b34222da7cc663cd18
// The MIT License (MIT) // // Copyright (c) 2014-2017 Darrell Wright // // 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...
C++
src/nodepp_rfb.cpp
beached/nodepp_rfb
mit
18,856
507
codeparrot/github-code
3c2f97ec1f72fea077d6cb25797bcfee6bc94a84664668902551c0fdc3b9edb5
<?php namespace HiFebriansyah\LaravelContentManager\Traits; use Form; use Illuminate\Support\MessageBag; use Carbon; use Session; trait Generator { public function generateForm($class, $columns, $model) { $lcm = $model->getConfigs(); $errors = Session::get('errors', new MessageBag()); ...
PHP
src/Traits/Generator.php
hifebriansyah/laravel-content-manager
mit
4,601
92
codeparrot/github-code
a31fd631ef746c417fa4c6fa4f8ee709df4ecb168b06c5490ec293eed79ecb52
--- layout: default --- {% assign minutes = content | number_of_words | divided_by: 180 %} {% if minutes == 0 %} {% assign minutes = 1 %} {% endif %} <div class="post-header mb2"> <h2>{{ page.title }}</h2> <span class="post-meta">{{ page.date | date: "%b %-d, %Y" }}</span><br> {% if page.update_date %} <spa...
HTML
_layouts/post.html
chufuxi/chufuxi.github.com
mit
1,900
64
codeparrot/github-code
b5e349b7eb368267e7ab23559725bf3cc2b859c30a81392ef1f2e8ad68e1d5e8
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; using Julas.Utils; using Julas.Utils.Collections; using Julas.Utils.Extensions; using TheArtOfDev.HtmlRen...
C#
Client/ConversationForm.cs
EMJK/Projekt_WTI_TIP
mit
8,025
235
codeparrot/github-code
3be614492bece7ef3a4fba46c8d9c93ea5ee0ae88a3a0d250270fb1339cc6596
#ifndef INCLUDED_openfl__legacy_events_KeyboardEvent #define INCLUDED_openfl__legacy_events_KeyboardEvent #ifndef HXCPP_H #include <hxcpp.h> #endif #ifndef INCLUDED_openfl__legacy_events_Event #include <openfl/_legacy/events/Event.h> #endif HX_DECLARE_CLASS3(openfl,_legacy,events,Event) HX_DECLARE_CLASS3(openfl,_lega...
C
haxe/export/linux64/cpp/obj/include/openfl/_legacy/events/KeyboardEvent.h
syonfox/PixelPlanetSandbox
mit
2,756
64
codeparrot/github-code
1528d7ce9b9da42a68e6a259cbd2d3e2d3dd28ef9bab5663491793728cea6104
<input type="hidden" id="permission" value="<?php echo $permission;?>"> <section class="content"> <div class="row"> <div class="col-xs-12"> <div class="box"> <div class="box-header"> <h3 class="box-title">Usuarios</h3> <?php if (strpos($permission,'Add') !== false) { ...
PHP
application/views/users/list.php
sergiojaviermoyano/sideli
mit
6,176
197
codeparrot/github-code
14d41333026ea6712b5d0e8de230373bec171a7c66a8acb2b64f86b22eb128b2
import numpy as np from numpy import cumsum, sum, searchsorted from numpy.random import rand import math import utils import core.sentence as sentence import core.markovchain as mc import logging logger = logging.getLogger(__name__) # Dialogue making class. Need to review where to return a string, where to return a l...
Python
core/dialogue.py
dcorney/text-generation
mit
5,911
148
codeparrot/github-code
6cda71f2fb31e89ec07b2901cde99eee145c7bfdad0fe5bdf26b7b20a6b06bb8
/* Credits: Most of the original code seems to have been written by George Michael Brower. The changes I've made include adding background particle animations, text placement and modification, and integration with a sparkfun heart rate monitor by using Pubnub and johnny-five. INSTRUCTIONS ...
JavaScript
FizzyText.js
mattchiang-gsp/mattchiang-gsp.github.io
mit
12,644
398
codeparrot/github-code
2d7317462b5325b5120e405341c17db1a4126852c35b37ed9735f27a8c5e945a
#include <stdio.h> #include <unistd.h> #include <fcntl.h> #include <errno.h> #include <assert.h> #include <sys/epoll.h> #include "reactor.h" struct state { reactor_handler input; reactor_handler output; char buffer[4096]; data remaining; }; int fill(struct state *state) { ssize_t n; ...
C
example/fd.c
fredrikwidlund/libreactor
mit
1,952
99
codeparrot/github-code
61e0353fe62fed13adf865ba1bb0cc935647e0a696d5682799f016fec1d549d3
<!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Posts &middot; dpc&#39;s blog</title> <meta name="description" content="Random posts about stuff."> <meta name="generator" content="Hugo 0.16" /> <meta name="twitter...
HTML
post/index.html
dpc/dpc.github.io
mit
27,123
721
codeparrot/github-code
73b80fbfea70d6e7263c9ddef6e85458c07573e4f6cb9ae9ce1be59792a19554
#include "randomplayer.h" #include <QDirIterator> void RandomPlayer::start() { this->setMedia(QUrl::fromLocalFile(fileList.takeFirst())); this->play(); this->_readyToPlay = true; } void RandomPlayer::quitPlayMode() { this->_readyToPlay = false; this->stop(); } bool RandomPlayer::isPlayMode(){ ...
C++
randomplayer.cpp
ArnaudBenassy/sono_manager
mit
1,499
63
codeparrot/github-code
c171f72102bb1d416cb227e680fcf531b63ecee1cd98e218328735eb5bd29bdf
using System; using System.Collections.Generic; using System.IO; using System.Linq; using log4net; using Newtonsoft.Json; using RoboticsTxt.Lib.Contracts; using RoboticsTxt.Lib.Contracts.Configuration; namespace RoboticsTxt.Lib.Components.Sequencer { internal class PositionStorageAccessor { private re...
C#
TxtControllerLib/Components/Sequencer/PositionStorageAccessor.cs
artiso-solutions/robotics-txt-net
mit
2,438
79
codeparrot/github-code
43912ec6bec478bca11e669530b469f1676835b7c3415617a2edd3e52a5a2b01
<!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>Miruken Docs &mdash; SymbolDownloader docum...
HTML
documentation/versions/miruken-dotnet/SymbolDownloader/master/README.html
miruken/miruken.github.io
mit
6,506
257
codeparrot/github-code
23bfa695014e4da3c70446144f86c4d71fe8825fe0c789e1aa1d0bef4374e9bb
/** * The MIT License (MIT) * * Copyright (c) 2015 Vincent Vergnolle * * 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 * t...
Java
vas-notification/src/main/java/org/vas/notification/NotificationWorker.java
vincent7894/vas
mit
2,998
89
codeparrot/github-code
4eab960250250c560c13c1a1771a081c311b09ee3e981633399ee2aa2be60865
using UnityEngine; using System; using System.IO; using System.Collections; using System.Collections.Generic; using System.Runtime.Serialization.Formatters.Binary; // Emanuel Strömgren public class DebugTrackerVisualizer : MonoBehaviour { private BinaryFormatter m_Formatter = new BinaryFormatter(); private B...
C#
Assets/Dravenklova/Scripts/PawnScripts/PlayerScripts/DebugTrackerVisualizer.cs
Towkin/DravenklovaUnity
mit
2,456
89
codeparrot/github-code
303921d1cffafc2ed1c6fbab230ef9d121e4a81807cdaf147c96410a44f89252
package com.reactnativeexample; import com.facebook.react.ReactActivity; import com.facebook.react.ReactPackage; import com.facebook.react.shell.MainReactPackage; import java.util.Arrays; import java.util.List; public class MainActivity extends ReactActivity { /** * Returns the name of the main component r...
Java
examples/react-native-web/android/app/src/main/java/com/reactnativeexample/MainActivity.java
attrs/webmodules
mit
1,050
41
codeparrot/github-code
b9d5b7ce935f66b0390802b27aac6b4a3780b659a5ac2d9663377526d6ae89e9
/// <reference path="Global.ts" /> /// <reference path="Decks.ts" /> module ScrollsTypes { 'use strict'; export class DeckCards { cards:CardsAndStats[] = []; deck:Deck; constructor(deck:Deck) { this.deck = deck; this.update(); } update():void {...
TypeScript
client/types/DeckCards.ts
darosh/scrolls-and-decks
mit
1,991
78
codeparrot/github-code
2a6dbd951c4deced850199e06258530a16f794dfd569bee5c31e0383f9323b5d
package net.inpercima.runandfun.service; import static net.inpercima.runandfun.runkeeper.constants.RunkeeperConstants.ACTIVITIES_MEDIA; import static net.inpercima.runandfun.runkeeper.constants.RunkeeperConstants.ACTIVITIES_URL_PAGE_SIZE_ONE; import static net.inpercima.runandfun.runkeeper.constants.RunkeeperConstants...
Java
server/src/main/java/net/inpercima/runandfun/service/ActivitiesService.java
inpercima/run-and-fun
mit
7,789
199
codeparrot/github-code
758df20978ebabfdf75aef907ae83f0902b527d358bb0a00167bc1ac6124251f
<?php /** * Pure-PHP implementation of SFTP. * * PHP version 5 * * Currently only supports SFTPv2 and v3, which, according to wikipedia.org, "is the most widely used version, * implemented by the popular OpenSSH SFTP server". If you want SFTPv4/5/6 support, provide me with access * to an SFTPv4/5/6 server. * ...
PHP
inc/phpseclib/Net/SFTP.php
qrux/phputils
mit
99,629
3,074
codeparrot/github-code
cb49ef80d22a721ab46ddf0751e799c191638e5fe9448612c120324c6c11ba0a
/* -------------------------------------------------------------------------------- Based on class found at: http://ai.stanford.edu/~gal/Code/FindMotifs/ -------------------------------------------------------------------------------- */ #include "Platform/StableHeaders.h" #include "Util/Helper/ConfigFile.h" ...
C++
Engine/Util/Helper/src/ConfigFile.cpp
danielsefton/Dangine
mit
4,492
145
codeparrot/github-code
21b3de737584fa69fa9a18efdc0d4319bb1869f13f05666e3763d876152bcbea
# frozen_string_literal: true module Webdrone class MethodLogger < Module class << self attr_accessor :last_time, :screenshot end def initialize(methods = nil) super() @methods = methods end if Gem::Version.new(RUBY_VERSION) < Gem::Version.new('2.7') def included(base) ...
Ruby
lib/webdrone/logg.rb
a0/a0-webdrone-ruby
mit
7,845
230
codeparrot/github-code
ddab22ffbadd381fc8e4f91238ae56e1bdf6af77d7898dae33dca3b02b5d0198
// Copyright (c) Microsoft Corporation. // Licensed under the MIT License. #if XR_MANAGEMENT_ENABLED using UnityEngine.XR.Management; #endif // XR_MANAGEMENT_ENABLED namespace Microsoft.MixedReality.Toolkit.Utilities { /// <summary> /// Utilities that abstract XR settings functionality so that the MRTK need ...
C#
Assets/MRTK/Core/Utilities/XRSettingsUtilities.cs
DDReaper/MixedRealityToolkit-Unity
mit
1,778
52
codeparrot/github-code
34b3e604bb610ee8ebb7bb3eea6ee1b9ed8b58e76d27efb964c5be77b1bb1f29
const Koa = require('koa'); const http = require('http'); const destroyable = require('server-destroy'); const bodyParser = require('koa-bodyparser'); const session = require('koa-session'); const passport = require('koa-passport'); const serve = require('koa-static'); const db = require('./db'); const config = requir...
JavaScript
server.js
xz64/image-sharing
mit
1,341
63
codeparrot/github-code
2a9518724925d1df1df49a63aa86fb4f40ec79e83b47f8b638beed8ec75dba6c
<?php use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Config\Loader\LoaderInterface; class AppKernel extends Kernel { public function registerBundles() { $bundles = array( new Symfony\Bundle\FrameworkBundle\FrameworkBundle(), new Symfony\Bundle\SecurityBundle\Se...
PHP
app/AppKernel.php
justinecavaglieri/EasySymfony
mit
1,993
55
codeparrot/github-code
cb0187dd2ee5afd27b513b0873915f72dfb51d148b3c7a6b8f1cd0c24d0d0996
using System; using Xamarin.Forms; namespace EmployeeApp { public partial class ClaimDetailPage : ContentPage { private ClaimViewModel model; public ClaimDetailPage(ClaimViewModel cl) { InitializeComponent(); model = cl; BindingContext =...
C#
Mobile/EmployeeApp/EmployeeApp/EmployeeApp/Views/ClaimDetailPage.xaml.cs
TBag/canviz
mit
3,469
75
codeparrot/github-code
54796f2e19f4915db1980bc047f91a3f406f09eb2f377afe55733455b7b698ca
/* Copyright (C) 2013-2015 MetaMorph Software, Inc Permission is hereby granted, free of charge, to any person obtaining a copy of this data, including any software or models in source or binary form, as well as any drawings, specifications, and documentation (collectively "the Data"), to deal in the Data withou...
C#
metamorphosys/META/src/CyPhyPrepareIFab/ComponentConfig.cs
pombredanne/metamorphosys-desktop
mit
3,987
88
codeparrot/github-code
52fc44e8bae501562c055f1ddfbd89f49253d9ccc07a818068c0a0b2f544ce73
from __future__ import annotations from collections import defaultdict from collections.abc import Generator, Iterable, Mapping, MutableMapping from contextlib import contextmanager import logging import re import textwrap from types import MappingProxyType from typing import TYPE_CHECKING, Any, NamedTuple from markd...
Python
src/mdformat/renderer/_context.py
executablebooks/mdformat
mit
22,558
630
codeparrot/github-code
00b722c635219e8ababc6f79a177fc3c4530567f8456e5ff854abbfd6f66b975
package com.globalforge.infix; import org.junit.Assert; import org.junit.BeforeClass; import org.junit.Test; import com.globalforge.infix.api.InfixSimpleActions; import com.google.common.collect.ListMultimap; /*- The MIT License (MIT) Copyright (c) 2019-2020 Global Forge LLC Permission is hereby granted, free of ch...
Java
src/test/java/com/globalforge/infix/TestAndOrSimple.java
globalforge/infix
mit
16,486
456
codeparrot/github-code
18bb8db24a87f61b93291fad91df103847b0cb16c7f71af5edb02cd5cd58f249
package iron_hippo_exe import ( "fmt" "io" "net/http" "golang.org/x/oauth2" "golang.org/x/oauth2/google" "google.golang.org/appengine" "google.golang.org/appengine/log" "google.golang.org/appengine/urlfetch" ) const ProjectID = "cpb101demo1" type DataflowTemplatePostBody struct { JobName string `json:"...
GO
appengine/iron_hippo.go
sinmetal/iron-hippo
mit
1,489
61
codeparrot/github-code
b27eaa1bc9799be1eef1dd8475a5f1eedfe4482dab15a70cbc3e608f86e22f25
--[[ File: src/animation/frame.lua Author: Daniel "lytedev" Flanagan Website: http://dmf.me Contains the data to specify a piece of a texture over a period of time. ]]-- local Frame = Class{} function Frame.generate(w, h, imgw, imgh, num, time, frames, offset, start) local start = start or 0 local t...
Lua
lib/animation/frame.lua
lytedev/love2d-bootstrap
mit
1,198
43
codeparrot/github-code
b79b85348272e02d4b7161e9406129aeefaf971cac4febaad457b4bc4e781260
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no, minimal-ui"> <meta name="apple-mobile-web-app-capable" content="yes"> <meta name="apple-mobile-web-app-status-bar-style" content=...
HTML
index.html
dalisoft/Framework7-QuickAction
mit
20,660
382
codeparrot/github-code
cb443fce8ce262337f34ff31d71ea9293dc1c8c39a88d19b29d2fc02d95e4a54
import { h, Component } from 'preact'; import moment from 'moment'; const MonthPicker = ({ onChange, ...props }) => ( <select onChange={onChange} id="select-month">{ optionsFor("month", props.date) }</select> ); const DayPicker = ({ onChange, ...props }) => ( <select onChange={onChange} id="select-date">{ options...
JavaScript
app/src/components/DatePicker.js
jc4p/natal-charts
mit
2,568
83
codeparrot/github-code
594b50532843db48602e74027376bc03b1643b4f1d56d74dded9486a128b97c1
'use strict'; angular.module('users').factory('Permissions', ['Authentication', '$location', function(Authentication, $location) { // Permissions service logic // ... // Public API return { //check if user suits the right permissions for visiting the page, Otherwise go to 401 userRolesContains: functio...
JavaScript
public/modules/users/services/permissions.client.service.js
hacor/gamwbras
mit
1,228
43
codeparrot/github-code
e524e1faf98e548d8ded95e96fe7c4fe8f9bbfe9cc0923b54a85ea56fcf408e4
require 'nokogiri' require 'ostruct' require 'active_support/core_ext/string' require 'active_support/core_ext/date' module Lifebouy class MalformedRequestXml < StandardError def initialize(xml_errors) @xml_errors = xml_errors end def message "The request contains the following errors:\n\t#{...
Ruby
lib/lifebouy/request_handler.rb
reedswenson/lifebouy
mit
5,812
196
codeparrot/github-code
a7b94fe12e47088120a183ec77ccee1b9879e719f76e7c8315af0d3358d1743e
/** * Trait class */ function Trait(methods, allTraits) { allTraits = allTraits || []; this.traits = [methods]; var extraTraits = methods.$traits; if (extraTraits) { if (typeof extraTraits === "string") { extraTraits = extraTraits.replace(/ /g, '').split(','); }...
JavaScript
lib/plugins/app/lib/Trait.js
azproduction/node-jet
mit
1,059
43
codeparrot/github-code
34c930687afb064a1e86e8d8f97f478a145fdda5694107f0f3261a6829f451b3
require 'integrity' require 'fileutils' module Integrity class Notifier class Artifacts < Notifier::Base def initialize(commit, config={}) @project = commit.project super end def deliver! return unless self.commit.successful? self.publish_artifacts self...
Ruby
lib/integrity/notifier/artifacts.rb
subakva/integrity-artifacts
mit
4,391
134
codeparrot/github-code
61f382b0c79e22bd5fa09cf417a9d1191b0a979b8a00c07867567ba30139dcc7
<!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <link rel="shortcut icon" href="http://www.entwicklungshilfe.nrw/typo3conf/ext/wmdb_base_ewh/Resources/Public/img/favicon.ico" type="image/x-icon"> <title>oh-my-zsh Präsentation von Php-Schulung Entwicklungshilfe</title> ...
HTML
oh-my-zsh.html
Entwicklungshilfe-NRW/Presentations
mit
19,607
386
codeparrot/github-code
4ebd73f4ebe034a562b14a903ea8150305b6e50ecb33ba5abcab87575c2f41fc
import {Component, Input} from '@angular/core'; import {CORE_DIRECTIVES} from '@angular/common'; import {ROUTER_DIRECTIVES, Router} from '@angular/router-deprecated'; import {AuthService} from '../common/auth.service'; @Component({ selector: 'todo-navbar', templateUrl: 'app/navbar/navbar.component.html', direct...
TypeScript
clients/angular2/app/navbar/navbar.component.ts
Boychenko/sample-todo-2016
mit
889
37
codeparrot/github-code
51cd84b34c452710de98515e8b37652ad3495afed48bddb942e8b118ea431698
'use strict'; /** * Module dependencies. */ var mongoose = require('mongoose'), Game = mongoose.model('Game'), Team = mongoose.model('Team'), Player = mongoose.model('Player'), async = require('async'); exports.all = function(req, res) { Game.find({'played': true}).exec(function(err, games) { if (err)...
JavaScript
packages/custom/league/server/controllers/games.js
javi7/epl-98
mit
9,754
298
codeparrot/github-code
134616d0e576c283a323ed3c45a7d460f420626b4b5ecdc46909366d38504a4d
package championpicker.console; import com.googlecode.lanterna.gui.*; import com.googlecode.lanterna.TerminalFacade; import com.googlecode.lanterna.terminal.Terminal; import com.googlecode.lanterna.terminal.TerminalSize; import com.googlecode.lanterna.terminal.swing.SwingTerminal; import com.googlecode.lanterna.gui....
Java
src/championpicker/console/mainMenu.java
DanielBoerlage/champion-picker
mit
1,150
42
codeparrot/github-code
1f412b0477e08f857b2eae6be3acde90a0b062c622b1900b3f0a20012c0f23fc
package simulation.generators; import simulation.data.PetrolStation; import simulation.data.Road; /** * Created by user on 03.06.2017. */ public class PetrolStationGenerator { private Road road; private int minimalDistanceBetweenStations = 50; private int maximumDistanceBetweenStations = 200; priva...
Java
Fuzzy-Driver/src/main/java/simulation/generators/PetrolStationGenerator.java
MiszelHub/FuzzyDriverRefueling
mit
2,533
86
codeparrot/github-code
f0e27820501ae1c62edda9e6feb452020e9d136dfd05681e7fbf917f88c20859
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <meta http-equiv="X-UA-Compatible" content="IE=9"/> <meta name="generator" con...
HTML
docs/html/da/d52/classstd_1_1_sys-members.html
RoseLeBlood/aSTL
mit
15,407
121
codeparrot/github-code
49b8f79497219981881416ca1edc4563e1f9d2559e90cac14176517edfeb2963
var ExtractTextPlugin = require("extract-text-webpack-plugin"); var HtmlWebpackPlugin = require("html-webpack-plugin"); var path = require("path"); var webpack = require("webpack"); var projectTemplatesRoot = "../../ppb/templates/"; module.exports = { context: path.resolve(__dirname, "src"), entry: { a...
JavaScript
static/webpack.config.js
pinax/blog.pinaxproject.com
mit
2,456
66
codeparrot/github-code
7f36a57205a9a87d5d65da529f487ff209b0118fcf6bbbfe611c44405cd1d0e2
import { HookContext, Application, createContext, getServiceOptions } from '@feathersjs/feathers'; import { NotFound, MethodNotAllowed, BadRequest } from '@feathersjs/errors'; import { createDebug } from '@feathersjs/commons'; import isEqual from 'lodash/isEqual'; import { CombinedChannel } from '../channels/channel/co...
TypeScript
packages/transport-commons/src/socket/utils.ts
feathersjs/feathers
mit
3,996
115
codeparrot/github-code
5bdacfe1d92d7c470094acd478afb618aa9de92e2dbf9882e531baeee264daef
/** * The MIT License (MIT) * * Copyright (c) 2015 Famous Industries 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 * in the Software without restriction, including without limitation the rights...
JavaScript
src/webgl-geometries/primitives/Tetrahedron.js
talves/famous-engine
mit
2,960
122
codeparrot/github-code
d4ac9934eb63bec95184e7bab3c18ae1e863ba3f9035e91a15fdede16372ef52
/* * Copyright 2016 Christoph Brill <egore911@gmail.com> * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, ...
C#
libldt3/LdtReader.cs
egore/libldt3-cs
mit
18,803
677
codeparrot/github-code
188ad206c71f597e355898fee2ccbd546097ffb61b7ca9d47a8eab14d559833b
var map; var bounds; var markers = {}; var cluster_polygons = {}; var zoomTimeout; var cluster_center_overlay; var white_overlay; var overlay_opacity = 50; var OPACITY_MAX_PIXELS = 57; var active_cluster_poly; var marker_image; var center_marker; var cluster_center_marker_icon; function createMap() { bounds = new ...
JavaScript
photoplaces/static/script/map.js
joonamo/photoplaces
mit
15,053
440
codeparrot/github-code
6c7975dccd54cbcd6957cf550041def67aaf89d1e32fc191cec8dfd6b2bd39e6
#include "sendcoinsdialog.h" #include "ui_sendcoinsdialog.h" #include "walletmodel.h" #include "bitcoinunits.h" #include "addressbookpage.h" #include "optionsmodel.h" #include "sendcoinsentry.h" #include "guiutil.h" #include "askpassphrasedialog.h" #include "base58.h" #include <QMessageBox> #include <QLocale> #include...
C++
src/qt/sendcoinsdialog.cpp
devxxxcoin/xxxcoin
mit
9,070
311
codeparrot/github-code
4c7f16c8f60674b4668848d53aaf38234efac4a55398409e0bcaed3cffff0a55
<?php namespace Aquatic; use Aquatic\FedEx\Contract\Address; use Aquatic\FedEx\Contract\Shipment; use Aquatic\FedEx\Response\Contract as ResponseContract; use Aquatic\FedEx\Request\ValidateAddress as ValidateAddressRequest; use Aquatic\FedEx\Response\ValidateAddress as ValidateAddressResponse; use Aquatic\FedEx\Reque...
PHP
src/Aquatic/FedEx.php
aquaticpond/fedex
mit
1,667
38
codeparrot/github-code
e7aa55598d860dbe52a6712c83db74178fed5ca2f2fa6a0889cf23e74a904a31
import React, { Component } from 'react' import PropTypes from 'prop-types' import { MultiSelect } from '../../src' class MultiSelectWithStringValues extends Component { constructor(props) { super(props) this.state = { value: [] } } handleChange = (event) => { const { valueKey } = this.p...
JavaScript
stories/components/MultiSelectWithStringValues.js
sthomas1618/react-crane
mit
667
31
codeparrot/github-code
3713542f0a8a0a48181c733aaa566142c52a7083219691514f050cf34d739b8a
""" [2015-07-13] Challenge #223 [Easy] Garland words https://www.reddit.com/r/dailyprogrammer/comments/3d4fwj/20150713_challenge_223_easy_garland_words/ # Description A [_garland word_](http://blog.vivekhaldar.com/post/89763722591/garland-words) is one that starts and ends with the same N letters in the same order, f...
Python
DailyProgrammer/DP20150713A.py
DayGitH/Python-Challenges
mit
1,597
37
codeparrot/github-code
455baeeda80d5292ff387e5d2d52885be20363c1bc389cb76851957e797fb197
/** * * Licensed Property to China UnionPay Co., Ltd. * * (C) Copyright of China UnionPay Co., Ltd. 2010 * All Rights Reserved. * * * Modification History: * ============================================================================= * Author Date Description * ------------ -----...
Java
microservice-provider-pay/src/main/java/com/boyuanitsm/pay/unionpay/config/SDKConstants.java
smjie2800/spring-cloud-microservice-redis-activemq-hibernate-mysql
mit
12,458
365
codeparrot/github-code
e8b50f78ca7f14476d2eb38b349743b5cd96cf7a564d28ebe0f5ea3f0bc4ff57
require 'faraday' require 'simple_ratings/foursquare/meta/venue' module SimpleRatings class Foursquare < Faraday::Connection def initialize super(url: 'https://api.foursquare.com/v2/') end def default_params { client_id: ENV['FOURSQUARE_CLIENT_ID'], client_secret: ENV['FOURSQ...
Ruby
lib/simple_ratings/foursquare.rb
benastan/simple_ratings
mit
918
42
codeparrot/github-code
95a4c8c8e99bba12b11e7e07832a4ac9387d355c9cda817d8ae8ff931b0d83f4
using System; using System.Text; namespace ExifLibrary { /// <summary> /// Represents an enumerated value. /// </summary> public class ExifEnumProperty<T> : ExifProperty { protected T mValue; protected bool mIsBitField; protected override object _Value { get { return Value;...
C#
ExifLibrary/ExifExtendedProperty.cs
ahzf/ExifLibrary
mit
13,974
374
codeparrot/github-code
6f42b3e7c5c0da2780ebae2f1871ef00590228ce6aa50e21bc0fa17cb9928cd5
/*! * Module dependencies. */ var util = require('util'), moment = require('moment'), super_ = require('../Type'); /** * Date FieldType Constructor * @extends Field * @api public */ function datearray(list, path, options) { this._nativeType = [Date]; this._defaultSize = 'medium'; this._underscoreMethods...
JavaScript
fields/types/datearray/DateArrayType.js
riyadhalnur/keystone
mit
3,038
143
codeparrot/github-code
f5305a81b507002c5917c33b48956c897d86c92d9694e9845dd1c4ab6798a20d
# -*- coding: utf-8 -*- require "em-websocket" require "eventmachine-tail" module Tailer # Extends FileTail to push data tailed to an EM::Channel. All open websockets # subscribe to a channel for the request stack and this pushes the data to # all of them at once. class StackTail < EventMachine::FileTail d...
Ruby
lib/deployinator/stack-tail.rb
etsy/deployinator
mit
1,401
38
codeparrot/github-code
d7bf74334b0b91c921a5d5224364c2f6ac5e64ad6c3623e4ffd4561d6cded135
// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. namespace DotNetty.Transport.Channels.Sockets { using System; using System.Diagnostics.Contracts; using System.Net; using System.Net.NetworkInformation...
C#
DotNetty/DotNetty.Transport/Channels/Sockets/DefaultDatagramChannelConfig.cs
dragonphoenix/proto-java-csharp
mit
14,693
489
codeparrot/github-code
92b448ca26050c3c396bf82ce167520075cf44dc927933a41b3c4c52acff28c1
/* * Search first occurence of a particular string in a given text [Finite Automata] * Author: Progyan Bhattacharya <progyanb@acm.org> * Repo: Design-And-Analysis-of-Algorithm [MIT LICENSE] */ #include "Search.h" static int NextState(int m, char* pattern, int state, int symbol) { if (state < m && pattern[stat...
C
String Search/Finite Automata/Search.c
Progyan1997/Design-and-Analysis-of-Algorithm
mit
1,307
45
codeparrot/github-code
724d93bbbd10149287a8c10af42a27e20a7d97d01ea7f89528b6ef035e66b122
<?php namespace Zanson\SMParser\Traits\Song; use Zanson\SMParser\SMException; trait Banner { public $banner = ''; /** * @return string */ public function getBanner() { return $this->banner; } /** * @param string $banner * * @return $this * @throws SMExceptio...
PHP
src/Traits/Song/Banner.php
jasonwatt/SMParser
mit
541
31
codeparrot/github-code
33d6a84b3fd313101b4d2d11498046de93dc253b099e530ffba666e5adad62f7
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using System.Timers; using System.Diagnostics; namespace ForumHelper { public partial class ToastForm : Form { ...
C#
ForumHelper/ForumHelper/ToastForm.cs
ttitto/PersonalProjects
mit
1,850
68
codeparrot/github-code
11db568971a8ef0808451eb4d0fea1134edb0231f111a539eb2a449769194255
/************************ BUBBLE SORT Author:Rhysn Date:2015 *************************/ #include <stdio.h> #include <stdlib.h> typedef int ElemType; void swap(ElemType *left,ElemType *right){ ElemType temp = *left; *left = *right; *right = temp; } void BubbleSort(ElemType *array,int num){ ...
C
Sort/BubbleSort.c
Rhysn/Data-Structure-And-Algorithm
mit
917
58
codeparrot/github-code
d7b739464a0a64e724cf9d42cb90f268c3f7485b2fdc38d1f3c553a3e0b2c31e
/**************************************************************** Copyright (C) 2014 All rights reserved. > File Name: < echo_server.c > > Author: < Sean Guo > > Mail: < iseanxp+code@gmail.com > > Created Time: < 2014/06/19 > > ...
C
linux/linux-example/socket_echo_server/echo_server.c
SeanXP/ARM-Tiny6410
mit
4,775
173
codeparrot/github-code
c06e34e53eaf0a07c3d169366b1d9e7df5206c4c1bcdf53aefddc6e17f9c3a6e
var fractal = fractal || {}; fractal.workerPaths = { "mandelbrot": "public/js/mandel.js", }; fractal.Fractal = function (canvas, workerCount) { this.canvas = canvas; this.workerCount = workerCount; this.workerDoneCount = 0; this.ctx = canvas.getContext("2d"); this.width = canvas.width; this.height = c...
JavaScript
Practica3/public/js/canvas_fractal.js
hectoregm/hectoregm
mit
4,312
146
codeparrot/github-code
85205a3afa8291d091f2ea543d03a4206a9f7874eec29f6a038057379c5e2d15
/** * @file ui/core/styleguide/index//html/01-body/40-main/main.js * @description Listeners on the body, iframe, and rightpull bar. */ /* istanbul ignore if */ if (typeof window === 'object') { document.addEventListener('DOMContentLoaded', () => { const $orgs = FEPPER_UI.requerio.$orgs; const { uiFns...
JavaScript
ui/core/styleguide/index/html/01-body/40-main/main.js
electric-eloquence/fepper-npm
mit
2,224
62
codeparrot/github-code
4b8a5e6bba988d67304cb42ddb42987b96a3027bad227353d296fbe25ddd08e4
<?php namespace Checkdomain\Holiday; use Checkdomain\Holiday\Model\Holiday; /** * Class Util */ class Util { /** * Instantiates a provider for a given iso code * * @param string $iso * * @return ProviderInterface */ protected function getProvider($iso) { $instance ...
PHP
src/Util.php
checkdomain/Holiday
mit
1,932
94
codeparrot/github-code
d1d46d4c0d3f1f4fab941bde71cd20c8604fd447a1ee73b9ad1c638e429af3b3
import java.io.BufferedReader; import java.io.IOException; import java.nio.charset.Charset; import java.nio.charset.StandardCharsets; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; public class CharCounterMain{ final static Charset enc = StandardCharsets.US_ASCII ; ...
Java
year_3/large_scale_and_distributed_systems/src/CharCounterMain.java
dperezmavro/courseworks_uni
mit
1,792
54
codeparrot/github-code
e7785dc6627ed20a72c1a4dd446b5c28bf2a90c0bdd908ff0d54e336e36ccc35
"use strict"; (function() { // "todos-angular" is just a hard-code id for storage var LOCAL_STORAGE_KEY = 'todos-angular'; var ENTER_KEY = 13; var ESC_KEY = 27; var internalFilters = { active: function(toDoItem) { return !toDoItem.completed; }, completed: functi...
JavaScript
module3/scripts/angular-app.js
sasyomaru/advanced-javascript-training-material
mit
9,478
253
codeparrot/github-code
56a55141a77e4601e813ae24f8ddf1bc80b6bb16e278c4ba56f65a474852c312
from decimal import Decimal from django import forms from django.template.loader import render_to_string from django.template.defaultfilters import slugify class BaseWidget(forms.TextInput): """ Base widget. Do not use this directly. """ template = None instance = None def get_parent_id(self,...
Python
ratings/forms/widgets.py
redsolution/django-generic-ratings
mit
7,704
203
codeparrot/github-code
c4932c81e564cf9327a040dc9448830d39a3bac035551f5e1082e088fbb9cdde
package sbahjsic.runtime; import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Set; import sbahjsic.core.Warnings; import sbahjsic.core.Warnings.Level; import sbahjsic.runtime.Operator.BiOperator; import sbahjsic.runtime.Operator.UnOperator; import sbahjsic.runtime.Operator.Varar...
Java
src/sbahjsic/runtime/Type.java
expositionrabbit/Sbahjsic-runtime
mit
7,839
273
codeparrot/github-code
ae8b1d5dc6cbfe9b554a621ad03e67d40a96b2a3e1b301387020267a7bcf92fe
import React from 'react'; import {connect} from 'cerebral-view-react'; import styles from './styles.css'; import { isObject, isArray, isString, isBoolean, isNumber, isNull } from 'common/utils'; import JSONInput from './JSONInput'; import connector from 'connector'; function isInPath(source, target) { i...
JavaScript
versions/v1/components/Debugger/Inspector/index.js
cerebral/cerebral-debugger-prototype
mit
10,887
341
codeparrot/github-code
49abe067e7624dd4e0161228faac3e441056b704f336d540aed43c982681a43b
'use strict'; function valuefy(value) { if (typeof value !== 'object') { return (typeof value === 'string') ? `"${value}"` : value; } let values = []; if (Array.isArray(value)) { for (const v of value) { values.push(valuefy(v)); } values = `[${values.join(',')}]`; } else { for (let v in value) { ...
JavaScript
index.js
ragingwind/field-value
mit
1,725
93
codeparrot/github-code
8a3e278133d585ec3a8614799ee1b0826488dc539483c7c1e4e6e27411d13776
<?php namespace App\Notifications\Mship; use App\Notifications\Notification; use Illuminate\Bus\Queueable; use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Notifications\Messages\MailMessage; class ForgottenPasswordLink extends Notification implements ShouldQueue { use Queueable; private $token; ...
PHP
app/Notifications/Mship/ForgottenPasswordLink.php
atoff/core
mit
1,567
66
codeparrot/github-code
b67b2b8b641d14af9cbb9c0768b1e0cf47c31ea570c85a5f8f6aa35f1122ac63
#ifndef RUBY_EXT_UTILS_HPP_ #define RUBY_EXT_UTILS_HPP_ 1 #include <functional> #include <ruby.h> #include <stdlib.h> #include <string.h> #include <stdarg.h> #include <typeinfo> #ifdef __GNUC__ #include <cxxabi.h> #endif template <typename T> static const char * type_name() { #ifdef __GNUC__ const int buf_size = ...
C++
ext/gdiplus/ruby_ext_utils.hpp
yagisumi/ruby-gdiplus
mit
8,156
296
codeparrot/github-code
9b5e14329b2a4816604ea2f9c157714b901b99ff6b86061f14dfe95aaf72cebe
package septemberpack.september; import android.graphics.Bitmap; import android.graphics.Canvas; import android.graphics.Rect; import java.util.Random; /** * Created by Vlady on 22.10.2015. */ /** * Данный класс реализует отрисовку астероидов */ public class Asteroid { Bitmap bitmap; /** * Коорди...
Java
app/src/main/java/septemberpack/september/Asteroid.java
vladb55/SeptemberRepository
mit
2,839
107
codeparrot/github-code
bf61e730109c9027905b030a800f4e34ee6f760763d4efe46b0731cca9e57048
import React from 'react'; import { ActivityIndicator, StyleSheet, Image, Text, View, ListView, TouchableOpacity } from 'react-native'; import Dimensions from 'Dimensions'; const {width, height} = Dimensions.get('window'); import globalVariables from '../globalVariables.js'; import LookCell from './LookC...
JavaScript
src/components/LookDetail.js
rollo-zhou/look
mit
5,317
216
codeparrot/github-code
3456d837b5128f30f1bbb8912989b50315a065e76c985110305029aa98838c49
/* * The contents of this file are subject to the Mozilla Public * License Version 1.1 (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.mozilla.org/MPL/ * * Software distributed under the License is distributed on an * "...
Java
Kombit.Samples.CH.WebsiteDemo/src/java/dk/itst/oiosaml/sp/service/SPFilter.java
Safewhere/kombit-web-java
mit
12,213
310
codeparrot/github-code
3ac6a6bd8c85a61c771a3ab937a40d0579317b0912415e39ee95c7cc2792848c
{% extends 'swp/base.html' %} {% load static %} {% block content %} <div class="container-fluid"> <div class="page-header"> <h1>{{ event.title }}</h1> </div> {% if user.is_authenticated %} <form action="{% url 'new_event' event.slug.hex %}" method="POST" enctype="multipart/form-data" class="form-...
HTML
swp/templates/swp/event.html
merry-bits/SWP
mit
4,577
147
codeparrot/github-code