identifier stringlengths 42 383 | collection stringclasses 1
value | open_type stringclasses 1
value | license stringlengths 0 1.81k | date float64 1.99k 2.02k ⌀ | title stringlengths 0 100 | creator stringlengths 1 39 | language stringclasses 157
values | language_type stringclasses 2
values | word_count int64 1 20k | token_count int64 4 1.32M | text stringlengths 5 1.53M | __index_level_0__ int64 0 57.5k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
https://github.com/Soneso/stellar-ios-mac-sdk/blob/master/stellarsdk/stellarsdkTests/assets/AssetsRemoteTestCase.swift | Github Open Source | Open Source | LicenseRef-scancode-generic-cla, Apache-2.0 | 2,023 | stellar-ios-mac-sdk | Soneso | Swift | Code | 463 | 1,625 | //
// AssetsTestCase.swift
// stellarsdkTests
//
// Created by Rogobete Christian on 03.02.18.
// Copyright © 2018 Soneso. All rights reserved.
//
import XCTest
import stellarsdk
class AssetsRemoteTestCase: XCTestCase {
let sdk = StellarSDK()
let testKeyPair = try! KeyPair.generateRandomKeyPair()
... | 45,103 |
https://github.com/JetBrains/MPS/blob/master/languages/baseLanguage/baseLanguage/source_gen/jetbrains/mps/baseLanguage/typesystem/ClassifierMethodsHierarchyChecker.java | Github Open Source | Open Source | LicenseRef-scancode-free-unknown, Apache-2.0, LicenseRef-scancode-unknown-license-reference | 2,023 | MPS | JetBrains | Java | Code | 925 | 4,781 | package jetbrains.mps.baseLanguage.typesystem;
/*Generated by MPS */
import org.jetbrains.mps.openapi.model.SNode;
import org.jetbrains.annotations.NotNull;
import java.util.List;
import jetbrains.mps.baseLanguage.behavior.Classifier__BehaviorDescriptor;
import org.jetbrains.mps.annotations.Mutable;
import jetbrains.... | 12,190 |
https://github.com/motae99/web/blob/master/vendor/bower-asset/fullcalendar/src/main.ts | Github Open Source | Open Source | BSD-3-Clause | null | web | motae99 | TypeScript | Code | 269 | 628 | import * as $ from 'jquery'
import namespaceHooks from './namespace-hooks'
import * as namespaceExports from './namespace-exports'
import { warn } from './util'
import Calendar from './Calendar'
// for intentional side-effects
import './moment-ext'
import './date-formatting'
import './models/event-source/config'
impor... | 14,309 |
https://github.com/Pirouf/acrn-hypervisor/blob/master/debian/patches/0018-hv-hypercall-return-0-for-empty-PX-or-CX-tables.patch | Github Open Source | Open Source | BSD-3-Clause | 2,021 | acrn-hypervisor | Pirouf | null | Spoken | 159 | 690 | From: Helmut Buchsbaum <helmut.buchsbaum@opensource.tttech-industrial.com>
Date: Fri, 25 Sep 2020 08:56:11 +0200
Subject: hv: hypercall: return 0 for empty PX or CX tables
Avoid failing hypercalls by returning 0 for empty PX and CX tables on
HC_PM_GET_CPU_STATE/PMCMD_GET_PX_CNT and
HC_PM_GET_CPU_STATE/PMCMD_GET_CX_CNT... | 11,779 |
https://github.com/BadOPCode/fullstack-serve/blob/master/bin/clean.ts | Github Open Source | Open Source | MIT | null | fullstack-serve | BadOPCode | TypeScript | Code | 39 | 117 | #!/bin/env ts-node
import * as shell from "shelljs";
export function CleanCoverage() {
shell.rm('-r', "coverage");
}
export function CleanLib() {
shell.rm('-r', "lib");
}
export function CleanTests() {
shell.rm('-r', "tests");
}
export function Clean() {
CleanCoverage();
CleanLib();
Clea... | 27,513 |
https://github.com/EricEduardoPucAzcorra/SantaMaria/blob/master/database/migrations/2014_10_11_052640_create_roles_table.php | Github Open Source | Open Source | MIT | null | SantaMaria | EricEduardoPucAzcorra | PHP | Code | 79 | 372 | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
use Illuminate\Support\Facades\DB;
return new class extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Sch... | 54,007 |
https://github.com/apache/brooklyn-server/blob/master/core/src/main/java/org/apache/brooklyn/core/mgmt/ha/BrooklynBomOsgiArchiveInstaller.java | Github Open Source | Open Source | Apache-2.0, OFL-1.1, LicenseRef-scancode-public-domain, MIT, LicenseRef-scancode-proprietary-license | 2,023 | brooklyn-server | apache | Java | Code | 5,155 | 15,513 | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you ... | 37,700 |
https://github.com/RichardCory/svgpp/blob/master/src/demo/render/parser_msxml.hpp | Github Open Source | Open Source | BSL-1.0 | 2,022 | svgpp | RichardCory | C++ | Code | 53 | 186 | #pragma once
#ifndef NOMINMAX
# define NOMINMAX 1
#endif
#include <MsXml2.h>
#include <windows.h>
#undef small
#include <svgpp/policy/xml/msxml.hpp>
#include <boost/noncopyable.hpp>
typedef boost::intrusive_ptr<IXMLDOMNode> XMLElement;
typedef std::wstring svg_string_t;
class XMLDocument
{
public:
XMLDocument();
... | 37,469 |
https://github.com/R1chChapp3rs/P3bble/blob/master/src/P3bble.Core/Constants/P3bbleEndpoint.cs | Github Open Source | Open Source | BSD-3-Clause | 2,013 | P3bble | R1chChapp3rs | C# | Code | 76 | 202 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace P3bble.Core.Constants
{
internal enum P3bbleEndpoint
{
Firmware = 1,
Time = 11,
Version = 16,
PhoneVersion = 17,
SystemMessage = 18,
Mus... | 17,503 |
https://github.com/NCAR/titan-java/blob/master/codebase/java/src/edu/ucar/rap/titan/RdasControl/ClockTest.java | Github Open Source | Open Source | BSD-3-Clause | 2,017 | titan-java | NCAR | Java | Code | 832 | 2,569 | ///////////////////////////////////////////////////////////////////////
//
// ClockTest
//
// Mike Dixon
//
// March 2003
//
////////////////////////////////////////////////////////////////////////
package edu.ucar.rap.titan.RdasControl;
import java.awt.*;
import java.awt.event.*;
import java.awt.image.*;
import java... | 7,053 |
https://github.com/latsarr/OpenAPI-Client-Gen/blob/master/src/dc/openapi/client/Spec.cls | Github Open Source | Open Source | MIT | 2,020 | OpenAPI-Client-Gen | latsarr | null | Spoken | 577 | 2,022 | Class dc.openapi.client.Spec Extends %RegisteredObject
{
Parameter XDataName = "OpenAPI";
XData OpenAPI [ MimeType = application/json ]
{
{ "swagger":"2.0" }
}
/// Generate the client classes<br/>
/// Specify your application package in appName argument.<br/>
/// spec is the open api 2.0 specification in JSON Format... | 50,738 |
https://github.com/paulvollmer/swagger-walk/blob/master/docs/script/search_index.js | Github Open Source | Open Source | MIT | null | swagger-walk | paulvollmer | JavaScript | Code | 626 | 7,285 | window.esdocSearchIndex = [
[
"swagger-walk/src/definition.js~definition",
"class/src/definition.js~Definition.html",
"<span>Definition</span> <span class=\"search-result-import-path\">swagger-walk/src/definition.js</span>",
"class"
],
[
"swagger-walk/src/definitions.js~definitions",
"clas... | 53,234 |
https://github.com/jasonronalddavis/CUSTOM_JEWELRY/blob/master/config.ru | Github Open Source | Open Source | MIT | 2,021 | CUSTOM_JEWELRY | jasonronalddavis | Ruby | Code | 44 | 119 | #$LOAD_PATH.unshift '.'
require './config/environment'
require 'rack'
use Rack::Static, urls: ['/css'], root: 'public' # Rack fix allows seeing the css folder.
if ActiveRecord::Migrator.needs_migration?
raise "Migrations are pending. Run rake db:migrate to resolve the issue"
end
use Rack::MethodOverride
use Use... | 9,213 |
https://github.com/ApolloDev/apollo/blob/master/apollo-translator-service/src/main/java/edu/pitt/apollo/translatorservice/thread/TranslationThread.java | Github Open Source | Open Source | Apache-2.0 | 2,015 | apollo | ApolloDev | Java | Code | 251 | 1,035 | package edu.pitt.apollo.translatorservice.thread;
import edu.pitt.apollo.apollotranslator.types.translator.TranslationMode;
import edu.pitt.apollo.db.ApolloDbUtils;
import edu.pitt.apollo.db.exceptions.ApolloDatabaseException;
import edu.pitt.apollo.db.exceptions.ApolloDatabaseKeyNotFoundException;
import edu.pitt.apo... | 44,789 |
https://github.com/yuweiguocn/build-system/blob/master/gradle-api/src/main/java/com/android/build/api/dsl/options/SplitOptions.kt | Github Open Source | Open Source | Apache-2.0 | 2,019 | build-system | yuweiguocn | Kotlin | Code | 257 | 462 | /*
* Copyright (C) 2014 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by app... | 47,644 |
https://github.com/andresguanov/practico-next/blob/master/hooks/useGetProducts.ts | Github Open Source | Open Source | MIT | null | practico-next | andresguanov | TypeScript | Code | 32 | 108 | import { useEffect, useState } from "react"
const useGetProducts = (API:string) => {
const [products, setProducts] = useState<Product[]>([])
useEffect(function(){
fetch(API)
.then(res => res.json())
.then(setProducts)
}, [API])
return products
}
export default useGetProducts
| 18,884 |
https://github.com/hs536/orb/blob/master/orbmain/src/main/java/com/sun/corba/ee/impl/oa/toa/TOAFactory.java | Github Open Source | Open Source | BSD-3-Clause | null | orb | hs536 | Java | Code | 337 | 991 | /*
* Copyright (c) 1997, 2018 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Distribution License v. 1.0, which is available at
* http://www.eclipse.org/org/documents/edl-v10.php.
*
* SPDX-License-Identifier: ... | 13,433 |
https://github.com/alainmarcel/Surelog/blob/master/tests/ConstantNoElabUhdm/dut.sv | Github Open Source | Open Source | Apache-2.0 | 2,023 | Surelog | alainmarcel | null | Spoken | 26 | 70 |
typedef struct packed {logic [3:0] a;} my_struct_packed_t;
module top (
output my_struct_packed_t out3,
output wire out4
);
assign out4 = (out3 == '1);
endmodule : top
| 19,744 |
https://github.com/Zedonboy/core/blob/master/source/log/source/log_policy_format.c | Github Open Source | Open Source | Apache-2.0 | null | core | Zedonboy | C | Code | 103 | 478 | /*
* Logger Library by Parra Studios
* Copyright (C) 2016 - 2019 Vicente Eduardo Ferrer Garcia <vic798@gmail.com>
*
* A generic logger library providing application execution reports.
*
*/
/* -- Headers -- */
#include <log/log_policy_format.h>
#include <log/log_aspect_format.h>
#include <log/log_policy_format_b... | 32,197 |
https://github.com/SchapplM/robsynth-serroblib/blob/master/mdl_5dof/S5RPRPP5/hd/S5RPRPP5_energypot_fixb_regmin_slag_vp.m | Github Open Source | Open Source | MIT | 2,022 | robsynth-serroblib | SchapplM | MATLAB | Code | 387 | 1,148 | % Calculate minimal parameter regressor of potential energy for
% S5RPRPP5
% Use Code from Maple symbolic Code Generation
%
% Input:
% qJ [5x1]
% Generalized joint coordinates (joint angles)
% g [3x1]
% gravitation vector in mdh base frame [m/s^2]
% pkin [6x1]
% kinematic parameters (e.g. lengths of the links)
%... | 32,193 |
https://github.com/dt/mixtape/blob/master/app/controllers/Application.scala | Github Open Source | Open Source | BSD-3-Clause | 2,019 | mixtape | dt | Scala | Code | 295 | 1,050 | package controllers
import play.api._
import play.api.mvc._
import play.api.libs.iteratee._
import play.api.libs.json._
import play.api.libs.json.Json._
import play.api.libs.concurrent.Execution.Implicits.defaultContext
import scala.concurrent.Future
import lib.{Gravatar, RdioApi}
import model._
import model.ModelJson... | 1,576 |
https://github.com/Voultapher/minijinja/blob/master/minijinja/tests/snapshots/test_compiler__bool_ops.snap | Github Open Source | Open Source | Apache-2.0 | 2,021 | minijinja | Voultapher | null | Spoken | 50 | 185 | ---
source: tests/test_compiler.rs
expression: "&c"
---
Compiler {
instructions: [
00000 | LOOKUP (var "first") [<unknown>:0],
00001 | JUMP_IF_FALSE_OR_POP (to 00005) [<unknown>:0],
00002 | LOOKUP (var "second") [<unknown>:0],
00003 | JUMP_IF_TRUE_OR_POP (to 00005) [<unknown... | 122 |
https://github.com/peoplelist/peoplelist-react-demo/blob/master/src/actions/index.js | Github Open Source | Open Source | MIT | null | peoplelist-react-demo | peoplelist | JavaScript | Code | 98 | 275 | import C from '../common/js/constants';
import uuid from 'uuid';
export const add = (data) => {
var date = new Date().toISOString();
return Object.assign({}, data, {
type: C.ADD,
id: uuid.v4().split('-')[0],
completed: 'false',
updateTime: date,
createTime: date
});
... | 25,454 |
https://github.com/markaren/krender/blob/master/render-api/src/main/kotlin/info/laht/krender/mesh/BoxMesh.kt | Github Open Source | Open Source | MIT | 2,020 | krender | markaren | Kotlin | Code | 723 | 1,626 | package info.laht.krender.mesh
import org.joml.Vector3f
class BoxMesh(
override var width: Float = 1f,
override var height: Float = 1f,
override var depth: Float = 1f,
private var widthSegments: Int = 1,
private var heightSegments: Int = 1,
private var depthSegments: Int = 1
) : TrimeshShape, ... | 11,652 |
https://github.com/ItsNotYou/autorensystem/blob/master/js/authoring/controllers/modalWindows/helpModalWindowController.js | Github Open Source | Open Source | MIT | null | autorensystem | ItsNotYou | JavaScript | Code | 35 | 81 | /**
* Created by tobias on 14.10.15.
*/
$(function() {
// set the trigger for the help modal window
$("#showHelp").on("click", showHelp);
});
/**
* Function shows help modal window
*/
function showHelp() {
showModalWindow($("#modal-help"));
}
| 50,448 |
https://github.com/fhornain/patternfly-react-seed_1/blob/master/node_modules/@patternfly/react-charts/dist/js/components/ChartPoint/ChartPoint.d.ts | Github Open Source | Open Source | MIT | null | patternfly-react-seed_1 | fhornain | TypeScript | Code | 353 | 661 | import * as React from 'react';
export interface ChartPointProps {
/**
* A flag signifying whether the component is active
*/
active?: boolean;
/**
* The class name that will be applied to the rendered element
*/
className?: string;
/**
* TRhe clip path
*/
clipPath?... | 11,101 |
https://github.com/Artemser1/yii2-template/blob/master/frontend/web/scss/b/_register.scss | Github Open Source | Open Source | BSD-3-Clause | null | yii2-template | Artemser1 | SCSS | Code | 93 | 336 | .register{
display: flex;
flex-direction: column;
margin: auto;
max-width: 550px;
&__row {
border-bottom: 1px solid #505050;
display: flex;
align-items: center;
justify-content: space-between;
padding: 25px;
color: #b8b8b8;
p{
margin: 0 25px 0 0;
font-size: 22px;
... | 28,805 |
https://github.com/Joshfindit/Codeacademy.JS/blob/master/javascript-beginner-en-6LzGd (Introduction to Functions in JS)/7.js | Github Open Source | Open Source | MIT | null | Codeacademy.JS | Joshfindit | JavaScript | Code | 31 | 67 | // Parameter is a number, and we do math with that parameter
var timesTwo = function(number) {
return number * 2;
};
// Call timesTwo here!
var newNumber = timesTwo(1393829387298734872);
console.log(newNumber);
| 28,445 |
https://github.com/suraj-adewale/GlobalBiobankEngine/blob/master/scidb/rivas/streaming_parser.R | Github Open Source | Open Source | MIT | 2,021 | GlobalBiobankEngine | suraj-adewale | R | Code | 19 | 100 | source('/home/scidb/GlobalBiobankEngine/scidb/database_load.R')
library(scidbstrm)
args = commandArgs(trailingOnly=TRUE)
if(args[1] == "parse_variants")
{
print("Calling parse variants")
return(map(parse_variants))
} else
{
stop("Unknown arguments")
} | 33,642 |
https://github.com/run-ai/runai-cli/blob/master/pkg/helpers/helpers.go | Github Open Source | Open Source | ECL-2.0, Apache-2.0 | 2,021 | runai-cli | run-ai | Go | Code | 47 | 157 | package helpers
import (
v1 "k8s.io/api/core/v1"
)
func kubeQuantityToFloat64(rl v1.ResourceList, key v1.ResourceName) float64 {
num, ok := rl[key]
if ok {
return float64(num.Value())
}
return 0
}
func kubeQuantityToMilliFloat64(rl v1.ResourceList, key v1.ResourceName) float64 {
num, ok := rl[key]
if ok {
... | 32,901 |
https://github.com/johndpope/SwiftRewriter/blob/master/Sources/SwiftRewriterLib/Intentions/Intention.swift | Github Open Source | Open Source | LicenseRef-scancode-warranty-disclaimer, MIT, BSD-3-Clause, BSD-2-Clause | 2,018 | SwiftRewriter | johndpope | Swift | Code | 86 | 168 | import GrammarModels
/// An intention represents the intent of the code transpiler to generate a
/// file/class/struct/property/etc. with Swift code.
public protocol Intention: class, Historic {
/// Reference to an AST node that originated this source-code generation
/// intention
var source: ASTNode? { ge... | 4,694 |
https://github.com/phoenix-nicholson/making-a-website/blob/master/app.js | Github Open Source | Open Source | LicenseRef-scancode-public-domain | 2,021 | making-a-website | phoenix-nicholson | JavaScript | Code | 25 | 88 |
const nameElement = document.getElementById('name');
const updateButton = document.getElementById('update-button');
const nameInput = document.getElementById('name-input');
updateButton.addEventListener('click', () => {
console.log('hello')
const name = nameInput.value;
nameElement.textContent = name;
}... | 2,257 |
https://github.com/qssq/smart_grid_pageview/blob/master/example/lib/main.dart | Github Open Source | Open Source | MIT | null | smart_grid_pageview | qssq | Dart | Code | 201 | 670 | import 'package:flutter/material.dart';
import 'package:smart_gridded_pageview/grid_pageview.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Material App',
home: Scaffold(
appBar: AppBar... | 35,973 |
https://github.com/eliflores/loteria-espacial/blob/master/src/app/app.module.ts | Github Open Source | Open Source | MIT | null | loteria-espacial | eliflores | TypeScript | Code | 93 | 297 | import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import { BoardSelectionComponent } from './board-selection/board-selection.component';
import { HeaderComponent }... | 42,618 |
https://github.com/uPhyca/robota/blob/master/robota-engine/robota-engine-core/src/main/java/com/uphyca/robota/engine/MessageBundle.java | Github Open Source | Open Source | Apache-2.0 | 2,014 | robota | uPhyca | Java | Code | 548 | 1,761 | /*
* Copyright (C) 2014 uPhyca Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agree... | 9,271 |
https://github.com/ogerardin/back2back/blob/master/core/src/main/java/org/ogerardin/b2b/batch/jobs/listeners/BackupSetStatusPublisher.java | Github Open Source | Open Source | MIT | 2,018 | back2back | ogerardin | Java | Code | 62 | 223 | package org.ogerardin.b2b.batch.jobs.listeners;
import org.ogerardin.b2b.domain.entity.BackupSet;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.messaging.simp.SimpMessagingTemplate;
import org.springframework.stereotype.Component;
/**
* A simple publisher that publishes a ... | 11,404 |
https://github.com/unganisha/circe-sconfig/blob/master/project/NpmDependenciesPlugin.scala | Github Open Source | Open Source | Apache-2.0 | null | circe-sconfig | unganisha | Scala | Code | 90 | 309 | import _root_.io.circe
import _root_.io.circe.generic.auto._
import org.scalajs.sbtplugin.ScalaJSPlugin
import sbt.Keys._
import sbt.{Def, _}
object NpmDependenciesPlugin extends AutoPlugin {
override def trigger = allRequirements
override def requires: Plugins = ScalaJSPlugin
override def buildSettings: Seq[... | 18,856 |
https://github.com/intel/dffml/blob/master/model/daal4py/examples/lr/lr.py | Github Open Source | Open Source | MIT, LicenseRef-scancode-generic-export-compliance | 2,023 | dffml | intel | Python | Code | 77 | 255 | from dffml import CSVSource, Features, Feature
from dffml.noasync import train, score, predict
from dffml_model_daal4py.daal4pylr import DAAL4PyLRModel
from dffml.accuracy import MeanSquaredErrorAccuracy
model = DAAL4PyLRModel(
features=Features(Feature("f1", float, 1)),
predict=Feature("ans", int, 1),
loc... | 38,685 |
https://github.com/nlittlepoole/horcrux/blob/master/cmd/serve/main.go | Github Open Source | Open Source | MIT | null | horcrux | nlittlepoole | Go | Code | 45 | 178 | package main
import (
"os"
"net/http"
"html/template"
"github.com/nlittlepoole/horcrux"
)
var AppTemplatePath string
func runTemplatedApp(w http.ResponseWriter, req *http.Request) {
parsedTemplate, _ := template.ParseFiles(AppTemplatePath)
if err := parsedTemplate.Execute(w, horcrux.GetEnvironme... | 36,882 |
https://github.com/di3gosl/ht-sensor-app/blob/master/src/components/Header/Header.scss | Github Open Source | Open Source | MIT | 2,020 | ht-sensor-app | di3gosl | SCSS | Code | 38 | 129 | header {
padding-top: 15px;
padding-bottom: 15px;
background-color: #333;
color: #fff;
.logo {
color: #fff;
i {
font-size: 28px;
margin-right: 15px;
}
.title {
font-size: 18px;
}
}
.right-menu {
i {
font-size: 18px;
cursor: pointer;
}
}
}
| 48,671 |
https://github.com/vkiesewetter/pandapower/blob/master/pandapower/timeseries/output_writer.py | Github Open Source | Open Source | BSD-3-Clause | 2,019 | pandapower | vkiesewetter | Python | Code | 1,603 | 4,444 | # -*- coding: utf-8 -*-
# Copyright (c) 2016-2019 by University of Kassel and Fraunhofer Institute for Energy Economics
# and Energy System Technology (IEE), Kassel. All rights reserved.
import functools
import os
from time import time
import numpy as np
import pandas as pd
try:
import pplog
except ImportError:
... | 14,277 |
https://github.com/atoy322/CountDown/blob/master/CommonTest/main_script.js | Github Open Source | Open Source | MIT | null | CountDown | atoy322 | JavaScript | Code | 57 | 167 | var label = "共通テスト1日目";
var target_date = new Date(2023, 1-1, 14, 0, 0, 0, 0);
function onload() {
document.getElementById("label").innerHTML = label + "まであと";
document.getElementById("unit").innerHTML = "秒";
setInterval(main, 10);
}
function main() {
var headline = document.getElementById("time");
... | 33,652 |
https://github.com/Avenriy/SoilMonitor-nodejs/blob/master/node_modules/obniz/dist/src/obniz/libs/io_peripherals/pwm.d.ts | Github Open Source | Open Source | MIT | null | SoilMonitor-nodejs | Avenriy | TypeScript | Code | 516 | 1,278 | /**
* @packageDocumentation
* @module ObnizCore.Components
*/
import Obniz from "../../index";
import { ComponentAbstract } from "../ComponentAbstact";
import { DriveType, PullType } from "./common";
interface PeripheralPWMOptions {
/**
* device io number
*/
io: number;
drive?: DriveType;
p... | 4,225 |
https://github.com/rubenarslan/formr.org/blob/master/sql/patches/034_add_session_id_to_email_queue.sql | Github Open Source | Open Source | BSD-2-Clause-Views | 2,023 | formr.org | rubenarslan | SQL | Code | 69 | 232 | ALTER TABLE `survey_email_log` ADD COLUMN `account_id` INT(10) unsigned;
ALTER TABLE `survey_email_log` ADD COLUMN `subject` VARCHAR(355);
ALTER TABLE `survey_email_log` ADD COLUMN `message` TEXT;
ALTER TABLE `survey_email_log` ADD COLUMN `meta` TEXT;
ALTER TABLE `survey_email_log` ADD COLUMN `status` TINYINT(1);
ALTER... | 34,824 |
https://github.com/wangsikai/learn/blob/master/yoo-domain-master-1d29d9118d5aefde5f17648046c36cbb0cbb7d1b/domain-common/src/main/java/com/lanking/cloud/domain/common/resource/card/ExaminationPointCard.java | Github Open Source | Open Source | Apache-2.0 | 2,019 | learn | wangsikai | Java | Code | 320 | 1,094 | package com.lanking.cloud.domain.common.resource.card;
import java.io.Serializable;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Lob;
import javax.persistence.Table;
import org.h... | 42,592 |
https://github.com/limingxinleo/i-cache/blob/master/src/RateLimiting/Limit.php | Github Open Source | Open Source | MIT | 2,021 | i-cache | limingxinleo | PHP | Code | 325 | 792 | <?php
declare(strict_types=1);
/**
* This file is part of Hyperf.
*
* @link https://www.hyperf.io
* @document https://hyperf.wiki
* @contact group@hyperf.io
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/
namespace Illuminate\Cache\RateLimiting;
class Limit
{
/**
* The rate li... | 26,851 |
https://github.com/RIPBackdoored/Backdoored-1.7-Deobf-Source-Leak/blob/master/org/json/HTTPTokener.java | Github Open Source | Open Source | MIT | 2,020 | Backdoored-1.7-Deobf-Source-Leak | RIPBackdoored | Java | Code | 91 | 251 | package org.json;
public class HTTPTokener extends JSONTokener {
public HTTPTokener(String string) {
super(string);
}
public String nextToken() throws JSONException {
StringBuilder sb = new StringBuilder();
char c;
do {
c = this.next();
} while(Character.isWhitespace(c... | 13,148 |
https://github.com/401Midterm/CompeteMe/blob/master/__test__/routes/activity/route-activity-put.test.js | Github Open Source | Open Source | MIT | null | CompeteMe | 401Midterm | JavaScript | Code | 164 | 622 |
'use strict';
const mock = require('../../lib/mock');
const superagent = require('superagent');
const server = require('../../../lib/server');
const Activity = require('../../../model/activity');
require('jest');
var mockActivity;
var mockAdmin;
var testData;
describe('PUT /api/v1/users/:id?', function() {
before... | 46,789 |
https://github.com/kyma-incubator/documentation-component/blob/master/playground/src/mocks/openapi/index.ts | Github Open Source | Open Source | Apache-2.0 | 2,023 | documentation-component | kyma-incubator | TypeScript | Code | 54 | 215 | import StringifiedJSON from "./string";
import JSON from "./json";
import YAMLV2 from "./yaml-v2";
import YAMLV3 from "./yaml-v3";
import LargeSpec from "./large-spec";
import XFMock from "./xf-mock/api";
import AssistedWS from "./commerce-mocks/assisted-service-web-services";
import CouponWS from "./commerce-mocks/cou... | 32,548 |
https://github.com/a-dauria/bleyz-crew/blob/master/resources/views/index.blade.php | Github Open Source | Open Source | MIT | 2,020 | bleyz-crew | a-dauria | Blade | Code | 4 | 23 | @extends('layout')
@section('title')
Accueil
@endsection
| 24,726 |
https://github.com/jarad/dep/blob/master/src/wepp2010.1/swu.for | Github Open Source | Open Source | MIT | 2,019 | dep | jarad | null | Spoken | 939 | 2,339 | subroutine swu(nowcrp)
c
c********************************************************************
c note: subroutine to be modified according to plant growth *
c model input requirement *
c********************************************************************
c
c +... | 33,416 |
https://github.com/askd/animakit/blob/master/src/components/AnimakitSlider/utils.es6 | Github Open Source | Open Source | MIT | 2,018 | animakit | askd | JavaScript | Code | 1 | 16 | ../../../../animakit-slider/lib/utils.es6 | 46,039 |
https://github.com/fiatinsight/fiat_publication/blob/master/app/models/fiat_publication/content_label_assignment.rb | Github Open Source | Open Source | MIT | 2,022 | fiat_publication | fiatinsight | Ruby | Code | 29 | 96 | module FiatPublication
class ContentLabelAssignment < ApplicationRecord
include Tokenable
self.table_name = "fi_content_label_assignments"
belongs_to :content_label
belongs_to :assignable, polymorphic: true, touch: true
validates :content_label, presence: true
validates :assignable, presenc... | 40,464 |
https://github.com/Harry-zklcdc/OnlineJudge/blob/master/account/migrations/0016_auto_20200802_1040.py | Github Open Source | Open Source | MIT | 2,021 | OnlineJudge | Harry-zklcdc | Python | Code | 35 | 157 | # Generated by Django 2.1.7 on 2020-08-02 02:40
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('account', '0015_auto_20200421_1715'),
]
operations = [
migrations.AddField(
model_name='user',
name='title',
... | 3,606 |
https://github.com/Asymmetrik/nifi-nar-bundles/blob/master/nifi-asymmetrik-standard-bundle/nifi-asymmetrik-standard-processors/src/test/java/com/asymmetrik/nifi/processors/mongo/StoreInMongoIT.java | Github Open Source | Open Source | Apache-2.0 | 2,021 | nifi-nar-bundles | Asymmetrik | Java | Code | 1,233 | 5,588 | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | 43,349 |
https://github.com/jcumming/nixpkgs/blob/master/pkgs/development/python-modules/homepluscontrol/default.nix | Github Open Source | Open Source | MIT | 2,021 | nixpkgs | jcumming | null | Spoken | 104 | 312 | { lib
, aiohttp
, aioresponses
, buildPythonPackage
, fetchFromGitHub
, pyjwt
, pytestCheckHook
, pythonOlder
, yarl
}:
buildPythonPackage rec {
pname = "homepluscontrol";
version = "0.0.61";
disabled = pythonOlder "3.6";
src = fetchFromGitHub {
owner = "chemaaa";
repo = pname;
rev = version;
... | 34,117 |
https://github.com/florian-die/socp/blob/master/tests/testCovid19.cpp | Github Open Source | Open Source | BSD-3-Clause | 2,021 | socp | florian-die | C++ | Code | 742 | 1,727 | /*
* testCovid19.cpp
*
* Created on: April 19, 2020
* Author: Bruno HERISSE (ONERA/DTIS)
*/
/*
* Using a SEIR model for the covid-19 epidemic, the problem considered here is the following:
* - Control lockdown with minimum effort (in a quadratic way). This is motivated by the fact that lockdown effort has... | 17,202 |
https://github.com/elmsln/lrnwebcomponents/blob/master/elements/cms-hax/test/cms-hax.test.js | Github Open Source | Open Source | Apache-2.0 | 2,023 | lrnwebcomponents | elmsln | JavaScript | Code | 1,130 | 2,468 | import { fixture, expect, html } from "@open-wc/testing";
import "../cms-hax.js";
describe("cms-hax test", () => {
let element;
beforeEach(async () => {
element = await fixture(html`<cms-hax
element-align="left"
end-point="/dmd100/hax-node-save/1848/VXfGSpbA2T_bCl31L3E5k8YDlnqf30fvTUu2cP5Y-n8"
... | 13,485 |
https://github.com/maMingNow/brave/blob/master/archive/brave-jaxrs2/src/main/java/com/github/kristofa/brave/jaxrs2/MaybeAddClientAddressFromRequest.java | Github Open Source | Open Source | Apache-2.0 | 2,017 | brave | maMingNow | Java | Code | 78 | 283 | package com.github.kristofa.brave.jaxrs2;
import com.github.kristofa.brave.Brave;
import com.github.kristofa.brave.ServerResponseInterceptor;
import com.github.kristofa.brave.internal.MaybeAddClientAddress;
import javax.ws.rs.container.ContainerRequestContext;
import zipkin.Constants;
/**
* Parses the {@link Constan... | 14,029 |
https://github.com/edawson/parliament2/blob/master/resources/usr/lib/root/etc/dictpch/io/io/inc/LinkDef.h | Github Open Source | Open Source | LGPL-2.1-only, Apache-2.0 | 2,020 | parliament2 | edawson | C | Code | 249 | 633 | /* @(#)root/io:$Id$ */
/*************************************************************************
* Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
* All rights reserved. *
* ... | 36,522 |
https://github.com/fprochazka/nette-dist-versions-speed/blob/master/composer/libs/nette/nette/Nette/Config/Extensions/NetteAccessor.php | Github Open Source | Open Source | PHP-3.0, IJG, PHP-3.01, Zend-2.0 | 2,016 | nette-dist-versions-speed | fprochazka | PHP | Code | 127 | 393 | <?php
/**
* This file is part of the Nette Framework (http://nette.org)
*
* Copyright (c) 2004 David Grudl (http://davidgrudl.com)
*
* For the full copyright and license information, please view
* the file license.txt that was distributed with this source code.
*/
namespace Nette\Config\Extensions;
use Nette;... | 45,052 |
https://github.com/MrCuiHongbao/Display/blob/master/Display/Display/AObject+C.m | Github Open Source | Open Source | MIT | 2,019 | Display | MrCuiHongbao | Objective-C | Code | 32 | 104 | //
// AObject+C.m
// Display
//
// Created by hongbao.cui on 2019/6/21.
// Copyright © 2019年 hongbao.cui. All rights reserved.
//
#import "AObject+C.h"
@implementation AObject (C)
- (void)method {
NSLog(@"print---------->log----->cccccc");
}
@end
| 24,040 |
https://github.com/Dio990521/BanGDreamWiki/blob/master/flutter_bangdream_wiki/lib/PageContent/FBPage.dart | Github Open Source | Open Source | MIT | 2,020 | BanGDreamWiki | Dio990521 | Dart | Code | 235 | 735 | import 'package:flutter/material.dart';
import 'package:cloud_firestore/cloud_firestore.dart';
/// for developer to update data to firestore
class FBPage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Column(
children: <Widget>[
RaisedButton(
child: Tex... | 25,467 |
https://github.com/sourcegraph/sourcegraph/blob/master/migrations/frontend/1528395799_add_clone_status_conditional_indexes.up.sql | Github Open Source | Open Source | Apache-2.0, LicenseRef-scancode-warranty-disclaimer, LicenseRef-scancode-unknown-license-reference | 2,022 | sourcegraph | sourcegraph | PLpgSQL | Code | 74 | 190 | BEGIN;
-- Having three partial indexes should be faster since when the condition is met the index used will be
-- smaller meaning it will be faster to scan.
CREATE INDEX IF NOT EXISTS gitserver_repos_cloned_status_idx ON gitserver_repos (repo_id) WHERE clone_status = 'cloned';
CREATE INDEX IF NOT EXISTS gitserver_repo... | 3,603 |
https://github.com/iamanamoebas/Tinder/blob/master/client/components/AppBody.jsx | Github Open Source | Open Source | MIT | 2,016 | Tinder | iamanamoebas | JavaScript | Code | 52 | 201 | const {Link} = ReactRouter;
AppBody = React.createClass({
render() {
return (
<div className="ionic-body">
<div className="bar bar-header bar-light">
<Link className="button button-icon icon ion-gear-a" to={"/settings"}></Link>
<Link className="h1 title" to={"/"}>App Name</Link>
... | 7,992 |
https://github.com/marijngoedegebure/NarrativeWorldCreator/blob/master/SemanticsEngine/Components/RelationshipEstablishmentBase.cs | Github Open Source | Open Source | Unlicense | null | NarrativeWorldCreator | marijngoedegebure | C# | Code | 372 | 980 | /**************************************************************************
*
* RelationshipEstablishmentBase.cs
*
* Jassin Kessing
* Computer Graphics & CAD/CAM Group
* TU Delft
* 2011
*
* This program is free software; you can redistribute it and/or modify it.
*
****************************************... | 43,191 |
https://github.com/MaxDenusenko/conference/blob/master/views/archive/index.php | Github Open Source | Open Source | BSD-3-Clause | null | conference | MaxDenusenko | PHP | Code | 58 | 222 | <?php
/* @var $this yii\web\View */
/* @var $archive app\models\Archive */
$this->title = Yii::$app->name;
?>
<div class="container text-center mt-lg-12 mt-4 mb-4">
<div class="row flex justify-content-center align-items-center">
<?php foreach ($archive as $item) :?>
<div class="cart-archive my-3 ... | 18,592 |
https://github.com/okaybroda/Rocket.Chat/blob/master/packages/rocketchat-grant-google/server/index.js | Github Open Source | Open Source | MIT | 2,021 | Rocket.Chat | okaybroda | JavaScript | Code | 107 | 347 | import { Providers, GrantError } from 'meteor/rocketchat:grant';
import { HTTP } from 'meteor/http';
const userAgent = 'Meteor';
function getIdentity(accessToken) {
try {
return HTTP.get(
'https://www.googleapis.com/oauth2/v1/userinfo', {
headers: { 'User-Agent': userAgent },
params: {
access_token... | 44,314 |
https://github.com/blnz/palomar/blob/master/src/main/java/com/blnz/xsl/expr/EmptyVariableSet.java | Github Open Source | Open Source | MIT | null | palomar | blnz | Java | Code | 27 | 89 | // $Id: EmptyVariableSet.java 96 2005-02-28 21:07:29Z blindsey $
package com.blnz.xsl.expr;
import com.blnz.xsl.om.*;
public class EmptyVariableSet implements VariableSet
{
public boolean contains(Name name)
{
return false;
}
}
| 38,438 |
https://github.com/bentodev/bentolang/blob/master/src/bento/parser/ParsedIntegerLiteral.java | Github Open Source | Open Source | MIT | 2,017 | bentolang | bentodev | Java | Code | 229 | 605 | /* Bento
*
* $Id: ParsedIntegerLiteral.java,v 1.5 2013/10/29 13:24:35 sthippo Exp $
*
* Copyright (c) 2002-2013 by bentodev.org
*
* Use of this code in source or compiled form is subject to the
* Bento Poetic License at http://www.bentodev.org/poetic-license.html
*/
package bento.parser;
import bento.lang.*;
... | 52,616 |
https://github.com/kamaudan/scalaz-stream/blob/master/src/main/scala/scalaz/stream/io.scala | Github Open Source | Open Source | MIT | null | scalaz-stream | kamaudan | Scala | Code | 1,645 | 3,877 | package scalaz.stream
import java.io._
import scalaz.concurrent.Task
import scodec.bits.ByteVector
import scala.annotation.tailrec
import scala.io.{Codec, Source}
import Process._
/**
* Module of `Process` functions and combinators for file and network I/O.
*/
object io {
// NB: methods are in alphabetical o... | 49,672 |
https://github.com/hortonworks/cloudbreak/blob/master/flow/src/main/java/com/sequenceiq/flow/reactor/api/handler/HandlerEvent.java | Github Open Source | Open Source | LicenseRef-scancode-warranty-disclaimer, ANTLR-PD, CDDL-1.0, bzip2-1.0.6, Zlib, BSD-3-Clause, MIT, EPL-1.0, LicenseRef-scancode-proprietary-license, LicenseRef-scancode-jdbm-1.00, Apache-2.0, LicenseRef-scancode-unknown-license-reference | 2,023 | cloudbreak | hortonworks | Java | Code | 59 | 191 | package com.sequenceiq.flow.reactor.api.handler;
import com.sequenceiq.cloudbreak.eventbus.Event;
public class HandlerEvent<T> {
private Event<T> event;
private int eventCounter;
public HandlerEvent(Event<T> event) {
this.event = event;
}
public Event<T> getEvent() {
return eve... | 16,913 |
https://github.com/statisticspoland/VTL-Processing/blob/master/TestDatabase/Security/Schemas/String_length.sql | Github Open Source | Open Source | MIT | null | VTL-Processing | statisticspoland | SQL | Code | 3 | 11 | CREATE SCHEMA [String_length] | 30,815 |
https://github.com/Emajm/E-commerce-website-Supermarket/blob/master/admin/language/it-it/purpletree_multivendor/managesubscriptionplan.php | Github Open Source | Open Source | W3C | 2,020 | E-commerce-website-Supermarket | Emajm | PHP | Code | 401 | 1,495 | <?php
// Heading
$_['heading_title'] = 'Abbonamenti del venditore';
$_['heading_current_plan'] = 'Piano attuale';
// Text
$_['text_success'] = 'Successo: hai modificato il piano di abbonamento!';
$_['text_list'] = "Gestisci l'elenco dei piani di abbonamento";
$_['text_add'] ... | 16,623 |
https://github.com/cleberecht/singa/blob/master/singa-structure/src/main/java/bio/singa/structure/parser/plip/PiStacking.java | Github Open Source | Open Source | MIT | 2,018 | singa | cleberecht | Java | Code | 487 | 1,087 | package bio.singa.structure.parser.plip;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
/**
* @author cl
*/
public class PiStacking extends Interaction {
/**
* The Atom IDs of the source atoms of the interaction - belong to the protein.
*/
private List<Integer> atoms1... | 51,877 |
https://github.com/babu-thomas/interviewbit-solutions/blob/master/rotated-array.cpp | Github Open Source | Open Source | MIT | 2,021 | interviewbit-solutions | babu-thomas | C++ | Code | 91 | 209 | int Solution::findMin(const vector<int> &A) {
int n = A.size();
int left = 0, right = n - 1;
while(left <= right) {
int mid = (left + right) / 2;
int prev = ((mid - 1) % n + n) % n;
int next = (mid + 1) % n;
if(A[left] <= A[right]) {
return A[left];
... | 17,933 |
https://github.com/mahmudul-hasan-sreejon/Dig-Out/blob/master/hooks/updateImageCount.php | Github Open Source | Open Source | MIT | 2,021 | Dig-Out | mahmudul-hasan-sreejon | PHP | Code | 29 | 98 | <?php
include("../config.php");
if(isset($_POST["imageUrl"])) {
$query = $conn->prepare("UPDATE images SET clicks = clicks + 1 WHERE imageUrl = :imageUrl");
$query->bindParam(":imageUrl", $_POST["imageUrl"]);
$query->execute();
}
else echo "No Image Urls passed";
?>
| 25,730 |
https://github.com/OpenSlides/openslides-client/blob/master/client/src/app/site/pages/meetings/services/meeting-data-store.service.ts | Github Open Source | Open Source | LGPL-2.0-or-later, GPL-1.0-or-later, ISC, MIT, BSD-3-Clause, Apache-2.0, 0BSD, BSD-2-Clause, LGPL-2.1-only, GPL-3.0-or-later | 2,023 | openslides-client | OpenSlides | TypeScript | Code | 69 | 219 | import { Injectable } from '@angular/core';
import { DataStoreService } from 'src/app/site/services/data-store.service';
import { MeetingCollectionMapperService } from './meeting-collection-mapper.service';
@Injectable({
providedIn: `root`
})
export class MeetingDataStoreService {
public constructor(private m... | 26,777 |
https://github.com/Alex1304/jdash/blob/master/client/src/test/java/jdash/client/GDRouterMockUp.java | Github Open Source | Open Source | MIT | 2,021 | jdash | Alex1304 | Java | Code | 219 | 1,359 | package jdash.client;
import jdash.client.request.GDRequest;
import jdash.client.request.GDRouter;
import jdash.common.*;
import reactor.core.publisher.Mono;
import reactor.core.scheduler.Schedulers;
import java.nio.ByteBuffer;
import java.nio.charset.StandardCharsets;
import java.util.Map;
import static jdash.clie... | 25,210 |
https://github.com/appsody/stacks/blob/master/incubator/java-spring-boot2/image/project/Dockerfile | Github Open Source | Open Source | Apache-2.0, LicenseRef-scancode-unknown-license-reference | 2,021 | stacks | appsody | Dockerfile | Code | 223 | 778 | ############################################################################
#
# Prepare stable image layers to be cached and reused below, as referenced
# via "--from=compile".
#
FROM {{.stack.baseimage}} as compile
USER root
# Ensure up to date / patched OS
COPY ./update.sh /update.sh
RUN /update.sh
RUN groupad... | 6,236 |
https://github.com/kauilani/balanced-dashboard/blob/master/app/templates/page-form.hbs | Github Open Source | Open Source | MIT | 2,015 | balanced-dashboard | kauilani | null | Spoken | 34 | 217 | <section id="main" class="container scale">
{{render "notification_center"}}
<div class="page-with-logo">
<a href="https://www.balancedpayments.com"><img class="logo" src="images/balanced-logo.png" alt="Balanced" /></a>
<div class="page-form span10">
{{#if view.pageTitle}}
<h3>{{view.pageTitle}}</h3>
{{... | 21,926 |
https://github.com/DandelionSprout/Stringlate/blob/master/src/core/src/main/java/io/github/lonamiwebs/stringlate/interfaces/SlAppSettings.java | Github Open Source | Open Source | MIT | 2,022 | Stringlate | DandelionSprout | Java | Code | 84 | 381 | package io.github.lonamiwebs.stringlate.interfaces;
import io.github.lonamiwebs.stringlate.classes.resources.ResourceStringComparator;
public interface SlAppSettings {
int DEFAULT_STRING_SORTING = ResourceStringComparator.SORT_ALPHABETICALLY;
String DEFAULT_GITHUB_TOKEN = "";
String DEFAULT_GITHUB_SCOPE =... | 2,717 |
https://github.com/km2m/nasm/blob/master/test/ppindirect.asm | Github Open Source | Open Source | BSD-2-Clause | 2,022 | nasm | km2m | Assembly | Code | 81 | 312 | ;Testname=test; Arguments=-E -o ppindirect.out; Files=ppindirect.out
; Fun tests of the preprocessor indirection mode...
%assign foo1 11
%assign foo11 1111
%assign foo2 22
%assign foo22 2222
%assign foo3 33
%assign foo33 3333
%assign n 2
foo%[foo%[n]]*100
foo%[n]*100
%assign foo%[foo%[n]] foo%[foo%[n]]*100
;%a... | 32,885 |
https://github.com/webdev498/amazon_orderIdFounder_chrome_extension/blob/master/assets/js/options.js | Github Open Source | Open Source | MIT | 2,017 | amazon_orderIdFounder_chrome_extension | webdev498 | JavaScript | Code | 46 | 159 | $(document).ready(function() {
// $("#hotkey").keyup(function(e) {
// var keys = [],
// curKey = String.fromCharCode(e.which);
// if (e.ctrlKey)
// keys.push("Ctrl");
// else if (e.shiftKey)
// keys.push("Shift");
// if ( curKey && curKey !== "." ) {
// keys.push(curKey);
// $(this).val(keys.... | 47,456 |
https://github.com/davidmehren/web-sharelatex/blob/master/app/coffee/Features/Templates/TemplatesMiddlewear.coffee | Github Open Source | Open Source | MIT | 2,021 | web-sharelatex | davidmehren | CoffeeScript | Code | 18 | 73 | settings = require("settings-sharelatex")
logger = require("logger-sharelatex")
module.exports =
saveTemplateDataInSession: (req, res, next)->
if req.query.templateName
req.session.templateData = req.query
next()
| 23,720 |
https://github.com/luhc228/eecs-online/blob/master/eecs-online-server/student/views.py | Github Open Source | Open Source | MIT | 2,020 | eecs-online | luhc228 | Python | Code | 553 | 2,481 | import json
from django.core.paginator import PageNotAnInteger, InvalidPage, EmptyPage, Paginator
from django.shortcuts import HttpResponse
from login.models import User
from student.models import Student, StudentManage, TrueClass
# Create your views here.
def detail(request):
if request.method == 'GET':
... | 24,199 |
https://github.com/facebook/fresco/blob/master/drawee/src/test/java/com/facebook/drawee/drawable/ScaleTypeDrawableTest.java | Github Open Source | Open Source | MIT | 2,023 | fresco | facebook | Java | Code | 996 | 3,895 | /*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
package com.facebook.drawee.drawable;
import static com.facebook.drawee.drawable.ScalingUtils.ScaleType;
import static org.mocki... | 33,970 |
https://github.com/Xerkus/mezzio-hal/blob/master/test/LinkGenerator/MezzioUrlGeneratorTest.php | Github Open Source | Open Source | BSD-3-Clause | null | mezzio-hal | Xerkus | PHP | Code | 157 | 815 | <?php
declare(strict_types=1);
namespace MezzioTest\Hal\LinkGenerator;
use Mezzio\Hal\LinkGenerator\MezzioUrlGenerator;
use Mezzio\Helper\ServerUrlHelper;
use Mezzio\Helper\UrlHelper;
use PHPUnit\Framework\TestCase;
use Psr\Http\Message\ServerRequestInterface;
use Psr\Http\Message\UriInterface;
use ReflectionPropert... | 25,649 |
https://github.com/Ogy72/RSDK/blob/master/resources/views/layout/HalamanUtama.blade.php | Github Open Source | Open Source | MIT | 2,023 | RSDK | Ogy72 | Blade | Code | 915 | 4,492 | <!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="/assets/vendor/bootstrap/css/bootstrap.min.css">
<link href="/ass... | 9,068 |
https://github.com/bojosos/Nworc/blob/master/Crowny/Source/Crowny/Utils/Bitwise.h | Github Open Source | Open Source | MIT | 2,021 | Nworc | bojosos | C | Code | 464 | 1,301 | #pragma once
namespace Crowny
{
class Bitwise
{
public:
template <typename T> static bool IsPow2(T n) { return (n & (n - 1)) == 0; }
static uint32_t UnormToUint(float value, uint32_t bits)
{
if (value <= 0.0f)
return 0;
if (value >= 1.0f)
... | 43,398 |
https://github.com/alphagov/govwifi-admin/blob/master/spec/models/location_spec.rb | Github Open Source | Open Source | MIT, LicenseRef-scancode-proprietary-license | 2,023 | govwifi-admin | alphagov | Ruby | Code | 313 | 1,040 | describe Location do
it { is_expected.to validate_presence_of(:address) }
it { is_expected.to validate_presence_of(:postcode) }
it { is_expected.to belong_to(:organisation) }
it { is_expected.to have_many(:ips) }
describe "#unpersisted_addresses_are_unique" do
context "It does not have a parent organisat... | 30,340 |
https://github.com/sqlrob/Ao3-Tracker/blob/master/ao3_tracker/src/reader/messaging/messaging.ts | Github Open Source | Open Source | Apache-2.0 | 2,021 | Ao3-Tracker | sqlrob | TypeScript | Code | 359 | 897 | /*
Copyright 2017 Alexis Ryan
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
dis... | 34,106 |
https://github.com/admariner/keboola-as-code/blob/master/internal/pkg/template/manifest/manifest_test.go | Github Open Source | Open Source | MIT | null | keboola-as-code | admariner | Go | Code | 305 | 1,508 | package manifest
import (
"testing"
"github.com/stretchr/testify/assert"
"github.com/keboola/keboola-as-code/internal/pkg/filesystem"
"github.com/keboola/keboola-as-code/internal/pkg/model"
"github.com/keboola/keboola-as-code/internal/pkg/naming"
"github.com/keboola/keboola-as-code/internal/pkg/testfs"
"githu... | 46,238 |
https://github.com/pnkfelix/rust-glm/blob/master/src/matrix.rs | Github Open Source | Open Source | Apache-2.0, MIT, LicenseRef-scancode-warranty-disclaimer | 2,014 | rust-glm | pnkfelix | Rust | Code | 5,796 | 21,402 | // Copyright 2014 Felix S. Klock II. See the COPYRIGHT
// file at the top-level directory of this distribution.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// opt... | 40,931 |
https://github.com/beschwa/activerecord-costume-store-todo-dumbo-web-career-031119/blob/master/db/migrate/002_create_costume_stores.rb | Github Open Source | Open Source | LicenseRef-scancode-unknown-license-reference, LicenseRef-scancode-public-domain | 2,019 | activerecord-costume-store-todo-dumbo-web-career-031119 | beschwa | Ruby | Code | 33 | 130 | # Create your costume_stores migration here
class CreateCostumeStores < ActiveRecord::Migration[5.1]
def change
create_table :costume_stores do |t|
t.string :name
t.string :location
t.integer :costume_inventory
t.integer :number_of_employees
t.boolean :in_business
t.datetime :opening_date
t.date... | 39,481 |
https://github.com/BassemAyman2016/bStore/blob/master/server/controllers/product_images.js | Github Open Source | Open Source | MIT | null | bStore | BassemAyman2016 | JavaScript | Code | 444 | 1,347 | const ProductModel = require('../models/products')
const AdminModel = require('../models/admins')
const ProductImagesModel = require('../models/prodcut_images')
require('dotenv').config();
const deleteProductImages = async function (req, res) {
var product_id = req.params.product_id
if(!product_id){
... | 27,091 |
https://github.com/windystrife/UnrealEngine_NVIDIAGameWorks/blob/master/Engine/Source/Runtime/Engine/Private/Slate/SlateGameResources.cpp | Github Open Source | Open Source | MIT, LicenseRef-scancode-proprietary-license | 2,022 | UnrealEngine_NVIDIAGameWorks | windystrife | C++ | Code | 991 | 3,574 | // Copyright 1998-2017 Epic Games, Inc. All Rights Reserved.
#include "Slate/SlateGameResources.h"
#include "Curves/CurveBase.h"
#include "Curves/CurveFloat.h"
#include "AssetData.h"
#include "Modules/ModuleManager.h"
#include "Styling/SlateWidgetStyleAsset.h"
#include "EngineUtils.h"
#include "Slate/SlateBrushAsset.h... | 808 |
https://github.com/lestrrat-go/go-backoff/blob/master/backoff_test.go | Github Open Source | Open Source | MIT | 2,022 | go-backoff | lestrrat-go | Go | Code | 671 | 2,149 | package backoff_test
import (
"context"
"fmt"
"io/ioutil"
"sync"
"testing"
"time"
"github.com/lestrrat-go/backoff/v2"
"github.com/stretchr/testify/assert"
)
func TestNull(t *testing.T) {
ctx, cancel := context.WithTimeout(context.Background(), time.Second)
defer cancel()
p := backoff.Null()
c := p.Start... | 12,273 |
https://github.com/LewisLarsen/clicksway/blob/master/tests/Feature/Site/JoinTest.php | Github Open Source | Open Source | MIT | null | clicksway | LewisLarsen | PHP | Code | 173 | 845 | <?php
namespace Tests\Feature\Site;
use App\Models\Site;
use App\Models\SiteUser;
use App\Models\User;
use Carbon\Carbon;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\TestCase;
class JoinTest extends TestCase
{
use RefreshDatabase;
/**
* @test
*/
public function test_users_can_... | 38,972 |
https://github.com/eizedev/SQL/blob/master/ConfigMgr/OSMapTesting- WIP.sql | Github Open Source | Open Source | MIT | 2,019 | SQL | eizedev | SQL | Code | 98 | 348 | SELECT
s.Name0,
s.ResourceID
,Build01
,CASE
LEFT(BUILD01,Charindex('.',Build01)-1)
WHEN 5 THEN 'XP'
WHEN 6 THEN '7'
WHEN 10 THEN '10'
ELSE NULL
END as OSBaseVersion
,BuildExt
,Operating_System_Name_and0
,os.Version0
,BuildNumber0
,Caption0
,CSDVersion0
,ProductType0
,Version0
,ss.*
,ln... | 2,855 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.