repo_name
stringlengths
4
116
path
stringlengths
4
379
size
stringlengths
1
7
content
stringlengths
3
1.05M
license
stringclasses
15 values
joshesp/ionic
src/navigation/nav-controller.ts
24685
import { EventEmitter } from '@angular/core'; import { Config } from '../config/config'; import { NavOptions } from './nav-util'; import { ViewController } from './view-controller'; /** * @name NavController * @description * * NavController is the base class for navigation controller components like * [`Nav`](....
mit
gmhewett/bookshelf
www/Bookshelf/Bookshelf/App_Start/Startup.WebApi.cs
1013
namespace Bookshelf { using System.Web.Http; using Microsoft.Owin.Security.OAuth; using Owin; public partial class Startup { public void ConfigureWebApi(IAppBuilder app) { HttpConfiguration.SuppressDefaultHostAuthentication(); HttpConfiguration.Filters.Add(n...
mit
noppa/ng-hot-reload
packages/core/src/component.js
2200
import angularProvider from './ng/angular'; import isPrivateKey from './ng/private-key'; import controllerDefinition from './util/controller-definition.js'; function componentProvider(moduleName) { const angular = angularProvider(), { isFunction, isArray, forEach } = angular; /** * Calls `this.directive`...
mit
Hanifah/e-fishauction
application/libraries/Ion_auth.php
13910
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); /** * Name: Ion Auth * * Version: 2.5.2 * * Author: Ben Edmunds * ben.edmunds@gmail.com * @benedmunds * * Added Awesomeness: Phil Sturgeon * * Location: http://github.com/benedmunds/CodeIgniter-Ion-Auth * * Created: 10.01.2009 * * ...
mit
rngtng/websms-ruby
lib/websms.rb
317
# require 'mechanize' #$:.unshift(File.dirname(__FILE__)) unless # $:.include?(File.dirname(__FILE__)) || $:.include?(File.expand_path(File.dirname(__FILE__))) # File.expand_path("../lib", __FILE__) require 'websms/sms' require 'websms/o2online' # require 'websms/file' # require 'websms/db' module Websms end
mit
charlescharles/mixcoin
src/mixcoin/mock_pool.go
689
package mixcoin import ( "github.com/stretchr/testify/mock" ) type MockPool struct { mock.Mock } func (p *MockPool) ReceivingKeys() []string { args := p.Mock.Called() return args.Get(0).([]string) } func (p *MockPool) Scan(k []string) []PoolItem { args := p.Mock.Called(k) return args.Get(0).([]PoolItem) } fu...
mit
thushanp/thushanp.github.io
vendor/twilio/sdk/Twilio/Rest/Api/V2010/Account/MessageContext.php
5177
<?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account; use Twilio\Exceptions\TwilioException; use Twilio\InstanceContext; use Twilio\Rest\Api\V2010\Account\Message\FeedbackList; use Twilio\Rest\Api\V201...
mit
sunyoboy/java-tutorial
java-tutorial/src/main/java/com/javase/net/jcip/examples/BetterAttributeStore.java
760
package com.javase.net.jcip.examples; import java.util.*; import java.util.regex.*; import com.javase.net.jcip.annotations.*; /** * BetterAttributeStore * <p/> * Reducing lock duration * * @author Brian Goetz and Tim Peierls */ @ThreadSafe public class BetterAttributeStore { @GuardedBy("this") private fina...
mit
ykoziy/Design-Patterns-in-Java
Decorator/GarlicSub.java
207
public class GarlicSub implements Sub { @Override public String getDescription() { return "Garlic Bread"; } @Override public double getCost() { return 4.50; } }
mit
seekinternational/seek-asia-style-guide
docs/src/components/SketchExports/fixSketchRendering/fixSketchRendering.js
3265
import styles from './fixSketchRendering.less'; export default rootEl => { // Require canvg dynamically because it can't run in a Node context const canvg = require('canvg-fixed'); // Total hack until html-sketchapp supports before and after pseudo elements // GitHub Issue: https://github.com/brainly/html-ske...
mit
danmakenoise/a_series_of_tubes
bin/example_servers/session_usage.rb
501
require 'rack' require_relative '../../lib/tube_controller.rb' APP_DIRECTORY = './bin/example_servers' APP_NAME = 'counting' class CountController < TubeController def go session["count"] ||= 0 session["count"] += 1 render :counting_show end end server_app = Proc.new do |env| request = Rack::Reques...
mit
lucasprograms/js-chess
src/app/pieces/queen.js
322
(function () { if (typeof Chess === "undefined") { window.Chess = {}; } var Queen = Chess.Queen = function(color, pos, type) { Chess.Slideable.call(this, color, pos, type); this.moveDirs = Chess.Slideable.DIAG_DIRS.concat(Chess.Slideable.HZ_AND_VT_DIRS); }; Queen.inherits(Chess.Slideable); })()...
mit
andikanugraha11/CI-Dasar
application/models/Api_model.php
477
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); /** * */ class Api_model extends CI_Model { public function hitungMember() { return $this->db->count_all_results('member'); } public function getMember($size,$page) { return $this->db->get('mahasiswa', $size, $page);...
mit
kuddai/EstateAgency
app/js/directives/askiEllipsis.js
3376
/* @name: askEllipsis @description: It is angular wrapper above jquery plugin dotdotdot (http://dotdotdot.frebsite.nl/). It is used to cut long text and replace extra text with ... aski-ellipsis attribute syntax should be "scope_var" or "{scope_var} in {css_query_of_parent_container}" where scope_var is ...
mit
bichbich/Famicity2
src/MyAppBundle/Entity/User.php
458
<?php namespace MyAppBundle\Entity; use FOS\UserBundle\Model\User as BaseUser; use Doctrine\ORM\Mapping as ORM; /** * @ORM\Entity * @ORM\Table(name="fos_user") */ class User extends BaseUser { /** * @ORM\Id * @ORM\Column(type="integer") * @ORM\GeneratedValue(strategy="AUTO") ...
mit
lupascugabrielcristian/PubMeWeb
Mobile/www/js/controllers/home.controller.js
236
var HomeCtrl = function ($scope, user) { $scope.var = "Home Controller ok"; $scope.userLoggedIn = user.isLoggedIn(); }; HomeCtrl.$inject = ['$scope', 'user']; angular.module('starter.controllers').controller('HomeCtrl', HomeCtrl);
mit
karim/adila
database/src/main/java/adila/db/degasvelte_sm2dt2397.java
254
// This file is automatically generated. package adila.db; /* * Samsung Galaxy Tab 4 7.0 * * DEVICE: degasvelte * MODEL: SM-T2397 */ final class degasvelte_sm2dt2397 { public static final String DATA = "Samsung|Galaxy Tab 4 7.0|Galaxy Tab"; }
mit
NetOfficeFw/NetOffice
Source/Excel/Interfaces/ITableStyles.cs
7639
using System.Collections; using System.Collections.Generic; using System; using NetRuntimeSystem = System; using System.ComponentModel; using NetOffice.Attributes; using NetOffice.CollectionsGeneric; namespace NetOffice.ExcelApi { /// <summary> /// Interface ITableStyles /// SupportByVersion Excel, 12,14,15,16 /...
mit
liuycsd/bypy
bypy/gvar.py
875
#!/usr/bin/env python # encoding: utf-8 # PYTHON_ARGCOMPLETE_OK # from __future__ imports must occur at the beginning of the file from __future__ import unicode_literals from __future__ import print_function from __future__ import division import locale import time from . import const ## global variables SystemLangu...
mit
wix/wix-style-react
packages/wix-style-react/src/Breadcrumbs/Breadcrumbs.driver.d.ts
567
import { BaseDriver } from 'wix-ui-test-utils/driver-factory'; export interface BreadcrumbsDriver extends BaseDriver { breadcrumbsLength: () => number; breadcrumbContentAt: (position: number) => string | null; clickBreadcrumbAt: (position: number) => any; getActiveItemId: () => number | null; isLarge: () => ...
mit
lutsykigor/Perfectial.EntityFramework.Enterprise.Sample
packages/Portable.DataAnnotations.1.0.0/src/Portable.DataAnnotations.Net45Portable/ValidationAttributes/Schema/DatabaseGeneratedOption.cs
608
namespace System.ComponentModel.DataAnnotations.Schema { /// <summary> /// The pattern used to generate values for a property in the database. /// </summary> public enum DatabaseGeneratedOption { /// <summary> /// The database does not generate values. /// </summary> ...
mit
MayaKaka/cartoonjs
src/shapes/Rect.js
655
define(function (require) { 'use strict'; var Shape = require('shapes/Shape'); var Rect = Shape.extend({ type: 'Rect', draw: function(ctx) { var hasFill = this.setFill(ctx), hasStroke = this.setStroke(ctx); // 绘制矩形 ctx.beginPath(); ctx.rect(0, 0, this.wid...
mit
ianunruh/fountain
spec/support/envelope_shared.rb
1355
shared_examples 'an envelope' do describe '#headers' do it 'acts like Hash' do expect(subject.headers).to be_a(Hash) end end describe '#timestamp' do it 'acts like Time' do expect(subject.timestamp).to be_a(Time) end end describe '#and_headers' do it 'returns a duplicate enve...
mit
GreanTech/Exude
Src/Exude.UnitTests/Scenario.cs
2742
using System; using System.Collections.Generic; using System.Linq; using System.Text; using Xunit; namespace Grean.Exude.UnitTests { public class Scenario { [FirstClassTests] public static IEnumerable<ITestCase> YieldFirstClassTests() { yield return new TestCase(_ => Assert...
mit
ddsc/webclient
app/scripts/lizard/collections/Annotation.js
98
Lizard.Collections.Annotation = Backbone.Collection.extend({ model: Lizard.Models.Annotation });
mit
henzk/schnipp.js
src/schnipp/dynforms/fields/hiddeninput.js
847
/** * hiddeninput field * * @param {Object} field_descriptor field specific part of the form schema * @param {Object} field_data initial value for the field * @constructor * @class schnipp.dynforms.fields.hiddeninput * @extends schnipp.dynforms.primitive_field **/ schnipp.dynforms.fields.hiddeninput = function(...
mit
suzdalnitski/Zenject
UnityProject/Assets/Plugins/Zenject/OptionalExtras/UnitTests/Editor/Injection/TestStructInjection.cs
749
using System; using System.Collections.Generic; using Zenject; using NUnit.Framework; using ModestTree; using Assert=ModestTree.Assert; namespace Zenject.Tests.Injection { [TestFixture] public class TestStructInjection : ZenjectUnitTestFixture { struct Test1 { } class Test2...
mit
markovandooren/rejuse
src/main/java/org/aikodi/rejuse/association/Association.java
11238
package org.aikodi.rejuse.association; import java.util.Collection; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; /** * <p>A class of objects that can be used to set up bi-directional association between objects.</p> * * <center><img src="doc...
mit
ajatdarojat45/sppi
application/views/pr/list.php
17597
<!-- Content Wrapper. Contains page content --> <div class="content-wrapper"> <!-- Content Header (Page header) --> <section class="content-header"> <h1> <small></small> </h1> <ol class="breadcrumb"> <li><a href="<?php echo base_url();?>auth/dashboard"><i class="fa fa-dashb...
mit
jibanez74/BusinessPanel
src/app/guards/settings.guard.ts
559
import { Injectable } from '@angular/core'; import { SettingsService } from '../services/settings.service'; import { Router, CanActivate } from '@angular/router'; @Injectable () export class SettingsGuard implements CanActivate { constructor ( private _router: Router, public _settings: SettingsSer...
mit
chribi/predictable
app/src/main/java/de/chribi/predictable/startscreen/StartScreenView.java
213
package de.chribi.predictable.startscreen; import de.chribi.predictable.PredictionItemView; public interface StartScreenView extends PredictionItemView, ShowMoreFooterView { void showAddPredictionView(); }
mit
olamedia/yuki
experiments/model/document/yDocumentModel.php
1415
<?php /* * To change this template, choose Tools | Templates * and open the template in the editor. */ /** * yDocumentModel * * @package yuki * @subpackage model * @author olamedia * @license http://www.opensource.org/licenses/mit-license.php MIT */ class yDocumentModel{ const primaryKey = 'primaryK...
mit
nnaabbcc/exercise
python/plot/exercise_subplot_1.py
488
#!/usr/bin/env python #!encoding=utf-8 import matplotlib.pyplot as plt import numpy as np def f(t): return np.exp(-t) * np.cos(2 * np.pi * t) if __name__ == '__main__' : t1 = np.arange(0, 5, 0.1) t2 = np.arange(0, 5, 0.02) plt.figure(1) plt.subplot(2, 2, 1) plt.plot(t1, f(t1), 'bo', t2, f(t2...
mit
earwig/earwigbot
earwigbot/wiki/copyvios/parsers.py
14045
# -*- coding: utf-8 -*- # # Copyright (C) 2009-2019 Ben Kurtovic <ben.kurtovic@gmail.com> # # 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 ...
mit
logankoester/tweetshrink
spec/spec_helper.rb
129
require 'spec' $LOAD_PATH.unshift(File.dirname(__FILE__)) require 'lib/tweetshrink' Spec::Runner.configure do |config| end
mit
Azure/azure-sdk-for-go
services/compute/mgmt/2021-04-01/compute/virtualmachineruncommands.go
29124
package compute // 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 cause incorrect behavior and will be lost if the code is regenerated...
mit
spokanelibrary/spl-widgets
class/SPL_Widget_Home_Page.php
45845
<?php class SPL_Widget_Home_Page extends SPL_Widget { var $id; var $ttl = 600; // cache ttl in seconds (0=noexpiry, so set to 1 for testing) var $kiosk; var $title; var $subtitle; var $thumb = 'large'; var $hover = 'false'; // 'false' or 'hover' var $limit = 16; var $params; var $slides; function __cons...
mit
voxsoftware/icevw
org/vox/icevw/server/assets/js/require.js
6609
/******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ // Check if module is in cache /******/ if(installedModules[moduleId]) /******/ return installedModu...
mit
jthiv/OccupyTheSystem
application/views/dashboard/inbox.php
1737
<?PHP $arrStanceRequests = $this->stanceRequests; echo "<h2>Inbox</h2>"; echo "<hr>"; echo "<div id='inbox_wrapper'>"; echo "<div id='inbox_network' class='inbox'>"; echo "<span class='title'><p>Your Network</p></span>"; echo "<em>-Coming Soon-</em>"; echo "</div>"; echo "<div id='inbox_stanceReque...
mit
Pangv/verein
verein/src/de/lebk/verein/event/EventInfoDialog.java
1605
package de.lebk.verein.event; import de.lebk.verein.login.Auth; import de.lebk.verein.member.Member; import javax.swing.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; /** * @author sopaetzel */ class EventInfoDialog extends JDialog { private Event event; private JButton btnDel...
mit
benstuijts/darkage-framework
server/config/unit/simple_soldier.js
454
'use strict'; const Graphic = require("../../ECS/components/Graphic"); const Meta = require("../../ECS/components/Meta"); module.exports = [ Graphic({ type: "sprite", image: { "idle": { src: "./images/worldmap/unit/legereenheid.png", width: 48, height: 48, ...
mit
PeqNP/GameKit
specs/royal.client_spec.lua
11356
-- -- TODO: -- ? Fix: Make sure the sprite frames are not loaded into the cache until ALL files are downloaded. -- require "lang.Signal" require "specs.Cocos2d-x" require "Logger" require "HTTPResponseType" Log.setLevel(LogLevel.Severe) local HTTP = require("shim.HTTP") local Promise = require("Promise") local AdConf...
mit
bitrise-io/steps-new-xcode-test
simulator/simulator_test.go
3794
package simulator import ( "fmt" "os" "path/filepath" "testing" mockcommand "github.com/bitrise-steplib/steps-xcode-test/mocks" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" ) type testingMocks struct { commandFactory *mockcommand.CommandFactory } func Test_GivenSimulator_WhenReset...
mit
cdnjs/cdnjs
ajax/libs/venn.js/0.2.11/venn.js
65291
(function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('d3-selection'), require('d3-transition')) : typeof define === 'function' && define.amd ? define(['exports', 'd3-selection', 'd3-transition'], factory) : factory((global.venn = {}),global.d3...
mit
mrloop/elgincc_engine
test/dummy/config/routes.rb
89
Rails.application.routes.draw do mount ElginccEngine::Engine => "/elgincc_engine" end
mit
StefftheEmperor/3rei
Request/Classes/Rewrite/Params.php
161
<?php /** * Created by PhpStorm. * User: stefan * Date: 31.07.16 * Time: 14:45 */ namespace Request\Classes\Rewrite; class Params extends Attributes { }
mit
laurentkempe/HipChatConnect
src/HipChatConnect/Controllers/Listeners/TeamCity/HipChatActivityCardData.cs
2817
using System; namespace HipChatConnect.Controllers.Listeners.TeamCity { public class HipChatActivityCardData { public HipChatActivityCardData() { Id = Guid.NewGuid().ToString(); } private string Id { get; } public string ActivityIconUrl { get; set; } ...
mit
adamshaylor/complex-spa-architectures
hateoas/config/routes.js
2818
/** * Route Mappings * (sails.config.routes) * * Your routes map URLs to views and controllers. * * If Sails receives a URL that doesn't match any of the routes below, * it will check for matching files (images, scripts, stylesheets, etc.) * in your assets directory. e.g. `http://localhost:1337/images/foo.jpg`...
mit
react-skg/meetup
src/presentations/reactDay/reactRedux/index.js
58
export { default as ReactRedux } from './reactRedux.jsx';
mit
wikitree-website/wikitree-page
docs/build/app.js
127013
function EditPopover(containerEl, scope, node) { var self = this; // properties self.containerEl = containerEl; self.scope = scope; self.node = node; self.$el = undefined; self.$name = undefined; self.$body = undefined; self.width = undefined; self.height = undefined; self.h...
mit
wktk/rpxem
lib/rpxem/stack.rb
869
module RPxem class Stack < Array def initialize(*args, &block) super(*args, &block) simple_check(*self) end def push(*args, &block) simple_check(*args) super(*args, &block) end def unshift(*args, &block) simple_check(*args) super(*args, &block) end de...
mit
eltonjuan/eureka-js-client
test/eureka-client.test.js
7859
import sinon from 'sinon'; import {expect} from 'chai'; import {Eureka} from '../src/eureka-client'; describe('Eureka client', () => { describe('Eureka()', () => { it('should throw an error if no config is found', () => { function fn() { return new Eureka(); } expect(fn).to.throw(); ...
mit
bkahlert/seqan-research
raw/pmsb13/pmsb13-data-20130530/sources/fjt74l9mlcqisdus/2013-05-06T11-56-23.922+0200/sandbox/my_sandbox/apps/blastX/test_file.cpp
8222
// BLASTX IMPLEMENTIERUNG VON ANNKATRIN BRESSIN UND MARJAN FAIZI // SOFTWAREPROJEKT VOM 2.4. - 29.5.2012 // VERSION VOM 04.MAI.2013 #undef SEQAN_ENABLE_TESTING #define SEQAN_ENABLE_TESTING 1 #include "own_functions.h" // TEST HASH FUNKTION ------------------------------------------------------------------...
mit
true7/oleg_diatlenko_test_pj
src/notes/forms.py
571
from django import forms from django.forms import ModelForm from .models import Note class NoteForm(ModelForm): title = forms.CharField( label='', widget=forms.TextInput( attrs={'class': "form-control", 'placeholder': 'Title...'} ) ) content = forms.CharField( ...
mit
isudox/leetcode-solution
python-algorithm/leetcode/problem_70.py
776
"""70. Climbing Stairs https://leetcode.com/problems/climbing-stairs/ You are climbing a stair case. It takes n steps to reach to the top. Each time you can either climb 1 or 2 steps. In how many distinct ways can you climb to the top? Note: Given n will be a positive integer. Example 1: Input: 2 Output: 2 Explana...
mit
ThanhKhoaIT/ants_admin
lib/ants_admin/smart_model.rb
215
module AntsAdmin module SmartModel # def self.initialize(model_string) # @model_string = model_string # end # # def apply_admin? # defined?(@model_string::APPLY_ADMIN) # end end end
mit
szszss/MigoCraft
net/hakugyokurou/migocraft/block/BlockRasa.java
1286
package net.hakugyokurou.migocraft.block; import java.util.Random; import net.hakugyokurou.migocraft.Migocraft; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.util.AxisAlignedBB; import net.minecraft.world.World; //TODO:写一个好的Javadoc /** * Ellen said ...
mit
vladislav-karamfilov/TelerikAcademy
C# II Projects/Homework-TextFiles/2. ConcatenatingTwoTextFiles/Properties/AssemblyInfo.cs
1432
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("2....
mit
hypnoglow/helm-s3
internal/helmutil/helm_v2.go
852
package helmutil // This file contains helpers for helm v2. import ( "os" "k8s.io/helm/pkg/helm/environment" "k8s.io/helm/pkg/helm/helmpath" "k8s.io/helm/pkg/repo" ) // setupHelm2 sets up environment and function bindings for helm v2. func setupHelm2() { helm2Home = resolveHome() helm2LoadRepoFile = repo.Load...
mit
ArkEcosystem/ark-desktop
src/renderer/services/synchronizer.js
7542
import { pullAll } from 'lodash' import { flatten } from '@/utils' import { announcements, fees, ledger, market, peer, wallets } from './synchronizer/' /** * This class adds the possibility to define actions (not to confuse with Vuex actions) * that could be dispatched using 2 modes: `default` and `focus`. * * Each...
mit
archimatetool/archi
org.eclipse.gef/src/org/eclipse/gef/CompoundSnapToHelper.java
2109
/******************************************************************************* * Copyright (c) 2003, 2010 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, an...
mit
k-takam/simple-text-translator
src/scripts/containers/menu-container.js
504
import React from 'react'; import { connect } from 'react-redux'; import Menu from '../components/menu'; import { openModal } from '../actions'; const mapStateToProps = (state) => { return { outputText: state.text.outputText }; }; const mapDispatchToProps = (dispatch) => { return { openModal: (type, mod...
mit
francois/family
src/main/scala/teksol/mybank/domain/events/InterestPosted.scala
668
package teksol.mybank.domain.events import java.time.LocalDate import java.time.format.DateTimeFormatter import teksol.domain.FamilyId import teksol.infrastructure.{Event, ToJson} import teksol.mybank.domain.models.{AccountId, Amount, EntryId} import scala.language.implicitConversions case class InterestPosted(fami...
mit
pkgodara/Rocket.Chat
packages/rocketchat-livechat/server/methods/removeRoom.js
961
import { Meteor } from 'meteor/meteor'; Meteor.methods({ 'livechat:removeRoom'(rid) { if (!Meteor.userId() || !RocketChat.authz.hasPermission(Meteor.userId(), 'remove-closed-livechat-rooms')) { throw new Meteor.Error('error-not-allowed', 'Not allowed', { method: 'livechat:removeRoom' }); } const room = Rock...
mit
maicoin/maicoin-java
src/main/java/com/maicoin/api/entity/Checkouts.java
1086
package com.maicoin.api.entity; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.maicoin.api.converter.CheckoutConverter; import java.util.List; /** * Created by yutelin on 1/12/15. */ public class Checkouts extends Entity { private int _count; private int _currentPage; priv...
mit
casual-web/autodom
src/AppBundle/Form/QuotationRequestType.php
1840
<?php namespace AppBundle\Form; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\OptionsResolver\OptionsResolverInterface; use AppBundle\Entity\QuotationRequest; use Symfony\Component\Form\FormEvent; use Symfony\Component\Form\FormEvents; class Quotati...
mit
tamouse/wp_conversion
spec/wp_conversion/xml_to_hash_spec.rb
1090
module WpConversion describe "#xml_to_hash method" do it {WpConversion.should respond_to :xml_to_hash} context "converting xml" do let(:xml){'<?xml version="1.0"?><catalog><book id="bk001"><author>Gaiman, Neil</author><title>The Graveyard Book</title><genre>Fantasy</genre></book><book id="bk002"><auth...
mit
veratulips/OMOOC2py
_src/om2py3w/3wex0/diaryServer.py
1040
# -*- coding:utf8 -*- import socket import os # 建立协议,当client发送退出信号,返回日记历史信息 quitwd = 'q' def response(s,data,addr): if data == 'q': f = open('diary.txt') msg = f.read() f.close() print msg s.sendto(msg,addr) print 'send back to',addr,'and quit' else: ...
mit
GDGJihlava/gdg-coding-dojo-jihlava
009-refactoring/solution-oop/src/main/java/cz/unittest/exercises/ItemFactory.java
594
package cz.unittest.exercises; public class ItemFactory { public static ItemAbstract createItem(String name, int sellIn, int quality) { if (name.equals("Sulfuras, Hand of Ragnaros")) { return new ItemImmutable(name, sellIn, quality); } else if (name.equals("Aged Brie")) { re...
mit
lonelyplanet/backpack-ui
src/utils/time.js
470
export default function duration(ms) { ms = ms || 0; let remainingSeconds = ms / 1000; const h = Math.floor(remainingSeconds / (60 * 60)); remainingSeconds -= h * 60 * 60; const m = Math.floor(remainingSeconds / 60); remainingSeconds -= m * 60; const s = Math.floor(remainingSeconds % 60); let formatte...
mit
nmapx/inidister
src/Nmapx/Inidister/Domain/Writer/Writer.php
161
<?php declare(strict_types=1); namespace Nmapx\Inidister\Domain\Writer; interface Writer { function writeToFile(string $filepath, string $data): Writer; }
mit
robustly/robust-log
examples/basic-logging.js
221
var log = require('../lib')('elk') log('starting process 1.') log('initiating feeds') log.warn('detected anomoly.') try { test.this.throws } catch (err) { log(err) } log.error('Error occurred during process 1.')
mit
gauravparashar29/exambazaar
app/emails.js
170746
//var nodemailer = require('nodemailer'); var express = require('express'); var router = express.Router(); var email = require('../app/models/email'); var exam = require('../app/models/exam'); var eqad = require('../app/models/eqad'); var eqadsubscription = require('../app/models/eqadsubscription'); var user = require...
mit
schneidmaster/action-cable-react
dist/cable_mixin.js
740
var CableMixin;CableMixin=function(t){return{componentWillMount:function(){var t;if(!(this.props.cable||this.context&&this.context.cable))throw t=this.constructor.displayName?" of "+this.constructor.displayName:"",new Error("Could not find cable on this.props or this.context"+t)},childContextTypes:{cable:t.PropTypes.ob...
mit
geek/tribute
spatula/step15.js
2906
/// boards handler /// // Load modules var Joi = require('joi'); // Declare internals var internals = {}; module.exports = { validate: { params: { id: Joi.number() } }, handler: function (request, reply) { // Remember that we bound settings to this var set...
mit
AlphaHydrae/multi_redis
lib/multi_redis.rb
677
require 'redis' module MultiRedis VERSION = '0.3.0' class << self attr_accessor :redis end def self.execute *args, &block options = args.last.kind_of?(Hash) ? args.pop : {} executor = nil @mutex.synchronize do @executor = Executor.new options args.each{ |op| @executor.add op } ...
mit
artemshitov/myfonts
spec/face_spec.rb
683
# encoding: utf-8 require 'spec_helper' require 'myfonts/face' describe MyFonts::Face do before :all do @face = MyFonts::Face.new("http://www.myfonts.com/fonts/letterheadrussia/21-cent/cond-ultra-light-ital/") end around do |test| VCR.use_cassette "21Cent-Cond-Ultra-Light-Ital" do test.run en...
mit
kangaroo/coreclr
src/jit/codegenxarch.cpp
251951
// // Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. // /*XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XX...
mit
LinogeFly/DistanceTracker
src/DistanceTracker.Web/API/ViewModel/Point.cs
253
using Newtonsoft.Json; using System; using System.Collections.Generic; using System.Linq; namespace DistanceTracker.API.ViewModel { public class Point { public double Lat { get; set; } public double Lng { get; set; } } }
mit
ZKasica/Planet-Generator
html/src/zk/planet_generator/client/HtmlLauncher.java
662
package zk.planet_generator.client; import com.badlogic.gdx.ApplicationListener; import com.badlogic.gdx.backends.gwt.GwtApplication; import com.badlogic.gdx.backends.gwt.GwtApplicationConfiguration; import zk.planet_generator.PlanetGeneratorGame; public class HtmlLauncher extends GwtApplication { @Override ...
mit
sd-f/orbi
Orbi-Server/src/main/java/foundation/softwaredesign/orbi/persistence/repo/game/gameobject/GameObjectTypeMappper.java
2265
package foundation.softwaredesign.orbi.persistence.repo.game.gameobject; import foundation.softwaredesign.orbi.model.game.gameobject.GameObjectType; import foundation.softwaredesign.orbi.persistence.entity.GameObjectTypeEntity; import org.apache.deltaspike.data.api.mapping.SimpleQueryInOutMapperBase; import static ja...
mit
agungsurya03/SIMPI
application/views/content/kurikulum/v_tambah_detilhari.php
876
<!DOCTYPE html> <html> <head> <title></title> </head> <body> <?php echo form_open('c_RKH/tambahDetilHari'); ?> <input type="hidden" name="id_hari" value="<?php echo $id_hari ?>"> <select name="id_jenis_keg"> <?php foreach ($jeniskeg as $row): ?> <option value="<?php echo $row->id_jenis_keg; ?>"><?php echo $row->jen...
mit
SunilWang/koa-server-timestamp
index.js
1616
/*! * koa-server-timestamp * Copyright(c) 2017-2017 Sunil Wang * MIT Licensed */ /** * Module exports. * @public */ module.exports = serverTimestamp; /** * Format timestamp, returns defaults to timestamp * * ex: * * function format(timestamp) { * let now = new Date(timestamp); * let year = now.ge...
mit
fvm/slackey
service/src/main/java/com/github/fvm/slackey/service/api/v1/commands/slash/domain/SlashResponse.java
302
package com.github.fvm.slackey.service.api.v1.commands.slash.domain; import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder; import lombok.experimental.SuperBuilder; @SuperBuilder public abstract class SlashResponse { @JsonPOJOBuilder public static abstract class Builder { } }
mit
cybersonic/org.cfeclipse.cfml
src/org/cfeclipse/cfml/editors/contentassist/DefaultAssistAttributeState.java
4931
/* * Created on Sep 22, 2004 * * The MIT License * Copyright (c) 2004 Oliver Tupman * * 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 ...
mit
coltjones/sudoku
sudoku.class.php
11387
<?php class sudoku extends grid { public function __construct () { //Initialize our seed state $this->seeded = FALSE; //Initialize hidden singles $this->hiddenSingles = 0; //Create an array of 9 elements starting at 1 all NULL values $grids = array_fill(1,9,NULL); ...
mit
fymfym/SharpTask
src/Framework/SharpTaskExecuterService/Program.cs
425
using System.ServiceProcess; namespace SharpTaskExecuterService { static class Program { /// <summary> /// The main entry point for the application. /// </summary> public static void Main() { var servicesToRun = new ServiceBase[] { ...
mit
georgikostadinov/find-your-university
FindYourUniversity/Data/FindYourUniversity.Data.Models/ImageDocument.cs
481
namespace FindYourUniversity.Data.Models { using FindYourUniversity.Data.Common.Models; public class ImageDocument : DeletableEntity { public int Id { get; set; } public byte[] Image { get; set; } public int ApplicationDocumentTypeId { get; set; } public virtual Application...
mit
surli/spinefm
spinefm-restfuncDSL-root/restfuncDSL/src/fr/unice/spinefm/scoping/RestfuncDSLScopeProvider.java
340
/* * generated by Xtext */ package fr.unice.spinefm.scoping; /** * This class contains custom scoping description. * * see : http://www.eclipse.org/Xtext/documentation.html#scoping * on how and when to use it * */ public class RestfuncDSLScopeProvider extends org.eclipse.xtext.scoping.impl.AbstractDeclarativ...
mit
adjohnson916/verb
verbfile.js
132
'use strict'; var verb = require('./'); verb.task('default', function() { verb.src('.verb*.md') .pipe(verb.dest('./')); });
mit
tectronics/paradice9
test/telnet_server_option_fixture.cpp
52537
#include "telnet_server_option_fixture.hpp" #include "odin/telnet/server_option.hpp" #include "odin/telnet/input_visitor.hpp" #include "odin/telnet/protocol.hpp" #include "odin/telnet/stream.hpp" #include "odin/telnet/negotiation_router.hpp" #include "odin/telnet/subnegotiation_router.hpp" #include "fake_datastr...
mit
markovandooren/chameleon
src/org/aikodi/chameleon/core/namespace/NamespaceElement.java
245
package org.aikodi.chameleon.core.namespace; //package be.kuleuven.cs.distrinet.chameleon.core.namespace; // //import be.kuleuven.cs.distrinet.chameleon.core.element.Element; // //public interface NamespaceElement extends Element { // // //}
mit
arkbriar/nju_ds_lab2
cli/utils/hash_file_md5.go
468
package utils import ( "crypto/md5" "encoding/hex" "io" "os" ) func HashFileMD5(filePath string) (string, error) { var returnMD5String string file, err := os.Open(filePath) if err != nil { return returnMD5String, err } defer file.Close() hash := md5.New() if _, err := io.Copy(hash, file); err != nil { ...
mit
zdrjson/DDKit
Algorithm/UniqueMorseCodeWords.java
661
// Solution: HashTable // Time complexity: O(n) // Space complexity: O(n) class Solution { public int uniqueMorseRepresentations(String[] words) { String[] m = {".-","-...","-.-.","-..",".","..-.","--.","....","..",".---","-.-",".-..","--","-.","---",".--.","--.-",".-.","...","-","..-","...-",".--","-..-","...
mit
haikentcode/haios
haios/distance/__init__.py
32
def msg(): print "distance"
mit
extendssoftware/ExtendsFramework
tests/unit/Application/Router/Route/Constraint/Validator/String/UuidValidatorTest.php
1190
<?php namespace ExtendsFramework\Application\Router\Route\Constraint\Validator\String; class UuidValidatorTest extends \PHPUnit_Framework_TestCase { /** * @covers \ExtendsFramework\Application\Router\Route\Constraint\Validator\String\UuidValidator::validate() */ public function testCanValidateUuidVa...
mit
rabchev/output-panel
nls/root/strings.js
647
// English - root strings /*jslint vars: true, plusplus: true, devel: true, nomen: true, indent: 4, maxerr: 50 */ /*global define */ define({ "LBL_OK" : "OK", "LBL_CANCEL" : "Cancel", "LBL_TITLE" : "Output Panel Options", "LBL_BUFF_SIZE" ...
mit
DiscipleD/blog
src/client/components/post/post-header/index.ts
558
/** * Created by jack on 16-4-27. */ import Vue from 'vue'; import Component from 'vue-class-component'; import './style.scss'; import template from './post-header.html'; import _defaultImg from '@/assets/img/tags-bg.jpg'; @Component({ props: { boardImg: { type: String, default: _defaultImg, }, title:...
mit
Azure/azure-sdk-for-python
sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_web_categories_operations.py
7844
# 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
awesome1888/horns.template
tests/js/tests.js
8054
'use strict'; window.Tests = { getHelpers: function() { return { quote: function(arg){ return '&laquo;'+arg+'&raquo;'; }, implodeArgs: function(){ return Array.prototype.slice.call(arguments).join(', '); }, implode: function(arg){ return arg.join(', '); }, ucFirst: function(arg){ ...
mit