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 |
|---|---|---|---|---|---|---|---|---|
7cb524a73183a34dbbec5eaf71aa04d876ce67672005c06d5f8002db18ce4d68 |
module ModPlanet
use ModConstants
use ModSizeGITM
implicit none
! Modified (01/18/07) : SWB : Aij, s-exponents for mutual diffusion
! Modified (06/12/08) : SWB : ordering to species revised
! Modified (06/12/08) : SWB : nSpecies = 6; nSpeciesTotal = 11
! Majors (6): COntrol the Pressures Gradients and w... | FORTRAN | src/ModMars.f90 | dpawlows/MGITM | mit | 45,867 | 1,382 | codeparrot/github-code |
d87c20202bcb82612611f06cea5286129f18c0a147572827d5f3e8cedd227995 | const electron = require('electron');
const ipcRenderer = electron.ipcRenderer;
window.onload = function() {
ipcRenderer.send('game-preview-loaded');
}
ipcRenderer.on('game-preview-start', function(event, data) {
var app = new Application({
// resize: true,
fullscreen: true,
antyAliasing: true,
... | JavaScript | src/game-preview/js/index.js | Baransu/Amble-Engine | mit | 1,676 | 75 | codeparrot/github-code |
464c99a0aebdde944ebd908210bc28d92c2fd13dc777fdd1c648b978a05757dc | <!-- Modal -->
<div class="modal fade" id="explor_post" tabindex="-1" role="dialog" aria-labelledby="post_structlLabel">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span... | PHP | application/modules/om/views/_element/orgPostStruct_modal.php | freon-lunarion/dew | mit | 1,450 | 51 | codeparrot/github-code |
518978e8c3f573867a9e32984a47f927f77afdbe9a007a7bd19008b23ef3cd35 | using System.Collections.ObjectModel;
using ActiproSoftware.Text;
using ActiproSoftware.Text.Utility;
using ActiproSoftware.Windows.Controls.SyntaxEditor;
using ActiproSoftware.Windows.Controls.SyntaxEditor.IntelliPrompt.Implementation;
using NQuery.Authoring.ActiproWpf.SymbolContent;
using NQuery.Authoring.ActiproWp... | C# | src/NQuery.Authoring.ActiproWpf/QuickInfo/NQueryQuickInfoProvider.cs | terrajobst/nquery-vnext | mit | 2,436 | 68 | codeparrot/github-code |
a866b32d7df5954a53ad359aaaa7fa57fb237c91111e4c071343300f0d70ddec | Template.friendPosts.onCreated(function() {
Bisia.Notification.resetNotify('note', 'post');
})
Template.friendPosts.helpers({
getPost: function(postId) {
var post = Posts.findOne(postId);
if (post) {
var user = Users.findOne({ '_id': post.authorId }, { 'fields': {
'username': 1,
'profile.city': 1,
... | JavaScript | client/pages/friend_posts.js | redbaron76/Bisiacaria.com | mit | 1,141 | 45 | codeparrot/github-code |
f7c5eacb85c36becd9b91d23016878f1908e1a0a4b6ff5274f455e91f0acceec | var fs = require('fs'),
eol = require('eol'),
path = require('path'),
mkdirp = require('mkdirp'),
watch = require('watch');
var specialFiles = {
'welcome.md': function(fileContent, consoleContent) {
consoleContent.welcome = processFileContent(fileContent);
},
'config.json': function... | JavaScript | parse-content.js | furti/mighty-quest-for-tux | mit | 3,541 | 135 | codeparrot/github-code |
9468706959a8b799621346583b9b456f1f0c3c437bc626b43c4b07dbe3d811c9 | #!/bin/bash
set -e
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
channel() {
if [ -n "${TRAVIS}" ]; then
if [ "${TRAVIS_RUST_VERSION}" = "${CHANNEL}" ]; then
pwd
(set -x; cargo "$@")
fi
elif [ -n "${APPVEYOR}" ]; then
if [ "${APPVEYOR_RUST_CHANNEL}" = "${... | Shell | serde_json/travis.sh | tomasvdw/bitcrust | mit | 1,072 | 46 | codeparrot/github-code |
8b8a8b47f0a2ea724c749b1bef9c8d3e56f14f1b90a675dad39e2df9a641f403 | <?php
include_once('conexao.class.php');
class Disciplina{
public $id_disciplina;
public $nome;
public $professor;
public $curso;
public $carga_horaria;
public function __construct(){
//print "Disciplina instanciada!";
}
public function gravar(){
$sql = "insert into disciplina (nome, professo... | PHP | less/disciplina.class.php | STRVIRTU/tcc-2017 | mit | 960 | 45 | codeparrot/github-code |
18c8d03460e0a3797cf3df3a984bd36560b3b0e513f83004c9b51f7cef50e71b | //
// MIT License
//
// Copyright 2019
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publi... | C++ | source/jones/controller/controller.cc | thejunkjon/jones | mit | 6,251 | 217 | codeparrot/github-code |
d1aca23ead89f31a5bcd1debfc0ba27a98ae3403ba58d8ed61f740a654f3798f | import datetime
import time
import boto
import redis
import requests
import random
import zlib
from django.shortcuts import get_object_or_404
from django.shortcuts import render
from django.contrib.auth.decorators import login_required
from django.template.loader import render_to_string
from django.db import IntegrityE... | Python | apps/reader/views.py | slava-sh/NewsBlur | mit | 95,205 | 2,214 | codeparrot/github-code |
862d4a87ffa812e8bbf036b25bd3bf491147a3d08a2c4c155a2e1ca584341d98 | <!doctype html>
<!--[if lt IE 7]><html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en"> <![endif]-->
<!--[if (IE 7)&!(IEMobile)]><html class="no-js lt-ie9 lt-ie8" lang="en"><![endif]-->
<!--[if (IE 8)&!(IEMobile)]><html class="no-js lt-ie9" lang="en"><![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en"><!--<!... | HTML | _layouts/post.html | JiachengSHI/JiachengSHI.github.io | mit | 4,430 | 73 | codeparrot/github-code |
228e2119523bfa1c6003017b9d1986c12f7d6cfa9f24a6007c3b073fedf41884 | import "reflect-metadata";
import {createTestingConnections, closeTestingConnections, reloadTestingDatabases} from "../../utils/test-utils";
import {Connection} from "../../../src/connection/Connection";
import {Post} from "./entity/Post";
import {expect} from "chai";
import {PostStatus} from "./model/PostStatus";
des... | TypeScript | test/github-issues/182/issue-182.ts | ReaxDev/typeorm | mit | 2,660 | 79 | codeparrot/github-code |
175040419264102e3b3194c00e19e6d12d538e82bcf13f6aca926e7217b62ea0 | // nodejs按行读取文件流
var Stream = require('stream').Stream,
util = require('util');
var LineStream = function() {
this.writable = true;
this.readable = true;
this.buffer = '';
};
util.inherits(LineStream, Stream);
LineStream.prototype.write = function(data, encoding) {
if (Buffer.isBuffer(data)) {
data = data.to... | JavaScript | lib/tool/lineStream.js | SBFE/js-combine-pack | mit | 666 | 38 | codeparrot/github-code |
4bd73903971c8f72cb8b35149fa715a91496ba7e30efe3c9fe710f5cb9ef8029 | using LibrarySystem.Models;
using Microsoft.AspNet.Identity;
using Microsoft.AspNet.Identity.EntityFramework;
using System;
using System.Collections.Generic;
using System.Linq;
namespace LibrarySystem.Account
{
public partial class Manage : System.Web.UI.Page
{
protected string SuccessMessage
... | C# | LibrarySystem/LibrarySystem/Account/Manage.aspx.cs | krasimirkrustev/ta-library-system | mit | 4,296 | 117 | codeparrot/github-code |
34569cbb842db791d931eeb27727519060f9a3fbd233cc36831594f965acaedd | __author__ = "Guillaume"
__license__ = "MIT"
__copyright__ = "2015, ESRF"
import numpy
from freesas.model import SASModel
class Grid:
"""
This class is used to create a grid which include all the input models
"""
def __init__(self, inputfiles):
"""
:param inputfiles: list of pdb files... | Python | freesas/average.py | kif/freesas | mit | 9,116 | 272 | codeparrot/github-code |
81dd869777015a14ef448fc2afc954268207f7c62c19227034b4e3ec37bb33bc | // Based on "Design Patterns: Elements of Reusable Object-Oriented Software"
// book by Erich Gamma, John Vlissides, Ralph Johnson, and Richard Helm
//
// Created by Bartosz Rachwal. The National Institute of Advanced Industrial Science and Technology, Japan.
#include "btree.h"
namespace structural
{
namespace flywe... | C++ | structural/src/flyweight/btree.cc | rachwal/DesignPatterns | mit | 1,119 | 67 | codeparrot/github-code |
d5482039eaa4ccda42def9289bd11d574ad9ac72dca57b359579579f8e4a54c0 | #include <assert.h>
#include <math.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
// #include <antlr3.h>
#include "toml.h"
#include "toml-parser.h"
// #include "tomlParser.h"
// #include "tomlLexer.h"
struct _TOMLStringifyData {
TOMLError *error;
int bufferSi... | C | toml.c | mzgoddard/tomlc | mit | 25,919 | 974 | codeparrot/github-code |
bcc9076ddb23ff206c9509915d8f0a3ae050b055e4e01e558ab9093fd629bf22 | /*
* Copyright 2013 ZXing authors
*
* 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 applicable law or agreed t... | TypeScript | src/test/core/common/reedsolomon/ReedSolomon.spec.ts | zxing-js/library | mit | 32,086 | 622 | codeparrot/github-code |
5b66e02e132ce048eb362e446dd67c836654ecfe74f943e90d0e1d30a55d9a3a | #!/usr/bin/env python
"""
Project-wide application configuration.
DO NOT STORE SECRETS, PASSWORDS, ETC. IN THIS FILE.
They will be exposed to users. Use environment variables instead.
See get_secrets() below for a fast way to access them.
"""
import os
"""
NAMES
"""
# Project name used for display
PROJECT_NAME = 'q... | Python | app_config.py | 18F/quotable | mit | 1,915 | 86 | codeparrot/github-code |
0f3c3b885c2d02479cf084a976b597160fedc9409bdcdb04a0438260f55ef826 | // @flow
import React from 'react'
import withPropsStream from '@vega/utils/withPropsStream'
import {map} from 'rxjs/operators'
import styles from './styles/Communicator.css'
import ThreadList from './ThreadList'
import CreateComment from './CreateComment'
function getPropsStream(props$) {
// todo: implement open/c... | JavaScript | packages/@vega/communicator-system/src/components/providers/Communicator.js | VegaPublish/vega-studio | mit | 1,991 | 77 | codeparrot/github-code |
2e703f9023e302eb435257f47e4c10f5d72e3e694b569b33afcfde278c4164ea |
/* Error handling */
#include "Python.h"
void
PyErr_Restore(PyObject *type, PyObject *value, PyObject *traceback)
{
PyThreadState *tstate = PyThreadState_GET();
PyObject *oldtype, *oldvalue, *oldtraceback;
/* Save these in locals to safeguard against recursive
invocation through Py_XDECREF */
oldtype = tsta... | C | necco/python/Python/errors.c | jtauber/cleese | mit | 8,613 | 379 | codeparrot/github-code |
84ad25ad0b70ca65bb83fcad0ab3eaccf663007785b90f64902bd08f79a318a8 | /*
* Copyright (c) 2014-2022 The Voxie Authors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, mer... | C++ | src/VoxieBackend/Component/ExternalOperation.hpp | voxie-viewer/voxie | mit | 4,192 | 151 | codeparrot/github-code |
dacb3e258c248dd4ca497517cc3bcb1d4996f3165b760733559b420a4e605148 | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>unicoq: Not compatible 👼</title>
<link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" />
<link href="../../../../../bootstrap.min.css"... | HTML | clean/Linux-x86_64-4.06.1-2.0.5/released/8.7.1/unicoq/1.0.0.html | coq-bench/coq-bench.github.io | mit | 6,701 | 166 | codeparrot/github-code |
2221c351daa203517ad6f8df916ee6f8541d15238394315ee94f51784ab99b57 | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="generator" content="rustdoc">
<meta name="description" content="API documentation for the Rust `FromUtf8Error` struct in crate `collections`.">
<meta name... | HTML | Rust/share/doc/rust/html/collections/string/struct.FromUtf8Error.html | ArcherSys/ArcherSys | mit | 7,777 | 107 | codeparrot/github-code |
1e8b707142eee90c2535c0c8bbda3ded6bc26cae98c4dace4ebb1112ce6a6043 | import os
import logging
from django.core.management.base import BaseCommand
from django.core.mail import send_mail
from django.template.loader import get_template
from workshops.models import Badge, Person, Role
logger = logging.getLogger()
class Command(BaseCommand):
help = 'Report instructors activity.'
... | Python | amy/workshops/management/commands/instructors_activity.py | swcarpentry/amy | mit | 5,305 | 144 | codeparrot/github-code |
168a3e4f0a6b321dcccd8cf78a4158b4bd36d4949021501d251224f22f7a25b1 | <?php
/*
* This file is part of the Phuri package.
*
* Copyright © 2014 Erin Millard
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Eloquent\Phuri\Generic;
use Eloquent\Pathogen\Factory\PathFactoryInterface;
use Eloqu... | PHP | src/Generic/AbstractGenericUri.php | ezzatron/phuri | mit | 12,050 | 467 | codeparrot/github-code |
1d21cc0ef113e4939e7d18a7b4c0739d8e06b04138af35677637ab87c7eed264 | /*
* This file is part of Sponge, licensed under the MIT License (MIT).
*
* Copyright (c) SpongePowered <https://www.spongepowered.org>
* Copyright (c) contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Softwar... | Java | src/main/java/org/spongepowered/common/data/manipulator/block/SpongeSignaledOutputData.java | gabizou/SpongeCommon | mit | 2,441 | 63 | codeparrot/github-code |
435b01625c123737ef62caf0e2d2af624896883390bf93df2416e972d37a8ae8 | # -*- coding: utf-8 -*-
"""
Created on Fri Jun 25 16:20:12 2015
@author: Balázs Hidasi
@lastmodified: Loreto Parisi (loretoparisi at gmail dot com)
"""
import sys
import os
import numpy as np
import pandas as pd
import datetime as dt
# To redirect output to file
class Logger(object):
def __init__(self, filename=... | Python | theano/rsc15/preprocess.py | loretoparisi/docker | mit | 3,324 | 68 | codeparrot/github-code |
b3242eaa56e97e93c3775e832349baf37c8e7a97238480d5031b3f4796f2cceb | <?php
namespace PSR2R\Sniffs\Commenting;
use PHP_CodeSniffer\Files\File;
use PHP_CodeSniffer\Util\Tokens;
use PSR2R\Tools\AbstractSniff;
use PSR2R\Tools\Traits\CommentingTrait;
use PSR2R\Tools\Traits\SignatureTrait;
/**
* Methods always need doc blocks.
* Constructor and destructor may not have one if they do not ... | PHP | PSR2R/Sniffs/Commenting/DocBlockSniff.php | php-fig-rectified/psr2r-sniffer | mit | 5,275 | 196 | codeparrot/github-code |
0e3807b6257f4fcbb78d5218f431968fba76fbe5c5a3c5ee150fa09a020209d7 | (function() {
'use strict';
process.env.debug_sql = true;
var Class = require('ee-class')
, log = require('ee-log')
, assert = require('assert')
, fs = require('fs')
, QueryContext = require('related-query-context')
, ORM ... | JavaScript | test/extension.js | eventEmitter/related-timestamps | mit | 8,369 | 236 | codeparrot/github-code |
6471bca9b9acf7abc630f8b06bc161e5e021f4c1b71c4ea4cfb4c9b2c473c3be | var passport = require('passport');
var WebIDStrategy = require('passport-webid').Strategy;
var tokens = require('../../util/tokens');
var ids = require('../../util/id');
var console = require('../../log');
var createError = require('http-errors');
var dateUtils = require('../../util/date');
var url = require('url');
... | JavaScript | lib/auth/providers/webid.js | Agile-IoT/agile-idm-web-ui | mit | 3,465 | 76 | codeparrot/github-code |
63a8101546ecb3d5cac412dd07ba67e836366bc5ca3ea2132211b4bd6a7bb5ed | <?php
/*
* This file is part of the Sylius package.
*
* (c) Paweł Jędrzejewski
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
declare(strict_types=1);
namespace Sylius\Bundle\CoreBundle\Command;
use Sylius\Component\Core\Model... | PHP | src/Sylius/Bundle/CoreBundle/Command/SetupCommand.php | vihuvac/Sylius | mit | 8,224 | 257 | codeparrot/github-code |
e0fa6df9844299273d01957ccef5f3708dc616db0f7c9747cd2eb3c8ae88f10b | {% extends "base.html" %}
{% load static %}
{% load template_extras %}
{% block title %}Analyse{% endblock %}
{% block active_class %}analyse{% endblock %}
{% block extra_css %}
<link href="{% static 'css/select2.min.css' %}" rel="stylesheet">
<link href="{% static 'css/jquery.nouislider.css' %}" rel="stylesheet">
<l... | HTML | openprescribing/templates/analyse.html | ebmdatalab/openprescribing | mit | 11,992 | 267 | codeparrot/github-code |
f3c1cd1f86a11cfedbc925142be8723e043e854e88132c0b552b57eab7d35214 | <!doctype html>
<html class="theme-next pisces use-motion">
<head>
<meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
<meta http-equiv="Cache-Control" content="no-transform" />
<meta... | HTML | public/2017/01/17/随手记20170118/index.html | HankCoder/BlogBackup | mit | 26,596 | 997 | codeparrot/github-code |
71dc19e87db038b3e9ff470b9703d44e8b9558f18705d29102f37e6936d73173 | using System;
using Newtonsoft.Json;
namespace MultiSafepay.Model
{
public class Transaction
{
[JsonProperty("transaction_id")]
public string TransactionId { get; set; }
[JsonProperty("payment_type")]
public string PaymentType { get; set; }
[JsonProperty("order_id")]
... | C# | Src/MultiSafepay/Model/Transaction.cs | MultiSafepay/.Net | mit | 1,054 | 31 | codeparrot/github-code |
a862ad3735ccfa43cd8bb68caafba8b646217223f1d036218117c718d2417745 | const chai = require('chai');
const expect = chai.expect;
const ComplexArray = require('../complex-array/complex-array');
function assertArrayEquals(first, second) {
const message = `${first} != ${second}`;
first.forEach((item, i) => {
expect(item).to.equal(second[i], message);
});
}
describe('Complex Ar... | JavaScript | test/complex-array.spec.js | JoeKarlsson/data-structures | mit | 3,055 | 123 | codeparrot/github-code |
66bb22a17f2249e0bfeeee836c755df306e475565ef5f1c6c0e45451f7095da4 | /*
* Copyright (C) 2011 by Jakub Lekstan <kuebzky@gmail.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, cop... | C++ | src/node-rusage.cc | kuebk/node-rusage | mit | 4,830 | 132 | codeparrot/github-code |
27e24ae4b937e6a9c48a0b81928b592ecbad296f71ff4e495374d65889d38b00 | /*
* 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 config;
import interfaces.*;
import java.sql.*;
import java.util.logging.*;
import javax.swing.*;
/**
*
* @author Luis G
*... | Java | Topicos Avanzados de Programacion/Tabla/Tabla con base de datos y login/src/config/Connector.java | Luis-Gdx/escuela | mit | 2,950 | 98 | codeparrot/github-code |
2a3af8d1473ce27ea8f131e970ee4074443943f90effd61a1276c9e41dd9bbb5 | /*
* mysplit.c - Another handy routine for testing your tiny shell
*
* usage: mysplit <n>
* Fork a child that spins for <n> seconds in 1-second chunks.
*/
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <signal.h>
int main(int argc, char **argv)
{
... | C | routines/mysplit.c | heapsters/shelldon | mit | 640 | 36 | codeparrot/github-code |
a927be9cb95ce0aa8339acecfa8d7e4c100ca72fba9351629c95c5ca36e2dabb | using System;
using System.Threading;
using MonoTouch.Foundation;
using MonoTouch.UIKit;
namespace vplan
{
public class PrefManager
{
NSUserDefaults locstore = new NSUserDefaults();
bool notified = false;
public PrefManager ()
{
refresh ();
}
protected void refresh () {
locstore.Synchronize ();
... | C# | vplan/vplan.Kit/PrefManager.cs | reknih/informant-ios | mit | 741 | 40 | codeparrot/github-code |
69cfd185e19499505ab0d99aa2a1b2af7568d5001f220a1de0d6d9b913043c51 | /* ========================================================================
* DOM-based Routing
* Based on http://goo.gl/EUTi53 by Paul Irish
*
* Only fires on body classes that match. If a body class contains a dash,
* replace the dash with an underscore when adding it to the object below.
*
* .noConflict()
* ... | JavaScript | assets/scripts/main.js | erikkowalski/hoe-sage-8.1.0 | mit | 2,737 | 87 | codeparrot/github-code |
b2f777c8e83681dec2c4151e4c7181e2e8da3fcdd26c4557407e83dfafc09c94 | exports.__esModule = true;
exports.parseServerOptionsForRunCommand = parseServerOptionsForRunCommand;
exports.parseRunTargets = parseRunTargets;
var _cordova = require('../cordova');
var cordova = babelHelpers.interopRequireWildcard(_cordova);
var _cordovaProjectJs = require('../cordova/project.js');
var _cordovaRu... | JavaScript | tools/cli/commands.js | lpinto93/meteor | mit | 76,122 | 2,126 | codeparrot/github-code |
84fc142172ec9f029bafb6b8bdedeefbbc0deec6cb46cc9847d9023c0cdcb368 |
from attributes import *
from constants import *
# ------------------------------------------------------------------------------
#
class UnitManager (Attributes) :
"""
UnitManager class -- manages a pool
"""
# --------------------------------------------------------------------------
#
... | Python | docs/architecture/api_draft/unit_manager.py | JensTimmerman/radical.pilot | mit | 3,311 | 113 | codeparrot/github-code |
2de9c9beb63c624043a29cb1e05cb7ff5f2f121f6fbc25d90190d4af4b862156 | 'use strict';
angular.module('terminaaliApp')
.factory('Auth', function Auth($location, $rootScope, $http, User, $cookieStore, $q) {
var currentUser = {};
if($cookieStore.get('token')) {
currentUser = User.get();
}
return {
/**
* Authenticate user and save token
*
*... | JavaScript | client/components/auth/auth.service.js | henrikre/terminaali | mit | 3,575 | 147 | codeparrot/github-code |
b98dff9871724fb1430de66f550dfd69a12b74d766286c6b441cb262895d7c2b | $(document).ready(function(){
var toggleMuffEditor = function(stat=false){
$("#muff-opt").remove();
// bind event
if(stat){
$(".muff").mouseover(function() {
$("#muff-opt").remove();
muffShowOptions($(this));
$(window).scroll(function(){
$("#muff-opt").remove();
}) ... | JavaScript | src/Public/main/js/muffincms.js | johnguild/muffincms | mit | 7,581 | 292 | codeparrot/github-code |
43c45e1ae28a1d8f0b65e1c68faa9cbd74fb14309682cc9e820803d50bd0c984 | 'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = undefined;
var _classCallCheck2 = require('babel-runtime/helpers/classCallCheck');
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
var _possibleConstructorReturn2 = require('babel-runtime/helpers/p... | JavaScript | antd-mobile-custom/antd-mobile/lib/table/index.web.js | forwk1990/wechart-checkin | mit | 3,641 | 96 | codeparrot/github-code |
c10482fad9e06b0524c0cb04fdbd7e3edb1bcabd1a38cf69c1f25c1bc0805337 | package jp.opap.material.model
import java.util.UUID
import jp.opap.data.yaml.Node
import jp.opap.material.data.Collections.{EitherSeq, Seqs}
import jp.opap.material.facade.GitLabRepositoryLoaderFactory.GitlabRepositoryInfo
import jp.opap.material.model.RepositoryConfig.RepositoryInfo
import jp.opap.material.model.Wa... | Scala | rest/src/main/scala/jp/opap/material/model/RepositoryConfig.scala | opap-jp/material-explorer | mit | 2,531 | 73 | codeparrot/github-code |
298ea4a6b53eeb5d832e27f2322820e3027c74b5076b6666fea90f6a9e3e8a71 | using System.ComponentModel;
namespace NSysmon.Collector.HAProxy
{
/// <summary>
/// Current server statuses
/// </summary>
public enum ProxyServerStatus
{
[Description("Status Unknown!")]
None = 0, //Won't be populated for backends
[Description("Server is up, status nor... | C# | NSysmon.Collector/HAProxy/ProxyServerStatus.cs | clearwavebuild/nsysmon | mit | 2,904 | 82 | codeparrot/github-code |
8f19bbff42a95dcf9728c668d79550f7805005ced0aa53cabdc05082018464fe | package engine;
import java.awt.Color;
import java.awt.Graphics2D;
import java.awt.Point;
public class CircleShape extends Shape {
double radius; //radius of shape
public CircleShape(double rad, Vector2D v, double r, double d, Color c) {
super(v, r, d, c);
radius = rad;
}
@Override
... | Java | src/engine/CircleShape.java | bjornenalfa/GA | mit | 1,041 | 38 | codeparrot/github-code |
30bf2b357fb4457523be928c8ec073eae58af210029764963da3787e2a474123 | import {
assign,
forEach,
isArray
} from 'min-dash';
var abs= Math.abs,
round = Math.round;
var TOLERANCE = 10;
export default function BendpointSnapping(eventBus) {
function snapTo(values, value) {
if (isArray(values)) {
var i = values.length;
while (i--) if (abs(values[i] - value) <... | JavaScript | lib/features/bendpoints/BendpointSnapping.js | pedesen/diagram-js | mit | 4,283 | 196 | codeparrot/github-code |
f7efd360375d2d8a1fb08e93bc253920e84d90d33bb949499033e2151520eebf | var changeSpan;
var i = 0;
var hobbies = [
'Music',
'HTML5',
'Learning',
'Exploring',
'Art',
'Teaching',
'Virtual Reality',
'The Cosmos',
'Unity3D',
'Tilemaps',
'Reading',
'Butterscotch',
'Drawing',
'Taking Photos',
'Smiles',
'The Poetics of Space',
'Making Sounds',
'Board games',
'Trave... | JavaScript | static/js/hobbies.js | oddgoo/oddgoo.com | mit | 725 | 45 | codeparrot/github-code |
09b4eb0b413f597e3e1da7c3b7ae9d17114194fe290a8bebdb71160b8b2a1db3 | <?php
namespace App\Http\ViewComposers;
use App\Models\Character;
use App\Models\Message;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Support\Arr;
use Illuminate\Support\Facades\Auth;
use Illuminate\View\View;
class CharacterMessagesComposer
{
/**
* Bind data to the view.
*
* @param ... | PHP | app/Http/ViewComposers/CharacterMessagesComposer.php | mchekin/rpg | mit | 1,435 | 48 | codeparrot/github-code |
9136f8b41b9bf915e709feaabcc5116af81137dca6547503c810d15bb3a7c2d9 | ---
layout: default
archive: true
---
<script src="https://apis.google.com/js/platform.js" async defer></script>
<article class="post">
<header>
<h1>{{ page.title }}</h1>
<h2 class="headline">{{ page.date | date:"%B %-d, %Y" }}</h2>
</header>
<section id="post-body">
{{content}}
... | HTML | _layouts/post.html | MozillaTN/mozillatn.github.io | mit | 2,663 | 78 | codeparrot/github-code |
9f5026f47123e1f44fe03d3bbae9c3ab0b5f3b1e166c4a9bb214f2ab51d98bd9 | from src.tools.dictionaries import PostLoadedDict
# Utility class
################################################
class ServerImplementationDict(PostLoadedDict):
def __missing__(self, key):
try:
return super().__missing__(key)
except KeyError:
return NotImplemented
########... | Python | SBTK_League_Helper/src/interfacing/servers.py | juanchodepisa/sbtk | mit | 1,946 | 72 | codeparrot/github-code |
36fff91d8633332599f6986367d8b508c75b401d6a6c5ef9cd95edad679778ca | import {
GraphQLInputObjectType,
GraphQLID,
GraphQLList,
GraphQLBoolean,
} from 'graphql';
import RecipientTypeEnum from './RecipientTypeEnum';
import MessageTypeEnum from './MessageTypeEnum';
import NoteInputType from './NoteInputType';
import TranslationInputType from './TranslationInputType';
import Communi... | JavaScript | src/data/types/MessageInputType.js | nambawan/g-old | mit | 979 | 46 | codeparrot/github-code |
452a9b84e1759d758dce8f6763b4022cb8ab148c478fc860f98621e399a1725a | #include <boost/lexical_cast.hpp>
#include <disccord/models/user.hpp>
namespace disccord
{
namespace models
{
user::user()
: username(""), avatar(), email(), discriminator(0),
bot(false), mfa_enabled(), verified()
{ }
user::~user()
{ }
void use... | C++ | lib/models/user.cpp | FiniteReality/disccord | mit | 3,213 | 97 | codeparrot/github-code |
ce47d4508a0bbc2454d2f9bce50b0b0079907723b7d61b6ccc20a9a47e9ceb95 | //
// UIView+WebCacheOperation.h
// SKWebImage
//
// Created by 侯森魁 on 2019/8/23.
// Copyright © 2019 侯森魁. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "SKWebImageCompat.h"
#import "SKWebImageManager.h"
NS_ASSUME_NONNULL_BEGIN
@interface UIView (WebCacheOperation)
/**
Set the image load operation (s... | C | SKProject01/SKWebImage/lib/Categories/UIView+WebCacheOperation.h | housenkui/SKStruct | mit | 886 | 43 | codeparrot/github-code |
c5345e7655faeb61c08aecd186cc14a049ac07c3086369928c931700e9421de4 | //
//
/////////////////////////////////////////////////////////////////////////////
//
// Copyright 2014 Autodesk, Inc. All rights reserved.
//
// Use of this software is subject to the terms of the Autodesk license
// agreement provided at the time of installation or download, or which
// otherwise acco... | C | 2015/inc/truetypetext.h | kevinzhwl/ObjectARXCore | mit | 5,684 | 178 | codeparrot/github-code |
be405d1ff6ad2168346b4ec8e10ea36bc6093f336b198e97ff99b14f2ad5e411 | using System.IO;
namespace Mandro.Utils.Setup
{
public class DirectoryHelper
{
public DirectoryHelper()
{
}
public static void CopyDirectory(string sourceDirName, string destDirName, bool copySubDirs)
{
// Get the subdirectories for the specified directory.... | C# | Mandro.Utils/Setup/DirectoryHelper.cs | mandrek44/Mandro.Utils | mit | 1,603 | 49 | codeparrot/github-code |
bab3dbf9a32135b97856f308aff15c12a2d2ae18bcbf61ac66fa6b57058b2e42 | const CaseSensitivePathsPlugin = require('case-sensitive-paths-webpack-plugin');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const WatchMissingNodeModulesPlugin = require('react-dev-utils/WatchMissingNodeModulesPlugin');
const webpack = require('webpack');
const paths = require('./tools/paths');
const en... | JavaScript | webpack.config.js | hn3etta/VS2015-React-Redux-Webpack-Front-end-example | mit | 3,928 | 137 | codeparrot/github-code |
98f8fc2408d51b7be52f37b73e33f3e75e1d77c7a0d2bdf451326ab45299544c | // ==========================================================================
// snd_app
// ==========================================================================
// Copyright (c) 2006-2012, Knut Reinert, FU Berlin
// All rights reserved.
//
// Redistribution and use in source and b... | C++ | raw/pmsb13/pmsb13-data-20130530/sources/130wu1dgzoqmxyu2/2013-04-09T10-23-18.897+0200/sandbox/my_sandbox/apps/snd_app/snd_app.cpp | bkahlert/seqan-research | mit | 6,165 | 151 | codeparrot/github-code |
158cfe75176bccb1e568b70f0ad3730ab3a2201f71bd8e1ef8d37543249dd1d5 | using System;
using System.Collections.Generic;
using System.Reactive.Linq;
using System.Reactive.Threading.Tasks;
using MS.Core;
namespace System.Runtime.Remoting.Contexts
{
public static class __ContextAttribute
{
public static IObservable<System.Boolean> IsNewContextOK(
this IObservable<... | C# | Source/Wrappers/mscorlib/System.Runtime.Remoting.Contexts.ContextAttribute.cs | RixianOpenTech/RxWrappers | mit | 3,328 | 74 | codeparrot/github-code |
3732cfda60688165232552c5650567a9b9c19f18675594e236dc60cd564fcbf9 | # -*- coding: utf-8 -*-
#
# Copyright (C) 2008 John Paulett (john -at- paulett.org)
# Copyright (C) 2009, 2011, 2013 David Aguilar (davvid -at- gmail.com)
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution.
"""Python libr... | Python | myvenv/lib/python3.4/site-packages/music21/ext/jsonpickle/__init__.py | arnavd96/Cinemiezer | mit | 5,049 | 159 | codeparrot/github-code |
8c02ae7edf423247f17b1cc340eb10d0dacc57eafd68041e4d8f5bdf2fe4db18 | import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Set;
class ProteinTranslator {
private static final Integer CODON_LENGTH = 3;
private static final Map<String, String> CODON_TO_PROTEIN =
Map.ofEntries(
Map.entry("AUG", "Methionine"),
Map.entry("UUU... | Java | java/protein-translation/src/main/java/ProteinTranslator.java | rootulp/exercism | mit | 1,679 | 51 | codeparrot/github-code |
50c57d2347763a83d518b51fe21ddac2f6695a90c4c2d85ed02a72bfb64b87b9 | <?php
use Illuminate\Database\Seeder;
use jeremykenedy\LaravelRoles\Models\Permission;
class PermissionsTableSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
/*
* Add Permissions
*
*/
if (Permis... | PHP | database/seeds/PermissionsTableSeeder.php | jeremykenedy/larablog | mit | 3,481 | 101 | codeparrot/github-code |
415c9d64867222dbfab762009a8c3f742a2284b9b7391698a3b5b88fd6ce2bc8 | #-------------------------------------------------------------------------------
# osx.cmake
# Fips cmake settings file for OSX target platform.
#-------------------------------------------------------------------------------
set(FIPS_PLATFORM OSX)
set(FIPS_PLATFORM_NAME "osx")
set(FIPS_MACOS 1)
set(FIPS_OSX 1... | CMake | cmake-toolchains/osx.cmake | floooh/fips | mit | 4,722 | 108 | codeparrot/github-code |
af55c4349f8f72201a7bd0c801bc8cd0a93aa8727ea556b8c6a5c57d1ff71429 | using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
namespace TrueSync.Physics2D
{
// Original Code by Steven Lu - see http://www.box2d.org/forum/viewtopic.php?f=3&t=1688
// Ported to Farseer 3.0 by Nicolás Hormazábal
internal struct ShapeData
{
pu... | C# | YellowSignUnity/Assets/ThirdParty/Networking/TrueSync/Physics/Farseer/Common/PhysicsLogic/RealExplosion.cs | Xaer033/YellowSign | mit | 16,308 | 415 | codeparrot/github-code |
2d2970dcebc8200a588acc000e884d3f4f963d06ba835dd996dba78d7cd4c8af | -- This query extracts dose+durations of neuromuscular blocking agents
-- Note: we assume that injections will be filtered for carevue as they will have starttime = stopttime.
-- Get drug administration data from CareVue and MetaVision
-- metavision is simple and only requires one temporary table
with drugmv as
(
se... | SQL | mimic-iii/concepts/durations/neuroblock_dose.sql | MIT-LCP/mimic-code | mit | 9,203 | 317 | codeparrot/github-code |
5224ebe4c9b05ee96101020925f1d341ae91bcb2ef924ce89ae7a9f769623465 | #ifndef ABB_VALUE_H
#define ABB_VALUE_H
#include <type_traits>
#include <tuple>
namespace abb {
class und_t {};
class pass_t {};
const und_t und;
const pass_t pass;
template<typename Value>
struct is_und : std::is_same<Value, und_t> {};
template<typename Value>
struct is_pass : std::is_same<Value, pass_t> {};
... | C | include/abb/value.h | rusek/abb-cpp | mit | 3,236 | 141 | codeparrot/github-code |
fa3f99a2b6b1961b758f0e22a683ee9842e7ba477f0f2e9f42c564ed5b8e4088 | /*
* Copyright 2015 Google Inc. All Rights Reserved.
* 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 applicable... | JavaScript | vr_webpack/webvr-polyfill/src/pose-predictor.js | lacker/universe | mit | 8,626 | 267 | codeparrot/github-code |
450d899d646fdba2294409d8e94920411e3b5bcc64b1dbe15215042f94f430b3 | <?php
namespace Kuxin\Helper;
/**
* Class Collect
*
* @package Kuxin\Helper
* @author Pakey <pakey@qq.com>
*/
class Collect
{
/**
* 获取内容
*
* @param $data
* @return bool|mixed|string
*/
public static function getContent($data, $header = [], $option = [])
{
if (is_str... | PHP | kuxin/helper/collect.php | pakey/PTFrameWork | mit | 10,771 | 341 | codeparrot/github-code |
c83865c9579ab48625b8b147a64ae5df7ab74e32d28e608fba49741925490b12 | /**
* JS for the player character.
* * * * */
import * as Consts from './consts';
var leftLeg;
var rightLeg;
var leftArm;
var rightArm;
const BODY_HEIGHT = 5;
const LEG_HEIGHT = 5;
const HEAD_HEIGHT = Consts.BLOCK_WIDTH * (3/5);
const SKIN_COLORS = [0xFADCAB, 0x9E7245, 0x4F3F2F];
const BASE_MAT = new THREE.MeshL... | JavaScript | js/src/player.js | Bjorkbat/tetratower | mit | 6,258 | 227 | codeparrot/github-code |
40a2e2c22d09a76c01f3f63823cfb2997752d2e5aa9a7a49f66a4ede1668384f |
_rm: file format elf32-i386
Disassembly of section .text:
00000000 <main>:
#include "stat.h"
#include "user.h"
int
main(int argc, char *argv[])
{
0: 55 push %ebp
1: 89 e5 mov %esp,%ebp
3: 83 e4 f0 and $0xfffffff0,%esp
6: 83 ec 20 ... | Assembly | rm.asm | tzulang/xv6_4 | mit | 40,983 | 1,201 | codeparrot/github-code |
f7c8931a25c5a00c5539d34b1872d361fa566a6cf77c6cb2763bba23911a7080 | package leetcode11_20;
/**Given a linked list, remove the nth node from the end of list and return its head.
For example, Given linked list: 1->2->3->4->5, and n = 2.
After removing the second node from the end, the linked list becomes 1->2->3->5.
Note: Given n will always be valid. Try to do this in one pass.
*/
... | Java | src/main/java/leetcode11_20/RemoveNthFromEnd.java | Ernestyj/JStudy | mit | 1,562 | 52 | codeparrot/github-code |
6d1bead3bddfd40f53a41ba8483c0f30fdd572bd3b41564f0f26c8d852e8a09a | package org.kohsuke.github;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
import java.net.URLEncoder;
import java.util.Collections;
import java.util.Date;
import java.util.Lis... | Java | src/main/java/org/kohsuke/github/GHRelease.java | kohsuke/github-api | mit | 8,107 | 322 | codeparrot/github-code |
f3f2e2743fe72783e25979609290a0d5929cc9802d78413b43673829f78479e0 | import cairo
from gi.repository import Gtk
from gi.repository import Gdk
from pylsner import plugin
class Window(Gtk.Window):
def __init__(self):
super(Window, self).__init__(skip_pager_hint=True,
skip_taskbar_hint=True,
)
... | Python | pylsner/gui.py | mrmrwat/pylsner | mit | 2,624 | 86 | codeparrot/github-code |
97d129c0e3f483e62d48588d71aeeb7df85f23988a11dd10af005b8831f923ea | <?php $t = $a->getThing(); ?>
<div class="linkitem item-flavour-<?php echo $a->getFlavour() ?>" id="link-item-<?php echo $a->getId(); ?>">
<?php if (isset($nopos)): ?>
<span class="itempos"> </span>
<?php else: ?>
<span class="itempos"><?php echo $pos; ?></span>
<?php endif; ?>
<div class="votebt... | PHP | apps/frontend/modules/article/templates/_article.php | sanjeevan/codelovely | mit | 5,279 | 106 | codeparrot/github-code |
a4f1a1a34f613163cf885748e34e185d437c4fa817081c59dec4d61effa9c297 | import { Physics as EightBittrPhysics } from "eightbittr";
import { FullScreenPokemon } from "../FullScreenPokemon";
import { Direction } from "./Constants";
import { Character, Grass, Actor } from "./Actors";
/**
* Physics functions to move Actors around.
*/
export class Physics<Game extends FullScreenPokemon> ex... | TypeScript | src/sections/Physics.ts | FullScreenShenanigans/FullScreenPokemon | mit | 4,204 | 141 | codeparrot/github-code |
4fb041463877ba7de0709cb6de05ebdcd599252cd9bda9ef88840dec51961645 | import {Model} from '../../models/base/Model';
import {Subject} from 'rxjs/Subject';
import {BaseService} from '../BaseService';
import {ActivatedRoute, Router} from '@angular/router';
import {UserRights, UserService} from '../../services/UserService';
import {ListTableColumn} from './ListTableColumn';
import {Behavior... | TypeScript | src/core/lists/ListProvider.ts | BioWareRu/Admin | mit | 2,892 | 94 | codeparrot/github-code |
887f505eb7f28fa75c92627c1869c56f2cd20f83cc36fa42fbafeedcae12601b | using System;
using System.IO;
using System.ServiceProcess;
using InEngine.Core;
//using Mono.Unix;
//using Mono.Unix.Native;
namespace InEngine
{
class Program
{
public const string ServiceName = "InEngine.NET";
public static ServerHost ServerHost { get; set; }
static void Main(strin... | C# | src/InEngine/Program.cs | InEngine-NET/InEngine.NET | mit | 2,103 | 79 | codeparrot/github-code |
cd6e84fb65a038e05323de091c2f569f6df8d6bfc28275209240f3d02c09792e | // JavaScript Document
$(document).ready(function() {
$('form input[type="file"]').change(function() {
var filename = $(this).val();
$(this).prev('i').text(filename);
});
$('.input-file').click(function() {
$(this).find('input').click();
});
/*
* Previene doble click en boton submit de envio de datos de... | JavaScript | web/res/js/jquery-functions.js | rguezque/enlaces | mit | 4,476 | 180 | codeparrot/github-code |
61de5b8066cefec8474322562e3b2b31237784e87030c1ec02b1808468a4ad28 | <?php
namespace App\Jobs;
use App\Jobs\Job;
use App\Models\API\Outpost;
use DB;
use Illuminate\Queue\SerializesModels;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Contracts\Queue\ShouldQueue;
use Log;
use Pheal\Pheal;
class UpdateOutpostsJob extends Job implements ShouldQueue
{
use InteractsWithQueue, S... | PHP | app/Jobs/UpdateOutpostsJob.php | msims04/eve-buyback | mit | 1,614 | 75 | codeparrot/github-code |
b252a152f8f2e2c12567af5f3650570673277b4319b0313ffa9ad34793b2afee | using System;
using System.Net;
using Jasper.Configuration;
using Jasper.Runtime;
using Jasper.Transports;
using Jasper.Transports.Sending;
using Jasper.Util;
namespace Jasper.Tcp
{
public class TcpEndpoint : Endpoint
{
public TcpEndpoint() : this("localhost", 2000)
{
}
public ... | C# | src/Jasper.Tcp/TcpEndpoint.cs | JasperFx/jasper | mit | 2,840 | 102 | codeparrot/github-code |
f7170283954c645dac978f09e5ba934afcb29f67eecd583754e02f0407099cc4 | <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Palestrantes_model extends CI_Model {
private $id;
private $nome;
private $foto;
public function __construct() {
parent::__construct();
}
public function setId($id) {
$this->id = $id;
}
public function getId() {
return $th... | PHP | application/models/Palestrantes_model.php | tucanowned/congressouniapac | mit | 5,281 | 199 | codeparrot/github-code |
d51b4c050ca1491e04c7d27da0646b4d5c8269ebdeb59af03111e4d6f178d579 | using System;
using System.CodeDom;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Controls.Primitives;
namespace EmptyKeys.UserInterface.Generator.Types
{
/// <summary>
... | C# | UIGenerator/Types/ListBoxGeneratorType.cs | EmptyKeys/UI_Generator | mit | 1,636 | 51 | codeparrot/github-code |
08309fbae79b0a6259a9a7e53e246e8a74f0240b991a606d08bd7f3a99b4139a | /* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */
/*
* Copyright (c) 2008 litl, LLC
*
* 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 witho... | C++ | gi/union.cpp | mtwebster/cjs | mit | 16,293 | 509 | codeparrot/github-code |
051457159251dec6a532feb4cd1df85d572c6826fffc13c22f479976c0a676ab | /*
Project Orleans Cloud Service SDK ver. 1.0
Copyright (c) Microsoft Corporation
All rights reserved.
MIT License
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
associated documentation files (the ""Software""), to deal in the Software without restriction,
inc... | C# | src/Orleans/Runtime/Constants.cs | yaronthurm/orleans | mit | 6,675 | 133 | codeparrot/github-code |
d085d6572a131703be1fca5bbedc3345a389d25b4544edb0672ae50eb422cb93 | //
// FastTemplate
//
// The MIT License (MIT)
//
// Copyright (c) 2014 Jeff Panici
// 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 ... | C# | PaniciSoftware.FastTemplate/Common/UIntType.cs | jeffpanici75/FastTemplate | mit | 11,870 | 348 | codeparrot/github-code |
c0e4aa9351ca300b4956599c49bf1b2d8955933463696f5a728f19455e65912f |
// BASE64压缩接口
#ifndef _INCLUDE_BASE64_H
#define _INCLUDE_BASE64_H
#include <stdio.h>
#include <stdlib.h>
#include "sqlite3.h"
// 标准Base64编码表
static char encoding_table[] = {'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H',
'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P',
... | C | FTSJNI4/jni/include/base64.h | wangwang4git/SQLite3-ICU | mit | 1,059 | 33 | codeparrot/github-code |
97364921a664fc86a44bd6427a133f05299397c78a79d3a3f62709aff858ff5f | module Days
class App < Sinatra::Base
get "/admin/users", :admin_only => true do
@users = User.all
haml :'admin/users/index', layout: :admin
end
get "/admin/users/new", :admin_only => true do
@user = User.new
haml :'admin/users/form', layout: :admin
end
post "/admin/users... | Ruby | lib/days/app/admin/users.rb | sorah/days | mit | 1,446 | 60 | codeparrot/github-code |
f22b70157429a94a11ac14f9ee282fd53b347983b4654ee8a7961db7bcfe1fc1 | import require from 'require';
function getDescriptor(obj: Record<string, unknown>, path: string) {
let parts = path.split('.');
let value: unknown = obj;
for (let i = 0; i < parts.length - 1; i++) {
let part = parts[i]!;
// NOTE: This isn't entirely safe since we could have a null!
value = (value as... | TypeScript | packages/internal-test-helpers/lib/confirm-export.ts | emberjs/ember.js | mit | 2,277 | 68 | codeparrot/github-code |
fc86d8e62a1d0fc8074dc2313b26d23715c37b962432d3bc648514bd3e62d7ef | <?php
namespace Oro\Bundle\CalendarBundle\Form\EventListener;
use Doctrine\Common\Collections\Collection;
use Oro\Bundle\CalendarBundle\Entity\Attendee;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Symfony\Component\Form\FormEvent;
use Symfony\Component\Form\FormEvents;
/**
* Makes sure index... | PHP | Form/EventListener/AttendeesSubscriber.php | orocrm/OroCalendarBundle | mit | 2,088 | 73 | codeparrot/github-code |
cd45f12fa2f9ea64f7b61e1b5e8e1ccb69a38424ec7b8e829aa20f643bc7d164 | package com.lynx.service;
import java.util.Collection;
import java.util.Optional;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Sort;
import org.springframework.stereotype.Service;
import com.lynx.domain.User;
import com.lynx.repository.UserRepository;
import ... | Java | src/main/java/com/lynx/service/UserService.java | 6o1/lynx-server | mit | 978 | 42 | codeparrot/github-code |
11950653ef3c22fcffa99ca8c24b354b1460d9dddc3d2b1fb8ec12fd6728f8f8 | var _ = require('underscore');
var colors = require('colors');
var sprintf = require('sprintf-js').sprintf;
/**
* used to decode AIS messages.
* Currently decodes types 1,2,3,4,5,9,18,19,21,24,27
* Currently does not decode 6,7,8,10,11,12,13,14,15,16,17,20,22,23,25,26
* Currently does not support the USCG E... | JavaScript | bin/aivdmDecode.js | Royhb/aivdmDecode | mit | 69,380 | 1,826 | codeparrot/github-code |
9b18b077b23cc2f0b60d6ee847866bc182df3e882d427dbf8777b4b2193fb5ca | #ifndef V_Phi_Error_Calculator_h
#define V_Phi_Error_Calculator_h
#include "Intensity_Moment_Data.h"
#include "Cell_Data.h"
#include "Fem_Quadrature.h"
#include "Input_Reader.h"
#include <algorithm>
/** @file V_Phi_Error_Calculator.h
* @author pmaginot
* @brief Base class to implement interface f... | C | src/solvers/V_Phi_Error_Calculator.h | pgmaginot/DARK_ARTS | mit | 953 | 32 | codeparrot/github-code |
38bde71f25cf52b00d7d90fc0a786af3dc723d42545a237b7b41ec225c7dc00b | package ui
import (
"image"
"image/color"
"image/draw"
)
// UI represents an instance of the UI
type UI struct {
component
WindowTitle string
Input Input
keyFuncs map[Key]func() error
prevX, prevY int
}
// New creates a new UI instance
func New(width, height int) *UI {
rect := image.Rect(0, 0, w... | GO | ui.go | martinlindhe/gameui | mit | 2,922 | 123 | codeparrot/github-code |
026fc9802823935278bc44a2d04939782c58cb4f87217ecaa26249cb717268c0 | package org.scalajs.openui5.sap.m
import org.scalajs.openui5.sap.ui.core.{CSSSize, Wrapping}
import org.scalajs.openui5.util.{Settings, SettingsMap, noSettings}
import scala.scalajs.js
import scala.scalajs.js.annotation.{JSName, ScalaJSDefined}
@ScalaJSDefined
trait TextAreaSettings extends InputBaseSettings
object ... | Scala | src/main/scala/org/scalajs/openui5/sap/m/TextArea.scala | lastsys/scalajs-openui5 | mit | 1,347 | 35 | codeparrot/github-code |
54547b45df97824c0bd234216295f191a297c323acede058a62fc70cfb282cac | using UnityEngine;
using System.Collections;
namespace Com.LuisPedroFonseca.ProCamera2D.TopDownShooter
{
public class EnemyAttack : MonoBehaviour
{
public float RotationSpeed = 2f;
public Pool BulletPool;
public Transform WeaponTip;
public float FireRate = .3f;
public ... | C# | Assets/ProCamera2D/Examples/TopDownShooter/Scripts/Enemy/EnemyAttack.cs | LabGaming/Locally-multiplayer-minigame | mit | 2,673 | 91 | codeparrot/github-code |
3c02c96d6739d3f0e12027b56b478783eee45f97acdc1c64ebc8b167e24780b9 | import * as React from 'react';
import { Ratings, Mode, Size, Layout } from '..';
import * as examples from './examples';
import {
header,
api,
divider,
importExample,
playground,
tab,
code as baseCode,
tabs,
testkit,
title,
} from 'wix-storybook-utils/Sections';
import { allComponents } from '../..... | TypeScript | packages/wix-ui-tpa/src/components/Ratings/docs/index.story.tsx | wix/wix-style-react | mit | 3,405 | 120 | codeparrot/github-code |
595d6271973ba0fb8d22355653f5ed5fe8ff36b2b24c5d825ce2fc836e960d26 | package cn.jzvd.demo;
import android.content.Context;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.LayoutInflater;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AbsListView;
import android.widget.BaseAdapte... | Java | app/src/main/java/cn/jzvd/demo/ActivityListViewMultiHolder.java | lipangit/JiaoZiVideoPlayer | mit | 5,823 | 172 | codeparrot/github-code |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.