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 |
|---|---|---|---|---|---|---|---|---|
5afaafeac34df05d558bf3eb1da83825dd7e5646bc2b0ab864d7d8ae2130bc70 | package queier
import (
"github.com/julienschmidt/httprouter"
"net/http"
"encoding/json"
"fmt"
"strconv"
"broker-gateway/entities"
"github.com/satori/go.uuid"
)
type Router interface {
Start(port int)
}
type router struct {
q Querier
http *httprouter.Router
}
func NewRouter(q Querier) Router {
r := http... | GO | queier/router.go | commodity-trading-system/broker-gateway | mit | 6,277 | 222 | codeparrot/github-code |
5c0ffb1f76c75f05c0c3cde543192048971fe2d9ea95d95278610eeb55a7306f | <?php
/**
* Controlador de acesso do backend
*
* @package MagicPHP Backend
* @author André Ferreira <andrehrf@gmail.com>
*/
class maPrivileges{
/**
* Função para verificar autorização de acesso
*
* @static
* @access public
... | PHP | modules/backend/core/maprivileges.class.php | magicphp/backend | mit | 3,508 | 102 | codeparrot/github-code |
0e7d20e26b7fc8c56c240acf6b754ef2ec31390117fd3b0606871788d602519d | // ========================================================================
// SproutCore -- JavaScript Application Framework
// Copyright ©2006-2011, Strobe Inc. and contributors.
// Portions copyright ©2008 Apple Inc. All rights reserved.
// ========================================================================
s... | JavaScript | frameworks/foundation/controllers/tree.js | Eloqua/sproutcore | mit | 4,036 | 125 | codeparrot/github-code |
55d1304577aba8f07348ebbac12470b27a6b9e6b67a96248fe54cdd8bd621dbd | using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.IO;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using Pfz.AnimationManagement;
using Pfz.AnimationManagement.Abstract;
... | C# | ReferenceCode/Pfz.AnimationManagement.2013_08_25/Pfz.AnimationManagement/WpfSample/MainWindow.xaml.cs | flysnoopy1984/DDZ_Live | mit | 26,048 | 598 | codeparrot/github-code |
5b8caca9a974d2f5c5ca51fa3546acc73a34889d635e0150c4de553083aeebb3 | package fables.kotlin.jee.rest;
import fables.kotlin.jee.business.KittenBusinessService;
import fables.kotlin.jee.business.KittenEntity;
import javax.inject.Inject;
import javax.ws.rs.*;
/**
* JSON REST CRud service.
* JEE will first create one noarg instance, and then injected instances.
*
* @author Zeljko Trog... | Java | jee/java/src/main/java/fables/kotlin/jee/rest/KittenRestService.java | zeljkot/fables-kotlin | mit | 1,047 | 40 | codeparrot/github-code |
e030d1ea72cf6f954b6b510d6729c7b77dc6477557333378ab6c90e339f2bd05 | <?php
return array(
/*
|--------------------------------------------------------------------------
| Application Debug Mode
|--------------------------------------------------------------------------
|
| When your application is in debug mode, detailed error messages with
| stack traces will be shown on every ... | PHP | app/config/app.php | TeenahApp/web.api | mit | 7,278 | 185 | codeparrot/github-code |
cea0f8caf1721eafc0792ebf2e96ca254e816cc1dc14e3fb49e76163f36280e1 | import React, {Component} from 'react';
import PdfJS from './pdfJS';
import Contract from "../../contract";
import Event from '../../event';
import AnnotationLoader from '../../annotator/loader';
class Viewer extends Component {
constructor(props) {
super(props);
this.state = ({
page_n... | JavaScript | resources/assets/scripts/contract/components/pdf/viewer.js | younginnovations/resourcecontracts-rc-subsite | mit | 2,838 | 104 | codeparrot/github-code |
59adc41c00472e1cc5cf6aad61e53f465e9c7c34a0571851f600a7d1792ef8a4 | use std::collections::{HashMap};
use std::path::{Path};
use std::sync::{Arc};
use crossbeam::sync::{MsQueue};
use glium::backend::{Facade};
use debug::{gnomon, indicator};
use inverse_kinematics::{Chain};
use model::{Model};
use unlit_model::{UnlitModel};
use render::render_frame::{RenderFrame};
pub const DEPTH_DIM... | Rust | src/render/render_context.rs | AnthonyMl/sg-rs | mit | 2,238 | 84 | codeparrot/github-code |
e7b252fa749b38f654a59d6f4c31d6e82b4ff098c89cf6cc0c5b4533f419ad22 | // -------------------------------------------------------------------------------------
// Author: Sourabh S Joshi (cbrghostrider); Copyright - All rights reserved.
// For email, run on linux (perl v5.8.5):
// perl -e 'print pack "H*","736f75726162682e732e6a6f73686940676d61696c2e636f6d0... | C | cpp-katas/Poker-Hand/poker-hand.h | cbrghostrider/Hacking | mit | 3,193 | 103 | codeparrot/github-code |
2d6e01e10f1b71dbf068c1900bac5e6249b08c9220d0c994d338186b1a0e8295 | /*
* Copyright (c) 2015 by Rafael Angel Aznar Aparici (rafaaznar at gmail dot com)
*
* openAUSIAS: The stunning micro-library that helps you to develop easily
* AJAX web applications by using Java and jQuery
* openAUSIAS is distributed under the MIT License (MIT)
* Sources at https://github.com/raf... | JavaScript | src/main/webapp/js/usuariocursoxusuario/plist.js | Ilthur/boletinweb | mit | 16,659 | 363 | codeparrot/github-code |
4c47e6d2b325c9bbc249014a5300dd564f2272835171c636a7a5ca1c461d8acf | /**
* Write the input to the paramsified file
*
* ---
* INPUTS:
*
* - FILES
* Write the list of files to the paramsified file (line feed after each filename).
*
* - STRINGS
* Write the strings (concatenated) to the paramsified file.
*
* - STRING
* Write the string to the paramsified file.
*
* - UN... | JavaScript | lib/buildy/tasks/write.js | mosen/buildy | mit | 4,521 | 142 | codeparrot/github-code |
127a4f3e8762beba1fcb51b54653c09afd1cdb9329d628be9937a282b55ffe50 | # frozen_string_literal: true
require 'grape/router'
require 'grape/api/instance'
module Grape
# The API class is the primary entry point for creating Grape APIs. Users
# should subclass this class in order to build an API.
class API
# Class methods that we want to call on the API rather than on the API obj... | Ruby | lib/grape/api.rb | dblock/grape | mit | 7,030 | 197 | codeparrot/github-code |
39df3cad9bfb24a3663d6343c22eb492c0f1f9c28f6997204e19aa338ad586d3 | (function () {
"use strict";
/**
* This module have an ability to contain constants.
* No one can reinitialize any of already initialized constants
*/
var module = (function () {
var constants = {},
hasOwnProperty = Object.prototype.hasOwnProperty,
prefix = (M... | JavaScript | js/samples/object-constants/ObjectConstants.js | AlexeyPopovUA/JavaScript-design-patterns | mit | 2,762 | 93 | codeparrot/github-code |
b048abd39c4e1319417744db05f2af9c2d5649130d7e1d930f8a851c691c8453 | # frozen_string_literal: true
module RuboCop
module Formatter
# This formatter formats report data in clang style.
# The precise location of the problem is shown together with the
# relevant source code.
class ClangStyleFormatter < SimpleTextFormatter
ELLIPSES = '...'
def report_file(fil... | Ruby | lib/rubocop/formatter/clang_style_formatter.rb | smakagon/rubocop | mit | 1,635 | 58 | codeparrot/github-code |
1cce4fba8b67534484c473c0ff5dde3d4b97f4da42284ce91306635222c97a39 | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="An approach to developing modern web applications">
<meta name="author" content="Marc J. Greenberg">
<title>ElectricDiscoTech</title>... | HTML | dev/docs/osxivp.html | codemarc/ElectricDiscoTech | mit | 10,042 | 189 | codeparrot/github-code |
b94b489315b10de1a69678bdc34e369c7cd58342b956004347c260256f3c2998 | package me.nereo.multi_image_selector;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Matrix;
import android.graphics.RectF;
import android.net.Uri;
import android.os.Bundle;
impo... | Java | multi-image-selector/src/main/java/me/nereo/multi_image_selector/ClipPhotoActivity.java | SunnyLy/LocalImageChoose | mit | 11,124 | 316 | codeparrot/github-code |
1ff308cafd597881842ed7ffab4469cb692c287ea973adf5a51d907a7fdfa1a1 | #include <onyxudp/udpclient.h>
#include <stdio.h>
#include <string.h>
#include <assert.h>
/* This test just makes sure the client library compiles and doens't crash on start. */
void on_error(udp_client_params_t *client, UDPERR code, char const *name) {
fprintf(stderr, "on_error: code %d: %s\n", code, name);
... | C++ | test/client/client.cpp | jwatte/onyxnet | mit | 756 | 31 | codeparrot/github-code |
eae56e215e7a3bda42b92df6b6d4f6a7a23b3087f688fe9d8ad90db42f881e9f | import * as React from 'react';
import { AppliedFilter, DataTypes, GridFilters, numberWithCommas, ReactPowerTable, withInternalPaging, withInternalSorting } from '../../src/';
import { defaultColumns, partyList, sampledata } from './shared';
// //if coming in from DTO
// const availDTO = [
// { fieldName: 'number... | TypeScript | examples/src/filters.tsx | coolkev/react-power-table | mit | 4,477 | 112 | codeparrot/github-code |
200414814c6b67b6c3a1f0d0f55073fc8ee72dde9edfb61ea526f06278d9f96c | var address = '';
var config = {};
var requestGroupId = 0;
var readRequestsTodo = 0;
var readRequestsDone = 0;
var scanRequestsTodo = [0, 0, 0];
var scanRequestsDone = [0, 0, 0];
var scanResults = [];
var requestSentCounter = 0;
var requestSuccessCounter = 0;
var requestFailureCounter = 0;
var requestInProgress = false... | JavaScript | frontend/main.js | morkai/walkner-iovis | mit | 16,663 | 873 | codeparrot/github-code |
22d0e28796c2cff336da7aab73fa76ba35da9f00e708f0b8cae7ec7f34bda3fe | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>metacoq-erasure: 3 m 5 s</title>
<link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" />
<link href="../../../../../bootstrap.min.css" ... | HTML | clean/Linux-x86_64-4.04.2-2.0.5/released/8.9.0/metacoq-erasure/1.0~alpha+8.9.html | coq-bench/coq-bench.github.io | mit | 15,733 | 246 | codeparrot/github-code |
f61126b978c725af3beb5b68158ad08b58f5bf640043b82213abf8801864dba9 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Matrix
{
public class Matrix<T>
where T : struct
{
private T[,] matrix;
public Matrix(int x, int y)
{
matrix = new T[x, y];
}
public int LengthX
... | C# | DefineClassPartTwo1/Matrix/Matrix.cs | dirk-dagger-667/telerik-c--OOP-lectures | mit | 4,417 | 160 | codeparrot/github-code |
d6ac8a85baa8910dba351c5836e53e9ad3aa4f4942d3b244774b6db44efef877 | <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Kategori extends CI_Controller {
public function __construct() {
parent::__construct();
$this->load->model('Kategori_model');
}
public function index($page = 0){
if(!$this->session->userdata('sesilogin')) {
redire... | PHP | application/controllers/Kategori.php | fathiraz/lebah-inventory | mit | 8,933 | 258 | codeparrot/github-code |
ab0e7d91ff632c42e243c259c2f081d9f333e87f1b46ed97feae68b8af5bfdcb | from .stats_view_base import StatsViewSwagger, StatsViewSwaggerKeyRequired
from .stats_util_dataverses import StatsMakerDataverses
class DataverseCountByMonthView(StatsViewSwaggerKeyRequired):
"""API View - Dataverse counts by Month."""
# Define the swagger attributes
# Note: api_path must match the path... | Python | dv_apps/metrics/stats_views_dataverses.py | IQSS/miniverse | mit | 6,085 | 151 | codeparrot/github-code |
986d225aa4a36748f95a70de39668666deabd9fc48133b307cccceb9842d95aa | /*
* Code used in the "Software Engineering" course.
*
* Copyright 2017 by Claudio Cusano (claudio.cusano@unipv.it)
* Dept of Electrical, Computer and Biomedical Engineering,
* University of Pavia.
*/
package goldrush;
/**
* @author Reina Michele cl418656
* @author Bonissone Davidecl427113
*/
public class Bo... | Java | GoldRush/src/goldrush/BoniMichele.java | IngSW-unipv/GoldRush | mit | 932 | 48 | codeparrot/github-code |
90a0d7b40bdb06089c1ce4501e8d065bb17574f06df1cfa493601ad0d10ebcb6 | using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Input;
namespace Paradix
{
public sealed class KeyboardController : IController
{
// TODO : List of keys UP / DOWN / PRESSED / RELEASED
public PlayerIndex Player { get; set; } = PlayerIndex.One;
public KeyboardState CurrentState { get; private set;... | C# | Paradix.Engine/Input/KeyboardController.cs | NySwann/Paradix | mit | 1,090 | 47 | codeparrot/github-code |
dca9c177ef91fde7306260ae453d7d12a417eb42f43ec63c522e10ba396a3f59 | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package com.docuware.dev.Extensions;
import java.io.Closeable;
import java.io.InputStream;
/**
*
* @author Patrick
*/... | Java | src/com/docuware/dev/Extensions/EasyCheckoutResult.java | DocuWare/PlatformJavaClient | mit | 949 | 42 | codeparrot/github-code |
aa1c270c7eef50f95fd9fee8fab188a041cc7ca55a3646db20c185c04bca015f | using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CharacterModelLib.Models
{
public class CharacterProject : NotifyableBase
{
public CharacterProject()
{
characterColle... | C# | CharacterModelLib/Models/CharacterProject.cs | Salem5/CharacterEditor | mit | 4,557 | 162 | codeparrot/github-code |
28a04f4595097813009cac8ab23a10e735b6e029b89b1e732b504f5024482c9c | import uuid
from django.db import models
from django.conf import settings
from django.contrib.auth.models import AbstractUser
from django.contrib.auth.models import BaseUserManager
from django.utils import timezone
from accelerator_abstract.models import BaseUserRole
from accelerator_abstract.models.base_base_profile... | Python | simpleuser/models.py | masschallenge/django-accelerator | mit | 6,632 | 201 | codeparrot/github-code |
4f1f5355d3fa815aa3bcf90dab6e73b22c1bfadae1d468bc7c69c2f04f8e843b | package experiments;
import java.io.File;
import java.util.Arrays;
import java.util.List;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import data.StateImpl;
import datahandler.word2vec.MedicalSequenceIterator;
import state2vec.State2Vec;
public class State2VecTest {
protected static final Logger log... | Java | src/main/java/experiments/State2VecTest.java | Milanvdm/MedicalLSTM | mit | 4,075 | 141 | codeparrot/github-code |
8966df9568f986c409b582a82b77d391f9fc00b186d083c7a70eeab0fb5e77e2 | #ifndef AC_GEGBLABB_H
#define AC_GEGBLABB_H
//
// (C) Copyright 1993-2010 by Autodesk, Inc.
//
// Permission to use, copy, modify, and distribute this software in
// object code form for any purpose and without fee is hereby granted,
// provided that the above copyright notice appears in all copies and
// tha... | C | 2011/inc/gegblabb.h | kevinzhwl/ObjectARXCore | mit | 10,368 | 212 | codeparrot/github-code |
aa1fe7ec2e6097c890be21eb9f4488a312574006cbd5b28edebb4ab7958cf868 | #ifndef _absnodeaction_h_
#define _absnodeaction_h_
#include "cocos2d.h"
using namespace cocos2d;
#include <string>
#include <iostream>
#include <vector>
using namespace std;
namespace uilib
{
class TouchNode;
enum EaseType
{
EaseNone,
EaseIn,
EaseOut,
EaseInOut,
EaseExponentialIn,
EaseExponen... | C | directfire_github/trunk/uilib/actions/absnodeaction.h | zhwsh00/DirectFire-android | mit | 3,894 | 158 | codeparrot/github-code |
34bb338231bbb586c3d6c6e03a1a16ccd6cbc0b54ae1fa14a4695b5968a86ed5 | window.ImageViewer = function(url, alt, title){
var img = $('<img />').attr('src', url).attr('alt', title).css({
display: 'inline-block',
'max-width': '90vw',
'max-height': '90vh'
});
var a = $('<a></a>').attr('target', '_blank')
.attr('title', title)
.attr('h... | JavaScript | js/image-viewer.js | clazz/clazz.github.io | mit | 2,216 | 72 | codeparrot/github-code |
ac5803a2e7653b47a097df91388c43ee502071a95305d1d9aa6477c87a05b9af | #include <compiler.h>
#if defined(CPUCORE_IA32) && defined(SUPPORT_MEMDBG32)
#include <common/strres.h>
#include <cpucore.h>
#include <pccore.h>
#include <io/iocore.h>
#include <generic/memdbg32.h>
#define MEMDBG32_MAXMEM 16
#define MEMDBG32_DATAPERLINE 128
#define MEMDBG32_LEFTMARGIN 8
typedef struct... | C | generic/memdbg32.c | AZO234/NP2kai | mit | 3,962 | 160 | codeparrot/github-code |
f3b7048e3365532afa5e0af6911c86bf9135a4d33201753ee7429cdbd2d17dd7 | package ch.spacebase.openclassic.api;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.UnsupportedEncodingException;
import java.net.HttpURLConnection;
i... | Java | src/main/java/ch/spacebase/openclassic/api/HeartbeatManager.java | good2000mo/OpenClassicAPI | mit | 5,720 | 191 | codeparrot/github-code |
7e5e05f606a676f52141682b64c55103eb7640feea0b2897777dd3c5bdfe2d3e | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ParkingRampSimulator
{
public class ParkingRamp : ParkingConstruct
{
[Newtonsoft.Json.JsonIgnore]
public List<ParkingFloor> Floors { get; private set; }
public ... | C# | src/ParkingSim/ParkingRampSimulator/ParkingRamp.cs | rockfordlhotka/DistributedComputingDemo | mit | 2,078 | 70 | codeparrot/github-code |
3ca76d9e00f850cc1f7b76e2c3f7910efe0476ab99c12753d5d48c2784e4daf7 | package org.gojul.gojulutils.data;
/**
* Class {@code GojulPair} is a simple stupid pair class. This class is notably necessary
* when emulating JOIN in database and such a class does not exist natively in the JDK.
* This object is immutable as long as the object it contains are immutable. Since
* this object is n... | Java | src/main/java/org/gojul/gojulutils/data/GojulPair.java | jaubin/gojulutils | mit | 2,277 | 84 | codeparrot/github-code |
fd3e8884cdbe5b6f36e7589d3d12486b65cbbb024c3c7f90bec9a6a1df1a8032 | /*--------------------------------------------
Created by Sina on 06/05/13.
Copyright (c) 2013 MIT. All rights reserved.
--------------------------------------------*/
#include "elements.h"
#include "mpi_compat.h"
#include "gcmc.h"
#include "memory.h"
#include "random.h"
#include "neighbor.h"
#include "ff_md.h"
#inc... | C++ | src/gcmc.cpp | sinamoeini/mapp4py | mit | 4,193 | 164 | codeparrot/github-code |
41fd6589d07bcdf85843e5b150d55c00f2f6e1378c630aa0e16d6d9cc356b482 | define("helios/Helios-Debugger", ["amber/boot", "amber_core/Kernel-Objects", "helios/Helios-Core", "helios/Helios-Workspace"], function($boot){
var smalltalk=$boot.vm,nil=$boot.nil,_st=$boot.asReceiver,globals=$boot.globals;
smalltalk.addPackage('Helios-Debugger');
smalltalk.packages["Helios-Debugger"].transport = {"ty... | JavaScript | bower_components/amber/support/helios/src/Helios-Debugger.js | Alexander-Remizov/SVG-Amber-Tools | mit | 56,069 | 1,485 | codeparrot/github-code |
6d6b6a16c91366f87a79909d65f4a851cc4f9af4e12d7e062c59bdb2d94d4088 | MIME-Version: 1.0
Server: CERN/3.0
Date: Monday, 16-Dec-96 23:33:46 GMT
Content-Type: text/html
Content-Length: 3390
Last-Modified: Tuesday, 20-Feb-96 22:21:50 GMT
<html>
<head>
<title> CodeWarrior for CS100 </title>
</head>
<body>
<h2> Setting Up CodeWarrior for CS100 </h2>
CodeWarrior can be run on your o... | HTML | webkb/other/cornell/http:^^www.cs.cornell.edu^Info^Courses^Spring-96^CS100^info^codewarrior.html | ML-SWAT/Web2KnowledgeBase | mit | 3,562 | 109 | codeparrot/github-code |
38a4bcb2bbc6bddeb192e5eadf3b6c271beba833b9d1776071c6f048b8059481 | #ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QApplication>
#include <QMainWindow>
#include <QTextEdit>
#include <QMenu>
#include <QMenuBar>
#include <QAction>
#include <QDialog>
#include <QDesktopWidget>
#include <QMdiArea>
#include <QMdiSubWindow>
#include <QDockWidget>
#include <QTreeWidget>
#include <QProces... | C | src/MainWindow.h | mdenchev/IDL | mit | 2,202 | 112 | codeparrot/github-code |
4652d41ebd1fe9d8035d14bbea75eaff2061a06538889112faf734e2f8e862ca | import shaven from 'shaven'
const svgNS = 'http://www.w3.org/2000/svg'
export default function (svg, config) {
const yDensity = 0.1
const yRange = config.max.value - config.min.value
const graphHeight = config.height * 0.8
const graphWidth = config.width * 0.95
const coSysHeight = config.height * 0.6
con... | JavaScript | src/javascript/bar.js | adius/vectual | mit | 5,165 | 198 | codeparrot/github-code |
4fc50dec5eb3a8f095e10b1849643ad799daa06f89cb5675d3c285f528f76f6d | require File.dirname(__FILE__) + '/spec'
class Object
class << self
# Lookup missing generators using const_missing. This allows any
# generator to reference another without having to know its location:
# RubyGems, ~/.rubigen/generators, and APP_ROOT/generators.
def lookup_missing_generator(class_id... | Ruby | lib/rubigen/lookup.rb | cowboyd/rubigen | mit | 10,194 | 306 | codeparrot/github-code |
2382b974ef42e1923425986d327b2a0e90f4cd69308f6108ce9a56455e7e8a85 | <?php
/**
* swPagesAdmin actions.
*
* @package soleoweb
* @subpackage swPagesAdmin
* @author Your name here
* @version SVN: $Id: actions.class.php 8507 2008-04-17 17:32:20Z fabien $
*/
class baseSwBlogTagsAdminActions extends sfActions
{
public function executeIndex($request)
{
$this->sw_blo... | PHP | modules/swBlogTagsAdmin/lib/baseSwBlogTagsAdminActions.class.php | rande/swBlogPlugin | mit | 2,201 | 95 | codeparrot/github-code |
762a1a996291b01889b8444ffffcff3e2c44073d8a6bf650d4bf92d0b44ae210 | /**
* Demo App for TopcoatTouch
*/
$(document).ready(function() {
<% if (kitchenSink) {
if (mvc) { %>
// Create the topcoatTouch object
var tt = new TopcoatTouch({menu: [{id: 'help', name: 'Help'}, {id: 'info', name: 'Info'}, {id: 'about', name: 'About'}]});
tt.on(tt.EVENTS.MENU_ITEM_CLICKED, functi... | JavaScript | app/templates/_app.js | kriserickson/generator-topcoat-touch | mit | 8,221 | 252 | codeparrot/github-code |
d96f8862c8f7d585cb1d562269ff8fff14551880db9a1e2cc44a229c2d23b70a | use std::borrow::{Borrow, Cow};
use std::ffi::{CStr, CString};
use std::fmt;
use std::mem;
use std::ops;
use std::os::raw::c_char;
use std::ptr;
const STRING_SIZE: usize = 512;
/// This is a C String abstractions that presents a CStr like
/// interface for interop purposes but tries to be little nicer
/// by avoiding... | Rust | api/rust/prodbg/src/cfixed_string.rs | emoon/ProDBG | mit | 10,053 | 376 | codeparrot/github-code |
e167d661683dadb4854d1cde12270247519128879cde7763206e78a1c41e06fd | const sizeOf = {
object: function () {
return function (object) {
let $start = 0
$start += 1 * object.array.length + 2
return $start
}
} ()
}
const serializer = {
all: {
object: function () {
return function (object, $buffer, $start)... | JavaScript | test/readme/terminated-multibyte.js | bigeasy/packet | mit | 8,252 | 283 | codeparrot/github-code |
ab8aed0f937e4056a4ae61919a729e6ea349d116b386e694073cec0d6dc08254 | import modelExtend from 'dva-model-extend'
import { create, remove, update } from '../services/user'
import * as usersService from '../services/users'
import { pageModel } from './common'
import { config } from 'utils'
const { query } = usersService
const { prefix } = config
export default modelExtend(pageModel, {
... | JavaScript | src/models/user.js | shaohuawang2015/goldbeans-admin | mit | 2,907 | 115 | codeparrot/github-code |
d2e6e65abb409ec06b0ecde04fe371d3d79395c64a60847e590776e5db0a9c63 | <?php
class C_admin extends CI_Controller {
public function __construct() {
parent::__construct();
if($this->session->userdata('level') != 'admin') {
redirect('auth'); }
}
public function index() {
$data['username'] = $this->session->userdata('username');
$this->load->view('dashboard_admin', $data);
... | PHP | application/controllers/c_admin.php | dinanandka/MonitoringKP_KPPL | mit | 787 | 34 | codeparrot/github-code |
6e505d4316a1aeaa45ea235de5b224527a0b6267bcaf75eee93476e6bca66c6c | /**
* jspsych plugin for categorization trials with feedback and animated stimuli
* Josh de Leeuw
*
* documentation: docs.jspsych.org
**/
jsPsych.plugins["categorize-animation"] = (function() {
var plugin = {};
jsPsych.pluginAPI.registerPreload('categorize-animation', 'stimuli', 'image');
plugin.info = ... | JavaScript | plugins/jspsych-categorize-animation.js | wolfgangwalther/jsPsych | mit | 8,599 | 267 | codeparrot/github-code |
a55c5122383d1089b2617b851f2561e0b71c205e52716a40eaacbbecdf17c1cc | <?php
/*
* This file is part of the Pho package.
*
* (c) Emre Sokullu <emre@phonetworks.org>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Pho\Lib\Graph;
/**
* Holds the relationship between nodes and edges.
*
*... | PHP | src/Pho/Lib/Graph/EdgeList.php | phonetworks/pho-lib-graph | mit | 11,362 | 379 | codeparrot/github-code |
0fa306916f4e417025ab953062c32423a27de418e4dc0e5b5f6f08d44e06c3ee | package me.august.lumen.data;
import me.august.lumen.compile.resolve.data.ClassData;
import me.august.lumen.compile.resolve.lookup.DependencyManager;
import org.junit.Assert;
import org.junit.Test;
public class DataTest {
@Test
public void testClassData() {
ClassData data = ClassData.fromClass(String... | Java | src/test/java/me/august/lumen/data/DataTest.java | augustt198/lumen | mit | 1,850 | 67 | codeparrot/github-code |
29c1d2476edcd86fcd80cec086f69b5fbf9435e421c34c0034b27531d010cdb0 | 'use strict';
var app = angular.module('Fablab');
app.controller('GlobalPurchaseEditController', function ($scope, $location, $filter, $window,
PurchaseService, NotificationService, StaticDataService, SupplyService) {
$scope.selected = {purchase: undefined};
$scope.currency = App.CONFIG.CURRENCY;
$s... | JavaScript | src/main/webapp/components/purchase/purchase-edit-ctrl.js | fabienvuilleumier/fb | mit | 4,952 | 151 | codeparrot/github-code |
c53303c711e5564cafbb0202236d3d6d6c84ae84cd70f028fcc3b7c0e32fed98 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package ons;
import ons.util.WeightedGraph;
import org.w3c.dom.*;
/**
* The physical topology of a network refers to he physical layout of devices on
* a network, or to the way that the devices on a network are arra... | Java | src/ons/PhysicalTopology.java | leiasousa/MySim | mit | 6,858 | 227 | codeparrot/github-code |
b66275cfd2b809545682d20e9703a66fc32e0d2c94c330b2fad3d25a6296c17b | // Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef BASE_TRACE_EVENT_MEMORY_DUMP_MANAGER_H_
#define BASE_TRACE_EVENT_MEMORY_DUMP_MANAGER_H_
#include <stdint.h>
#include <map>
#include <memory>
#in... | C | src/base/trace_event/memory_dump_manager.h | junhuac/MQUIC | mit | 16,373 | 374 | codeparrot/github-code |
57a405616ab127acd00e75883d68a0aed50904227f4759211d5dffa014fe38a8 | // WinProm Copyright 2015 Edward Earl
// All rights reserved.
//
// This software is distributed under a license that is described in
// the LICENSE file that accompanies it.
//
// DomapInfo_dlg.cpp : implementation file
//
#include "stdafx.h"
#include "winprom.h"
#include "DomapInfo_dlg.h"
#ifdef _DEBUG
#define new ... | C++ | winprom/DomapInfo_dlg.cpp | edwardearl/winprom | mit | 1,484 | 59 | codeparrot/github-code |
b6da697a6e239aec26e0d94bf419f50d63196ddda171fe3ace253da8ef990748 | // MIT License
//
// Copyright( c ) 2017 Packt
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files( the "Software" ), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, mer... | C++ | Samples/Source Files/11 Lighting/01-Rendering_a_geometry_with_vertex_diffuse_lighting/main.cpp | PacktPublishing/Vulkan-Cookbook | mit | 27,469 | 537 | codeparrot/github-code |
8d035bb1d98e8b578e60971324e72889183757f0f3ae5d41387bfa7d3754f05b | <?php
/**
* Created by Khang Nguyen.
* Email: khang.nguyen@banvien.com
* Date: 10/3/2017
* Time: 9:33 AM
*/
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Tin Đất Đai | Quản lý bài đăng</title>
<?php $this->load->view('/admin/common/header-j... | PHP | application/views/admin/product/list.php | jnguyen095/real-estate | mit | 13,648 | 349 | codeparrot/github-code |
2919c9f97b100ad8ce1e5b0bd02d63bd1db34ba067ec75267e0f7cac36c84ec0 | import Form from 'cerebral-module-forms/Form'
import submitForm from './chains/submitForm'
import resetForm from './chains/resetForm'
import validateForm from './chains/validateForm'
export default (options = {}) => {
return (module, controller) => {
module.addState(Form({
name: {
value: '',
... | JavaScript | demo/modules/Simple/index.js | cerebral/cerebral-module-forms | mit | 1,344 | 52 | codeparrot/github-code |
6ccab3997d119f5d1dd8c1140da0ca13318c3efb58f789c65842ad248532ec23 | namespace GarboDev
{
using System;
using System.Collections.Generic;
using System.Text;
public partial class Renderer : IRenderer
{
private Memory memory;
private uint[] scanline = new uint[240];
private byte[] blend = new byte[240];
private byte[] windowCover = new... | C# | Real-Time Corruptor/BizHawk_RTC/attic/GarboDev/Renderer.cs | superusercode/RTC3 | mit | 34,324 | 953 | codeparrot/github-code |
dac315bc59caed9b9ccabb9326cdaaa23108a93ff47705dbbe95910e418048bc | <?php
namespace AppBundle\Controller;
use AppBundle\Entity\BillingAddress;
use AppBundle\Entity\ShippingAddress;
use AppBundle\Form\BillingAddressFormType;
use AppBundle\Form\ShippingAddressFormType;
use AppBundle\Form\ShippingMethodFormType;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Symfony\Bun... | PHP | src/AppBundle/Controller/CheckoutController.php | creative-junk/Webshop | mit | 5,055 | 155 | codeparrot/github-code |
f2d468784432cec0b274efbd0106583f521af8741cfc2c4935a9f7e28b87c47b | <?php
namespace App\Modules\OAuth\Controllers;
use App\Http\Controllers\Controller;
use App\Modules\Users\Controllers\UserController;
use App\Modules\Users\Models\User;
use App\Modules\Users\Supports\MailCheckSupport;
use Laravel\Socialite\Facades\Socialite as Socialite;
use Illuminate\Http\Request;
use Tymon\JWTAuth... | PHP | app/Modules/OAuth/Controllers/LoginController.php | alissonphp/lumen-api-skeleton | mit | 4,190 | 151 | codeparrot/github-code |
424d3a9ed3e6c5f06a2cf0a02c592f83eaffb25c3ecc618803624dcbdf25d825 | #!/bin/sh
# Compile script to compile against Elysion library
# Works for Mac OS X and Linux
FPC_BIN=`which fpc`
BIN_FOLDER="../bin"
LIB_FOLDER="../lib"
RES_FOLDER="../resources"
SRC_FOLDER="../source"
# Info.plist constants
BUNDLE_REGION="English"
BUNDLE_ICON="logo.icns"
BUNDLE_IDENT="com.mycompanyname"
BUNDLE_SI... | Shell | scripts/build.sh | freezedev/survival-guide-for-pirates | mit | 8,205 | 273 | codeparrot/github-code |
a0ea9aefda6cccf9a72dc14a618c7c70b32f40875b18181a86145230dd3e5a35 | // Copyright (c) 2011-2013 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 <QApplication>
#include "bitcoingui.h"
#include "clientmodel.h"
#include "walletmodel.h"
#include "optionsmodel.h"
#... | C++ | src/qt/bitcoin.cpp | codecvlc/amerios | mit | 10,776 | 311 | codeparrot/github-code |
fbd2f1278b1963ead8d487e88a14291ab6d71b864de62be810c1c229db31c68e | #!/usr/bin/env python
"""
Manage and display experimental results.
"""
__license__ = 'MIT License <http://www.opensource.org/licenses/mit-license.php>'
__author__ = 'Lucas Theis <lucas@theis.io>'
__docformat__ = 'epytext'
__version__ = '0.4.3'
import sys
import os
import numpy
import random
import scipy
import socke... | Python | c2s/experiment.py | jonasrauber/c2s | mit | 21,962 | 818 | codeparrot/github-code |
431488da3049cb636368caa5cabfc6d59ada20efb720144a28af80f5eba7fbb3 | // Castor : Logic Programming Library
// Copyright © 2007-2010 Roshan Naik (roshan@mpprogramming.com).
// This software is governed by the MIT license (http://www.opensource.org/licenses/mit-license.php).
#ifndef CASTOR_PREDICATE_H
#define CASTOR_PREDICATE_H 1
#include "relation.h"
#include "helpers.h"
#incl... | C | includes/predicate.h | jbandela/Castor_Mirror | mit | 17,894 | 410 | codeparrot/github-code |
38056c8fd94e18f56550f7f728fc8c58a15dd8777a987e5d67d8d4e25dd5146d | class TripsController < ApplicationController
before_action :set_trip, only: [:show, :update, :destroy, :edit]
def index
if current_user
@created_trips = current_user.created_trips
@joined_trips = current_user.trips
else
@trips = Trip.order(:start_at).limit(25)
end
end
def new
... | Ruby | app/controllers/trips_controller.rb | willot/raft-new | mit | 952 | 48 | codeparrot/github-code |
b089025f3f19164b619964cb566e3659f2c3ac91d865cd80a234f825477220b1 | module RedditKit
class Client
# Methods for searching reddit's links.
module Search
# Search for links.
#
# @param query [String] The search query.
# @option options [String, RedditKit::Subreddit] subreddit The optional subreddit to search.
# @option options [true, false] restr... | Ruby | lib/redditkit/client/search.rb | samsymons/RedditKit.rb | mit | 1,908 | 39 | codeparrot/github-code |
57b4a70900885f826b4b6e833b09df16ae230cf6a14c6af3cc81bc913b891b9f | //APP
var app = angular.module('PortfolioApp', ['ngRoute', 'slick']);
//ROUTING
app.config(function ($routeProvider) {
"ngInject";
$routeProvider
.when('/', {
controller: "HomeController",
templateUrl: "js/angular/views/home-view.html"
})
.when('/work/:projectId', {
controller: 'ProjectController',
templa... | JavaScript | site/js/angular/app.js | michael-eightnine/frontend-portfolio | mit | 1,907 | 87 | codeparrot/github-code |
b7e222b3fdab9f966846d4cc52c0dd71ae95bee56e0d3852c3e00a9c0e1f7f34 | let original: (fn: FrameRequestCallback) => number;
let requesters: any[] = [];
function fakeRaf(fn: FrameRequestCallback): number {
requesters.push(fn);
return requesters.length;
}
function use() {
original = window.requestAnimationFrame;
window.requestAnimationFrame = fakeRaf;
}
function restore() {
set... | TypeScript | test/helpers/fake-raf.ts | motorcyclejs/dom | mit | 552 | 32 | codeparrot/github-code |
514dc3919f66677e53885b98d06f92df1b11e2e04e5ffa80008a0d544459197b | //-----------------------------------------------------------------------------
// Декодер Mpeg Layer 1,2,3
// Копонент звукового двигателя Шквал
// команда : AntiTank
// разработчик : Гилязетдинов Марат (Марыч)
//-----------------------------------------------------------------------------
// включения
#include <str... | C++ | source/SoundFile/MP3/MpegDecoder.cpp | gecko0307/squall | mit | 74,782 | 3,308 | codeparrot/github-code |
1cfd4dcec8174879837e1dacd077408ec3cd5c1166a8789fe81f6ba2476d7d39 | //---------------------------------------------------------------------
// <copyright file="DuplicateStream.cs" company="Microsoft Corporation">
// Copyright (c) 1999, Microsoft Corporation. All rights reserved.
// </copyright>
// <summary>
// Part of the Deployment Tools Foundation project.
// </summary>
//-... | C# | src/Microsoft.PackageManagement.ArchiverProviders/Compression/DuplicateStream.cs | OneGet/oneget | mit | 8,313 | 234 | codeparrot/github-code |
0384b35e6f5539ebad0949d8e1effa8c83c6c87b75fb2dc4ffd48b472a29ba9a | +(function () {
'use strict';
angular
.module('DashboardApplication')
.controller('FileManagerRemoveFolderController', ['$scope', '$q', 'Event', 'FoldersRest', FileManagerRemoveFolderController]);
function FileManagerRemoveFolderController($scope, $q, Event, FoldersRest) {
var vm ... | JavaScript | source/dashboard/components/filemanager/controllers/removefolder.controller.js | MozhganNajafi/andisheh-bartar | mit | 955 | 31 | codeparrot/github-code |
1fc2aab6f0b0bf6aaba3cc7d74bca398ccf011ab605c8d62246cd5322ad46abd | package co.colector.model.request;
import java.util.ArrayList;
import java.util.List;
import co.colector.ColectorApplication;
import co.colector.R;
import co.colector.model.IdInputValue;
import co.colector.model.IdValue;
import co.colector.model.Survey;
import co.colector.model.AnswerValue;
import co.colector.session... | Java | app/src/main/java/co/colector/model/request/SendSurveyRequest.java | jlpuma24/colector-android-telecomsoftsrs | mit | 2,516 | 72 | codeparrot/github-code |
871d51bca4f0a5c763507a40a9cff9ddac92688bff616c71559bba695b08cf7f | // Copyright (c) 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 "init.h"
#include "util.h"
#include "sync.h"
#include "ui_interface.h"
#includ... | C++ | src/bitcoinrpc.cpp | w295472444/TMCOIN | mit | 48,637 | 1,307 | codeparrot/github-code |
fbdd4aa1fd121aa595c6772d22fd6477aa67b2d66d942b06bb70884a62b19f24 | <?php
/* WebProfilerBundle:Collector:router.html.twig */
class __TwigTemplate_c8d21550850074782862265b813a9c2aea7c608253db98e24225c2ea859cc33f extends Twig_Template
{
public function __construct(Twig_Environment $env)
{
parent::__construct($env);
// line 1
$this->parent = $this->loadTe... | PHP | var/cache/dev/twig/9d/9ddcdbb0671c46071f6efb8e5daeec192572165664b16d016f57f2b46b9702b3.php | mehdiYal/Schoolium | mit | 8,083 | 148 | codeparrot/github-code |
ab149defee83d8263da102296ca712e9810d375b6ac61f5a752496351b758124 | import traceback
class EnsureExceptionHandledGuard:
"""Helper for ensuring that Future's exceptions were handled.
This solves a nasty problem with Futures and Tasks that have an
exception set: if nobody asks for the exception, the exception is
never logged. This violates the Zen of Python: 'Errors s... | Python | concurrent/futures/cooperative/ensure_exception_handled.py | mikhtonyuk/rxpython | mit | 3,261 | 76 | codeparrot/github-code |
7ed18555636bd70093936f67798e206b01625c0afd016bb528512f9b49444f11 | module GitNetworkitis
class Getter
include HTTParty
include JSONHelper
base_uri 'https://api.github.com'
attr_accessor :url, :local_options, :query_options
LOCAL_KEYS = [:batch, :since]
def initialize(url, options={})
@url = url
scrub_local_options options
@query_options =... | Ruby | lib/gitnetworkitis/getter.rb | jcoutu/gitnetworkitis | mit | 1,826 | 65 | codeparrot/github-code |
aea68dcf6959170fb710e76aecf1eda41d866b2f4f4e5dce7fe64048024c5531 | <!DOCTYPE html><html><head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
<meta name="description">
<meta name="keywords" content="static content generator,static site generator,static site,HTML,web development,.NET,C#,Razor,Markdown,YAML">
<meta n... | HTML | docs/api/OpenTl.Schema.Updates/IChannelDifference/index.html | OpenTl/OpenTl.Schema | mit | 14,005 | 333 | codeparrot/github-code |
6dd06c4e8bff74163c7a7f06789160331bee1863e7a0bd208329b83ea8e7d7f3 | /*
* Copyright (c) 2013-2014 Kajetan Swierk <k0zmo@outlook.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, ... | C | Logic/NodeType.h | k0zmo/mouve | mit | 15,316 | 546 | codeparrot/github-code |
c9d5a25dc2a83b34475e571eb717ad4c906fda42e3a8948b40ef032814c9a991 | package br.com.caelum.rest.server;
import javax.servlet.http.HttpServletRequest;
public class SimpleAction implements Action {
public String getUri() {
return uri;
}
public String getRel() {
return rel;
}
private final String uri;
private final String rel;
public SimpleAction(String rel, String uri) {
... | Java | rest-server-gae/src/br/com/caelum/rest/server/SimpleAction.java | caelum/rest-client | mit | 638 | 31 | codeparrot/github-code |
cb6f028e131220eec2ff64d5ee7496642b0bb1b5e40fc091dddf7b2f91a0c803 | package com.ms.meizinewsapplication.features.meizi.model;
import android.content.Context;
import com.ms.meizinewsapplication.features.base.pojo.ImgItem;
import com.ms.retrofitlibrary.web.MyOkHttpClient;
import org.loader.model.OnModelListener;
import java.util.List;
import rx.Observable;
import rx.Subscription;
/... | Java | app/src/main/java/com/ms/meizinewsapplication/features/meizi/model/DbGroupBreastModel.java | qq137712630/MeiZiNews | mit | 1,000 | 38 | codeparrot/github-code |
0f9b3a33355233b29d234afbfd8021e8e4a3689ef5486e86184442e1b8edb8c9 | {# ------------------------------------------------------- #}
{# INDIVIDUAL VIEW FOR EACH storycontributor #}
{# This page can use any data from http:localhost:2000/cms/#/form/storycontributor/ #}
{# Webhook uses the SWIG.js (like Djagno/Twig) templating system. Their documentation is here: #}
{# http://paularmstrong.g... | HTML | templates/storycontributor/individual.html | ericwebster/project-crayfish | mit | 4,116 | 107 | codeparrot/github-code |
5a6725cf70139eb376c7047409ccd7ddf7bd550e0ad535819fc68ef51d7b6736 | import ast
import heisenberg.library.heisenberg_dynamics_context
import heisenberg.library.orbit_plot
import heisenberg.option_parser
import heisenberg.plot
import heisenberg.util
import matplotlib
import numpy as np
import sys
# https://github.com/matplotlib/matplotlib/issues/5907 says this should fix "Exceeded cell ... | Python | heisenberg/plot/__main__.py | vdods/heisenberg | mit | 4,283 | 101 | codeparrot/github-code |
c8f055c4c88167f472a34b3970832509428297cf646ba4f31625c31bdc86f97c | // Copyright (c) 2009 Satoshi Nakamoto
// Distributed under the MIT/X11 software license, see the accompanying
// file license.txt or http://www.opensource.org/licenses/mit-license.php.
//
// Why base-58 instead of standard base-64 encoding?
// - Don't want 0OIl characters that look the same in some fonts and
// ... | C | base58.h | originalbitcoin/original-bitcoin-client-0.1.0 | mit | 5,438 | 202 | codeparrot/github-code |
fdc3cf376c7295f49148a9f7760f0abee6e02f6750406ebb03136010f0d903d7 | """Main entry points for scripts."""
from __future__ import print_function, division
from argparse import ArgumentParser
from collections import OrderedDict
from copy import copy
from datetime import datetime
import glob
import json
import logging
import math
import os
import scipy.stats
import numpy as np
from .ve... | Python | cubefit/main.py | snfactory/cubefit | mit | 26,267 | 624 | codeparrot/github-code |
6f7f5b5c147ffad27538f8db9c28edd03e0153755dc1c6f212e3097b65250d62 | using System;
namespace sep20v1.Areas.HelpPage
{
/// <summary>
/// This represents a preformatted text sample on the help page. There's a display template named TextSample associated with this class.
/// </summary>
public class TextSample
{
public TextSample(string text)
{
... | C# | Week_03/sep20v1/sep20v1/Areas/HelpPage/SampleGeneration/TextSample.cs | peteratseneca/dps907fall2013 | mit | 883 | 37 | codeparrot/github-code |
3b66de6813296d1b3a78d6736c8e3f72772562d1f51813b499f333844b845d76 | package com.syncano.android.lib.modules.users;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
import com.syncano.android.lib.modules.Params;
import com.syncano.android.lib.modules.Response;
/**
* Params to create new user.
*/
public class ParamsUserNew extends Params {... | Java | Eclipse/SyncanoLib/src/com/syncano/android/lib/modules/users/ParamsUserNew.java | Syncano/syncano-android-demo | mit | 1,864 | 110 | codeparrot/github-code |
c75f107fed72f0080ca893501d3617f5b90d3283acba2efe8ca13b156f5771a4 |
<!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>[POJ] 1276. Cash Machine — amoshyc'... | HTML | docs/poj/p1276.html | amoshyc/CPsolution | mit | 21,349 | 430 | codeparrot/github-code |
fc2bc2fa3a702eb58588fd54a2150fbac92d0e91611370a435324dbf56f92b13 | #include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <sys/wait.h>
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <signal.h>
#include <errno.h>
#include <sys/stat.h>
#include <sys/mman.h>
#include <fcntl.h>
#include "server.h"
#include "rio.h"
int wri... | C | OS/WebServer/server.c | cheniison/Experiment | mit | 4,296 | 210 | codeparrot/github-code |
319dd7dd6eba0c32652db8029ffee7726b98c8c91993c8125968bda693067165 | # -*- coding: utf-8 -*-
def calc_note(count, value):
qnt = 0
if count >= value:
qnt = int(count) / value
print '%d nota(s) de R$ %d.00' % (qnt, value)
return count - qnt * value
n = float(raw_input())
print 'NOTAS:'
n = calc_note(n, 100)
n = calc_note(n, 50)
n = calc_note(n, 20)
n = calc_no... | Python | URI/1-Beginner/1021.py | vicenteneto/online-judge-solutions | mit | 907 | 43 | codeparrot/github-code |
517b86e5cc92bef329d92e7bb6cb21ed359d111cdc98221d97a2e91b6d04f432 | 'use strict';
module.exports = function (grunt) {
var exec = require('child_process').exec;
grunt.registerMultiTask('install-dependencies', 'Installs npm dependencies.', function () {
var cb, options, cp;
cb = this.async();
options = this.options({
cwd: '',
stdout: true,
stderr: tru... | JavaScript | tasks/install-dependencies.js | justhamade/grunt-install-dependencies | mit | 949 | 38 | codeparrot/github-code |
31d6a1396701b1783b89cb459fc31c4f3540d36ba88f1b7d1b7885648cc847cc | // Copyright slx7R4GDZM
// Distributed under the terms of the MIT License.
// Refer to the License.txt file for details.
#pragma once
#include "Common-Things.h"
const string BRIGHTNESS_OPTIONS[] =
{
"BRIGHTNESS 15",
"BRIGHTNESS 12",
"BRIGHTNESS 7",
"BRIGHTNESS 0"
};
const string GLOBAL_SCALE_OPTIONS... | C | Source/Other/Text.h | slx7R4GDZM/Sine-Toolkit | mit | 4,630 | 195 | codeparrot/github-code |
c90055689070c97daf34d4df3ab59d3f04611aca9348abf0578393c9b22da7c3 | <?php
/*
Safe sample
input : get the field userData from the variable $_GET via an object, which store it in a array
SANITIZE : use of preg_replace
construction : use of sprintf via a %s with simple quote
*/
/*Copyright 2015 Bertrand STIVALET
Permission is hereby granted, without written agreement or royalty fee,... | PHP | Injection/CWE_95/safe/CWE_95__object-indexArray__func_preg_replace__echo-sprintf_%s_simple_quote.php | stivalet/PHP-Vulnerability-test-suite | mit | 1,579 | 68 | codeparrot/github-code |
5f2c3d9364cb6bfa173570038588e04906010ba033a4aed2ddefdde72822ff47 | ---
layout: post
title: How the Go team could track what to include in release notes
date: 2021-03-13
author: Paschalis Ts
tags: [golang, foss]
mathjax: false
description: ""
---
Release notes can sometimes be exciting to read.
Condensing the work since the last release into a couple of paragraphs, announcing n... | Markdown | _posts/2021-03-13-relnote-yes.markdown | tpaschalis/tpaschalis.github.io | mit | 6,144 | 127 | codeparrot/github-code |
5f5c4a56fee62598db638031431e5c083c011c20591daa1f9f3bd3dc3e477849 | /*******************************************************************************
* The MIT License (MIT)
*
* Copyright (c) 2015 - 2019 Dr. Marc Mültin (V2G Clarity)
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Sof... | Java | RISE-V2G-EVCC/src/main/java/com/v2gclarity/risev2g/evcc/states/WaitForAuthorizationRes.java | V2GClarity/RISE-V2G | mit | 4,962 | 99 | codeparrot/github-code |
3ba69f898ca39e288e108aff6bf3bea9c6a88a7cb79157ac30ebd4db8f1e676b | <?php
if (isset($user_data['id'])) {
?>
<script>
var $records_per_page = '<?php echo $this->security->get_csrf_hash(); ?>';
var page_url = '<?php echo base_url(); ?>';
var $user_data ="<?php echo $user_data['id']?>";
</script>
<script s... | PHP | application/views/includes/navbar.php | akashbachhania/jeet99 | mit | 45,297 | 742 | codeparrot/github-code |
141b4a990507238b6cb9ee680b7314538a9e0339c3b6678367f739146162b1c9 | // Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2012 The Bitcoin developers
// Copyright (c) 2013 The NovaCoin 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 "miner.h"... | C++ | src/miner.cpp | eddietributecoin/EddieCoin | mit | 19,965 | 583 | codeparrot/github-code |
8f1cea14fab5cf4eb94e511423e6b311065900f05529f54d929ab717a176a59d | require 'ims/lti'
class GuideController < ApplicationController
def home
end
def xml_builder
@placements = CanvasExtensions::PLACEMENTS
end
def xml_config
tc = IMS::LTI::Services::ToolConfig.new(:title => "Example Tool Provider", :launch_url => blti_launch_url)
tc.description = "This is a Sample... | Ruby | app/controllers/guide_controller.rb | instructure/lti_tool_provider_example | mit | 2,081 | 49 | codeparrot/github-code |
508e854d9a47fe90f7a6fea95839dd16531139713e5528ab9f4c4293f85e3775 | ---
layout: post
title: "ASP.NET Core基本原理(7)-日志"
subtitle: "ASP.NET Core Fundamentals-Logging"
tags: [netcore, fundamentals, logging]
---
ASP.NET Core内置了对日志的支持。通过依赖注入请求`ILoggerFactory`或者`ILogger<T>`可以为应用程序添加日志功能。
## 在应用程序中实现日志
如果请求了`ILoggerFactory`,那么日志记录器(Logger)就必须通过它的`CreateLogger`方法来创建:
```csharp
var... | Markdown | _posts/2016-12-07-fundamentals-7-logging.markdown | charliethinker/charliethinker.github.io | mit | 3,934 | 131 | codeparrot/github-code |
1424f6513ac77ac99ad9478725d065213b3b299ce5517ae2fe501967d9cef58a | using System;
using System.Threading.Tasks;
using Anotar.NLog;
using CroquetAustralia.Domain.Services.Serializers;
using Microsoft.WindowsAzure.Storage;
using Microsoft.WindowsAzure.Storage.Queue;
namespace CroquetAustralia.Domain.Services.Queues
{
public abstract class QueueBase : IQueueBase
{
privat... | C# | source/CroquetAustralia.Domain/Services/Queues/QueueBase.cs | croquet-australia/api.croquet-australia.com.au | mit | 1,776 | 51 | codeparrot/github-code |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.