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 |
|---|---|---|---|---|---|
using System;
using System.Collections.Generic;
using System.Text;
using System.Diagnostics;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Input;
using Anarian.Interfaces;
using Anarian.Events;
namespace Anarian.DataStructures.Input
{
public class Controller : IUpdatable
{
PlayerIndex... | KillerrinStudios/Anarian-Game-Engine-MonoGame | Anarian Game Engine.Shared/DataStructures/Input/Controller.cs | C# | mit | 10,322 |
package api2go
import (
"context"
"time"
)
// APIContextAllocatorFunc to allow custom context implementations
type APIContextAllocatorFunc func(*API) APIContexter
// APIContexter embedding context.Context and requesting two helper functions
type APIContexter interface {
context.Context
Set(key string, value inte... | manyminds/api2go | context.go | GO | mit | 1,793 |
// This file auto generated by plugin for ida pro. Generated code only for x64. Please, dont change manually
#pragma once
#include <common/common.h>
START_ATF_NAMESPACE
typedef int (WINAPIV *PSYM_ENUMERATESYMBOLS_CALLBACK)(_SYMBOL_INFO *, unsigned int, void *);
END_ATF_NAMESPACE
| goodwinxp/Yorozuya | library/ATF/PSYM_ENUMERATESYMBOLS_CALLBACK.hpp | C++ | mit | 287 |
/*
* Copyright (C) 2013 Joseph Mansfield
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, pu... | sftrabbit/StackAnswers | src/uk/co/sftrabbit/stackanswers/fragment/AuthInfoFragment.java | Java | mit | 1,678 |
<?php
namespace moonland\phpexcel;
use yii\helpers\ArrayHelper;
use yii\base\InvalidConfigException;
use yii\base\InvalidParamException;
use yii\i18n\Formatter;
use PhpOffice\PhpSpreadsheet\Spreadsheet;
/**
* Excel Widget for generate Excel File or for load Excel File.
*
* Usage
* -----
*
* Exporting data into... | moonlandsoft/yii2-phpexcel | Excel.php | PHP | mit | 33,886 |
module Text
class Sorter
def self.sort(text_components)
components = text_components.clone
components = components.shuffle
nil_priorities, components = components.partition {|c| c.priority.nil? }
components = components.sort_by(&:priority_index)
components = components.reverse
... | roschaefer/story.board | app/lib/text/sorter.rb | Ruby | mit | 379 |
<?php
require_once('../../global_functions.php');
require_once('../../connections/parameters.php');
try {
if (!isset($_SESSION)) {
session_start();
}
$s2_response = array();
$db = new dbWrapper_v3($hostname_gds_site, $username_gds_site, $password_gds_site, $database_gds_site, true);
if (e... | GetDotaStats/site | site_files/s2/my/mod_request_ajax.php | PHP | mit | 6,730 |
module Prawn
module Charts
class Bar < Base
attr_accessor :ratio
def initialize pdf, opts = {}
super pdf, opts
@ratio = opts[:ratio] || 0.75
end
def plot_values
return if series.nil?
series.each_with_index do |bar,index|
point_x = first_x_point i... | cajun/prawn-charts | lib/prawn/charts/bar.rb | Ruby | mit | 1,724 |
package com.swfarm.biz.product.dao.impl;
import com.swfarm.biz.product.bo.SkuSaleMapping;
import com.swfarm.biz.product.dao.SkuSaleMappingDao;
import com.swfarm.pub.framework.dao.GenericDaoHibernateImpl;
public class SkuSaleMappingDaoImpl extends GenericDaoHibernateImpl<SkuSaleMapping, Long> implements SkuSaleM... | zhangqiang110/my4j | pms/src/main/java/com/swfarm/biz/product/dao/impl/SkuSaleMappingDaoImpl.java | Java | mit | 419 |
<?php
namespace AppBundle\Form;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
class ProfileFormType extends AbstractType
{
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder->add('name');
}
public function getParent... | efalder413/PKMNBreeder | src/AppBundle/Form/ProfileFormType.php | PHP | mit | 586 |
using Nethereum.Generators.Model;
using Nethereum.Generators.Net;
namespace Nethereum.Generator.Console.Models
{
public class ContractDefinition
{
public string ContractName { get; set; }
public ContractABI Abi { get; set; }
public string Bytecode { get; set; }
public Contra... | Nethereum/Nethereum | generators/Nethereum.Generator.Console/Models/ContractDefinition.cs | C# | mit | 450 |
'use strict';
module.exports = require('./toPairsIn');
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2NsaWVudC9saWIvbG9kYXNoL2VudHJpZXNJbi5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUFBLE9BQU8sT0FBUCxHQUFpQixRQUFRLGFBQVIsQ0FBakIiLCJmaWxlIjoiZW50cmllc0luLmpzIiwic291cmNlc0... | justin-lai/hackd.in | compiled/client/lib/lodash/entriesIn.js | JavaScript | mit | 394 |
""" -*- coding: utf-8 -*- """
from python2awscli import bin_aws
from python2awscli.error import AWSNotFound, ParseError, AWSDuplicate
from python2awscli import must
class BaseSecurityGroup(object):
def __init__(self, name, region, vpc, description, inbound=None, outbound=None):
"""
:param name: S... | jhazelwo/python-awscli | python2awscli/model/securitygroup.py | Python | mit | 6,235 |
package com.fqc.jdk8;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Map;
import java.util.Set;
import java.util.stream.Collectors;
public class test06 {
public static void main(String[] args) {
int[] arr = {1, 2, 3, 4, 5};
ArrayList<Integer> list = Arrays.stream(arr).collec... | fqc/Java_Basic | src/main/java/com/fqc/jdk8/test06.java | Java | mit | 927 |
// Deprecated: use github.com/multiformats/go-multiaddr-fmt instead.
package mafmt
import (
nmafmt "github.com/multiformats/go-multiaddr-fmt"
)
// Deprecated: use github.com/multiformats/go-multiaddr-fmt instead.
var IP = nmafmt.IP
// Deprecated: use github.com/multiformats/go-multiaddr-fmt instead.
var TCP = nmafm... | whyrusleeping/mafmt | patterns.go | GO | mit | 1,274 |
var chalk = require('chalk');
var safeStringify = require('fast-safe-stringify')
function handleErrorObject(key, value) {
if (value instanceof Error) {
return Object.getOwnPropertyNames(value).reduce(function(error, key) {
error[key] = value[key]
return error
}, {})
}
return value
}
function... | lazywithclass/winston-cloudwatch | lib/utils.js | JavaScript | mit | 806 |
<?php if (isset($consumers) && is_array($consumers)){ ?>
<?php $this->load->helper('security'); ?>
<tbody>
<?php foreach($consumers as $consumer){ ?>
<tr>
<td>
<a data-toggle="modal" data-target="#dynamicModal" href="<?php echo site_url("consumers/edit/$consumer->id");?>"><span ... | weslleih/almoxarifado | application/views/tbodys/consumers.php | PHP | mit | 848 |
package rholang.parsing.delimc.Absyn; // Java Package generated by the BNF Converter.
public class TType2 extends TType {
public final Type type_1, type_2;
public TType2(Type p1, Type p2) { type_1 = p1; type_2 = p2; }
public <R,A> R accept(rholang.parsing.delimc.Absyn.TType.Visitor<R,A> v, A arg) { return v.vis... | rchain/Rholang | src/main/java/rholang/parsing/delimc/Absyn/TType2.java | Java | mit | 753 |
require 'rubygems'
require 'test/unit'
require 'shoulda'
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
$LOAD_PATH.unshift(File.dirname(__FILE__))
require 'sinatra'
require 'sinatra/path'
class Test::Unit::TestCase
end
| JunKikuchi/sinatra-path | test/helper.rb | Ruby | mit | 241 |
"use strict"
const createTileGridConverter = require(`./createTileGridConverter`)
const colorDepth = require(`./colorDepth`)
module.exports = ({palette, images}) => {
const converter = createTileGridConverter({
tileWidth: 7,
tileHeight: 9,
columns: 19,
tileCount: 95,
raw32bitData: colorDepth.con... | chuckrector/mappo | src/converter/createVerge1SmallFntConverter.js | JavaScript | mit | 426 |
# -*- coding: utf-8 -*-
"""urls.py: messages extends"""
from django.conf.urls import url
from messages_extends.views import message_mark_all_read, message_mark_read
urlpatterns = [
url(r'^mark_read/(?P<message_id>\d+)/$', message_mark_read, name='message_mark_read'),
url(r'^mark_read/all/$', message_mark_all_r... | AliLozano/django-messages-extends | messages_extends/urls.py | Python | mit | 358 |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
$(document).ready(function(){
var oldAction = $('#comment-form').attr("action");
hljs.initHighlightingOnLoad();
$('#coolness div').hover(function(){
$('#coolness .second').fadeOut(50... | mzj/yabb | src/MZJ/YabBundle/Resources/public/js/bootstrap.js | JavaScript | mit | 683 |
#include "Sound.h"
#include <Windows.h>
#include "DigitalGraffiti.h"
Sound::Sound(void)
{
// Find music and sound files
std::string exeDir = DigitalGraffiti::getExeDirectory();
DigitalGraffiti::getFileList(exeDir + "\\sound\\instructions\\*", instructionsMusicList);
DigitalGraffiti::getFileList(exeDir + "... | nbbrooks/digital-graffiti | DigitalGraffiti/Sound.cpp | C++ | mit | 1,924 |
using System.Collections.ObjectModel;
using AppStudio.Common;
using AppStudio.Common.Navigation;
using Windows.UI.Xaml;
namespace WindowsAppStudio.Navigation
{
public abstract class NavigationNode : ObservableBase
{
private bool _isSelected;
public string Title { get; set; }
... | wasteam/WindowsAppStudioApp | WindowsAppStudio.W10/Navigation/NavigationNode.cs | C# | mit | 2,027 |
// This file auto generated by plugin for ida pro. Generated code only for x64. Please, dont change manually
#pragma once
#include <common/common.h>
#include <CRecallRequest.hpp>
START_ATF_NAMESPACE
namespace Info
{
using CRecallRequestctor_CRecallRequest2_ptr = void (WINAPIV*)(struct CRecal... | goodwinxp/Yorozuya | library/ATF/CRecallRequestInfo.hpp | C++ | mit | 3,442 |
class DiscountTechnicalTypesController < ApplicationController
before_action :set_discount_technical_type, only: [:show, :edit, :update, :destroy]
# GET /discount_technical_types
# GET /discount_technical_types.json
def index
@discount_technical_types = DiscountTechnicalType.all
end
# GET /discount_te... | maxjuniorbr/mobSeg | app/controllers/discount_technical_types_controller.rb | Ruby | mit | 2,523 |
using System.Net.Sockets;
namespace VidereLib.EventArgs
{
/// <summary>
/// EventArgs for the OnClientConnected event.
/// </summary>
public class OnClientConnectedEventArgs : System.EventArgs
{
/// <summary>
/// The connected client.
/// </summary>
public TcpClient... | Wolf-Code/Videre | Videre/VidereLib/EventArgs/OnClientConnectedEventArgs.cs | C# | mit | 610 |
require 'rubygems'
require 'net/dns'
module Reedland
module Command
class Host
def self.run(address)
regular = Net::DNS::Resolver.start address.join(" ")
mx = Net::DNS::Resolver.new.search(address.join(" "), Net::DNS::MX)
return "#{regular}\n#{mx}"
end
end
end
end | reedphish/discord-reedland | commands/host.rb | Ruby | mit | 291 |
(function(Object) {
Object.Model.Background = Object.Model.PresentationObject.extend({
"initialize" : function() {
Object.Model.PresentationObject.prototype.initialize.call(this);
}
},{
"type" : "Background",
"attributes" : _.defaults({
"skybox" : {
"type" : "res-texture",
"name" : "... | larsrohwedder/scenepoint | client_src/modules/object/model/Background.js | JavaScript | mit | 532 |
<?php
namespace HsBundle;
use HsBundle\DependencyInjection\Compiler\ReportsCompilerPass;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\HttpKernel\Bundle\Bundle;
class HsBundle extends Bundle
{
public function build(ContainerBuilder $container)
{
parent::build($cont... | deregenboog/ecd | src/HsBundle/HsBundle.php | PHP | mit | 401 |
import './Modal.scss'
import pugTpl from './Modal.pug'
import mixin from '../../mixin'
import alert from '@vue2do/component/module/Modal/alert'
import confirm from '@vue2do/component/module/Modal/confirm'
export default {
name: 'PageCompModal',
template: pugTpl(),
mixins: [mixin],
data() {
return {
... | zen0822/vue2do | app/doc/client/component/page/Component/message/Modal/Modal.js | JavaScript | mit | 995 |
package com.igonics.transformers.simple;
import java.io.PrintStream;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.Statement;
import org.apache.commons.cli.CommandLine;
import org.apache.commons.cli.DefaultParser;
import org.apache.commons.cli.HelpFormatter;
imp... | gggordon/JavaCSVTransform | src/com/igonics/transformers/simple/JavaCSVTransform.java | Java | mit | 4,527 |
/*
* JDIVisitor
* Copyright (C) 2014 Adrian Herrera
*
* 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 version 2 of the License, or
* (at your option) any later version.
*
* This... | adrianherrera/jdivisitor | src/main/java/org/jdivisitor/debugger/launcher/RemoteVMConnector.java | Java | mit | 2,991 |
# The MIT License (MIT)
#
# Copyright (c) 2016 Frederic Guillot
#
# 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, ... | kanboard/kanboard-cli | kanboard_cli/shell.py | Python | mit | 3,401 |
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace cShART
{
public class ARTFlystick : ARTObject
{
private bool visible;
private int numberOfButtons;
private int numberOfControllers;
... | schMarXman/cShART | ARTFlystick.cs | C# | mit | 4,744 |
using System;
using System.Text.RegularExpressions;
namespace _07_Hideout
{
class Hideout
{
static void Main()
{
string input = Console.ReadLine();
while (true)
{
string[] parameters = Console.ReadLine().Split();
string key ... | nellypeneva/SoftUniProjects | 01_ProgrFundamentalsMay/32_Strings-and-Regular-Expressions-More-Exercises/07_Hideout/Hideout.cs | C# | mit | 795 |
using System.ComponentModel.DataAnnotations;
namespace JezekT.AspNetCore.IdentityServer4.WebApp.Models.AccountSettingsViewModels
{
public class ConfirmEmailViewModel
{
[Display(Name = "Email", ResourceType = typeof(Resources.Models.AccountSettingsViewModels.ConfirmEmailViewModel))]
public stri... | jezekt/AspNetCore | JezekT.AspNetCore.IdentityServer4.WebApp/Models/AccountSettingsViewModels/ConfirmEmailViewModel.cs | C# | mit | 354 |
"use strict";
var i = 180; //3分固定
function count(){
if(i <= 0){
document.getElementById("output").innerHTML = "完成!";
}else{
document.getElementById("output").innerHTML = i + "s";
}
i -= 1;
}
window.onload = function(){
setInterval("count()", 1000);
}; | Shin-nosukeSaito/elctron_app | ramen.js | JavaScript | mit | 280 |
#include <fstream>
#include <iostream>
#include <vector>
int main(int argc, char **argv) {
std::vector<std::string> args(argv, argv + argc);
std::ofstream tty;
tty.open("/dev/tty");
if (args.size() <= 1 || (args.size() & 2) == 1) {
std::cerr << "usage: maplabel [devlocal remote]... remotedir\n";
retur... | uluyol/tools | maplabel/main.cc | C++ | mit | 804 |
package com.catsprogrammer.catsfourthv;
/**
* Created by C on 2016-09-14.
*/
public class MatrixCalculator {
public static float[] getRotationMatrixFromOrientation(float[] o) {
float[] xM = new float[9];
float[] yM = new float[9];
float[] zM = new float[9];
float sinX = (float)... | CatsProject/CycleAssistantTools | mobile/src/main/java/com/catsprogrammer/catsfourthv/MatrixCalculator.java | Java | mit | 2,238 |
import { browser, by, element } from 'protractor';
export class Angular2Page {
navigateTo() {
return browser.get('/');
}
getParagraphText() {
return element(by.css('app-root h1')).getText();
}
}
| deepak1725/django-angular4 | users/static/ngApp/angular2/e2e/app.po.ts | TypeScript | mit | 213 |
<!-- START LEFT SIDEBAR NAV-->
<?php
$role = "";
switch($this->session->userdata('ROLE_ID')){
case 1:
$role = "Administrator";
break;
case 2:
$role = "Adopting Parent";
break;
case 3:
$role = "Biological Parent/Guardian";
break;
}
?>
<aside id="left-sideb... | ushangt/FosterCare | application/views/front/adopting_parent/menu.php | PHP | mit | 2,980 |
package es.sandbox.ui.messages.argument;
import es.sandbox.ui.messages.resolver.MessageResolver;
import es.sandbox.ui.messages.resolver.Resolvable;
import java.util.ArrayList;
import java.util.List;
class LinkArgument implements Link, Resolvable {
private static final String LINK_FORMAT = "<a href=\"%s\" title... | jeslopalo/flash-messages | flash-messages-core/src/main/java/es/sandbox/ui/messages/argument/LinkArgument.java | Java | mit | 2,828 |
/*
Copyright 2011 Google Inc.
Modifications Copyright (c) 2014 Simon Zimmermann
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 a... | simonz05/blobserver | blob/fetcher.go | GO | mit | 1,050 |
module HTMLValidationHelpers
def bad_html
'<html><title>the title<title></head><body><p>blah blah</body></html>'
end
def good_html
html_5_doctype + '<html><title>the title</title></head><body><p>a paragraph</p></body></html>'
end
def dtd
'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitiona... | ericbeland/html_validation | spec/helpers/html_validation_helpers.rb | Ruby | mit | 576 |
using System.Xml.Serialization;
namespace ImgLab
{
[XmlRoot("source")]
public sealed class Source
{
[XmlElement("database")]
public string Database
{
get;
set;
}
}
} | takuya-takeuchi/DlibDotNet | tools/ImgLab/Source.cs | C# | mit | 263 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int,int> ii;
typedef vector<int> vi;
typedef vector<ii> vii;
int main () {
int n;
while(scanf("%d", &n) && n) {
bitset<32> bs,a,b;
bs = n;
int cont = 0;
for(int i = 0; i < 32; i++) {
if(bs.test(i)) {
... | matheuscarius/competitive-programming | uva/11933-2.cpp | C++ | mit | 491 |
describe Certificate do
it { is_expected.to have_property :id }
it { is_expected.to have_property :identifier }
it { is_expected.to have_property :image_key }
it { is_expected.to have_property :certificate_key }
it { is_expected.to have_property :created_at }
it { is_expected.to belong_to :delivery }
it... | CraftAcademy/workshop | spec/certificate_spec.rb | Ruby | mit | 1,999 |
<?php
namespace OpenRailData\NetworkRail\Services\Stomp\Topics\Rtppm\Entities\Performance;
/**
* Class Performance
*
* @package OpenRailData\NetworkRail\Services\Stomp\Topics\Rtppm\Entities\Performance
*/
class Performance
{
/**
* @var int
*/
private $totalCount;
/**
* @var int
*/... | neilmcgibbon/php-open-rail-data | src/NetworkRail/Services/Stomp/Topics/Rtppm/Entities/Performance/Performance.php | PHP | mit | 3,258 |
import numpy as np
import matplotlib.pylab as plt
from numba import cuda, uint8, int32, uint32, jit
from timeit import default_timer as timer
@cuda.jit('void(uint8[:], int32, int32[:], int32[:])')
def lbp_kernel(input, neighborhood, powers, h):
i = cuda.grid(1)
r = 0
if i < input.shape[0] - 2 * neighborho... | fierval/KaggleMalware | Learning/1dlbp_tests.py | Python | mit | 4,911 |
package me.F_o_F_1092.WeatherVote.PluginManager.Spigot;
import java.util.ArrayList;
import java.util.List;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import me.F_o_F_1092.WeatherVote.Options;
import me.F_o_F_1092.WeatherVote.PluginManager.Command;
import me.F_o_F_1092.WeatherVote.Plugi... | fof1092/WeatherVote | src/me/F_o_F_1092/WeatherVote/PluginManager/Spigot/HelpPageListener.java | Java | mit | 2,808 |
namespace _05_SlicingFile
{
using System;
using System.Collections.Generic;
using System.IO;
class StartUp
{
static void Main()
{
var sourceFile = @"D:\SoftUni\05-Csharp Advanced\08-EXERCISE STREAMS\Resources\sliceMe.mp4";
var destinationDirectory = @"D:\Sof... | MrPIvanov/SoftUni | 04-Csharp Advanced/08-EXERCISE STREAMS/08-StreamsExercises/05-SlicingFile/StartUp.cs | C# | mit | 2,788 |
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("Be... | mpenchev86/WindowsApplicationsTeamwork | WindowsPhoneApplication/BeastApplication/Properties/AssemblyInfo.cs | C# | mit | 1,052 |
define(['omega/entity', 'omega/core'], function (e, o) {
'use strict';
var triggerKey = function (action, e) {
o.trigger(action, {
keyCode: e.keyCode,
shiftKey: e.shiftKey,
ctrlKey: e.ctrlKey,
altKey: e.altKey
});
};
window.onkeydown =... | alecsammon/OmegaJS | omega/behaviour/keyboard.js | JavaScript | mit | 897 |
package zeonClient.mods;
import java.util.Iterator;
import org.lwjgl.input.Keyboard;
import net.minecraft.client.entity.EntityOtherPlayerMP;
import net.minecraft.client.entity.EntityPlayerSP;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.playe... | A-D-I-T-Y-A/Zeon-Client | src/minecraft/zeonClient/mods/KillAura.java | Java | mit | 2,021 |
package com.github.lunatrius.schematica.client.gui;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiSlot;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.resources.I18n;
import net.minecraft.item.ItemStack;
class GuiSchematicMaterialsSlot extends GuiSlot {
p... | CannibalVox/Schematica | src/main/java/com/github/lunatrius/schematica/client/gui/GuiSchematicMaterialsSlot.java | Java | mit | 2,204 |
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/**
* A CodeIgniter library that wraps \Firebase\JWT\JWT methods.
*/
class Jwt {
function __construct()
{
// TODO: Is this the best way to do this? (Issue #4 at psignoret/aad-sso-codeigniter.)
require_once(APPPATH . 'libra... | psignoret/aad-sso-codeigniter | application/libraries/Jwt.php | PHP | mit | 774 |
$(window).on('load', function() {//main
const dom = {//define inputs
tswitch: $("#wave-switch input"),
aSlider: $("input#angle"),//angle slider
nSlider: $("input#refractive-index-ratio"),
};
let layout = {//define layout of pot
showlegend: false,
... | cydcowley/Imperial-Visualizations | visuals_EM/Waves and Dielectrics/scripts/2D_Dielectric_Dielectric.js | JavaScript | mit | 10,284 |
// Package machinelearningservices implements the Azure ARM Machinelearningservices service API version 2019-06-01.
//
// These APIs allow end users to operate on Azure Machine Learning Workspace resources.
package machinelearningservices
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under t... | Azure/azure-sdk-for-go | services/machinelearningservices/mgmt/2019-06-01/machinelearningservices/client.go | GO | mit | 1,478 |
<?php
namespace App\Http\Controllers;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use Illuminate\Foundation\Auth\AuthenticatesUsers;
class AdminLoginController extends Controller
{
/*
|--------------------------------------------------------------------------
| Login Controller
... | mobyan/thc-platform | src/app/Http/Controllers/AdminLoginController.php | PHP | mit | 1,582 |
package pixlepix.auracascade.data;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
/**
* Created by localmacaccount on 5/31/15.
*/
public class Quest {
//TODO QUEST
public static int nextId;
public final ItemStack target;
public final ItemStack result;
public f... | pixlepix/Aura-Cascade | src/main/java/pixlepix/auracascade/data/Quest.java | Java | mit | 1,082 |
<?php
/*
* This file is part of the Itkg\Core package.
*
* (c) Interakting - Business & Decision
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Itkg\Core\Cache\Adapter;
use Itkg\Core\Cache\AdapterInterface;
use Itkg\C... | itkg/core | src/Itkg/Core/Cache/Adapter/Persistent.php | PHP | mit | 2,140 |
// Copyright (c) 2011-2013 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "splashscreen.h"
#include "clientversion.h"
#include "util.h"
#include <QPainter>
#undef loop /* ugh, remove this wh... | paulmadore/woodcoin | src/qt/splashscreen.cpp | C++ | mit | 2,296 |
<?php
namespace Oro\Bundle\NoteBundle\Controller;
use FOS\RestBundle\Util\Codes;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Bundle\FrameworkBundle\Routing\Router;
use Symfony\Component\HttpFoundation\Response;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Sensio\Bundle\F... | morontt/platform | src/Oro/Bundle/NoteBundle/Controller/NoteController.php | PHP | mit | 4,038 |
'use strict';
memoryApp.controller('AuthCtrl', function ($scope, $location, AuthService) {
$scope.register = function () {
var username = $scope.registerUsername;
var password = $scope.registerPassword;
if (username && password) {
AuthService.register(username, password).then(
function () ... | emilkjer/django-memorycms | backend/static/js/controllers/auth.js | JavaScript | mit | 980 |
/**
* MIT License
*
* Copyright (c) 2017 zgqq
*
* 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, me... | zgqq/mah | mah-core/src/main/java/mah/ui/util/UiUtils.java | Java | mit | 1,999 |
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*
|--------------------------------------------------------------------------
| Base Site URL
|--------------------------------------------------------------------------
|
| URL to your CodeIgniter root. Typically this will be your base URL,
| WITH... | hafiznuzal/sirumkit1 | application/config/config.php | PHP | mit | 18,153 |
<?xml version="1.0" ?><!DOCTYPE TS><TS language="nb" version="2.0">
<defaultcodec>UTF-8</defaultcodec>
<context>
<name>AboutDialog</name>
<message>
<location filename="../forms/aboutdialog.ui" line="+14"/>
<source>About RupayaCoin</source>
<translation>Om RupayaCoin</translation>
</m... | tyarlande/rupayacoin | src/qt/locale/bitcoin_nb.ts | TypeScript | mit | 113,521 |
require File.expand_path('../helper', __FILE__)
class BeforeFilterTest < Test::Unit::TestCase
it "executes filters in the order defined" do
count = 0
mock_app do
get('/') { 'Hello World' }
before do
assert_equal 0, count
count = 1
end
before do
assert_equal 1, ... | Callygraphy/morrissey | test/filter_test.rb | Ruby | mit | 11,117 |
<?php
namespace IdeaSeven\Core\Services\Menu;
use IdeaSeven\Core\Exceptions\InvalidMenuStructureException;
use IdeaSeven\Core\Helpers\Strings;
use IdeaSeven\Core\Services\Lang\Contracts\LanguagesContract;
/**
* Class PermalinkCreator
* @package IdeaSeven\Core\Services\Menu
*/
class PermalinkCreator
{
/**
... | mbouclas/mcms-laravel-core | src/Services/Menu/PermalinkCreator.php | PHP | mit | 3,536 |
<?php
/* TwigBundle:Exception:exception_full.html.twig */
class __TwigTemplate_add344e1e383c1eb02227246319313ae extends Twig_Template
{
public function __construct(Twig_Environment $env)
{
parent::__construct($env);
$this->parent = $this->env->loadTemplate("TwigBundle::layout.html.twig");
... | krlts/Homefanfics | app/cache/dev/twig/ad/d3/44e1e383c1eb02227246319313ae.php | PHP | mit | 2,264 |
<?php
namespace CBSi\ProductBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use CBSi\ProductBundle\Model\Product;
use CBSi\ProductBundle\ApiClient;
class DefaultController extends Controller
{
public function indexAction($name)
{
return $this->render('CBSiProductBundle:De... | smp4488/symfony2 | src/CBSi/ProductBundle/Controller/DefaultController.php | PHP | mit | 1,439 |
export const PlusCircle = `
<svg viewBox="0 0 28 28">
<g fill="none" fill-rule="evenodd">
<path d="M8 14h12" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
<circle stroke="currentColor" cx="14" cy="14" r="13"/>
<path d="M14 8v12" stroke="currentColor" stroke-linecap="round" stroke-... | clair-design/clair | packages/icons/icons/PlusCircle.ts | TypeScript | mit | 355 |
<?php
/*
* Description of bibliographyController
*
* This is a controller loading the bibliography. It does not support any user input
*/
namespace PNM\controllers;
class bibliographyController
{
public function load()
{
$bibliography = new \PNM\models\bibliography();
$view = new \PNM\vi... | ailintom/persons-names-MK | PHP/controllers/bibliographyController.php | PHP | mit | 394 |
package com.missingeye.pixelpainter.events.network.texture;
import com.missingeye.pixelpainter.common.PixelMetadata;
import net.minecraft.util.ResourceLocation;
/**
* Created on 1/17/2015.
*
* @auhtor Samuel Agius (Belpois)
*/
public class ServerUpdatedTexturePacketEvent extends UpdatedTexturePacketEvent
{
publi... | Belpois/pixelpainter | src/main/java/com/missingeye/pixelpainter/events/network/texture/ServerUpdatedTexturePacketEvent.java | Java | mit | 470 |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Routing;
namespace QSDStudy
{
public class RouteConfig
{
public static void RegisterRoutes(RouteCollection routes)
{
routes.IgnoreRoute("{resource}.axd/{*path... | lsolano/qsd_study | QSDStudy/App_Start/RouteConfig.cs | C# | mit | 578 |
#ifndef LUCE_HEADER_TYPETRAIT_TYPEEQUAL_HH
#define LUCE_HEADER_TYPETRAIT_TYPEEQUAL_HH
#include <Luce/Configuration.hh>
#include <Luce/Utility/NonComparable.hh>
#include <Luce/Utility/NonCopyable.hh>
namespace Luce
{
namespace TypeTrait
{
template<typename Lhs_, typename Rhs_>
struct TypeEqual LUCE_M... | kmc7468/Luce | Include/Luce/TypeTrait/TypeEqual.hh | C++ | mit | 799 |
export type TemplateToken = string | TemplatePlaceholder;
export interface TemplatePlaceholder {
before: string;
after: string;
name: string;
}
interface TokenScanner {
text: string;
pos: number;
}
const enum TemplateChars {
/** `[` character */
Start = 91,
/** `]` character */
En... | emmetio/emmet | src/markup/format/template.ts | TypeScript | mit | 3,227 |
package com.example.aperture.core.contacts;
import android.content.Context;
import android.content.Intent;
import android.database.Cursor;
import android.net.Uri;
import android.provider.ContactsContract;
import java.util.List;
import java.util.ArrayList;
import com.example.aperture.core.Module;
public class Email... | ayshen/caek | src/com/example/aperture/core/contacts/EmailFilter.java | Java | mit | 5,607 |
<?php
return array (
'id' => 'samsung_n300_ver1',
'fallback' => 'uptext_generic',
'capabilities' =>
array (
'model_name' => 'SGH-N300',
'brand_name' => 'Samsung',
'streaming_real_media' => 'none',
),
);
| cuckata23/wurfl-data | data/samsung_n300_ver1.php | PHP | mit | 226 |
// Copyright (c) 2011-2014 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "kcoingui.h"
#include "kcoinunits.h"
#include "clientmodel.h"
#include "guiconstants.h"
#include "guiutil.h"
#inclu... | Kcoin-project/kcoin | src/qt/kcoingui.cpp | C++ | mit | 39,810 |
var xmas = {};
(function() {
xmas.present = {
box: {}
};
}());
(function(global) {
global.xmas.present.box.color = 'Red';
}(this));
| watilde/rejs-example | test/fixture1.js | JavaScript | mit | 146 |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace GSAKWrapper.Excel
{
public class PropertyItemHasUserNote : PropertyItem
{
public PropertyItemHasUserNote()
: base("HasUserNote")
{
}
public ... | GlobalcachingEU/GSAKWrapper | GSAKWrapper/Excel/PropertyItemHasUserNote.cs | C# | mit | 439 |
Vswiki::Application.configure do
# Settings specified here will take precedence over those in config/application.rb.
# Code is not reloaded between requests.
config.cache_classes = true
# Eager load code on boot. This eager loads most of Rails and
# your application in memory, allowing both thread web serve... | villez/vswiki | config/environments/production.rb | Ruby | mit | 3,332 |
/**
* A decorator for making sure specific function being invoked serializely.
*
* Usage:
* class A {
* @serialize
* async foo() {}
* }
*
*/
export default function serialize(target, key, descriptor) {
let prev = null;
function serializeFunc(...args) {
const next = () =>
Promise.resolve(descr... | ringcentral/ringcentral-js-widget | packages/ringcentral-integration/lib/serialize.js | JavaScript | mit | 524 |
<?php
namespace Application\Controller;
use Zend\Mvc\Controller\AbstractRestfulController;
use Zend\View\Model\JsonModel;
class UserController extends AbstractRestfulController
{
protected $collectionOptions = array('GET', 'POST');
protected $resourceOptions = array('GET', 'PUT', 'DELETE');
protected fu... | amercier/dogu-legacy | UserController.php | PHP | mit | 1,957 |
<?php
/**
* This module shows an introduction tour for new users
*
* @package profiler.modules_core.like
* @since 0.5
*/
class TourModule extends HWebModule
{
public $isCoreModule = true;
public static function onDashboardSidebarInit($event)
{
if (HSetting::Get('enable', 'tour') == 1 && Yii:... | ProfilerTeam/Profiler | protected/modules_core/tour/TourModule.php | PHP | mit | 547 |
package ast
import (
"testing"
"bitbucket.org/yyuu/xtc/xt"
)
func TestPrefixOpNode(t *testing.T) {
x := NewPrefixOpNode(loc(0,0), "--", NewVariableNode(loc(0,0), "a"))
s := `{
"ClassName": "ast.PrefixOpNode",
"Location": "[:0,0]",
"Operator": "--",
"Expr": {
"ClassName": "ast.VariableNode",
"L... | yyuu/xtc | ast/prefix_op_test.go | GO | mit | 478 |
package com.dpanayotov.simpleweather.api.base;
public class BaseForecastResponse {
}
| deanpanayotov/simple_weather | SimpleWeather/app/src/main/java/com/dpanayotov/simpleweather/api/base/BaseForecastResponse.java | Java | mit | 87 |
require 'rails_helper'
RSpec.describe "Pages", :type => :request do
describe "GET /pages" do
it "redirects when unauthenticated" do
get pages_path
expect(response.status).to be(302)
end
end
let(:rory) {User.create!(name: 'Rory', uid: "1")}
let(:valid_attributes) { { path: 'path/to/page', b... | csexton/corporate-tool | spec/requests/pages_request_spec.rb | Ruby | mit | 3,401 |
var functions = {}
functions.evaluateSnapshotType = function (name) {
var splittedName = name.split('-')
var type = splittedName[splittedName.length - 1].split('.')[0]
return type === 'motion' ? type : type === 'snapshot' ? 'periodic' : 'unknown'
}
functions.getSnapshotDate = function (name) {
var splittedDa... | rackdon/securityCam-server | src/utils/commonUtils.js | JavaScript | mit | 446 |
package bsw
import (
"testing"
)
func TestMX(t *testing.T) {
_, results, err := MX("stacktitan.com", "8.8.8.8")
if err != nil {
t.Error("error returned from MX")
t.Log(err)
}
found := false
for _, r := range results {
if r.Hostname == "mx1.emailsrvr.com" {
found = true
}
}
if !found {
t.Error("MX... | intfrr/blacksheepwall | bsw/mx_test.go | GO | mit | 376 |
package edu.avans.hartigehap.web.util;
import java.io.UnsupportedEncodingException;
import javax.servlet.http.HttpServletRequest;
import org.springframework.web.util.UriUtils;
import org.springframework.web.util.WebUtils;
import lombok.extern.slf4j.Slf4j;
@Slf4j
public class UrlUtil {
private UrlUtil() {
... | jermeyjungbeker/VP11B2 | src/main/java/edu/avans/hartigehap/web/util/UrlUtil.java | Java | mit | 833 |
package com.veggie.src.java.controllers.transaction;
import java.util.List;
import com.veggie.src.java.controllers.Controller;
import com.veggie.src.java.form.Form;
import com.veggie.src.java.form.AbstractFormBuilder;
import com.veggie.src.java.form.AbstractFormBuilderFactory;
import com.veggie.src.java.notification.N... | ejw0013/vegemite-smoothie | com/veggie/src/java/controllers/transaction/ReturnController.java | Java | mit | 1,973 |
using Android.App.Job;
namespace Plugin.FirebasePushNotification
{
public class PNFirebaseJobService : JobService
{
public override bool OnStartJob(JobParameters @params)
{
return false;
}
public override bool OnStopJob(JobParameters @params)
{
... | CrossGeeks/FirebasePushNotificationPlugin | Plugin.FirebasePushNotification/PNFirebasejobService.android.cs | C# | mit | 353 |
(function() {
'use strict';
angular
.module('rtsApp')
.directive('hasAuthority', hasAuthority);
hasAuthority.$inject = ['Principal'];
function hasAuthority(Principal) {
var directive = {
restrict: 'A',
link: linkFunc
};
return directive... | EnricoSchw/readthisstuff.com | src/main/webapp/app/services/auth/has-authority.directive.js | JavaScript | mit | 1,477 |
require 'rails_helper'
RSpec.describe Gallery, type: :model do
it "is valid with valid attributes" do
gallery = create(:gallery)
expect(gallery).to be_valid
end
describe "associations and validations" do
it { should have_many(:collections) }
it { should validate_presence_of(:name) }
it { s... | ericbooker12/fuzzy_hat_artist_site | spec/models/gallery_spec.rb | Ruby | mit | 1,006 |
Gitscm::Application.routes.draw do
constraints(:host => 'whygitisbetterthanx.com') do
root :to => 'site#redirect_wgibtx', as: :whygitisbetterthanx
end
constraints(:host => 'progit.org') do
root :to => 'site#redirect_book', as: :progit
get '*path' => 'site#redirect_book'
end
# constraints(:subdom... | jasonlong/git-scm.com | config/routes.rb | Ruby | mit | 3,528 |
var async = require('async');
function captainHook(schema) {
// Pre-Save Setup
schema.pre('validate', function (next) {
var self = this;
this._wasNew = this.isNew;
if (this.isNew) {
this.runPreMethods(schema.preCreateMethods, self, function(){
next();
});
} else {
this.ru... | hackley/captain-hook | lib/index.js | JavaScript | mit | 1,881 |
<?php
function formatBytes($bytes, $precision = 2) {
$units = array('B', 'KB', 'MB', 'GB', 'TB');
$bytes = max($bytes, 0);
$pow = floor(($bytes ? log($bytes) : 0) / log(1024));
$pow = min($pow, count($units) - 1);
$bytes /= pow(1024, $pow);
return round($bytes, $precision) . ' ' . $unit... | gpires/BroadApi | class/functions.php | PHP | mit | 5,568 |