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 |
|---|---|---|---|---|---|
'use strict';
var clear = require('es5-ext/array/#/clear')
, eIndexOf = require('es5-ext/array/#/e-index-of')
, setPrototypeOf = require('es5-ext/object/set-prototype-of')
, callable = require('es5-ext/object/valid-callable')
, d = require('d')
, ee = require('ev... | Socratacom/socrata-europe | wp-content/themes/sage/node_modules/asset-builder/node_modules/main-bower-files/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/unique-stream/node_modules/es6-set/polyfill.js | JavaScript | gpl-2.0 | 2,730 |
'use strict';
const TYPE = Symbol.for('type');
class Data {
constructor(options) {
// File details
this.filepath = options.filepath;
// Type
this[TYPE] = 'data';
// Data
Object.assign(this, options.data);
}
}
module.exports = Data;
| mshick/velvet | core/classes/data.js | JavaScript | isc | 266 |
package sodium
// #cgo pkg-config: libsodium
// #include <stdlib.h>
// #include <sodium.h>
import "C"
func RuntimeHasNeon() bool {
return C.sodium_runtime_has_neon() != 0
}
func RuntimeHasSse2() bool {
return C.sodium_runtime_has_sse2() != 0
}
func RuntimeHasSse3() bool {
return C.sodium_runtime_has_sse3() != 0
... | GoKillers/libsodium-go | sodium/runtime.go | GO | isc | 322 |
<?php
interface Container {
/**
* Checks if a $x exists.
*
* @param unknown $x
*
* @return boolean
*/
function contains($x);
} | guide42/php-immutable | src/base.php | PHP | isc | 165 |
angular.module('appTesting').service("LoginLocalStorage", function () {
"use strict";
var STORE_NAME = "login";
var setUser = function setUser(user) {
localStorage.setItem(STORE_NAME, JSON.stringify(user));
}
var getUser = function getUser() {
var storedTasks = localStorage.getIte... | pikachumetal/cursoangular05 | app/loginModule/services/localstorage.js | JavaScript | isc | 515 |
/* eslint-disable no-console */
const buildData = require('./build_data');
const buildSrc = require('./build_src');
const buildCSS = require('./build_css');
let _currBuild = null;
// if called directly, do the thing.
buildAll();
function buildAll() {
if (_currBuild) return _currBuild;
return _currBuild =
P... | kartta-labs/iD | build.js | JavaScript | isc | 591 |
function LetterProps(o, sw, sc, fc, m, p) {
this.o = o;
this.sw = sw;
this.sc = sc;
this.fc = fc;
this.m = m;
this.p = p;
this._mdf = {
o: true,
sw: !!sw,
sc: !!sc,
fc: !!fc,
m: true,
p: true,
};
}
LetterProps.prototype.update = function (o, sw, sc, fc, m, p) {
... | damienmortini/dlib | node_modules/lottie-web/player/js/utils/text/LetterProps.js | JavaScript | isc | 1,212 |
/*
* DISTRHO Plugin Framework (DPF)
* Copyright (C) 2012-2014 Filipe Coelho <falktx@falktx.com>
*
* Permission to use, copy, modify, and/or distribute this software for any purpose with
* or without fee is hereby granted, provided that the above copyright notice and this
* permission notice appear in all copies.
... | DanielAeolusLaude/DPF-NTK | distrho/src/DistrhoPluginLV2export.cpp | C++ | isc | 16,790 |
// The following are instance methods and variables
var Note = Class.create({
initialize: function(id, is_new, raw_body) {
if (Note.debug) {
console.debug("Note#initialize (id=%d)", id)
}
this.id = id
this.is_new = is_new
this.document_observers = [];
// Cache the elements
this.ele... | rhaphazard/moebooru | lib/assets/javascripts/moe-legacy/notes.js | JavaScript | isc | 21,067 |
// Copyright (c) 2021 The Decred developers
// Use of this source code is governed by an ISC
// license that can be found in the LICENSE file.
package indexers
import (
"context"
"fmt"
"sync"
"sync/atomic"
"github.com/decred/dcrd/blockchain/v4/internal/progresslog"
"github.com/decred/dcrd/database/v3"
"github... | decred/dcrd | blockchain/indexers/indexsubscriber.go | GO | isc | 10,267 |
describe('dJSON', function () {
'use strict';
var chai = require('chai');
var expect = chai.expect;
var dJSON = require('../lib/dJSON');
var path = 'x.y["q.{r}"].z';
var obj;
beforeEach(function () {
obj = {
x: {
y: {
'q.{r}': {
z: 635
},
q: {... | bsander/dJSON | test/dJSON.spec.js | JavaScript | isc | 3,391 |
/**
* The MIT License Copyright (c) 2015 Teal Cube Games
*
* 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, modi... | TealCube/strife | src/main/java/land/face/strife/managers/CombatStatusManager.java | Java | isc | 2,828 |
from django import forms
from django.core.exceptions import ValidationError
from django.core.validators import validate_slug
from django.db import models
from django.utils import simplejson as json
from django.utils.text import capfirst
from django.utils.translation import ugettext_lazy as _
from philo.forms.fields im... | ithinksw/philo | philo/models/fields/__init__.py | Python | isc | 4,971 |
<?php
/**
* Time Controller
*
* @package Argentum
* @author Argentum Team
* @copyright (c) 2008 Argentum Team
* @license http://www.argentuminvoice.com/license.txt
*/
class Time_Controller extends Website_Controller {
/**
* Creates a new time block on a ticket
*/
public function add($ticket_id)
{
... | la5942/argentum-invoice | application/controllers/admin/time.php | PHP | isc | 1,554 |
var fusepm = require('./fusepm');
module.exports = fixunoproj;
function fixunoproj () {
var fn = fusepm.local_unoproj(".");
fusepm.read_unoproj(fn).then(function (obj) {
var inc = [];
if (obj.Includes) {
var re = /\//;
for (var i=0; i<obj.Includes.length;i++) {
if (obj.Includes[i] === '*') {
inc.... | bolav/fusepm | lib/fixunoproj.js | JavaScript | isc | 752 |
import mod437 from './mod437';
var value=mod437+1;
export default value;
| MirekSz/webpack-es6-ts | app/mods/mod438.js | JavaScript | isc | 73 |
const defaults = {
base_css: true, // the base dark theme css
inline_youtube: true, // makes youtube videos play inline the chat
collapse_onebox: true, // can collapse
collapse_onebox_default: false, // default option for collapse
pause_youtube_on_collapse: true, // default option for pausing yo... | rlemon/se-chat-dark-theme-plus | script.js | JavaScript | isc | 4,901 |
'use strict';
const expect = require('expect.js');
const http = require('http');
const express = require('express');
const linkCheck = require('../');
describe('link-check', function () {
this.timeout(2500);//increase timeout to enable 429 retry tests
let baseUrl;
let laterCustomRetryCounter;
befor... | tcort/link-check | test/link-check.test.js | JavaScript | isc | 18,014 |
function daysLeftThisWeek (date) {
return 6 - date.getDay()
}
module.exports = daysLeftThisWeek
| akileez/toolz | src/date/daysLeftThisWeek.js | JavaScript | isc | 99 |
import hashlib
import json
import logging
import os
import subprocess
import sys
import time
from collections import defaultdict
from shutil import copy
from shutil import copyfile
from shutil import copystat
from shutil import copytree
from tempfile import mkdtemp
import boto3
import botocore
import yaml
import sys
... | nficano/python-lambda | aws_lambda/aws_lambda.py | Python | isc | 26,779 |
# Copyright (c) 2015, Max Fillinger <max@max-fillinger.net>
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND... | mfil/getebook | getebook/epub.py | Python | isc | 25,314 |
package minecraft
import (
"testing"
"vimagination.zapto.org/minecraft/nbt"
)
func TestNew(t *testing.T) {
biomes := make(nbt.ByteArray, 256)
biome := int8(-1)
blocks := make(nbt.ByteArray, 4096)
add := make(nbt.ByteArray, 2048)
data := make(nbt.ByteArray, 2048)
for i := 0; i < 256; i++ {
biomes[i] = biome... | MJKWoolnough/minecraft | chunk_test.go | GO | isc | 7,980 |
using System.Collections.Generic;
namespace ConsoleDemo.Visitor.v0
{
public class CommandsManager
{
readonly List<object> items = new List<object>();
// The client class has a structure (a list in this case) of items (commands).
// The client knows how to iterate through the structure... | iQuarc/Code-Design-Training | DesignPatterns/ConsoleDemo/Visitor/v0/CommandsManager.cs | C# | mit | 440 |
var contenedor = {};
var json = [];
var json_active = [];
var timeout;
var result = {};
$(document).ready(function() {
$('#buscador').keyup(function() {
if (timeout) {
clearTimeout(timeout);
timeout = null;
}
timeout = setTimeout(function() {... | mpandolfelli/papelera | js/function.js | JavaScript | mit | 5,520 |
<?php
/**
* Zend Framework
*
* LICENSE
*
* This source file is subject to the new BSD license that is bundled
* with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://framework.zend.com/license/new-bsd
* If you did not receive a copy of the license a... | levfurtado/scoops | vendor/bombayworks/zendframework1/library/Zend/Gdata/YouTube/Extension/Username.php | PHP | mit | 1,488 |
module V1
class EventUserSchedulesController < ApplicationController
before_action :set_event_session, only: [:create]
# POST /event_user_schedules
def create
@event_user_schedule = current_user.add_session_to_my_schedule(@event_session)
if @event_user_schedule.save
render json: @e... | danjohnson3141/rest_api | app/controllers/v1/event_user_schedules_controller.rb | Ruby | mit | 1,200 |
package com.jeecg.qywx.core.service;
import com.jeecg.qywx.base.entity.QywxReceivetext;
/**
* 文本处理接口
* @author 付明星
*
*/
public interface TextDealInterfaceService {
/**
* 文本消息处理接口
* @param receiveText 文本消息实体类
*/
void dealTextMessage(QywxReceivetext receiveText);
}
| xiongmaoshouzha/test | jeecg-p3-biz-qywx/src/main/java/com/jeecg/qywx/core/service/TextDealInterfaceService.java | Java | mit | 326 |
<?php namespace EugeneTolok\Telegram\Updates;
use Schema;
use October\Rain\Database\Updates\Migration;
class BuilderTableUpdateEugenetolokTelegramDialogsSteps2 extends Migration
{
public function up()
{
Schema::table('eugenetolok_telegram_dialogs_steps', function($table)
{
$tab... | eugenetolok/easy-telegram-bot | updates/builder_table_update_eugenetolok_telegram_dialogs_steps_2.php | PHP | mit | 553 |
import React from 'react';
import ons from 'onsenui';
import {
Page,
Toolbar,
BackButton,
LazyList,
ListItem
} from 'react-onsenui';
class InfiniteScroll extends React.Component {
renderRow(index) {
return (
<ListItem key={index}>
{'Item ' + (index + 1)}
</ListItem>
);
}
r... | gnetsys/OnsenUIv2-React-PhoneGap-Starter-Kit | www/components/InfiniteScroll.js | JavaScript | mit | 854 |
/**
* 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.datafactory.v2018_06_01;
import com.fasterxml.ja... | selvasingh/azure-sdk-for-java | sdk/datafactory/mgmt-v2018_06_01/src/main/java/com/microsoft/azure/management/datafactory/v2018_06_01/GoogleCloudStorageLocation.java | Java | mit | 2,402 |
$js.module({
prerequisite:[
'/{$jshome}/modules/splice.module.extensions.js'
],
imports:[
{ Inheritance : '/{$jshome}/modules/splice.inheritance.js' },
{'SpliceJS.UI':'../splice.ui.js'},
'splice.controls.pageloader.html'
],
definition:function(){
var scope = this;
var
imports = scope.imports
;
var
Class =... | jonahgroup/SpliceJS.Modules | src/ui.controls/splice.controls.pageloader.js | JavaScript | mit | 545 |
RSpec.describe AuthorizeIf do
let(:controller) {
double(:dummy_controller, controller_name: "dummy", action_name: "index").
extend(AuthorizeIf)
}
describe "#authorize_if" do
context "when object is given" do
it "returns true if truthy object is given" do
expect(controller.authorize_if(t... | vrybas/authorize_if | spec/authorize_if_spec.rb | Ruby | mit | 3,092 |
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("34... | steliyan/ProjectEuler | 34_FactorialSum/Properties/AssemblyInfo.cs | C# | mit | 1,406 |
namespace MyColors
{
partial class SimpleToolTip
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <p... | cborrow/MyColors | SimpleToolTip.Designer.cs | C# | mit | 2,497 |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;... | PFC-acl-amg/GamaPFC | GamaPFC/Gama.Atenciones.Wpf/Views/SearchBoxView.xaml.cs | C# | mit | 663 |
<?php
namespace Terrific\Composition\Entity;
use Doctrine\ORM\Mapping as ORM;
use JMS\SerializerBundle\Annotation\ReadOnly;
use JMS\SerializerBundle\Annotation\Type;
use JMS\SerializerBundle\Annotation\Exclude;
use JMS\SerializerBundle\Annotation\Groups;
use JMS\SerializerBundle\Annotation\Accessor;
/**
... | brunschgi/terrific-io-old | src/Terrific/Composition/Entity/Module.php | PHP | mit | 5,480 |
using System;
using System.Collections;
using System.Linq;
using Xunit;
namespace Popsql.Tests
{
public class SqlValuesTests
{
[Fact]
public void Add_WithNullValues_ThrowsArgumentNull()
{
var values = new SqlValues();
Assert.Throws<ArgumentNullException>(() => values.Add(null));
}
[Fact]
public v... | WouterDemuynck/popsql | src/Popsql.Tests/SqlValuesTests.cs | C# | mit | 1,149 |
package se.dsv.waora.deviceinternetinformation;
import android.content.Context;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.os.Bundle;
import android.support.v7.app.ActionBarActivity;
import android.widget.TextView;
/**
* <code>ConnectionActivity</code> presents... | dushantSW/ip-mobile | 7.3.1/DeviceInternetInformation/app/src/main/java/se/dsv/waora/deviceinternetinformation/ConnectionActivity.java | Java | mit | 2,212 |
End of preview. Expand in Data Studio
No dataset card yet
- Downloads last month
- 116