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 |
|---|---|---|---|---|---|---|---|---|
68938f8e3946ca18485a760851b47fe12ae83103424fca97486c06cb86a56368 | // GraphicView.cpp : implementation file
//
#include "stdafx.h"
#include "T3000.h"
#include "MainFrm.h"
#include "GraphicView.h"
#include "LabelEditDlg.h"
#include "ApplyGraphicLabelsDlg.h"
#include "AfxMessageDialog.h"
// CGraphicView
#define XStart 10
#define YStart 70
BOOL g_bRefresh=FALSE;
IMPLEMENT_DYNCREATE(CG... | C++ | T3000/GraphicView.cpp | temcocontrols/T3000_Building_Automation_System | mit | 19,706 | 825 | codeparrot/github-code |
e574ed01db87dc1f67291d402467dbbb6061fd03f91738e7aee11458af712571 | <?php
namespace getuisdk;
/**
* Class PBEnum
* @package getuisdk
*/
class PBEnum extends PBScalar
{
/**
* @param null $reader
*/
public function __construct($reader = null)
{
parent::__construct($reader);
$this->wired_type = PBMessage::WIRED_VARINT;
}
... | PHP | src/PBEnum.php | getuisdk/getui-php-sdk | mit | 923 | 49 | codeparrot/github-code |
b9f5566ca7bf1005ed89959dfc7b681ba6a484967d7a76f832db0cfa1c05038c | package com.prokarma.pkmst.model;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.prokarma.pkmst.model.Link;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
* Response class to b... | Java | clients/java-pkmst/generated/src/main/java/com/prokarma/pkmst/model/GithubScmlinks.java | cliffano/swaggy-jenkins | mit | 2,403 | 104 | codeparrot/github-code |
d3b10a3869492160594af99d7302a3191d85958f991a5e1418d83f3acc304aaf | #!/usr/bin/python
tab = ' '
class Tag():
def __init__(self, name, HTML):
self.name = name
self.HTML = HTML
def __enter__(self):
self.HTML.content += tab * self.HTML.indent + '<' + self.name + '>\n'
self.HTML.indent += 1
def __exit__(self, exc_type, exc_value, traceback):... | Python | Session info to table/modules/html.py | fantopop/post-production-scripts | mit | 1,144 | 51 | codeparrot/github-code |
f45480de28ef4b7e2f2b5325333b6c50e2c564ca65936872df7142f2b46b91bc | _gaq.push(['_trackPageview']);
// If awaiting activation
var waiting = true;
// If trusted exit, for exit confirmation
var trustedExit = false;
// Used to fade out subtitles after calculated duration
var subtitleVanishTimer = false;
var subtitleVanishBaseMillis;
var subtitleVanishExtraMillisPerChar;
// Holder objec... | JavaScript | src/pages/game/dmm.js | KC-TH/KC3Kai | mit | 11,922 | 427 | codeparrot/github-code |
ece663c3831801da7591475b28015c538d5b12b26808710c99df0c42266c4920 | <?php
declare(strict_types=1);
namespace GrumPHP\Locator;
use GrumPHP\Exception\RuntimeException;
use GrumPHP\Util\Paths;
use Symfony\Component\Process\ExecutableFinder;
class ExternalCommand
{
private $suffixes = ['', '.phar'];
/**
* @var string
*/
protected $binDir;
/**
* @var Exe... | PHP | src/Locator/ExternalCommand.php | janvernieuwe/grumphp | mit | 1,279 | 56 | codeparrot/github-code |
d885ae49ac80091291170274f7682dc5c8bb9a2bb86a3f286f1c0e413091a50e | package generators
import utils.WithApplication
import test_data.XMLData
import scala.xml.XML
/**
* Use output of C3 functional tests to test the PDF Generator.
*
*/
class PdfFunctionalCasesSpec extends PdfSpecification {
val version = XMLData.LATEST_VERSION // change this to the next version when you remove 0... | Scala | test/generators/PdfFunctionalCasesSpec.scala | Department-for-Work-and-Pensions/RenderingService | mit | 1,112 | 34 | codeparrot/github-code |
98b93c7475daf65155e892dfb7a8e3ca1cba3393aa9e4317603e34f0b49970c4 | //
// MarchingCubesRenderer.h
// Renderer
//
// Created by Kristofer Schlachter on 6/19/14.
//
//
#ifndef __Renderer__MarchingCubesRenderer__
#define __Renderer__MarchingCubesRenderer__
#include <iostream>
#include "vmath.hpp"
#include "InputManager.h"
#include "IRenderable.h"
#include "Texture.h"
#include "Render... | C | source/renderlib/MarchingCubesRenderer.h | kristofe/SimpleRenderer | mit | 2,752 | 142 | codeparrot/github-code |
abb7d89791891290455ca2098e8de50621fc1f6505742c5c4a3789b9873fb4b7 | using System;
using System.Data;
using Codentia.Common.Data;
using Codentia.Common.Helper;
namespace Codentia.Common.Reporting.DL
{
/// <summary>
/// This class exposes methods to read data for creating reports
/// </summary>
public static class ReportingData
{
private static string _dataSo... | C# | src/app/DL/ReportingData.cs | Codentia/Codentia.Common.Reporting | mit | 8,718 | 226 | codeparrot/github-code |
3c42a3cc0a5b7f8d127f118ae8a64025cf93b5d582c74b5febcdc5706905c426 | // Copyright (c) 2011-2015 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "paymentserver.h"
#include "bitcoinunits.h"
#include "guiutil.h"
#include "optionsmodel.h"
#include "base58.h"
#in... | C++ | src/qt/paymentserver.cpp | emc2foundation/einsteinium | mit | 28,094 | 815 | codeparrot/github-code |
c1fd9e2464a10a7017360b27cef140f873b406297e01caef7a26b589e829178e | /* @flow */
;(function (root) {
"use strict";
let color_names = {
"black": "#000000",
"silver": "#c0c0c0",
"gray": "#808080",
"white": "#ffffff",
"maroon": "#800000",
"red": "#ff0000",
"purple": "#800080",
"fuchsia": "#ff00ff",
"green": "#... | JavaScript | src/color.js | ifcanduela/js-color | mit | 30,117 | 1,031 | codeparrot/github-code |
c3d0f9a4099da1b828022f68c1bdc01a2fef0c9f8c8f6370f9fceda549e3bf9b | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>aac-tactics: Not compatible 👼</title>
<link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" />
<link href="../../../../../bootstrap.min... | HTML | clean/Linux-x86_64-4.10.2-2.0.6/released/8.13.0/aac-tactics/8.10.0.html | coq-bench/coq-bench.github.io | mit | 7,646 | 182 | codeparrot/github-code |
6dac46c6cb36e3dda281f3b0b0e589d6c531c5b5f8f405c9ec67514acccc3c76 | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>lc: Not compatible</title>
<link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" />
<link href="../../../../../bootstrap.min.css" rel="s... | HTML | clean/Linux-x86_64-4.11.1-2.0.7/released/8.11.1/lc/8.9.0.html | coq-bench/coq-bench.github.io | mit | 7,192 | 180 | codeparrot/github-code |
03a3fe6622655684a0fe5d4b9fd84331fd3c40f66392e0f9e6288890c3457292 | package com.mkl.eu.client.service.service.board;
/**
* Request for removeCounter service.
*
* @author MKL.
*/
public class RemoveCounterRequest {
/** Id of the counter to remove. */
private Long idCounter;
/**
* Constructor for jaxb.
*/
public RemoveCounterRequest() {
}
/**
... | Java | client/eu-client-service/src/main/java/com/mkl/eu/client/service/service/board/RemoveCounterRequest.java | FogiaFr/eu | mit | 731 | 37 | codeparrot/github-code |
1756e58666afd2e89b72d6281b34270e60220516c5756ea34ee32c9fd342f5a5 | """231. Power of Two
https://leetcode.com/problems/power-of-two/
Given an integer n, return true if it is a power of two. Otherwise, return
false.
An integer n is a power of two, if there exists an integer x such that n ==
2^x.
Example 1:
Input: n = 1
Output: true
Explanation: 2^0 = 1
Example 2:
Input: n = 16
Out... | Python | python-algorithm/leetcode/problem_231.py | isudox/leetcode-solution | mit | 1,321 | 73 | codeparrot/github-code |
8a7c143b2eda15c8d0e0f58733be1009aca85fe48c77e720a30ffd06de9c4510 | package dexcom
import (
"math"
)
// Marshaling and unmarshaling of ints and floats in little-endian order.
func marshalUint16(n uint16) []byte {
return []byte{byte(n & 0xFF), byte(n >> 8)}
}
// nolint
func marshalInt16(n int16) []byte {
return marshalUint16(uint16(n))
}
func marshalUint32(n uint32) []byte {
re... | GO | marshal.go | ecc1/dexcom | mit | 1,050 | 50 | codeparrot/github-code |
872adbd4b7978220370bfd34efac4a8f7fc368b07de5aabfd06567f67ac02434 | ########################################################################
# MCU Gear(R) system Sample Code
# Auther:y.kou.
# web site: http://www.milletool.com/
# Date : 8/OCT/2016
#
########################################################################
#Revision Information
#
#########################################... | Python | milpython/MoistureTest.py | yoshinarikou/MilleFeuilleRaspberryPi | mit | 835 | 36 | codeparrot/github-code |
ba80a35f85b7b789972ebc0ec871e18b2e85f18fac974aab8d35233812b68375 | {{<govuk_template}}
{{$head}}
{{>includes/elements_head}}
<script type="text/javascript" src="/public/javascripts/jquery-1.11.0.min.js"></script>
<script type="text/javascript" src="/public/javascripts/application.js"></script>
<script type="text/javascript" src="/public/javascripts/selection-buttons.js"></script>
... | HTML | app/views/examples/elements/evl-11-yesno.html | dudelmeister/full-prototype-kit | mit | 2,840 | 99 | codeparrot/github-code |
2553c291654692efa93bffb4794c6528fd319da8a6aeae0da01b3e93e8a6e854 | angular.module("flowApi", ['ui.router', 'ui.bootstrap.collapse', 'ui.bootstrap.pagination', 'uib/template/pagination/pagination.html']);
angular.module('flowApi').config(['$stateProvider', function($stateProvider){
$stateProvider
.state('releases',{
url: '/releases',
abstract: true,
template: "<section... | JavaScript | assets/javascripts/app.js | zephyr-dev/flow-api | mit | 2,792 | 100 | codeparrot/github-code |
0dac106415da854b2c17d8cedf4c1bde1b8dac6b09852608cd0577116f04a598 | package com.kza.common.appconf;
import org.springframework.cache.CacheManager;
import org.springframework.cache.annotation.CachingConfigurer;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.cache.concurrent.ConcurrentMapCache;
import org.springframework.cache.interceptor.CacheErro... | Java | rcommon/src/main/java/com/kza/common/appconf/CacheConfig.java | Qhongk/rsite | mit | 1,377 | 48 | codeparrot/github-code |
4441695c4fb4a814e7d58bb845c8675a3906bf72637c4c7040ac5323270bd3f2 | package com.jsteinaker.cacartografia;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v7.app.AppCompatActivity;
import android.text.TextUtils;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuInflater;
import android... | Java | src/main/java/com/jsteinaker/cacartografia/BaseEditMarkerFragment.java | jsteinaker/cacartografia | mit | 3,608 | 120 | codeparrot/github-code |
67b0522367fe9ec1d262c729b733cc88b67ecc39dac80e1d2bb71209ba051821 | <?php
namespace Administrateur\AdminBundle\Controller;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Sensio\Bundle\FrameworkExtraBundle... | PHP | src/Administrateur/AdminBundle/Controller/CommentaireController.php | Oukhay/smjetsetmag | mit | 6,955 | 248 | codeparrot/github-code |
658be89b9bbe902bbfd41214464bc9158abff3dde58efd54e7d935183b28ac79 | #ifndef __SPECIALFXCONTROLLER_ORBITINGPARTICLE_H__
#define __SPECIALFXCONTROLLER_ORBITINGPARTICLE_H__
#include "specialfxcontroller.h"
namespace Evidyon {
struct OrbitingParticleData;
struct CompiledVisualFXParams_OrbitingParticles;
class SpecialFXBinding;
class SpecialFXController_OrbitingParticle : public Speci... | C | Evidyon/apps/client/specialfxcontroller_orbitingparticle.h | karlgluck/evidyon-2.10 | mit | 1,146 | 48 | codeparrot/github-code |
e793257ed8db623bce53359ed540b7ae2174ff88b374c2fee5f7cd371722a0fd | #ifndef RENDER_MANAGER_H
#define RENDER_MANAGER_H
#include "GLEW/glew.h"
#include <SFML/Graphics.hpp>
#include <SFML/OpenGL.hpp>
#include "Config.h"
#include "Simulation.h"
#include "frmr/Shader.h"
#include "frmr/Vec3f.h"
class RenderManager
{
private:
//frmr::Vec3f ambientLightColor;
... | C | source/RenderManager.h | frmr/wizmatch | mit | 2,113 | 75 | codeparrot/github-code |
5e5eaa666b8eb81a6492daf3b1f6c14fc35afa2747ad7d3f2cf05f6fb1fe70fc | // Copyright (c) 2011-2014 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#ifndef DIAMONDGUI_H
#define DIAMONDGUI_H
#if defined(HAVE_CONFIG_H)
#include "config/diamond-config.h"
#endif
#include "amo... | C | src/qt/diamondgui.h | TGDiamond/Diamond | mit | 7,761 | 240 | codeparrot/github-code |
7083a9441da632d5fd1be80e432804559288c773279f967344374060d0fee4a0 | using System;
using System.IO;
using Baseline;
using Marten.Schema;
using Marten.Services;
using Marten.Storage;
using Xunit;
namespace Marten.Testing.Bugs
{
public class Bug_145_table_getting_erroneously_regenerated_Tests : DocumentSessionFixture<NulloIdentityMap>
{
public Bug_145_table_getting_erron... | C# | src/Marten.Testing/Bugs/Bug_145_table_getting_erroneously_regenerated_Tests.cs | jokokko/marten | mit | 2,114 | 81 | codeparrot/github-code |
6e79d0e240fec480e97e1eb044f7d6196c85d9d2edb97cdf0de80e6549dd2ef6 | using System;
using System.IO;
using System.Reactive.Linq;
using System.Reactive.Subjects;
using Serilog;
using Serilog.Context;
using Serilog.Events;
using Serilog.Formatting.Display;
using Xunit.Abstractions;
namespace LinqSubexpressions {
// http://dhickey.ie/2015/06/capturing-log-output-in-tests-with-xunit2/
... | C# | LinqSubexpressions/LoggingHelpers.cs | heynickc/linq_subexpressions | mit | 2,382 | 62 | codeparrot/github-code |
2e50715e090b5fd6f252047508da48631313e829c16a6ad1885e759ddcdd8aa0 | #include <exodus/library.h>
libraryinit()
function main(io listitems) {
//c sys io
//convert vm list of numbers to list of numbers and ranges
//eg 1,2,3,6,8,9,10 -> 1-3,6,8-10 where commas represent vms
//can handle fixed decimal places
//eg 2020.09,2020.10 -> 2020.09-2020.10
call sortarray(listitems, 1, "AR"... | C++ | service/src/sys/list2ranges.cpp | exodusdb/exodusdb | mit | 1,224 | 52 | codeparrot/github-code |
11124439232ea666d5f9e6fd0b9ee83be09a5451b01db627cb44bf68cb3f9ef7 | const { getToken } = require('../utils');
const models = require('../models');
/**
* Since this service provides public API,
* we allow user who is also not authenticated.
* For the admin routes, we add this policy/middleware
*/
module.exports = async (ctx, next) => {
const token = getToken(ctx);
if (!token)... | JavaScript | app/middleware/isAuthenticated.js | avdkishore/auth-service | mit | 888 | 43 | codeparrot/github-code |
32c5c1f10cdd8a3fddeb667c17a4421b624063f035165eb807699561a114e426 | from dolfin import assemble, MixedFunctionSpace, tic,toc
import petsc4py
import sys
petsc4py.init(sys.argv)
from petsc4py import PETSc
import CheckPetsc4py as CP
import StokesPrecond
import NSprecond
import MaxwellPrecond as MP
import PETScIO as IO
import numpy as np
import P as PrecondMulti
import MHDprecond
import ... | Python | MHD/FEniCS/MHD/Stabilised/Precond/test/Solver.py | wathen/PhD | mit | 4,626 | 146 | codeparrot/github-code |
e0bde76816ef67e8794c0a0c9f7207bcdd2f90a0d40c0860a3dca26cdf1a9207 | /*
* Problem 9: Create a class Student with properties FirstName, LastName, FN, Tel, Email, Marks (a List), GroupNumber.
Create a List<Student> with sample students. Select only the students that are from group number 2.
Use LINQ query. Order the students by FirstName.
* Problem 10: Implement the previous us... | C# | CSharpOOP/03. ExtensionDelegateLambdaLINQ/09.StudentGroups/MainProgram.cs | HMNikolova/Telerik_Academy | mit | 6,469 | 174 | codeparrot/github-code |
30f74958a84880331977e286602456334a05ce06a077d206d39176343f0739cc | <?php
declare(strict_types = 1);
/*
* This file is part of Zenify
* Copyright (c) 2012 Tomas Votruba (http://tomasvotruba.cz)
*/
namespace ZenifyCodingStandard\Sniffs\Commenting;
use PHP_CodeSniffer_File;
use PHP_CodeSniffer_Sniff;
/**
* Rules:
* - Block comment should be used instead of one liner.
*/
final... | PHP | src/ZenifyCodingStandard/Sniffs/Commenting/BlockPropertyCommentSniff.php | Zenify/CodingStandard | mit | 3,256 | 134 | codeparrot/github-code |
84b432c28e7caf825c0be9c70929ac8d60f19017a6a64afe7e622a056bb45200 | // [AsmJit]
// Complete x86/x64 JIT and Remote Assembler for C++.
//
// [License]
// Zlib - See LICENSE.md file in the package.
// [Export]
#define ASMJIT_EXPORTS
// [Dependencies - AsmJit]
#include "../base/cputicks.h"
// [Dependencies - Posix]
#if defined(ASMJIT_OS_POSIX)
# include <time.h>
# includ... | C++ | src/asmjit/asmjit/src/asmjit/base/cputicks.cpp | lvous/hadesmem | mit | 3,750 | 132 | codeparrot/github-code |
12bbc510e224fb3827f44f011eb59b0ee375feb3a10fcaed4776d5733c04b9b5 | 'use strict';
const ServerGame = require('./ServerGame');
const Room = require('./Room');
const debug = require('debug');
const log = debug('game:server/server');
function Lobby ({ config }) {
const rooms = new Map();
const clients = new Map();
function startGame (room) {
room.startGame();
}... | JavaScript | server/Lobby.js | arjanfrans/realtime-multiplayer-in-html5 | mit | 4,069 | 157 | codeparrot/github-code |
ae4ee70163aa9da08f245787df323d63f5de7437dbf68983ec3e43753377e1a4 | using UnityEngine;
using System.Collections;
/// <summary>
/// NGUIでRenderer,ParticleSystemを扱うコンポーネント
/// </summary>
public class UIUnityRenderer : UIWidget
{
// 指定されているMaterialの値を直接変更します(NGUIのレイアウトにより変更点が都度発生するので注意)
public bool allowSharedMaterial = false;
[HideInInspector][SerializeField] Renderer mRenderer;
... | C# | UIUnityRenderer.cs | tarob19/UIUnityRenderer | mit | 3,896 | 166 | codeparrot/github-code |
9d84dc8226f90302ce19901af8faab87c2e17a12bb4437261e437e3152862ea6 | import sys
import os
from os import walk, chdir
import fnmatch
from invoke import run, task, Collection
from colorama import init, Fore
import yaml
import numpy
PEP8_IGNORE = 'E402,E266,F841'
init()
# These things don't pass syntax/lint checks and are external deps.
EXCLUDE_DIRS = ['nextdoor/lib/python/kingpin',
... | Python | tasks.py | Nextdoor/rightscale_rightlink10_rightscripts | mit | 6,904 | 225 | codeparrot/github-code |
aa26c76c95cdc6a2b0c2f1cdcb685387078db6159ce35140f510444bcc68f367 | //= require jquery_ujs
var Responses = (function($){
var bindClicks = function(module) {
$('.btn-show').on('click', function(){
var id = $(this).data('id'),
content = $(this).data('content');
module.showResponse(id, content);
return false;
});
}
function Module(baseUrl) {
... | JavaScript | app/assets/javascripts/async_response/application.js | Driftrock/async_response | mit | 825 | 36 | codeparrot/github-code |
efece9bcac9d4089f29f15859aaf7fb8768c15ce11bf96fb228be6e571ecca82 | # -*- coding: utf-8 -*-
# This file is part of beets.
# Copyright 2016, Adrian Sampson.
#
# 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 t... | Python | beets/dbcore/query.py | Kraymer/beets | mit | 27,242 | 869 | codeparrot/github-code |
811d03e5d2820ba47ab61f4f76942d00d37d96b25d46eabf43317a5ed0343598 |
const isPlainObject = require('lodash.isplainobject');
const { inherits } = require('./util');
const Collection = require('./collection');
function List(...args) {
if (!(this instanceof List)) {
throw new Error('Cannot call List() without new');
}
Collection.apply(this, args);
const [initialData] = args;... | JavaScript | packages/immutable-state/src/list.js | tianjianchn/stas | mit | 2,228 | 83 | codeparrot/github-code |
e7cd5b2de10166a5e252720494dc48c8aa45e8767167c3f962c933e916f76f0b | // 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 "txdb.h"
#include "walletdb.h"
#include "bitcoinrpc.h"
#include "net.h"
#... | C++ | src/init.cpp | eatsweetmoney/candycoin-official | mit | 43,689 | 1,117 | codeparrot/github-code |
447672bdb2df5b5949881426e1ab0868d8664f16248b7e27245bc9258bf07ec8 | using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Reflection;
using System.Text;
using System.CodeDom;
namespace Moonlit.PatternDesign {
/// <summary>
///
/// </summary>
public class MemberMethodInfoFactory : IMemberInfoFactory {
... | C# | src/moonlit/PatternDesign/Decorator/MemberMethodInfoFactory.cs | moonwa/moonlit | mit | 3,219 | 75 | codeparrot/github-code |
0f9833ed36f2ffcac147aed4bd1b9233a641afe87debf95100a689d0215985c9 | #!/usr/bin/env python3
import sys
import os
import time
import atexit
from signal import SIGTERM
import logging
import logging.handlers
# load the config
from foostat import config
logger = logging.getLogger()
logger.setLevel(logging.DEBUG)
filehandler = logging.handlers.TimedRotatingFileHandler(config["files"]["lo... | Python | Daemon.py | dhardtke/foostat | mit | 5,006 | 180 | codeparrot/github-code |
cdba0cb85589a6aaeff8444b1381b47feb914d169f48e87c93a1943037856a08 | package cap11_egi;
import java.util.Arrays;
public class MergeSorter {
// ordina l'array a
static void mergeSort(int[] a) {
mergeSort(a, 0, a.length - 1);
}
// ordina 'array a nella porzione da min a max (compresi)
private static void mergeSort(int[] a, int min, int max) {
// BASE della ricorsione
if (min ... | Java | cap11_egi/21/cap11_egi/MergeSorter.java | garganti/info2_oop_unibg | mit | 1,332 | 54 | codeparrot/github-code |
6f397ede7a2af0b5498a9d6af992d61056fc6e54e7a04ae627c31d02ffcf1178 | """
SDoc
Copyright 2016 Set Based IT Consultancy
Licence MIT
"""
# ----------------------------------------------------------------------------------------------------------------------
import re
from sdoc import sdoc2
from sdoc.antlr.sdoc2ParserVisitor import sdoc2ParserVisitor
from sdoc.sdoc.SDocVisitor import SDo... | Python | sdoc/sdoc2/SDoc2Visitor.py | OlegKlimenko/py-sdoc | mit | 7,232 | 215 | codeparrot/github-code |
e607d59af2dc92416b04b2082a2ad2a710c4d8f9aba2457b81063427df9f631c | using System;
using System.Collections.Generic;
using System.Windows.Data;
using System.Windows.Markup;
namespace Radical.Windows.Converters
{
public abstract class AbstractSingletonConverter : MarkupExtension, IValueConverter
{
static readonly Dictionary<Type, WeakReference> singletons = new Dictiona... | C# | src/Radical.Windows/Converters/AbstractSingletonConverter.cs | RadicalFx/Radical.Windows | mit | 2,656 | 63 | codeparrot/github-code |
65f742b3b3489ea2986d8c72e5182cf18ea7e02b33d7ffbfd5774015a94bc932 | import React from 'react';
import { Link } from 'react-router';
import {
createFragmentContainer,
graphql,
} from 'react-relay/compat';
import NoteViewer from '../Note/NoteViewer';
class LessonListComponent extends React.Component {
render() {
const baseUrl = this.props.baseUrl;
return (
<... | JavaScript | src/components/Course/LessonListComponent.js | bibleexchange/be-front-new | mit | 1,234 | 47 | codeparrot/github-code |
94b9a7b2b304e8f3befe4b9e192203d34c9a3e558abe68d3437ab4c6e28f211c | <?php
namespace Fnx\FinanceiroBundle\Form\Type;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilder;
use Symfony\Component\Validator\Constraints\NotBlank;
use Fnx\AdminBundle\Validator\Constraints\Dinheiro;
use Symfony\Component\Validator\Constraints\Collection;
class RegistroType extends... | PHP | src/Fnx/FinanceiroBundle/Form/Type/RegistroType.php | bondcs/tcc-fenix | mit | 1,710 | 55 | codeparrot/github-code |
544ef510852ad20d06f0b5935404e5dcee3e175c81c393ffc9a24df50e299471 | #ifndef TOPPRA_SOLVER_QPOASES_WRAPPER_HPP
#define TOPPRA_SOLVER_QPOASES_WRAPPER_HPP
#include <memory.h>
#include <toppra/solver.hpp>
namespace toppra {
namespace solver {
/** Wrapper around qpOASES::SQProblem
*
* Internally, the problem is formulated as
* \f{eqnarray}
* min & 0.5 y^T H y + g^T y \\
* s.t ... | C++ | cpp/src/toppra/solver/qpOASES-wrapper.hpp | hungpham2511/toppra | mit | 1,524 | 67 | codeparrot/github-code |
8ddcb2aa7aaf091b5f38802e136b59199fcd8ff9463c6df344cd915cb6112041 | <?php
/*
* @author M2E Pro Developers Team
* @copyright M2E LTD
* @license Commercial use is forbidden
*/
class Ess_M2ePro_Model_Upgrade_Migration_ToVersion651_General extends Ess_M2ePro_Model_Upgrade_Migration_Abstract
{
//########################################
public function run()
{
... | PHP | src/app/code/community/Ess/M2ePro/Model/Upgrade/Migration/ToVersion651/General.php | portchris/NaturalRemedyCompany | mit | 11,985 | 325 | codeparrot/github-code |
1d6f7ec87669d11012898a25bf19dd77311027add48caf8a33669b74d60856a7 | 'use strict';
// Utilities:
var _ = require('lodash');
var Promise = require('bluebird');
// Module:
var Core = require('../Core');
// Dependencies:
var camelcase = require('change-case').camel;
var pascalcase = require('change-case').pascal;
require('../Components/Notifier/NotifierService');
require('../Services/Va... | JavaScript | packages/ui/src/app/Core/Validators/VariableNameValidator.js | TradeMe/tractor | mit | 1,945 | 69 | codeparrot/github-code |
b0b72772894d7f0ff5eba8aa466b6f4a4f4b82462f668d003b09f239442a85b8 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>.Net 常用开发工具</title>
<meta name="author" content="Lisong Wang">
<!-- Le HTML5 shim, for IE6-8 support of HTML elements -->
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
... | HTML | _site/linux/2009/03/16/.Net 常用开发工具/index.html | Apiaceae/jekyllblog | mit | 8,971 | 282 | codeparrot/github-code |
114d30dbb3320fcd91bc0bff7c2f8b8858c564b13f3b961455da57bf81c25457 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN">
<html xmlns:mx="urn:mx-scripts">
<head>
<META http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="Content-Type" content="text/HTML; charset=utf-8">
<title>mx.datacontrols.DataForm 类</title>
<link rel="styleshe... | HTML | html/mx/datacontrols/DataForm.html | MagicCube/mxframework-2-0-doc | mit | 77,671 | 1,778 | codeparrot/github-code |
e1b8809a1d936ff2f28ddd14552930f0fe20ea2731f8e8731a32c697a9a58c01 | //
// CDStatusBar.h
// Pods
//
// Created by aaaa on 16/8/11.
//
//
#import "CDStatusBarConfig.h"
#import "CDStatusBarWindow.h"
#import "CDStatusBarViewController.h"
@protocol CDStatusBarDelegate <NSObject>
/**
点击代理
@param index 所以
@param prompt 文案
*/
- (void)statusBarSelectAtIndex:(NSInteger)index prompt:(N... | C | KWTest/KW/CDStatusBar/MainView/CDStatusBar.h | 315355504/KWTest | mit | 691 | 46 | codeparrot/github-code |
29a32af5c4ba4a50855bc2cd3b836abe49928b0d872d102dec75591029b5b566 | /*
* Find how many continued fraction representations of sqrt (x) for 1 <= x <= N have an odd period
*/
#include <stdio.h>
#include <stdlib.h>
#include "linked_list.h"
#include "continued_fraction.h"
int main (int argc, char ** argv) {
if (argc != 2) {
fprintf (stderr, "usage: %s <N>\n", argv[0]);
return 1;
}... | C | c/src/pe_064_irrational_fractions.c | GwenIves/ProjectEuler | mit | 1,185 | 63 | codeparrot/github-code |
34b04ebaea6b56f87e9546655e7dfaa740c75c6b9d96489299dfea746691064a | 'use strict'
const Transform = require('stream').Transform
const StringDecoder = require('string_decoder').StringDecoder
class WordFilter extends Transform {
constructor(isWordChar, isWordEnd) {
super({ readableObjectMode: true })
if (typeof isWordEnd !== 'function') {
isWordEnd = () => false
}
... | JavaScript | index.js | zoubin/word-filter | mit | 1,265 | 67 | codeparrot/github-code |
3b66a82e772cfffcaaccd3c95d3ab4bf900699b043a8c5aa1f98b5f2af339299 |
#!/usr/bin/python3
# -*- coding: utf-8 -*-
"""
ZetCode PyQt5 tutorial
This program creates a toolbar.
The toolbar has one action, which
terminates the application, if triggered.
author: Jan Bodnar
website: zetcode.com
last edited: January 2015
"""
import sys
from PyQt5.QtWidgets import QMainWindow, QAction, qApp... | Python | raspberrypi/isprobavanje/pyqt5/Toolbar.py | mskovacic/Projekti | mit | 1,043 | 49 | codeparrot/github-code |
9ea28928340b64c9b8092873f8f2653ed13e26e082a729394f828c5ea30c6d1f | 'use strict';
var azure = require('azure-storage');
var pg = require('pg');
var request = require('request');
var parseString = require('xml2js').parseString;
var conString = 'postgres://' + process.env.POSTGRES + '/postgres';
var retryOperations = new azure.ExponentialRetryPolicyFilter();
var blobSvc = azure.createBlo... | JavaScript | packages/articles/server/controllers/articles.js | FrogCircle/TreeBook | mit | 16,369 | 418 | codeparrot/github-code |
7fc8b6d1c5b7a31ebfff281d682da51b004c60ec2a4412855b3d05f0d665a3e3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
... | C# | PSP.Run.2010/PSP.Run/Tools/UIHelper.cs | taurenshaman/psp | mit | 3,088 | 110 | codeparrot/github-code |
3ac382d9f3e30b0102a925adbd3f6151f41b49d2908905a65e4501e0f0fb6a6a | package org.openforis.collect.android.gui.input;
import android.content.Intent;
import android.graphics.Bitmap;
import android.media.ThumbnailUtils;
import android.net.Uri;
import android.os.StrictMode;
import android.provider.MediaStore;
import androidx.fragment.app.FragmentActivity;
import org.openforis.collect.R;... | Java | android/src/main/java/org/openforis/collect/android/gui/input/VideoFileAttributeComponent.java | openforis/collect-mobile | mit | 2,971 | 79 | codeparrot/github-code |
58ac44a34861b0d4029358034a2ec5677d085e69550b49c668b1cbaba7522b27 | <?php
/**
* Class PHPWhiteSpace
*
* Converts to space
*/
/**
* // Stack
* @method push
* @method duplicate
* @method copy
* @method swap
* @method discard
* @method slide
*
* // Arithmetic
* @method add
* @method subtract
* @method multiply
* @method divide
* @method modulo
*
* // Heap
* @method... | PHP | src/PHPWhiteSpace.php | mattparker/phpwhitespace | mit | 5,285 | 236 | codeparrot/github-code |
c4cee6b6704c9d52edcc72e37d49a7fe8889621d9fe1d9f8c69704eda9444599 | // Place all the behaviors and hooks related to the matching controller here.
// All this logic will automatically be available in application.js.
// Simple single page application framework
// Author: andrew @ terrainformatica.com
(function($,window){
window.pageHandlers = {};
var currentPage;
// show the ... | JavaScript | app/assets/javascripts/pages.js | ruvater/pomodoro | mit | 2,146 | 70 | codeparrot/github-code |
69f66fa5419f9dbe54c08536062a695f6f43170d1d9a2ae10322120bfb8a0746 | import { Prism } from 'global';
import React from 'react';
import PropTypes from 'prop-types';
export class Code extends React.Component {
componentDidMount() {
this.highlight();
}
componentDidUpdate() {
this.highlight();
}
highlight() {
if (typeof Prism !== 'undefined') {
Prism.highlight... | JavaScript | addons/info/src/components/markdown/code.js | jribeiro/storybook | mit | 1,874 | 90 | codeparrot/github-code |
e6f5164b1c202f107fe2ebb24c1ad2624e58c2ebed0ab7235a25a7cf30c7e239 | import java.util.ArrayList;
import java.util.List;
/**
Given a matrix of m x n elements (m rows, n columns), return all elements of the matrix in spiral order.
For example,
Given the following matrix:
[
[ 1, 2, 3 ],
[ 4, 5, 6 ],
[ 7, 8, 9 ]
]
You should return [1,2,3,6,9,8,7,4,5].
* @author www.imgaara.co... | Java | src/Spiral_Matrix.java | imgaara/leetcode | mit | 2,869 | 129 | codeparrot/github-code |
ab3cf50792b9981df7e0160ffd417a10aedad44869ca4258cd657db8a09a1e6a | import re
from tornado.escape import xhtml_escape, _unicode, _URL_RE
_MENTION_RE = re.compile(r'((?:^|\W)@\w+)')
_FLOOR_RE = re.compile(r'((?:^|\W)#\d+)')
_TOPIC_RE = re.compile(r'((?:^|\W)t[a-z0-9]{24})')
_EMAIL_RE = re.compile(r'([A-Za-z0-9-+.]+@[A-Za-z0-9-.]+)(\s|$)')
def make_content(text, extra_params='rel="nof... | Python | handlers/utils.py | JmPotato/College | mit | 2,237 | 68 | codeparrot/github-code |
9ca20bd407f7dbe798bd7ccb133b3230aa163a121972bfd4b748f471d1182e0d | package token
import (
"net/http"
"github.com/PuerkitoBio/goquery"
)
// GetToken returns token string from parsed html for test use
func GetToken(client *http.Client, urlString string) (string, error) {
req, _ := http.NewRequest("GET", urlString, nil)
res, err := client.Do(req)
defer func() {
if res.Body != n... | GO | pkg/token/testutil.go | hiromaily/go-gin-wrapper | mit | 803 | 39 | codeparrot/github-code |
429605b306859c1eceb996b78df091adb1e0556ad1ec97f5c6820c1547d9c957 | /**
* Printdata component to wrap all printdata specified stuff together. This component is divided to following logical components:
*
* Controllers
* Models
*
* All of these are wrapped to 'frontend.production.printdata' angular module.
*/
(function() {
'use strict';
// Define frontend.production.printda... | JavaScript | src/app/production/printdata/printdata.js | lohbrand/pias_frontend | mit | 3,400 | 112 | codeparrot/github-code |
7453e164eedf05b95392eaaaebb470e4cceee4fc676cc4a614c2fa121d470c3e | "use strict";
var config = require('./config.json'),
async = require('async'),
crypto = require('crypto'),
Db = require('mongodb').Db,
Server = require('mongodb').Server,
ObjectID = require('mongodb').ObjectID;
async.waterfall([
function openDb(callback) {
var db = new Db(
... | JavaScript | app.js | hgoebl/mongodb-openvz-crashtest | mit | 3,361 | 113 | codeparrot/github-code |
73f04583ac06879d64bb1bcc2afb4930afe22d61bae98d9f7d69dc95d1fcce23 | /*
* This file is part of TechReborn, licensed under the MIT License (MIT).
*
* Copyright (c) 2018 TechReborn
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, inc... | Java | src/main/java/techreborn/blocks/BlockQuantumTank.java | drcrazy/TechReborn | mit | 2,144 | 57 | codeparrot/github-code |
dce681b697588876aa28250e0d5b832c623f0f875705c6cdf1ecd0e5b2dd7565 | package eletrosupervisor.websocket;
import eletrosupervisor.serial.PortaListener;
public class PortaSimulator implements Runnable{
private PortaListener listener;
public PortaSimulator(PortaListener listener){
this.listener = listener;
}
private long contador = 0;
@Override
public void run() {
try {
... | Java | src/main/java/eletrosupervisor/websocket/PortaSimulator.java | Host32/Eletrosupervisor | mit | 853 | 41 | codeparrot/github-code |
b7005f4a485a1a809d5dfd9b1ea9ed2de953b69dc95aa500455b11a79c8d96e6 | using System;
using System.Globalization;
using System.Windows;
#if WinRT
using Windows.UI.Xaml;
using Windows.UI.Xaml.Data;
using Windows.UI.Xaml.Media;
using Windows.UI.Xaml.Media.Imaging;
using CultureInfo = System.String;
#else
using System.Windows.Data;
#endif
namespace LogoFX.Client.Mvvm.View.Infra.Converters
... | C# | LogoFX.Client.Mvvm.View.Infra/Converters/IsSetToVisibilityConverter.cs | LogoFX/LogoFX | mit | 803 | 33 | codeparrot/github-code |
ced9717127928f5c613b0de7ae3a9f7b9795e0f45b1ad347223d2322af7b33d6 | #include "scrapers/Scraper.h"
#include "scrapers/GamesDBScraper.h"
#include "scrapers/TheArchiveScraper.h"
#include "Log.h"
#include "Settings.h"
#include <FreeImage.h>
#include <boost/filesystem.hpp>
#include <boost/assign.hpp>
const std::map<std::string, generate_scraper_requests_func> scraper_request_funcs = bo... | C++ | es-app/src/scrapers/Scraper.cpp | Herdinger/EmulationStation | mit | 7,325 | 297 | codeparrot/github-code |
1fb972c0ccbef14a4a517acbfc3adfb5da857d3e7e0f8cc9c3e14cc68d0bc083 | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>mathcomp-multinomials: Not compatible 👼</title>
<link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" />
<link href="../../../../../boo... | HTML | clean/Linux-x86_64-4.12.1-2.0.8/released/8.14.1/mathcomp-multinomials/1.5.html | coq-bench/coq-bench.github.io | mit | 7,414 | 177 | codeparrot/github-code |
6abaefdf0b7a5280f649a4dcb91710efc9d3c48d372f0399265518cde4cdb9fa | //-----------------------------------------------------------------------------
// Copyright (c) 2017-2021 informedcitizenry <informedcitizenry@gmail.com>
//
// Licensed under the MIT license. See LICENSE for full license information.
//
//-----------------------------------------------------------------------------
... | C# | Core6502DotNet/src/Program.cs | informedcitizenry/6502.Net | mit | 2,461 | 69 | codeparrot/github-code |
12e22fe25ea6092d8f0c7333ce8b03e17a3751e71e3eaca88f94a811184b2ac7 | var loaderUtil = require('loader-utils');
var filewalker = require('filewalker');
var async = require('async');
var fs = require('fs');
var pathUtil = require('path');
module.exports = function(source, map) {
var self = this;
if(typeof self.options.staticSiteLoader === 'undefined') {
self.emitError('You must d... | JavaScript | index.js | jamesjnadeau/static-site-loader | mit | 3,180 | 93 | codeparrot/github-code |
8752d776e8703897831693716163eb9139db823eacef021e5cbe723a3d5b8dfd | package io.cucumber.core.gherkin.messages;
import io.cucumber.plugin.event.Location;
import io.cucumber.plugin.event.Node;
import java.util.Collection;
import java.util.List;
import java.util.Optional;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.stream.Collectors;
final class GherkinMessagesEx... | Java | gherkin-messages/src/main/java/io/cucumber/core/gherkin/messages/GherkinMessagesExamples.java | cucumber/cucumber-jvm | mit | 1,581 | 56 | codeparrot/github-code |
8c1631c0f374685180ee9fe6e7256ed2ac867415698526eb17401f28379394b2 | from django.db import models
from django.contrib.auth.models import User
from django.contrib import admin
import os
from PIL import Image
#http://javiergodinez.blogspot.fi/2008/03/square-thumbnail-with-python-image.html
def _thumbnail(img, size):
width, height = img.size
if width > height:
delta =... | Python | django_chat/chat/models.py | juslop/angular-chat | mit | 2,659 | 84 | codeparrot/github-code |
32dabbe7084b32c045a85cdb4b1908974fb3b08ef2c09b97522893a9a50e6ca3 | <!DOCTYPE html>
<!--[if lt IE 7 ]><html class="ie ie6" lang="en"> <![endif]-->
<!--[if IE 7 ]><html class="ie ie7" lang="en"> <![endif]-->
<!--[if IE 8 ]><html class="ie ie8" lang="en"> <![endif]-->
<!--[if (gte IE 9)|!(IE)]><!--><html lang="en"> <!--<![endif]-->
<head>
<!-- Your Basic Site Informations -->
... | HTML | documentation/index.html | ResponymousApp/ResponymousApp.github.io | mit | 25,015 | 473 | codeparrot/github-code |
33d8795b412501d8585aa7ecf0204a184aeed9381b89225f96f303b703f4d29e | <?php
/**
* Created by PhpStorm.
* User: rserale
* Date: 22/06/15
* Time: 15:09
*/
namespace Omea\GestionTelco\EvenementBundle\ActeManager\DTO;
use Omea\GestionTelco\EvenementBundle\ActeManager\ActeDefinitionInterface;
class ActeDefinition implements ActeDefinitionInterface
{
private $name;
private $... | PHP | src/Omea/GestionTelco/EvenementBundle/ActeManager/DTO/ActeDefinition.php | jethass/gestionEvenements | mit | 820 | 50 | codeparrot/github-code |
d0c97acbf0e0748c2fb52b90a42bdd8351015cea2e84650ae6ffc9471b47ba5f | // http://hyperphysics.phy-astr.gsu.edu/hbase/electronic/jkflipflop.html#c3
var NoR = require('../lib/NoR.js')
var NAND = NoR(function(a, b, q){
q( !( a() && b() ) )
}, function(){
this.q.isOutput = true // dont trigger execution if q changes
})
var NAND3 = NoR(function(a, b, c, q){
q( !( a() && b() && c() ) )
... | JavaScript | examples/jk-flipflop.js | vic/NoR | mit | 1,690 | 83 | codeparrot/github-code |
7a6572c630cd1e6e7265f7cc2055eaba526cc9b7a5ea639f9c9d27dbe8d9001b | //Copyright 2016 <Shunji Lin>
#ifndef HUFFMANTREE_HPP
#define HUFFMANTREE_HPP
#include <memory>
#include <vector>
#include <cassert>
#include <iostream>
#include <queue>
namespace huffmantree {
template <class T>
struct Entry {
T character;
int weight;
Entry(T character, int weight) : character(character... | C++ | 9.1.HuffmanCoding/include/HuffmanTree.hpp | shunjilin/DesignAnalysisAlgo | mit | 2,374 | 99 | codeparrot/github-code |
a44163d35984cb5fb9f81b120a62b07128af327e6b806b2f6b4f580ddea1ffdb | (function($) {
"use strict";
//----------------------------------------//
// Variable
//----------------------------------------//
var variable = {
width : 0,
height : 0,
selector : '.item-point',
styleSelector : 'circle',
animationSelector : '',
... | JavaScript | js/scalize.js | adamnurdin01/scalize | mit | 7,867 | 197 | codeparrot/github-code |
95a3527afe2005a05e81a02285992342fdadb03d9502183e1e4345bd286609a9 | #!/usr/bin/env node
'use strict'
// Vendor includes
const chalk = require('chalk');
const fs = require('fs');
const yargs = require('yargs');
const path = require('path');
const HTMLtoJSX = require('htmltojsx');
const jsdom = require('jsdom-no-contextify');
// Language files
const content = require('./lang/en');
//... | JavaScript | index.js | goopscoop/svg-to-react-cli | mit | 5,148 | 182 | codeparrot/github-code |
7cac00523e1d1619fcbdd03f5a495563e6a85bbe446fd8b0cd19591198e10700 |
<!DOCTYPE html>
<html lang="en">
<head>
<title>遮罩 - nek-ui</title>
<meta charset="utf-8">
<meta name="description" content="nek-ui - UI components based on RegularJS">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<me... | HTML | doc/v0.5/components/notice_mask_.html | kaola-fed/nek-ui | mit | 15,718 | 493 | codeparrot/github-code |
c372ada7136ab05fdf6954fca5cf57374717fe5b9bd40d10232e50e68c789aa3 | <?php
/*************************************************************************************************************************
PHP GENERAL FUNCTIONS
- provides functions needed by all types of tests
***********************************************************************************************************************... | PHP | php_support/general_functions.php | JuliaNeumann/e_tests | mit | 3,304 | 68 | codeparrot/github-code |
1bb619957e4c4ed6f52abdec787a9c5e76a090db8f6e34526e3650b3fef1af07 | using System;
using System.Reactive;
using System.Reactive.Linq;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
namespace EventToObservableReflection
{
public static class GlyphsEventToObservableExtensions
{
public static... | C# | ExampleOutput/GlyphsEventToObservableExtensions.cs | WilkaH/EventToObservableReflection | mit | 29,417 | 449 | codeparrot/github-code |
ebe76d845c9254d4cf2590ce66921cacbbc8c262a277e09e2f0d176da3d9d053 | using System;
using System.Collections.Generic;
using System.Data;
using System.Data.Entity;
using System.Linq;
using System.Threading.Tasks;
using System.Net;
using System.Web;
using System.Web.Mvc;
using Typespot.Models;
namespace Typespot.Controllers
{
[Authorize( Roles = "Superusers")]
public class Harmon... | C# | Typespot/Controllers/HarmonicGroupsController.cs | rasmuseeg/TypeSpot | mit | 4,289 | 135 | codeparrot/github-code |
6c1a2f599ad119f6a72f9ec89f23ae52a10308db9b353ccb08afa4b242f362eb | package cofh.api.energy;
import net.minecraft.nbt.NBTTagCompound;
/**
* RefInfo implementation of {@link IEnergyStorage}. Use/extend this or implement your own.
*
* @author King Lemming
*
*/
public class EnergyStorage implements IEnergyStorage {
protected int energy;
protected int capacity;
protected int m... | Java | src/main/java/cofh/api/energy/EnergyStorage.java | Ratismal/PowerConverter | mit | 3,053 | 159 | codeparrot/github-code |
be54114fac8902b1786a022bfefac8afba7d4835b55497797a9069f5eeff871e | // Returns the data tables:
// get global database object
var db = require('../../../database/pgp_db');
var pgp = db.$config.pgp;
// Defining the query function:
function dbtables (req, res, next) {
var tableparam = !!req.query.table;
if (tableparam) {
var queryTable = { queryTable: 'ndb.' + String(req.quer... | JavaScript | v2.0/helpers/dbtables/dbtables.js | NeotomaDB/api_nodetest | mit | 1,174 | 48 | codeparrot/github-code |
a0925f0a3b649245b85b117b97aef57b6d987da43b670a45ae98131a39e75218 | const parentMixin = {
mounted() {
if (this.value >= 0) {
this.currentIndex = this.value
}
},
methods: {
updateIndex() {
if (this.$children && this.$children.length) {
this.childLength = this.$children.length
let children = this.$children
for (let i = 0; i < children... | JavaScript | src/mixins/multi-items.js | yanm1ng/yoga-ui | mit | 2,004 | 98 | codeparrot/github-code |
2aa3266c0a728b17db864f36671e73343d178e945ad30135d4c195d2499a4af1 | package com.sanjay.springtiles.controller;
import java.util.List;
import javax.validation.Valid;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
import org.springframework.security.core.Authentication;
import org.s... | Java | src/main/java/com/sanjay/springtiles/controller/RegisterController.java | RawSanj/spring-tiles-sample-app | mit | 2,161 | 60 | codeparrot/github-code |
01ab4a8e801686ab96e68558c3ccb974c304b1b6456628e1ad3059728be16e75 | describe('Deck JS Menu', function() {
var $d = $(document);
var dsc = defaults.selectors.container;
beforeEach(function() {
loadFixtures('standard.html');
if (Modernizr.history) {
history.replaceState({}, "", "#")
}
else {
window.location.hash = '#';
}
$.deck('.sli... | JavaScript | test/spec.menu.js | ronleal0/slides | mit | 2,382 | 84 | codeparrot/github-code |
f279645fb22d49c688d5fe6a9711c39d216b41eb12e803f43cff331263fd760b | /**
* Created by chriscai on 2014/10/14.
*/
var MongoClient = require('mongodb').MongoClient,
connect = require('connect');
var log4js = require('log4js'),
logger = log4js.getLogger();
var fs = require("fs");
var path = require("path");
var cacheTotal = require('../service/cacheTotal');
var cacheCount = ... | JavaScript | service/query.js | badjs/badjs-storage | mit | 18,861 | 576 | codeparrot/github-code |
d2405bc6a38826c534da944cb8fb807a52a2759abb5f4abb0e76069ce16b14d9 | <?php
//连接数据库
function connect(){
$link = mysqli_connect("localhost", "root", "") or die("数据库连接失败:".mysqli_errno($link).":".mysqli_error($link));
mysqli_set_charset($link, "utf8");
mysqli_select_db($link, "html5") or die("指定数据库打开失败");
return $link;
}
//插入数据
function insert($link, $table, $array){
... | PHP | server/mysql_fun.php | winsan-zhang/website-test | mit | 1,647 | 59 | codeparrot/github-code |
73f5a9a5c08ee25691b5a33c0b3cda4a03f54e9e76bd2b9aa27340fd669353c3 |
var test = require("tape"),
Sandal = require('../sandal.js');
test('Resolve transient factory with singleton dependencies twice', function (t) {
var sandal = new Sandal();
var i = 0;
var factory1 = function (factory2) {
i++;
return '' + i + factory2;
};
var j = 0;
var factory2 = function ... | JavaScript | test/resolving-transient-factory-with-singleton-dependencies-test.js | marcusberner/sandal | mit | 733 | 34 | codeparrot/github-code |
9404c2743f1c8adbf7523221759597602b0dca2210ec21400779b19177442e60 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>luaucdn Documentation</title>
<link rel="stylesheet" href="ldoc.css" type="text/css" />
</head>
<body>
<div ... | HTML | docs/index.html | deepakjois/luaucdn | mit | 13,372 | 713 | codeparrot/github-code |
b69859a137c60708668b0e6a89e8242637bfe3192c74a8c96c6032da2b6842f3 | import { Express } from 'express'
import Crowi from 'server/crowi'
import multer from 'multer'
import form from '../form'
import Admin from './admin'
import API from './api'
import Login from './login'
import Me from './me'
export default (crowi: Crowi, app: Express) => {
const controllers = crowi.controllers
c... | TypeScript | lib/routes/index.ts | crowi/crowi | mit | 3,426 | 96 | codeparrot/github-code |
85d54e0787ba348bd94d2b750b8713d373e8d15e8c04381ec351284c0378db9b | # -*- coding: utf-8 -*-
"""
This file should contain functions for the following operations:
- load data from raw txt format (in German)
- stemming
- (maybe) remove stop-words (e.g. der, die, das, in, am ...)
- create dictionary containing all desired words
"""
import os
import fnmatch
import re
from nltk.stem.snowba... | Python | preprocess.py | eonum/medword | mit | 14,334 | 407 | codeparrot/github-code |
bddcb4d8801590998153ebc5c901a37a03df340839e65479495bfec2c3283abc | // Writen by Mr.Lu
/**
* Routes
*/
var User = require("./user");
var Blog = require("./blog");
var Comment = require("./comment");
var Setting = require("./setting");
module.exports = function(app) {
app.get("/", function(req, res) {
res.redirect("/home");
});
app.get("/settings", Setting.settingPage);
ap... | JavaScript | routes/index.js | kenticny/cBlog | mit | 1,114 | 49 | codeparrot/github-code |
5d00aba408aab337cecd62ddf85698b67ed4dd76d143350308b90aaf2635b728 | import React from "react";
import { useQuery } from "@apollo/react-hooks";
import { SUBSCRIBER_HISTORY_QUERY } from "./gql";
import HistoryChart from "../HistoryChart";
import Subscriber from "../../entities/Subscriber";
interface SubscriberHistoryChartProps {
channelId: string;
days?: number;
}
interface Subscribe... | TypeScript | src/components/SubscriberHistoryChart/index.tsx | thomasbrueggemann/sailing-channels | mit | 1,316 | 56 | codeparrot/github-code |
c751b24c50f6f38b867149c71ffb3eea5c78e79a8ecbeb6f488c38f77bc6d76c | namespace _10.PairsByDifference
{
using System;
using System.Linq;
public class StartUp
{
public static void Main()
{
int[] numbers = Console.ReadLine()
.Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries)
.Select(int.Parse)
... | C# | ExercisesArrays/10.PairsByDifference/StartUp.cs | fmavrodiev/CSharpSoftUni | mit | 891 | 35 | codeparrot/github-code |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.