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 |
|---|---|---|---|---|---|---|---|---|
0ae458e2949f76325f92e0be655ab11d2360944f92f663c02ff7332603dbac5d | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>cfgv: Not compatible</title>
<link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" />
<link href="../../../../../bootstrap.min.css" rel=... | HTML | clean/Linux-x86_64-4.09.0-2.0.5/released/8.8.2/cfgv/8.7.0.html | coq-bench/coq-bench.github.io | mit | 7,149 | 167 | codeparrot/github-code |
9d07a777b0e4baac482733b57812e105bf8e78ad002b8ba7563d5469b9143f36 | ---
layout: default
---
<div class="page clearfix" index>
<div class="left">
<h1>Welcome to jisonami's Notes!</h1>
<small>这里记录我在程序开发过程中的学习笔记</small>
<hr>
<ul>
{% for post in paginator.posts %}
<li>
<h2>
<a class="post-link"... | HTML | index.html | jisonami/Notes | mit | 6,638 | 161 | codeparrot/github-code |
36178be0918c4acbda1d424ee71fbb8fd3525bd508cffbd0d1f5ae9af63082c1 | <?php
namespace app\controllers;
use Yii;
use app\models\{Freight, FreightSearch};
use yii\web\{Controller, NotFoundHttpException};
/**
* FreightController implements the CRUD actions for Freight model.
*/
class FreightController extends Controller
{
/**
* Lists all Freight models.
* @return mixed
... | PHP | controllers/FreightController.php | lmihaylov2512/logistic-app | mit | 2,382 | 94 | codeparrot/github-code |
e139613e9e4aa2d214184937f8a418024fddea48e0e9c5d0fc2541587e0b5008 | // ReplProbe.js (c) 2010-2013 Loren West and other contributors
// May be freely distributed under the MIT license.
// For further details and documentation:
// http://lorenwest.github.com/monitor-min
(function(root){
// Module loading - this runs server-side only
var Monitor = root.Monitor || require('../Monitor'... | JavaScript | lib/probes/ReplProbe.js | lorenwest/monitor-min | mit | 7,982 | 277 | codeparrot/github-code |
f10cf3ffa8499ee6a6325d68144587e33203f9808f009deba19a3175d96805b4 | package model.dataModels;
/**
* Class ManufacturingData.
* @author Daniel
*
*/
public class ManufacturingData {
private String customerNumber;
private String materialNumber;
private String orderNumber;
private String timeStamp;
private MachineData[] machineData;
private SpectralAnalysisData analysisData;
... | Java | Backend/src/main/java/model/dataModels/ManufacturingData.java | 4lexBaum/projekt-5s-dhbw | mit | 1,974 | 100 | codeparrot/github-code |
cd90feab44d8bd397b3fa7f5f3e83d1f09dd9fcd5c15d40cee006ab728d4a4f5 | using System;
using System.Collections.Generic;
using Roguelike.Core.Elements.Inventory;
using Roguelike.Entities;
using RLNET;
namespace Roguelike.Systems {
public class InventorySystem {
private Player player;
public InventorySystem() {
player = Game.Player;
}
void... | C# | Roguelike/Systems/InventorySystem.cs | SamFergie/Roguelike | mit | 18,043 | 456 | codeparrot/github-code |
592f087ca8a41969cca8af6d8e7a4fd322fdac8b5521774d91f725c55c9b4ed1 | # frozen_string_literal: true
require "dry/core/equalizer"
require "rom/initializer"
require "rom/relation/loaded"
require "rom/relation/composite"
require "rom/relation/materializable"
require "rom/pipeline"
require "rom/support/memoizable"
module ROM
class Relation
# Abstract relation graph class
#
... | Ruby | lib/rom/relation/graph.rb | rom-rb/rom | mit | 2,218 | 108 | codeparrot/github-code |
8955eb7301ded52355f162fd93d084567d5431fe881affc375596fbf236e080d | #ifndef ZOMBIE_HUMANPLAYER_H
#define ZOMBIE_HUMANPLAYER_H
#include "device.h"
#include "physics/moving/unit.h"
#include "player.h"
#include "physics/moving/unit.h"
#include <glm/gtx/rotate_vector.hpp>
namespace zombie {
class HumanPlayer : public Player {
public:
HumanPlayer(DevicePtr device, std::unique_ptr<Un... | C | src/humanplayer.h | mwthinker/Zombie | mit | 1,246 | 50 | codeparrot/github-code |
4acd040138aed219bbd9a06d3ad4749e6cce279b1e42bd3cc8693b0fa553f064 | // Copyright (c) 2014 The Okcash Developers
// Distributed under the MIT/X11 software license, see the accompanying
// file license.txt or http://www.opensource.org/licenses/mit-license.php.
#ifndef COIN_STATE_H
#define COIN_STATE_H
#include <string>
#include <limits>
#include "sync.h"
enum eNodeType
{
NT_FULL =... | C | src/state.h | okcashpro/okcash | mit | 4,272 | 146 | codeparrot/github-code |
ae9e27c6b5332f990d9d074faa190abd0628472fd987241349a12c395ff2a093 | var gif_bgs = [];
var gif_center = [];
var length_bgs = 0;
var length_center = 0;
var timer;
var duration = 4000;
var loaded = 0;
var next_bg;
var next_center;
var audio = document.getElementById("sound");
var muted = false;
function next(e){
clearInterval(timer);
timer = setInterval(next, duration);
$("#ba... | JavaScript | client/js/gif.js | paralin/1148WTF | mit | 1,679 | 87 | codeparrot/github-code |
ae7da4f30073709f6cdc3feac42b718e2e8223fb580f1a64e9929f04d7832e3d | package com.tbp.safemaps;
import the.safemaps.R;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
public class MarkUnsafe ext... | Java | safemaps_android/src/com/tbp/safemaps/MarkUnsafe.java | thebachchaoproject/safemaps | mit | 1,557 | 83 | codeparrot/github-code |
5e40c889ce02015b2df9a3160390ad92e16ca64fbe521f2f9e9434d0ced1ad1b | #include "protagonist.h"
#include "SerializeResult.h"
#include "v8_wrapper.h"
#include "snowcrash.h"
using namespace v8;
using namespace protagonist;
Result::Result()
{
}
Result::~Result()
{
}
Nan::Persistent<Function> Result::constructor;
void Result::Init(Handle<Object> exports)
{
Nan::HandleScope scope;
... | C++ | src/result.cc | cold-brew-coding/protagonist | mit | 1,745 | 70 | codeparrot/github-code |
f582c601162d696f76cba3bd75459dca2d92a1570aeb3762f2f10f09c1c8d32e | #!/usr/bin/env python3
"""
My radio server application
For my eyes only
"""
#CREATE TABLE Radio(id integer primary key autoincrement, radio text, genre text, url text);
uuid='56ty66ba-6kld-9opb-ak29-0t7f5d294686'
# Import CherryPy global namespace
import os
import sys
import time
import socket
import cherrypy
imp... | Python | radio-server/server.py | ernitron/radio-server | mit | 26,943 | 861 | codeparrot/github-code |
9f90cdecc0c074fdf25fb338a970fdc66ad9bd8082f9bdd6364a38b66430e810 | {% load staticfiles i18n %}<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<title>{% block title %}netmon{% endblock title %}</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description"... | HTML | netmon/templates/baseold.html | Landver/netmon | mit | 5,836 | 134 | codeparrot/github-code |
ecdfd334dfbacd24c808ad8d3fc8ba75c6d42a309e9dc882db90ce741bd76bab | // -------------------------------------------------------------
// WARNING: this file is used by both the client and the server.
// Do not use any browser or node-specific API!
// -------------------------------------------------------------
/* eslint hammerhead/proto-methods: 2 */
import reEscape from '../utils/rege... | JavaScript | src/processing/style.js | AlexanderMoskovkin/testcafe-hammerhead | mit | 3,700 | 80 | codeparrot/github-code |
ee0df6e7954c50e03c49458bf22abebc60d6d3cafaabd63a925deebd35809934 | /**
* @flow
* @module ProductPropertyInput
* @extends React.PureComponent
*
* @author Oleg Nosov <olegnosov1@gmail.com>
* @license MIT
*
* @description
* React form for product property(options select only).
*
*/
import React, { PureComponent } from "react";
import { isObject } from "../../../helpers";
imp... | JavaScript | src/components/Product/ProductPropertyInput/ProductPropertyInput.js | olegnn/react-shopping-cart | mit | 4,423 | 180 | codeparrot/github-code |
68dacb64c03c973d4c1752d47bc515d483e38ff439b33ae81b493ee2b663f578 | let BASE_DIR = '/masn01-archive/';
const TAG_OPTIONS = ['meteor', 'cloud', 'bug', 'misc'];
let CURR_DIR = null;
let CURR_FILES = null;
let INIT_CMAP = null;
let CURR_IDX = 0;
let PREV_IDX = null;
$(async function() {
let cameras = JSON.parse(await $.get('cameras.php'));
cameras.forEach((camera) => {
... | JavaScript | www/js/tagger.js | warnerem/pyASC | mit | 8,131 | 266 | codeparrot/github-code |
dcf4792311395ac6f8babfc99bd08980fcd1c5bfcf357014034d39b1844e27d1 | import React, { Component, PropTypes } from 'react'
import { Search, Grid } from 'semantic-ui-react'
import { browserHistory } from 'react-router'
import Tag from './Tag'
import { search, setQuery, clearSearch } from '../actions/entities'
import { MIN_CHARACTERS, DONE_TYPING_INTERVAL } from '../constants/search'
cons... | JavaScript | client/src/components/GlobalSearch.js | kingdido999/atogatari | mit | 1,903 | 77 | codeparrot/github-code |
4202c43173219aaa5ee351b9dc15fe00769014c13ae466c36ac0117a2b177aec | <<<<<<< HEAD
var xmlDoc;
var xmlloaded = false;
var _finalUrl;
/*
* input: none
* output: none
* gets zipcode from the zipcode text field
*/
function createURL() {
var zip = document.getElementById("zipcode").value;
var format = "&format=xml"
var _clientId = "&client_id=API KEY";
var _url = "https:... | JavaScript | Lazysunday.com/XMLHandler.js | pas1411/layzsunday | mit | 1,581 | 55 | codeparrot/github-code |
243694c16c39ba6d31119aaa2c09b3fcabd25c2ded50ab63c9302412b7f67b61 | <div class="col-md-12 remove_padding">
<div class="col-md-4 right_padding ttt_pack" id="rmpd_calculate">
<div class="row col-md-12 header_new_style">
<h2 class="tt text_caplock">Location</h2>
<span class="liner_landing"></span>
... | PHP | application/views/ttt/caculate.php | akashbachhania/jeet99 | mit | 37,369 | 639 | codeparrot/github-code |
d2e048c2f1f9c6e895cfc8fe61ee9f10b1a4df19d64e8fe846dd03bcd9391d22 | import { createElement } from 'react'
import omit from 'lodash/omit'
import { useSpring, animated } from '@react-spring/web'
import { useTheme, useMotionConfig } from '@nivo/core'
import { NoteSvg } from './types'
export const AnnotationNote = <Datum,>({
datum,
x,
y,
note,
}: {
datum: Datum
x: ... | TypeScript | packages/annotations/src/AnnotationNote.tsx | plouc/nivo | mit | 1,549 | 58 | codeparrot/github-code |
ac3854c1ce8b3fde1d5f70dd76825a5212e89d20de3d6faf78b2c6ed2b249f56 | import { ILogger, getLogger } from './loggers';
import { CancellationToken, ICancellationToken } from '../util/CancellationToken';
import { Step } from './Step';
import { ModuleLoader } from './ModuleLoader';
import * as _ from 'underscore';
import { Guid } from '../util/Guid';
import { InjectorLookup, Module, ModuleRe... | TypeScript | src/script/Script.ts | pumlhorse/pumlhorse | mit | 9,364 | 306 | codeparrot/github-code |
6dbe23d147dbf4bb18077015e12a608f0a5f0ab64622be3a339e8908616f153d | #!/usr/bin/python3
"""
This bot uploads text from djvu files onto pages in the "Page" namespace.
It is intended to be used for Wikisource.
The following parameters are supported:
-index:... name of the index page (without the Index: prefix)
-djvu:... path to the djvu file, it shall be:
... | Python | scripts/djvutext.py | wikimedia/pywikibot-core | mit | 6,822 | 218 | codeparrot/github-code |
6bef684145d4c1b63031a73f635690d7ebcd103ad699b0963f58b96cf6759a36 | // Copyright 2015 LastLeaf, LICENSE: github.lastleaf.me/MIT
'use strict';
var fs = require('fs');
var fse = require('fs-extra');
var async = require('async');
var User = fw.module('/db_model').User;
var exports = module.exports = function(conn, res, args){
User.checkPermission(conn, 'admin', function(perm){
if(!p... | JavaScript | plugins/xbackup/rpc/sites.js | LastLeaf/LightPalette | mit | 2,163 | 81 | codeparrot/github-code |
f0ac5ce1114234f177595081c63ca40a05e18437ba2214d6c1fcb1762c304ca1 | /*
* Copyright 2015 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicab... | Java | realm-browser/src/main/java/de/jonasrottmann/realmbrowser/helper/ScrollAwareFABBehavior.java | jonasrottmann/realm-browser | mit | 2,812 | 58 | codeparrot/github-code |
7a8b460c248d17f38f80d2cda994c8900de0f76044895686944d0fba636339c4 | package edu.brown.cs.pianoHeroFiles;
import java.io.BufferedOutputStream;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.ByteArrayInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.FileRea... | Java | src/main/java/edu/brown/cs/pianoHeroFiles/PianoHeroFileHandler.java | valentin7/pianoHero | mit | 11,443 | 406 | codeparrot/github-code |
c261e9704ae4119d4c2b75e2e299264b711c82be77bcd474a5dcfa0181054fda | $( document ).ready( function () {
$( "#form" ).validate( {
rules: {
company: { required: true },
truckType: { required: true },
materialType: { required: true },
fromSite: { required: true },
toSite: { required: true },
hourIn: { required: true },
hourOut: { required: true... | JavaScript | assets/js/validate/hauling/hauling_v2.js | bmottag/vci_app | mit | 6,397 | 215 | codeparrot/github-code |
94d0d27c83aff960910c8d8b47f17e15e77bcf80cf0940ea03fb705d4647cb91 | var axios = require("axios");
var expect = require("chai").expect;
var MockAdapter = require("../src");
describe("MockAdapter asymmetric matchers", function () {
var instance;
var mock;
beforeEach(function () {
instance = axios.create();
mock = new MockAdapter(instance);
});
it("mocks a post reque... | JavaScript | test/asymmetric.spec.js | ctimmerm/axios-mock-adapter | mit | 1,140 | 47 | codeparrot/github-code |
c980230972caeab066222f48af54500ac0bf6066a7cafe8b91ddd79b96c2d330 |
package org.fayalite.sjs
import org.fayalite.sjs.canvas.CanvasBootstrap
import org.scalajs.dom
import org.scalajs.dom.Node
import org.scalajs.dom.raw.CanvasRenderingContext2D
import org.scalajs.dom.raw.HTMLCanvasElement
import rx.core.{Rx, Var}
/**
* Created by aa on 3/17/2016.
*/
object Schema extends SJSHelp {... | Scala | src/main/scala/org/fayalite/sjs/Schema.scala | ryleg/fayalite | mit | 5,152 | 198 | codeparrot/github-code |
485bdb6dac6f3615a882236471cf09ed47e8f8bde8e2ec47322daf2bea4ff442 | var Purest = require('purest');
function Facebook(opts) {
this._opts = opts || {};
this._opts.provider = 'facebook';
this._purest = new Purest(this._opts);
this._group = 'LIB:SOCIAL:FACEBOOK';
return this;
}
Facebook.prototype.user = function (cb) {
var self = this;
this._purest.query()
... | JavaScript | lib/social/facebook.js | selcukfatihsevinc/app.io | mit | 1,038 | 49 | codeparrot/github-code |
7443e171c7f3435a81cd9642e6805253aaedced002526c5f5b8b7d99dfc1b645 | #ifndef BITCOINGUI_H
#define BITCOINGUI_H
#include <QMainWindow>
#include <QSystemTrayIcon>
#include <QLabel>
#include <QMap>
#include "util.h"
class TransactionTableModel;
class WalletView;
class ClientModel;
class WalletModel;
class WalletStack;
class TransactionView;
class OverviewPage;
class AddressBookPage;
cl... | C | src/qt/bitcoingui.h | Meee32/NET-TEST | mit | 9,461 | 296 | codeparrot/github-code |
255125ea5c95d04dc135e6f80bb4eabafddb9345a4dd09e087f394aa2f051ee8 | package dev.jee6demo.jspes;
import java.io.IOException;
import java.io.PrintWriter;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.... | Java | jsp/jsp-eventsource/src/main/java/dev/jee6demo/jspes/EventSourceServlet.java | fegalo/jee6-demos | mit | 1,399 | 46 | codeparrot/github-code |
bc2e5ee688bca711c62a7cc926223d15a855c5967fb2a091bf71a913ef336042 |
<!DOCTYPE html>
<html xmlns:msxsl="urn:schemas-microsoft-com:xslt">
<head>
<meta content="en-us" http-equiv="Content-Language" />
<meta content="text/html; charset=utf-16" http-equiv="Content-Type" />
<title _locid="PortabilityAnalysis0">.NET Portability Report</title>
<style>
... | HTML | Reports/fl/flitbit.ioc.3.2.1/FlitBit.IoC-net451.html | kuhlenh/port-to-core | mit | 52,198 | 1,139 | codeparrot/github-code |
3fd0f3835d34a2be11dc51b34239a7b4ae8ffadd3cce05bfe6abb186f4e84a5a | #ifndef APPSETTINGSSTORAGE_H
#define APPSETTINGSSTORAGE_H
#include <QDebug>
#include <QCoreApplication>
#include <QString>
#include <QMap>
#include <QSettings>
#include <QDir>
class AppSettingsStorage
{
public:
enum Settings {
ACCOUNT_LOGIN = 0,
ACCOUNT_PASS,
APP_RUN_ON_BOOT,
APP_S... | C | appsettingsstorage.h | dmitrysl/qt-mclaut-notifier | mit | 1,015 | 45 | codeparrot/github-code |
5a613cb0698e03876301f5ea7748ec6bfb8c45e00ac1595399ce9759e690421a | /* vim: set syntax=javascript ts=8 sts=8 sw=8 noet: */
/*
* Copyright 2016, Joyent, Inc.
*/
var BINDING = require('./lockfd_binding');
function
check_arg(pos, name, value, type)
{
if (typeof (value) !== type) {
throw (new Error('argument #' + pos + ' (' + name +
') must be of type ' + type));
}
}
functi... | JavaScript | lib/index.js | joyent/node-lockfd | mit | 2,075 | 120 | codeparrot/github-code |
a2b274f9db0f9bb454fd0e69029e93302595ab1c7f397ba513d91d3ae4c12a16 | 'use strict';
angular.module('depthyApp')
.controller('DrawCtrl', function ($scope, $element, depthy, $window, $timeout) {
var drawer = depthy.drawMode,
viewer = depthy.getViewer(),
lastPointerPos = null,
oldViewerOpts = angular.extend({}, depthy.viewer);
drawer.setOptions(depthy.drawOpti... | JavaScript | app/scripts/controllers/draw.js | amcassetti/parallax-pro-creator | mit | 6,782 | 254 | codeparrot/github-code |
efba17b90b718c01c2f470f1a2607251f3f17c51ff0b1b3de6c7ad77eeb997f4 | <!DOCTYPE html>
<html dir="rtl" lan="en">
<head>
<meta charset="utf-8">
<title>2018-AR-07-arrows</title>
<script>
window.stringsLanguage = 'ar';
</script>
<script class="remove" type="text/javascript" src="../../../_common/modules/pemFioi/importModules-1.1_M.js" id="i... | HTML | bebras/2018/2018-HU-07-arrows/index_ar_eg.html | France-ioi/bebras-tasks | mit | 16,744 | 349 | codeparrot/github-code |
c8fb6962799c9d1f0d408c9356b3c7538f645a5508d1f124c2ae4b84c083bd27 | /* eslint-disable node/no-deprecated-api */
module.exports.pathBasename = pathBasename
module.exports.hasSuffix = hasSuffix
module.exports.serialize = serialize
module.exports.translate = translate
module.exports.stringToStream = stringToStream
module.exports.debrack = debrack
module.exports.stripLineEndings = stripLi... | JavaScript | lib/utils.js | linkeddata/ldnode | mit | 6,588 | 255 | codeparrot/github-code |
57b0f784bba0d4db932b999edae86ddbbc9dbbbac7a3376f6d2dffb4d571ebe0 | package ru.mephi.interpreter;
import org.antlr.v4.runtime.tree.ParseTree;
import java.math.BigInteger;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @author Anton_Chkadua
*/
public class Scope {
static Scope GLOBAL = new Scope(null);
private Scope parent;
private Map<Big... | Java | src/ru/mephi/interpreter/Scope.java | AVChkadua/interpreter | mit | 6,273 | 168 | codeparrot/github-code |
fd228319c7cd006d5acfdcd5ea81907864e18d65944870aef19c5135ff6d37a1 | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="author" content="Open Knowledge">
<meta name="description" content="The Global Open Data Index assesse... | HTML | place/ghana/health/2013/index.html | okfn/opendataindex-2015 | mit | 8,142 | 180 | codeparrot/github-code |
267ba97726dd2a8f8f10ae8eb820dc7ad2011ab734f2b012598b6bed5dec1fb7 | #include <cstring>
#include <iostream>
#include <algorithm>
#include "matcher.h"
#include "edit.h"
#include "char.h"
#include "instrumentation.h"
#define INIT_POS -1
#define __DEBUG__ false
// the node represented by a given point
#define node(p) (distances[(p)->j][(p)->i])
// the edit distance at a given point, from... | C++ | string-matching/edittable-and-tries/edit.cpp | pmansour/algorithms | mit | 6,604 | 268 | codeparrot/github-code |
cf3e711a94958715b1112c3d67b15ac9d7fbc836a9dced2469b75a420cd849f7 | <?php
/*
* This file is part of the Beloop package.
*
* Copyright (c) 2016 AHDO Studio B.V.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* Feel free to edit as you please, and have fun.
*
* @author Arkaitz Garro <arkaitz.garr... | PHP | src/Beloop/Bundle/InstagramBundle/BeloopInstagramBundle.php | beloop/components | mit | 1,660 | 64 | codeparrot/github-code |
281cabd45255b559bfe0e58801735d9605712fbbd3421b79c5e56af1c1938e3a | 6650 #include "types.h"
6651 #include "x86.h"
6652
6653 void*
6654 memset(void *dst, int c, uint n)
6655 {
6656 if ((int)dst%4 == 0 && n%4 == 0){
6657 c &= 0xFF;
6658 stosl(dst, (c<<24)|(c<<16)|(c<<8)|c, n/4);
6659 } else
6660 stosb(dst, c, n);
6661 return dst;
6662 }
6663
6664 int
6665 memcmp(const... | C | fmt/string.c | animesh2049/xv6 | mit | 2,236 | 151 | codeparrot/github-code |
8ddbefa6836aa7841ba507df3e8b3d1a455327472807fa8776c7760319266a75 | --=========== Copyright © 2019, Planimeter, All rights reserved. ===========--
--
-- Purpose: Payload class
--
--==========================================================================--
require( "engine.shared.typelenvalues" )
class "payload" ( "typelenvalues" )
payload._handlers = payload._handlers or {}
-- Ge... | Lua | engine/shared/network/payload.lua | Planimeter/grid-sdk | mit | 1,440 | 71 | codeparrot/github-code |
721494c3202ba38addb212b68dee259241d1df01a09b9e19906311c9b878abda | import { Component, DebugElement } from '@angular/core';
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { By, DOCUMENT } from '@angular/platform-browser';
import { TocComponent } from './toc.component';
import { TocItem, TocService } from 'app/shared/toc.service';
describe('TocCompon... | TypeScript | aio/src/app/embedded/toc/toc.component.spec.ts | diestrin/angular | mit | 6,886 | 233 | codeparrot/github-code |
a6399faae5a6854e630de38216f9e942877f1c5071f2e015c63ad4213708a2b8 | package main
import (
"encoding/json"
"flag"
"fmt"
"io/ioutil"
"log"
"net/url"
"os"
"os/user"
"path/filepath"
"strings"
"crypto/tls"
"net/http"
)
type configCommand struct {
config *ClientConfig
}
// skipVerifyHTTPClient returns an *http.Client with InsecureSkipVerify set
// to true for its TLS config.... | GO | cmd/mdmctl/config.go | natewalck/micromdm | mit | 3,654 | 172 | codeparrot/github-code |
51dfe793ea2490c81045854644051d4eaffb9ed54851a523dee00baad36ae634 | /*
* TestProxy.cpp
*
* Created on: Sep 6, 2013
* Author: penrique
*/
#include "InvocationManager.h"
#include <bb/system/CardDoneMessage>
#include <bb/system/InvokeRequest>
// to send number data while invoking phone application
#include <bb/PpsObject>
// Map
#include <bb/platform/LocationMapInvoker>
#inc... | C++ | module/InvocationManager.cpp | HazemKhaled/TiCardInvocation | mit | 6,446 | 238 | codeparrot/github-code |
73987bb4c2d9f1064e795b0e1bd71e6801f84eb5bb58af825584f6c649d9313c | <?php
namespace Lonquan\TaobaoSDK\Top\Request;
use Lonquan\TaobaoSDK\Top\RequestCheckUtil;
use Lonquan\TaobaoSDK\Top\RequestInterface;
/**
* TOP API: taobao.product.img.delete request
*
* @author auto create
* @since 1.0, 2016.03.05
*/
class ProductImgDeleteRequest implements RequestInterface
{
... | PHP | src/Top/Request/ProductImgDeleteRequest.php | lonquan/taobao-sdk | mit | 1,440 | 72 | codeparrot/github-code |
72eb7d19138ee18f311ee62c353d6bec02016cb3f9c9dbc7e1962bfd78a6318e | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace _10.CatalanNumbers
{
class Program
{
static void Main(string[] args)
{
// 10. Write a program to calculate the Nth Catalan number by given N.
... | C# | Loops/10.CatalanNumbers/Program.cs | bstaykov/Telerik-CSharp-Part-1 | mit | 1,980 | 72 | codeparrot/github-code |
d7adef637a13bb98a37f7ef86f4a195a1487391952a44e9da013851382badf09 | <?php
/* TwigBundle:Exception:traces.txt.twig */
class __TwigTemplate_c3e3230b69c4964c8a557e1f2f357b5c8020737511aeeb0ff45cb50924b53015 extends Twig_Template
{
public function __construct(Twig_Environment $env)
{
parent::__construct($env);
$this->parent = false;
$this->blocks = array(
... | PHP | app/cache/dev/twig/c3/e3/230b69c4964c8a557e1f2f357b5c8020737511aeeb0ff45cb50924b53015.php | lrodriguezcabrales/Tutorial | mit | 2,351 | 51 | codeparrot/github-code |
c5ebabb0ce550254ebfe84cc7757e74e7d50ee2435518ff334a39083050c483d | <?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\Form;
use Symfony\Component\Form\Exception\InvalidArg... | PHP | src/Symfony/Component/Form/ResolvedFormType.php | inso/symfony | mit | 9,680 | 278 | codeparrot/github-code |
854f6bc87b595b4027c56e8c64ff42ee9c574f2b329bb17d355dbe3b37e9281f | package GlidersGrid;
import java.util.Iterator;
import repast.simphony.context.Context;
import repast.simphony.engine.schedule.ScheduledMethod;
import repast.simphony.query.space.grid.MooreQuery;
import repast.simphony.space.grid.Grid;
import repast.simphony.space.grid.GridPoint;
import repast.simphony.util.ContextUt... | Java | GlidersGrid/src/GlidersGrid/Dead.java | ZawilecxD/Social-Network-Simulator | mit | 1,307 | 54 | codeparrot/github-code |
081e54c95f94ee4f4777b7d179c4b936aa9c31ec9ed5182efeafd72941f44e86 | #region Copyright (c) 2009 S. van Deursen
/* The CuttingEdge.Conditions library enables developers to validate pre- and postconditions in a fluent
* manner.
*
* To contact me, please visit my blog at http://www.cuttingedge.it/blogs/steven/
*
* Copyright (c) 2009 S. van Deursen
*
* Permission is hereby grant... | C# | CuttingEdge.Conditions/RequiresValidator.cs | conditions/conditions | mit | 4,488 | 104 | codeparrot/github-code |
7f0129a934d9b2bf14e17f9a3eff470b1c7636d22a522747f11007e714588565 | #include<stdio.h>
#include<math.h>
#include<conio.h>
#include<ctype.h>
int i,j,cash=100;
void wheel();
void game(int r);
void game_over();
int suit_bet();
int cash_bet();
int roll_wheel();
int roll_dice();
void wheel_count(int c,int h,int s);
void dice_count(int d,int h);
int w[9][9]={
{32,32,32,32,2,32,32,32,32... | C | final.c | abrarShariar/Roll-the-dice | mit | 4,262 | 201 | codeparrot/github-code |
0db2234dafceebf2c6c33939600fd8b6c8b097e0438b177750ea7523dd3ed27d | /* eslint-env mocha */
const { expect } = chai;
import React from './React';
import TestUtils from './TestUtils';
describe('React components', () => {
it('should find valid xpath in react component', () => {
const component = TestUtils.renderIntoDocument(<blink>hi</blink>);
expect(component).to.have.xpath('/... | JavaScript | test/react-tests.js | relekang/chai-have-xpath | mit | 1,136 | 34 | codeparrot/github-code |
17cbc87685fdad83dcbff822be2498b2cb05e8039fbd3acb0c65f04b135e2d12 | using Brandbank.Xml.Logging;
using System;
namespace Brandbank.Api.Clients
{
public sealed class FeedbackClientLogger : IFeedbackClient
{
private readonly ILogger<IFeedbackClient> _logger;
private readonly IFeedbackClient _feedbackClient;
public FeedbackClientLogger(ILogger<IFeedbackC... | C# | Brandbank.Api/Clients/FeedbackClientLogger.cs | Brandbank/Brandbank-Xml-And-Api-Helpers | mit | 1,647 | 51 | codeparrot/github-code |
6b69d1730d24676f032e28fe28224de0199b389b50497db2c60349cdfafafc21 | <?php
namespace Zodream\Infrastructure\Http\Input;
/**
* Created by PhpStorm.
* User: zx648
* Date: 2016/4/3
* Time: 9:23
*/
use Zodream\Infrastructure\Base\MagicObject;
abstract class BaseInput extends MagicObject {
/**
* 格式化
* @param array|string $data
* @return array|string
*/
prote... | PHP | src/Infrastructure/Http/Input/BaseInput.php | zx648383079/zodream | mit | 926 | 36 | codeparrot/github-code |
fd10304528aa7a35676417f1eddbd405b30a7729613f10b0b5b43fdc32edf95d | <?php
namespace Koalamon\IntegrationBundle\Integration;
class Integration
{
private $name;
private $image;
private $description;
private $url;
private $activeElements;
private $totalElements;
/**
* Integration constructor.
*
* @param $name
* @param $image
* @param... | PHP | src/Koalamon/IntegrationBundle/Integration/Integration.php | koalamon/KoalamomPlatform | mit | 1,660 | 92 | codeparrot/github-code |
b334eb06bde81fba73cffd857f567dfc9954ec080b2a327d4fc8ba83acc03bfd | import redis
import logging
import simplejson as json
import sys
from msgpack import Unpacker
from flask import Flask, request, render_template
from daemon import runner
from os.path import dirname, abspath
# add the shared settings file to namespace
sys.path.insert(0, dirname(dirname(abspath(__file__))))
import setti... | Python | src/webapp/webapp.py | MyNameIsMeerkat/skyline | mit | 2,673 | 93 | codeparrot/github-code |
7d02a5bc7c94dc02e7113a4a72eeee3f84ac2563da1249984a670130a8d9c7a4 | using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Xml;
using System.Xml.Serialization;
using System.IO;
namespace TimeOut
{
... | C# | Time Out/partido.cs | CLN-Group/Time-Out | mit | 41,238 | 1,425 | codeparrot/github-code |
c727e2d7c31736d3cf708b9fe6fa1a7674924330e78c86f9a44f2dd0122e8295 | <?php
namespace Peridot\Leo\Interfaces;
use Peridot\Leo\Assertion;
use Peridot\Leo\Interfaces\Assert\CollectionAssertTrait;
use Peridot\Leo\Interfaces\Assert\ObjectAssertTrait;
use Peridot\Leo\Interfaces\Assert\TypeAssertTrait;
use Peridot\Leo\Leo;
/**
* Assert is a non-chainable, object oriented interface
* on to... | PHP | src/Interfaces/Assert.php | peridot-php/leo | mit | 6,019 | 234 | codeparrot/github-code |
e393721f92c9a678c329b8688493f1327999620694bcbf9adcd692ec6a141013 | import cuid from "cuid";
import Result, { isError } from "../../common/Result";
import assert from "assert";
import { di, singleton, diKey } from "../../common/di";
import { ILocalFiles, ILocalFilesKey } from "../../common/LocalFiles";
import { IStoreDB, IStoreDBKey, MergeEntity } from "../../common/db/StoreDB";
import... | TypeScript | Web/src/application/diagram/Store.ts | michael-reichenauer/Dependinator | mit | 10,268 | 370 | codeparrot/github-code |
2f0165e157484701fbd640413738355f6b8934d17c6d1828f24f992e57886bd3 | var createSubmit = function(name, primus, keyDict) {
return function(event) {
var message = $('#message').val();
if (message.length === 0) {
event.preventDefault();
return;
}
$('#message').val('');
$('#message').focus();
var BigInteger = for... | JavaScript | src/client/stream/createSubmit.js | raytracer/CryptoGraph | mit | 2,725 | 81 | codeparrot/github-code |
8834cae7d53a27fc078148e83abd92faa470e2916f995a586eedb783bd9a5a24 | <?php
namespace Seahinet\Catalog\Indexer;
use Seahinet\Catalog\Model\Collection\Product;
use Seahinet\Catalog\Model\Product as ProductModel;
use Seahinet\Catalog\Model\Collection\Category;
use Seahinet\Lib\Db\Sql\Ddl\Column\UnsignedInteger;
use Seahinet\Lib\Indexer\Handler\AbstractHandler;
use Seahinet\Lib\I... | PHP | app/code/Catalog/Indexer/Url.php | peachyang/py_website | mit | 5,418 | 126 | codeparrot/github-code |
bb86d1716bffe937cc472a05d2e4826487b0bdc9ada54c2c1c5515499ee187ee | $(function () {
var $container = $('#container');
var certificatesInfo = $container.data('certinfo');
var runDate = $container.data('rundate');
$('#created_date').html(runDate);
var sorted_certificates = Object.keys(certificatesInfo)
.sort(function( a, b ) {
return certificatesInfo[a].info.days_le... | JavaScript | public/js/tls-dashboard/scripts.js | JensDebergh/certificate-dashboard | mit | 2,250 | 60 | codeparrot/github-code |
a8d2aa786f07d885d623f5a052331a6c34da573abd1b0a77eef88b73efcb7656 | from PIL import Image
import matplotlib.pyplot as plt
import matplotlib.image as mpimg
import numpy as np
img1 = Image.open('multipage.tif')
# The following approach seems to be having issue with the
# current TIFF format data
print('The size of each frame is:')
print(img1.size)
# Plots first frame
print('Frame 1'... | Python | max_tiff.py | johnrocamora/ImagePy | mit | 1,346 | 68 | codeparrot/github-code |
e11b3f5a643ed49a02b3f1233855070dbd43f3f1edbbfd214cf486f53151847c | -- phpMyAdmin SQL Dump
-- version 4.0.9
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: May 11, 2014 at 07:52 AM
-- Server version: 5.6.14
-- PHP Version: 5.5.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/... | SQL | apdb.sql | code-for-india/cfi_akshaya_patra | mit | 3,116 | 170 | codeparrot/github-code |
21d67d4dd8f483cddaf2e04ddb8eec75dd7631ad40ae5690de4a5ac439341848 | package com.InfinityRaider.AgriCraft.utility;
import com.InfinityRaider.AgriCraft.items.ItemAgricraft;
import com.InfinityRaider.AgriCraft.items.ItemNugget;
import com.InfinityRaider.AgriCraft.reference.Data;
import net.minecraft.block.Block;
import net.minecraft.item.Item;
import net.minecraft.item.ItemBlock;
import ... | Java | src/main/java/com/InfinityRaider/AgriCraft/utility/OreDictHelper.java | HenryLoenwind/AgriCraft | mit | 5,607 | 162 | codeparrot/github-code |
cec4c07d64fd92909ecb5fa2210929b702e4a381549fbe5e08b2c03b4a87ea74 |
#include "utlua.h"
#ifdef __linux__
#include <limits.h>
#include <linux/netfilter_ipv4.h>
#endif
#include <net/if.h>
#define LUA_TCPD_CONNECTION_TYPE "<tcpd.connect>"
#define LUA_TCPD_SERVER_TYPE "<tcpd.bind %s %d>"
#define LUA_TCPD_ACCEPT_TYPE "<tcpd.accept %s %d>"
#if FAN_HAS_OPENSSL
typedef struct
{
SSL_CTX *s... | C | src/tcpd.c | luafan/luafan | mit | 34,905 | 1,424 | codeparrot/github-code |
ac7ac2e11aabbeaea5b628bbe6a0f0bb24fff21db8b36a482a422c2baf19b98b | /**
* configuration for grunt tasks
* @module Gruntfile
*/
module.exports = function(grunt) {
/** load tasks */
require('load-grunt-tasks')(grunt);
/** config for build paths */
var config = {
dist: {
dir: 'dist/',
StoreFactory: 'dist/StoreFactory.js',
ngStoreFactory: 'dist/ngStore.js... | JavaScript | Gruntfile.js | ishmaelthedestroyer/ngStore | mit | 3,141 | 142 | codeparrot/github-code |
44036cf76d0d51611a6f5a03c97e047cbda38137a3a27a2cdf70c4c1e53b7d76 | #requires -Modules InvokeBuild
[CmdletBinding()]
[System.Diagnostics.CodeAnalysis.SuppressMessage('PSAvoidUsingWriteHost', '')]
[System.Diagnostics.CodeAnalysis.SuppressMessage('PSAvoidUsingEmptyCatchBlock', '')]
param(
[String[]]$Tag,
[String[]]$ExcludeTag = @("Integration"),
[String]$PSGalleryAPIKey,
... | PowerShell | JiraPS.build.ps1 | AtlassianPS/JiraPS | mit | 12,832 | 337 | codeparrot/github-code |
ec89033205f3a0edde286b7f23f0a1cf36cbc74b77b13f1ca80ec994f207850d |
/**
* Module dependencies.
*/
var express = require('express');
var path = require('path');
var api = require('./lib/api');
var seo = require('./lib/seo');
var app = module.exports = express();
app.set('port', process.env.PORT || 3000);
app.set('views', __dirname + '/views');
app.use(expre... | JavaScript | server/app.js | brettshollenberger/rootstrikers | mit | 1,520 | 52 | codeparrot/github-code |
34168d4e599272375c2cf6e249ee3e3ce57c6b78fa9782a453b2753fda83851c | using System;
using System.Collections.Generic;
using System.Data;
using System.Data.Common;
using System.Diagnostics;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
namespace LinqToDB.Data
{
using Linq;
using Common;
using ... | C# | Source/LinqToDB/Data/DataConnection.QueryRunner.cs | ronnyek/linq2db | mit | 16,895 | 588 | codeparrot/github-code |
31484f6d1a7d1168e87ae4261e5ea7fa5ab37fce5f5511ac910f6547b49c8d9f | /*
* Copyright 2004 The WebRTC Project Authors. All rights reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing ... | C++ | Boss2D/addon/webrtc-jumpingyang001_for_boss/rtc_base/win32socketserver.cc | koobonil/Boss2D | mit | 22,653 | 816 | codeparrot/github-code |
ea27895425ed77333728595726c6f2099ac25f6231cc56e6ecbc637c47bac4a5 | class R:
def __init__(self, c):
self.c = c
self.is_star = False
def match(self, c):
return self.c == '.' or self.c == c
class Solution(object):
def isMatch(self, s, p):
"""
:type s: str
:type p: str
:rtype: bool
"""
rs = []
"... | Python | solutions/regular_expression_matching.py | SF-Zhou/LeetCode.Solutions | mit | 1,032 | 46 | codeparrot/github-code |
1a64226600580aab643ad5d02552978d48a90cbf384977b66a50ead67df3485f | var score = 0;
var scoreText;
var map_x = 14;
var map_y = 10;
var game = new Phaser.Game(map_x * 16, map_y * 16, Phaser.AUTO, '', { preload: preload, create: create, update: update });
function preload() {
// game.scale.maxWidth = 600;
// game.scale.maxHeight = 600;
game.scale.scaleMode = Phaser.ScaleMan... | JavaScript | game/game.js | henripal/henripal.github.io | mit | 3,879 | 109 | codeparrot/github-code |
1c35a4434d638999153f9053ae068271ed3147d598b491e91228e80d886e55cf | package com.thebluealliance.androidclient.gcm.notifications;
import android.app.Notification;
import android.content.Context;
import android.content.Intent;
import android.content.res.Resources;
import android.support.v4.app.NotificationCompat;
import android.util.Log;
import android.view.LayoutInflater;
import androi... | Java | android/src/main/java/com/thebluealliance/androidclient/gcm/notifications/ScoreNotification.java | Adam8234/the-blue-alliance-android | mit | 11,766 | 264 | codeparrot/github-code |
23d5e0c025977c604c173ab8a9da529259772789146d180c1e2d5a2adecdd44f | import { expect } from 'chai';
import { Curry } from './curry';
describe('curry', () => {
it('should curry the method with default arity', () => {
class MyClass {
@Curry()
add(a: any, b?: any) {
return a + b;
}
}
const myClass = new MyClass();
const add5 = myClass.add(5);
... | TypeScript | src/curry.spec.ts | steelsojka/lodash-decorators | mit | 1,375 | 67 | codeparrot/github-code |
a2c9b0b2097f58bca541b5938f9bebaf91ddd450d1a4e82a5ace3efcfaf2218a | // Copyright (c) Pomelo Foundation. All rights reserved.
// Licensed under the MIT. See LICENSE in the project root for license information.
using System.Collections.Generic;
using Microsoft.EntityFrameworkCore.Query;
using Microsoft.EntityFrameworkCore.Storage;
using Pomelo.EntityFrameworkCore.MySql.Query.ExpressionT... | C# | src/EFCore.MySql.Json.Microsoft/Query/Internal/MySqlJsonMicrosoftMemberTranslatorPlugin.cs | PomeloFoundation/Pomelo.EntityFrameworkCore.MySql | mit | 1,377 | 35 | codeparrot/github-code |
0d8f9b27e620cab050d5c47cb30e6fd83301763c49da78be604f29dc409131d5 | from flask import Flask, render_template, flash
from flask_material_lite import Material_Lite
from flask_appconfig import AppConfig
from flask_wtf import Form, RecaptchaField
from flask_wtf.file import FileField
from wtforms import TextField, HiddenField, ValidationError, RadioField,\
BooleanField, SubmitField, Int... | Python | sample_application/__init__.py | HellerCommaA/flask-material-lite | mit | 2,763 | 77 | codeparrot/github-code |
1a5bbd2108c0c98a04456f95892d888b54d9849787593310d724426b41a1b09b | var Keyboard_Space = new function(){
this.initKeyboard = function(testing){
testmode = testing;
return new Keyboard();
}
var Keyboard = function(){
for(var i = 0; i < numChains; i++)
currentSounds.push([]);
var this_obj = this;
Zip_Space... | JavaScript | app/assets/javascripts/keyboard.js | Dan12/Launchpad | mit | 13,120 | 331 | codeparrot/github-code |
07a645d662440ceba841d4d45a8c8599e095860d3a37357427abc09ab44c6e57 | angular.module('booksAR')
.directive('userNavbar', function(){
return{
restrict: 'E',
templateUrl: './app/components/directives/user/user-navbar.html'
};
})
.directive('userBooksTable', function(){
return{
restrict: 'E',
templateUrl: './app/components/directives/user/user-books... | JavaScript | frontend/app/components/directives/user/user.js | AlejandroAcostaT/TypewriterAR | mit | 1,158 | 45 | codeparrot/github-code |
fd2c1ad4be6878eccfaf8b730622a70810c71cf008600087f9d5afbb5ce6dacb | <?php
namespace App\AAS_Bundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use App\AAS_Bundle\Utils\AAS as AAS;
/**
* Person
*/
class Person
{
/**
* @var integer
*/
private $id;
/**
* @var string
*/
private $surname;
/**
* @var string
*/
... | PHP | src/App/AAS_Bundle/Entity/Person.php | mrkonovalov/AAS | mit | 8,735 | 454 | codeparrot/github-code |
58b9c79319005842899dd7394eee1b31d675147e8023695d0445963ba5bd9b8a | package me.streib.janis.nanhotline.web;
import java.io.File;
import java.io.FileInputStream;
import java.io.InputStream;
import java.net.InetSocketAddress;
import org.eclipse.jetty.server.Handler;
import org.eclipse.jetty.server.Server;
import org.eclipse.jetty.server.SessionManager;
import org.eclipse.jetty.server.h... | Java | webFrontend/src/me/streib/janis/nanhotline/web/Launcher.java | janisstreib/nan-hotline | mit | 2,118 | 56 | codeparrot/github-code |
9d8efed1e1e28f285d8e1a163fe9cbf2bcbb7b407f66115bbe1149ea07880e32 | import chalk = require("chalk");
import { take, select } from "redux-saga/effects";
import path = require("path");
import moment = require("moment");
import { titleize } from "inflection";
import { parallel } from "mesh";
import { weakMemo } from "../memo";
import AnsiUp from "ansi_up";
import { reader } from "../mona... | TypeScript | packages/aerial-common2/src/log/console.ts | crcn/aerial | mit | 4,629 | 148 | codeparrot/github-code |
1b0ad51e04f21b78cd1253486e73ae234258d98acdbf4d319a308a96fff0902d | <?php
namespace Payname\Security;
use Payname\Exception\ApiCryptoException;
/**
* Class Crypto
* Extract from https://github.com/illuminate/encryption
*/
class Crypto
{
/**
* The algorithm used for encryption.
*
* @var string
*/
private static $cipher = 'AES-128-CBC';
/**
* En... | PHP | src/Payname/Security/Crypto.php | tplessis/Payname-php-sdk | mit | 3,450 | 129 | codeparrot/github-code |
0bd6d286e8ee83c1a12bcc1b76ad1b252b1bb0b297f753f4a9d7d1b1fb2a04c6 |
"""
Visualize possible stitches with the outcome of the validator.
"""
import math
import random
import matplotlib.pyplot as plt
import networkx as nx
import numpy as np
from mpl_toolkits.mplot3d import Axes3D
import stitcher
SPACE = 25
TYPE_FORMAT = {'a': '^', 'b': 's', 'c': 'v'}
def show(graphs, request, title... | Python | stitcher/vis.py | tmetsch/graph_stitcher | mit | 5,618 | 187 | codeparrot/github-code |
0d3969a3e0a0fcdd1f272c4de8e089dae09e08f4b00b4083406b10f5a4640b23 | package de.verygame.surface.screen.base;
import com.badlogic.gdx.InputMultiplexer;
import com.badlogic.gdx.graphics.g2d.PolygonSpriteBatch;
import com.badlogic.gdx.utils.viewport.Viewport;
import java.util.Map;
/**
* @author Rico Schrage
*
* Context which can contain several subscreens.
*/
public class SubScreen... | Java | gdx-surface/src/main/java/de/verygame/surface/screen/base/SubScreenContext.java | VeryGame/gdx-surface | mit | 4,133 | 167 | codeparrot/github-code |
26b14b4a28c503a0609db8f8ee443fd20f3c8d0b60901e76ef05ed496b3a5356 | package x7c1.linen.scene.updater
import android.app.Service
import x7c1.linen.database.control.DatabaseHelper
import x7c1.linen.glue.service.ServiceControl
import x7c1.linen.repository.date.Date
import x7c1.linen.repository.dummy.DummyFactory
import x7c1.linen.repository.preset.PresetFactory
import x7c1.wheat.macros.l... | Scala | linen-scene/src/main/scala/x7c1/linen/scene/updater/UpdaterMethods.scala | x7c1/Linen | mit | 997 | 34 | codeparrot/github-code |
dab084bca3e8dcdcd266a6ac3a567ca01ae1a8ebb0993e4dacf29025968af12a | const { InventoryError,
NotFoundError } = require('../../errors')
const checkExists = (data) => {
return (entity) => {
if (!entity) throw new NotFoundError(`${data} not found`)
return entity
}
}
module.exports = (sequelize, DataTypes) => {
const Pokemon = sequelize.define('Pokemon', {
name: DataTy... | JavaScript | src/database/models/Pokemon.js | gcaraciolo/pokemon-challenge | mit | 1,131 | 53 | codeparrot/github-code |
3273f524ba89e1721ea9d3ef2196253fee1db341d1fb52b986226a5c3ddfd9aa | # -*- coding: utf-8 -*-
# django-simple-help
# simple_help/admin.py
from __future__ import unicode_literals
from django.contrib import admin
try: # add modeltranslation
from modeltranslation.translator import translator
from modeltranslation.admin import TabbedDjangoJqueryTranslationAdmin
except ImportErro... | Python | simple_help/admin.py | DCOD-OpenSource/django-simple-help | mit | 1,108 | 49 | codeparrot/github-code |
844cb8fed7e727de51d622cfe20da0d765f23e9bcea524c68c321122b689a468 | using UnityEngine;
using System.Collections;
public class CameraShake : MonoBehaviour
{
// Transform of the camera to shake. Grabs the gameObject's transform
// if null.
public Transform camTransform;
// How long the object should shake for.
public float shakeDuration = 0f;
// Amplitude of the shake. A larg... | C# | Assets/Shooter/Scripts/Shooter/CameraShake.cs | hakur/shooter | mit | 922 | 46 | codeparrot/github-code |
dcf0c3dcd4973386e49604c90e56f95ba78841787983ab4d29c5f35d8b8f39b7 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
namespace MyW... | C# | Module3-DeploymentAndAzure/Source/MyWebApp/src/MyWebApp/Startup.cs | Microsoft-Build-2016/CodeLabs-WebDev | mit | 2,016 | 61 | codeparrot/github-code |
d5fa32eff1f0e5cd0fa515a6e60738486158b1621908bbacfbfa0ad48d33fc48 | # -*- coding: utf-8 -*-
import sys
from io import BytesIO
import argparse
from PIL import Image
from .api import crop_resize
parser = argparse.ArgumentParser(
description='crop and resize an image without aspect ratio distortion.')
parser.add_argument('image')
parser.add_argument('-w', '-W', '--width', metavar='<... | Python | crimg/bin.py | codeif/crimg | mit | 1,481 | 41 | codeparrot/github-code |
5203499bfb2591220aec8c4d51ea4537ddacb6056e85cb63288c16ac95cf4c04 | using System;
using System.Windows.Input;
namespace RFiDGear.ViewModel
{
/// <summary>
/// Description of RelayCommand.
/// </summary>
public class RelayCommand : ICommand
{
public event EventHandler CanExecuteChanged
{
add { CommandManager.RequerySuggested += value; }
remove { CommandManager.RequerySu... | C# | PluginSystem/DataAccessLayer/RelayCommand.cs | c3rebro/RFiDGear | mit | 983 | 45 | codeparrot/github-code |
9ad19266c9c9577f0628472109cbf784132bfc2de82c89e724b6c097e9450537 | package com.etop.service;
import com.etop.dao.UserDAO;
import com.etop.pojo.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.io.Serializable;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* 用户服务,与dao进行对接
* <... | Java | vskeddemos/projects/shirodemo/SpringMVC_Shiro/src/com/etop/service/UserService.java | brucevsked/vskeddemolist | mit | 888 | 40 | codeparrot/github-code |
28218b6bb93d1038a4c929ded7b0dcfbb76b1d8acecaa05909ee47281fe6ea87 | from __future__ import print_function
import os
import sys
import subprocess
import pkg_resources
try:
import pkg_resources
_has_pkg_resources = True
except:
_has_pkg_resources = False
try:
import svn.local
_has_svn_local = True
except:
_has_svn_local = False
def test_helper():
return... | Python | metaplot/helpers.py | MetaPlot/MetaPlot | mit | 4,900 | 172 | codeparrot/github-code |
757615103418fd423fe0188152bbf5769cfe76268575c60770018f04096cb5c0 | package states;
import java.awt.Color;
import java.awt.Font;
import java.awt.Graphics;
import java.awt.image.BufferedImage;
import java.util.ArrayList;
import database.DeleteGame;
import database.LoadGame;
import game.Game;
import graphics.ButtonAction;
import graphics.Text;
import graphics.UIButton;
import graphics.... | Java | ChessGame/src/states/MenuState.java | BrunoMarchi/Chess_Game-LCP_2017 | mit | 11,128 | 294 | codeparrot/github-code |
5d0de7ba405e97338e986b6000a8025f25281984e90552753d3c33a40dca0b69 | <?php
declare(strict_types = 1);
use PHPUnit\Framework\TestCase;
use Sop\JWX\JWA\JWA;
use Sop\JWX\JWS\Algorithm\NoneAlgorithm;
use Sop\JWX\JWT\Parameter\AlgorithmParameter;
use Sop\JWX\JWT\Parameter\JWTParameter;
/**
* @group jwt
* @group parameter
*
* @internal
*/
class JWTAlgorithmParameterTest extends TestCa... | PHP | test/unit/jwt/parameter/AlgorithmTest.php | sop/jwx | mit | 896 | 40 | codeparrot/github-code |
3f409342b037b916d4718dc5170b01cad802dc6c7a8b0f541f3b42ebdedfa076 | import { Directive, Input, OnChanges, SimpleChanges } from '@angular/core';
import { AbstractControl, NG_VALIDATORS, Validator, ValidatorFn, Validators } from '@angular/forms';
export function forbiddenNameValidator(nameRe: RegExp): ValidatorFn {
return (control: AbstractControl): {[key: string]: any} => {
const... | TypeScript | src/app/func/sign-up/forbidden-name.directive.ts | TaylorPzreal/curriculum-vitae | mit | 1,223 | 35 | codeparrot/github-code |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.