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 |
|---|---|---|---|---|---|
define(['js/util'], function (util) {
"use strict";
var sf2 = {};
sf2.createFromArrayBuffer = function(ab) {
var that = {
riffHeader: null,
sfbk: {}
};
var ar = util.ArrayReader(ab);
var sfGenerator = [
"startAddrsOf... | ruly-rudel/tipsound | js/sf2.js | JavaScript | mit | 16,386 |
=begin
<recording pid=""
cookie=""
stamp=""
agent="">
<record id=""
stamp=""
status=""
method=""
url=""
request-time="">
<header name="" value=""/>
<body><![CDATA[HTML OR WHATEVER HERE]]></body>
... | kuccello/deja-vu | lib/deja-vu/model/recording.rb | Ruby | mit | 982 |
package org.softlang.service.company;
import java.io.Serializable;
import java.util.LinkedList;
import java.util.List;
/**
* A department has a name, a manager, employees, and subdepartments.
*/
public class Department implements Serializable {
private static final long serialVersionUID = -2008895922177165250L;
... | amritbhat786/DocIT | 101repo/contributions/javawsServer/OneOhOneCompanies/src/org/softlang/service/company/Department.java | Java | mit | 1,240 |
/**
* Contains methods for extracting/selecting final multiword candidates.
* @author Valeria Quochi @author Francesca Frontini @author Francesco Rubino
* Istituto di linguistica Computazionale "A. Zampolli" - CNR Pisa - Italy
*
*/
package multiword; | francescafrontini/MWExtractor | src/multiword/package-info.java | Java | mit | 262 |
#include "PerformanceSpriteTest.h"
enum {
kMaxNodes = 50000,
kNodesIncrease = 250,
TEST_COUNT = 7,
};
enum {
kTagInfoLayer = 1,
kTagMainLayer = 2,
kTagMenuLayer = (kMaxNodes + 1000),
};
static int s_nSpriteCurCase = 0;
///////////////////////////////////////////////////////... | wenhulove333/ScutServer | Sample/ClientSource/samples/Cpp/TestCpp/Classes/PerformanceTest/PerformanceSpriteTest.cpp | C++ | mit | 17,742 |
class SparseVector {
unordered_map<int, int> repr;
int size = 0;
public:
SparseVector(vector<int> &nums) {
size = nums.size();
for (int i=0; i<nums.size(); i++) {
if (nums[i] == 0) { continue; }
repr[i] = nums[i];
}
}
// Return the dotPro... | cbrghostrider/Hacking | leetcode/_001570_dotProdSparseVectors.cpp | C++ | mit | 807 |
module PrintSquare
class CommandRunner
class << self
def run(args)
validate_args(args)
print_square(args[0].to_i)
end
def print_square(number)
size = Math.sqrt(number).to_i
n = number
x = PrintSquare::Vector.new size.even? ? 1 : -1, size, size.even? ? 1 :... | AktionLab/print_square | lib/print_square/command_runner.rb | Ruby | mit | 2,057 |
package com.ripplargames.meshio.meshformats.ply;
import com.ripplargames.meshio.vertices.VertexType;
public class PlyVertexDataType {
private final VertexType vertexType;
private final PlyDataType plyDataType;
public PlyVertexDataType(VertexType vertexType, PlyDataType plyDataType) {
this.vertexT... | NathanJAdams/MeshIO | src/com/ripplargames/meshio/meshformats/ply/PlyVertexDataType.java | Java | mit | 531 |
require 'multi_xml'
require 'ostruct'
require 'roxml'
module WxHelper
module XmlHelper
class Message
def initialize(xml)
hash = parse_xml xml
@source = OpenStruct.new(hash['xml'])
end
def method_missing(method, *args, &block)
@source.send(method.to_s.classify, *args, ... | sforce100/wxpay | lib/wxpay/helpers/xml_helper.rb | Ruby | mit | 3,671 |
/**
* @file
* @author Mamadou Babaei <info@babaei.net>
* @version 0.1.0
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2016 - 2021 Mamadou Babaei
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Softwa... | NuLL3rr0r/blog-subscription-service | CoreLib/Compression.hpp | C++ | mit | 2,563 |
import asyncio
import email.utils
import json
import sys
from cgi import parse_header
from collections import namedtuple
from http.cookies import SimpleCookie
from urllib.parse import parse_qs, unquote, urlunparse
from httptools import parse_url
from sanic.exceptions import InvalidUsage
from sanic.log import error_l... | lixxu/sanic | sanic/request.py | Python | mit | 11,420 |
require 'stringio'
require 'highline/import'
module RailsZen
class ChosenAttr
attr_accessor :name, :type, :validator, :type_based_validators, :scope_attr
def initialize(name, type)
@name = name
@type = type
@scope_attr = []
end
def get_user_inputs
get_presence_req
get_t... | vysakh0/rails_zen | lib/rails_zen/chosen_attr.rb | Ruby | mit | 2,712 |
# frozen_string_literal: true
RSpec::Matchers.define :enforce_authorization_api do
expected_error =
{ 'error' => 'User is not authorized to access this resource.' }
match do |actual|
expect(actual).to have_http_status(403)
expect(JSON.parse(actual.body)).to eq(expected_error)
end
failure_message ... | brunofacca/zen-rails-base-app | spec/support/matchers/enforce_authorization_api.rb | Ruby | mit | 804 |
from .tile import Split, Stack, TileStack
class Tile(Split):
class left(Stack):
weight = 3
priority = 0
limit = 1
class right(TileStack):
pass
class Max(Split):
class main(Stack):
tile = False
class InstantMsg(Split):
class left(TileStack): # or maybe no... | tailhook/tilenol | tilenol/layout/examples.py | Python | mit | 657 |
/*
* ***** BEGIN LICENSE BLOCK *****
* Zimbra Collaboration Suite Web Client
* Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Zimbra, Inc.
*
* The contents of this file are subject to the Zimbra Public License
* Version 1.3 ("License"); you may not use this file except in
* compliance with the License. You m... | nico01f/z-pec | ZimbraWebClient/WebRoot/js/zimbraMail/share/view/dialog/ZmFolderPropsDialog.js | JavaScript | mit | 14,081 |
/*
* ***** BEGIN LICENSE BLOCK *****
* Zimbra Collaboration Suite Server
* Copyright (C) 2006, 2007, 2008, 2009, 2010 Zimbra, Inc.
*
* The contents of this file are subject to the Zimbra Public License
* Version 1.3 ("License"); you may not use this file except in
* compliance with the License. You may obtain a... | nico01f/z-pec | ZimbraServer/src/java/com/zimbra/cs/util/SpamExtract.java | Java | mit | 21,891 |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace BookReviews.UI.Saga
{
public class OrderDetailsRequestSaga :
SagaStateMachine<OrderDetailsRequestSaga>, ISaga
{
static OrderDetailsRequestSaga()
{
Define(Saga);
}
private static vo... | bob2000/BookReviews | BookReviews.UI/Saga/OrderDetailsRequestSaga.cs | C# | mit | 3,007 |
ActiveRecord::Schema.define(:version => 1) do
create_table :notes, :force => true do |t|
t.string :title
t.text :body
end
end
| relax4u/jpvalidator | spec/schema.rb | Ruby | mit | 139 |
var coords;
var directionsDisplay;
var map;
var travelMode;
var travelModeElement = $('#mode_travel');
// Order of operations for the trip planner (each function will have detailed notes):
// 1) Calculate a user's route, with directions.
// 2) Run a query using the route's max and min bounds to narrow potential result... | codeforsanjose/CycleSafe | app/static/js/trip_planner.js | JavaScript | mit | 9,596 |
define(['backbone', 'marionette', 'mustache', 'jquery', 'text!templates/ctrldialog.html'],
function(Backbone, Marionette, Mustache, $, template) {
return Marionette.ItemView.extend({
initialize: function(options) {
if (!options.icon_name) {
options.icon_name ... | yoniji/ApeRulerDemo | app/modules/ctrls/CtrlDialogView.js | JavaScript | mit | 1,645 |
export * from './alert.service';
export * from './authentication.service';
export * from './user.service';
export * from './serviceRequest.service'; | JacksonLee2019/CS341-VolunteerSchedule | app/_services/index.ts | TypeScript | mit | 151 |
import { InvalidArgumentError } from '../errors/InvalidArgumentError';
import { NotImplementedError } from '../errors/NotImplementedError';
import mustache from 'mustache';
import '../utils/Function';
// The base class for a control
export class Control {
// The constructor of a control
// id: The id of the control
... | kmati/affront | lib/Control/index.js | JavaScript | mit | 3,736 |
using System.Collections.Generic;
using System.Diagnostics;
using System.Runtime.Serialization;
namespace AutoHelp.domain.Models
{
[DebuggerDisplay("{Fullname}")]
[DataContract]
public class Method : CodeCommentBase
{
[DataMember]
public string ReturnType { get; set; }
[DataMem... | RaynaldM/autohelp | AutoHelp.domain/Models/Method.cs | C# | mit | 482 |
'use strict';
/* jasmine specs for filters go here */
describe('filter', function() {
}); | LeoAref/angular-seed | test/unit/filtersSpec.js | JavaScript | mit | 93 |
<div id="contenido">
<div class="bloque">
<h2 class="titulo"><strong>Contacto</strong></h2>
<p>Rellene el siguiente formulario si desea ponerse en contacto.</p>
<?php
if(!empty($estado)){
echo $estado;
}
?>
<form action="contacto/" method="post">
<fieldset>
<legend>Datos</legend>... | jh2odo/mfp5-mvc | demo/app/vistas/inicio/contacto.php | PHP | mit | 1,496 |
/*
* Copyright (c) 2015 Cryptonomex, Inc., and contributors.
*
* The 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, including without limitation the... | bitsuperlab/cpp-play2 | libraries/chain/market_evaluator.cpp | C++ | mit | 11,139 |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reactive.Linq;
using System.Threading.Tasks;
using Chromamboo.Contracts;
using Newtonsoft.Json.Linq;
namespace Chromamboo.Providers.Notification
{
public class AtlassianCiSuiteBuildStatusNotificationProvider : INotificationProvider<... | duvaneljulien/chromamboo | src/Chromamboo/Providers/Notification/AtlassianCiSuiteBuildStatusNotificationProvider.cs | C# | mit | 4,569 |
namespace SupermarketsChainDB.Data.Migrations
{
using System;
using System.Collections.Generic;
using System.Linq;
using Oracle.DataAccess.Client;
using SupermarketsChainDB.Data;
using SupermarketsChainDB.Models;
public static class OracleToSqlDb
{
private static string Connect... | ttittoOrg/SupermarketsChainDB | SupermarketsChainDB/SupermarketsChainDB.Data/Migrations/OracleToSqlDb.cs | C# | mit | 5,619 |
class ApplicationController < ActionController::Base
protect_from_forgery with: :exception
helper_method :current_user
def current_user
@current_user ||= User.find(session[:user_id]) if session[:user_id]
end
def require_login
render_404 unless current_user
end
private
def render_404
rais... | mk12/great-reads | app/controllers/application_controller.rb | Ruby | mit | 380 |
import { Injectable } from '@angular/core';
import { SyncResult } from 'app/model/syncResult'
import { Log } from 'app/model/log'
import { LogItem } from 'app/model/logItem'
@Injectable()
export class SyncResultService
{
syncResultService : any;
constructor()
{
this.syncResultService = (window as ... | limpygnome/parrot-manager | parrot-manager-frontend/src/app/service/syncResult.service.ts | TypeScript | mit | 2,422 |
import * as React from 'react';
import { StandardProps } from '..';
export interface TableProps extends StandardProps<TableBaseProps, TableClassKey> {
component?: React.ReactType<TableBaseProps>;
}
export type TableBaseProps = React.TableHTMLAttributes<HTMLTableElement>;
export type TableClassKey = 'root';
declar... | cherniavskii/material-ui | packages/material-ui/src/Table/Table.d.ts | TypeScript | mit | 391 |
hmm = [
"https://media3.giphy.com/media/TPl5N4Ci49ZQY/giphy.gif",
"https://media0.giphy.com/media/l14qxlCgJ0zUk/giphy.gif",
"https://media4.giphy.com/media/MsWnkCVSXz73i/giphy.gif",
"https://media1.giphy.com/media/l2JJEIMLgrXPEbDGM/giphy.gif",
"https://media0.giphy.com/media/dgK22exekwOLm/giphy.gif"... | garr741/mr_meeseeks | rtmbot/plugins/hmm.py | Python | mit | 322 |
/**
* Most of this code is adapated from https://github.com/qimingweng/react-modal-dialog
*/
import React from 'react';
import ReactDOM from 'react-dom';
import EventStack from './EventStack';
import PropTypes from 'prop-types';
const ESCAPE = 27;
/**
* Get the keycode from an event
* @param {Event} event The bro... | LIQIDTechnology/liqid-react-components | src/components/Modal/Components.js | JavaScript | mit | 8,193 |
#include "pch.h"
#include "ActalogicApp.h"
TCHAR ActalogicApp::m_szWindowClass[] = _T("Actalogic");
TCHAR ActalogicApp::m_szTitle[] = _T("Actalogic");
ActalogicApp::ActalogicApp():
m_hWnd(NULL),
m_hInstance(NULL),
m_d2d1Manager(),
m_entityFPS(),
m_entityDebugInfoLayer(),
m_entitySceneContainer(this),
m_inputHelper()
... | iwa-yuki/Actalogic | Actalogic/Actalogic/ActalogicApp.cpp | C++ | mit | 6,115 |
import * as React from 'react';
import * as ReactDom from 'react-dom';
import * as strings from 'BarChartDemoWebPartStrings';
import { Version } from '@microsoft/sp-core-library';
import {
BaseClientSideWebPart,
IPropertyPaneConfiguration,
} from '@microsoft/sp-webpart-base';
import { PropertyPaneWebPartInformation... | rgarita/sp-dev-fx-webparts | samples/react-chartcontrol/src/webparts/barChartDemo/BarChartDemoWebPart.ts | TypeScript | mit | 1,881 |
package ca.wescook.wateringcans.events;
import ca.wescook.wateringcans.potions.ModPotions;
import net.minecraft.entity.SharedMonsterAttributes;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraftforge.client.event.FOVUpdateEvent;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
impor... | WesCook/WateringCans | src/main/java/ca/wescook/wateringcans/events/EventFOV.java | Java | mit | 1,001 |
module Rake
class << self
def verbose?
ENV.include? "VERBOSE" and ["1", "true", "yes"].include? ENV["VERBOSE"]
end
end
end
| chetan/test_guard | lib/test_guard/rake.rb | Ruby | mit | 142 |
var GoogleStrategy = require('passport-google-oauth').OAuth2Strategy;
var util = require('util');
var session = require('express-session');
var passport = require('passport');
module.exports = (app, url, appEnv, User) => {
app.use(session({
secret: process.env.SESSION_SECRET,
name: 'freelancalot',... | lorentzlasson/node-angular-starter | auth.js | JavaScript | mit | 2,087 |
const path = require('path');
const express = require('express');
const bodyParser = require('body-parser');
const auth = require('http-auth');
// const basicAuth = require('basic-auth-connect');
const apiHandler = require('./api-handler')
/**
* Installs routes that serve production-bundled client-side assets.
* It i... | codycoggins/angular2-starter-cody | server/node-app-server.js | JavaScript | mit | 1,845 |
from djblets.cache.backend import cache_memoize
class BugTracker(object):
"""An interface to a bug tracker.
BugTracker subclasses are used to enable interaction with different
bug trackers.
"""
def get_bug_info(self, repository, bug_id):
"""Get the information for the specified bug.
... | reviewboard/reviewboard | reviewboard/hostingsvcs/bugtracker.py | Python | mit | 1,633 |
using System;
using System.Linq;
namespace TypeScriptDefinitionsGenerator.Common.Extensions
{
public static class StringExtensions
{
public static string ToCamelCase(this string value)
{
return value.Substring(0, 1).ToLower() + value.Substring(1);
}
public static s... | slovely/TypeScriptDefinitionsGenerator | src/TypeScriptDefinitionsGenerator.Common/Extensions/StringExtensions.cs | C# | mit | 1,661 |
package net.zer0bandwidth.android.lib.content.querybuilder;
import android.content.ContentResolver;
import android.support.test.runner.AndroidJUnit4;
import android.test.ProviderTestCase2;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import static junit.framework.Assert.assertNull... | zerobandwidth-net/android | libZeroAndroid/src/androidTest/java/net/zer0bandwidth/android/lib/content/querybuilder/DeletionBuilderTest.java | Java | mit | 1,665 |
using System;
namespace DD.Cloud.WebApi.TemplateToolkit
{
/// <summary>
/// Factory methods for creating value providers.
/// </summary>
/// <typeparam name="TContext">
/// The type used as a context for each request.
/// </typeparam>
public static class ValueProvider<TContext>
{
/// <summary>
/// Crea... | DimensionDataCBUSydney/Watt | Watt/ValueProvider.cs | C# | mit | 5,719 |
#ifndef COBALT_UTILITY_HPP_INCLUDED
#define COBALT_UTILITY_HPP_INCLUDED
#pragma once
#include <cobalt/utility/compare_floats.hpp>
#include <cobalt/utility/enum_traits.hpp>
#include <cobalt/utility/enumerator.hpp>
#include <cobalt/utility/factory.hpp>
#include <cobalt/utility/hash.hpp>
#include <cobalt/utility/type_in... | mzhirnov/cobalt | include/cobalt/utility.hpp | C++ | mit | 530 |
<?xml version="1.0" ?><!DOCTYPE TS><TS language="fa" version="2.0">
<defaultcodec>UTF-8</defaultcodec>
<context>
<name>AboutDialog</name>
<message>
<location filename="../forms/aboutdialog.ui" line="+14"/>
<source>About Babylonian</source>
<translation>در مورد Babylonian</translation>
... | bblonian/Babylonian | src/qt/locale/bitcoin_fa.ts | TypeScript | mit | 119,341 |
import sys
from stack import Stack
def parse_expression_into_parts(expression):
"""
Parse expression into list of parts
:rtype : list
:param expression: str # i.e. "2 * 3 + ( 2 - 3 )"
"""
raise NotImplementedError("complete me!")
def evaluate_expression(a, b, op):
raise NotImplementedErr... | tylerprete/evaluate-math | postfix.py | Python | mit | 792 |
// Preprocessor Directives
#define STB_IMAGE_IMPLEMENTATION
// Local Headers
#include "glitter.hpp"
#include "shader.h"
#include "camera.h"
// Console Color
#include "consoleColor.hpp"
// System Headers
#include <glad/glad.h>
#include <GLFW/glfw3.h>
#include <glm/gtc/matrix_transform.hpp>
// Standard Headers
//#inc... | THISISAGOODNAME/learnopengl-glitter | other/renderDoc reverse engineering/main.cpp | C++ | mit | 88,752 |
using System.ComponentModel.DataAnnotations;
namespace ContosoUniversity.Web.ViewModels
{
public class TokenViewModel
{
[Required]
[EmailAddress]
public string Email { get; set; }
[Required]
[DataType(DataType.Password)]
public string Password { get; set; }
... | alimon808/contoso-university | ContosoUniversity.Web/ViewModels/TokenViewModel.cs | C# | mit | 326 |
<?php
session_start();
include_once "base.php";
$rowsPerPage=10;
$offset=2;
$sql = "SELECT area_code,area_desc,active FROM `area` ORDER BY area_code ";
$query = mysql_query($sql);
if(!$query) die('MySQL Error: '.mysql_error());
?>
<div class='form'>
<button onclick="open_menu('area_form');"><s... | StarkLiew/AtOfis | callback/area_browse.php | PHP | mit | 1,048 |
require "spec_helper"
describe Time do
describe ".beginning_of_timehop_day" do
subject { time.beginning_of_timehop_day }
context "after 5am" do
let(:time) { Time.parse("2011-11-07 15:15:33") }
let(:beginning_of_timehop_day) { Time.parse("2011-11-07 5:00:00") }
it { should be_within(1.second... | timehop/timehop_time | spec/timehop_time/time_spec.rb | Ruby | mit | 1,128 |
"use strict";
const util = require("util");
const colors = require("colors");
const consoleLog = console.log;
const consoleWarn = console.warn;
const consoleError = console.error;
const EError = require("../eerror");
function padd(str, length = process.stdout.columns) {
return str + " ".repeat(length - str.length... | archfz/drup | src/terminal-utils/formatter.js | JavaScript | mit | 5,026 |
require 'active_support/core_ext/array/conversions'
require 'delegate'
module ServiceObject
# Provides a customized +Array+ to contain errors that happen in service layer.
# Also provides a utility APIs to handle errors well in controllers.
# (All array methods are available by delegation, too.)
# errs = Se... | untidy-hair/service_object | lib/service_object/errors.rb | Ruby | mit | 2,021 |
#!/usr/bin/python
# -*- coding: utf-8 -*-
# @author victor li nianchaoli@msn.cn
# @date 2015/10/07
import baseHandler
class MainHandler(baseHandler.RequestHandler):
def get(self):
self.redirect('/posts/last')
| lncwwn/woniu | routers/mainHandler.py | Python | mit | 224 |
/**
*
*/
package me.dayler.ai.ami.conn;
import javax.net.SocketFactory;
import javax.net.ssl.SSLSocketFactory;
import java.io.*;
import java.net.InetAddress;
import java.net.InetSocketAddress;
import java.net.Socket;
import java.util.NoSuchElementException;
import java.util.Scanner;
import java.util.regex.Pattern;
... | dayler/AsteriskInterface | src/me/dayler/ai/ami/conn/SocketConnectionFacadeImpl.java | Java | mit | 4,154 |
// test/main.js
var Parser = require('../src/markdown-parser');
var parser = new Parser();
var parserOptions = new Parser();
var assert = require("assert");
describe('tests', function() {
describe('parsing', function() {
it('bold', function(done) {
parser.parse("**b** __b__", function(err, result) { ... | darul75/markdown-parser | test/main.js | JavaScript | mit | 3,107 |
import React from "react";
import { connect } from "react-redux";
import { withRouter, Route } from "react-router";
import { Link } from "react-router-dom";
import { Entry } from "../../pages/entry";
class BlogCard extends React.Component {
render() {
return (
<div>
<h2>{this.props.title}</h2>
... | relhtml/prologue | components/BlogCard/index.js | JavaScript | mit | 481 |
module.exports = {
stores: process.env.STORES ? process.env.STORES.split(',') : [
'elasticsearch',
'postgresql',
'leveldb'
],
postgresql: {
host: process.env.POSTGRESQL_HOST || 'localhost',
port: process.env.POSTGRESQL_PORT || '5432',
username: process.env.POSTGRESQL_USER || 'postgres',... | trappsnl/dstore | config.js | JavaScript | mit | 1,089 |
import appActions from './application'
import todosActions from './todos'
import filterActions from './filter'
import commentsActions from './comments'
import userActions from './user'
export {
appActions,
todosActions,
filterActions,
commentsActions,
userActions
}
export * from './application'
export * fro... | Angarsk8/elixir-cowboy-react-spa | client/src/actions/index.js | JavaScript | mit | 407 |
package info.yongli.statistic.table;
/**
* Created by yangyongli on 25/04/2017.
*/
public class ColumnTransformer {
}
| yongli82/dsl | src/main/java/info/yongli/statistic/table/ColumnTransformer.java | Java | mit | 123 |
#region License
// Copyright (c) 2009 Sander van Rossen
//
// 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, m... | xlgames-inc/XLE | Tools/HyperGraph/NodeConnector.cs | C# | mit | 3,299 |
import * as R_drop from '../ramda/dist/src/drop';
declare const number: number;
declare const string: string;
declare const boolean_array: boolean[];
// @dts-jest:pass
R_drop(number, string);
// @dts-jest:pass
R_drop(number, boolean_array);
| ikatyang/types-ramda | tests/drop.ts | TypeScript | mit | 243 |
function browserSupportsHtml5HistoryApi() {
return !! (history && history.replaceState && history.pushState);
}
$(document).ready(function() {
//_gaq.push(['_trackEvent', 'Citizen-Format-Smartanswer', 'Load']);
if(browserSupportsHtml5HistoryApi()) {
var formSelector = ".current form";
initializeHistory(... | ministryofjustice/smart-answers | app/assets/javascripts/smart-answers.js | JavaScript | mit | 4,962 |
Ext.define('CustomIcons.view.Main', {
extend: 'Ext.tab.Panel',
xtype: 'main',
requires: [
'Ext.TitleBar',
'Ext.Video'
],
config: {
tabBarPosition: 'bottom',
items: [
{
title: 'Welcome',
iconCls: 'headphones',
... | joshuamorony/CustomIcons | app/view/Main.js | JavaScript | mit | 1,564 |
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _index = require('../../../_lib/setUTCDay/index.js');
var _index2 = _interopRequireDefault(_index);
var _index3 = require('../../../_lib/setUTCISODay/index.js');
var _index4 = _interopRequireDefault(_index3);
var _index5 = require(... | lucionei/chamadotecnico | chamadosTecnicosFinal-app/node_modules/date-fns/parse/_lib/units/index.js | JavaScript | mit | 4,996 |
<script src='<?php echo base_url()?>assets/js/tinymce/tinymce.min.js'></script>
<script>
tinymce.init({
selector: '#myartikel'
});
</script>
<form action="<?php echo base_url('admin/Cartikel_g/proses_add_artikel') ?>" method="post" enctype="multipart/form-data">
<div class="col-md-8 whitebox">
<h3 cl... | afifhidayat24/minunew | application/views/admin/add-guru-artikel-v.php | PHP | mit | 2,940 |
# frozen_string_literal: true
module ArrayUtil
def self.insert_before(array, new_element, element)
idx = array.index(element) || -1
array.insert(idx, new_element)
end
def self.insert_after(array, new_element, element)
idx = array.index(element) || -2
array.insert(idx + 1, new_element)
end
en... | tablexi/nucore-open | lib/array_util.rb | Ruby | mit | 322 |
// get params
function getParams()
{
var params = {
initial_amount: parseInt($('#initial_amount').val(), 10) || 0,
interest_rate_per_annum: parseFloat($('#interest_rate_per_annum').val()) / 100 || 0,
monthly_amount: parseFloat($('#monthly_amount').val()),
num_months: parseInt($('#num_months').val(), 10)
};
... | timotheeg/html_loan_calculator | js/main.js | JavaScript | mit | 2,663 |
using Lidgren.Network;
namespace Gem.Network.Handlers
{
public class DummyHandler : IMessageHandler
{
public void Handle(NetConnection sender, object args)
{ }
}
}
| gmich/Gem | Gem.Network/Handlers/DummyHandler.cs | C# | mit | 195 |
define([
"dojo/_base/declare",
"dojo/_base/fx",
"dojo/_base/lang",
"dojo/dom-style",
"dojo/mouse",
"dojo/on",
"dijit/_WidgetBase",
"dijit/_TemplatedMixin",
"dojo/text!./templates/TGPrdItem.html",
"dijit/_OnDijitClickMixin",
"dijit/_WidgetsInTemplateMixin",
"dijit/form/Button"
], function(declar... | MingXingTeam/dojo-mobile-test | contactsList/widgets/TGPrdWidget/TGPrdWidget.js | JavaScript | mit | 2,307 |
const { ipcRenderer, remote } = require('electron');
const mainProcess = remote.require('./main');
const currentWindow = remote.getCurrentWindow();
const $name = $('.name-input');
const $servings = $('.servings-input');
const $time = $('.time-input');
const $ingredients = $('.ingredients-input');
const $directions = $... | mjvalade/electron-recipes | app/renderer.js | JavaScript | mit | 1,232 |
require 'spec_helper'
module Sexpr::Matcher
describe Rule, "eat" do
let(:rule){ Rule.new :hello, self }
def eat(seen)
@seen = seen
end
it 'delegates to the defn' do
rule.eat([:foo])
@seen.should eq([:foo])
end
end
end
| blambeau/sexpr | spec/unit/matcher/rule/test_eat.rb | Ruby | mit | 264 |
/*
* Store drawing on server
*/
function saveDrawing() {
var drawing = $('#imagePaint').wPaint('image');
var imageid = $('#imageTarget').data('imageid');
var creatormail = $('input[name=creatorMail]').val();
//Add spinning wheel
var spin = $(document.createElement('div'));
spin.addClass('spin');
$(... | lukpueh/Mach-die-strasse-bunt | static/js/main.js | JavaScript | mit | 6,075 |
'use strict'
//Globals will be the stage which is the parrent of all graphics, canvas object for resizing and the renderer which is pixi.js framebuffer.
var stage = new PIXI.Container();
var canvas = document.getElementById("game");;
var renderer = PIXI.autoDetectRenderer(1024, 570, {view:document.getElementById("game... | Sanguinary/Poolhopper | bin/init.js | JavaScript | mit | 4,385 |
import React, {Component} from 'react';
import {connect} from 'react-redux';
class MapFull extends Component {
constructor() {
super();
this.state = {
htmlContent: null
};
}
componentDidMount() {
this.getMapHtml();
}
componentDidUpdate(prevProps, prevState) {
if (!this.props.map... | howardjones/network-weathermap | websrc/cacti-user/src/components/MapFull.js | JavaScript | mit | 1,270 |
<?php defined('BASEPATH') OR exit('No direct script access allowed');
class Queues extends CI_Controller {
public function __construct()
{
parent::__construct();
date_default_timezone_set('Asia/Kolkata');
$this->is_logged_in();
}
public function index()
{
$data['pag... | dazal/dazlive | application/controllers/Queues_old.php | PHP | mit | 3,814 |
<?php namespace Todohelpist\Console\Commands;
use Illuminate\Console\Command;
use Illuminate\Foundation\Inspiring;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Input\InputArgument;
class Inspire extends Command {
/**
* The console command name.
*
* @var string
*/
protected... | Swader/todohelpist | app/Console/Commands/Inspire.php | PHP | mit | 619 |
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2015.10.... | digitalheir/java-wetten-nl-library | src/main/java/nl/wetten/bwbng/toestand/Intitule.java | Java | mit | 7,834 |
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("Dn... | DnDGen/DNDGenSite | DnDGen.Web.Tests.Integration/Properties/AssemblyInfo.cs | C# | mit | 1,432 |
// Copyright © 2014-2016 Ryan Leckey, All Rights Reserved.
// Distributed under the MIT License
// See accompanying file LICENSE
#ifndef ARROW_PASS_H
#define ARROW_PASS_H
#include <memory>
#include <string>
#include "arrow/generator.hpp"
namespace arrow {
class Pass {
public:
explicit Pass(GContext& ctx) : _ct... | arrow-lang/arrow | include/arrow/pass.hpp | C++ | mit | 572 |
/* ===========================================================
* bootstrap-modal.js v2.1
* ===========================================================
* Copyright 2012 Jordan Schroter
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the Lice... | ner0tic/landmarxApp | src/Landmarx/UtilityBundle/Resources/public/js/bootstrap-modal.js | JavaScript | mit | 9,265 |
using System.Collections.Generic;
using System.Data.Common;
using System.Linq;
namespace Affixx.Core.Database.Generator
{
internal class SqlServerSchemaReader : SchemaReader
{
private DbConnection _connection;
public override Tables ReadSchema(DbConnection connection)
{
var result = new Tables();
_c... | Affixx/affixx | Affixx.Core/Database/Generator/SqlServerSchemaReader.cs | C# | mit | 4,940 |
var AWS = require('aws-sdk');
var Policy = require("./s3post").Policy;
var helpers = require("./helpers");
var POLICY_FILE = "policy.json";
var schedule = require('node-schedule');
var Worker = function(sqsCommnad, s3Object, simpleData){
var queue = sqsCommnad;
var s3 = s3Object;
var simpleDataAuth = simpleData;... | GlowackiHolak/awsWorker | worker.js | JavaScript | mit | 1,975 |
# TODO When raising an exception pass a lambda function, the function being the module/path/name thing
ERROR = {'default': "Unknown engine error ({0})",
400: "Bad request sent to search API ({0})",
401: "Incorrect API Key ({0})",
403: "Correct API but request refused ({0})",
404: "B... | leifos/ifind | ifind/search/exceptions.py | Python | mit | 2,524 |
import React, { Component } from 'react'
import { Form, Grid, Image, Transition } from 'shengnian-ui-react'
const transitions = [
'scale',
'fade', 'fade up', 'fade down', 'fade left', 'fade right',
'horizontal flip', 'vertical flip',
'drop',
'fly left', 'fly right', 'fly up', 'fly down',
'swing left', 'swi... | shengnian/shengnian-ui-react | docs/app/Examples/modules/Transition/Explorers/TransitionExampleGroupExplorer.js | JavaScript | mit | 1,810 |
export class Guest {
constructor(public name: String, public quantity: number){
}
} | vnaranjo/wedding-seating-chart | client/controllers/guest/guest.ts | TypeScript | mit | 95 |
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Dosen extends MY_Controller {
public $data = array(
'breadcrumb' => 'Dosen',
'pesan' => '',
'subtitle' => '',
'main_view' => 'viewDosen',
);
public function __construct(){
parent::__construct();
$this->load->model('Dosen_mod... | dhena201/tadev | application/controllers/Dosen.php | PHP | mit | 3,127 |
import {server} from './initializers'
module.exports = function startServer(){
server.listen(8080)
} | klirix/ThunderCloudServer | src/app.ts | TypeScript | mit | 105 |
using System;
using System.ServiceModel;
namespace SoapCore.Tests.Wsdl.Services
{
[ServiceContract]
public interface INullableEnumService
{
[OperationContract]
NulEnum? GetEnum(string text);
}
public class NullableEnumService : INullableEnumService
{
public NulEnum? GetEnum(string text)
{
throw new N... | DigDes/SoapCore | src/SoapCore.Tests/Wsdl/Services/INullableEnumService.cs | C# | mit | 355 |
var Game = {
map: {
width: 980,
height: 62 * 12
},
tiles: {
size: 62,
count: [100, 12]
},
sprite: {
8: 'LAND_LEFT',
2: 'LAND_MID',
10: 'LAND_RIGHT',
9: 'LAND',
5: 'WATER_TOP',
12: 'WATER',
4: 'STONE_WITH_MONEY',
11: 'STONE',
6: 'CACTUS',
13: 'GRASS',
... | luin/Love-and-Peace | src/game.js | JavaScript | mit | 508 |
'use strict';
import _ from 'lodash';
import bluebird from 'bluebird';
import fs from 'fs';
import requireDir from 'require-dir';
import Logger from '../../logger';
bluebird.promisifyAll(fs);
function main() {
const imports = _.chain(requireDir('./importers'))
.map('default')
.map((importer) => importer.ru... | mehmetbajin/gt-course-surveys | server/src/server/base/data/imports/imports.js | JavaScript | mit | 635 |
// FriendlyNameAttribute.cs created with MonoDevelop
// User: ben at 1:31 P 19/03/2008
//
// To change standard headers go to Edit->Preferences->Coding->Standard Headers
//
using System;
namespace EmergeTk.Model
{
public class FriendlyNameAttribute : Attribute
{
string name;
public string Name {
get {
... | bennidhamma/EmergeTk | server/Model/FriendlyNameAttribute.cs | C# | mit | 736 |
Ext.define('Category.view.GenericList', {
extend: 'Ext.grid.Panel',
alias: 'widget.genericlist',
store: 'Generic',
title: Raptor.getTag('category_header'),
iconCls:'',
initComponent: function() {
this.columns = [{
header:Raptor.getTag('category_name'),
da... | williamamed/Raptor.js | @raptorjs-production/troodon/Resources/category/js/app/view/GenericList.js | JavaScript | mit | 1,321 |
using System;
using static LanguageExt.Prelude;
namespace LanguageExt.UnitsOfMeasure
{
/// <summary>
/// Numeric VelocitySquared value
/// Handles unit conversions automatically
/// </summary>
public struct VelocitySq :
IComparable<VelocitySq>,
IEquatable<VelocitySq>
{
... | slantstack/Slant | src/Slant/DataTypes/UnitsOfMeasure/VelocitySq.cs | C# | mit | 3,292 |
//
// Lexer.cpp
// lut-lang
//
// Created by Mehdi Kitane on 13/03/2015.
// Copyright (c) 2015 H4314. All rights reserved.
//
#include "Lexer.h"
#include <string>
#include <regex>
#include <iostream>
#include "TokenType.h"
#include "ErrorHandler.h"
using std::cout;
using std::endl;
using std::smatch;
using std::st... | hexa2/lut-lang | src/Lexer.cpp | C++ | mit | 4,860 |
<?php
/**
* This file is part of the Redsys package.
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* @license MIT License
*/
namespace Redsys\Tests\Api;
use Redsys\Api\Titular;
class TitularTest extends \PHPUnit_Framework_TestCase... | rmhdev/redsys | tests/Redsys/Tests/Api/TitularTest.php | PHP | mit | 866 |
using System.Reflection;
using System.Runtime.InteropServices;
[assembly: AssemblyTitle("KnowledgeCenter.Domain")]
[assembly: AssemblyDescription("")]
[assembly: Guid("34163851-767a-42f4-9f09-7d1c6af2bd11")] | Socres/KnowledgeCenter | src/Domain/KnowledgeCenter.Domain/Properties/AssemblyInfo.cs | C# | mit | 212 |
<?php
namespace XeroPHP\Reports;
class AgedReceivablesByContact
{
/**
* @var string[]
*/
private $headers;
/**
* @var mixed[]
*/
private $rows;
/**
* @param string[] $headers
* @param mixed[] $rows
*/
public function __construct(array $headers, array $rows =... | cosmic-beacon/xero-php | src/XeroPHP/Reports/AgedReceivablesByContact.php | PHP | mit | 630 |
<?php
namespace Mastercel\ChartBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* Solicitudespagos
*
* @ORM\Table(name="SolicitudesPagos", indexes={@ORM\Index(name="Indice_1", columns={"DteSolicitud", "TmeSolicitud"}), @ORM\Index(name="Indice_2", columns={"DteActualizacion"}), @ORM\Index(name="Indice_3", colum... | pablo28jg/ejemplosgraficas | src/Mastercel/ChartBundle/Entity/Solicitudespagos.php | PHP | mit | 10,419 |
const moment = require('moment')
const expect = require('chai').expect
const sinon = require('sinon')
const proxyquire = require('proxyquire')
const breadcrumbHelper = require('../../helpers/breadcrumb-helper')
const orgUnitConstant = require('../../../app/constants/organisation-unit.js')
const activeStartDate = mome... | ministryofjustice/wmt-web | test/unit/services/test-get-reduction-export.js | JavaScript | mit | 2,361 |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using ProjectData;
using Tools;
using ProjectBLL;
using System.Data;
using Approve.RuleCenter;
using System.Text;
using System.Collections;
using Approve.RuleApp;
public partial cl... | coojee2012/pm3 | SurveyDesign/JSDW/DesignDoc/Report.aspx.cs | C# | mit | 7,357 |