code stringlengths 3 1.05M | repo_name stringlengths 4 116 | path stringlengths 4 991 | language stringclasses 9
values | license stringclasses 15
values | size int32 3 1.05M |
|---|---|---|---|---|---|
<?php get_header(); ?>
<?php the_breadcrumb(); ?>
<div class="container">
<div class="row">
<!-- section -->
<section role="main" class="col-sm-9">
<?php if (have_posts()): while (have_posts()) : the_post(); ?>
<!-- article -->
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<!-- p... | Jursdotme/toro | single.php | PHP | mit | 1,748 |
package org.lua.commons.customapi.javafunctions.handlers;
import org.lua.commons.baseapi.LuaThread;
import org.lua.commons.baseapi.extensions.LuaExtension;
import org.lua.commons.baseapi.types.LuaObject;
import org.lua.commons.customapi.javafunctions.handlers.types.Type;
public interface TypeCastManager extends LuaEx... | mrkosterix/lua-commons | lua-commons-3-custom-level/src/main/java/org/lua/commons/customapi/javafunctions/handlers/TypeCastManager.java | Java | mit | 653 |
<?php
/*
* This file is part of the JobQueue package.
*
* (c) Jens Schwehn <jens@ldk.net>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
$loader = require __DIR__ . "/../vendor/autoload.php";
$loader->add('JobQueue\\', __DIR__);... | JSchwehn/JobQueue | tests/bootstrap.php | PHP | mit | 390 |
const mongoose = require('mongoose')
let literatureSchema = mongoose.Schema({
category: { type: String, required: true},
name: { type: String, required: true },
description: { type: String },
content: { type: String, required: true },
author: { type: mongoose.Schema.Types.ObjectId, required: true, ... | losko/CodeNameSite | server/data/Literature.js | JavaScript | mit | 1,477 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import bottle
import datetime
import time
@bottle.get('/')
def index():
return bottle.static_file('index.html', root='.')
@bottle.get('/stream')
def stream():
bottle.response.content_type = 'text/event-stream'
bottle.response.cache_control = 'no... | hustbeta/python-web-recipes | server-sent-events/bottle-sse.py | Python | mit | 517 |
module DocFrac
class Format
attr_reader :format_text, :ext
def initialize(format)
formats = {
:to_rtf => "--to-rtf",
:from_rtf => "--from-rtf",
:to_html => "--to-html",
:from_html => "--from-html",
:to_text => "--to-text",
:from_text => "--from-text"
... | Digi-Cazter/doc_frac | lib/doc_frac/format.rb | Ruby | mit | 418 |
/*
*
* Copyright (C) 2008-2012, OFFIS e.V. and ICSMED AG, Oldenburg, Germany
* Copyright (C) 2013-2015, J. Riesmeier, Oldenburg, Germany
* All rights reserved. See COPYRIGHT file for details.
*
* Source file for class DRTBeamLimitingDeviceLeafPairsSequence
*
* Generated automatically from DICOM PS 3.3-201... | cronelab/radroom | conversion/dcmtk/dcmrt/libsrc/drtbldls.cc | C++ | mit | 17,508 |
// Saves options to chrome.storage
function save_options () {
var saveDict = []
var i = 1
$('input').map(function () {
var dict = {
id: 'scbcc' + i,
value: this.value
}
i++
console.log('save: ', dict)
ga('send', 'event', 'setting', 'save', this.value)
saveDict.push(dict)
}).... | samcheuk/boring-copy-cat | options.js | JavaScript | mit | 2,881 |
<?php
namespace Service;
use Core\Service;
use Db\Group\GetInvitations;
use Db\Group\Search;
use Model\Group as GroupModel;
use Db\Group\GetByUserId;
use Db\Group\GetById;
use Db\Group\Store;
class Group extends Service
{
/**
* @param $userId
* @return GroupModel[]
* @throws \Core\Query\NoResultException
*... | dnl-jst/ownsocial | library/Service/Group.php | PHP | mit | 1,829 |
class User < ApplicationRecord
attr_accessor :remember_token, :activation_token, :reset_token
before_save :downcase_email
before_create :create_activation_digest
VALID_EMAIL_REGEX = /\A[\w+\-.]+@[a-z\d\-]+(?:\.[a-z\d\-]+)*\.[a-z]+\z/i
validates :email, presence: true, length: { maximum: 255 }, format: { with:... | professorNim/blorg | app/models/user.rb | Ruby | mit | 2,289 |
'use strict';
module.exports = {
colors: {
black: '#000000',
red: '#D54E53',
green: '#B9CA4A',
yellow: '#E7C547',
blue: '#7AA6DA',
magenta: '#C397D8',
cyan: '#70C0B1',
white: '#EAEAEA',
lightBlack: '#969896',
lightRed: '#D54E53',
lightGreen: '#B9CA4A',
lightYellow: '#E... | ooJerryLeeoo/hyper-material-box | scheme/tomorrow-night-bright.js | JavaScript | mit | 708 |
package orestes.bloomfilter.redis.helper;
import java.util.ArrayList;
import java.util.List;
import java.util.Map.Entry;
import java.util.Random;
import java.util.Set;
import redis.clients.jedis.Jedis;
import redis.clients.jedis.JedisPool;
import redis.clients.jedis.JedisPoolConfig;
import redis.clients.jedis.Pipelin... | Crystark/Orestes-Bloomfilter | src/main/java/orestes/bloomfilter/redis/helper/RedisPool.java | Java | mit | 4,691 |
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*
| -------------------------------------------------------------------
| DATABASE CONNECTIVITY SETTINGS
| -------------------------------------------------------------------
| This file will contain the settings needed to access your database.
|
|... | ucantseeme/p2 | application/config/database.php | PHP | mit | 4,531 |
/**
* @Author: Yingya Zhang <zyy>
* @Date: 2016-07-08 11:29:00
* @Email: zyy7259@gmail.com
* @Last modified by: zyy
* @Last modified time: 2016-07-10 22:18:85
*/
import {
notexist,
isEmpty
} from 'type'
import {
calcHeight,
remove,
dataset
} from 'dom'
describe('dom', () => {
it('calcHeight', () => ... | zoro-js/zoro-base | test/unit/specs/dom/index_spec.js | JavaScript | mit | 1,346 |
using UnityEngine;
using System.Collections;
public class EnemyAI : MonoBehaviour {
public Transform Target;
public float TargetDist;
public bool WillChase;
public float WalkingSpeed;
public Vector3 TopPatrolStart;
public Vector3 TopPatrolEnd;
public Vector2 SidePatrolStart;
pub... | NamefulTeam/PortoGameJam2016 | PortoGameJam2016/Assets/Scripts/EnemyAI.cs | C# | mit | 3,122 |
package service
import (
"math"
"math/rand"
"time"
"github.com/rlister/let-me-in/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws"
"github.com/rlister/let-me-in/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/request"
)
// DefaultRetryer implements basic retry logic using exponential backoff for
// most ... | rlister/let-me-in | Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/service/default_retryer.go | GO | mit | 1,638 |
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Diagnostics.CodeAnalysis;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Net.Http;
using System.Net.Http.Formatting;
using System.Net.Http.Headers;
using System.W... | prinzo/Attack-Of-The-Fines-TA15 | FineBot/FineBot.WepApi/Areas/HelpPage/SampleGeneration/HelpPageSampleGenerator.cs | C# | mit | 17,175 |
<TS language="es_UY" version="2.1">
<context>
<name>AddressBookPage</name>
<message>
<source>Right-click to edit address or label</source>
<translation>Clic derecho para editar dirección o etiqueta</translation>
</message>
<message>
<source>Create a new address</source>
<... | Chancoin-core/CHANCOIN | src/qt/locale/bitcoin_es_UY.ts | TypeScript | mit | 12,752 |
/* http://fiidmi.fi/documentation/customer_order_history */
module.exports = {
"bonus": {
"type": "object",
"properties": {
"session_id": { "type": "string", "minLength": 2, "maxLength": 50 },
"restaurant_id": { "type": "string", "minLength": 1, "maxLength": 50 }
},
"required": ["session_id", ... | tidhr/node-fiidmi | lib/api/3.3/customer/information.js | JavaScript | mit | 526 |
export function Fragment(props, ...children) {
return collect(children);
}
const ATTR_PROPS = '_props';
function collect(children) {
const ch = [];
const push = (c) => {
if (c !== null && c !== undefined && c !== '' && c !== false) {
ch.push((typeof c === 'function' || typeof c === 'obje... | yysun/apprun | esm/vdom-my.js | JavaScript | mit | 10,531 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
'''
destination.factory
'''
from destination.zeus import ZeusDestination
from destination.aws import AwsDestination
from exceptions import AutocertError
from config import CFG
from app import app
class DestinationFactoryError(AutocertError):
def __init__(self, destin... | mozilla-it/autocert | autocert/api/destination/factory.py | Python | mit | 854 |
<?php
/**
* LitePubl CMS
*
* @copyright 2010 - 2017 Vladimir Yushko http://litepublisher.com/ http://litepublisher.ru/
* @license https://github.com/litepubl/cms/blob/master/LICENSE.txt MIT
* @link https://github.com/litepubl\cms
* @version 7.08
*/
namespace litepubl\comments;
use litepubl\view\Lang;... | litepubl/cms | lib/comments/Json.php | PHP | mit | 5,142 |
var ItineraryWalkStep = require('./itinerary-walk-step')
var Backbone = window.Backbone
var ItineraryWalkSteps = Backbone.Collection.extend({
model: ItineraryWalkStep
})
module.exports = ItineraryWalkSteps
| ed-g/otp.js | lib/itinerary-walk-steps.js | JavaScript | mit | 211 |
# frozen_string_literal: true
require 'spec_helper'
require 'json'
describe QueueBus::Worker do
it 'proxies to given class' do
hash = { 'bus_class_proxy' => 'QueueBus::Driver', 'ok' => true }
expect(QueueBus::Driver).to receive(:perform).with(hash)
QueueBus::Worker.perform(JSON.generate(hash))
end
... | queue-bus/queue-bus | spec/worker_spec.rb | Ruby | mit | 1,332 |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace CommaExcess.Algae.Graphics
{
/// <summary>
/// Defines a compiled material pass.
/// </summary>
interface ICompiledMaterialPass
{
/// <summary>
/// Begins rendering the material pass.
/// </summary>
void Begin... | aaronbolyard/Algae.Canvas | Source/Algae/Graphics/ICompiledMaterial.cs | C# | mit | 2,495 |
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | AutorestCI/azure-sdk-for-python | azure-servicefabric/azure/servicefabric/models/partition_health.py | Python | mit | 2,612 |
#region License
/* The MIT License
*
* Copyright (c) 2011 Red Badger Consulting
*
* 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 limitatio... | redbadger/XPF | XPF/RedBadger.Xpf/Graphics/IRenderer.cs | C# | mit | 1,445 |
/*
* Copyright (c) 2015 by Greg Reimer <gregreimer@gmail.com>
* MIT License. See license.txt for more info.
*/
var stream = require('stream')
, util = require('util')
, co = require('co')
, unresolved = require('./unresolved')
// -----------------------------------------------------
function Readable(opts, ... | greim/eventual-pony | lib/readable.js | JavaScript | mit | 929 |
<?php namespace JanVince\SmallContactForm\Models;
use Str;
use Model;
use URL;
use October\Rain\Router\Helper as RouterHelper;
use Cms\Classes\Page as CmsPage;
use Cms\Classes\Theme;
use JanVince\SmallContactForm\Models\Settings;
use Log;
use Validator;
use Mail;
use Request;
use Carbon\Carbon;
use View;
use App;
use ... | jan-vince/smallcontactform | models/Message.php | PHP | mit | 20,183 |
package com.weixin.util;
import java.io.IOException;
import java.io.InputStream;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import org.dom4j.DocumentException;
import org.dom4j.Element;
import org.dom4j.io.S... | ScorpionJay/wechat | src/main/java/com/weixin/util/MessageUtil.java | Java | mit | 1,844 |
// Copyright (c) 2011-2015 The Gtacoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "sendcoinsentry.h"
#include "ui_sendcoinsentry.h"
#include "addressbookpage.h"
#include "addresstablemodel.h"
#incl... | gtacoin-dev/gtacoin | src/qt/sendcoinsentry.cpp | C++ | mit | 8,351 |
using Shouldly;
using Specify.Samples.Domain.Atm;
using TestStack.BDDfy;
namespace Specify.Samples.Specs.ATM
{
public class CardHasBeenDisabled : ScenarioFor<Atm, AccountHolderWithdrawsCashStory>
{
private Card _card;
public void Given_the_Card_is_disabled()
{
_card = new ... | mwhelan/Specify | src/Samples/Specify.Samples/Specs/ATM/CardHasBeenDisabled.cs | C# | mit | 857 |
import os,sys
from trans_rot_coords import *
import numpy as np
from read_energy_force_new import *
from grids_structures_general import DS,Grid_Quarts
from orient_struct_2 import OrientDS as OrientDS_2
from orient_struct_3 import OrientDS as OrientDS_3
AU2KCAL = 23.0605*27.2116
R2D = 180.0/3.14159265358979
## np.pi/... | sethbrin/QM | version2/python/calculate_energy_new_coords_general.py | Python | mit | 32,462 |
/**
* The MIT License (MIT)
*
* Copyright (c) 2014-2022 Mickael Jeanroy
*
* 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
... | mjeanroy/jasmine-utils | src/core/util/is-finite-number.js | JavaScript | mit | 1,420 |
class AchievementsController < ApplicationController
before_action :authenticate_admin!
before_action :set_achievement, only: [:show, :edit, :update, :destroy]
# GET /achievements
# GET /achievements.json
def index
@achievements = Achievement.all
end
# GET /achievements/1
# GET /achievements/1.jso... | jcfausto/jcfausto-rails-website | app/controllers/achievements_controller.rb | Ruby | mit | 2,096 |
# DistantPoints[http://community.topcoder.com/stat?c=problem_statement&pm=11077]
class DistantPoints
def self.solution (n, k)
@max = 2 ** n + 2
points = {}
p = [1, 1]
(k - 1).times do
points[p] = true
p = nextPoint(points)
end
p
end
def self.nextPoint (points)
dMax ... | erichaase/topcoder | ruby/app/DistantPoints.rb | Ruby | mit | 1,107 |
<?php
namespace PlentymarketsAdapter\ServiceBus\QueryHandler\OrderStatus;
use PlentyConnector\Connector\ServiceBus\Query\FetchTransferObjectQuery;
use PlentyConnector\Connector\ServiceBus\Query\QueryInterface;
use PlentyConnector\Connector\ServiceBus\QueryHandler\QueryHandlerInterface;
use PlentyConnector\Connector\S... | Pfabeck/plentymarkets-shopware-connector | Adapter/PlentymarketsAdapter/ServiceBus/QueryHandler/OrderStatus/FetchAllOrderStatusesQueryHandler.php | PHP | mit | 2,062 |
# -*- coding: utf-8 -*-
# Define your item pipelines here
#
# Don't forget to add your pipeline to the ITEM_PIPELINES setting
# See: http://doc.scrapy.org/en/latest/topics/item-pipeline.html
from scrapy.conf import settings
import pymongo
from datetime import datetime
from .models import PQDataModel
class Parliamen... | mthipparthi/parliament-search | parliamentsearch/pipelines.py | Python | mit | 1,789 |
namespace IPCUtilities.IpcPmrep.CommandObjects
{
public class PmrepAddDeploymentGroup: AbstractRepoObject
{
private string _deploymentGroupName;
private string _versionNumber;
private string _folderName;
private string _persistentImputFile;
pr... | RainManVays/IPCUtilites | IpcPmrep/CommandObjects/PmrepDeploymentGroup.cs | C# | mit | 1,133 |
/**
* Created by TC on 2016/10/10.
*/
import React, {
Component,
} from 'react'
import {
Image,
View,
ToastAndroid,
ActivityIndicator,
}
from 'react-native'
import PixelRatio from "react-native/Libraries/Utilities/PixelRatio";
class GirlComponent extends Component {
constructor(props)... | huxinmin/PracticeMakesPerfect | reactNative/reactnativelearn-master/js/GirlComponent.js | JavaScript | mit | 1,751 |
<?php
header('Content-Type: image/png');
header('X-Content-Quality: '.$_GET['quality']);
readfile($file);
| juijs/store.jui.io | public/v2/plugins/code/preprocessor/png.php | PHP | mit | 107 |
# frozen_string_literal: true
# :reek:UtilityFunction
module RubyRabbitmqJanus
module Janus
module Responses
# Response for RSpec initializer
class RSpec
# Constructor to RSpec response.
# Create a fake response for testing library.
def initialize(type)
path = RubyR... | dazzl-tv/ruby-rabbitmq-janus | lib/rrj/janus/responses/rspec.rb | Ruby | mit | 1,811 |
export * from '../common';
export NodeBundle from './NodeBundle';
export CommonJsResolver from './CommonJsResolver';
| stephenbunch/palkia | src/node/index.js | JavaScript | mit | 117 |
import arrow
import settings
from . import misc
from . import voting
from . import comments
from . import exceptions as exc
def merge_pr(api, urn, pr, votes, total, threshold):
""" merge a pull request, if possible, and use a nice detailed merge commit
message """
pr_num = pr["number"]
pr_title = pr[... | eukaryote31/chaos | github_api/prs.py | Python | mit | 8,393 |
#!/usr/bin/env python
__copyright__ = "Copyright 2013-2014, http://radical.rutgers.edu"
__license__ = "MIT"
import sys
import radical.pilot as rp
# READ: The RADICAL-Pilot documentation:
# http://radicalpilot.readthedocs.org/en/latest
#
# Try running this example with RADICAL_PILOT_VERBOSE=debug set if
# you w... | JensTimmerman/radical.pilot | examples/running_mpi_executables.py | Python | mit | 5,342 |
require "spec_helper"
shared_examples "database adapter" do
before do
test_database.run <<-SQL
CREATE SCHEMA foo;
CREATE TABLE foo.persons (
id int,
first_name varchar(255),
last_name varchar(255)
);
SQL
end
after do
test_database.run <<-SQL
DROP SCHEM... | maiwald/beetle_etl | spec/adapters/shared_examples.rb | Ruby | mit | 1,391 |
from riotwatcher import *
from time import sleep
import logging
log = logging.getLogger('log')
def getTeamOfSummoner( summonerId, game ):
for p in game['participants']:
if p['summonerId'] == summonerId:
return p['teamId']
def getSummonerIdsOfOpponentTeam( summonerId, game ):
teamId = getTeamOfS... | DenBaum/lolm8guesser | friendship.py | Python | mit | 3,046 |
package org.data2semantics.mustard.rdfvault;
import java.util.List;
import java.util.Set;
import org.data2semantics.mustard.kernels.ComputationTimeTracker;
import org.data2semantics.mustard.kernels.FeatureInspector;
import org.data2semantics.mustard.kernels.KernelUtils;
import org.data2semantics.mustard.kerne... | Data2Semantics/mustard | mustard-experiments/src/main/java/org/data2semantics/mustard/rdfvault/RDFGraphListURIPrefixKernel.java | Java | mit | 2,327 |
<?php
// Enable error reporting to help us debug issues
error_reporting(E_ALL);
// Start PHP sessions
session_start();
require_once('./config.php');
$oToken = json_decode(file_get_contents(APP_URL . 'token.php?key=' . $_GET['key']));
define('APP_TOKEN', $oToken->token);
function doPost($sMethod, $aPost = array())... | edbiler/BazaarCorner | tools/apps/test/index.php | PHP | mit | 3,475 |
/*!
* maptalks.snapto v0.1.11
* LICENSE : MIT
* (c) 2016-2018 maptalks.org
*/
/*!
* requires maptalks@^0.33.1
*/
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('maptalks')) :
typeof define === 'function' && define.amd ? define(['exports', '... | liubgithub/maptalks.snapto | dist/maptalks.snapto.js | JavaScript | mit | 96,163 |
//
// This source file is part of appleseed.
// Visit http://appleseedhq.net/ for additional information and resources.
//
// This software is released under the MIT license.
//
// Copyright (c) 2014-2015 Marius Avram, The appleseedhq Organization
//
// Permission is hereby granted, free of charge, to any person obtai... | Vertexwahn/appleseed | src/appleseed.studio/mainwindow/minimizebutton.cpp | C++ | mit | 2,861 |
window.onload=function() {
var start = document.getElementById('start');
start.onclick = function () {
var name = document.getElementById('Name').value;
var id = document.getElementById('Id').value;
var tel = document.getElementById("Tel").value;
if (name == "") {
... | StaticWalk/exam | src/main/resources/static/js/login.js | JavaScript | mit | 1,412 |
(function (){
"use strict";
(function() {
var $bordered = $('.bordered');
window.setInterval(function() {
var top = window.pageYOffset || document.documentElement.scrollTop;
if(top > 0) {
$bordered.fadeOut('fast');
} else if(top == 0 && !$bor... | martinmaricak/HalmiCaffe | assets/javascript.js | JavaScript | mit | 5,224 |
<!-- /. NAV SIDE -->
<div id="page-wrapper" >
<div id="page-inner">
<div class="row">
<div classe="col-md-12">
<h2>Admin home</h2>
<h5>Welcome Admin </h5>
</div>
... | amalkanth/waiterless_restaurant | application/views/admin/adminhome.php | PHP | mit | 4,067 |
describe('$materialPopup service', function() {
beforeEach(module('material.services.popup', 'ngAnimateMock'));
function setup(options) {
var popup;
inject(function($materialPopup, $rootScope) {
$materialPopup(options).then(function(p) {
popup = p;
});
$rootScope.$apply();
});... | stackmates/common.client.build | src/common/style/sass/material/services/popup/popup.spec.js | JavaScript | mit | 1,657 |
/**
* Created by Samuel Schmid on 23.03.14.
*
* Class for Database Handling
*
* Containing
* - App Config
* - Database Information
*
* @type {Database}
*/
module.exports = Database;
Array.prototype.contains = function(obj) {
var i = this.length;
while (i--) {
if (this[i] === obj) {
... | veith/restapiexpress | grunt/database/database.js | JavaScript | mit | 2,478 |
import { getEmailTransport, initializeAdminApp } from './_internal';
import * as functions from 'firebase-functions';
import { District, GroupCreateInput, RepresentativeCreateInput } from '@civ/city-council';
import { createRandomString } from './utils';
const app = initializeAdminApp();
const db = app.database();
co... | civinomics/city-council | cloud/functions/src/create-group.ts | TypeScript | mit | 7,829 |
from django.dispatch import Signal
pre_save = Signal(providing_args=['instance', 'action', ])
post_save = Signal(providing_args=['instance', 'action', ])
pre_delete = Signal(providing_args=['instance', 'action', ])
post_delete = Signal(providing_args=['instance', 'action', ])
| thoas/django-sequere | sequere/contrib/timeline/signals.py | Python | mit | 279 |
package me.coley.bmf.insn.impl;
import me.coley.bmf.insn.Instruction;
import me.coley.bmf.insn.OpType;
public class CALOAD extends Instruction {
public CALOAD() {
super(OpType.ARRAY, Instruction.CALOAD, 1);
}
}
| Col-E/Bytecode-Modification-Framework | src/main/java/me/coley/bmf/insn/impl/CALOAD.java | Java | mit | 229 |
class MeetupEvent < ActiveRecord::Base
self.primary_key = "meetup_event_id"
belongs_to :meetup_group, foreign_key: "meetup_group_id"
class << self
def enabled
where(enable_sync: true)
end
def from_api_response(response)
start_time = LocalTime.convert(response['time'].to_i)
end_t... | swifthand/meetup-calendar-sync | app/models/meetup_event.rb | Ruby | mit | 1,271 |
<?php
namespace Site\Bundle\PlatformBundle;
use Symfony\Component\HttpKernel\Bundle\Bundle;
class SitePlatformBundle extends Bundle
{
}
| starsea/cmp | src/Site/Bundle/PlatformBundle/SitePlatformBundle.php | PHP | mit | 139 |
package epsi.md4.com.epsicalendar.activities;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;
import android.view.View;
import android.widget.AdapterView;
import ... | MD4/EPSICalendar | app/src/main/java/epsi/md4/com/epsicalendar/activities/EventListActivity.java | Java | mit | 5,006 |
package com.blamejared.compat.tcomplement.highoven;
import java.util.LinkedHashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import com.blamejared.ModTweaker;
import com.blamejared.compat.mantle.RecipeMatchIIngredient;
import com.blamejared.compat.tcomplement.highoven.recipes.HeatReci... | jaredlll08/ModTweaker | src/main/java/com/blamejared/compat/tcomplement/highoven/HighOven.java | Java | mit | 11,580 |
/*
* The MIT License (MIT)
*
* Copyright (c) 2017-2020 Yegor Bugayenko
*
* 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
*... | yegor256/cactoos | src/test/java/org/cactoos/io/SlowInputStream.java | Java | mit | 2,637 |
'use strict';
import { gl } from './Context';
import { mat4 } from 'gl-matrix';
import Camera from './Camera';
class OrthographicCamera extends Camera
{
constructor(
{
path,
uniforms,
background,
translucence,
right,
top,
name = 'orthographic.camera',
... | allotrop3/four | src/OrthographicCamera.js | JavaScript | mit | 1,846 |
<?php
return [
/*
|--------------------------------------------------------------------------
| Default Database Connection Name
|--------------------------------------------------------------------------
|
| Here you may specify which of the database connections below you wish
| to use as... | TanerTombas/stories | config/database.php | PHP | mit | 4,498 |
<?php
/**
* @package Abricos
* @subpackage Notify
* @copyright 2008-2015 Alexander Kuzmin
* @license http://opensource.org/licenses/mit-license.php MIT License
* @author Alexander Kuzmin <roosit@abricos.org>
*/
require_once 'phpmailer/class.phpmailer.php';
/**
* Class NotifyManager
*
* @property NotifyModule... | abricos/abricos-mod-notify | src/includes/old_manager.php | PHP | mit | 8,474 |
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("04.... | VaskoViktorov/SoftUni-Homework | 06. OOP Basics C# - 27.06.2017/02. Defining Classes - Exercise/04. Opinion Poll/04. Opinion Poll/Properties/AssemblyInfo.cs | C# | mit | 1,403 |
#!/usr/bin/env python
'''
Import this module to have access to a global redis cache named GLOBAL_CACHE.
USAGE:
from caching import GLOBAL_CACHE
GLOBAL_CACHE.store('foo', 'bar')
GLOBAL_CACHE.get('foo')
>> bar
'''
from redis_cache import SimpleCache
try:
GLOBAL_CACHE
except NameError:
GLOBAL_C... | miketwo/pylacuna | pylacuna/caching.py | Python | mit | 434 |
using System;
namespace East.Tool.UseCaseTranslator.WebAPI.Areas.HelpPage
{
/// <summary>
/// This represents an image sample on the help page. There's a display template named ImageSample associated with this class.
/// </summary>
public class ImageSample
{
/// <summary>
/// Initia... | east-pmo/UseCaseTranslator | UseCaseTranslator.WebAPI/Areas/HelpPage/SampleGeneration/ImageSample.cs | C# | mit | 1,077 |
'use strict'
// create a net-peer compatible object based on a UDP datagram socket
module.exports = function udpAdapter(udpSocket, udpDestinationHost, udpDestinationPort) {
const _listeners = []
udpSocket.on('message', (msg, rinfo) => {
//console.log(`server got: ${msg} from ${rinfo.address}:${rinfo.port}`)
... | mreinstein/net-peer | examples/udp/udp-adapter.js | JavaScript | mit | 680 |
package ru.otus.java_2017_04.golovnin.hw09;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
@Entity(name = "user")
@Table(name = "users")
public class User extends DataSet{
@Column(name = "name")
private String name;
@Column(name = "age", nullable = false... | vladimir-golovnin/otus-java-2017-04-golovnin | hw09/src/main/java/ru/otus/java_2017_04/golovnin/hw09/User.java | Java | mit | 642 |
var Filter = require('broccoli-filter')
module.exports = WrapFilter;
WrapFilter.prototype = Object.create(Filter.prototype);
WrapFilter.prototype.constructor = WrapFilter;
function WrapFilter (inputTree, options) {
if (!(this instanceof WrapFilter)) return new WrapFilter(inputTree, options)
Filter.call(this, input... | H1D/broccoli-wrap | index.js | JavaScript | mit | 757 |
package com.purvotara.airbnbmapexample.model;
import android.content.Context;
import com.android.volley.Request;
import com.google.gson.Gson;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
import com.google.gson.reflect.TypeToken;
import com.purvotara.airbnbmapexample.co... | SkyTreasure/Airbnb-Android-Google-Map-View | app/src/main/java/com/purvotara/airbnbmapexample/model/AddressModel.java | Java | mit | 5,013 |
namespace _8.ArraySymmetry
{
using System;
using System.Linq;
public class ArraySymmetry
{
public static void Main()
{
var words = Console.ReadLine().Split(' ').ToArray();
var isSymmetric = true;
for (int i = 0; i < words.Length / 2; i++)
... | toteva94/SoftUni | [01]ProgrammingFundamentals/07.ExercisesArraysSimpleArrayProcessing/08.ArraySymmetry/ArraySymmetry.cs | C# | mit | 717 |
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Books extends MY_Controller {
public function __construct() {
parent::__construct();
$this->loadModel('Book', 'books_model');
$this->setTitle('Bookshelf');
}
public function index()
{
$this->setOutputData('books', $th... | sixpounder/CI-WORKSHOP | application/controllers/Books.php | PHP | mit | 1,752 |
Template.formeditprofile.events({
'submit #editform': function(event){
event.preventDefault();
var firstNameVar = event.target.firstname.value;
var lastNameVar = event.target.lastname.value;
var classVar = event.target.classvar.value;
Profiles.insert({
uid:Meteor.userId(),
firstname: firstNameVar,
l... | zhjch05/MemoryChess | semantic-ui/client/pages/addprofile.js | JavaScript | mit | 477 |
# https://graphics.stanford.edu/~seander/bithacks.html#NextBitPermutation
def selector(values, setBits):
maxBits = len(values)
def select(v):
out = []
for i in range(maxBits):
if (v & (1 << i)):
out.append(values[i])
return out
v = (2 ** setBits) - 1
... | asgeir/old-school-projects | python/verkefni2/cpattern.py | Python | mit | 1,006 |
// FoalTS
import { ValidateFunction } from 'ajv';
import {
ApiParameter,
ApiResponse,
Context,
Hook,
HookDecorator,
HttpResponseBadRequest,
IApiHeaderParameter,
OpenApi,
ServiceManager
} from '../../core';
import { getAjvInstance } from '../utils';
import { isFunction } from './is-function.util';
/**... | FoalTS/foal | packages/core/src/common/hooks/validate-header.hook.ts | TypeScript | mit | 2,105 |
using System;
using System.Collections.Generic;
using Baseline;
using Marten.Storage;
namespace Marten.Schema.Identity.Sequences
{
public class IdentityKeyGeneration : IIdGeneration
{
private readonly HiloSettings _hiloSettings;
private readonly DocumentMapping _mapping;
public Identi... | jokokko/marten | src/Marten/Schema/Identity/Sequences/IdentityKeyGeneration.cs | C# | mit | 1,691 |
var expect = require('expect.js');
var EventEmitter = require('events').EventEmitter;
var fixtures = require('../fixtures');
var Detector = require('../../lib/detector.js');
describe('Detector', function() {
// Used to test emitted events
var found;
var listener = function(magicNumber) {
found.... | dushmis/buddy.js | spec/unit/detectorSpec.js | JavaScript | mit | 7,750 |
require "pubs/clients/db/models/concerns/dynamic_attributes"
require "pubs/clients/db/models/concerns/hooks"
require "pubs/clients/db/models/concerns/json_keys_symbolizer"
require "pubs/clients/db/models/concerns/validations"
require 'pubs/clients/db/models/model'
require 'pubs/clients/db/models/unit'
| lemmycaution/pubs | lib/pubs/clients/db/all.rb | Ruby | mit | 303 |
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Runtime.InteropSe... | jeffkl/msbuild | src/Build.UnitTests/Evaluation/Expander_Tests.cs | C# | mit | 195,337 |
# testStr = "Hello {name}, How long have you bean?. I'm {myName}"
#
# testStr = testStr.format(name="Leo", myName="Serim")
#
# print(testStr)
limit = None
hello = str(limit, "")
print(hello)
# print( "4" in "3.5")
| SELO77/seloPython | 3.X/ex/strFormat.py | Python | mit | 217 |
# encoding: utf-8
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'App.created_at'
db.add_column('mobile_apps_app', 'created_at', self.gf('django.db.models.f... | katemsu/kate_website | kate3/mobile_apps/migrations/0002_auto__add_field_app_created_at.py | Python | mit | 2,545 |
<?php
/*
* Copyright (c) 2011 Sergei Lissovski, http://sergei.lissovski.org
*
* 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 ... | sergeil/Vobla | tests/bootstrap.php | PHP | mit | 1,654 |
import React, { PropTypes } from 'react';
import { connect } from 'react-redux';
import './PostListView.scss';
import { toastr } from 'react-redux-toastr';
import { bindActionCreators } from 'redux';
import {
fetchPostsFromApi,
selectPostCategory,
clearPostsErrors,
clearPostsMessages
} from '../../../actions/ac... | RyanCCollins/ryancollins.io | app/src/containers/Blog/PostListView/PostListView.js | JavaScript | mit | 4,864 |
package models.factories;
import models.squares.PropertySquare;
import java.util.Set;
/**
* @author Ani Kristo
*/
interface PropertyFactory {
Set<? extends PropertySquare> makeSquares();
}
| CS319-G12/uMonopoly | src/models/factories/PropertyFactory.java | Java | mit | 198 |
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Pr... | Horwits/Telerik-Academy-2016-2017 | C#/C#-Part-One/Exam-Preparation/Variant 2 2012/Problem 4 – Dancing Bits/Properties/AssemblyInfo.cs | C# | mit | 1,428 |
version https://git-lfs.github.com/spec/v1
oid sha256:4a4e80129485fe848fa53149568184f09fa2da8648b6476b750ef97344bd4c5b
size 10959
| yogeshsaroya/new-cdnjs | ajax/libs/jsSHA/1.6.0/sha512.js | JavaScript | mit | 130 |
using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Data.Entity.ModelConfiguration.Conventions;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TableTop.Repository.DatabaseModels;
namespace TableTop.Data.Context
{
public class TableTopContext : DbContex... | heilc/TableTop | TableTop.Data/Context/TableTopContext.cs | C# | mit | 810 |
using System;
using System.ComponentModel;
using System.ComponentModel.Design;
using System.Drawing.Design;
using System.Collections;
using System.Diagnostics;
using System.Drawing;
using System.Linq;
using System.Collections.Generic;
using SharpGL;
using SharpGL.SceneGraph.Quadrics;
using SharpGL.SceneGra... | DanFTRX/sharpgl | source/SharpGL/Core/SharpGL.SceneGraph/Scene.cs | C# | mit | 15,697 |
/**
* Created by yangge on 1/29/2016.
*/
public class EggPlant extends Veggies {
}
| eroicaleo/DesignPatterns | HeadFirst/ch04/PizzaStoreAbstractFactory/EggPlant.java | Java | mit | 85 |
/**
* Module dependencies.
*/
var util = require('sails-util'),
uuid = require('node-uuid'),
path = require('path'),
generateSecret = require('./generateSecret'),
cookie = require('express/node_modules/cookie'),
parseSignedCookie = require('cookie-parser').signedCookie,
ConnectSession = require('express/... | mnaughto/sails | lib/hooks/session/index.js | JavaScript | mit | 14,850 |
//
// StoreLocation.cs - System.Security.Cryptography.X509Certificates.StoreLocation
//
// Author:
// Sebastien Pouliot <sebastien@ximian.com>
//
// (C) 2003 Motus Technologies Inc. (http://www.motus.com)
// Copyright (C) 2004 Novell Inc. (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to a... | jjenki11/blaze-chem-rendering | qca_designer/lib/ml-pnet-0.8.1/mcs-sources/class/System.Security/System.Security.Cryptography.X509Certificates/StoreLocation.cs | C# | mit | 1,531 |
function showErrorMessage(errorMessage) {
$("#authorize-prompt")
.addClass("error-prompt")
.removeClass("success-prompt")
.html(errorMessage);
}
function showSuccessMessage(message) {
$("#authorize-prompt")
.removeClass("error-prompt")
.addClass("success-prompt")
... | AndrewMontagne/alliance-auth | static/js/authorize.js | JavaScript | mit | 1,462 |
import math
import urwid
from mitmproxy.tools.console import common
from mitmproxy.tools.console import signals
from mitmproxy.tools.console import grideditor
class SimpleOverlay(urwid.Overlay):
def __init__(self, master, widget, parent, width, valign="middle"):
self.widget = widget
self.master ... | xaxa89/mitmproxy | mitmproxy/tools/console/overlay.py | Python | mit | 3,855 |
/*
* This file is part of the Turtle project
*
* (c) 2011 Julien Brochet <julien.brochet@etu.univ-lyon1.fr>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
package turtle.gui.panel;
import java.awt.BorderLayout;
import java.awt.e... | aerialls/Turtle | src/turtle/gui/panel/TeamBehaviorPanel.java | Java | mit | 2,309 |
module.exports = [
'M6 2 L26 2 L26 30',
'L16 24 L6 30 Z'
].join(' ');
| zaccolley/songkick.pink | src/components/Icon/svg/bookmark.js | JavaScript | mit | 75 |
class PluginSerializer < ActiveModel::Serializer
attributes :name
attribute :plugin_attributes, key: :attributes
end
| degica/barcelona | app/serializers/plugin_serializer.rb | Ruby | mit | 121 |