repo_name stringlengths 4 116 | path stringlengths 4 379 | size stringlengths 1 7 | content stringlengths 3 1.05M | license stringclasses 15
values |
|---|---|---|---|---|
frainfreeze/studying | university/10004-Programming/labs/v5/zadatak3.cpp | 952 | #include <iostream>
#include <vector>
using namespace std;
/*
Zadatak 3. Napisite program koji od korisnika trazi da unese broj
veci od 100 (ako je broj manji od 100 ponavlja se upit).
Nakon unosa iz raspona (1 broj) upisite sve parne brojeve u polje.
Ispisite elemente polja odvojene zarezom. Nakon zadnjeg eleme... | mit |
FreakingGoodSoftware/TempSensor_XamarinForms | TempSensor.Xamarin/TempSensor.Xamarin/TempSensor.Xamarin.Droid/MainActivity.cs | 765 | using System;
using Android.App;
using Android.Content;
using Android.Runtime;
using Android.Views;
using Android.Widget;
using Android.OS;
namespace TempSensor.Xamarin.Droid
{
[Activity (Label = "TempSensor.Xamarin.Droid", MainLauncher = true, Icon = "@drawable/icon")]
public class MainActivity : Activity
{
in... | mit |
raphealolams/ihub | application/third_party/Smarty/compiled/edc3b292b37dbb775e182b81e0a55f3134f229d2_0.file.header.tpl.php | 4117 | <?php /* Smarty version 3.1.27, created on 2017-02-01 14:05:27
compiled from "C:\xampp\htdocs\crystal_school_app\application\views\layouts\partials\header.tpl" */ ?>
<?php
/*%%SmartyHeaderCode:318035891dd173b67f1_98238491%%*/
if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->... | mit |
blahami2/MI-PAA-Knapsack-evaluator | src/cz/blahami2/mipaa/knapsack/model/algorithm/DynamicPriceFPTAS.java | 4781 | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package cz.blahami2.mipaa.knapsack.model.algorithm;
import java.util.Map;
import cz.blahami2.mipaa.knapsack.model.Knapsack;
import cz.... | mit |
ArtOfCode-/qpixel | db/migrate/20191109211244_change_site_settings_value_type.rb | 136 | class ChangeSiteSettingsValueType < ActiveRecord::Migration[5.0]
def change
change_column :site_settings, :value, :text
end
end
| mit |
thuongho/dream-machine | app/users/users.component.js | 2026 | "use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Refl... | mit |
lbdlbd/kof_game_server | game-server/app/domain/map/map.js | 16163 | //var buildFinder = require('pomelo-pathfinding').buildFinder;
//var geometry = require('../../util/geometry');
//var PathCache = require('../../util/pathCache');
var utils = require('../../util/utils');
var logger = require('pomelo-logger').getLogger(__filename);
var formula = require('../../consts/formula');
var fs =... | mit |
sayarco/sayardocs | src/app/shared/components/compare.component.ts | 7540 | import { Component, Input, Output, EventEmitter, ViewChild } from '@angular/core';
import { Scroll } from 'ionic-angular';
import { Observable } from 'rxjs/Observable';
import { Store } from '@ngrx/store';
import { AppState } from '../../store/root.reducer';
import * as Impetus from 'impetus/dist/impetus';
@Compon... | mit |
raczeja/Test.Automation | Objectivity.Test.Automation.Common/Types/Kendo/KendoComboBox.cs | 1916 | /*
The MIT License (MIT)
Copyright (c) 2015 Objectivity Bespoke Software Specialists
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 ... | mit |
lexek/chat | src/main/java/lexek/wschat/chat/msg/EmoticonProvider.java | 235 | package lexek.wschat.chat.msg;
import lexek.wschat.db.model.Emoticon;
import org.jvnet.hk2.annotations.Contract;
import java.util.List;
@Contract
public interface EmoticonProvider<T extends Emoticon> {
List<T> getEmoticons();
}
| mit |
craigbridges/Nettle | src/Nettle.Tests/NettleTests.cs | 600 | using Shouldly;
using System;
using Xunit;
namespace Nettle.Tests
{
public class NettleTests
{
[Fact]
public void CanTemplateString()
{
var source = @"Welcome {{Name}}";
var model = new
{
Name = "John Smith"
};
... | mit |
aarongough/triangular | lib/triangular/facet.rb | 1765 | # frozen_string_literal: true
module Triangular
class Facet
attr_accessor :normal, :vertices
def initialize(normal = nil, *args)
@normal = normal
@vertices = args
end
def to_s
output = "facet normal #{@normal}\n"
output += "outer loop\n"
@vertices.each do |vertex|
... | mit |
Azure/azure-sdk-for-python | sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_06_01/aio/operations/_vpn_sites_configuration_operations.py | 8363 | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | mit |
aq1018/pdfkit | js/path.js | 9425 | (function() {
var SVGPath;
SVGPath = (function() {
var apply, arcToSegments, cx, cy, parameters, parse, px, py, runners, segmentToBezier, solveArc, sx, sy;
function SVGPath() {}
SVGPath.apply = function(doc, path) {
var commands;
commands = parse(path);
return apply(commands, doc);
... | mit |
PLOS/rich_citations_api | db/migrate/20140913031005_add_ref_id_to_citation.rb | 306 | class AddRefIdToCitation < ActiveRecord::Migration
def up
# Do this in two steps because SQLLite is a pain
add_column :citations, :ref, :string, limit: 255
change_column :citations, :ref, :string, limit: 255, :null => false
end
def down
remove_column :citations, :ref
end
end
| mit |
Zenohm/mafiademonstration | src/mafiademonstration.py | 2859 | # -*- coding: utf-8 -*-
import kivy
from kivy.app import App
from kivy.uix.screenmanager import ScreenManager, NoTransition
from os.path import join, dirname
kivy.require('1.9.1')
try:
import stages
except ModuleNotFoundError:
from . import stages
class MafiaDemonstrationApp(App):
"""Simple Slideshow... | mit |
samrodriguez/sf_siresca | app/cache/dev/assetic/config/5/561b4f4900da52220373c7fdf79420a4.php | 69 | <?php
// UDSsirescaBundle:Direccion:new.html.twig
return array (
);
| mit |
drborges/pyprofiler | tests/decorators_profile_checkpoint_test.py | 700 | from sure import expect
from mock import Mock, call
from decorators import profile_checkpoint
def test_profile_checkpoint_decorator():
profiler = Mock()
profiler.start = Mock()
profiler.intermediate = Mock()
@profile_checkpoint(profiler, profile_id='id')
def fn():
profiler.intermediate()
fn()
exp... | mit |
Universal-Model-Converter/UMC3.0a | data/Python/x86/Lib/site-packages/OpenGL/raw/GL/ARB/shader_stencil_export.py | 484 | '''OpenGL extension ARB.shader_stencil_export
Automatically generated by the get_gl_extensions script, do not edit!
'''
from OpenGL import platform, constants, constant, arrays
from OpenGL import extensions
from OpenGL.GL import glget
import ctypes
EXTENSION_NAME = 'GL_ARB_shader_stencil_export'
_DEPRECATED = False
... | mit |
thlorenz/bconfig | examples/separate-paths.js | 242 | 'use strict';
var bconfig = require('..');
var util = require('util');
var separatePathsAndShim = true;
var config = bconfig(require.resolve('./fixtures/requirejs-config'), separatePathsAndShim);
console.log(util.inspect(config, null, 5));
| mit |
helix-toolkit/icon-generator | IconGenerator/TrefoilKnotVisual3D.cs | 3879 | namespace IconGenerator
{
using System;
using System.Windows;
using System.Windows.Media.Media3D;
using HelixToolkit.Wpf;
/// <summary>
/// Represents a 3D visual showing a trefoil knot.
/// </summary>
/// <remarks>See <a href="https://en.wikipedia.org/wiki/Trefoil_knot">Wikipedia</a>.... | mit |
rails/conductor | app/controllers/conductor/app_controllers_controller.rb | 594 | require 'rails/generators'
module Conductor
class AppControllersController < ApplicationController
include Tubesock::Hijack
require 'pty'
def new
@page_title = 'Controllers'
end
def create
@form = ControllerGeneratorForm.new(params[:app_controller])
if @form.valid?
Rail... | mit |
gems-uff/trackbus | www/js/utils/directives/focus-element.directives.js | 685 | (function() {
'use strict';
angular
.module('utils')
.directive('focusElement', focusElement);
focusElement.$inject = ['$window', '$timeout'];
function focusElement($window, $timeout) {
return function(scope, elem, attr) {
elem.on('click', function() {
... | mit |
selvasingh/azure-sdk-for-java | sdk/network/mgmt-v2020_04_01/src/main/java/com/microsoft/azure/management/network/v2020_04_01/ApplicationGatewaySslProtocol.java | 1647 | /**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
*/
package com.microsoft.azure.management.network.v2020_04_01;
import java.util.Collection... | mit |
icarus-consulting/Yaapii.Atoms | tests/Yaapii.Atoms.Tests/Number/LiveNumberTests.cs | 4032 | // MIT License
//
// Copyright(c) 2022 ICARUS Consulting GmbH
//
// 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, cop... | mit |
mind0n/hive | Cache/Libs/net46/ndp/fx/src/DataWeb/Design/System/Data/EntityModel/Emitters/PropertyEmitterBase.cs | 4022 | //---------------------------------------------------------------------
// <copyright file="PropertyEmitterBase.cs" company="Microsoft">
// Copyright (c) Microsoft Corporation. All rights reserved.
// </copyright>
//
// @owner [....]
// @backupOwner [....]
//------------------------------------------------... | mit |
apo-j/Projects_Working | S/SOURCE/SOURCE.Common/SOURCE.Domaine/Results/SelectionResult.cs | 1175 | using System;
using System.Runtime.Serialization;
namespace SOURCE.Domaine.Results
{
public partial class SelectionResult
{
public long SelectionID { get; set; }
public long? RechercheID { get; set; }
public string SelectionLibelle { get; set;}
public long SelectionEle... | mit |
lewischeng-ms/WebApi | OData/test/E2ETest/WebStack.QA.Test.OData/Common/LinkRoutingConvention2.cs | 3802 | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
using System;
using System.Linq;
using System.Net.Http;
using System.Web.Http.Controllers;
using System.Web.OData.Routing;
using System.Web.OData.Routing.Conve... | mit |
geocre/geocre | controllers/page.php | 56779 | <?php
if(!defined('IN_INDEX')) exit;
define('DEFAULT_PAGE_SUBTEMPLATE', 'default.inc.tpl');
$settings['project_thumbnail_width'] = 170;
$settings['project_thumbnail_height'] = 170;
$settings['project_thumbnail_quality'] = 80;
$settings['page_image_width'] = 380;
$settings['page_image_height'] = 285;
$settings['page_i... | mit |
danjac/podbaby | Godeps/_workspace/src/gopkg.in/redis.v3/ring_test.go | 4416 | package redis_test
import (
"crypto/rand"
"fmt"
"time"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
"github.com/danjac/podbaby/Godeps/_workspace/src/gopkg.in/redis.v3"
)
var _ = Describe("Redis ring", func() {
var ring *redis.Ring
setRingKeys := func() {
for i := 0; i < 100; i++ {
err := ring... | mit |
LauenerEngineering/Lauener.Core | Lauener.Core/Serializer/JsonSerialization.cs | 983 | namespace Lauener.Core.Serializer
{
using System.IO;
using System.Runtime.Serialization.Json;
using Newtonsoft.Json;
public class JsonSerialization : ISerializer
{
public T DeserializeStream<T>(Stream stream)
{
stream.ThrowIfNull(nameof(stream));
var s = ne... | mit |
hisekaldma/Polyhymnia | src/polyhymnia.js | 2472 | var Polyhymnia = Polyhymnia || {};
Polyhymnia.getAudioContext = function() {
'use strict';
if (!Polyhymnia.audioContext) {
window.AudioContext = window.AudioContext || window.webkitAudioContext;
Polyhymnia.audioContext = new AudioContext();
}
return Polyhymnia.audioContext;
};
Polyhymnia.isSupported =... | mit |
yangra/SoftUni | Java-DB-Fundamentals/DatabasesFrameworks-Hibernate&SpringData/EXAMS/weddings_planner_exam/src/main/java/softuni/services/impl/VenueServiceImpl.java | 1713 | package softuni.services.impl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import softuni.dto.Export.VenueExportXmlDto;
import softuni.dto.Export.VenuesExportXmlDto;
import softuni.dto.Import.VenueImportXmlDto;
import softuni.entities.Venue;
import soft... | mit |
quantiguous/api_banking | lib/api_banking/soap/instantMoneyTransferService.rb | 9181 | module ApiBanking
class InstantMoneyTransferService < Soap12Client
SERVICE_NAMESPACE = 'http://www.quantiguous.com/services'
SERVICE_VERSION = 1
attr_accessor :request, :result
module AddBeneficiary
Request = Struct.new(:uniqueRequestNo, :appID, :customerID, :beneficiaryMobileNo, :beneficiary... | mit |
cmavromoustakos/i18n | test/translation_helper_test.rb | 370 | require 'test_helper'
require 'i18n/action_view/helpers/translation_helper'
class TranslationHelperTest < Test::Unit::TestCase
include ActionView::Helpers::TranslationHelper
def test_run_substitutions
result = run_substitutions "this is text with a :special field", :special => "FNORD"
assert_equal "this... | mit |
Scardiecat/svermaker | semver/projectversionservice_test.go | 13711 | package semver_test
import (
"github.com/Scardiecat/svermaker"
mock "github.com/Scardiecat/svermaker/mock"
"github.com/Scardiecat/svermaker/semver"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)
var _ = Describe("Projectversionservice", func() {
var serializer = mock.Serializer{}
var pvs = semver.... | mit |
COLORFULBOARD/revision | revision/client_manager.py | 2324 | # -*- coding: utf-8 -*-
"""
revision.client_manager
~~~~~~~~~~~~~~~~~~~~~~~
:copyright: (c) 2018 by SENSY Inc.
:license: MIT, see LICENSE for more details.
"""
from revision.client import Client
from revision.exceptions import InvalidArgType
__all__ = (
"ClientManager",
)
class ClientManager(di... | mit |
milkcat/MilkCat | src/segmenter/out_of_vocabulary_word_recognizer.cc | 6143 | //
// The MIT License (MIT)
//
// Copyright 2013-2014 The MilkCat Project Developers
//
// 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 th... | mit |
jrhorn424/recruiter | app/models/registration.rb | 639 | require 'composite_primary_keys'
class Registration < ActiveRecord::Base
self.primary_keys = :user_id, :session_id
belongs_to :user
belongs_to :session
validate :validate_allowness
def validate_allowness
if not self.user.experiments.exists?(id: self.session.experiment.id)
errors.add(:user, "isn'... | mit |
liuxx001/BodeAbp | src/modules/BodeAbp.Product/Attributes/ModelConfigs/ProductAttributeConfiguration.cs | 233 | using Abp.EntityFramework;
using BodeAbp.Product.Attributes.Domain;
namespace BodeAbp.Product.Attributes.ModelConfigs
{
public class ProductAttributeConfiguration : EntityConfigurationBase<ProductAttribute,int>
{
}
}
| mit |
gero3/three.js | test/unit/src/renderers/webgl/WebGLAttributes.tests.js | 732 | /* global QUnit */
import { WebGLAttributes } from '../../../../../src/renderers/webgl/WebGLAttributes';
export default QUnit.module( 'Renderers', () => {
QUnit.module( 'WebGL', () => {
QUnit.module( 'WebGLAttributes', () => {
// INSTANCING
QUnit.todo( 'Instancing', ( assert ) => {
assert.ok( false, ... | mit |
ZWkang/simple-vue-project | src/lib/lazyload/index.js | 191 | /* eslint-disable*/
import lazyload from './lazy.js'
var MyPlugin = {}
MyPlugin.install = function(Vue,option){
Vue.prototype.lazyload = lazyload.init(option)
}
export default MyPlugin | mit |
NicoPennec/protractor | scripts/interactive_tests/interactive_test.js | 1987 | var env = require('../../spec/environment.js');
var InteractiveTest = require('./interactive_test_util').InteractiveTest;
var port = env.interactiveTestPort;
var test = new InteractiveTest('node lib/cli.js --elementExplorer true', port);
// Check state persists.
test.addCommandExpectation('var x = 3');
test.addCommand... | mit |
0xbaadf00d/partialize | src/test/java/converters/BigDecimalConverter.java | 1967 | /*
* The MIT License (MIT)
*
* Copyright (c) 2016 Thibault Meyer
*
* 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 us... | mit |
ttoth/thesis | JavaProgram/integration-system/WekaConnector/src/main/java/hu/bme/aait/hermes/dialog/web/handler/GlobalWebSocketHandlerService.java | 2749 | package hu.bme.aait.hermes.dialog.web.handler;
import hu.bme.aait.hermes.dialog.web.dto.message.ClientMessage;
import hu.bme.aait.hermes.dialog.web.service.messageprocessor.MessageProcessorService;
import hu.bme.aait.hermes.dialog.web.service.messageprocessor.ProcessMessageType;
import java.util.Collections;
i... | mit |
retaxJS/retax-seed | src/reducers/loading.js | 1044 | import { reducerFactory } from 'retax';
import { fromJS } from 'immutable';
import * as ACTIONS from 'constants/actions';
function getInitialState() {
return fromJS({
value: {},
});
}
function startLoading(ACTION, state) {
const currentValue = state.getIn(['value', ACTION, 'value']);
const currentMax = s... | mit |
paparony03/osu-framework | osu.Framework.Testing/Drawables/Steps/AssertButton.cs | 912 | // Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu-framework/master/LICENCE
using System;
using OpenTK.Graphics;
namespace osu.Framework.Testing.Drawables.Steps
{
public class AssertButton : StepButton
{
publ... | mit |
dicarlo2/ScalaEquals | core-test/src/main/scala/org/scalaequals/test/ParameterizedClass.scala | 1522 | /*
* Copyright (c) 2013 Alex DiCarlo
*
* 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, publis... | mit |
gabhijit/ipgiri | ipv4_routing_table.py | 9854 | #
# Refer to LICENSE file and README file for licensing information.
#
"""
An implementation of IPv4 Routing table that does longest prefix match.
This implementation is based on ideas from the following sources (though it is
not an actual implementation of any of these ideas).
Click Modular Router - RadixIPLookup Ele... | mit |
shoelzer/SharpDX | Source/Toolkit/SharpDX.Toolkit.Graphics/GraphicsResourceContentReaderBase.cs | 2319 | // Copyright (c) 2010-2013 SharpDX - Alexandre Mutel
//
// 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, modif... | mit |
akromm/.NetRayTracer | NetRayTracer/Properties/AssemblyInfo.cs | 1400 | 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("Ne... | mit |
navalev/azure-sdk-for-java | sdk/eventhubs/azure-messaging-eventhubs/src/test/java/com/azure/messaging/eventhubs/EventProcessorClientBuilderTest.java | 3624 | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
package com.azure.messaging.eventhubs;
import com.azure.messaging.eventhubs.implementation.ClientConstants;
import org.junit.jupiter.api.Test;
import java.net.URI;
import java.net.URISyntaxException;
import java.util.Loca... | mit |
jdurbin/sandbox | python/args/multiple.py | 226 | #!/usr/bin/env python3
import sys,argparse
parser = argparse.ArgumentParser()
parser.add_argument('-foo', nargs='+', help='foo values', required=False)
args = parser.parse_args()
for foo in args.foo:
print("Foo: ",foo) | mit |
bgaborg/aut-j2ee-hw | ebank-ejb/src/main/java/com/bg/ebank/entity/Groups.java | 2551 | /**
* Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved.
*
* You may not modify, use, reproduce, or distribute this software except in
* compliance with the terms of the License at:
* http://java.net/projects/javaeetutorial/pages/BerkeleyLicense
*/
package com.bg.ebank.entity;
import java.io.... | mit |
unrealities/warning-track | models/master_scoreboard.go | 4184 | package models
import "time"
type Scoreboard struct {
Dates []struct {
Date string `json:"date"`
Games []struct {
GamePk int `json:"gamePk"`
GameType string `json:"gameType"`
Season string `json:"season"`
GameDate time.Time `json:"gameDate"`
Teams struct {
Away struct {
... | mit |
openpprn/opn | test/controllers/blog_controller_test.rb | 237 | require 'test_helper'
class BlogControllerTest < ActionController::TestCase
test "User can see only accepted posts" do
login(users(:user_1))
get :blog
assert_equal [posts(:accepted_blog_post)], assigns(:posts)
end
end | mit |
M4rk07/matey-rest-api | src/App/Controllers/AbstractController.php | 808 | <?php
/**
* Created by PhpStorm.
* User: marko
* Date: 4.10.16.
* Time: 01.08
*/
namespace App\Controllers;
use App\Paths\Paths;
use App\Services\BaseService;
use App\Services\Redis\RedisService;
use App\Validators\UnsignedInteger;
use AuthBucket\OAuth2\Exception\InvalidRequestException;
use AuthBucket\OAuth2\Mo... | mit |
lizconlan/html-diff | models/sourcefile.rb | 628 | # encoding: utf-8
class Sourcefile
attr_reader :raw_text, :lines, :header
def initialize(text)
sanitize_text(text)
@raw_text = text
@lines = @raw_text.split("\n")
if @lines.first =~ /^diff --git/
line = ""
header_lines = []
@lines.reverse!
until line =~ /^@@ [^@]* @@/
... | mit |
renotoaster/flame.js | views/lazy_tree_view.js | 12609 | //= require ./lazy_list_view
//= require ./lazy_tree_item_view
/**
The tree in the `LazyTreeView` is being rendered as a flat list, with items
being indented to give the impression of a tree structure.
We keep a number of internal caches to easily map this flat list onto the
tree we're rendering.
TODO * `La... | mit |
fetus-hina/stat.ink | resources/react/saga/myLatestBattles.js | 746 | import axios from 'axios';
import {
call,
put,
takeLatest
} from 'redux-saga/effects';
import {
FETCH_MY_LATEST_BATTLES,
fetchMyLatestBattlesFailed,
fetchMyLatestBattlesSuccess
} from '../actions/myLatestBattles';
function requestGetApi () {
return axios
.get('/api/internal/my-latest-battles')
... | mit |
Szab/dmlib | src/operations/filter.js | 236 | import { DataSource } from '../dataSources/DataSource';
DataSource.registerOperation('filter', function filter(data, filteringFn) {
if (!Array.isArray(data)) {
data = [data];
}
return data.filter(filteringFn);
});
| mit |
Alex-Sokolov/vuejs.org | themes/vue/source/js/common.js | 13632 | (function () {
initMobileMenu()
initVideoModal()
if (PAGE_TYPE) {
initVersionSelect()
initApiSpecLinks()
initSubHeaders()
initLocationHashFuzzyMatching()
}
function initApiSpecLinks () {
var apiContent = document.querySelector('.content.api')
if (apiContent) {
var apiTitles = []... | mit |
eginwong/555-Job-Scheduling | code/LPT_heapq.py | 8050 | import datetime
import csv
import heapq
def printDate( current_date ):
switcher = {
0: "Monday",
1: "Tuesday",
2: "Wednesday",
3: "Thursday",
4: "Friday",
}
print "++++++++++++++++++++++++++++++++++++++++++++++++ It is currently " + switcher[current_date.weekday()] +... | mit |
michelleduer/archives | php5-3/Chapter-7-Functions/return_statement.php | 564 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Normal and Bold Text</title>
<link rel="stylesheet" type="text/css" href="common.css" />
</head>
<body>
<h1>Normal and... | mit |
mdelpozobanos/mixpy | mixpy/__init__.py | 177 | """
===============================
mixpy
===============================
"""
__author__ = 'Marcos DelPozo-Banos'
__email__ = 'mdelpozobanos@gmail.com'
__version__ = '0.0.0' | mit |
elado/isotope | examples/rails3-example/config/environments/development.rb | 993 | Rails3Example::Application.configure do
# Settings specified here will take precedence over those in config/environment.rb
# In the development environment your application's code is reloaded on
# every request. This slows down response time but is perfect for development
# since you don't have to restart the... | mit |
maxpert/raspchat | src/chat-handler.js | 2554 | const Inflector = require('inflected');
const bluebird = require('bluebird');
const Figlet = bluebird.promisifyAll(require('figlet'));
const ChatUser = require('./chat-user');
const ChatRoom = require('./chat-room');
const JSONMessage = require('./json-message');
const CommandHandlers = require('./command-handlers');
... | mit |
pricingassistant/mongokat | docs/conf.py | 9805 | # -*- coding: utf-8 -*-
#
# MongoKat documentation build configuration file, created by
# sphinx-quickstart on Thu Apr 30 14:21:09 2015.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# ... | mit |
Promact/trappist | Trappist/src/Promact.Trappist.Web/Migrations/20170725061921_AddedPropertyToTestAttendee.Designer.cs | 27413 | using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
using Promact.Trappist.DomainModel.DbContext;
using Promact.Trappist.DomainModel.Enum;
namespace Promact.Trappist.Web.Mig... | mit |
tychio/when | js/main.js | 751 | requirejs.config({
baseUrl: 'js',
paths: {
jquery: '../lib/jquery/dist/jquery.min',
audiojs: '../lib/audiojs/audiojs/audio'
}
});
requirejs(['jquery', 'update', 'timer', 'tabata', 'mod/wind', 'audiojs'], function ($, Update, Timer, Tabata, Wind) {
var tabataMod = false;
var timer = ... | mit |
HerrB92/obp | OpenBeaconPackage/libraries/hibernate-release-4.2.7.SP1/project/hibernate-core/src/main/java/org/hibernate/cfg/beanvalidation/ValidationMode.java | 2927 | /*
* Hibernate, Relational Persistence for Idiomatic Java
*
* Copyright (c) 2013, Red Hat Inc. or third-party contributors as
* indicated by the @author tags or express copyright attribution
* statements applied by the authors. All third-party contributions are
* distributed under license by Red Hat Inc.
*
* T... | mit |
sonkul9x/tintuc | application/modules/admin_products/views/products_add.php | 7892 | <?php $this->load->view('head-product'); ?>
<div class="line"></div>
<!-- Message -->
<!-- Main content wrapper -->
<div class="wrapper"> <!-- Form -->
<form class="form" id="form" action="<?php echo admin_url('san-pham/add'); ?>" method="post" enctype="multipart/form-data">
<fieldset>
<div class="widget">... | mit |
bradlys/checkin | backend/checkin.php | 14139 | <?php
require_once 'settings.php';
require_once 'customer.php';
require_once 'organization.php';
/**
* Below are functions related to checking in and checking out customers.
* Typically, one of these two functions is called through an AJAX request,
* and it is to check in a brand new customer, check in an... | mit |
brijeshsmita/commons-spring | 15SpringCustomValidator/src/main/java/com/cg/mvc/controllers/EmployeeController.java | 2120 | package com.cg.mvc.controllers;
import java.util.HashMap;
import java.util.Map;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Controller;
impor... | mit |
BeejLuig/yt-tutorial-dashboard | db/migrate/20170420222006_remove_locked_from_videos.rb | 129 | class RemoveLockedFromVideos < ActiveRecord::Migration[5.0]
def change
remove_column :videos, :locked?, :boolean
end
end
| mit |
BinaryMuse/battlenet | lib/battlenet.rb | 30 | require 'battlenet/battlenet'
| mit |
danieljameswilliams/tabletennis-tracker | public/assets/javascripts/partials/user/_create.js | 2294 | var App = App || {};
App.SignUp = (function() {
'use strict';
var dom = {},
selectors = {
facebookLoginBtn : 'user-create__btn--facebook'
};
function initialize() {
_setupDOM();
_addEventListeners();
}
function _setupDOM() {
dom.$submit = $('.js-user-create-btn');
dom.$... | mit |
yuchan/nandacloud | chef/site-cookbooks/nandalxc/metadata.rb | 280 | name 'nandalxc'
maintainer 'YOUR_COMPANY_NAME'
maintainer_email 'YOUR_EMAIL'
license 'All rights reserved'
description 'Installs/Configures nandalxc'
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
version '0.1.0'
| mit |
KingPixil/ice | src/art/map/__init__.py | 3773 | import math
from ...loader import load
from ...color import generateColors
from ...seed import generateSeed
from ...random import random, randomNoise2DOctaves
from ...graphics import generateData, generatePoints, putColor, clearMargins, writeImage
# Generate
def generate():
# Initialize
seedText = generateSeed... | mit |
Voleking/ICPC | references/aoapc-book/BeginningAlgorithmContests/exercises/ch5/UVa575.cpp | 468 | // UVa575 Skew Binary
// Rujia Liu
// 题意:输入一个Skew Binary,转化成10进制。Skew Binary的右数第k位(k>=0)代表2^(k+1)-1
#include<cstdio>
#include<cstring>
const int maxn = 100;
int main() {
char s[maxn];
while(scanf("%s", s) == 1) {
int n = strlen(s);
if(n == 1 && s[0] == '0') break;
long long v = 0;
for(int k = 0; k... | mit |
KatharineOzil/DocPress | application/models/setting_model.php | 1089 | <?php
class Setting_model extends CI_Model {
function __construct()
{
parent::__construct();
}
function get_mail()
{
$this->db->select('value');
$this->db->from('settings');
$this->db->where('key', 'email');
$data = $this->db->get()->result();
if (!... | mit |
yenbekbay/clinic | core/lexicon/ja/category.inc.php | 2376 | <?php
/**
* Category Japanese lexicon topic
*
* @language ja
* @package modx
* @subpackage lexicon
* @author enogu http://www.kuroienogu.net/
* @author honda http://kogus.org
* @author Nick http://smallworld.west-tokyo.com
* @author shimojo http://www.priqia.com/
* @author yamamoto http://kyms.jp
*/
$_lang['... | mit |
RevansChen/online-judge | Codewars/8kyu/remove-exclamation-marks/Python/solution1.py | 74 | # Python - 3.6.0
remove_exclamation_marks = lambda s: s.replace('!', '')
| mit |
draffensperger/miletracker | db/migrate/20131101195411_change_events_html_link_to_text.rb | 127 | class ChangeEventsHtmlLinkToText < ActiveRecord::Migration
def change
change_column :events, :html_link, :text
end
end
| mit |
martinski74/SoftUni | C#_Basic/Задачи/ProgrammingBasicJuly2015/05.WiggleWigle/Properties/AssemblyInfo.cs | 1404 | 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("05... | mit |
alexnbio/test | app/DoctrineMigrations/Version20170305141309.php | 1173 | <?php
namespace Application\Migrations;
use Doctrine\DBAL\Migrations\AbstractMigration;
use Doctrine\DBAL\Schema\Schema;
/**
* Auto-generated Migration: Please modify to your needs!
*/
class Version20170305141309 extends AbstractMigration
{
/**
* @param Schema $schema
*/
public function up(Schema... | mit |
McDirty/Cup_Stacking | Assets/TextMesh Pro/Scripts/TextMeshProUGUI.cs | 40379 | // Copyright (C) 2014 - 2015 Stephan Bouchard - All Rights Reserved
// This code can only be used under the standard Unity Asset Store End User License Agreement
// A Copy of the EULA APPENDIX 1 is available at http://unity3d.com/company/legal/as_terms
// Beta Release 0.1.52 Beta 1c
#if UNITY_4_6 || UNITY_5
using Un... | mit |
QuickOrBeDead/Dynamic-Wcf-Client-Proxy | Labo.ServiceModel.Core/Utils/Reflection/DynamicMethodCompiler.cs | 5739 | using System;
using System.Globalization;
using System.Reflection;
using System.Reflection.Emit;
using Labo.ServiceModel.Core.Utils.Reflection.Exceptions;
namespace Labo.ServiceModel.Core.Utils.Reflection
{
public delegate object GetHandler(object source);
public delegate void SetHandler(object source, object... | mit |
gregmcguffey/BagOUtils | src/Guards/Messages/ItemTemplate.cs | 2086 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BagOUtils.Guards.Messages
{
/// <summary>
/// Class that defines templates that take the name of an item.
/// </summary>
public class ItemTemplate
{
//-------------... | mit |
stratton-oakcoin/oakcoin | src/qt/bitcoinstrings.cpp | 24549 |
#include <QtGlobal>
// Automatically generated by extract_strings_qt.py
#ifdef __GNUC__
#define UNUSED __attribute__((unused))
#else
#define UNUSED
#endif
static const char UNUSED *oakcoin_strings[] = {
QT_TRANSLATE_NOOP("oakcoin-core", "Oakcoin Core"),
QT_TRANSLATE_NOOP("oakcoin-core", "The %s developers"),
QT_TRAN... | mit |
jbehuet/blog-app | public/js/components/blog/blog.md.js | 1134 | /*
Create Angular module app.blog and define all states
blog : parent state, is an abstrat state too with templateUrl
blog.list : nested state of state app.blog, display blog-list component
blog.item : nested state of state app.blog, display blog-item component with editable attribute value is true
*/
((app) => {
'... | mit |
AlexandreProenca/angular-arch | app/modules/components/controllers/FileUploadController.js | 3709 | 'use strict';
define([
], function () {
var FileUploadController = function (BORAYU, $filter, $scope , $http , AuthService , Error , src , types , uri, sizeH , sizeW, ratio, $modalInstance) {
console.log('sizes' , sizeW , sizeH);
$scope.sizeH = sizeH;
$scope.sizeW = sizeW;
$scope.ratio = ratio;
... | mit |
Bokeefe/EquisiteWarps-Beta | src/Playlist.js | 21786 | import _defaults from 'lodash.defaults';
import h from 'virtual-dom/h';
import diff from 'virtual-dom/diff';
import patch from 'virtual-dom/patch';
import InlineWorker from 'inline-worker';
import { pixelsToSeconds } from './utils/conversions';
import LoaderFactory from './track/loader/LoaderFactory';
import ScrollHo... | mit |
KingYSoft/foretch | angular/src/app/home/home-test1.component.ts | 407 | import { Component, Injector, AfterViewInit, Inject } from '@angular/core';
import { Router } from '@angular/router';
import { Helpers } from 'shared/helpers/Helpers';
import { AppComponentBase } from 'shared/app-component-base';
@Component({
template: '<p>test1</p>'
})
export class HomeTest1Component extends App... | mit |
daviferreira/leticiastallone.com | leticiastallone/publications/views.py | 333 | # coding: utf-8
from django.views.generic.detail import DetailView
from .models import Article
class ArticleDetailView(DetailView):
model = Article
context_object_name = 'article'
def get_context_data(self, **kwargs):
context = super(ArticleDetailView, self).get_context_data(**kwargs)
re... | mit |
dcarrasco/inv-fija | public/js/view_stock_datos.js | 1561 | var plot,
jq_grafico = function(div_id, datos, x_label, y_label, series_label, title) {
return $.jqplot(div_id, datos, {
title: title,
animate: true,
animateReplot: true,
stackSeries: true,
captureRightClick: true,
seriesDefaults:{
renderer:$.jqplot.BarRenderer,
rendererOptions: {
hig... | mit |
Creedzy/MotionLayer | src/main/java/org/cg/service/DAOS/NotificationDAO.java | 1966 | package org.cg.service.DAOS;
import java.util.List;
import org.cg.Model.Message;
import org.cg.Model.User;
import org.cg.service.Exception.DataAccessLayerException;
import org.hibernate.HibernateException;
import org.hibernate.Query;
import org.springframework.stereotype.Service;
import org.cg.Model.*;
@Service
pub... | mit |
Dan-field/Jazz | Urlinie.py | 5550 | from MIDIInput import *
from time import sleep
from random import *
from timer import *
class Urlinie:
def __init__(self, DS=1.0):
self.DS = DS
seed = range(120)
self.contour = []
for number in seed:
self.contour.append(0)
self.slope = 0
self.semi_multipli... | mit |
kitaisreal/ToneApp | app/src/main/java/com/example/yetti/toneplayer/database/impl/DBArtistServiceImpl.java | 7405 | package com.example.yetti.toneplayer.database.impl;
import android.content.ContentValues;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import com.example.yetti.toneplayer.database.DBToneContract;
import com.example.yetti.toneplayer.database.DatabaseManager;
import com.example.yetti.t... | mit |
ChrisL1200/post-office-project | app/scripts/services/user.js | 361 | 'use strict';
angular.module('postOfficeProjectApp')
.factory('User', function ($resource) {
return $resource('/api/users/:id/:action', {
id: '@id'
}, { //parameters default
update: {
method: 'PUT',
params: {}
},
get: {
method: 'GET',
params: {
... | mit |