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 |
|---|---|---|---|---|---|---|---|---|
10090ea343e143f7a68eccefdfccff38653ca939f239ef67a7b834651a8faace | <!-- Navigation -->
<nav class="navbar navbar-default navbar-custom navbar-fixed-top">
<div class="container-fluid">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header page-scroll">
<button type="button" class="navbar-toggle" data-toggle="collapse" ... | HTML | _includes/nav.html | ComplexRefined/blog | mit | 1,483 | 34 | codeparrot/github-code |
410a8ab876f4879a12a42be19f0cabf69129d220a215014ceab4693483fe4021 | import { Box, Col } from '@tlon/indigo-react';
import { arrToString, Association, FlatGraph, FlatGraphNode, Group } from '@urbit/api';
import bigInt from 'big-integer';
import React from 'react';
import { RouteComponentProps, useHistory } from 'react-router';
import { resourceFromPath } from '~/logic/lib/group';
import... | TypeScript | pkg/interface/src/views/landscape/components/Home/Post/PostFlatFeed.tsx | urbit/urbit | mit | 5,543 | 225 | codeparrot/github-code |
b296098f7358efd06026ad27c60e5c08c7eaf4f888a60892f2aa82246bd0b760 | int myAtoi(char* str) {
while(1){
if(NULL == str){
return 0;
}
char v = *str;
if(v == ' ' || v == '\t' || v == '\n' || v == '\r'){
str++;
}else{
break;
}
}
int positive = 1;
char* start=NULL;
if((*str) == '... | C | Leetcode/N008atoi.c | nolink/algorithm | mit | 1,406 | 75 | codeparrot/github-code |
cf951018d8c353afb2a404b804ddeb49be1171de0a0d559f88f105c8a6bae406 | # This handy simplification is adapted from SphinxSearch (thanks)
# and originally came from Ultrasphinx
# it saves us a lot of including and bodging to make will_paginate's template calls work in the Page model
module Radiant
module Pagination
class LinkRenderer < WillPaginate::LinkRenderer
def initialize... | Ruby | lib/radiant/pagination/link_renderer.rb | joshfrench/radiant | mit | 1,236 | 31 | codeparrot/github-code |
7595b13edf7969f8fc8094618af5775533fd38c60cfefe35e960781d1fe45cd4 | using System;
using System.Collections;
using System.Collections.Generic;
using System.Xml;
using System.Reflection;
using System.Windows.Forms;
using Microsoft.Win32;
using System.Runtime.InteropServices;
using NetOffice;
using Office = NetOffice.OfficeApi;
using Excel = NetOffice.AccessApi;
using NetOffice.AccessAp... | C# | Examples/Access/C#/IExtensibility COMAddin Examples/TaskPane/SampleControl.cs | NetOfficeFw/NetOffice | mit | 5,274 | 157 | codeparrot/github-code |
562c0eb24814245e3455e7dec3e642e14240eaa65f727c7830d8d5c5c1e6acdc | package PathFinder_2;
import java.awt.Dimension;
import java.awt.Frame;
import java.awt.Toolkit;
import javax.swing.JFrame;
public class Main extends JFrame{
private static final long serialVersionUID = 1L;
private final String TITLE = "ArenaGame";
private MouseEvents mouseEvent = new MouseEvents();
... | Java | PathFinder/src/PathFinder_2/Main.java | G43riko/Java | mit | 1,742 | 68 | codeparrot/github-code |
e7e229528509b4d9c9baf0f072fac7e7bccef7b23d7d550b44e0de9fd0b60e77 | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System.Diagnostics;
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Sprites;
us... | C# | osu.Game/Overlays/Profile/Sections/Historical/DrawableMostPlayedBeatmap.cs | peppy/osu-new | mit | 8,259 | 202 | codeparrot/github-code |
86367537e8c0eae0d5ab3d023f5b532276c986033a1f30e73b238ffc95198541 | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>CNN From the Ground Up, Liang2</title>
<meta name="viewport" content="width=792, user-scalable=no">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<!-- Icon -->
<link href="pics/favicon.png" rel="icon" type="image/x-icon" />
<!--... | HTML | slides/index.html | ccwang002/2015Talk-DeepLearn-CNN | mit | 34,098 | 847 | codeparrot/github-code |
2ca448b1aa3286eb4ab8800b7e0e9fa856fee765abf01f5466239471cb6549d5 | // Copyright 2017 Axel Etcheverry. All rights reserved.
// Use of this source code is governed by a MIT
// license that can be found in the LICENSE file.
package request
import (
"encoding/json"
"fmt"
"io"
"io/ioutil"
"os"
"path/filepath"
"reflect"
"strings"
"github.com/go-openapi/spec"
"github.com/go-open... | GO | request/validator.go | euskadi31/go-server | mit | 3,851 | 173 | codeparrot/github-code |
e3d3fcb643d95515a4f7f873cecffb26c9f73631773aaf9a5dce94f205005e77 | package com.dumu.housego.presenter;
import com.dumu.housego.entity.UserInfo;
import com.dumu.housego.model.ILoginUserInfoModel;
import com.dumu.housego.model.IModel.AsycnCallBack;
import com.dumu.housego.model.LoginUserInfoModel;
import com.dumu.housego.view.ILoginUserInfoView;
public class LoginUserInfoPresenter imp... | Java | houseAd/HouseGo/src/com/dumu/housego/presenter/LoginUserInfoPresenter.java | rentianhua/tsf_android | mit | 902 | 39 | codeparrot/github-code |
263130f6d08d3f7cfe05a946ff0f59a2657fa4d3bc0f430588aeffd6349145ef | /*
* Copyright (c) 2008-2018 SLIBIO <https://github.com/SLIBIO>
*
* 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
* ... | C | include/slib/ui/menu.h | SLIBIO/SLib | mit | 5,043 | 189 | codeparrot/github-code |
7cb8d5cec30789e92c38068acdce03de4ec7606625ed43293aebe9c9612b0991 | <?php
namespace MPM\Bundle\AdminBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Security\Core\User\AdvancedUserInterface;
/**
* Persona
*
* @ORM\Table(name="personas")
* @ORM\Entity(repositoryClass="MPM\Bundle\AdminBundle\Entity\PersonaRepository")
* @ORM\InheritanceType("JOINED")
* @ORM\... | PHP | src/MPM/Bundle/AdminBundle/Entity/Persona.php | matias-pierobon/tonga | mit | 12,030 | 703 | codeparrot/github-code |
dc132580a820f1c1f42b3eb1c6206d99a564f00accf1980e30a08d6da26924b1 | /**
* LICENSE : MIT
*/
"use strict";
(function (mod) {
if (typeof exports == "object" && typeof module == "object") {
mod(require("codemirror"));
}
else if (typeof define == "function" && define.amd) {
define(["codemirror"], mod);
}
else {
mod(CodeMirror);
}
})(function... | JavaScript | typewriter-scrolling.js | azu/codemirror-typewriter-scrolling | mit | 1,466 | 48 | codeparrot/github-code |
146b9dd99c8a2b63e3880b75b5e4f5b75263bafb1648e07b4f28359405f46dee | /***************************************************************************************
* This header file is an implementation for search_anagram
* Author: huhao
* Date: 2017.07.22
* Modification record:
*
***************************************************************************************/
#include <string... | C | column002_aha_algorithm/search_anagram/search_anagram.c | huhumt/programming_pearls_practice | mit | 5,513 | 159 | codeparrot/github-code |
748d2e3955b3a2a86b95626c00f72377efe1dddf6fd5d1b298f510b8a24cf91f | #!/bin/sh
set -e
mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt
> "$RESOURCES_TO_COPY"
XCASSET_FILES=()
case "${TARGETED_DEVICE_FAMILY}" in
1,2)
TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone"
;;
1)
... | Shell | TangramCategoryDemo/Pods/Target Support Files/Pods-TangramCategoryDemo/Pods-TangramCategoryDemo-resources.sh | PlacidoLv/BDLTangram | mit | 5,664 | 113 | codeparrot/github-code |
36c462d7df7a7cb3b15ea8a66e8ead05204b2c4a7c754af98289b9db892d600f | namespace P10TraverseDirectoryWithXDocElAttr
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Xml.Linq;
using System.Text;
using System.Threading.Tasks;
class P10TraverseDirectoryWithXDocElAttr
{
static void Main()
{
string d... | C# | Module II Homeworks/Data Bases/XML Parsing/P10TraverseDirectoryWithXDocElAttr/P10TraverseDirectoryWithXDocElAttr.cs | dechoD/Telerik-Homeworks | mit | 1,350 | 43 | codeparrot/github-code |
1eaf6865eafa339b16a6d9ea88329a508879ff197f56792ec95a5a3bddd02304 | using UnityEngine;
using System.Collections;
using UnityEditor;
using BMAPI.v1;
public class OpenFileDialog : MonoBehaviour {
private BMAPI.v1.Beatmap m_beatmap;
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
}
public void SelectFile()
{... | C# | Audio Based Procedural Mesh/Assets/Scripts/OpenFileDialog.cs | jump4r/ProceduralGenerationFinal | mit | 764 | 33 | codeparrot/github-code |
db0fd4eda186c620f0f615a9f8219616c35ea2296f65e9678251f0a89353f44f | # Makefile for Sphinx documentation
#
# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = sphinx-build
PAPER =
BUILDDIR = build
# User-friendly check for sphinx-build
ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1)
$(error The '$(SPHINXBUILD)' command wa... | Makefile | doc/Makefile | tshlabs/tunic | mit | 6,767 | 178 | codeparrot/github-code |
72944c7d2bc3f7f0ba4a92c47fc71f156671fd997765694ebdf223ab4ee0e00d | /**
* @name Evemit
* @description Minimal and fast JavaScript event emitter for Node.js and front-end.
* @author Nicolas Tallefourtane <dev@nicolab.net>
* @link https://github.com/Nicolab/evemit
* @license MIT https://github.com/Nicolab/evemit/blob/master/LICENSE
*/
;(function() {
'use strict';
/**
* Eve... | JavaScript | evemit.js | Nicolab/evemit | mit | 4,182 | 186 | codeparrot/github-code |
ed034994d2783b902d9e9caef86235061699076e4506123d728958a530ad9c02 | package org.simpleflatmapper.poi.impl;
import org.apache.poi.ss.usermodel.Row;
import org.apache.poi.ss.usermodel.Sheet;
import org.simpleflatmapper.map.ConsumerErrorHandler;
import org.simpleflatmapper.map.ContextualSourceFieldMapper;
import org.simpleflatmapper.map.SourceFieldMapper;
import org.simpleflatmapper.map... | Java | sfm-poi/src/main/java/org/simpleflatmapper/poi/impl/JoinSheetMapper.java | arnaudroger/SimpleFlatMapper | mit | 3,746 | 115 | codeparrot/github-code |
4824295375b171f9d8a931e92e6b67b20aab8818bd2e2bc4872db846a34967e1 | #!/usr/bin/env python3
"""Download GTFS file and generate JSON file.
Author: Panu Ranta, panu.ranta@iki.fi, https://14142.net/kartalla/about.html
"""
import argparse
import datetime
import hashlib
import json
import logging
import os
import resource
import shutil
import sys
import tempfile
import time
import zipfile... | Python | gtfs2json/generate.py | panur/kartalla | mit | 6,008 | 176 | codeparrot/github-code |
1a0a41ba5142c3df1d5a30cf69e5a7d7f7814e08b3a562bcb2867c49d0aee155 | #! /usr/bin/env python
# -*- coding: utf-8 -*-
"""Student CNN encoder for XE training."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import numpy as np
import tensorflow as tf
from models.encoders.core.cnn_util import conv_layer, max_pool, batch_norm... | Python | models/encoders/core/student_cnn_xe.py | hirofumi0810/tensorflow_end2end_speech_recognition | mit | 4,729 | 131 | codeparrot/github-code |
417f0d5811bfb4b53e98f7515d5f4615f9004c1a0cd57b30e9f27d71c05c4aa2 | package com.lqtemple.android.lqbookreader.model;
import java.io.Serializable;
/**音乐信息
* Created by chenling on 2016/3/15.
*/
public class MusicMedia implements Serializable{
private int id;
private String title;
private String artist;
private String url;
private String time;
private String ... | Java | app/src/main/java/com/lqtemple/android/lqbookreader/model/MusicMedia.java | ceji-longquan/ceji_android | mit | 2,748 | 127 | codeparrot/github-code |
1e483220a66bb4d5ce3f756825c3fd7d214e1644ca9de8327d4f8b70c0a786ca | (function() {
//###########################################################################################################
var CND, Multimix, alert, badge, debug, dec, decG, echo, help, hex, hexG, info, isa, log, name, nameO, nameOG, rpr, type_of, types, urge, validate, warn, whisper;
CND = require('cnd');
r... | JavaScript | lib/main.js | loveencounterflow/ncr | mit | 25,630 | 636 | codeparrot/github-code |
d7129bcaff8c8d9b0ef1a0cd135c6d214ab72e59bbf1d98f016edcdad8d82a49 | /**
* Checks if a given DOM property of an element has the expected value. For all the available DOM element properties, consult the [Element doc at MDN](https://developer.mozilla.org/en-US/docs/Web/API/element).
*
* @example
* this.demoTest = function (browser) {
* browser.expect.element('body').to.have.propert... | JavaScript | lib/api/expect/assertions/element/property.js | beatfactor/nightwatch | mit | 2,710 | 91 | codeparrot/github-code |
ddc8e68828a5aca7e20f1d0f1a5477cd93f86b74730c9751370b75efa5f6fb48 | import javax.naming.directory.DirContext;
import org.owasp.esapi.Encoder;
import org.owasp.esapi.reference.DefaultEncoder;
public void ldapQueryBad(HttpServletRequest request, DirContext ctx) throws NamingException {
String organizationName = request.getParameter("organization_name");
String username = request.get... | Java | java/ql/src/Security/CWE/CWE-090/LdapInjectionJndi.java | github/codeql | mit | 1,337 | 34 | codeparrot/github-code |
91d2b585d10bc48bfe6414f01ec8513c9237a475050e29ad17729f944893ef43 | package sample;
import javafx.fxml.FXML;
import javafx.fxml.Initializable;
import javafx.scene.control.TextArea;
import javafx.scene.paint.Color;
import javafx.scene.text.Text;
import javafx.scene.text.TextFlow;
import java.net.URL;
import java.util.ArrayList;
import java.util.List;
import java.util.ResourceBundle;
... | Java | src/sample/Controller.java | Jacob-Gray/Ario | mit | 1,145 | 53 | codeparrot/github-code |
ccda0498c296e170bdb4b16dd9d0e0d56655c210d8207e044c52f9fa7adf915e | namespace BookShop
{
using BookShop.Data;
using BookShop.Models;
using BookShop.Initializer;
using System.Linq;
using System;
using System.Collections.Generic;
using System.Text;
public class StartUp
{
static void Main()
{
var input = Console.ReadLine();... | C# | DB_Advanced_Entity_Framework/Advanced Querying/Book Titles by Category StartUp/StartUp.cs | DimitarIvanov8/software-university | mit | 1,128 | 41 | codeparrot/github-code |
ce0e3ca3ce04aa186b2e745761ea5ed3b8b41b18008e10875afd4f8f2b3dbd90 | const rangeParser = require(`parse-numeric-range`)
module.exports = language => {
if (!language) {
return ``
}
if (language.split(`{`).length > 1) {
let [splitLanguage, ...options] = language.split(`{`)
let highlightLines = [],
numberLines = false,
numberLinesStartAt
// Options can be... | JavaScript | packages/gatsby-remark-prismjs/src/parse-line-number-range.js | mingaldrichgan/gatsby | mit | 1,302 | 45 | codeparrot/github-code |
1e77fb25fa570b520564913f38b40e55a50055c31b3faac677b438960542dd4d | /**
* @file CompilerVersion.h
* @ingroup Utils
* @brief Get the version of the C++ compiler used.
*
* Copyright (c) 2017 Sebastien Rombauts (sebastien.rombauts@gmail.com)
*/
#pragma once
#include <string>
namespace Utils {
/**
* @brief Get the version of the C++ compiler used.
* @ingroup Utils
*
* W... | C | src/Utils/CompilerVersion.h | SRombauts/cpp-skeleton | mit | 3,155 | 99 | codeparrot/github-code |
c3ebebd2ad6176b0497858a64bcdadd8832917c8dc7688371bf0ffbcae1576b9 | <html>
<head>
<title>Learning WebGL — lesson 2</title>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
<script type="text/javascript" src="glMatrix-0.9.5.min.js"></script>
<script type="text/javascript" src="webgl-utils.js"></script>
<script type="text/javascript" src="./shape.js"></sc... | HTML | lesson03/mine.html | brownzach125/WebGL | mit | 5,680 | 204 | codeparrot/github-code |
b7d378aaa4c59fcec50efec5c003e15c7db09929943848204cc577edfb10a445 | ///////////////////////////////////////////////////////////////////////////////
// This source file is part of Hect.
//
// Copyright (c) 2016 Colin Hill
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to
// deal ... | C++ | Engine/Source/Hect/Scene/Scenes/DefaultScene.cpp | colinhect/hect | mit | 4,169 | 138 | codeparrot/github-code |
e6c85b02a8d9280484103f24919892d48f36a1a1a1561844e19feae081f15a6d | package com.glazebrook.tictactoe.responses;
import com.fasterxml.jackson.annotation.JsonProperty;
import javax.validation.constraints.NotNull;
import java.util.UUID;
public class JoinGameResponse {
@JsonProperty
@NotNull
private UUID gameId;
@JsonProperty
@NotNull
private UUID playerId;
... | Java | api/src/main/java/com/glazebrook/tictactoe/responses/JoinGameResponse.java | JoshGlazebrook/tictactoe-glazebrook | mit | 1,004 | 56 | codeparrot/github-code |
3d34b81cbb67c34d3b3b2ffaa47948a93a0a3baa85d798919de1e707b235abf3 | package com.wavesplatform.transaction.assets.exchange
import com.google.common.primitives.Bytes
import com.wavesplatform.common.state.ByteStr
import com.wavesplatform.serialization.Deser
import com.wavesplatform.transaction.Asset.{IssuedAsset, Waves}
import com.wavesplatform.transaction._
import com.wavesplatform.tran... | Scala | node/src/main/scala/com/wavesplatform/transaction/assets/exchange/AssetPair.scala | wavesplatform/Waves | mit | 2,574 | 71 | codeparrot/github-code |
e60a5d45acaeee868396c7acf4e7cc2a9f9ca01f190213e44a2b02ecfc394715 | <!doctype html>
<html class="default no-js">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>GroupV2 | The Traveler</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="../assets/cs... | HTML | docs/interfaces/groupv2.html | alexanderwe/the-traveler | mit | 35,694 | 572 | codeparrot/github-code |
6e41d38a0b8bb627fa7997ab6eb2f0cebfb7461fab8e1958d6393c919f7c6c49 | // Copyright 2016 Jonathan Buchanan.
// This file is part of Sunglasses, which is licensed under the MIT License.
// See LICENSE.md for details.
#ifndef TEXTURERESOURCE_H
#define TEXTURERESOURCE_H
#include <sunglasses/Extern/Resource.h>
#include <string>
#include <GL/glew.h>
namespace sunglasses {
class TextureRes... | C | sunglasses/include/sunglasses/Graphics/Loaders/TextureResource.h | jonathanbuchanan/Sunglasses | mit | 868 | 40 | codeparrot/github-code |
8b5ad0009b90aae19272b5b9bbe603bab553cd6ac90c19994165b97d475df522 | /**
* (c) raptor_MVK, 2015. All rights reserved.
*/
package ru.mvk.biblioGuide.service;
import org.jetbrains.annotations.NotNull;
import ru.mvk.biblioGuide.dao.BookCaseDao;
import ru.mvk.biblioGuide.model.BookCase;
import ru.mvk.iluvatar.descriptor.ListViewInfo;
import ru.mvk.iluvatar.descriptor.ListViewInfoImpl;
im... | Java | src/ru/mvk/biblioGuide/service/BookCaseViewService.java | raptor-mvk/BiblioGuide-Java | mit | 1,871 | 46 | codeparrot/github-code |
730388ac1bf90c47aca4a61cd59bbb6404ff0a10e6f553e5538518f9dc76afa9 | package com.github.ssindelar.ps2parser;
import static org.fest.assertions.api.Assertions.assertThat;
import org.testng.annotations.Test;
import com.github.ssindelar.ps2parser.data.world.WorldResponse;
import com.github.ssindelar.ps2parser.data.world.status.ApiWorldStatus;
import com.github.ssindelar.ps2parser.data.w... | Java | src/test/java/com/github/ssindelar/ps2parser/WorldDaoTest.java | ssindelar/ps2-parser | mit | 1,256 | 35 | codeparrot/github-code |
6d1b023a431c4a935d2a5a999518550e9fe515f78a7ffb5e32a9ffa316fdac6e | let widget = document.getElementsByClassName('markdownx-widget')[0];
let element = document.getElementsByClassName('markdownx');
let element_divs = element[0].getElementsByTagName('div');
let div_editor = element_divs[0];
let div_preview = element_divs[1];
let navbar_bar = document.getElementsByClassName('markdownx-to... | JavaScript | typeidea/typeidea/themes/default/static/js/markdownx-widget.js | BaskerShu/typeidea | mit | 1,947 | 61 | codeparrot/github-code |
4d46e61aed6ce5f45219e6ba0161d7762694a5672442885ecdfc5ee6f40286fc | module.exports = {};
var app_data = {};
function initCharts()
{
$(document).ready(function() {
$.get(app_data.config.analytics_data_route, function(analytics_data) {
data = analytics_data.data;
max_val = analytics_data.highest_value;
var parseDate = d3.time.format('%Y%m%d').parse;
data.... | JavaScript | src/assets/admin_assets/js/app/src/modules/dashboard.js | neonbug/meexo-common | mit | 5,037 | 186 | codeparrot/github-code |
de5986207995ddb9309f6612ccd2065850c4888cb9ad7c35219dcd28c50925b8 | <!doctype html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang=""> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8" lang=""> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9" lang=""> <![endif]-->
<!--[if gt IE 8]><!-->
<html class="no-js" lang="">
<!--<![en... | PHP | template.php | Corjo/Website-of-M.-Roller | mit | 6,126 | 99 | codeparrot/github-code |
b2e795d8ef57e534462c4dbf2e2f4ac1cb3bba7c38cf09ff5926ea9cf46591a1 | # encoding: utf-8
class Money
# Represents a specific currency unit.
class Currency
include Comparable
# Thrown when an unknown currency is requested.
class UnknownCurrency < StandardError; end
# List of known currencies.
#
# == monetary unit
# The standard unit of value of a currenc... | Ruby | lib/money/currency.rb | pixeltrix/money | mit | 54,910 | 423 | codeparrot/github-code |
53d9634d5ed16e444fbcf73c2caf61fd8a0fc7e11f35b830437b81b4ae63b77e | //
// Created by Yorick on 18/10/2016.
//
#include "Room.h"
#include "../Rng.h"
using namespace std;
Room::Room(Coordinate coordinate, RoomType roomType, int securityLevel) {
_coordinate = coordinate;
_securityLevel = securityLevel;
_type = roomType;
_visited = false;
if (coordinate.x == 0 && co... | C++ | dungeon/Room.cpp | Yorick666/The-Elder-Codes | mit | 3,313 | 124 | codeparrot/github-code |
23c11768f62a216f8d1885fd5b20afef6d07006d98266c029ba7324541f4f87a | const webpack = require('atool-build/lib/webpack');
module.exports = function (webpackConfig, env) {
webpackConfig.babel.plugins.push('transform-runtime');
webpackConfig.babel.plugins.push(['import', {
libraryName: 'antd',
style: 'css' // if true, use less
}]);
// Support hmr
if (env === 'developmen... | JavaScript | webpack.config.js | aiguanglee/dva-cnode | mit | 1,457 | 45 | codeparrot/github-code |
59a60aa092ea8fbd9d63c5d1aae3149dd847011fa41828a6b41f2f5ca8035684 | <?php
defined('BASEPATH') OR exit('No direct script access allowed');
/**
* Class Index
*/
class Pemasukan extends CI_Controller
{
function __construct()
{
parent::__construct();
$this->load->model('model_kelas');
$this->load->model('model_siswa');
$this->load->model('model_pemasukan');
$thi... | PHP | application/controllers/Pemasukan.php | sendz/aplikasi-keuangan | mit | 1,823 | 60 | codeparrot/github-code |
6731b9097291397f95e7fc981a8c1e4e42172267c1b58437b0523487a0bff8f1 | /**
*
*/
package org.necros.settings;
/**
* @author weiht
*
*/
public class CascadingServiceInjector<T> {
private Integer zIndex = 0;
private T service;
private CascadingService<T> cascadingService;
public void doInject() {
if (cascadingService != null && service != null) {
cascadingSe... | Java | nrt-core-config/src/main/java/org/necros/settings/CascadingServiceInjector.java | weiht/nrt.core | mit | 644 | 33 | codeparrot/github-code |
e3d220bbfdfa6e3fcd5880b44a6b72c138af10a0ab3c3e584b12ae2ff389b490 | #pragma once
#include "vec3.h"
namespace solar {
class mat33 {
public:
static const int FORWARD_ROW_INDEX;
static const int UP_ROW_INDEX;
static const int CROSS_ROW_INDEX;
private:
#pragma warning(push)
#pragma warning(disable:4201) //warning C4201: nonstandard extension used: nameless struct/union
u... | C | src/solar/math/mat33.h | jseward/solar | mit | 1,934 | 81 | codeparrot/github-code |
35d52aa61f7761a7e5a7d4908b39284dac1fe9fd93da8ca42e98bb4936a0e837 | package com.lesgrosspoof.bemydiary.network;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import org.json.JSONException;
import org.json.JSONObject;
import android.app.Notification;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.content.Intent;... | Java | src/com/lesgrosspoof/bemydiary/network/MediaUploader.java | Pamplemousse/bemydiary | mit | 4,259 | 183 | codeparrot/github-code |
4a35a9442e5c8437d3413e3d3428580dc3337942401e7db2ad7a5d18a97793d9 | //! \file ImageRCT.cs
//! \date Fri Aug 01 11:36:31 2014
//! \brief RCT image format implementation.
//
// Copyright (C) 2014-2017 by morkt
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to
// d... | C# | ArcFormats/Majiro/ImageRCT.cs | morkt/GARbro | mit | 25,065 | 687 | codeparrot/github-code |
71176fb869362b5c3ffd5fa383b8f24ac7ed22d9f0ac9756447dde99e640f854 | package seedu.todo.ui;
import javafx.application.Platform;
import javafx.scene.control.Alert;
import javafx.scene.control.Alert.AlertType;
import javafx.stage.Stage;
import seedu.todo.commons.util.StringUtil;
import seedu.todo.commons.core.ComponentManager;
import seedu.todo.commons.core.Config;
import seedu.todo.comm... | Java | src/main/java/seedu/todo/ui/UiManager.java | CS2103AUG2016-F11-C1/main | mit | 5,299 | 174 | codeparrot/github-code |
730150c912dded7a50b03073cc1e6207123e4213cdb9cea0ba4d7bca63728d0c | # (c) Roman Neuhauser
# MIT-Licensed
class HashStruct
def initialize hash = {}
@impl = Hash[hash]
end
def [] key
@impl[key]
end
def []= key, val
@impl[key] = val
end
def merge! other
other.each_pair do |key, val|
self[key] = val
end
end
def merge other
rv = self.clo... | Ruby | lib/hashstruct.rb | roman-neuhauser/hashstruct | mit | 1,071 | 70 | codeparrot/github-code |
ca567abebdc047edfc8ce9e6e8fc02de7dbd892b001256701d8a234b25c71919 | // --------------------------------------------------------------------------------------------------------------------
//
// cloudfront-config.js - config for AWS CloudFront
//
// Copyright (c) 2011 AppsAttic Ltd - http://www.appsattic.com/
// Written by Andrew Chilton <chilts@appsattic.com>
//
// License: http://open... | JavaScript | config.js | chilts/awssum-amazon-cloudfront | mit | 23,102 | 779 | codeparrot/github-code |
0b87e2d7d79a38bb89fd948f271d101144254efd018148f1d6f6eeef89f7da17 | import { Component, OnInit, OnDestroy, ElementRef, ViewChild } from '@angular/core';
import { fromEvent } from 'rxjs';
import { debounceTime, distinctUntilChanged, takeWhile } from 'rxjs/operators';
import { Terminal } from 'xterm';
import * as fit from 'xterm/lib/addons/fit/fit';
import * as search from 'xterm/lib/ad... | TypeScript | src/app/pages/apps/pages/terminal/terminal.component.ts | jojanper/angular-app | mit | 2,842 | 95 | codeparrot/github-code |
2ef113cb4ca774cbd38756fb6c8ca92c1991a3e45bd987560237d6961919fb6e | package com.cngu.androidfun.main;
import android.content.Context;
import android.os.Bundle;
import android.view.LayoutInflater;
import com.cngu.androidfun.R;
import com.cngu.androidfun.data.ActionTopic;
import com.cngu.androidfun.data.MenuTopic;
import com.cngu.androidfun.data.Topic;
import com.cngu.androidfun.view.T... | Java | app/src/main/java/com/cngu/androidfun/main/TopicManager.java | cngu/android-fun | mit | 3,766 | 135 | codeparrot/github-code |
494aa2883e9355bcfd76df8dc689fdc47d0df8a554a3831eb6ea289c952f3fc3 | /*
* This file is part of NucleusFramework for Bukkit, licensed under the MIT License (MIT).
*
* Copyright (c) JCThePants (www.jcwhatever.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 ... | Java | src/com/jcwhatever/nucleus/internal/managed/scripting/api/SAPI_Locations.java | JCThePants/NucleusFramework | mit | 2,857 | 91 | codeparrot/github-code |
bbfbbf02f3e1ad759c2a04106549dc83f43b161d0b76905286cae2eeec20b828 | var GlobezGame = GlobezGame || {};
GlobezGame.Boot = function() {};
GlobezGame.Boot.prototype = {
preload: function() {
console.log("%cStarting Fish Vs Mines", "color:white; background:red");
this.load.image("loading", "assets/sprites/loading.png");
this.load.image("logo", "assets/sprites/logo.png");
},... | JavaScript | games/sea-life-vs-mines/js/game.js | jojoee/phaser-examples | mit | 4,643 | 116 | codeparrot/github-code |
15888006c1ad07b18a84263995080d31065cd3f566ae3ed04e9d96a93f1878f9 | // Copyright 2014 Yu Jing<yujing5b5d@gmail.com>
#ifndef INCLUDE_ARGCV_UTIL_UTIL_H_
#define INCLUDE_ARGCV_UTIL_UTIL_H_
#include <cmath>
#include <ctime>
#include <cstdint> // uint64_t
#include <sstream>
#include <string>
#include <vector>
#include <map>
namespace argcv {
namespace util {
// c style hash key generat... | C | include/argcv/util/util.h | yuikns/cmakes | mit | 2,171 | 81 | codeparrot/github-code |
5ca7cde0b66588db88d8aa16284bb515a3fd0b6dc858bed181a300bfd280a773 | // Copyright (c) 2015 The Truthcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#ifndef TRUTHCOIN_QT_BALLOTSEALEDVOTEFILTERPROXYMODEL_H
#define TRUTHCOIN_QT_BALLOTSEALEDVOTEFILTERPROXYMODEL_H
#include <QMode... | C | src/qt/ballotsealedvotefilterproxymodel.h | truthcoin/truthcoin-cpp | mit | 693 | 31 | codeparrot/github-code |
70639ae97a7b27ab7476d5d385d60fded749f84447f64a820281bdf6c02dba6d | #ifndef QRW_SKIRMISHPREPARATIONPLAYEROPTIONS_HPP
#define QRW_SKIRMISHPREPARATIONPLAYEROPTIONS_HPP
#include <string>
#include "gui/ng/window.hpp"
namespace namelessgui
{
class LineInput;
}
namespace qrw
{
class SkirmishPreparationPlayerOptions : public namelessgui::Window
{
public:
SkirmishPreparationPlayerOptions... | C++ | include/game/skirmish/gui/skirmishpreparationplayeroptions.hpp | namelessvoid/qrwar | mit | 717 | 34 | codeparrot/github-code |
f5a31ce59708a6868edf88692f73bccb29eced2fc888b6cbf8f67d98a3c08bfd | <?php
namespace Ty666\LaravelTheme;
use Illuminate\Filesystem\Filesystem;
use Illuminate\Support\Facades\View;
use Ty666\LaravelTheme\Exception\ThemeNotFound;
class ThemeManager
{
protected $config;
protected $files;
protected $activeTheme;
protected $activeThemeConfig = null;
protected $isUseTheme ... | PHP | src/ThemeManager.php | ty666/laravel-theme | mit | 2,896 | 92 | codeparrot/github-code |
3a2e2a17ecef3af6a4b0a419e58176e81671514a33e244cbdfacdcdf01ac4676 | /*
* 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 blastbenchmark;
/**
*
* @author thanos
*/
public class Lock {
private boolean isLocked = false;
public synchron... | Java | BlastBenchmark/src/blastbenchmark/Lock.java | BioDAG/odysseys | mit | 617 | 34 | codeparrot/github-code |
a10ca135bb6235256683e07f73bb0cef197ccc1f895bd888fa6140b0152daeae | package br.edu.fumep.entity;
import org.junit.Before;
import org.junit.Test;
import java.util.ArrayList;
import java.util.List;
import static org.hamcrest.Matchers.is;
import static org.junit.Assert.assertThat;
/**
* Created by arabasso on 09/05/2017.
*/
public class GrupoEstudoTests {
private GrupoEstudo gru... | Java | src/test/java/br/edu/fumep/entity/GrupoEstudoTests.java | plugadoeep/plugado | mit | 1,912 | 73 | codeparrot/github-code |
dbebe4c8e23be03f4596637f7157f92e3b6a5b844033a82228ab8a0a5b6e87f0 | using System;
using System.Collections.Generic;
using System.Linq.Expressions;
using System.Web.Mvc;
using VsixMvcAppResult.Models;
using VsixMvcAppResult.Models.Common;
using VsixMvcAppResult.Models.Membership;
using VsixMvcAppResult.UI.Web.Controllers;
using VsixMvcAppResult.UI.Web.Models;
namespace VsixM... | C# | VsixMvcAppResult/VsixMvcAppResult.UI.Web/Areas/UserAdministration/Models/DetailsViewModel.cs | jordivila/Net_MVC_NLayer_Result | mit | 1,725 | 44 | codeparrot/github-code |
18f9ab21204d4f969c55567e22288df1369ec8eadae7deffad87c22d54ae06c9 | /*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*---------------------------------------------------------------... | TypeScript | src/vs/workbench/parts/tasks/node/taskConfiguration.ts | landonepps/vscode | mit | 67,393 | 2,051 | codeparrot/github-code |
d8470971667828bdb0430bb06ff545df082146f44248b17531a45dcd0444b615 | //Symbolic Property
#ifndef _PROBMODELS_BASE_SYMBOLIC_PROPERTY_HPP_
#define _PROBMODELS_BASE_SYMBOLIC_PROPERTY_HPP_
#include <array>
#include "boost/pending/property.hpp"
namespace probmodels {
namespace base {
//Property must be copyable, assignable and copy constructable
template <std::size_t Len, typename Proper... | C++ | include/base/symbolic_property.hpp | antoniohps/probmodels | mit | 844 | 38 | codeparrot/github-code |
bb7fd93233bf11cb351b2306dc527d41a2a5995da3ff384e5180cd70ac98b41d | <?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Pegawai extends CI_Controller {
/*
@author : Okki Setyawan © 2016
*/
//ini method yang pertama kali di jalankan oleh codeginiter,semua pemanggilan ada disini termasuk hak akses
public function __construct(){
parent ::__construct();
... | PHP | application/modules/pegawai/controllers/Pegawai.php | okki23/asdp | mit | 8,948 | 241 | codeparrot/github-code |
ed97916545097901f173e1b040a88762d757b5cf28990bf016f5816a670049ae | <?php
namespace Embark\CMS\Database;
use Exception;
use Profiler;
use PDO;
class Connection
{
const UPDATE_ON_DUPLICATE = 1;
protected $log;
protected $conf;
protected $queryCaching;
protected $lastException;
protected $lastQuery;
protected $string;
public function __construct($conf... | PHP | packages/system/lib/Database/Connection.php | psychoticmeow/journey-cms | mit | 6,723 | 260 | codeparrot/github-code |
011523df6334dcd2717ced355435dabedde61b7106f22889053b80b96ab31bbf | import fileinput
def str_to_int(s):
return([ int(x) for x in s.split() ])
# args = [ 'line 1', 'line 2', ... ]
def proc_input(args):
(n, l) = str_to_int(args[0])
a = tuple(str_to_int(args[1]))
return(l, a)
def solve(args, verbose=False):
(l, a) = proc_input(args)
list_a = list(a)
list_a.sort()
max_dist = max... | Python | codeforces/492/attempt/b_lanterns.py | cripplet/practice | mit | 897 | 36 | codeparrot/github-code |
142a5c24b88c8a62d8e4ba3588733bbb0f684d340c15ef3074208676c1cc2836 | /*
* Copyright (c) 2010-2014 OTClient <https://github.com/edubart/otclient>
*
* 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... | C | src/framework/core/binarytree.h | mathiasbynens/otclient | mit | 2,529 | 90 | codeparrot/github-code |
6ed7a8107a06d9c9d6573eeed9ba196376fbe00c25d25d6b6221153a911187d3 | define(function(require) {
var Checker = require("checkers/controller/Checker"),
GameBoard = require("checkers/controller/GameBoard"),
GameSpace = require("checkers/controller/GameSpace");
var instance = null;
function GameBoardUtil() {
}
var getInstance = function... | JavaScript | js/checkers/util/GameBoardUtil.js | RobStrader/Robs-Arcade | mit | 5,153 | 129 | codeparrot/github-code |
4afa2d23cd9532bce790c6f0ac9c0ed40d15b55f4d14782f59d066d20068336d | // This code is licensed under the MIT License (MIT).
// THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF
// ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY
// IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR
// PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.
//
// Adapted from DescriptorHeap.h in Microsoft's Miniengi... | C | Engine/Source/DescriptorHeap12.h | DrGr4f1x/Kodiak | mit | 2,734 | 100 | codeparrot/github-code |
30664452f36da3d0d24f3af428d95ac45d071047dd7c76658249260762ff4b05 | import { LOCAL_STORAGE_REMOVE_ITEM, LOCAL_STORAGE_SET_ITEM } from './actionTypes'
import createMiddleware from './middleware'
describe('middleware', () => {
let removeItem
let setItem
let middleware
let next
let store
beforeEach(() => {
removeItem = jest.fn()
setItem = jest.fn()
middleware = c... | JavaScript | src/middleware.test.js | fredrikolovsson/redux-module-local-storage | mit | 1,262 | 59 | codeparrot/github-code |
6fef3227d2b69b170bcd70db20d1f890902c04c355bf7ee87b5e4662b2f2732a | @(decks: Seq[ShipWithName], deckport: DeckPort, user: User)
@import models.join.ShipParameter.Rate
<input type="hidden" data-id="@deckport.id" class="fleet_data" />
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<div style="float: right; ma... | HTML | server/app/views/user/modal_fleet.scala.html | ttdoda/MyFleetGirls | mit | 3,802 | 74 | codeparrot/github-code |
a0e16c33bac7c6da2a053e713d330b1f459071d954d51c8ca9fbcf186dbe9522 | <?php
namespace Mawi\Bundle\FrostlogBundle\Controller;
use Symfony\Component\Security\Core\SecurityContext;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Sensio\Bundle\FrameworkExtraBundle\Confi... | PHP | src/Mawi/Bundle/FrostlogBundle/Controller/FrontController.php | mawi12345/frostlog | mit | 2,772 | 112 | codeparrot/github-code |
492c47f437163665e0d7f643b7ec3ad41c80ae96e14e708eb73a7d0ab26d5a93 | <?php
namespace AppBundle\Form;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
class SymptomType extends AbstractType
{
/**
* @param FormBuilderInterface $builder
* @param array $options
*/
... | PHP | src/AppBundle/Form/SymptomType.php | garasuresh/practice2.6 | mit | 905 | 42 | codeparrot/github-code |
39caea0455a26ead1b50f277ea48d267deca3cdcaedbca7269e8870488ab41ce | import { isFunction } from './isFunction';
/**
* Used to match `RegExp`
* [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
*/
import { isObject } from './isObject';
import { isMasked } from './_isMasked';
import { toSource } from './_toSource';
const reRegExpChar = /[\\^$.*+?()[\]{}|]... | TypeScript | libs/fn/src/lib/_common/_baseIsNative.ts | UIUXEngineering/ix-material | mit | 1,398 | 49 | codeparrot/github-code |
5538e1cbc39624f763fbd2201cb3aa164a65ef3b808399de7ca5114346f953f2 | jQuery.each(param_obj, function (index, value) {
if (!isNaN(value)) {
param_obj[index] = parseInt(value);
}
});
function Portfolio_Gallery_Full_Height(id) {
var _this = this;
_this.container = jQuery('#' + id + '.view-full-height');
_this.hasLoading = _this.container.data("show-loa... | JavaScript | wp-content/plugins/portfolio-gallery/assets/js/view-full-height.js | rahul121290/php | mit | 6,558 | 168 | codeparrot/github-code |
ac4316c5f2c468a282e0cb4375d039b30423a354dc67adc17ab653f4f254c0fe | /******************************************************************************
* The MIT License (MIT)
*
* Copyright (c) 2016-2019 Baldur Karlsson
*
* 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... | C++ | renderdoc/os/posix/posix_libentry.cpp | TurtleRockStudios/renderdoc_public | mit | 2,988 | 93 | codeparrot/github-code |
c37575905a952ced691120984c2485ea3aa2c7aaa48b718bd6f53e687c7a7213 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Copyright (C), 2013, The Schilduil Team. All rights reserved.
"""
import sys
import pony.orm
import suapp.orm
from suapp.logdecorator import loguse, logging
__all__ = ["Wooster", "Drone", "Jeeves"]
class FlowException(Exception):
pass
class ApplicationClos... | Python | suapp/jandw.py | schilduil/suapp | mit | 11,304 | 354 | codeparrot/github-code |
06190cd67682e91e6d2e86b9b38f0f0876acba2142f857e812074e7d91af5b00 | using MyRoutine.Service;
using MyRoutine.Service.Interfaces;
using MyRoutine.Web.Areas.Admin.ViewModels.Users;
using MyRoutine.Web.Controllers;
using MyRoutine.Web.Helpers;
using MyRoutine.Web.ViewModels;
using System.Linq;
using System.Web.Mvc;
using WebMatrix.WebData;
namespace MyRoutine.Web.Areas.Admin.Controllers... | C# | MyRoutine.Web/Areas/Admin/Controllers/UsersController.cs | davidtimovski/my-routine | mit | 4,327 | 111 | codeparrot/github-code |
7e930d118ba43ac8cc67b8aa17107a62bd11b3ba46b1d5459ff5f0f3a2d09c9a | import numpy
from chainer import cuda
from chainer import function
from chainer.utils import array
from chainer.utils import type_check
class BilinearFunction(function.Function):
def check_type_forward(self, in_types):
n_in = type_check.eval(in_types.size())
if n_in != 3 and n_in != 6:
... | Python | chainer/functions/connection/bilinear.py | kashif/chainer | mit | 6,625 | 184 | codeparrot/github-code |
7532d6b1744ee4ca2a08f1930596fa9b5cf75d1dd7def08ad35980074b0b8710 | import s from './Callouts.css';
import React, { PropTypes } from 'react';
import numbro from 'numbro';
function diversityAtParityOrGreater(conf) {
return conf.diversityPercentage >= 50;
}
function confFromCurrentYear(conf) {
return conf.year == (new Date()).getFullYear();
}
function diversityAccumulator(accumula... | JavaScript | components/Callouts/Callouts.js | andeemarks/conf-gen-div-react | mit | 2,762 | 82 | codeparrot/github-code |
88eb12ab90ce64f3288ac7ecec3e5215f8498ed03b16f96185543cda0555e508 | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Login Page - Photon Admin Panel Theme</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0">
<link rel="shortcut icon" href="http://photonui.orangehilldev.com/images/photo... | HTML | lib/assets/images/photon/plugins/elrte/css/css_compiled/js/bootstrap/images/photon/js/plugins/jquery.flot.js.html | user-tony/photon-rails | mit | 14,232 | 183 | codeparrot/github-code |
0343034f966bec3d95a178bb4a3e37707ac3e341e0c980c8b328f6000ea413a4 | package com.github.niwaniwa.we.core.player;
import com.github.niwaniwa.we.core.api.callback.Callback;
import com.github.niwaniwa.we.core.twitter.TwitterManager;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.Location;
import org.bukkit.entity.Entity;
import org.bukkit.entity.Player;
import or... | Java | src/main/java/com/github/niwaniwa/we/core/player/EggPlayer.java | niwaniwa/WhiteEggCore | mit | 3,854 | 163 | codeparrot/github-code |
8fc5e351a026d733b646e379bf075535a6830b9cabc6fc779ae3fcf2d0ae67d3 | package mcjty.rftools.blocks.dimlets;
import mcjty.lib.container.GenericGuiContainer;
import mcjty.lib.gui.Window;
import mcjty.lib.gui.layout.PositionalLayout;
import mcjty.lib.gui.widgets.EnergyBar;
import mcjty.lib.gui.widgets.ImageLabel;
import mcjty.lib.gui.widgets.Panel;
import mcjty.lib.gui.widgets.Widget;
impo... | Java | src/main/java/mcjty/rftools/blocks/dimlets/GuiDimletScrambler.java | Elecs-Mods/RFTools | mit | 2,975 | 72 | codeparrot/github-code |
ea742de396042fcd20d51bc19a410ca0f8a9f673d15422f122e0b99764946a8c | //----------------------------------------------------------------------------
// error.h
//
// error reporting for pathed
//
// Copyright (C) 2011 Neil Butterworth
//----------------------------------------------------------------------------
#ifndef INC_PATHED_ERROR_H
#define INC_PATHED_ERROR_H
#include ... | C | inc/error.h | mumblepins/pathed | mit | 1,449 | 56 | codeparrot/github-code |
c39536e1ef3bdc35988a8b9f11d9502672b44e696ec2c21c44364c919586e5ff | <?php
if (!defined('BASEPATH'))
exit('No direct script access allowed');
class ModelPersona extends YPS_Model {
CONST OBJETO = 'modelPersona';
CONST PK = 'idPersona';
CONST TABLA = 'personas';
private $idPersona;
private $sufijo_nombre;
private $prefijo_nombre;
pri... | PHP | application/models/modelPersona.php | QInfoDev/YPS | mit | 1,574 | 61 | codeparrot/github-code |
ba95de458d290bccd9e2148e98e87b18607d8ee45ea945cf4efabbb6a80999fc | use File::Find;
use File::Basename;
use Win32::TieRegistry 0.20 ( KEY_READ );
# Gloabal registry access options
my $registry_options = {
Delimiter => '/',
Access => KEY_READ(),
};
# First, let's get location of ActivePerl
my $active_key = "LMachine/Software/ActiveState/ActivePerl";
my $perl_binary = get_pe... | Perl | swish-e-2.4.7/src/win32/fixperl.pl | uddhab/swish-e | mit | 3,234 | 124 | codeparrot/github-code |
32e5bded66988774c737697b3aaca436f67970af528d2e9e6fab094826f593ea | import { faker } from 'ember-cli-mirage';
import lodash from 'npm:lodash';
export const CONTAINER_MEMORY = 8023089152;
export function getPorts(isContainer=false) {
let ports = [];
for (let j = 1; j <= faker.random.number({ max: 3 }); j++) {
let obj = {
name: faker.hacker.noun(),
protocol: 'TCP',
... | JavaScript | app/mirage/factories/fakers.js | holandes22/kube-admin | mit | 3,027 | 109 | codeparrot/github-code |
501d098c1d83bd9a4e5c09746661949fd524caad87d63e76ab3cc9e205bef94a | <?php
/**
* Client object
*
* @package RpkUtils\Sysinfo
* @author Repkit <repkit@gmail.com>
* @copyright 2015 Repkit
* @license MIT <http://opensource.org/licenses/MIT>
* @since 2015-11-12
*/
namespace RpkUtils\Sysinfo;
class Client
{
/**
* Client ip
* @return string
*... | PHP | src/RpkUtils/Sysinfo/Client.php | Repkit/php-utils | mit | 907 | 43 | codeparrot/github-code |
f0518f56f07099ec17144b407fed7fde2f657e99dac025cf7eaa7e38a64a368e | // $Id: LSOCK_CODgram.cpp 79134 2007-07-31 18:23:50Z johnnyw $
#include "ace/LSOCK_CODgram.h"
#if !defined (ACE_LACKS_UNIX_DOMAIN_SOCKETS)
#include "ace/Log_Msg.h"
ACE_RCSID(ace, LSOCK_CODgram, "$Id: LSOCK_CODgram.cpp 79134 2007-07-31 18:23:50Z johnnyw $")
#if !defined (__ACE_INLINE__)
#include "ace/LSOCK... | C++ | P2pNet/ace/LSOCK_CODgram.cpp | yuanxu/liveshow_r2 | mit | 1,814 | 63 | codeparrot/github-code |
e3ff00d4b84f6d83de17027ca9f7bc1b986a7a36a5142e0dd914d77f8c3335b7 | <?php
/*
|--------------------------------------------------------------------------
| Model Factories
|--------------------------------------------------------------------------
|
| Here you may define all of your model factories. Model factories give
| you a convenient way to create models for testing and seeding yo... | PHP | database/factories/ModelFactory.php | diego-drese/swesat | mit | 1,360 | 52 | codeparrot/github-code |
7e4d2b41f9260f055a06426851fe1a05441c2162d34b5a90d344fd8cbc74c591 |
import React from 'react';
import PropTypes from 'prop-types';
import ColumnChart from './columnChart';
import Tooltip from './../tooltip/tooltip';
import {dateFormats} from './../../utils/displayFormats';
import './columnWidget.css';
const ColumnWidget = ({
chartTitle,
chartDescription,
chartUpdatedDate,
... | JavaScript | src/components/columnWidget/columnWidget.js | govau/datavizkit | mit | 1,815 | 65 | codeparrot/github-code |
b0df58b0fe6accb741e57d180aae19600eccd8b3023ad5a756206848ad5dbcae | package jaist.css.covis.cls;
import java.awt.Component;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JFrame;
import javax.swing.JMenuItem;
import javax.swing.JOptionPane;
import javax.swing.JPopupMenu;
import jaist.css.covis.util.FramePopup;
public class ArrayPrimitiv... | Java | src/jaist/css/covis/cls/ArrayPrimitiveMenu.java | miuramo/AnchorGarden | mit | 1,372 | 57 | codeparrot/github-code |
aacb08d151f0f8d4e5f2553f97f1b1fb6688eaf548d6a2380234ae6deee95087 | Meteor.methods({
addAllUserToRoom(rid, activeUsersOnly = false) {
check (rid, String);
check (activeUsersOnly, Boolean);
if (RocketChat.authz.hasRole(this.userId, 'admin') === true) {
const userCount = RocketChat.models.Users.find().count();
if (userCount > RocketChat.settings.get('API_User_Limit')) {
... | JavaScript | server/methods/addAllUserToRoom.js | flaviogrossi/Rocket.Chat | mit | 1,600 | 57 | codeparrot/github-code |
b357fb94f0e93859108f1a12b32978189646bd9bbe978decdb5726cab2382ba3 | /// <reference path="../_references.d.ts" />
interface sage {
id: number;
name: string;
username: string;
email: string;
dateOfBirth: Date;
sayings?: saying[];
}
interface repositorySage {
getAll: () => ng.IPromise<sage[]>;
getById: (id: number, forceRemote?: boolean) => ng.IPromise<sag... | TypeScript | Proverb.Web/app/services/repository.sage.ts | johnnyreilly/proverb-without-implicit-referencing | mit | 2,507 | 84 | codeparrot/github-code |
35467a13528103baaaad3e95252a427020e8af5a5442cfbcf5bc6aa934c0ed17 | <?php
$about = array(
'name' => 'Norsk bokmål',
'author' => array(
'name' => 'Frode Danielsen',
'email' => 'frode@danielsen.net',
'website' => 'http://frode.danielsen.net/'
),
'release-date' => '2011-02-09'
);
/**
* Subsection Manager
*/
$dictionary = array(
'%s Show thumbnail images' =>
... | PHP | lang/lang.no.php | fdanielsen/subsectionmanager | mit | 7,100 | 216 | codeparrot/github-code |
c9936c71fea032a58ffaa7dd0668acc0cc2b8ce344d20663b116bc08238f9c46 | /* globals describe, beforeEach, it, expect, inject, vehicles, VehicleMock */
describe("Vehicles Factory:", function() {
'use strict';
var $httpBackend,
vehicles,
request,
Showcase;
// Load the main module
beforeEach(module('sc'));
beforeEach(inject(function($injector, _vehicles_, _Showcase_) {
$httpBack... | JavaScript | test/unit/vehicles/factories/vehicles.factory.spec.js | jandrade/showcase | mit | 1,683 | 68 | codeparrot/github-code |
d46af221c1449f310e965a2d3ed920bfc3cdf737a1e94834d541c0c88955e46a | package is.hail.types.physical.stypes.concrete
import is.hail.annotations.{CodeOrdering, Region}
import is.hail.asm4s.{Code, LongInfo, Settable, SettableBuilder, TypeInfo, Value}
import is.hail.expr.ir.{EmitCodeBuilder, EmitMethodBuilder, SortOrder}
import is.hail.types.physical.stypes.interfaces.SString
import is.hai... | Scala | hail/src/main/scala/is/hail/types/physical/stypes/concrete/SStringPointer.scala | danking/hail | mit | 3,051 | 83 | codeparrot/github-code |
42b9fea0722db629e57e0136d5859550fd29563eaa4d03e11e5b4a3b5479d9c3 | class Integer
def divisors
res = []
i = 1
while i*i < self
if self % i == 0
res << i
end
i += 1
end
(res.size - 1).downto(1) do |k|
res << self / res[k]
end
res << i if i*i == self
res
end
end
def weird(n)
possible_sums = Hash.new
possible_sums[0]... | Ruby | ruby_quiz/quiz57_sols/solutions/Paolo Capriotti/weird_numbers.rb | J-Y/RubyQuiz | mit | 898 | 57 | codeparrot/github-code |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.