code stringlengths 3 1.01M | repo_name stringlengths 5 116 | path stringlengths 3 311 | language stringclasses 30
values | license stringclasses 15
values | size int64 3 1.01M |
|---|---|---|---|---|---|
from unittest import TestCase
from unittest.mock import Mock, patch, call, MagicMock
from flowirc.protocol import IRCClientProtocol
__author__ = 'Olle Lundberg'
class TestIRCClientProtocol(TestCase):
def setUp(self):
self.proto = IRCClientProtocol()
self.transport = Mock()
self.proto.mes... | lndbrg/flowirc | flowirc/tests/test_IRCClientProtocol.py | Python | mit | 2,853 |
#include "game.h"
#include "config.h"
#include <iostream>
#ifdef _WIN32
#include <windows.h>
int WinMain(HINSTANCE hInstance, HINSTANCE, LPSTR, int) {
#else
int main(int argc, char **argv) {
#endif
Config myConfig("config.ini");
Game::FlagsCollection initFlagsColleciton = {
Vingine::InitFlags::Input | Vingine... | Malacath-92/Vingine | dev/tests/window/main.cpp | C++ | mit | 753 |
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import {
ComponentFactoryResolver,
ComponentRef,
Directive,
EmbeddedViewRef,
EventEmitter,
NgModule,
On... | andrewseguin/material2 | src/cdk/portal/portal-directives.ts | TypeScript | mit | 8,240 |
# Uncomment this if you reference any of your controllers in activate
# require_dependency 'application'
class CodeHighlighterExtension < Radiant::Extension
version "1.0"
description "Adds syntax highlighting capabilities through the <r:code /> tag."
url "http://ruby-lang.org"
def activate
Page.send :in... | rubyidentity/ruby-lang | vendor/extensions/code_highlighter/code_highlighter_extension.rb | Ruby | mit | 357 |
require 'rails_helper'
RSpec.describe "rss_sources/new", type: :view do
before(:each) do
assign(:rss_source, RssSource.new(
:name => "MyString",
:url => "MyString",
:active => false,
:published => false
))
end
it "renders new rss_source form" do
render
assert_select "for... | camumino/feed_twitter_bot | spec/views/feed_twitter_bot/rss_sources/new.html.erb_spec.rb | Ruby | mit | 694 |
---
layout: post
status: publish
published: true
title: Mandalorian Dance
author: Jeff
author_login: admin
author_email: jeff@allthingsdork.com
author_url: http://www.allthingsdork.com
wordpress_id: 382
wordpress_url: http://www.allthingsdork.com/?p=382
date: '2008-07-06 11:45:29 -0500'
date_gmt: '2008-07-06 15:45:29 -... | bobbidigital/bobbidigital.github.io | _posts/2008-07-06-mandalorian-dance.markdown | Markdown | mit | 1,059 |
sdkaskdj
| hoverr/hoverr.github.io | ad/kiran.js | JavaScript | mit | 9 |
#![allow(dead_code)]
#![allow(unused_variables)]
#![allow(unused_mut)]
pub fn foo() {
// strings are implemented as a collection of bytes plus some methods to provide useful
// functionality when those bytes are interpreted as text.
// the 'str' type represents a string slice, and is usually seen in its b... | bothra90/rust-book | collections/src/strings/mod.rs | Rust | mit | 4,744 |
import { module, test } from 'qunit';
import { setupRenderingTest } from 'ember-qunit';
import { render } from '@ember/test-helpers';
import hbs from 'htmlbars-inline-precompile';
import {
getDatePicker,
selectDateTime,
} from 'ember-date-components/test-support/helpers/date-picker';
import { selectTime } from 'emb... | mydea/ember-date-components | tests/integration/components/date-time-picker-test.js | JavaScript | mit | 9,330 |
-- Makes audio seem like it is coming from a 3D source.
-- For BASS the native '3d' option is used
-- For HTML 3d volume is simulated manually
--
-- To use, pass "use3D = true" in 'opts' to service:load(url, opts)
-- You also need to pass either a 'pos3D' or 'ent3D' in opts
-- 'pos3D = Vector(0, 0, 0)' - a sta... | wyozi/gmod-medialib | ext/volume3d.lua | Lua | mit | 4,470 |
<!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="Robert Libotti" />
<meta name="description" content="Write an awesome descrip... | libotti/libotti.github.io | _site/projects.html | HTML | mit | 5,973 |
<!-- jQuery -->
<!--script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script-->
<script type="text/javascript" src="<?= base_url(); ?>assets/js/jquery-1.11.3.min.js"></script>
<!-- bxSlider -->
<link type="text/css" href="<?= base_url(); ?>assets/css/jquery.bxslider... | MyAppDev/livice | application/views/hospital/hospital_patient_details_clone.php | PHP | mit | 19,110 |
package coatapp.coat;
import android.content.Context;
import android.support.test.InstrumentationRegistry;
import android.support.test.runner.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
import static org.junit.Assert.*;
/**
* Instrumentation test, which will execute on an Android device.... | xlpnic/coat | app/src/androidTest/java/coatapp/coat/ExampleInstrumentedTest.java | Java | mit | 728 |
<!DOCTYPE html>
<html>
<head>
<title>{% if page.title %}{{ page.title }} – {% endif %}{{ site.name }} – {{ site.description }}</title>
{% comment %}
{% include meta.html %}
{% endcomment %}
{% seo %}
<!--[if lt IE 9]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></scr... | manabu/manabu.github.io | _layouts/default.html | HTML | mit | 1,662 |
@font-face {
font-family: 'FontAwesome';
src: url('../font/fontawesome.ttf');
}
.icon-button {
-fx-font-family: 'FontAwesome';
-fx-text-alignment: center;
-fx-padding: 0.25em;
-fx-text-fill: #5a5a5a;
}
.tool-bar.plain {
-fx-background-color: transparent;
-fx-padding: 0;
}
| stenwessel/OnDeckPlayer | res/css/main.css | CSS | mit | 308 |
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using SlackConnector.EventHandlers;
using SlackConnector.Models;
namespace SlackConnector
{
public interface ISlackConnection
{
#region Properties
/// <summary>
/// All of the ChatHubs that are currently ope... | SidneyAks/CapricaCoctothorpe | src/SlackConnector/ISlackConnection.cs | C# | mit | 2,320 |
export var SKIP_DJ_START = 'moderation/SKIP_DJ_START';
export var SKIP_DJ_COMPLETE = 'moderation/SKIP_DJ_COMPLETE';
export var MOVE_USER_START = 'moderation/MOVE_USER_START';
export var MOVE_USER_COMPLETE = 'moderation/MOVE_USER_COMPLETE';
export var REMOVE_USER_START = 'moderation/REMOVE_USER_START';
export var REMOVE... | welovekpop/uwave-web-welovekpop.club | es/constants/actionTypes/moderation.js | JavaScript | mit | 1,087 |
{% extends 'email.server.view.html' %}
{% block content %}
<!-- MODULE ROW // -->
<tr>
<td align="center" valign="top">
<!-- CENTERING TABLE // -->
<!--
The centering table keeps the content
tables centered in the emailBody table,
in case its width is ... | mleanos/trustroots | modules/core/server/views/email-templates/reset-password-confirm.server.view.html | HTML | mit | 2,485 |
export { default } from 'supertree-auth/login/serializer';
| supertreeteam/supertree-auth | app/login/serializer.js | JavaScript | mit | 59 |
namespace AspNetIdentityManagerDemo.Migrations
{
using System;
using System.Data.Entity;
using System.Data.Entity.Migrations;
using System.Linq;
internal sealed class Configuration : DbMigrationsConfiguration<AspNetIdentityManagerDemo.Models.ApplicationDbContext>
{
public Configuration(... | BrightSoul/AspNetIdentityManagerDemo | AspNetIdentityManagerDemo/Migrations/Configuration.cs | C# | mit | 1,063 |
# Python Application Boilerplate
This is a web crawler built in python that implements Iterative Deepening Depth Search to scrape all of the children links of a specified base url up to a specified depth. While scraping, the program saves each page's HTML into a text file and the runs a Unigram Feature Extractor on th... | clj0020/python-web-crawler | README.md | Markdown | mit | 1,658 |
import Ember from 'ember';
import DS from 'ember-data';
import ModelDefinition from './model-definition';
import FixtureBuilderFactory from './fixture-builder-factory';
var FactoryGuy = function () {
var modelDefinitions = {};
var store = null;
var fixtureBuilderFactory = null;
var fixtureBuilder = null;
/**... | steven-ferguson/ember-data-factory-guy | addon/factory-guy.js | JavaScript | mit | 14,167 |
<?php namespace System\Console;
use Illuminate\Console\Command;
/**
* Console command to convert configuration to use .env files.
*
* This creates an .env file with some default configuration values, it also converts
* the existing PHP-based configuration files to use the `env` function for values.
*
* @package... | technosfera-si/lutetium | modules/system/console/OctoberEnv.php | PHP | mit | 9,155 |
package vnc
import (
"io"
"testing"
)
func TestClientInit(t *testing.T) {
tests := []struct {
exclusive bool
shared uint8
}{
{true, 0},
{false, 1},
}
mockConn := &MockConn{}
conn := NewClientConn(mockConn, &ClientConfig{})
for _, tt := range tests {
mockConn.Reset()
// Send client initializa... | kward/go-vnc | initialization_test.go | GO | mit | 2,934 |
import java.io.FileReader;
import java.io.BufferedReader;
import java.util.Map;
import java.util.HashMap;
import java.lang.Exception;
import org.neo4j.graphdb.Node;
import org.neo4j.graphdb.RelationshipType;
import org.neo4j.unsafe.batchinsert.BatchInserter;
import org.neo4j.unsafe.batchinsert.BatchInserters;
import o... | golmansax/wiki-oracle | src/main/java/gsax/WikiPageNodeInserter.java | Java | mit | 2,322 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
"""
from __future__ import absolute_import, print_function, unicode_literals
INSTALLED_APPS = (
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.... | StefanKjartansson/drf-react-skeleton | project/settings/apps.py | Python | mit | 426 |
<!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">
<title>BHRT Laufbahnberatung</title>
<!-- Bootstrap CSS -->
<link href="../vendor/bootstrap/css/bootstrap.m... | m-gobeli/bhrt_2 | html/personalberater.html | HTML | mit | 3,506 |
#ifndef TERMOX_TERMINAL_DYNAMIC_COLOR_ENGINE_HPP
#define TERMOX_TERMINAL_DYNAMIC_COLOR_ENGINE_HPP
#include <mutex>
#include <vector>
#include <termox/common/lockable.hpp>
#include <termox/common/timer.hpp>
#include <termox/painter/color.hpp>
#include <termox/system/event_loop.hpp>
#include <termox/system/event_queue.h... | a-n-t-h-o-n-y/CPPurses | include/termox/terminal/dynamic_color_engine.hpp | C++ | mit | 1,879 |
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>用Support包显示MaterialDialog</title>
<meta name="description" content="如果自己做个人App项目,很可能在一些情况下用到Dialog,Android自己也提供了系统Dialog,但是... | sfsheng0322/sfsheng0322.github.com | raft/technology/2015/09/10/alert_dialog_theme.html | HTML | mit | 23,321 |
<!DOCTYPE html>
<html>
<head></head>
<body>
<div class="container" style="margin-right:10px;"><span>Text</span><span class="inline">POS</span></div>
<div class="container"><span>Text</span><span class="inline pos">POS</span></div>
</body>
</html> | dota8/dota8.github.io | tests/RD8019/inline_abs.html | HTML | mit | 260 |
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Global Site Tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-106869187-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments)};
gtag('js', new Date());
gtag('c... | rayterrill/BubbaGenie | index.html | HTML | mit | 7,616 |
-- Primes in numbers
-- http://www.codewars.com/kata/54d512e62a5e54c96200019e/
module Codewars.Kata.PrFactors where
import Data.List (unfoldr, findIndex, group)
import Data.Maybe (fromJust)
prime_factors :: Integer -> String
prime_factors k | isPrime k = "("++ show k ++")"
| otherwise = concatMap g .... | gafiatulin/codewars | src/5 kyu/PrFactors.hs | Haskell | mit | 1,095 |
<div class="container">
<div ncy-breadcrumb></div>
<div flash-alert data-active-class="show alert" class="fade" data-duration="10000">
<!-- Manually hide the alert with `hide()` -->
<button type="button" class="close" ng-click="hide()">×</button>
<span class="alert-message" ng-bind... | TranscribeToTEI/webapp | app/Admin/Taxonomy/Access/Access.html | HTML | mit | 2,106 |
<?php
/*
Template Name: Alpha Home Page v4
*/
?>
<?php
function get_alpha_panel($filler=' ', $h=140) {
$html = '';
$html .= '
<div class="panel panel-default">
<div class="panel-body">
<div style="height:'.$h.'px;">
'.$filler.'
... | spokanelibrary/org | template-versions/template-alpha-v4.php | PHP | mit | 5,590 |
<!DOCTYPE html>
<html lang="" ng-app="archiveSearch">
<head>
<title>Title Page</title>
<meta charset="UTF-8">
<meta name=description content="">
<meta name=viewport content="width=device-width, initial-scale=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- Bootstrap CSS -->
... | jaz7290/starterkit | public/search.html | HTML | mit | 8,302 |
import React, { Component } from 'react';
import { Link } from 'react-router-dom';
import './GridItem.css';
const placeholder = require('../../assets/imgholder.png');
class GridItem extends Component {
static defaultProps = {
aspect: "cover",
};
constructor(props) {
super(props);
... | mattruston/idb | vgdb-frontend/src/components/grid/GridItem.js | JavaScript | mit | 1,941 |
<!-- Main component for a primary marketing message or call to action -->
<div class="jumbotron">
<h1>Grosh (Android)</h1>
<h4>
A recipe, shopping list, and meal planning app that simplifies grocery shopping (for me at least).
</h4>
<h1><a class="btn btn-success" href="apps/grosh.apk" role="butt... | erikmhauck/PersonalWebsite | app/grosh/grosh.html | HTML | mit | 681 |
#include "animation_scene.h"
#include "animation/animation.h"
#include "animation/controller.h"
#include "animation/events.h"
#include "animation/property_animation.h"
#include "engine/associative_array.h"
#include "engine/crc32.h"
#include "engine/engine.h"
#include "engine/lua_wrapper.h"
#include "engine/atomic.h"
#... | JakubLukas/LumixEngine | src/animation/animation_scene.cpp | C++ | mit | 29,105 |
using System;
using Untech.SharePoint.Common.MetaModels;
using Untech.SharePoint.Common.Utils;
namespace Untech.SharePoint.Common.Converters
{
internal class FieldConverterWrapper : IFieldConverter
{
private Type ConverterType { get; }
private IFieldConverter ConverterInstance { get; }
public FieldConverterW... | Happi-cat/Untech.SharePoint | Src/Untech.SharePoint.Common/Converters/FieldConverterWrapper.cs | C# | mit | 1,341 |
/* line 3, ../sass/jq-rating.scss */
.jq-rating {
font-size: 25px;
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none; }
/* line 13, ../sass/jq-rating.scss */
.jq-rating--editable .jq-rating-group {
cursor: ... | esleducation/jq-rating | css/jq-rating.css | CSS | mit | 1,345 |
/*
* The MIT License
*
* Copyright 2017 gburdell.
*
* 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... | gburdell/laol | src/laol/generate/cxx/LandExpression.java | Java | mit | 1,496 |
#include <sstream>
#include "Tools/Exception/exception.hpp"
#include "Tools/Interleaver/ARP/Interleaver_core_ARP_DVB_RCS2.hpp"
using namespace aff3ct;
using namespace aff3ct::tools;
template <typename T>
Interleaver_core_ARP_DVB_RCS2<T>
::Interleaver_core_ARP_DVB_RCS2(const int size)
: Interleaver_core<T>(size, "DVB... | aff3ct/aff3ct | src/Tools/Interleaver/ARP/Interleaver_core_ARP_DVB_RCS2.cpp | C++ | mit | 4,020 |
<?php
/*
* This file is part of PHPExifTool.
*
* (c) 2012 Romain Neutron <imprec@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace PHPExiftool\Driver\Tag\MOBI;
use JMS\Serializer\Annotation\ExclusionPolicy;
us... | romainneutron/PHPExiftool | lib/PHPExiftool/Driver/Tag/MOBI/SubjectCode.php | PHP | mit | 777 |
/*global describe, beforeEach, it*/
'use strict';
var assert = require('assert');
describe('wpsite generator', function () {
it('can be imported without blowing up', function () {
var app = require('../app');
assert(app !== undefined);
});
});
| fmccoy/generator-wpsite | test/test-load.js | JavaScript | mit | 270 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>18 --> 19</title>
<link href="./../../assets/style.css" rel="stylesheet">
</head>
<body>
<h2>You have to be fast</h2>
<a href="./05ed023fbcd05d5c91095636f900635b0549e1eef58ad51f7e7491b77ac75c12.html">Teleport</a>
<hr>
... | simonmysun/praxis | TAIHAO2019/pub/SmallGame/AsFastAsYouCan2/2cda3c91339f15a8bde3c475b1bb79016946f8ea9879722906f10d62ac814fea.html | HTML | mit | 550 |
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated from a template.
//
// Manual changes to this file may cause unexpected behavior in your application.
// Manual changes to this file will be overwritten if the code is regenerated.... | grazerjink/PhatHanhSach | PhatHanhSach.Model/CtThanhToan.cs | C# | mit | 1,271 |
<?php
session_start();
require_once("config.php");
$_SESSION['url'] = $_SERVER['REQUEST_URI'];
if(!isset($_SESSION["un"]))
{
header("Location:login.php");
}
if(isset($_SESSION['un']))
{
$username=$_SESSION['un'];
}
if(isset($_GET['user']))
{
$data=$_GET['user'];
}
?>
<!DOCTYPE html>
<html>
<head>
... | shawon100/RUET-OJ | update.php | PHP | mit | 3,722 |
---
layout: page
title: Helix Falls Corporation Executive Retreat
date: 2016-05-24
author: Donna Henry
tags: weekly links, java
status: published
summary: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut eros.
banner: images/banner/meeting-01.jpg
booking:
startDate: 10/25/2016
endDate: 10/28/2016
ctyho... | KlishGroup/prose-pogs | pogs/B/BLLWAHX/HFCER/index.md | Markdown | mit | 2,206 |
<?php
namespace Carta\CartaBundle\Tests\Controller;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
class TipoPrecioControllerTest extends WebTestCase
{
/*
public function testCompleteScenario()
{
// Create a new client to browse the application
$client = static::createClient();
... | cartamitra/cartamitra | src/Carta/CartaBundle/Tests/Controller/TipoPrecioControllerTest.php | PHP | mit | 1,957 |
{% extends "base.html" %}
{% set active_page = collection %}
{% from 'collection_view.html' import collectionView %}
{% block head_js %}
<script>
window.seed_data = {};
window.seed_data.items = JSON.parse('{{ items|tojson }}');
{% if server and selected %}
window.seed_data.start_server = "{{server}}";
window.seed_dat... | Yelp/occam | occam/templates/collection.html | HTML | mit | 759 |
const jwt = require("jsonwebtoken");
module.exports = (UserModel, Config, CryptoHelper) => {
function _transformUser (user) {
return {
"id": user._id,
"name": user.name,
"isAdmin": user.isAdmin,
"created": user.createdAt,
"updated": user.updatedAt
}
}
async function signI... | flashback2k14/YeahUrls | backend/logic/repositories/auth.repository.js | JavaScript | mit | 1,822 |
# Code coverage
if(CPR_BUILD_TESTS AND CPR_GENERATE_COVERAGE)
set(CMAKE_BUILD_TYPE COVERAGE CACHE INTERNAL "Coverage enabled build")
message(STATUS "Enabling gcov support")
if(NOT "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
set(COVERAGE_FLAG "--coverage")
endif()
set(CMAKE_CXX_FLAGS_COVERAG... | whoshuu/cpr | cmake/code_coverage.cmake | CMake | mit | 1,148 |
using Bivi.BackOffice.Web.ViewModels.Pages;
using Bivi.BackOffice.Web.ViewModels.Pages.Administration.Traduction.Details;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Bivi.BackOffice.Web.ViewModels.ModelBuilders.Administration.Tr... | apo-j/Projects_Working | Bivi/src/Bivi.BackOffice/Bivi.BackOffice.Web.ViewModels/ModelBuilders/Administration/Traduction/ITraductionModelBuilder.cs | C# | mit | 510 |
#include "zlreactor/net/SocketUtil.h"
#include <string.h>
#include "zlreactor/base/Logger.h"
NAMESPACE_ZL_NET_START
namespace
{
class SocketInitialization
{
public:
SocketInitialization()
{
#ifdef OS_WINDOWS
WSADATA wsaData;
WSAStartup(MAKEWORD... | lizhenghn123/zl_reactor | zlreactor/net/SocketUtil.cpp | C++ | mit | 10,142 |
<?php
/*
* Banana : The PHP Framework that tastes good
* (c) Régis FLORET 2013 and Later
*
* 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 limitat... | regisf/banana | db/backend/mysql.php | PHP | mit | 2,818 |
<?php
require_once dirname(__FILE__) . '/../_autoload.php';
$image = new Image\Canvas(dirname(__FILE__) . '/source/red.jpg');
$image->fx('resize', 196)
->fx('crop', 0, 100)
->fx('colorize', 'ff0000', '00ff00');
$image->imagePng();
| npetrovski/php5-image | samples/colorize.php | PHP | mit | 247 |
<?php
namespace Mobility\StudentBundle\Form;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
class StudentType extends AbstractType
{
/**
* @param FormBuilderInterface $builder
* @param array $opti... | Nico-lb/mobility-insa | src/Mobility/StudentBundle/Form/StudentType.php | PHP | mit | 1,667 |
class BanksController < ApplicationController
before_action :set_bank, only: [:show, :update]
def index
@banks = Bank.all.order('updated_at')
render json: @banks
end
def show
render json: @bank
end
def update
@bank = Bank.find(params[:routing_number])
if @bank.update(bank_params)
... | tylermachen/zipmark-code-challenge | bank-api/app/controllers/banks_controller.rb | Ruby | mit | 750 |
var express = require('express');
var app = express();
app.use(function(req,res,next){
console.log(req.url);
next();
});
app.all('/jsonp',function(req,res){
var data = req.query;
var callback = data.cb;
res.send(callback+'({s:["a","a2","a3"]})');
});
app.listen(8080); | zhufengnodejs/node201509 | 27.jsonp/jsonp.js | JavaScript | mit | 288 |
namespace HeroicallyRecipes.Web.Controllers
{
using System;
using System.Linq;
using System.Threading.Tasks;
using System.Web;
using System.Web.Mvc;
using HeroicallyRecipes.Data.Models;
using HeroicallyRecipes.Web.Models.Account;
using Microsoft.AspNet.Identity;
using Microsoft.Asp... | MystFan/Heroically-Recipes | Source/HeroicallyRecipes/Web/HeroicallyRecipes.Web/Controllers/AccountController.cs | C# | mit | 17,248 |
<?php
/**
* @Created By ECMall PhpCacheServer
* @Time:2015-04-02 09:12:46
*/
if(filemtime(__FILE__) + 3600 < time())return false;
return array (
'1dfb9cbeca334a45c2e50c57525a00da' => 'e69a2b4a578426aa1b2f6923aee15865',
'5f6746636aaf673f92e8d8e0348ef2a0' => '',
);
?> | guotao2000/ecmall | temp/caches/0208/e15e4d7a976bbac1052c39ffb1ec8a8e.cache.php | PHP | mit | 288 |
Typewriter
==========
When an iOS keyboard is present, TWRTypist can be used to enter a string as follows:
[TWRTypist typeString:@"Hello world!"];
As of 0.1.0, the following character sets are supported:
* Uppercase and lowercase letters
* Spaces
* Punctuation
* Special characters
See RMTTypistSpec for a li... | iotize/Typewriter | README.md | Markdown | mit | 1,768 |
<?php
namespace Wesnick\MetadataReporter\Metadata;
class MetaTagTest extends \PHPUnit_Framework_TestCase
{
public function basicMetadataProvider()
{
return array(
array('http-equiv', 'content-type', 'text/html; charset=UTF-8'),
array('name', 'author', 'Wesley O. Nichols'),
... | wesnick/metadata-reporter | tests/Wesnick/MetadataReporter/Metadata/MetaTagTest.php | PHP | mit | 1,782 |
FROM golang:1.7.1-wheezy
RUN apt-get update \
&& apt-get install -y \
mysql-server \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /go/src/github.com/meta-closure/migo
COPY . .
CMD go test -v .
| meta-closure/migo | Dockerfile | Dockerfile | mit | 219 |
<?php
namespace FileD\FileBundle\Tests\Controller;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
class DefaultControllerTest extends WebTestCase
{
public function testIndex()
{
$client = static::createClient();
$crawler = $client->request('GET', '/hello/Fabien');
$this->asser... | sexyboys/FileDownloader | src/FileD/FileBundle/Tests/Controller/DefaultControllerTest.php | PHP | mit | 399 |
package etl;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.util.concurrent.LinkedBlockingQueue;
public class PlayerETL {
public static LinkedBlockingQueue<String[]> getTempTableData() {
String csvFilePath;
String delimiter = ",";
LinkedBlockingQueue<Stri... | rmcgavick/PFFdb_ETL | src/etl/PlayerETL.java | Java | mit | 1,380 |
var EpubParser;
//var sax = require('./sax');
EpubParser = (function() {
var jszip = require('node-zip');
var zip, zipEntries;
var xml2js = require('xml2js');
var parser = new xml2js.Parser();
var request = require('request');
var fs = require('fs');
function extractText(filename) {
//console.log('extract... | salmgazer/Epub-Count | node_modules/epub-parser/lib/epub-parser.js | JavaScript | mit | 13,635 |
<?php
namespace SCSS\EnrollmentBundle\Traits;
trait AttendeeEnrollmentTrait
{
/**
* @ORM\Id
* @ORM\Column(type="integer")
* @ORM\GeneratedValue(strategy="AUTO")
*/
protected $id;
/**
* Get id
*
* @return integer
*/
public function getId()
{
return $t... | ner0tic/scss | src/SCSS/EnrollmentBundle/Traits/AttendeeEnrollmentTrait.php | PHP | mit | 1,662 |
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Order extends CI_Controller {
public function index(){
$this->load->view('appoint.php');
}
public function detail($order_id){
if(!$user_id = check_login()){
$this->load->view('login.php');
}els... | z32556601/90ping | application/controllers/Order.php | PHP | mit | 8,673 |
class UserMailer < ApplicationMailer
def account_activation(user)
@user = user
mail to: user.email, subject: "Account Activation"
end
def password_reset(user)
@user = user
mail to: user.email, subject: "Password Reset"
end
end
| adambajumba/tukofiti_app | app/mailers/user_mailer.rb | Ruby | mit | 254 |
using System;
using System.Collections.Concurrent;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reactive;
using System.Reactive.Disposables;
using System.Reactive.Linq;
using System.Reflection;
using System.Runtime.InteropServices;
using System.Security.AccessControl;
using System.Security... | Weingartner/XUnitRemote | XUnitRemote/Local/XUnitRemoteTestCaseRunner.cs | C# | mit | 7,908 |
.PHONY: lint
lint:
dune build @check
.PHONY: check-format
check-format:
dune build @fmt
.PHONY: format
format:
dune build @fmt --auto-promote
.PHONY: check
check: lint check-format
| bbc2/ocaml-scan | Makefile | Makefile | mit | 187 |
---
author: jx tsai
comments: true
date: 2006-05-17 02:39:00+00:00
layout: post
link: http://www.jxtsai.info/0928/2006/05/17/%e9%82%84%e6%9c%89%e5%a4%9a%e5%b0%91%e6%b2%92%e7%9c%8b/
slug: '%e9%82%84%e6%9c%89%e5%a4%9a%e5%b0%91%e6%b2%92%e7%9c%8b'
title: 還有多少沒看
wordpress_id: 656
categories:
- reading /watching/ listening
-... | jxtsai/jxtsai.github.io | _posts/2006-05-17-e98284e69c89e5a49ae5b091e6b292e79c8b.markdown | Markdown | mit | 2,896 |
class Button {
constructor(arg) {
arg.type = 'button'
this.element = buildElement(arg)
this.addTo = function(parentId) {
var parent = document.getElementById(parentId)
parent.appendChild(this.element)
}
}
}
class Input {
constructor(arg) {
arg.type = 'input'
this.element = bu... | flexwie/electron-components | js/main.js | JavaScript | mit | 1,588 |
import AppActions from "./RichAppActions";
import CarbonActions, { CarbonAction } from "./CarbonActions"
import { handles, CarbonStore, Dispatcher, dispatch } from './CarbonFlux';
import RichPanelConfig from './RichPanelConfig';
import LayoutActions from './layout/LayoutActions';
import { Selection, app, CommandManager... | CarbonDesigns/carbon-ui | src/AppStore.ts | TypeScript | mit | 3,860 |
var group__eth__mac__interface__gr =
[
[ "Ethernet MAC Events", "group__ETH__MAC__events.html", "group__ETH__MAC__events" ],
[ "Ethernet MAC Control Codes", "group__eth__mac__control.html", "group__eth__mac__control" ],
[ "Ethernet MAC Timer Control Codes", "group__eth__mac__time__control.html", "group_... | ryankurte/stm32f4-base | drivers/CMSIS/docs/Driver/html/group__eth__mac__interface__gr.js | JavaScript | mit | 6,940 |
package org.embulk.parser;
import org.embulk.spi.ParserPlugin;
import org.embulk.tester.EmbulkPluginTester;
import org.junit.Test;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.net.URISyntaxException;
import java.util.Arrays;
import java.util.fu... | jami-i/embulk-parser-apache-custom-log | src/test/java/org/embulk/parser/TestApacheLogParserPlugin.java | Java | mit | 6,958 |
(function($){
$(document).ready(function(){
/**
* @type {Object}
*/
var app = {
delay_before_gridSquares_animation: 365,
gridSquares_AnimationTiming: 350,
btwEach_gridSquares_animationDelay: 50,
/**
* Init the app.
*/
init: function() {
// Display the best score of the player or save the d... | maciozik/matrix | js/app.js | JavaScript | mit | 31,702 |
/*
* Copyright 2013 MongoDB, Inc.
*
* 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 to ... | Remuv/corto_connectors | mongo/driver/c_driver/include/mongoc-cursor.h | C | mit | 2,605 |
var mongo = require('../');
var db = mongo.db('192.168.0.103/test');
// var db = mongo.db('127.0.0.1/test');
var myconsole = require('myconsole');
var foo = db.collection('foo');
setInterval(function() {
foo.insert({foo:'foo'}, function(err, result){
if(err) return myconsole.error(err);
foo.count(function(err, ... | thomjoy/sydney-buses | node_modules/mongoskin/integration/longlive.js | JavaScript | mit | 720 |
#!/usr/bin/env python
"""Print out a report about whats in a vectortile
Usage:
tileinfo.py [options] [SOURCE]
Options:
--srcformat=SRC_FORMAT Source file format: (tile | json)
--indent=INT|None JSON indentation level. Defaults to 4. Use 'None' to disable.
-h --help Show this screen.
--vers... | SkyTruth/vectortile | utils/tileinfo.py | Python | mit | 2,468 |
package com.carsonsx.rmi.websocket;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.socket.server.standard.ServerEndpointExporter;
/**
*
* Created by carsonsx on 19/03/2017.
*/
@Configuration
public class WebSocketConfi... | carsonsx/java-tutorials | websocket/src/main/java/com/carsonsx/rmi/websocket/WebSocketConfig.java | Java | mit | 449 |
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,user-scalable=no,minimum-scale=1.0,maximum-scale=1.0"/>
<title>聊天室</title>
<link rel="stylesheet" href="http://apps.bdimg.com/libs/bootstrap/3.3.4/css/bootstrap.min.css" type="text/css" me... | jmjoy/go-chatroom | view/index.html | HTML | mit | 4,708 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" con... | v8-dox/v8-dox.github.io | 4e07bd4/html/classv8_1_1Global.html | HTML | mit | 34,079 |
@echo off
start "" "C:\Program Files (x86)\LOVE\love" . | RadioactiveMonkey/InflateGame | Inflate/run.bat | Batchfile | mit | 56 |
#ifndef BUFFER_H
#define BUFFER_H
#include <algorithm>
#include <cstdint>
#include <iosfwd>
#include <string>
class Buffer {
public:
const std::size_t size;
char *const data;
Buffer() : Buffer(0) {}
Buffer(const std::size_t size) : size(size), data(new char[size]) {}
Buffer(const Buffer &other) : Buffer... | gnar/gunflow | src/buffer.h | C | mit | 730 |
package com.itl_energy.webclient.itl.model;
/**
* Weather record container class.
*
* @author Bruce Stephen
* @version 22/05/2013
* @version 10/07/2013
*/
public class Status {
protected int statusId;
protected String statusDescription;
public Status() {
super();
thi... | itlenergy/itlenergy | itlenergy-webclient/src/main/java/com/itl_energy/webclient/itl/model/Status.java | Java | mit | 934 |
//import {it, describe, expect, beforeEach, inject} from '@angular/testing';
import {DurationFormat} from './duration.pipe';
describe('MyPipe Tests', () => {
let pipe:DurationFormat;
beforeEach(() => {
pipe = new DurationFormat();
});
it('Should capitalize all words in a string', () => {
... | alexmsystems/hello2 | src/app/pipe.spec.ts | TypeScript | mit | 575 |
package org.cyclops.everlastingabilities.ability;
import net.minecraft.entity.passive.AnimalEntity;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.util.EntityPredicates;
import net.minecraft.world.World;
import org.cyclops.cyclopscore.helper.MinecraftHelpers;
import java.util.List;
import java.... | CyclopsMC/EverlastingAbilities | src/main/java/org/cyclops/everlastingabilities/ability/AbilityTypeFertility.java | Java | mit | 1,655 |
<img id="avatar_small_preview" src="{$small_avatar}" />
<a href="javascript:;" class="btn-att-white" onclick="changeFace()" style="vertical-align:bottom;margin:0 0 0 5px;"><span>上传头像</span></a>
<script type="text/javascript">
var changeFace = function() {
ui.box.load(U('widget/AvatarBox/show'), '上传头像');
return... | zhiyicx/thinksns-old-code | src/addons/widget/AvatarBoxWidget/default.html | HTML | mit | 358 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>18 --> 19</title>
<link href="./../../assets/style.css" rel="stylesheet">
</head>
<body>
<h2>You have to be fast</h2>
<a href="./1f7946fabdce269ecb8dfbda932358ae48b35319a1723a2a0443700324dedb8e.html">Teleport</a>
<hr>
... | simonmysun/praxis | TAIHAO2019/pub/SmallGame/AsFastAsYouCan2/e339fb012cb81a06a991933d1fbc0155e4dc10c52918a58a4dbac63eff2f26d1.html | HTML | mit | 550 |
#!/usr/bin/env python
#
# Protein Engineering Analysis Tool DataBase (PEATDB)
# Copyright (C) 2010 Damien Farrell & Jens Erik Nielsen
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either ver... | dmnfarrell/peat | PEATDB/scripts/multiProjects.py | Python | mit | 10,004 |
# Headings Without Content
<!-- markdownlint-disable single-title heading-style -->
<!-- markdownlint-disable no-duplicate-heading no-trailing-spaces -->
#
#
#
#
##
##
##
##
| DavidAnson/markdownlint | test/headings-without-content.md | Markdown | mit | 195 |
<?php
namespace OAuth2\Exception;
/**
* @author Michal Kvasničák <michal.kvasnicak@mink.sk>
*/
class MissingParameterException extends OAuth2Exception
{
}
| michalkvasnicak/oauth2-server | src/OAuth2/Exception/MissingParameterException.php | PHP | mit | 161 |
from setuptools import setup, find_packages
with open("README.rst") as readme:
long_description = readme.read()
setup(
name='algos-py',
version='0.4.5',
license='MIT',
author='Aleksandr Lisianoi',
author_email='all3fox@gmail.com',
url='https://github.com/all3fox/algos-py',
packages=fin... | all3fox/algos-py | setup.py | Python | mit | 485 |
// Only publish invitation codes for the logged in user
Meteor.publish("invitations", function (all) {
if(!this.userId)
return [];
// XXX in the future the admin page requires to fetch
// all invitations. Then do somehting with 'all'.
return Invitations.find({$or: [ {broadcastUser: this.userId},
... | hckrs/hckrs.io | packages/collection-invitations/invitations/publish.js | JavaScript | mit | 389 |
<?php
/**
* Customer processing order email
*
* This template can be overridden by copying it to yourtheme/woocommerce/emails/customer-processing-order.php.
*
* HOWEVER, on occasion WooCommerce will need to update template files and you
* (the theme developer) will need to copy the new files to your theme to
* m... | tnormington/timber_wordpress_theme | woocommerce/emails/customer-processing-order.php | PHP | mit | 1,945 |
// This file contains auto-generated code.
namespace System
{
namespace Collections
{
namespace Concurrent
{
// Generated from `System.Collections.Concurrent.BlockingCollection<>` in `System.Collections.Concurrent, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`
... | github/codeql | csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Collections.Concurrent.cs | C# | mit | 22,550 |
Rails.application.routes.draw do
config = Rails.application.config.baukis
constraints host: config[:staff][:host] do
namespace :staff, path: config[:staff][:path] do
root 'top#index'
get 'login' => 'sessions#new', as: :login
resource :session, only: [:create, :destroy]
resource :accoun... | nwebcraft/baukis | config/routes.rb | Ruby | mit | 2,312 |
require=(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)... | susielu/react-select | examples/dist/bundle.js | JavaScript | mit | 45,529 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.