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 |
|---|---|---|---|---|---|
/**
* @(#)MenuScroller.java 1.5.0 04/02/12
* Code taken from https://tips4java.wordpress.com/2009/02/01/menu-scroller/
*/
package darrylbu.util;
import java.awt.Color;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListe... | Idrinth/WARAddonClient | src/main/java/darrylbu/util/MenuScroller.java | Java | mit | 18,868 |
/****************************************************************************
** Meta object code from reading C++ file 'walletstack.h'
**
** Created by: The Qt Meta Object Compiler version 63 (Qt 4.8.5)
**
** WARNING! All changes made in this file will be lost!
*********************************************************... | danielmash/matchcoin-wallet | build/moc_walletstack.cpp | C++ | mit | 4,766 |
// ref: http://www.cplusplus.com/reference/future/future/
// future example
#include <iostream> // std::cout
#include <future> // std::async, std::future
#include <chrono> // std::chrono::milliseconds
// a non-optimized way of checking for prime numbers:
bool is_prime (int x) {
for (int i=2; ... | flavio-fernandes/oclock | misc/junk/c++/future3.cpp | C++ | mit | 967 |
<div id="page-wrapper">
<div class="row">
<div class="col-lg-12">
<h3 class="page-header">Causas</h3>
<div class="form-group" style="width: 100%" >
<div style="width: 40%; float: left;">
<?php
echo "<code><a cla... | SoldierVega/SIRSJ1 | application/views/causa/listCausa.php | PHP | mit | 5,886 |
<?php
declare(strict_types=1);
namespace Phpcq\Runner\Console\Definition\OptionValue;
final class OptionParamsDefinition extends OptionValueDefinition
{
/**
* @var array<string,mixed>
*/
private $params;
/** @param array<string,mixed> $params */
public function __construct(bool $required, ... | phpcq/phpcq | src/Console/Definition/OptionValue/OptionParamsDefinition.php | PHP | mit | 544 |
package kv
import (
"sort"
"github.com/gocontrib/nosql/q"
)
type lookup struct {
collection *collection
tx Tx
}
func (c lookup) find(f []interface{}) keys {
return c.and(f)
}
func (c lookup) condition(f interface{}) keys {
switch t := f.(type) {
case q.Not:
return emptyKeys
case q.And:
return c... | gocontrib/nosql | kv/lookup.go | GO | mit | 3,434 |
<?php declare(strict_types=1);
namespace Gos\Bundle\WebSocketBundle\Tests\Server\Type;
use Gos\Bundle\WebSocketBundle\Event\ServerLaunchedEvent;
use Gos\Bundle\WebSocketBundle\GosWebSocketEvents;
use Gos\Bundle\WebSocketBundle\Server\App\ServerBuilderInterface;
use Gos\Bundle\WebSocketBundle\Server\Type\WebSocketServ... | GeniusesOfSymfony/WebSocketBundle | tests/Server/Type/WebSocketServerTest.php | PHP | mit | 2,570 |
from . import server
import sys
server.main(*sys.argv) | TeamNext/qos.py | qos/__main__.py | Python | mit | 55 |
<?php
//error_reporting(E_ALL);
//ini_set('display_errors', 'On');
ini_set("memory_limit","300M");
set_time_limit(0);
$phpModelName = $_GET["layer"];
function getModel($modelname) {
include "dbconnect.php";
$modelquery = pg_query($db, "SELECT ST_AsText(geom), \"ID\" FROM public.\"$modeln... | JamesMilnerUK/Lacuna | ajax/getdataajax.php | PHP | mit | 4,445 |
/*
* Rotate Image
* Total Accepted: 10296 Total Submissions: 33430
*
* You are given an n x n 2D matrix representing an image.
*
* Rotate the image by 90 degrees (clockwise).
*
* Follow up:
* Could you do this in-place?
*/
class Solution
{
public:
void rotate(vector<vector<int> > &matrix)
{
in... | liyiji/LeetCode | 008_Rotate_Image.cpp | C++ | mit | 1,079 |
__author__ = 'heddevanderheide'
# Django specific
from django.conf.urls import patterns, include, url
urlpatterns = patterns('',
url('', include('fabric_interface.urls'))
) | Hedde/fabric_interface | src/main/urls.py | Python | mit | 179 |
using System.Runtime.InteropServices;
namespace Meziantou.Framework.Win32.Natives;
[StructLayout(LayoutKind.Explicit)]
internal struct JOBOBJECT_INFO
{
[FieldOffset(0)]
public JOBOBJECT_EXTENDED_LIMIT_INFORMATION32 ExtendedLimits32;
[FieldOffset(0)]
public JOBOBJECT_EXTENDED_LIMIT_INFORMATION64 Exten... | meziantou/Meziantou.Framework | src/Meziantou.Framework.Win32.Jobs/Natives/JOBOBJECT_INFO.cs | C# | mit | 2,557 |
'use strict';
describe('Protractor Demo App', function() {
// it('should add a todo', function() {
// browser.get('https://angularjs.org');
// browser.sleep(5000);
// element(by.model('todoList.todoText')).sendKeys('write first protractor test');
// element(by.css('[value="add"]')).click();
... | SoftwareEngineering5c/Biotility | modules/quiz/tests/e2e/quiz.e2e.tests.js | JavaScript | mit | 2,664 |
namespace ContactSample.Models
{
public enum BusinessAreaEnum
{
Others = 0,
CallCenter = 1,
PostSales = 2,
PreSales = 3,
Delivery = 4
}
} | GlaucoGodoi/AspNet-MVC5-Angular | ContactSample/Models/BusinessAreaEnum.cs | C# | mit | 192 |
import { Injectable } from '@angular/core';
import { ModelConstructor, BaseModel } from '../../shared/models/base/base-model';
import { BaseRepository } from 'app/core/repositories/base-repository';
import { ViewModelConstructor, BaseViewModel } from 'app/site/base/base-view-model';
/**
* Unifies the ModelConstructo... | emanuelschuetze/OpenSlides | client/src/app/core/core-services/collectionStringMapper.service.ts | TypeScript | mit | 3,031 |
<?php
namespace ModuleGenerator\PhpGenerator\WidgetName;
final class WidgetNameDataTransferObject
{
/** @var string */
public $name;
/** @var WidgetName|null */
private $widgetNameClass;
public function __construct(WidgetName $widgetName = null)
{
$this->widgetNameClass = $widgetName... | carakas/fork-cms-module-generator | src/PhpGenerator/WidgetName/WidgetNameDataTransferObject.php | PHP | mit | 709 |
<?php
namespace jeus\QuickstrikeBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* Deck
*
* @ORM\Table(name="quickstrike_deck")
* @ORM\Entity(repositoryClass="jeus\QuickstrikeBundle\Repository\DeckRepository")
*/
class Deck
{
const NOMBRE_CARTE_PAR_DECK = 60;
/**
* @var integer
*
... | jsmagghe/tcg | src/jeus/QuickstrikeBundle/Entity/Deck.php | PHP | mit | 8,513 |
# frozen_string_literal: true
module Svelte
# Version
VERSION = '0.3.0'
end
| notonthehighstreet/svelte | lib/svelte/version.rb | Ruby | mit | 81 |
package com.github.ompc.greys.core;
import com.github.ompc.greys.core.util.AliEagleEyeUtils;
import com.github.ompc.greys.core.util.GaMethod;
import com.github.ompc.greys.core.util.LazyGet;
/**
* 通知点
*/
public final class Advice {
public final ClassLoader loader;
private final LazyGet<Class<?>> clazzRef;
... | yuweijun/learning-programming | linux/greys/core/src/main/java/com/github/ompc/greys/core/Advice.java | Java | mit | 5,911 |
import convexpress from "convexpress";
import * as config from "config";
const options = {
info: {
title: "lk-app-back",
version: "1.0.2"
},
host: config.HOST
};
export default convexpress(options)
.serveSwagger()
.convroute(require("api/buckets/post"))
.convroute(require("api... | lk-architecture/lk-app-back | src/api/index.js | JavaScript | mit | 342 |
import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collections;
public class Parameters {
private ArrayList<Point> data = new ArrayList<Point>();
public Parameters(String pat... | lucasbrunialti/DataMiningProject | DBSCAN/Parameters.java | Java | mit | 2,493 |
export default class FormController {
constructor($stateParams, $state, EquipamentoServico, Notification) {
this.record = {}
this.title = 'Adicionando registro'
this._service = EquipamentoServico
if ($stateParams.id) {
this.title = 'Editando registro'
thi... | lucionei/chamadotecnico | chamadosTecnicosFinal-app/src/app/equipamentos/form.controller.js | JavaScript | mit | 977 |
using System;
using System.IO;
using System.Linq;
using NUnit.Framework;
using Xamarin.UITest;
using Xamarin.UITest.iOS;
using Xamarin.UITest.Queries;
namespace MessageBarUITests
{
[TestFixture]
public class Tests
{
iOSApp app;
[SetUp]
public void BeforeEachTest()
{
// TODO: If the iOS app being tested... | prashantvc/Xamarin.iOS-MessageBar | MessageBarUITests/Tests.cs | C# | mit | 2,113 |
<?php
namespace luya\admin\aws;
use Yii;
use yii\base\InvalidConfigException;
use Flow\Config;
use Flow\Request;
use Flow\File;
use luya\helpers\FileHelper;
use luya\admin\helpers\Storage;
use luya\admin\ngrest\base\ActiveWindow;
/**
* Flow Uploader ActiveWindow enables multi image upload with chunck ability.
*
*... | nandes2062/luya | modules/admin/src/aws/FlowActiveWindow.php | PHP | mit | 5,238 |
def add_generic_attachment_columns(t, want_image_columns)
t.string :storage_key, :null => false
t.string :content_type, :null => false
t.integer :size, :null => false
t.datetime :created_at, :null => false
t.datetime :updated_at
t.integer :width, :n... | willbryant/attachment_saver | test/schema.rb | Ruby | mit | 1,565 |
class CreateCommentVotes < ActiveRecord::Migration
def change
create_table :comment_votes do |t|
t.boolean :like, null: false
t.integer :user_id, null: false
t.integer :comment_id, null: false
t.timestamps null: false
end
end
end
| sayuloveit/rails-hacker-news-jr | hacker_news_jr/db/migrate/20150716211717_create_comment_votes.rb | Ruby | mit | 267 |
namespace topCoder
{
using System;
using System.Collections.Generic;
class p1
{
public void foo()
{
string[] sp = Console.ReadLine().Split(' ');
int n = int.Parse(sp[0]);
int m = int.Parse(sp[1]);
int k = int.Parse(sp[2]);
int[] x = new int[k];
int[] y = new int[k];
for (int i = 0; i < k... | karunasagark/ps | TopCoder-C#/288/p1.cs | C# | mit | 1,194 |
/* ========================================
ID: mathema6
TASK: friday
LANG: C++11
(...for USACO solutions)
* File Name : friday.cpp
* Creation Date : 03-01-2015
* Last Modified :
* Created By : Karel Ha <mathemage@gmail.com>
* URL : http://cerberus.delosent.com:791/usacoprob2?a=nJinR3Po... | mathemage/CompetitiveProgramming | usaco/train.usaco.org/1.2/friday/friday.cpp | C++ | mit | 1,781 |
using System;
using System.Collections.Generic;
using Microsoft.AspNet.Http;
namespace Glimpse.Server
{
public class GlimpseServerOptions
{
public bool AllowRemote { get; set; }
public string BasePath { get; set; }
public Action<IDictionary<string, string>> OverrideResources { get; s... | peterblazejewicz/Glimpse.Prototype | src/Glimpse.Server.Core/GlimpseServerOptions.cs | C# | mit | 478 |
using System.Diagnostics;
namespace NWamp.Messages
{
/// <summary>
/// Message class used to subscribe client to Pub/Sub topic.
/// </summary>
[DebuggerDisplay("[{Type}, \"{TopicUri}\"]")]
public class SubscribeMessage : IMessage
{
/// <summary>
/// Initializes a new instance o... | Horusiath/NWamp | NWamp/Messages/SubscribeMessage.cs | C# | mit | 1,512 |
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System.Collections.Generic;
using System.Linq;
using System.Windows;
using System.Windows.Controls;
using Mic... | ye4241/MahApps.Metro | src/MahApps.Metro/Behaviors/TabControlSelectFirstVisibleTabBehavior.cs | C# | mit | 2,051 |
#ifndef __DEFINES_HPP_
#define __DEFINES_HPP_
// Compiler defines
#if defined (_MSC_VER)
#define FORCE_INLINE __forceinline
#elif defined (__GNUG__)
#define FORCE_INLINE __attribute__((always_inline))
#elif defined (__clang__)
#define FORCE_INLINE __forceinline
#endif
// Plateform defines
#if defined(_WIN32) || defin... | Gotatang/DadEngine_2.0 | include/dadengine/core/defines.hpp | C++ | mit | 801 |
package iso20022
// Status and reason of an instructed order.
type StatusAndReason7 struct {
// Status and reason for the transaction.
StatusAndReason *Status2Choice `xml:"StsAndRsn"`
// Details of the transactions reported.
Transaction []*Transaction14 `xml:"Tx,omitempty"`
}
func (s *StatusAndReason7) AddStatu... | fgrid/iso20022 | StatusAndReason7.go | GO | mit | 580 |
<?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\DICOM;
use JMS\Serializer\Annotation\ExclusionPolicy;
u... | romainneutron/PHPExiftool | lib/PHPExiftool/Driver/Tag/DICOM/DischargeTime.php | PHP | mit | 788 |
/*****************************************************
*
* Designed and programmed by Mohamed Adam Chaieb.
*
*****************************************************/
/*
Constructs a new tile.
*/
function Tile(position, level) {
this.x = position.x;
this.y = position.y;
this.level = level;
};
/*
Updates the po... | mac-adam-chaieb/Isometric-2048 | js/tile.js | JavaScript | mit | 444 |
package main
import (
"bytes"
"encoding/json"
"flag"
"fmt"
"io"
"io/ioutil"
"net/http"
"os"
"os/exec"
"path"
"time"
"github.com/nchern/red/app"
color "gopkg.in/fatih/color.v1"
)
const (
jsonIndent = " "
filenameBase = "query"
queryFilename = filenameBase + ".red"
outFilename = filenameBase + ... | nchern/red | main.go | GO | mit | 4,910 |
#ifdef WITH_SDL2
#pragma once
#include <SDL.h>
#include "../Window.hpp"
#include "psychic-ui/ApplicationBase.hpp"
#if defined(PSYCHIC_UI_WITH_GLAD)
#if defined(PSYCHIC_UI_SHARED) && !defined(GLAD_GLAPI_EXPORT)
#define GLAD_GLAPI_EXPORT
#endif
#include <glad/glad.h>
#endif
#if defined(ANDROID)
#include <GLES/gl.h>
#... | ubald/psychic-ui | psychic-ui/applications/SDL2Application.hpp | C++ | mit | 2,428 |
// This software is part of OpenMono, see http://developer.openmono.com
// Released under the MIT license, see LICENSE.txt
#include "encoder.hpp"
#include "constants.hpp"
Encoder::Encoder (PinName pinA, PinName pinB)
:
lastA(0),
lastB(0),
channelA(pinA),
channelB(pinB)
{
#ifndef EMUNO
// Pull up A.
CyPins_... | getopenmono/pong | encoder.cpp | C++ | mit | 1,532 |
import React from 'react';
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(
<g><path d="M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-... | cherniavskii/material-ui | packages/material-ui-icons/src/InsertLink.js | JavaScript | mit | 360 |
<?php
namespace Madrasse\AdminBundle\DependencyInjection;
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
use Symfony\Component\Config\Definition\ConfigurationInterface;
/**
* This is the class that validates and merges configuration from your app/config files
*
* To learn more see {@link http://symf... | fardus/madrasse-gestion | src/Madrasse/AdminBundle/DependencyInjection/Configuration.php | PHP | mit | 883 |
<?php
/*
* This file is part of PHP CS Fixer.
*
* (c) Fabien Potencier <fabien@symfony.com>
* Dariusz Rumiński <dariusz.ruminski@gmail.com>
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/
namespace PhpCsFixer\Fixer\Phpdoc;
use PhpCsFixer\... | julienfalque/PHP-CS-Fixer | src/Fixer/Phpdoc/PhpdocNoAccessFixer.php | PHP | mit | 896 |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Capercali.Entities
{
public class Runner : IEntity
{
public long Id
{
get;
set;
}
public string FirstName { get; set; }
... | yannisgu/capercali | src/Capercali.Entities/Runner.cs | C# | mit | 633 |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Globalization;
using System.Web.Mvc;
namespace WMATC.Models
{
public class Player
{
[Required]
[Key... | ThatRickGuy/WMATC | WMATC/Models/Player.cs | C# | mit | 953 |
from random import randint
from django.conf import settings
from django.contrib.auth.models import User
from django.db import models, connection
from django.db.models.aggregates import Avg, Max
from polymorphic.models import PolymorphicModel
from solo.models import SingletonModel
class Judge(PolymorphicModel):
n... | Kianoosh76/webelopers-scoreboard | jury/models.py | Python | mit | 3,183 |
/*
* LCADeviceRoomba
*
* MIT License
*
* Copyright (c) 2016
*
* Geoffrey Mastenbroek, geoffrey.mastenbroek@student.hu.nl
* Feiko Wielsma, feiko.wielsma@student.hu.nl
* Robbin van den Berg, robbin.vandenberg@student.hu.nl
* Arnoud den Haring, arnoud.denharing@student.hu.nl
*
* Permission is hereby gr... | maschel/LCADeviceRoomba | src/main/java/com/maschel/lcadevice/roomba/Simulator/RoombaDeviceSimulator.java | Java | mit | 8,709 |
#pragma once
#ifndef LINE_HPP
#define LINE_HPP
#include <initializer_list>
#include <map>
#include <string>
#include <vector>
#include "route.hpp"
using RouteName = std::string;
using RouteNames = std::vector<RouteName>;
using StepsByRoute = std::pair<RouteName, Steps>;
using StepsRoutes = std::vector<StepsByRoute>;... | gonmator/busplan | busplan/line.hpp | C++ | mit | 1,470 |
<?php
/*
* This file is part of the NAD package.
*
* (c) Ivan Proskuryakov
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace NAD\ResourceBundle\Request;
use FOS\RestBundle\Request\RequestBodyParamConverter;
use JMS\Seria... | razzaghi/NAD | src/NAD/ResourceBundle/Request/ParamConverter.php | PHP | mit | 5,072 |
import knockout = require("knockout");
class Item
{
public Id:KnockoutObservable<string> = knockout.observable("");
public Title:KnockoutObservable<string> = knockout.observable("");
constructor(data:{Id:string; Title:string })
{
this.Id(data.Id);
this.Title(data.Title);
}
public DragStart(target:Item, ev... | Lillemanden/TierList | TierList/App/Components/Item/Item.ts | TypeScript | mit | 563 |
#!/usr/bin/env ruby
require 'i3rb'
include I3::API
include I3::Bar::Widgets
host = I3::Bar::Widgets::HOSTNAME
host.color = "#00FFFF"
host.add_event_callback do |w|
system "xterm", "-e", "top"
end
cmus = I3::Bar::Widgets::CMUS
cmus.add_event_callback do |w,e|
if e["button"]== 1
system "cmus-remote", "--pause"... | MinasMazar/dotfiles | i3.symlink/i3ba.rb | Ruby | mit | 574 |
import { connect } from 'react-redux';
import { makeSelectClaimForUri } from 'lbry-redux';
import LivestreamLink from './view';
const select = (state, props) => ({
channelClaim: makeSelectClaimForUri(props.uri)(state),
});
export default connect(select)(LivestreamLink);
| lbryio/lbry-app | ui/component/livestreamLink/index.js | JavaScript | mit | 275 |
#include "AnimationComponentModule.h"
#include "AnimationComponent.h"
using namespace PaintsNow;
using namespace PaintsNow::NsMythForest;
using namespace PaintsNow::NsSnowyStream;
AnimationComponentModule::AnimationComponentModule(Engine& engine) : ModuleImpl<AnimationComponent>(engine) {} | paintsnow/paintsnow | Source/Utility/MythForest/Component/Animation/AnimationComponentModule.cpp | C++ | mit | 292 |
var request = require("request");
var util = require("util");
var async = require("async");
var config = require("./config");
var log = require("./log");
var error = require("./error");
var tools = require("./tools");
var buffer = require("./buffer");
var api = {};
//url:http://127.0.0.1/path
//data: an object
//ifb... | JustAnotherCan/wechat-ship | server/core/api.js | JavaScript | mit | 2,796 |
uis.directive('uiSelect',
['$document', 'uiSelectConfig', 'uiSelectMinErr', 'uisOffset', '$compile', '$parse', '$timeout',
function($document, uiSelectConfig, uiSelectMinErr, uisOffset, $compile, $parse, $timeout) {
return {
restrict: 'EA',
templateUrl: function(tElement, tAttrs) {
var theme = tAtt... | 90TechSAS/ui-select | src/uiSelectDirective.js | JavaScript | mit | 15,230 |
package cz.muni.fi.pa165.languageschool.test;
import java.util.Collection;
import javax.persistence.EntityManager;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.fail;
import org.junit.runner.RunWith;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.spring... | fuca/languageschool | language-school-bus-impl-module/src/test/java/cz/muni/fi/pa165/languageschool/test/BaseTest.java | Java | mit | 1,161 |
require 'morpheus/api/api_client'
class Morpheus::NetworkStaticRoutesInterface < Morpheus::RestInterface
def base_path
"/api/networks"
end
def get_static_route(network_id, route_id, params={}, headers={})
validate_id!(network_id)
validate_id!(route_id)
execute(method: :get, url: "#{base_path}/#... | gomorpheus/morpheus-cli | lib/morpheus/api/network_static_routes_interface.rb | Ruby | mit | 1,349 |
import {singularize} from './noun';
export {
singularize
};
| Yomguithereal/talisman | src/inflectors/spanish/index.js | JavaScript | mit | 63 |
import time
import json
import redis
import subprocess
from subprocess import Popen, check_output
import shlex
import os
from py_cf_new_py3.chain_flow_py3 import CF_Base_Interpreter
from redis_graph_py3 import farm_template_py3
class Process_Control(object ):
def __init__(self):
pass
de... | glenn-edgar/local_controller_3 | process_control_py3.py | Python | mit | 9,357 |
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*---------------------------------------------------------------... | DustinCampbell/vscode | src/vs/base/browser/ui/tree/indexTreeModel.ts | TypeScript | mit | 14,919 |
<?php
declare(strict_types=1);
/*
* This file is part of the Sonata Project package.
*
* (c) Thomas Rabaix <thomas.rabaix@sonata-project.org>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Sonata\AdminBundle\Tests\Act... | jordisala1991/SonataAdminBundle | tests/Action/SetObjectFieldValueActionTest.php | PHP | mit | 14,552 |
module.exports={
"file":1, // fname, mode, contents
"filedelete":2, // fname
"checkout":3, // fname
"checkin":4, // fname
"ping":5, // -
"pong":6, // -
"edit":{
"open":100, // fname
"close":101, // fname
"open_ok":102, // fname
"open_err":103, // fname
"close_ok":104, // fname
"close_err":105 // fna... | tomsmeding/gvajnez | msgtype.js | JavaScript | mit | 329 |
package com.mines.main;
import com.mines.domain.enums.BoardSize;
import com.mines.domain.enums.Difficulty;
public class MineField{
private int[][] field;
private BoardSize size;
private Difficulty diff;
private int nrMines = 0;
public MineField(){
diff = Difficulty.EASY;
size = BoardSi... | tonycatapano/JMinesField | src/main/java/com/mines/main/MineField.java | Java | mit | 1,804 |
// Decompiled with JetBrains decompiler
// Type: System.Fabric.Management.ServiceModel.ApplicationPoliciesType
// Assembly: System.Fabric.Management.ServiceModel, Version=6.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
// MVID: C6D32D4D-966E-4EA3-BD3A-F4CF14D36DBC
// Assembly location: C:\Git\ServiceFabricSd... | aL3891/ServiceFabricSdkContrib | System.Fabric.Management.ServiceModel/ApplicationPoliciesType.cs | C# | mit | 2,017 |
# Django settings for obi project.
from os.path import abspath, dirname
DEBUG = False
TEMPLATE_DEBUG = DEBUG
ADMINS = (
# ('Your Name', 'your_email@example.com'),
)
MANAGERS = ADMINS
DATABASES = {
'default': {
# Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
'ENGINE': 'django.db.... | adityadharne/TestObento | obi/obi/settings.py | Python | mit | 6,014 |
require 'cocaine'
require 'English'
require 'time'
require_relative 'result'
require_relative 'error'
class LittleneckClamAV
class Clam
def engine
version[:engine] if available?
end
def database_version
version[:database_version].to_i if available?
end
def database_date
Time.... | theozaurus/littleneck_clamav | lib/littleneck_clamav/clam.rb | Ruby | mit | 2,029 |
using System;
using System.Threading.Tasks;
using work.bacome.async;
using work.bacome.imapclient.support;
using work.bacome.trace;
namespace work.bacome.imapclient
{
public partial class cIMAPClient
{
internal cMessageHandleList SetUnseenCount(iMailboxHandle pMailboxHandle)
{
var ... | bacome/imapclient | imapclient/imapclient/client/setunseencount.cs | C# | mit | 2,008 |
import assert from "assert";
import BufSamples from "../../../src/scapi/units/BufSamples";
describe("scapi/units/BufSamples", () => {
it(".kr should create control rate node", () => {
const node = BufSamples.kr(1);
assert.deepEqual(node, {
type: "BufSamples", rate: "control", props: [ 1 ]
});
})... | mohayonao/neume | test/scapi/units/BufSamples.js | JavaScript | mit | 684 |
<?php
namespace AerialShip\SteelMqBundle\Entity;
use Symfony\Component\Security\Core\Role\Role;
use Symfony\Component\Security\Core\User\UserInterface;
use Doctrine\ORM\Mapping as ORM;
use Doctrine\Common\Collections\ArrayCollection;
/**
* @ORM\Entity(repositoryClass="AerialShip\SteelMqBundle\Entity\Repository\User... | aerialship/steel-mq | src/AerialShip/SteelMqBundle/Entity/User.php | PHP | mit | 11,457 |
<?php
namespace GuildWars2\Api\Entity;
use GuildWars2\Api\SetEntityBase;
abstract class ItemInfoBase extends SetEntityBase
{
private $_itemId;
private $_amount;
private $_skinId;
private $_upgradeIds;
private $_infusionIds;
private $_bindType;
private $_boundCharacterName;
protected ... | TorbenKoehn/gw2-php | Api/Entity/ItemInfoBase.php | PHP | mit | 2,373 |
#pragma once
/* LightedMaterial.hpp
*
* Copyright (C) 2017 Dynamic Reflectance
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
//std
#include <string>
#include <vector>
namespace core {
namespace utils {
std::vector<std::s... | dynamicreflectance/core | utils/source/Tokenizer.hpp | C++ | mit | 558 |
import { combineReducers } from 'redux';
import { routerReducer as routing } from 'react-router-redux';
import account from '../reducers/account';
import authentication from '../reducers/authentication';
import user from '../reducers/user';
import modelPortfolio from '../reducers/modelPortfolio';
import portfolio from ... | AlexisDeschamps/portfolio-rebalancer | app/reducers/index.js | JavaScript | mit | 1,039 |
var mongo = require('mongodb');
var fs = require('fs');
var path = require("path");
var Server = mongo.Server,
Db = mongo.Db,
BSON = mongo.BSONPure;
var server = new Server('localhost', 27017, {auto_reconnect: true});
db = new Db('vivudb', server);
function getExtPart(str){
var n=str.split(".");
return n[... | tonycaovn/vivuserver | services/audio.js | JavaScript | mit | 5,449 |
var gulp = require('gulp');
var connect = require('gulp-connect');
var wiredep = require('wiredep').stream;
var $ = require('gulp-load-plugins')();
var del = require('del');
var jsReporter = require('jshint-stylish');
var annotateAdfPlugin = require('ng-annotate-adf-plugin');
var pkg = require('./package.json');
var a... | reshak/angular-dashboard-framework | sample/widgets/deviceInventory/gulpfile.js | JavaScript | mit | 2,787 |
from rest_framework import serializers
from rest_auth.serializers import UserDetailsSerializer
class UserSerializer(UserDetailsSerializer):
website = serializers.URLField(source="userprofile.website", allow_blank=True, required=False)
about = serializers.CharField(source="userprofile.about", allow_blank=True... | ZachLiuGIS/reactjs-auth-django-rest | django_backend/user_profile/serializers.py | Python | mit | 1,016 |
/** @license React vundefined
* react.development.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
(function (global, factory) {
typeof exports === 'object' && typeof module !... | cdnjs/cdnjs | ajax/libs/react/18.0.0-alpha-bdd6d5064-20211001/umd/react.development.js | JavaScript | mit | 112,128 |
<?
$prefix = $_SERVER['DOCUMENT_ROOT'];
require_once($prefix . '/common/markdown.php');
require_once($prefix . '/common/smartypants.php');
// Connect to Database
include('common/dbconnect.php');
// Only items that have been published
// (No posts scheduled for the future)
$post_cutoff_time = time();
// Number of Pos... | mk14/Long-Beach | atom-feed.php | PHP | mit | 3,777 |
angular.module('ExampleCtrl', []).controller('ExampleCtrl', ['$scope',
function($scope) {
$scope.createItems = function() {
$scope.items = [];
for (var i = 0; i < 100; i++) {
$scope.items[i] = {
ratio: Math.max(0.4, Math.random() * 2),
color: ... | homerjam/angular-columnify | example/app.js | JavaScript | mit | 557 |
package model.expression;
/**
* The type Operation.
*/
public class Operation
{
/**
* The constant ADD.
*/
public static final int ADD = 1;
/**
* The constant SUBTRACT.
*/
public static final int SUBTRACT = 2;
/**
* The constant MULTIPLY.
*/
public static fi... | leyyin/university | advanced-programming-methods/labs/toy-interpreter-java/src/model/expression/Operation.java | Java | mit | 895 |
var _ = require('lodash'),
EventEmitter = require('events').EventEmitter,
config = require('./config'),
Channel = require('./channel'),
Connection = require('./connection'),
Bus = require('./bus'),
API = require('./utils');
var subscribedChannels;
func... | dobrite/gusher | src/javascripts/gusher.js | JavaScript | mit | 1,015 |
var less = require('less');
var lessStr = '.class { width: (1+1)}';
less.render(lessStr, function(e, output) {
console.log(output.css);
});
console.log(less.render(lessStr)); | escray/besike-nodejs-harp | lessExample.js | JavaScript | mit | 177 |
namespace LibMinecraft
{
public struct Vector3
{
public static Vector3 Zero
{
get { return new Vector3(0, 0, 0); }
}
public static Vector3 UpX
{
get { return new Vector3(1, 0, 0); }
}
public static Vector3 UpY
{
get { return new Vector3(0, 1, 0); }
}
public static Vector3 UpZ
{
get... | inku25253/MineProtocol.net | LibMinecraft/Vector3.cs | C# | mit | 996 |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace TheCode
{
public class Customer
{
public string Id { get; set; }
public string Name { get; set; }
public bool Pro { get; set; }
}
}
| chadmichel/UnitTest | TheCode/Customer.cs | C# | mit | 298 |
<?php
$ISO_3166_2 = array();
$ISO_3166_2['01'] = "Adana";
$ISO_3166_2['02'] = "Adiyaman";
$ISO_3166_2['03'] = "Afyonkarahisar";
$ISO_3166_2['04'] = "Agri";
$ISO_3166_2['68'] = "Aksaray";
$ISO_3166_2['05'] = "Amasya";
$ISO_3166_2['06'] = "Ankara";
$ISO_3166_2['07'] = "Antalya";
$ISO_3166_2['75'] = "Ardahan";
$ISO_3166_2... | Yarduddles/ISO-3166 | PHP/ISO-3166-2-TR.php | PHP | mit | 2,522 |
<?php
require_once(__DIR__ . "/../model/config.php");
//takes and stores exp - exp4
//$exp = filter_input(INPUT_POST, "exp", FILTER_SANITIZE_STRING);
//$exp1 = filter_input(INPUT_POST, "exp1", FILTER_SANITIZE_STRING);
//$exp2 = filter_input(INPUT_POST, "exp2", FILTER_SANITIZE_STRING);
//$exp3 = filter_input(INPUT_POST... | SimonAnna/final | Php/controller/save-user.php | PHP | mit | 815 |
import React from "react";
import { SelectAddressModal } from "../ImportAccount";
import { roundingNumber } from "../../utils/converter"
import PathSelector from "../../containers/CommonElements/PathSelector";
const ImportByDeviceView = (props) => {
function choosePath(dpath) {
let inputPath = document.getEleme... | KyberNetwork/KyberWallet | src/js/components/ImportAccount/ImportByDeviceView.js | JavaScript | mit | 4,782 |
// Copyright (c) 2014 The Bitcoin Core developers
// Copyright (c) 2014-2015 The Singularity developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "primitives/transaction.h"
#include "main.h"
#include <boost/t... | grumpydevelop/singularity | src/test/main_tests.cpp | C++ | mit | 806 |
class FixColumnName < ActiveRecord::Migration
def change
rename_column :posts, :user, :username
rename_column :tagged_posts, :user, :username
add_column :posts, :likes, :integer
add_column :tagged_posts, :likes, :integer
end
end
| joannangx/visionaria_app | db/migrate/20161029100010_fix_column_name.rb | Ruby | mit | 254 |
package iso20022
// Details of the securities trade.
type SecuritiesTradeDetails54 struct {
// Reference assigned to the trade by the investor or the trading party. This reference will be used throughout the trade life cycle to access/update the trade details.
TradeIdentification []*Max35Text `xml:"TradId,omitempty... | fgrid/iso20022 | SecuritiesTradeDetails54.go | GO | mit | 4,526 |
const Discord = require('discord.js');
const client = new Discord.Client({
forceFetchUsers: true,
autoReconnect: true,
disableEveryone: true,
});
const settings = require('./auth.json');
const chalk = require('chalk');
const fs = require('fs');
const moment = require('moment');
require('./util/eventLoader')(client);... | Ryahn/SoEBot | bot.js | JavaScript | mit | 2,929 |
# -*- coding: utf-8 -*-
"""
flask_via.examples.basic
========================
A simple ``Flask-Via`` example Flask application.
"""
from flask import Flask
from flask.ext.via import Via
from flask.ext.via.routers.default import Functional
app = Flask(__name__)
def foo(bar=None):
return 'Functional Foo View!'... | thisissoon/Flask-Via | flask_via/examples/basic.py | Python | mit | 542 |
<?php
use App\Match;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Support\Facades\Schema;
class CreateMatchesTable extends Migration
{
public function up()
{
Schema::create('matches', function(Blueprint $table) {
$table->increments(... | nixsolutions/ggf | database/migrations/2015_07_07_144512_create_matches_table.php | PHP | mit | 1,556 |
require('server.babel'); // babel registration (runtime transpilation for node)
const path = require('path');
const LodashModuleReplacementPlugin = require('lodash-webpack-plugin');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
const autoprefixer = require('autoprefixer');
const webpack = require... | sankalplakhina/isomorphic-universal-react-redux-boilerplate-seed | webpack/prod.config.js | JavaScript | mit | 5,226 |
using System.ComponentModel.DataAnnotations;
namespace OptionsWebSite.ViewModels.Account
{
public class ExternalLoginConfirmationViewModel
{
[Required]
[EmailAddress]
public string Email { get; set; }
}
}
| FriendlyNPC/MVC6_Mac | OptionsWebsite/ViewModels/Account/ExternalLoginConfirmationViewModel.cs | C# | mit | 253 |
package com.dev.lambda.demo;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
import org.junit.BeforeClass;
import org.junit.Test;
import com.amazonaws.services.lambda.runtime.Context;
import com.dev.lambda.demo.model.Input;
/**
* A simple test harness for locally invoking your Lambda fu... | kaulavinash/berryme | src/test/java/com/dev/lambda/demo/LambdaFunctionHandlerTest.java | Java | mit | 1,143 |
/*****************************************************************************
* *
* OpenNI 2.x Alpha *
* Copyright (C) 2012 PrimeSense Ltd. *
* ... | Windowsfreak/NIStreamer | Android/NiViewer.Android/src/org/openni/android/tools/niviewer/NiViewerActivity.java | Java | mit | 10,505 |
<?php
namespace Vision\DependencyInjection;
use Psr\Container\NotFoundExceptionInterface;
use RuntimeException;
class NotFoundException extends RuntimeException implements NotFoundExceptionInterface
{
}
| Trainmaster/Vision | src/DependencyInjection/NotFoundException.php | PHP | mit | 206 |
<?php defined('KOHANASYSPATH') or die('No direct script access.');
/**
* UTF8::from_unicode
*
* @package Kohana
* @author Kohana Team
* @copyright (c) 2007-2011 Kohana Team
* @copyright (c) 2005 Harry Fuecks
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt
*/
function _from... | ivantcholakov/codeigniter-utf8 | application/third_party/kohana/utf8/from_unicode.php | PHP | mit | 1,718 |
/*
* Copyright 2002-2016 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by ap... | boggad/jdk9-sample | sample-catalog/spring-jdk9/src/spring.jms/org/springframework/jms/connection/JmsResourceHolder.java | Java | mit | 7,474 |
<?php
namespace GRT\MainBundle;
use Symfony\Component\HttpKernel\Bundle\Bundle;
class GRTMainBundle extends Bundle
{
}
| mwd410/GRT-Interview | src/GRT/MainBundle/GRTMainBundle.php | PHP | mit | 122 |
import { Component, Inject, OnInit } from '@angular/core';
import { FormControl, FormGroup, Validators } from '@angular/forms';
import { Router } from '@angular/router';
import { AuthService } from './auth.service';
import { IToastr, TOASTR_TOKEN } from '../common/toastr.service';
@Component({
templateUrl: 'app/user... | AdamNagy/FrontendTryouts | Angular/EventManager/app/user/profile.component.ts | TypeScript | mit | 1,870 |
require('dotenv').config();
import http from 'http';
import https from 'https';
import Koa from 'koa';
import Io from 'socket.io';
import KoaBody from 'koa-body';
import cors from 'kcors';
import Router from 'koa-router';
import Socket from './socket';
import crypto from 'crypto';
import mailer from './utils/mailer';
i... | seripap/darkwire.io | server/src/index.js | JavaScript | mit | 3,919 |