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 |
|---|---|---|---|---|---|
package hudson.util;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
/**
* Adds more to commons-io.
*
* @author Kohsuke Kawaguchi
* @since 1.337
*/
public class IOUtils extends org.apache.co... | vivek/hudson | core/src/main/java/hudson/util/IOUtils.java | Java | mit | 1,790 |
<?xml version="1.0" ?><!DOCTYPE TS><TS language="it" version="2.0">
<defaultcodec>UTF-8</defaultcodec>
<context>
<name>AboutDialog</name>
<message>
<location filename="../forms/aboutdialog.ui" line="+14"/>
<source>About stripecoin</source>
<translation>Info su stripecoin</translation>
... | stripecoin/stripecoin | src/qt/locale/bitcoin_it.ts | TypeScript | mit | 116,607 |
#include <iostream>
#include <stddef.h>
#include <fitsio.h>
#include <fitsio2.h>
#include <longnam.h>
#include "leastsq.h"
#include <cmath>
/*
*/
using namespace std;
// error handling
void printerror( int status)
{
/*****************************************************/
/* Print out cfitsio error mess... | deapplegate/wtgpipeline | sfdir/expand_cosmics_mask.cc | C++ | mit | 6,037 |
package com.lanceolata.leetcode;
public class Question_0082_Remove_Duplicates_from_Sorted_List_II {
// Definition for singly-linked list.
public class ListNode {
int val;
ListNode next;
ListNode(int x) {
val = x;
next = null;
}
}
public ListNode ... | Lanceolata/code-problems | java/src/main/java/com/lanceolata/leetcode/Question_0082_Remove_Duplicates_from_Sorted_List_II.java | Java | mit | 901 |
/*
* Squidex Headless CMS
*
* @license
* Copyright (c) Squidex UG (haftungsbeschränkt). All rights reserved.
*/
import { Directive, EmbeddedViewRef, Input, OnChanges, OnDestroy, OnInit, SimpleChanges, TemplateRef, ViewContainerRef } from '@angular/core';
@Directive({
selector: '[sqxTemplateWrapper]',
})
expo... | Squidex/squidex | frontend/src/app/framework/angular/template-wrapper.directive.ts | TypeScript | mit | 1,495 |
using System.Collections.Generic;
using System.Threading.Tasks;
using Majorsilence.MediaService.Dto;
namespace Majorsilence.MediaService.RepoInterfaces
{
public interface IMediaFileInfoRepo
{
Task<IEnumerable<MediaFileInfo>> SearchAsync(long id);
}
} | majorsilence/MediaService | Majorsilence.MediaService.RepoInterfaces/IMediaFileInfoRepo.cs | C# | mit | 284 |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
namespace DDZProj
{
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
Appl... | flysnoopy1984/DDZ_Live | DDZProj/Program.cs | C# | mit | 477 |
<?php
namespace Vicus\Controller;
/**
* Description of ErrorContorller
*
* @author Michael Koert <mkoert at bluebikeproductions.com>
*/
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\Exception\FlattenException;
class ErrorController
{
public function indexAction(FlattenExceptio... | opensourcerefinery/vicus | src/Controller/ErrorController.php | PHP | mit | 915 |
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using BackEnd;
namespace Assignment5
{
//types aliasing
using S = BackEnd.Student<long>;
usi... | Mooophy/158212 | Assignment5/Assignment5/MainForm.cs | C# | mit | 10,271 |
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;
namespace LinqToTwitter
{
public partial class TwitterContext
{
/// <summary>
/// Adds a user subscription to specified webhook
/// </summary>
/// <param... | JoeMayo/LinqToTwitter | src/LinqToTwitter5/LinqToTwitter.Shared/AccountActivity/TwitterContextAccountActivityCommands.cs | C# | mit | 6,813 |
<?php
namespace Acme\BookBundle\Tests\Controller;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
class AuthorControllerTest extends WebTestCase
{
/*
public function testCompleteScenario()
{
// Create a new client to browse the application
$client = static::createClient();
/... | okovalov/alexbookstore | src/Acme/BookBundle/Tests/Controller/AuthorControllerTest.php | PHP | mit | 1,800 |
from matplotlib import pyplot as plt
import seaborn as sns
import pandas as pd
from ..ml.linear_algebra import distmat
def scatter_2d(orig_df: pd.DataFrame, colx, coly, label_col,
xmin=None, xmax=None, ymin=None, ymax=None):
"""
Return scatter plot of 2 columns in a DataFrame, taking labels as ... | Seiji-Armstrong/seipy | seipy/plots_/base.py | Python | mit | 875 |
package ita8
// Constants
var (
ClipboardPath = "clipboard"
OpenPath = "open"
)
| yushi/ita8 | ita8.go | GO | mit | 88 |
module PettanrPublicDomainV01Licenses
VERSION = "0.1.11"
end
| yasushiito/pettanr_pd_v01_licenses | lib/pettanr_public_domain_v01_licenses/version.rb | Ruby | mit | 63 |
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Net.Http.Headers;
namespace ContosoUniversity.WebApi.Areas.HelpPage
{
/// <summary>
/// This is used to identify the place where the sample should be applied.
/// </summary>
public class HelpPageSampleKey
{
... | ChauThan/WebApi101 | src/ContosoUniversity.WebApi/Areas/HelpPage/SampleGeneration/HelpPageSampleKey.cs | C# | mit | 6,488 |
module ActiveRecord
# = Active Record Autosave Association
#
# AutosaveAssociation is a module that takes care of automatically saving
# associated records when their parent is saved. In addition to saving, it
# also destroys any associated records that were marked for destruction.
# (See #mark_for_destruct... | tijwelch/rails | activerecord/lib/active_record/autosave_association.rb | Ruby | mit | 19,240 |
/**
* clientCacheProvider
**/
angular.module('providers')
.provider('clientCacheProvider', function ClientCacheProvider($state, clientCacheService) {
console.log(clientCacheService)
console.log(clientCacheService.logout());
var forceLogin = false;
this.forceLogin = function(clientCacheService) {
... | evoila/cf-spring-web-management-console | frontend/app/js/providers/general/clientCacheProvider.js | JavaScript | mit | 407 |
<!-- Main Header -->
<header class="main-header">
<!-- Logo -->
<a href="/admin" class="logo">
<!-- mini logo for sidebar mini 50x50 pixels -->
<span class="logo-mini"><b>C</b>MS</span>
<!-- logo for regular state and mobile devices -->
<span class="logo-lg"><b>The</b>CMS</span>
</a>... | SergeyOlifir/The-CMS-2.0 | fuel/app/views/admin/main/header.php | PHP | mit | 6,499 |
/* tslint:disable */
/* eslint-disable */
// @ts-nocheck
import { ReaderFragment } from "relay-runtime";
import { FragmentRefs } from "relay-runtime";
export type ArtworkFilterArtworkGrid_filtered_artworks = {
readonly id: string;
readonly pageInfo: {
readonly hasNextPage: boolean;
readonly end... | artsy/force | src/v2/__generated__/ArtworkFilterArtworkGrid_filtered_artworks.graphql.ts | TypeScript | mit | 3,068 |
# encoding: utf-8
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
module Azure::CDN::Mgmt::V2020_09_01
module Models
#
# Result of the request to list endpoints. It contains a list of endpoint
# objects and a... | Azure/azure-sdk-for-ruby | management/azure_mgmt_cdn/lib/2020-09-01/generated/azure_mgmt_cdn/models/afdendpoint_list_result.rb | Ruby | mit | 2,932 |
/* eslint react/no-multi-comp:0, no-console:0 */
import { createForm } from 'rc-form';
import React, { PropTypes } from 'react';
import ReactDOM from 'react-dom';
import { regionStyle, errorStyle } from './styles';
let Form = React.createClass({
propTypes: {
form: PropTypes.object,
},
setEmail() {
this... | setState/form | examples/setFieldsValue.js | JavaScript | mit | 1,127 |
package de.hawhamburg.vs.wise15.superteam.client.worker;
import de.hawhamburg.vs.wise15.superteam.client.PlayerServiceFacade;
import de.hawhamburg.vs.wise15.superteam.client.callback.CallbackA;
import de.hawhamburg.vs.wise15.superteam.client.model.Command;
import javax.swing.*;
import java.io.IOException;
import java... | flbaue/vs-wise15 | client/src/main/java/de/hawhamburg/vs/wise15/superteam/client/worker/CommandListener.java | Java | mit | 1,377 |
'''
Created on Jan 30, 2011
@author: snail
'''
import logging
import logging.handlers
import os
import sys
from os.path import join
from os import getcwd
from logging import DEBUG, INFO, WARNING, ERROR, CRITICAL
from pickle import dumps
LogPath = "Logs"
#ensure the logging path exists.
try:
from os import mkdir
... | theepicsnail/SuperBot2 | Logging.py | Python | mit | 3,658 |
/*---------------------------------------------------------------------------------------------
* 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/workbench/browser/parts/quickinput/quickInput.ts | TypeScript | mit | 44,636 |
/**
* @summary Race timing system
* @author Guillaume Deconinck & Wojciech Grynczel
*/
'use strict';
// time-model.js - A mongoose model
//
// See http://mongoosejs.com/docs/models.html
// for more of what you can do here.
const mongoose = require('mongoose');
const Schema = mongoose.Schema;
const timeSchema = ne... | osrts/osrts-backend | src/services/times/time-model.js | JavaScript | mit | 568 |
<?php
/* FOSUserBundle:Group:edit.html.twig */
class __TwigTemplate_ef57f06f37b4b105df31eabec2d1cd20acba6f1995ab286ffcc795254ca469ef extends Sonata\CacheBundle\Twig\TwigTemplate14
{
public function __construct(Twig_Environment $env)
{
parent::__construct($env);
// line 1
try {
... | wieloming/GPI | 1/ef/57/f06f37b4b105df31eabec2d1cd20acba6f1995ab286ffcc795254ca469ef.php | PHP | mit | 1,473 |
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateRoleUserTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('role_user', function (Blueprint $table) {
... | Khairulrabbi/htmis | database/migrations/2016_04_21_052356_create_role_user_table.php | PHP | mit | 968 |
module Garages
class ToggleStatusController < ApplicationController
before_action :set_garage, only: :update
after_action :verify_authorized
def update
authorize @garage
@garage.toggle_status
respond_to do |format|
format.html { redirect_to garages_url }
end
end
p... | jonnyjava/ewoks | app/controllers/garages/toggle_status_controller.rb | Ruby | mit | 534 |
#!/usr/bin/env python
import sys, json
from confusionmatrix import ConfusionMatrix as CM
def main():
for line in sys.stdin:
cm = json.loads(line)
print CM(cm["TP"], cm["FP"], cm["FN"], cm["TN"])
if __name__ == '__main__':
main()
| yatmingyatming/LogisticRegressionSGDMapReduce | display_stats.py | Python | mit | 264 |
/*
* @(#)ByteBufferAs-X-Buffer.java 1.18 05/11/17
*
* Copyright 2006 Sun Microsystems, Inc. All rights reserved.
* SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*/
// -- This file was mechanically generated: Do not edit! -- //
package java.nio;
class ByteBufferAsDoubleBufferB // ... | jgaltidor/VarJ | analyzed_libs/jdk1.6.0_06_src/java/nio/ByteBufferAsDoubleBufferB.java | Java | mit | 2,856 |
import { Injectable } from 'angular2/core';
@Injectable()
export class Config {
SERVER_URL:string = "http://128.199.158.79:9000/";
}
| alexsalesdev/fiori-blossoms-ui-web-angular-2 | public/app/service/config.ts | TypeScript | mit | 138 |
class GeometryTests < PostgreSQLExtensionsTestCase
def test_create_geometry
Mig.create_table(:foo) do |t|
t.geometry :the_geom, :srid => 4326
end
expected = []
expected << strip_heredoc(<<-SQL)
CREATE TABLE "foo" (
"id" serial primary key,
"the_geom" geometry,
CO... | zoocasa/activerecord-postgresql-extensions | test/geometry_tests_legacy_postgis.rb | Ruby | mit | 12,763 |
module FrankAfcProxy
VERSION = "0.0.1"
end
| suzumura-ss/frank_afc_proxy | lib/frank_afc_proxy/version.rb | Ruby | mit | 45 |
/// <reference path="//Microsoft.WinJS.1.0/js/base.js" />
/// <reference path="../model/event.js" />
(function () {
var initAppBarGlobalCommands = function () {
var eventsButton = document.getElementById("navigate-onClick-to-events");
eventsButton.addEventListener("click", function () {
... | vaster/RestReminder | RestReminderApp/RestReminderApp/js/commands/command.js | JavaScript | mit | 2,545 |
<?php if (count($brands) > 0): ?>
<?php if ($sf_request->hasParameter('is_search')): ?>
<?php $action = '@product_search' ?>
<?php else: ?>
<?php $action = '@product_list' ?>
<?php endif; ?>
<?php if ($sf_request->hasParameter('path')): ?>
<?php $path = '?path=' . $sf_r... | alecslupu/sfshop | plugins/sfsProductPlugin/modules/brand/templates/_filterList.php | PHP | mit | 1,333 |
package tile;
import java.net.URL;
public class Box extends Tile {
public Box(URL url, char key) {
// TODO Auto-generated constructor stub
super(url, key);
this.canMove = false;
}
}
| Sy4z/The-Excellent-Adventure | src/tile/Box.java | Java | mit | 193 |
// Generated by CoffeeScript 1.7.1
(function() {
var pf, pfr;
pf = function(n) {
return pfr(n, 2, []);
};
pfr = function(n, d, f) {
if (n < 2) {
return f;
}
if (n % d === 0) {
return [d].concat(pfr(n / d, d, f));
}
return pfr(n, d + 1, f);
};
module.exports = pf;
}).c... | dlwire/coffeescript-barebones | javascripts/pf.js | JavaScript | mit | 331 |
var plan = require('./index');
module.exports = plan;
var HOST = 'brainbug.local';
plan.target('single', function(done) {
setTimeout(function() {
done([
{
host: HOST + 'lol',
username: 'pstadler',
agent: process.env.SSH_AUTH_SOCK,
failsafe: true
},
{
ho... | thundernixon/thundernixon2015wp-sage | node_modules/flightplan/flightplan.js | JavaScript | mit | 2,931 |
<?php
namespace AppBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Request;
class SecurityController extends Controller
{
public function loginAction(Request $request)
{
$authUtils = $this->get('security.authentication_utils');
... | marko126/symfony-nastava | src/AppBundle/Controller/SecurityController.php | PHP | mit | 612 |
require File.dirname(__FILE__) + '/spec_helper'
module SDP
describe "Dokken iteration 3" do
before(:all) do
@iteration = Iteration.new(3, "Dokken", Date.parse('01/21/2008'), Date.parse('01/25/2008'))
s = <<EOQ
http://bugzilla.songbirdnest.com/buglist.cgi?quicksearch=632%2C754%2C2025%2C3370%2C3600%2C3... | skelliam/sdpbot | spec/dokken_iteration_3_spec.rb | Ruby | mit | 5,352 |
class TweetsController < ApplicationController
def create
# Planned on rendering json for line 6 to Ajax a new post back onto the page
# But this single-app feature wouldn't grab new tweets. Having it live update
# through streaming would take care of this, otherwise, just refresh page
client.update(p... | heycait/twitter | app/controllers/tweets_controller.rb | Ruby | mit | 371 |
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*
| -------------------------------------------------------------------
| AUTO-LOADER
| -------------------------------------------------------------------
| This file specifies which systems should be loaded by default.
|
| In order to keep the fr... | opengbu/gbuonline | application/config/autoload.php | PHP | mit | 3,814 |
#include <iostream>
#include <seqan/file.h>
#include <seqan/sequence.h>
#include <seqan/score.h>
template <typename TText, typename TPattern>
int computeLocalScore(TText const &subText, TPattern const &pattern)
{
int localScore = 0;
for (unsigned i = 0; i < seqan::length(pattern); ++i)
if (su... | bkahlert/seqan-research | raw/pmsb13/pmsb13-data-20130530/sources/caivjx2geotu92t0/2013-04-09T16-09-03.492+0200/sandbox/my_sandbox/apps/firstSteps1/firstSteps1.cpp | C++ | mit | 1,740 |
package denvlib
import (
"encoding/json"
"io/ioutil"
"os"
git "github.com/buckhx/gitlib"
"github.com/buckhx/pathutil"
)
/*
DenvInfo is a mechanism for handling state of the denv environment.
It flushed it's contents to disk and reads from a given location
*/
type DenvInfo struct {
Current *Denv
Path ... | buckhx/denv | denvlib/info.go | GO | mit | 1,538 |
<?php
/**
* Created by JetBrains PhpStorm.
* User: etienne.lejariel
* Date: 03/07/15
* Time: 09:46
* To change this template use File | Settings | File Templates.
*/
namespace Enneite\SwaggerBundle\Tests\Creator;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
use Enneite\SwaggerBundle\Creator\ApiControll... | enneite/swagger-bundle | Tests/Creator/ApiControllerCreatorTest.php | PHP | mit | 23,086 |
var notify = require('gulp-notify'),
path = require('path');
var c = exports;
c.all = allFiles;
c.target = targetFolder;
c.TARGET_FOLDER = "./dist";
// fonts
c.FOLDER_FONTS = './node_modules/font-awesome/fonts/*';
c.TARGET_FOLDER_FONTS = 'fonts';
// images
c.FOLDER_IMAGES = './resources/images/*... | bekk/bekkboard | GUI/tasks/config.js | JavaScript | mit | 1,991 |
# -*- coding: utf-8 -*-
# Generated by Django 1.10.2 on 2017-08-17 20:30
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('app_pessoa', '0004_auto_20170817_1727'),
]
operati... | LEDS/X-data | Xdata/app_pessoa/migrations/0005_auto_20170817_1730.py | Python | mit | 559 |
class AvailabilitiesController < ApplicationController
before_action :authorise_booking_manager!
def show
@search = SlotSearch.new(search_params)
@slots = @search.results
end
private
def search_params
params
.fetch(:search, {})
.permit(:date, :room, :available)
.merge(
... | guidance-guarantee-programme/tesco_planner | app/controllers/availabilities_controller.rb | Ruby | mit | 589 |
#include "Build.h"
#include "Profiler.h"
#include "config/Git.h"
#include "config/Version.h"
#include <sstream>
#include <vector>
//OS
#if defined(PR_OS_LINUX)
#define PR_OS_NAME "Linux"
#elif defined(PR_OS_WINDOWS_32)
#define PR_OS_NAME "Microsoft Windows 32 Bit"
#elif defined(PR_OS_WINDOWS_64)
#define PR_OS_NAME "M... | PearCoding/PearRay | src/base/config/Build.cpp | C++ | mit | 4,753 |
<?php
class Contact_model extends CI_Model
{
function insert($arr = ''){
if(empty($arr)) return ;
$sql = "insert into contact (name,email,message,ceatetime,ip) VALUES ('{$arr['name']}','{$arr['email']}','{$arr['message']}','".date('Y-m-d H:i:s')."','{$arr['ip']}')";
$this->db->query($sql);
... | 0372/blog | blog/front/models/Contact_model.php | PHP | mit | 327 |
package br.edu.fjn.maternidade.application.impl;
import java.util.List;
import br.edu.fjn.maternidade.application.SecretarioApplication;
import br.edu.fjn.maternidade.domain.secretario.Secretario;
import br.edu.fjn.maternidade.domain.secretario.SecretarioRepository;
import br.edu.fjn.maternidade.domain.usuario.Usuari... | aldaypinheiro/maternidade-core | src/br/edu/fjn/maternidade/application/impl/SecretarioApplicationImpl.java | Java | mit | 1,940 |
<?php
session_start(); // declare that sessions are being used
session_unset(); // unset sessions
session_destroy(); // now destory them and remove them from the users browser
header('Location: http://thewebbster.info/get/loginForm.php?logout=yes');... | chwebb1/InsecureGetLoginFormPHP | logout.php | PHP | mit | 413 |
lock '3.4.0'
set :application, "people"
set :repo_url, "git://github.com/netguru/people.git"
set :deploy_to, ENV['DEPLOY_PATH']
set :docker_links, %w(postgres_ambassador:postgres)
set :docker_additional_options, -> { "--env-file #{shared_path}/.env" }
set :docker_apparmor_profile, "docker-ptrace"
namespace :docker ... | netguru/people | config/deploy.rb | Ruby | mit | 532 |
require 'spec_helper'
# TODO: the usual respond_to? method doesn't seem to work on Thor objects.
# Why not? For now, we'll check against instance_methods.
RSpec.describe Moose::Inventory::Cli::Host do
before(:all) do
# Set up the configuration object
@mockarg_parts = {
config: File.join(spec_root, 'c... | RusDavies/moose-inventory | spec/lib/moose_inventory/cli/host_addgroup_spec.rb | Ruby | mit | 8,359 |
$(function() {
//switch the menu style in a area of site
$(window).on("scroll", function() {
var black_opacity = $("#top-session");
var projetos = $("#projetos");
var contatos = $("#contato");
var offsetblack_opacity = black_opacity.offset();
var offsetprojetos = projetos.offset();
var offsetcontatos = ... | gabrieldev525/me | js/script-jquery.js | JavaScript | mit | 1,335 |
<script type="text/javascript">
$(document).ready(function(){
$("#new-user").submit(function(e){
e.preventDefault();
if($("input[name=user_confirm_password]").val() != $("input[name=user_password]").val()){
$("input[name=user_password]").css("border-bottom", "1px solid red");
$("input[name=user_confir... | lds-ulbra-torres/projeto-slave | application/views/users/CreateUserView.php | PHP | mit | 1,898 |
Items = new Mongo.Collection('items');
Items.allow({
insert: function(userId, doc) {
return !!userId;
},
update: function(userId, doc) {
return !!userId;
},
remove: function(userId, doc) {
return !!userId;
}
});
ItemSchema = new SimpleSchema({
name: {
type: String,
label: "Item Name"... | mrogach2350/rpgLoot | collections/items.js | JavaScript | mit | 1,589 |
package handler
import (
"encoding/json"
"io/ioutil"
"net/http"
"net/url"
"strings"
"github.com/playlyfe/go-graphql"
"golang.org/x/net/context"
)
//Shortcuts for the Content-Type header
const (
ContentTypeJSON = "application/json"
ContentTypeGraphQL = "application/graphql"
ContentTypeForm... | krypton97/HandleGraphQL | handler.go | GO | mit | 4,325 |
/**
* The slideshow controller.
* Get settings and initialise PrismSlider for each layer,
* add controls and events, then call slideTo method on click.
* @return {Object} The set of public methods.
*/
var slideshow = (function(window, undefined) {
'use strict';
/**
* Enum navigation classes, attributes a... | claudiocalautti/prism-slider | js/slideshow3.js | JavaScript | mit | 5,466 |
// Chargement des données (en queuing pour plus de rapidité)
queue(1)
.defer(d3.json, "/dataviz/rgph2014/tunisiageo.json")
.defer(d3.csv, "/dataviz/rgph2014/rgph2014.csv")
.awaitAll(function(error, results){
var topology = results[0]
var governorates = topojson.feature(topology, topology.objects... | mahrsi/mahrsi.github.io | dataviz/rgph2014/rgph2014.js | JavaScript | mit | 3,263 |
# frozen_string_literal: true
module PeopleHelper
def private_information(info, name: false)
if name
session[:privacy_mode] ? info.initials : info.full_name
else
session[:privacy_mode] ? 'hidden' : info
end
end
alias pii private_information
def address_fields_to_sentence(person)
pe... | BlueRidgeLabs/kimball | app/helpers/people_helper.rb | Ruby | mit | 541 |
// @flow
import React, { Component } from 'react';
import type { Children } from 'react';
import { Sidebar } from '../components';
export default class App extends Component {
props: {
children: Children
};
render() {
return (
<div>
<Sidebar />
<div className="main-panel">
... | hlynn93/basic_ims | app/containers/App.js | JavaScript | mit | 385 |
import styled from 'styled-components';
import { colors } from '@keen.io/colors';
export const Wrapper = styled.div`
padding: 20px;
border-top: solid 1px ${colors.gray[300]};
`;
export const Container = styled.div`
display: flex;
gap: 20px;
`;
export const TitleContainer = styled.div`
min-width: 100px;
`;
| keen/explorer | src/components/BrowserPreview/components/DashboardsConnection/DashboardsConnection.styles.ts | TypeScript | mit | 320 |
using BasicMessaging.Domain.Places.Models;
using Brickweave.Cqrs;
namespace BasicMessaging.Domain.Places.Commands
{
public class CreatePlace : ICommand<Place>
{
public CreatePlace(string name)
{
Name = name;
}
public string Name { get; }
}
}
| agartee/Brickweave | samples/2. BasicMessaging/src/BasicMessaging.Domain/Places/Commands/CreatePlace.cs | C# | mit | 303 |
/*
* The MIT License (MIT)
*
* Copyright (c) 2014-2016 Christian Schudt
*
* 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 r... | jeozey/XmppServerTester | xmpp-extensions/src/main/java/rocks/xmpp/extensions/muc/model/Actor.java | Java | mit | 1,690 |
export * from './components';
export * from './questions.module'; | dormd/ng2-countries-trivia | src/app/modules/questions/index.ts | TypeScript | mit | 65 |
<!--
Safe sample
input : reads the field UserData from the variable $_GET
sanitize : cast via + = 0
File : unsafe, use of untrusted data in the function setInterval
-->
<!--Copyright 2015 Bertrand STIVALET
Permission is hereby granted, without written agreement or royalty fee, to
use, copy, modify, and distribute ... | stivalet/PHP-Vulnerability-test-suite | XSS/CWE_79/safe/CWE_79__GET__CAST-cast_int_sort_of__Use_untrusted_data_script-window_SetInterval.php | PHP | mit | 1,289 |
<?php
/*
* This file is part of App/Validation.
*
* (c) Alexandre Gomes Gaigalas <alexandre@gaigalas.net>
*
* For the full copyright and license information, please view the "LICENSE.md"
* file that was distributed with this source code.
*/
namespace App\Validation\Rules\SubdivisionCode;
use App\Validation\Ru... | Javier-Solis/admin-project | app/Validation/Rules/SubdivisionCode/SvSubdivisionCode.php | PHP | mit | 1,011 |
package kusto
// 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.
... | Azure/azure-sdk-for-go | services/kusto/mgmt/2019-01-21/kusto/dataconnections.go | GO | mit | 27,128 |
require 'rails_helper'
RSpec.describe Parties::EmailsController, type: :request do
describe '#edit' do
before { signin_party }
subject! { get '/party/email/edit' }
it { expect(response).to be_success }
end
describe '#update' do
before { signin_party }
context 'success' do
subject { put... | JRF-tw/sunshine.jrf.org.tw | spec/requests/parties/emails_controller_spec.rb | Ruby | mit | 1,540 |
package jsettlers.graphics.map.controls.original.panel.button;
import jsettlers.common.images.EImageLinkType;
import jsettlers.common.images.OriginalImageLink;
import jsettlers.common.material.EMaterialType;
import jsettlers.graphics.action.Action;
import jsettlers.graphics.localization.Labels;
import jsettlers.graphi... | JKatzwinkel/settlers-remake | jsettlers.graphics/src/jsettlers/graphics/map/controls/original/panel/button/MaterialButton.java | Java | mit | 1,533 |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/ads/googleads/v0/enums/frequency_cap_level.proto
package enums // import "google.golang.org/genproto/googleapis/ads/googleads/v0/enums"
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
// Reference imports to suppre... | cloudfoundry-community/firehose-to-syslog | vendor/google.golang.org/genproto/googleapis/ads/googleads/v0/enums/frequency_cap_level.pb.go | GO | mit | 5,878 |
//
// 2_2_DefineVariables.cpp
// CPP
//
// Created by akshay raj gollahalli on 2/02/16.
// Copyright © 2016 akshay raj gollahalli. All rights reserved.
//
#include <cstdio>
int main(int argc, char ** argv) {
int someNumber = 10;
/*
this can also be written as
int someNumber;
someNumber = 10;
*/
const int... | akshaybabloo/CPP-Notes | 2_Basics/2_2_DefineVariables.cpp | C++ | mit | 519 |
from django import forms
from django.contrib.auth.forms import AuthenticationForm
from django.utils.translation import ugettext_lazy as _
class EmailAuthenticationForm(AuthenticationForm):
"""Email authentication Form
increase the size of the username field to fit long emails"""
# TODO: consider to change... | theteam/django-theteamcommon | src/theteamcommon/forms.py | Python | mit | 770 |
module.exports = {
Shape: require('./lib/shape'),
Node: require('./lib/node'),
Error: require('./lib/node_error'),
MemorySource: require('./lib/memory_source'),
};
| LastLeaf/datree | index.js | JavaScript | mit | 180 |
<?php
/* FOSUserBundle:Profile:show.html.twig */
class __TwigTemplate_2d974d2be07c528b56adfa6823dca8b997fac47403b46447cbcad246a9aa4057 extends Twig_Template
{
public function __construct(Twig_Environment $env)
{
parent::__construct($env);
$this->parent = $this->env->loadTemplate("FOSUserBundle... | efrax/IMDER | app/cache/dev/twig/2d/97/4d2be07c528b56adfa6823dca8b997fac47403b46447cbcad246a9aa4057.php | PHP | mit | 1,239 |
<?php
/*
* Skeleton Bundle
* This file is part of the BardisCMS.
*
* (c) George Bardis <george@bardis.info>
*
*/
namespace BardisCMS\SkeletonBundle\Repository;
use Doctrine\ORM\EntityRepository;
class SkeletonRepository extends EntityRepository {
// Function to retrieve the pages of a category with pagin... | bardius/the-web-dev-ninja-blog | src/BardisCMS/SkeletonBundle/Repository/SkeletonRepository.php | PHP | mit | 12,435 |
// Code generated by ffjson <https://github.com/pquerna/ffjson>. DO NOT EDIT.
// source: vestingbalance.go
package types
import (
"bytes"
"fmt"
fflib "github.com/pquerna/ffjson/fflib/v1"
)
// MarshalJSON marshal bytes to json - template
func (j *VestingBalance) MarshalJSON() ([]byte, error) {
var buf fflib.Buffe... | denkhaus/bitshares | types/vestingbalance_ffjson.go | GO | mit | 7,613 |
require "pact_broker/domain/pact"
module PactBroker
module Pacts
class PlaceholderPact < PactBroker::Domain::Pact
def initialize
consumer = OpenStruct.new(name: "placeholder-consumer", labels: [OpenStruct.new(name: "placeholder-consumer-label")])
@provider = OpenStruct.new(name: "placeholde... | pact-foundation/pact_broker | lib/pact_broker/pacts/placeholder_pact.rb | Ruby | mit | 776 |
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
// This can be removed if you use __autoload() in config.php OR use Modular Extensions
require_once APPPATH . '/libraries/REST_Controller.php';
class Services extends REST_Controller
{
public function __construct()
{
parent::__construct();
$t... | vny1422/Asumu | application/controllers/Services.php | PHP | mit | 17,633 |
from discrete import *
f = factorial(100)
s = str(f)
print sum([int(s[i]) for i in range(len(s))])
| jreese/euler | python/problem20.py | Python | mit | 101 |
package de.mineformers.investiture.allomancy.network;
import de.mineformers.investiture.allomancy.impl.misting.temporal.SpeedBubble;
import de.mineformers.investiture.network.Message;
import net.minecraft.util.math.BlockPos;
import java.util.UUID;
/**
* Updates a metal extractor tile entity
*/
public class SpeedBu... | PaleoCrafter/Allomancy | src/main/java/de/mineformers/investiture/allomancy/network/SpeedBubbleUpdate.java | Java | mit | 875 |
// Copyright (c) 2011-2013 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "qvalidatedlineedit.h"
#include "vikingcoinaddressvalidator.h"
#include "guiconstants.h"
QValidatedLineEdit::QValid... | i3lome/failfial | src/qt/qvalidatedlineedit.cpp | C++ | mit | 2,162 |
/*
* Copyright 1997-2015 Optimatika (www.optimatika.se)
*
* 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, mo... | jpalves/ojAlgo | src/org/ojalgo/matrix/store/IdentityStore.java | Java | mit | 3,940 |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using XOMNI.SDK.Core.ApiAccess;
using XOMNI.SDK.Core.Providers;
namespace XOMNI.SDK.Private.ApiAccess.Catalog.ItemPrice
{
internal class BatchPrice : ApiAccessBase
{
protected override s... | nseckinoral/xomni-sdk-dotnet | src/XOMNI.SDK.Private/ApiAccess/Catalog/ItemPrice/BatchPrice.cs | C# | mit | 1,322 |
// All code points in the `Sora_Sompeng` script as per Unicode v8.0.0:
[
0x110D0,
0x110D1,
0x110D2,
0x110D3,
0x110D4,
0x110D5,
0x110D6,
0x110D7,
0x110D8,
0x110D9,
0x110DA,
0x110DB,
0x110DC,
0x110DD,
0x110DE,
0x110DF,
0x110E0,
0x110E1,
0x110E2,
0x110E3,
0x110E4,
0x110E5,
0x110E6,
0x110E7,
0x110E... | mathiasbynens/unicode-data | 8.0.0/scripts/Sora_Sompeng-code-points.js | JavaScript | mit | 424 |
using System;
namespace Dust
{
public interface IServiceAspect<TRequest, TResponse>
{
TResponse Process(TRequest request, Func<TRequest, TResponse> serviceOperation);
}
} | pjtown/dusty-web-services | Dust/IServiceAspect.cs | C# | mit | 176 |
namespace nUpdate.Administration.Core.Operations.Panels
{
partial class ScriptExecuteOperationPanel
{
/// <summary>
/// Erforderliche Designervariable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Verwendete Ress... | ProgTrade/nUpdate | nUpdate.Administration/Core/Operations/Panels/ScriptExecuteOperationPanel.Designer.cs | C# | mit | 8,690 |
import cPickle as pickle
import numpy as np
import os
import sys
sys.path.append('../')
import gp
from uitools import UITools
class Manager(object):
def __init__(self, output_dir):
'''
'''
self._data_path = '/home/d/dojo_xp/data/'
self._output_path = os.path.join(self._data_path, 'ui_out', output_... | VCG/gp | ui/manager.py | Python | mit | 12,894 |
/*
* This file is part of ViaVersion - https://github.com/ViaVersion/ViaVersion
* Copyright (C) 2016-2021 ViaVersion and contributors
*
* 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 w... | MylesIsCool/ViaVersion | api-legacy/src/main/java/us/myles/ViaVersion/api/boss/BossColor.java | Java | mit | 1,520 |
require "active_support/core_ext/string/inflections"
module GreatPretender
class Pretender
def initialize(mockup)
@mockup = mockup
end
def to_module
pretenders = load_pretenders
Module.new do
define_method(:method_missing) do |method_name, *args, &block|
pretender =... | BackForty/great_pretender | lib/great_pretender/pretender.rb | Ruby | mit | 1,831 |
{{-- Master Layout --}}
@extends('cortex/foundation::frontarea.layouts.default')
{{-- Page Title --}}
@section('title')
{{ extract_title(Breadcrumbs::render()) }}
@endsection
{{-- Scripts --}}
@push('inline-scripts')
{!! JsValidator::formRequest(Cortex\Auth\Http\Requests\Frontarea\TenantRegistrationProcessReq... | rinvex/cortex-fort | resources/views/frontarea/pages/tenant-registration.blade.php | PHP | mit | 10,976 |
/**
* The AnalysisShapeUploadView module.
*
* @return AnalysisShapeUploadView class (extends Backbone.View).
*/
define(
[
'backbone',
'mps',
'turf',
'map/services/ShapefileService',
'helpers/geojsonUtilsHelper'
],
function(Backbone, mps, turf, ShapefileService, geojsonUtilsHelper) {
'u... | Vizzuality/gfw-climate | app/assets/javascripts/map/views/tabs/AnalysisShapeUploadView.js | JavaScript | mit | 3,022 |
class Api::V1::CharactersController < ApplicationController
def show
character = Character.find(params[:id])
response = Api::V1::CharacterSerializer.new(character)
render(json: response)
end
def index
if params[:name]
character = Character.find_by(name: params[:name])
if character.ni... | mbroadwater/shadowrun | app/controllers/api/v1/characters_controller.rb | Ruby | mit | 806 |
package eu.thog92.isbrh.example;
import eu.thog92.isbrh.ISBRH;
import eu.thog92.isbrh.render.ITextureHandler;
import eu.thog92.isbrh.render.TextureLoader;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.block.state.IBlockState;
import net.minecraft.client.renderer.t... | Thog/ISBRH | src/main/java/eu/thog92/isbrh/example/BlockExample.java | Java | mit | 2,078 |
new Vue({
el: document.querySelector('.page-app-detail'),
data: {
selectedApp: {}
},
created() {
this._loadApp();
},
methods: {
refreshSecret() {
axios.post(`${AppConf.apiHost}/app/${serverData.appId}/refresh_secret`)
.then(res => {
this.selectedApp.AppSecret = res.data;
... | hstarorg/simple-sso | src/assets/js/app-detail.js | JavaScript | mit | 506 |
// This is an open source non-commercial project. Dear PVS-Studio, please check it.
// PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
/* SearchContext.cs --
* Ars Magna project, http://arsmagna.ru
* -------------------------------------------------------
* Status: poor
*/
#region Using ... | amironov73/ManagedIrbis2 | OldSource/Libs/ManagedIrbis/Source/Search/Infrastructure/SearchContext.cs | C# | mit | 1,370 |
import DetailsList from '@components/details-list.vue'
describe('DetailsList Component', () => {
let wrapper
let options
beforeEach(() => {
options = {
propsData: {
id: '01-01',
},
}
wrapper = createWrapper(DetailsList, options)
})
it('is a Vue instance', () => {
expect... | patrickcate/dutch-art-daily | __tests__/unit/components/details-list.spec.js | JavaScript | mit | 745 |
using System.Collections.Generic;
using System.Linq;
using PivotalTrackerDotNet.Domain;
using RestSharp;
using Parallel = System.Threading.Tasks.Parallel;
namespace PivotalTrackerDotNet
{
public class StoryService : AAuthenticatedService, IStoryService
{
private const string SpecifiedIterati... | Charcoals/PivotalTracker.NET | PivotalTrackerDotNet/StoryService.cs | C# | mit | 17,068 |
using System;
using System.Globalization;
using System.Reflection;
using System.Windows.Media;
namespace DataServer
{
public static class ColorReflector
{
public static void SetFromHex(this Color c, string hex) {
var c1 = ToColorFromHex(hex);
c.A = c1.A;
c.R = c1.R;... | TNOCS/csTouch | framework/csCommonSense/Types/DataServer/PoI/ColorReflector.cs | C# | mit | 2,540 |