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/mouseflow/elasticsearch-net/blob/master/src/Examples/Examples/Ml/AnomalyDetection/Apis/CloseJobPage.cs | Github Open Source | Open Source | Apache-2.0 | 2,020 | elasticsearch-net | mouseflow | C# | Code | 36 | 179 | using Elastic.Xunit.XunitPlumbing;
using Nest;
namespace Examples.Ml.AnomalyDetection.Apis
{
public class CloseJobPage : ExampleBase
{
[U(Skip = "Example not implemented")]
public void Line102()
{
// tag::cf6e928ae9efc2b9f59aa1ccb4605bee[]
var response0 = new SearchResponse<object>();
// end::cf6e928a... | 18,810 |
https://github.com/ClubObsidian/ObsidianEngine/blob/master/src/com/clubobsidian/obsidianengine/event/EventManager.java | Github Open Source | Open Source | MIT, BSD-3-Clause, Apache-2.0 | 2,017 | ObsidianEngine | ClubObsidian | Java | Code | 48 | 229 | package com.clubobsidian.obsidianengine.event;
import com.clubobsidian.obsidianengine.event4j.EventBus;
import com.clubobsidian.obsidianengine.event4j.EventExecutor;
public class EventManager {
private final EventBus<Event, Object> bus;
public EventManager()
{
this.bus = EventBus.builder()
.eventClass(Event... | 42,962 |
https://github.com/commercialhaskell/stack/blob/master/test/integration/tests/4453-detailed/files/test/Spec.hs | Github Open Source | Open Source | 2,023 | stack | commercialhaskell | Haskell | Code | 63 | 110 | module Spec (tests) where
import Distribution.TestSuite
tests :: IO [Test]
tests = do
pure [
test "foo" Pass
]
test :: String -> Result -> Test
test name r = Test t
where
t = TestInstance {
run = pure (Finished r)
, name = name
, tags = []
, options = []
, setOption ... | 38,836 | |
https://github.com/kanggaogang/BitTorrent/blob/master/src/BitTorrent/Client/Tracker/AnnounceParameters.cs | Github Open Source | Open Source | MIT | 2,017 | BitTorrent | kanggaogang | C# | Code | 259 | 657 | using System;
using System.Collections.Generic;
using System.Text;
using System.Net.BitTorrent.Common;
namespace System.Net.BitTorrent.Client.Tracker
{
public class AnnounceParameters
{
private long bytesDownloaded;
private long bytesLeft;
private long bytesUploaded;
private Tor... | 16,100 |
https://github.com/unlhcc/hcc-conda-recipes/blob/master/recipes/ghc/8.2.1/ldflags.patch | Github Open Source | Open Source | BSD-3-Clause | 2,023 | hcc-conda-recipes | unlhcc | null | Spoken | 50 | 220 | --- settings.in 2017-02-08 01:56:17.000000000 +0000
+++ settings.in.new 2017-12-12 23:38:34.828197293 +0000
@@ -1,6 +1,6 @@
[("GCC extra via C opts", "@GccExtraViaCOpts@"),
("C compiler command", "@SettingsCCompilerCommand@"),
- ("C compiler flags", "@SettingsCCompilerFlags@"),
+ ("C compiler flags", "@SettingsCComp... | 36,450 |
https://github.com/Vturnus/critterco-dev/blob/master/backend/backend/urls.py | Github Open Source | Open Source | MIT | 2,020 | critterco-dev | Vturnus | Python | Code | 70 | 336 | from django.contrib import admin
from django.urls import path, include
from django.conf.urls import url
from django.conf import settings
from django.conf.urls.static import static
from rest_framework_simplejwt.views import (
TokenObtainPairView,
TokenRefreshView,
)
urlpatterns = [
path("admin/", admin.site... | 41,732 |
https://github.com/Beykar/BeykarWebs-WordPress/blob/master/assets/js/script.js | Github Open Source | Open Source | MIT | 2,018 | BeykarWebs-WordPress | Beykar | JavaScript | Code | 174 | 805 | /**
* @name script.js
* @desc script that handles the 'Read More' button
*
*/
(function(){
var
$shareBtn = jQuery('#shareBtn'),
changeGlyf = function(){
var
acctGlyf = jQuery(this).find('b:first')
;
if (acctG... | 2,693 |
https://github.com/pederpansen/dune-ax1/blob/master/dune/ax1/common/ax1_simulationdata.hh | Github Open Source | Open Source | BSD-3-Clause | null | dune-ax1 | pederpansen | C++ | Code | 393 | 1,380 | /*
* simulation_data.hh
*
* Created on: Feb 28, 2012
* Author: jpods
*/
#ifndef DUNE_AX1_SIMULATION_DATA_HH
#define DUNE_AX1_SIMULATION_DATA_HH
template<typename T>
class Ax1SimulationData
{
public:
struct SolutionVector
{
std::string name;
std::vector<T> data;
};
Ax1Simulat... | 786 |
https://github.com/jpenc/ta-json/blob/master/src/decorators/before-deserialized.ts | Github Open Source | Open Source | MIT | 2,021 | ta-json | jpenc | TypeScript | Code | 28 | 100 | import { getDefinition } from "../classes/object-definition";
// tslint:disable:ext-variable-name only-arrow-functions
export function BeforeDeserialized():PropertyDecorator {
return function(target:any, key:string | symbol):void {
const definition = getDefinition(target.constructor);
definition.... | 4,490 |
https://github.com/jleloup/tempo/blob/master/pkg/io/read.go | Github Open Source | Open Source | Apache-2.0 | null | tempo | jleloup | Go | Code | 260 | 606 | package io
import (
"io"
)
// ReadAllWithEstimate is a fork of https://go.googlesource.com/go/+/go1.16.3/src/io/io.go#626
// with a starting buffer size. if none is provided it uses the existing default of 512
func ReadAllWithEstimate(r io.Reader, estimatedBytes int64) ([]byte, error) {
if estimatedBytes <= 0 {
... | 140 |
https://github.com/topcoat/topcoat.github.com/blob/master/src/documents/atom.xml.jade | Github Open Source | Open Source | Apache-2.0 | 2,019 | topcoat.github.com | topcoat | null | Spoken | 147 | 416 | ---
layout:
---
//- Copyright (c) 2013 Adobe Systems Incorporated. All rights reserved.
//-
//- 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... | 20,006 |
https://github.com/codehaus/mevenide/blob/master/mevenide2/idea/idea-core/src/main/java/org/codehaus/mevenide/idea/model/MavenConfiguration.java | Github Open Source | Open Source | Apache-2.0 | 2,008 | mevenide | codehaus | Java | Code | 402 | 1,277 | /* ==========================================================================
* Copyright 2006 Mevenide Team
*
* 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.... | 683 |
https://github.com/yourcelf/intertwinkles/blob/master/bin/install_dependencies.py | Github Open Source | Open Source | BSD-3-Clause, BSD-2-Clause | 2,016 | intertwinkles | yourcelf | Python | Code | 836 | 3,248 | #!/usr/bin/env python
"""
This script installs the external dependencies for InterTwinkles, along with
the node modules, including: solr, etherpad-lite, and everything listed in
package.json.
"""
import os
import re
import sys
import json
import time
import shutil
import base64
import tarfile
import zipfile
import urll... | 17,037 |
https://github.com/coldi/confy/blob/master/packages/core/lib/commands/build.js | Github Open Source | Open Source | MIT | 2,022 | confy | coldi | JavaScript | Code | 91 | 340 | const chalk = require('chalk');
const webpack = require('webpack');
const getConfig = require('../utils/getConfig');
module.exports = ({
command: 'build',
desc: 'Build and bundle all the things for production.',
handler (argv) {
const config = getConfig();
if (argv.watch) {
/... | 41,531 |
https://github.com/EuCarlos/10-Dias-de-Projeto/blob/master/Downloads de videos youtube/YoutuberDownloader.py | Github Open Source | Open Source | MIT | 2,021 | 10-Dias-de-Projeto | EuCarlos | Python | Code | 86 | 334 | from __future__ import unicode_literals
import youtube_dl
import urllib
import shutil
from tkinter import *
ydl_opts = {}
corBG = '#e63946'
cor1 = '#1d3557'
def baixar_Video():
Url = str(FQuantC.get())
with youtube_dl.YoutubeDL(ydl_opts) as ydl:
ydl.download([Url])
jan = Tk()
jan.title('DOWNLOAD DE ... | 31,475 |
https://github.com/TimonKnigge/matrix-partitioner/blob/master/src/datastructures/rvector.h | Github Open Source | Open Source | MIT | 2,020 | matrix-partitioner | TimonKnigge | C | Code | 126 | 360 | #ifndef RVECTOR_H
#define RVECTOR_H
#include <limits>
#include <vector>
namespace mp {
// This class represents a vector resettable in O(1) time.
template <class T>
class rvector {
private:
// Default value, and the vector of values.
T def;
std::vector<T> value;
// Current time and time of last set.
size_t cur... | 13,002 |
https://github.com/lovesossa/gelect/blob/master/dev/src/scss/helpers/extends/_iconfonts.scss | Github Open Source | Open Source | MIT | null | gelect | lovesossa | SCSS | Code | 109 | 552 | $icon_font_name: "iconfont";
@font-face {
font-family: $icon_font_name;
src: url('../fonts/icons/iconfont.eot');
src: url('../fonts/icons/iconfont.eot?#iefix') format('eot'),
url('../fonts/icons/iconfont.woff') format('woff'),
url('../fonts/icons/iconfont.ttf') format('truetype'),
url('../fonts/icons/iconfont.svg... | 32,173 |
https://github.com/wmalarski/NextMusicReview/blob/master/src/review/components/ReviewsPage/ReviewsPage.test.tsx | Github Open Source | Open Source | MIT | null | NextMusicReview | wmalarski | TypeScript | Code | 100 | 433 | import "@testing-library/jest-dom";
import "@testing-library/jest-dom/extend-expect";
import { render, screen, waitFor } from "@testing-library/react";
import userEvent from "@testing-library/user-event";
import React from "react";
import ReviewsPage from "../../../pages/reviews";
import TestWrapper from "../../../test... | 18,478 |
https://github.com/kamakshi16/Git-Credential-Manager-for-Windows/blob/master/Microsoft.Alm.Authentication/Proxy/ProxyData.cs | Github Open Source | Open Source | MIT | 2,019 | Git-Credential-Manager-for-Windows | kamakshi16 | C# | Code | 300 | 643 | /**** Git Credential Manager for Windows ****
*
* Copyright (c) Microsoft Corporation
* All rights reserved.
*
* MIT License
*
* 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 ... | 9,842 |
https://github.com/Martok88/Rampant/blob/master/libs/NocturnalUtils.lua | Github Open Source | Open Source | Apache-2.0 | 2,017 | Rampant | Martok88 | Lua | Code | 38 | 128 | local nocturnalUtils = {}
-- imports
local constants = require("Constants")
-- constants
local AI_STATE_NOCTURNAL = constants.AI_STATE_NOCTURNAL
-- module code
function nocturnalUtils.isDark(surface)
return surface.darkness > 0.65
end
function nocturnalUtils.canAttack(natives, surface)
return nocturnalUt... | 5,561 |
https://github.com/aitoehigie/britecore_flask/blob/master/venv/lib/python3.6/site-packages/pylint/test/functional/self_cls_assignment.py | Github Open Source | Open Source | MIT | null | britecore_flask | aitoehigie | Python | Code | 127 | 393 | """Warning about assigning self/cls variable."""
from __future__ import print_function
# pylint: disable=too-few-public-methods, useless-object-inheritance
class Foo(object):
"""Class with methods that check for self/cls assignment"""
# pylint: disable=no-self-argument,no-self-use
def self_foo(bar_):
... | 37,331 |
https://github.com/hostilefork/rgchris-scripts/blob/master/ren-c/curl.reb | Github Open Source | Open Source | Apache-2.0 | 2,022 | rgchris-scripts | hostilefork | null | Spoken | 535 | 1,386 | Rebol [
Title: "cURL"
Author: "Christopher Ross-Gill"
Date: 08-Feb-2019
Home: http://ross-gill.com/page/REST_Protocol
File: %curl.reb
Version: 0.1.5
Purpose: "Rebol wrapper for cURL command."
Rights: http://opensource.org/licenses/Apache-2.0
Type: module
Name: rgchris.curl
Ex... | 14,243 |
https://github.com/donovan680/Plasma/blob/master/Systems/Graphics/TextureData.cpp | Github Open Source | Open Source | MIT | 2,020 | Plasma | donovan680 | C++ | Code | 250 | 848 | // Authors: Nathan Carlson
// Copyright 2015, DigiPen Institute of Technology
#include "Precompiled.hpp"
namespace Plasma
{
//**************************************************************************************************
LightningDefineType(TextureData, builder, type)
{
PlasmaBindDocumented();
LightningBind... | 38,299 |
https://github.com/EatThePath/fs2open.github.com/blob/master/code/starfield/supernova.cpp | Github Open Source | Open Source | Unlicense | 2,022 | fs2open.github.com | EatThePath | C++ | Code | 1,056 | 3,921 | /*
* Copyright (C) Volition, Inc. 1999. All rights reserved.
*
* All source code herein is the property of Volition, Inc. You may not sell
* or otherwise commercially exploit the source or things you created based on the
* source.
*
*/
#include "cmdline/cmdline.h"
#include "debugconsole/console.h"
#include ... | 179 |
https://github.com/HustinKava/Password-Generator/blob/master/assets/javascript/script.js | Github Open Source | Open Source | MIT | null | Password-Generator | HustinKava | JavaScript | Code | 736 | 1,450 | // Assignment Code.
var generateBtn = document.querySelector("#generate");
// Created a function named passwordValidation to check if the parameter userInput after the prompt is true. If not it returns false and the user will have to try again.
// The return true value is outside of the if else statements because if t... | 41,293 |
https://github.com/james-muriithi/laravel-hello-world/blob/master/resources/views/post/show.blade.php | Github Open Source | Open Source | MIT | 2,020 | laravel-hello-world | james-muriithi | Blade | Code | 24 | 131 | @extends('layouts.app')
@section('content')
<div class="container">
<div class="row mt-3 mx-auto">
<div class="col">
<h1>{{$post->title}}</h1>
<div>
<h5>{{$post->body}}</h5>
<small class="mt-2">
poste... | 17,461 |
https://github.com/Mightysaur/SampleApp/blob/master/gitupdatescript.rb | Github Open Source | Open Source | MIT, Beerware, LicenseRef-scancode-unknown-license-reference | 2,017 | SampleApp | Mightysaur | Ruby | Code | 55 | 173 | #!/usr/bin/env ruby
require 'fileutils'
while true
Dir.glob('**/.git').each do |path|
next if File.file?(path) # don't process submodules
start_time = Time.now
project_base = File.expand_path("#{path}/..")
puts "In #{project_base}"
FileUtils.cd(project_base) do
system('git stash')
put... | 22,053 |
https://github.com/Leone9689/dvo/blob/master/src/util/histogram.h | Github Open Source | Open Source | MIT | null | dvo | Leone9689 | C | Code | 227 | 447 | /**
* This file is part of dvo.
*
* Copyright 2012 Christian Kerl <christian.kerl@in.tum.de> (Technical University of Munich)
* For more information see <http://vision.in.tum.de/data/software/dvo>.
*
* dvo is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public... | 40,901 |
https://github.com/tjyiiuan/LeetCode/blob/master/solutions/cpp/Problem283.cpp | Github Open Source | Open Source | MIT | null | LeetCode | tjyiiuan | C++ | Code | 88 | 210 | #pragma once
/*
283. Move Zeroes
Given an array nums, write a function to move all 0's to the end of it while maintaining the relative order of the non-zero elements.
Example:
Input: [0,1,0,3,12]
Output: [1,3,12,0,0]
Note:
You must do this in-place without making a copy of the array.
Minimize the total number of op... | 26,572 |
https://github.com/tendoasan/fastdex/blob/master/fastdex-build-lib/src/main/java/fastdex/build/lib/aapt/Constant.java | Github Open Source | Open Source | Apache-2.0 | 2,022 | fastdex | tendoasan | Java | Code | 873 | 2,397 | /*
* Copyright 2014-present Facebook, 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... | 45,682 |
https://github.com/sano307/ourtravelstory/blob/master/application/views/story/storyPlaceImageMemoModify.php | Github Open Source | Open Source | MIT | null | ourtravelstory | sano307 | PHP | Code | 551 | 2,215 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js" type="text/javascript"></script>
<script type="text/... | 17,284 |
https://github.com/samuelsan/Carousel/blob/master/app/assets/stylesheets/the-big-picture.scss | Github Open Source | Open Source | MIT | 2,016 | Carousel | samuelsan | SCSS | Code | 144 | 536 | /*!
* Start Bootstrap - The Big Picture HTML Template (http://startbootstrap.com)
* Code licensed under the Apache License v2.0.
* For details, see http://www.apache.org/licenses/LICENSE-2.0.
*/
body {
margin-top: 50px;
margin-bottom: auto;
/*background: url("../images/wood-bg.jpg") repeat 0 0;*/
}
.full {
... | 52,987 |
https://github.com/Samsung/Castanets/blob/master/third_party/blink/web_tests/external/wpt/service-workers/service-worker/resources/update-worker.py | Github Open Source | Open Source | LGPL-2.0-or-later, GPL-1.0-or-later, MIT, Apache-2.0, BSD-3-Clause, LicenseRef-scancode-warranty-disclaimer, LGPL-2.1-only, GPL-2.0-only, LGPL-2.0-only, BSD-2-Clause, LicenseRef-scancode-other-copyleft | 2,021 | Castanets | Samsung | Python | Code | 226 | 562 | import time
def main(request, response):
# Set mode to 'init' for initial fetch.
mode = 'init'
if 'mode' in request.cookies:
mode = request.cookies['mode'].value
# no-cache itself to ensure the user agent finds a new version for each update.
headers = [('Cache-Control', 'no-cache, must-rev... | 33,470 |
https://github.com/bxbxbx/nabaztag-source-code/blob/master/server/MyNabaztag/test/net/violet/mynabaztag/action/MySrvTrafficActionTest.java | Github Open Source | Open Source | MIT | 2,015 | nabaztag-source-code | bxbxbx | Java | Code | 586 | 2,542 | package net.violet.mynabaztag.action;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import net.violet.mynabaztag.form.MySrvTrafficForm;
import net.violet.platform.datamodel.User;
import net.violet.platform.datamodel.VObject;
import ... | 23,773 |
https://github.com/aws/aws-sdk-java/blob/master/aws-java-sdk-quicksight/src/main/java/com/amazonaws/services/quicksight/model/FontConfiguration.java | Github Open Source | Open Source | Apache-2.0 | 2,023 | aws-sdk-java | aws | Java | Code | 1,376 | 3,206 | /*
* Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
* the License. A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "licen... | 48,959 |
https://github.com/jenyayel/ExchangeMatchingEngine/blob/master/EME.Models/LimitOrder.cs | Github Open Source | Open Source | MIT | 2,018 | ExchangeMatchingEngine | jenyayel | C# | Code | 201 | 490 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace EME.Models
{
/// <summary>
/// A limit order is an order to buy a security at no more than a specific price,
/// or to sell a security at no less than a specific price
/// </s... | 20,685 |
https://github.com/org-formation/aws-sdk-worker-pool/blob/master/src/index.ts | Github Open Source | Open Source | MIT | 2,021 | aws-sdk-worker-pool | org-formation | TypeScript | Code | 13 | 40 | import { WorkerPoolAwsSdk } from './worker-pool';
export * from './workers/aws-sdk';
export default WorkerPoolAwsSdk;
| 1,471 |
https://github.com/yybawang/laravel_ebank/blob/master/src/Facades/EBank.php | Github Open Source | Open Source | MIT | null | laravel_ebank | yybawang | PHP | Code | 198 | 930 | <?php
namespace yybawang\ebank\Facades;
use Illuminate\Support\Facades\Facade as LaravelFacade;
use yybawang\ebank\Illuminate\EBankFreeze;
use yybawang\ebank\Illuminate\EBankFreezeForce;
use yybawang\ebank\Illuminate\EBankTransfer;
use yybawang\ebank\Illuminate\EBankUnfreeze;
use yybawang\ebank\Illuminate\EBankUnTra... | 5,926 |
https://github.com/yokawasa/mod_akismet/blob/master/mod_akismet.c | Github Open Source | Open Source | Apache-2.0 | 2,016 | mod_akismet | yokawasa | C | Code | 2,422 | 9,184 | /*
* mod_akismet.c - Apache module that enables you to detect spam comments
* before your application handler by Akismet anti-comment-spam service
*
* Copyright (C) 2009 Yoichi Kawasaki All rights reserved.
* yk55.com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this fil... | 31,425 |
https://github.com/nanochess/basic-computer-games/blob/master/20 Buzzword/perl/buzzword.pl | Github Open Source | Open Source | Unlicense | 2,021 | basic-computer-games | nanochess | Perl | Code | 118 | 522 | #!/usr/bin/perl
use strict;
print ' 'x26 . "BUZZWORD GENERATOR\n";
print ' 'x15 . "CREATIVE COMPUTING MORRISTOWN, NEW JERSEY\n";
print "\n\n\n";
print "THIS PROGRAM PRINTS HIGHLY ACCEPTABLE PHRASES IN\n";
print "'EDUCATOR-SPEAK' THAT YOU CAN WORK INTO REPORTS\n";
print "AND SPEECHES. WHENEVER A QUESTION MARK IS PRINT... | 45,073 |
https://github.com/deadpassive/spring-cloud-dataflow/blob/master/spring-cloud-dataflow-server-core/src/test/java/org/springframework/cloud/dataflow/server/controller/AuditRecordControllerTests.java | Github Open Source | Open Source | Apache-2.0 | null | spring-cloud-dataflow | deadpassive | Java | Code | 1,076 | 7,293 | /*
* Copyright 2018-2019 the original author or authors.
*
* 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
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by a... | 37,623 |
https://github.com/yurydelendik/cloudlibc/blob/master/src/libc/string/strncat.c | Github Open Source | Open Source | LicenseRef-scancode-unknown-license-reference, BSD-2-Clause | 2,018 | cloudlibc | yurydelendik | C | Code | 61 | 185 | // Copyright (c) 2015 Nuxi, https://nuxi.nl/
//
// SPDX-License-Identifier: BSD-2-Clause
#define _CLOUDLIBC_UNSAFE_STRING_FUNCTIONS
#include <string.h>
char *strncat(char *restrict s1, const char *restrict s2, size_t n) {
if (n > 0) {
char *s = s1;
while (*s != '\0')
++s;
do {
if (*s2 == '\... | 11,241 |
https://github.com/wviv/authoring-ui/blob/master/app/components/project/project.js | Github Open Source | Open Source | Apache-2.0 | 2,021 | authoring-ui | wviv | JavaScript | Code | 1,999 | 6,777 | 'use strict';
// jshint ignore: start
angular.module('singleConceptAuthoringApp.project', [
//insert dependencies here
'ngRoute'
])
.config(function config($routeProvider) {
$routeProvider
.when('/project/:projectKey', {
controller: 'ProjectCtrl',
templateUrl: 'components/project/... | 26,777 |
https://github.com/karoterra/AupDotNet/blob/master/src/AupDotNet/ExEdit/Effects/SceneChangeEffect.cs | Github Open Source | Open Source | MIT | 2,022 | AupDotNet | karoterra | C# | Code | 345 | 1,699 | using System;
using System.Collections.Generic;
namespace Karoterra.AupDotNet.ExEdit.Effects
{
/// <summary>
/// シーンチェンジ
/// </summary>
/// <remarks>
/// <list type="table">
/// <listheader>
/// <term>シーンチェンジの種類</term>
/// <description>説明</description>
/// </... | 21,450 |
https://github.com/josedafonsecajr/enemyapi/blob/master/app/Models/Enemy.php | Github Open Source | Open Source | MIT | null | enemyapi | josedafonsecajr | PHP | Code | 70 | 255 | <?php
namespace App\Models;
use App\swagger\Models\EnemyInterface;
use Illuminate\Support\Str;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Factories\HasFactory;
class Enemy extends Model implements EnemyInterface
{
use HasFactory;
protected $fillable = [
'name', 'rank', ... | 31,767 |
https://github.com/nite-coder/blackbear-demo/blob/master/pkg/workflow/publish_event_workflow.go | Github Open Source | Open Source | Apache-2.0 | 2,021 | blackbear-demo | nite-coder | Go | Code | 173 | 651 | package workflow
import (
"context"
"time"
eventProto "github.com/nite-coder/blackbear-demo/pkg/event/proto"
walletProto "github.com/nite-coder/blackbear-demo/pkg/wallet/proto"
"go.temporal.io/sdk/temporal"
"go.temporal.io/sdk/workflow"
)
// PublishEventWorkflow ...
func PublishEventWorkflow(ctx workflow.Cont... | 11,267 |
https://github.com/fiend361/Flappy-Fish-Game-Android/blob/master/app/src/main/java/com/software/gm/fisherfrenzy/FlyingFishView.java | Github Open Source | Open Source | MIT | null | Flappy-Fish-Game-Android | fiend361 | Java | Code | 932 | 3,233 | package com.software.gm.fisherfrenzy;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import andr... | 36,420 |
https://github.com/C5T/Current/blob/master/fncas/deprecated_test/function.h | Github Open Source | Open Source | MIT | 2,023 | Current | C5T | C++ | Code | 386 | 893 | // Defines abstract function definition for all f/*.h.
// The functions to be tested should be derived from this class.
// Check out any f/*.h, like f/sum.h, for an example.
//
// TODO(dkorolev): Implement assembly-based code generation and test it.
//
// Functions implemented in f/*.h also have some "tags" specified. ... | 7,703 |
https://github.com/jinnks/printevolve/blob/master/perl5/man/man3/Catalyst::DispatchType::Chained.3pm | Github Open Source | Open Source | Apache-2.0 | 2,020 | printevolve | jinnks | null | Spoken | 2,721 | 7,409 | .\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35)
.\"
.\" Standard preamble:
.\" ========================================================================
.de Sp \" Vertical space (when we can't use .PP)
.if t .sp .5v
.if n .sp
..
.de Vb \" Begin verbatim text
.ft CW
.nf
.ne \\$1
..
.de Ve \" End verbatim ... | 40,037 |
https://github.com/michael-spengler/nexo/blob/master/mod.ts | Github Open Source | Open Source | MIT | 2,021 | nexo | michael-spengler | TypeScript | Code | 534 | 1,624 | import {
Application,
Router,
send,
join,
Sha1,
exists,
basename,
extname,
relative,
move,
} from "./deps.js";
import { HotFs } from "./hotfs.ts";
import { stripAnsi } from "./stripAnsi.js";
import { render } from "./ssr.ts";
import * as DevMiddleware from "./devMiddleware.ts";
export * from "./ssr.... | 38,146 |
https://github.com/mpedroza96/RequirementManagementSystemSoftwareDevelopment/blob/master/s4_RequirementManagementSystem_Back_201910/s4_requirement-back/src/main/java/co/edu/uniandes/csw/requirement/ejb/ObjetivoAprobacionLogic.java | Github Open Source | Open Source | MIT | 2,020 | RequirementManagementSystemSoftwareDevelopment | mpedroza96 | Java | Code | 414 | 1,213 | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package co.edu.uniandes.csw.requirement.ejb;
import co.edu.uniandes.csw.requirement.entities.AprobacionEntity;
import co.edu.uniandes.... | 21,316 |
https://github.com/azarum/atlasdb/blob/master/timelock-impl/src/main/java/com/palantir/atlasdb/timelock/AsyncTimelockServiceImpl.java | Github Open Source | Open Source | Apache-2.0 | null | atlasdb | azarum | Java | Code | 623 | 3,174 | /*
* (c) Copyright 2019 Palantir Technologies Inc. All rights reserved.
*
* 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 ... | 41,744 |
https://github.com/xuwei-k/dhallj/blob/master/modules/core/src/main/java/org/dhallj/cbor/Writer.java | Github Open Source | Open Source | BSD-3-Clause | 2,020 | dhallj | xuwei-k | Java | Code | 765 | 2,448 | package org.dhallj.cbor;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.io.OutputStream;
import java.math.BigInteger;
import java.nio.charset.Charset;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import ja... | 34,094 |
https://github.com/HudsonAndroid/NewDongLing/blob/master/app/src/main/java/com/hudson/donglingmusic/module/IModule.java | Github Open Source | Open Source | Apache-2.0 | null | NewDongLing | HudsonAndroid | Java | Code | 15 | 41 | package com.hudson.donglingmusic.module;
/**
* Created by Hudson on 2020/2/27.
*/
public interface IModule {
}
| 25,658 |
https://github.com/Eduadomtz/Han-in-Hand/blob/master/server/config/seeds.js | Github Open Source | Open Source | MIT | 2,021 | Han-in-Hand | Eduadomtz | JavaScript | Code | 666 | 1,793 | const db = require('./connection');
const { User, Post, Donation } = require('../models');
const { isValidObjectId } = require('mongoose');
const mongojs = require('mongojs');
db.once('open', async () => {
await Donation.deleteMany();
await User.deleteMany();
const eduardo = await User.create({
... | 13,876 |
https://github.com/krlvi/java-rdeps/blob/master/java/com/videlov/rdeps/Rdeps.java | Github Open Source | Open Source | BSD-2-Clause | 2,020 | java-rdeps | krlvi | Java | Code | 225 | 847 | package com.videlov.rdeps;
import org.apache.commons.cli.CommandLine;
import org.jgrapht.Graph;
import org.jgrapht.graph.concurrent.AsSynchronizedGraph;
import org.jgrapht.graph.DefaultDirectedGraph;
import org.jgrapht.graph.DefaultEdge;
import org.objectweb.asm.ClassReader;
import org.objectweb.asm.commons.Method;
i... | 1,092 |
https://github.com/libetl/soundtransform/blob/master/src/main/java/org/toilelibre/libe/soundtransform/model/library/pack/ContextLoader.java | Github Open Source | Open Source | Apache-2.0 | 2,021 | soundtransform | libetl | Java | Code | 29 | 107 | package org.toilelibre.libe.soundtransform.model.library.pack;
import java.io.InputStream;
import org.toilelibre.libe.soundtransform.model.exception.SoundTransformException;
public interface ContextLoader {
InputStream read (Object context, int id) throws SoundTransformException;
InputStream read (Object c... | 18,186 |
https://github.com/KashaketCompany/Dev-S/blob/master/system/design/components/methods/TSizeCtrlEx.php | Github Open Source | Open Source | CC0-1.0 | 2,019 | Dev-S | KashaketCompany | PHP | Code | 106 | 420 | <?
$result = [];
$result[] = array(
'CAPTION'=>t('addTarget'),
'PROP'=>'addTarget',
'INLINE'=>'addTarget ( object target [, init = true] )',
);
$result[] = array(
'CAPTION'=>t('deleteTarget'),
'PROP'=>'deleteT... | 28,841 |
https://github.com/hpi-swa-teaching/squIRC-Bots/blob/master/packages/SquIRC-Base-Core.package/IRCChannelObserver.class/class/openForChannelNamed.onConnection..st | Github Open Source | Open Source | MIT | 2,017 | squIRC-Bots | hpi-swa-teaching | null | Spoken | 13 | 33 | instance creation
openForChannelNamed: channelName onConnection: connection
^(super new connection: connection channelName: channelName) openView | 46,880 |
https://github.com/the-benchmarker/web-frameworks/blob/master/php/antidot/router/middleware.php | Github Open Source | Open Source | MIT | 2,023 | web-frameworks | the-benchmarker | PHP | Code | 21 | 129 | <?php
declare(strict_types=1);
use Antidot\Framework\Application;
use Antidot\Framework\Middleware\ErrorMiddleware;
use Antidot\Framework\Middleware\RouteDispatcherMiddleware;
use Antidot\Framework\Middleware\RouteNotFoundMiddleware;
return static function (Application $app): void {
$app->pipe(ErrorMiddleware::c... | 33,295 |
https://github.com/tcbd1017/aitao/blob/master/control_storage/src/main/webapp/js/goodsAdd2.js | Github Open Source | Open Source | MIT | 2,019 | aitao | tcbd1017 | JavaScript | Code | 350 | 1,629 | $(function() {
// allCangKu();
sessionStorage.setItem("account", "shouji");
sessionStorage.setItem("shop_id", "1");
let account = sessionStorage.getItem("account");
let shop_id = sessionStorage.getItem("shop_id");
if ("" != account && null != account) {
queryAllGoods(account, shop_id);
}
})
function q... | 18,909 |
https://github.com/altkatz/hijack-lldb/blob/master/tasks/gem.rake | Github Open Source | Open Source | MIT | 2,014 | hijack-lldb | altkatz | Ruby | Code | 132 | 451 | # require 'rake/packagetask'
require 'rubygems'
require 'rubygems/package_task'
require 'yaml'
require './lib/hijack'
task :clean => :clobber_package
spec = Gem::Specification.new do |s|
s.name = 'hijack'
s.version = Hijack.version
s.platform = Gem::Platform::RUBY
s... | 18,436 |
https://github.com/Dot145/qiskit-terra/blob/master/qiskit/transpiler/passes/scheduling/alap.py | Github Open Source | Open Source | Apache-2.0 | 2,021 | qiskit-terra | Dot145 | Python | Code | 209 | 541 | # This code is part of Qiskit.
#
# (C) Copyright IBM 2020.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any modifications or derivative wo... | 9,396 |
https://github.com/Apoc70/RemovePrivateFlag/blob/master/RemovePrivateFlag/UtilityArguments.cs | Github Open Source | Open Source | MIT | null | RemovePrivateFlag | Apoc70 | C# | Code | 207 | 657 | // RemovePrivateFlag
//
// Author: Torsten Schlopsnies, Thomas Stensitzki
//
// Based on: http://dotnetfollower.com/wordpress/2012/03/c-simple-command-line-arguments-parser/
//
// Published under MIT license
namespace RemovePrivateFlag
{
/// <summary>
/// Description of UtilityArguments.
/// </summary>
... | 2,708 |
https://github.com/nedjs/path-manager/blob/master/src/config/mod.rs | Github Open Source | Open Source | MIT | 2,018 | path-manager | nedjs | Rust | Code | 69 | 185 | use std::collections::HashMap;
mod config;
mod link_group;
mod link;
/// the configuration for the entire path manager, saves to file
pub struct Config {
config_map: HashMap<String, Vec<LinkGroup>>,
active_configs: HashMap<String, u64>, // (entry.name, entry.priority)
links: Vec<Link>,
cmd_dir_str: String
}
#[d... | 34,856 |
https://github.com/cliftonm/intertexti/blob/master/DockPanelSuite/WinFormsUI/Docking/DragHandlerBase.cs | Github Open Source | Open Source | MIT | null | intertexti | cliftonm | C# | Code | 379 | 1,336 | // *****************************************************************************
//
// Copyright 2004, Weifen Luo
// All rights reserved. The software and associated documentation
// supplied hereunder are the proprietary information of Weifen Luo
// and are supplied subject to licence terms.
//
// WinFormsUI L... | 31,838 |
https://github.com/datasift/datasift-dotnet/blob/master/DataSiftExamples/Pylon.cs | Github Open Source | Open Source | MIT | 2,017 | datasift-dotnet | datasift | C# | Code | 308 | 1,051 | using DataSift;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
namespace DataSiftExamples
{
static class Pylon
{
// Note that to run the PYLON example you must use an A... | 32,027 |
https://github.com/isabella232/harmony-classlib/blob/master/modules/archive/src/main/java/java/util/zip/InflaterInputStream.java | Github Open Source | Open Source | Apache-2.0 | null | harmony-classlib | isabella232 | Java | Code | 1,293 | 2,628 | /*
* 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 ... | 38,926 |
https://github.com/junhuac/Firejack-Platform/blob/master/platform/src/main/java/net/firejack/platform/core/validation/process/ValidateAspect.java | Github Open Source | Open Source | Apache-2.0 | 2,014 | Firejack-Platform | junhuac | Java | Code | 282 | 829 | /*
* 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 ... | 24,172 |
https://github.com/Ingenico-ePayments/connect-sdk-client-ios/blob/master/IngenicoConnectSDK/ICPaymentProductField.m | Github Open Source | Open Source | MIT | 2,023 | connect-sdk-client-ios | Ingenico-ePayments | Objective-C | Code | 239 | 847 | //
// ICPaymentProductField.m
// IngenicoConnectSDK
//
// Created for Ingenico ePayments on 15/12/2016.
// Copyright © 2017 Global Collect Services. All rights reserved.
//
#import "ICPaymentProductField.h"
#import "ICValidator.h"
#import "ICValidationErrorIsRequired.h"
#import "ICValidationErrorInteger.h"
#im... | 1,459 |
https://github.com/astrapi69/resource-bundles-data/blob/master/resource-bundles-rest-web/src/main/resources/dll/inserts/insert-data.sql | Github Open Source | Open Source | MIT | null | resource-bundles-data | astrapi69 | SQL | Code | 5,302 | 15,450 | INSERT INTO countries (id,name,iso3166_a2name) VALUES (9, 'United Arab Emirates', 'AE');
INSERT INTO countries (id,name,iso3166_a2name) VALUES (15, 'Antigua and Barbuda', 'AG');
INSERT INTO countries (id,name,iso3166_a2name) VALUES (4, 'Anguilla', 'AI');
INSERT INTO countries (id,name,iso3166_a2name) VALUES (6, 'Albani... | 37,864 |
https://github.com/Pvredev/StockSharp/blob/master/Algo/Export/Database/DbProviders/MSSQLDbProvider.cs | Github Open Source | Open Source | Apache-2.0 | 2,020 | StockSharp | Pvredev | C# | Code | 406 | 1,421 | #region S# License
/******************************************************************************************
NOTICE!!! This program and source code is owned and licensed by
StockSharp, LLC, www.stocksharp.com
Viewing or use of this code requires your acceptance of the license
agreement found at https://github.com/S... | 31,234 |
https://github.com/ForumViriumHelsinki/ApplicationEvaluator/blob/master/django_server/application_evaluator/migrations/0013_applicationround_published.py | Github Open Source | Open Source | MIT | null | ApplicationEvaluator | ForumViriumHelsinki | Python | Code | 30 | 120 | # Generated by Django 3.1.5 on 2021-02-26 11:56
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('application_evaluator', '0012_auto_20210210_1627'),
]
operations = [
migrations.AddField(
model_name='applicationround',
... | 46,070 |
https://github.com/railsgirlswgtn/intro-talk-may-2015/blob/master/node_modules/grunt-sass/node_modules/node-sass/libsass/node_factory.cpp | Github Open Source | Open Source | MIT | 2,020 | intro-talk-may-2015 | railsgirlswgtn | C++ | Code | 400 | 1,176 | #include "node_factory.hpp"
namespace Sass {
Node_Impl* Node_Factory::alloc_Node_Impl(Node::Type type, string path, size_t line)
{
Node_Impl* ip = new Node_Impl();
ip->type = type;
if (type == Node::backref) ip->has_backref = true;
ip->path = path;
ip->line = line;
pool_.push_back(ip);
... | 194 |
https://github.com/Victor-Eduardo/Tcc/blob/master/Controllers/ModalidadeController.cs | Github Open Source | Open Source | MIT | null | Tcc | Victor-Eduardo | C# | Code | 307 | 1,087 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using Tcc_Senai.Data;
using Tcc_Senai.Models;
namespace Tcc_Senai.Controllers
{
public class ModalidadeController : Controller
{
privat... | 6,896 |
https://github.com/bigjelly/AndFast/blob/master/app/src/main/java/com/andfast/app/view/video/Impl/IVideoHotView.java | Github Open Source | Open Source | Apache-2.0 | 2,020 | AndFast | bigjelly | Java | Code | 26 | 115 | package com.andfast.app.view.video.Impl;
import com.andfast.app.model.TestModel;
import com.andfast.app.view.base.Impl.IBasePullListView;
import java.util.List;
/**
* Created by mby on 17-8-6.
*/
public interface IVideoHotView extends IBasePullListView {
void onGetNewsDetailSuccess(List<TestModel> newsDetail)... | 20,780 |
https://github.com/CUBRID/cubrid-testcase/blob/master/medium/_02_xtests/cases/5552.sql | Github Open Source | Open Source | BSD-3-Clause | null | cubrid-testcase | CUBRID | SQL | Code | 245 | 692 | autocommit off;
select count(*)
from public.resort r1
where (select name from public.resort r2 where r1.name = r2.name)
= (select name from public.resort r2 where r1.name = r2.name);
select count(*)
from public.resort r1, public.resort r2
where r1.name < 'ZZZZZ'
and r1.name = r2.name;
create class bigun (... | 27,958 |
https://github.com/robertu/i3-dstatus/blob/master/i3dstatus/block.py | Github Open Source | Open Source | BSD-2-Clause-FreeBSD | null | i3-dstatus | robertu | Python | Code | 303 | 1,246 | from __future__ import annotations
import json
from dbus_next import Variant
from dbus_next.aio import MessageBus
from dbus_next.introspection import Node
from .service import StatusService
notifications_xml = '''
<node>
<interface name="org.freedesktop.Notifications">
<method name="GetCapabilities">
... | 28,447 |
https://github.com/parambole/Obfuscation/blob/master/obfuscation/src/main/java/com/pb/dev/obfuscation/Controller/ObfuscationExample.java | Github Open Source | Open Source | Apache-2.0 | null | Obfuscation | parambole | Java | Code | 35 | 162 | package com.pb.dev.obfuscation.Controller;
import com.pb.dev.obfuscation.Protection.Filter;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.HashMap;
import java.util.Map;
@RestController
public class ObfuscationExample {
... | 9,349 |
https://github.com/docker-flow/docker-flow-proxy/blob/master/actions/reconfigure.go | Github Open Source | Open Source | MIT | 2,022 | docker-flow-proxy | docker-flow | Go | Code | 604 | 1,963 | package actions
import (
"bytes"
"fmt"
"html/template"
"os"
"strconv"
"strings"
"github.com/docker-flow/docker-flow-proxy/proxy"
)
const serviceTemplateFeFilename = "service-formatted-fe.ctmpl"
const serviceTemplateBeFilename = "service-formatted-be.ctmpl"
// Reconfigurable defines mandatory interface
type R... | 7,157 |
https://github.com/qinannmj/FireFly/blob/master/src/main/java/cn/com/sparkle/firefly/admin/Commands.java | Github Open Source | Open Source | Apache-2.0 | 2,015 | FireFly | qinannmj | Java | Code | 63 | 141 | package cn.com.sparkle.firefly.admin;
public class Commands {
public final static String RE_ELECTION = "elect";
public final static String RE_ELECTION1 = "ec";
public final static String CLSTUER_STATE = "clusterState";
public final static String CLSTUER_STATE1 = "cs";
public final static String STATE = "state";
... | 47,991 |
https://github.com/engelwar/OAS/blob/master/app/Exports/ReporteVtsExport.php | Github Open Source | Open Source | MIT | null | OAS | engelwar | PHP | Code | 120 | 472 | <?php
namespace App\Exports;
use Maatwebsite\Excel\Concerns\Exportable;
use Maatwebsite\Excel\Concerns\WithMultipleSheets;
class ReporteVtsExport implements WithMultipleSheets
{
use Exportable;
protected $productos;
protected $reporte;
protected $stock;
protected $pyc;
protected $ini;
... | 7,959 |
https://github.com/Tobias-Fischer/dreyeve/blob/master/experiments/predict_on_cineca/predict_dreyeve_sequence.py | Github Open Source | Open Source | MIT | 2,022 | dreyeve | Tobias-Fischer | Python | Code | 750 | 3,240 | import numpy as np
import cv2
import argparse
import os
from tqdm import tqdm
from os.path import join
from train.models import DreyeveNet
from computer_vision_utils.io_helper import read_image, normalize
from computer_vision_utils.tensor_manipulation import resize_tensor
from computer_vision_utils.stitching import ... | 49,160 |
https://github.com/hyperboloide/pdfgen/blob/master/template_test.go | Github Open Source | Open Source | MIT | 2,022 | pdfgen | hyperboloide | Go | Code | 59 | 182 | package main_test
import (
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
. "github.com/hyperboloide/pdfgen"
)
var _ = Describe("Template", func() {
It("should not create a NewTemplate if there is no index.html in the directory", func() {
_, err := NewTemplate("./", "templates")
Expect(err).To(HaveOc... | 17,930 |
https://github.com/ooooo-youwillsee/leetcode/blob/master/0501-1000/0643-Maximum-Average-Subarray-I/java_0643/src/com/ooooo/Solution1.java | Github Open Source | Open Source | MIT | 2,022 | leetcode | ooooo-youwillsee | Java | Code | 95 | 231 | package com.ooooo;
class Solution1 {
public double findMaxAverage(int[] nums, int k) {
double sum = 0, ans = Integer.MIN_VALUE;
for (int i = 0; i < nums.length; i++) {
sum += nums[i];
if (i >= k - 1) {
ans = Math.max(ans, sum / k);
sum -= nums[i - k + 1];
}
}
retu... | 50,209 |
https://github.com/Mahmoud-Fekry/dashboard/blob/master/resources/views/admin/layout/master.blade.php | Github Open Source | Open Source | MIT | null | dashboard | Mahmoud-Fekry | PHP | Code | 289 | 2,235 | <!DOCTYPE html>
<html>
<head>
<title>@yield('title')</title>
<link rel="stylesheet" href="{{asset('vendor/almasaeed2010/adminlte/plugins/fontawesome-free/css/all.min.css')}}">
<link rel="stylesheet" href="{{asset('vendor/almasaeed2010/adminlte/plugins/icheck-bootstrap/icheck-bootstrap.min.css')}}">
<lin... | 44,958 |
https://github.com/pacificlion/world_models/blob/master/planners/planners.py | Github Open Source | Open Source | Apache-2.0 | 2,022 | world_models | pacificlion | Python | Code | 2,228 | 7,375 | # Copyright 2020 Google LLC
#
# 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, ... | 28,146 |
https://github.com/NxSoftware/SwiftCLI/blob/master/Sources/SwiftCLI/Parameter.swift | Github Open Source | Open Source | MIT | null | SwiftCLI | NxSoftware | Swift | Code | 213 | 487 | //
// Parameter.swift
// SwiftCLI
//
// Created by Jake Heiser on 3/7/15.
// Copyright (c) 2015 jakeheis. All rights reserved.
//
public protocol AnyParameter {
func signature(for name: String) -> String
}
open class Parameter: AnyParameter {
private var privateValue: String? = nil
public va... | 14,743 |
https://github.com/LiantsoaDev/projetAvril/blob/master/app/Http/Controllers/ProduitsController.php | Github Open Source | Open Source | MIT | null | projetAvril | LiantsoaDev | PHP | Code | 392 | 1,675 | <?php
namespace App\Http\Controllers;
use App\Entite\favoris;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Validator;
use App\Produit;
use App\Blog;
use App\Image;
use App\Entite\RechercheSauvegardee;
use App\Http\Controllers\Session;
use App\Publicite;
use App\Http\Controllers\PublicitesController;
c... | 41,861 |
https://github.com/mfathy1091/pstic_laravel/blob/master/app/Models/ReferralSection.php | Github Open Source | Open Source | MIT | null | pstic_laravel | mfathy1091 | PHP | Code | 34 | 160 | <?php
namespace App\Models;
use Illuminate\Database\Eloquent\Relations\Pivot;
class ReferralSection extends Pivot
{
protected $table="referral_sections";
public function assignedWorker(){
return $this->belongsTo(Employee::class, 'assigned_worker_id');
}
public function directBeneficiary(){
... | 27,491 |
https://github.com/djosino/controle_pessoal/blob/master/app/models/tipo_lancamento.rb | Github Open Source | Open Source | MIT | 2,019 | controle_pessoal | djosino | Ruby | Code | 17 | 59 | class TipoLancamento < ActiveRecord::Base
has_many :lancamentos
has_many :categorias
has_many :rotinas
default_scope { order(:descricao => :asc) }
end
| 32,106 |
https://github.com/Puglielli/contacorrente/blob/master/src/main/java/br/com/projetoitau/contacorrente/utils/ValidateCPFCNPJ.java | Github Open Source | Open Source | MIT | 2,020 | contacorrente | Puglielli | Java | Code | 334 | 1,195 | package br.com.projetoitau.contacorrente.utils;
import java.io.Serializable;
import java.text.DecimalFormat;
public class ValidateCPFCNPJ implements Serializable {
private String cpfCnpj;
private boolean isPJ;
public ValidateCPFCNPJ() {
super();
}
public ValidateCPFCNPJ(String cpfCnpj) ... | 17,141 |
https://github.com/kbeigl/jeets/blob/master/jeets-models/jeets-pu-gtfs/src/main/java/org/jeets/model/gtfs/RouteTrips.java | Github Open Source | Open Source | Apache-2.0 | 2,020 | jeets | kbeigl | Java | Code | 164 | 555 | package org.jeets.model.gtfs;
// Generated 08.11.2017 22:44:26 by Hibernate Tools 4.3.5.Final
import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.Table;
... | 28,715 |
https://github.com/fernandosaraivazup/orange-talents-07-template-ecommerce/blob/master/src/main/java/br/com/zupacademy/fpsaraiva/mercadolivre/model/Categoria.java | Github Open Source | Open Source | Apache-2.0 | null | orange-talents-07-template-ecommerce | fernandosaraivazup | Java | Code | 96 | 330 | package br.com.zupacademy.fpsaraiva.mercadolivre.model;
import javax.persistence.*;
import javax.validation.constraints.NotBlank;
@Entity
public class Categoria {
@Id
@GeneratedValue(
strategy = GenerationType.SEQUENCE,
generator = "sequence_id_categorias"
)
@SequenceGenerator... | 33,225 |
https://github.com/ankurshukla1993/IOT-test/blob/master/coeey/com/facebook/binaryresource/FileBinaryResource.java | Github Open Source | Open Source | Apache-2.0 | 2,021 | IOT-test | ankurshukla1993 | Java | Code | 111 | 340 | package com.facebook.binaryresource;
import com.facebook.common.internal.Files;
import com.facebook.common.internal.Preconditions;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
public class FileBinaryResource implements BinaryResource {
private final ... | 10,231 |
https://github.com/CryptapeHackathon/stag/blob/master/FE/config/webpack.config.prod.js | Github Open Source | Open Source | MIT | 2,019 | stag | CryptapeHackathon | JavaScript | Code | 174 | 706 | const webpack = require('webpack')
const path = require('path')
const merge = require('webpack-merge')
const HtmlWebpackPlugin = require('html-webpack-plugin')
const ExtractTextPlugin = require('extract-text-webpack-plugin')
const UglifyPlugin = require('uglifyjs-webpack-plugin')
const AutoprefixerPlugin = require('aut... | 48,344 |
https://github.com/mdsol/cognition/blob/master/Cognition.Web/Views/Changes/AllRecentPartial.cshtml | Github Open Source | Open Source | MIT | 2,017 | cognition | mdsol | C# | Code | 14 | 70 | @model System.Collections.Generic.IEnumerable<Cognition.Shared.Changes.DocumentChangeNotification>
<div id="changes-all-container">
@foreach (var change in Model)
{
@Html.Partial("_Change", change)
}
</div>
| 47,088 |
https://github.com/watermint/Semester/blob/master/semester-foundation-logging/src/main/scala/semester/foundation/logging/Logger.scala | Github Open Source | Open Source | Unlicense, MIT | 2,015 | Semester | watermint | Scala | Code | 241 | 622 | package semester.foundation.logging
import org.slf4j.{Logger => Slf4jLogger, LoggerFactory => Slf4jLoggerFactory}
case class Logger(clazz: Class[_]) {
private val logger: Slf4jLogger = Slf4jLoggerFactory.getLogger(clazz)
def trace(msg: => String): Unit = if (isTraceEnabled) { logger.trace(msg) }
def trace(msg:... | 45,827 |
https://github.com/menushka/wizardchess-capstone/blob/master/front-end/index.js | Github Open Source | Open Source | MIT | null | wizardchess-capstone | menushka | JavaScript | Code | 190 | 663 | var Chess = require('chess.js').Chess;
var stockfish = require('stockfish');
// CPU vs CPU test cases
// Parse return from Stockfish API
function fenAnalysis(event) {
var pattern = /bestmove (\w+)(?: ponder (\w+))?/
var re = new RegExp(pattern)
if (re.test(event)) {
x = re.exec(event)
re... | 33,163 |
https://github.com/JaneConan/CMS/blob/master/CMS.CommonUI/CommonUIServiceCollectionExtensions.cs | Github Open Source | Open Source | MIT | 2,018 | CMS | JaneConan | C# | Code | 25 | 94 | using Microsoft.Extensions.DependencyInjection;
using System.Collections.Generic;
using System.Text;
namespace CMS.CommonUI
{
public static class CommonUIServiceCollectionExtensions
{
public static void AddCommonUI(this IServiceCollection services)
{
services.ConfigureOptions(typeo... | 49,379 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.