language
stringclasses
15 values
src_encoding
stringclasses
34 values
length_bytes
int64
6
7.85M
score
float64
1.5
5.69
int_score
int64
2
5
detected_licenses
listlengths
0
160
license_type
stringclasses
2 values
text
stringlengths
9
7.85M
C
UTF-8
759
2.65625
3
[ "MIT" ]
permissive
#ifndef ZNES_OPERAND_UINT_H #define ZNES_OPERAND_UINT_H #include <stdint.h> #include "operand.h" typedef enum ZnesUintSize { ZNES_UINT_UNK, ZNES_UINT_8, ZNES_UINT_16 } ZnesUintSize; typedef union ZnesUintValue { uint8_t uint8; uint16_t uint16; } ZnesUintValue; typedef struct ZnesUintOperand { ...
Python
UTF-8
1,297
2.703125
3
[]
no_license
class Vehiculo: def __init__(self, matricula): self.__matricula = matricula # self.__tarifa = 0 @property def matricula(self): return self.__matricula @matricula.setter def matricula(self, matricula): self.__matricula = matricula # @property # def tarifa(self...
Markdown
UTF-8
8,446
3.0625
3
[]
no_license
--- title: What's With All The Monopolys? layout: blog tags: - board_games --- In which we wonder if Monopoly, the board game[^8], is trying to establish a monopoly amongst retail board game space. I first noticed this when I went to an F1 race at the Paul Ricard racing circuit back in July 2018. Given the qualit...
PHP
UTF-8
1,221
3.59375
4
[]
no_license
<?php /** * Class to store all of the tokens * * @author craig */ class RuleList { private $_tokens; /** * Construct the list * @param {Array} $list An existing list of tokens */ public function __construct($list) { $this->_tokens = $list; } /** * Add a new token ...
Shell
UTF-8
1,353
2.875
3
[]
no_license
#!/usr/bin/env bash # update only necessary changes source scripts/utils/globals source scripts/utils/functions echo -e "${C}Updating all dotfiles on Arch 0:${NC}" rsync -av ~/.config/nvim/* --exclude plugged/ ./nvim 2> /dev/null status_check echo ": nvim/" cp ~/.config/kitty/kitty.conf ./kitty/ 2> /dev/null status_c...
C#
UTF-8
940
2.59375
3
[]
no_license
using LocalizationDemo.Services; using Microsoft.Extensions.Localization; using System; using System.Collections.Generic; using System.Globalization; using System.Linq; using System.Threading.Tasks; namespace LocalizationDemo.Localization { public class StringResourceLocalizer : IStringLocalizer { pri...
Java
UTF-8
5,403
2.59375
3
[]
no_license
package parsing; import model.Contact; import model.entity.Address; import model.entity.Mail; import model.entity.Phone; import model.entity.enums.Flag; import model.entity.enums.ViewMail; import model.entity.enums.ViewPhone; import java.util.ArrayList; import java.util.List; //Converter JSON to Java.class public cl...
Java
ISO-8859-1
3,145
2.796875
3
[]
no_license
package br.com.dioceseOsasco.Paroquia.Controller; import java.sql.Date; import java.util.List; import javax.persistence.EntityManager; import br.com.dioceseOsasco.Paroquia.Model.TbEvento; public class EventoDAO { EntityManager em; public EventoDAO() { em = ConnectionFactory.getEntityManager(); ...
Markdown
UTF-8
2,436
3.1875
3
[ "MIT" ]
permissive
# Rarely asked questions ### How can I run a standalone mock server? By default, a mock service will be started automatically by the pact gem when running the consumer tests. A standalone mock service can be run locally and is useful for debugging purposes. ```ruby Pact.service_consumer "My Service Consumer" do ha...
Markdown
UTF-8
23,511
2.71875
3
[]
no_license
### 一 参考链接 [参考链接一](https://blog.csdn.net/qq_34129336/article/details/71941526?utm_medium=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-2.channel_param&depth_1-utm_source=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-2.channel_param) [员工练习题](https://blog.csdn.net/zhiweia...
C++
UTF-8
1,533
3.453125
3
[]
no_license
#ifndef YOUSSEF_QTEISHAT_RATIONALNUMBER_H #define YOUSSEF_QTEISHAT_RATIONALNUMBER_H #include <iostream> #include <cmath> using namespace std; class RationalNumber { public: RationalNumber(int, int); /* #1 constructor that takes in numerator and denominator and reduces fraction. it also prevents z...
JavaScript
UTF-8
10,513
2.59375
3
[]
no_license
const ALL_RECIPES = {}; var recipesLoaded = false; var recipes = []; let loggedInUser = null; var email = null; $(document).ready(function(){ framework.post("http://3.14.147.18:1338/getRecipes", {}, function(res, err){ if(err) { console.log("Error:",err) } for(var i=0; i<re...
Java
UTF-8
3,305
2.796875
3
[]
no_license
package snakegame; /** * Ohjelman "keskus" jonka välillä tieto kulkee luokalta toiselle * * @author antti */ import java.io.*; public class Game { private Snake snake; private GUI gui; private Pathfinder pathfinder; public void init(int areaSize) { snake = new Snake(); gui = new GUI(); pat...
Java
UTF-8
2,814
2.4375
2
[ "Apache-2.0" ]
permissive
package org.polyforms.event.spring; import org.easymock.EasyMock; import org.junit.Assert; import org.junit.Before; import org.junit.Test; import org.polyforms.parameter.Parameter; import org.polyforms.parameter.ReturnParameterAware; public class ReturnValueParametersTest { private ReturnValueParameters<Parameter...
Shell
UTF-8
1,623
3.4375
3
[ "MIT" ]
permissive
#!/bin/bash DIR="/var/www/html" DBHOST="${DBHOST:-mariadb}" DBNAME="${DBNAME:-wordpress}" DBUSER="${DBUSER:-root}" DBPASS="${DBPASS:-password}" SITETITLE="${SITETITLE:-devsite}" SITEUSER="${SITEUSER:-admin}" SITEPASS="${SITEPASS:-password}" SITEEMAIL="${SITEEMAIL:-dev@dev.dev}" DOCKER_IP=$(echo $DOCKER_HOST | cut -d/ -...
Markdown
UTF-8
855
3.328125
3
[ "Apache-2.0" ]
permissive
# cleancode A script which helps to automate, cleanup your code by removing all console.* methods, commented codes, empty lines and beautify code with the help of js-neautify npm module. This script will cover all JS files in specified folder and will do the following tasks. 1. Remove all console.* methods. 2. Remove ...
C++
UTF-8
891
3.109375
3
[]
no_license
class RGBColor{public: double r, g, b;}; class HLSColor{public: double h, l, s;}; RGB_to_HLS (RGBColor rgb, HLSColor& hls) {// convert (r, g, b), each in [0, 1], to h, l, s double mx, mn; RGBColor tmp; mx = MAX(rgb.r, rgb.g, rgb.b); mn = MIN(rgb.r, rgb.g, rgb.b); hls.l =(mx + mn) / 2.0; // c...
Java
UTF-8
740
1.796875
2
[]
no_license
package com.example.src; import org.junit.Test; import org.junit.runner.RunWith; import org.openqa.selenium.By; import org.openqa.selenium.WebElement; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.context.junit4.SpringRunner; import static com.codeborne.selenide.Conditio...
C
UTF-8
1,172
2.859375
3
[]
no_license
#include <windows.h> #include <stdio.h> #include "Util.h" #define COMMAND_SIZE 256 #define CURSOR_SIZE 30 void CursorUtil_GotoXY(int x, int y){ COORD pos = { x, y }; SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), pos); } void CursorUtil_Show(){ CONSOLE_CURSOR_INFO cursorInfo; cursorInfo.bVisible = TRU...
Python
UTF-8
602
2.703125
3
[]
no_license
#!/usr/bin/env python # coding: utf-8 # In[1]: import pandas as pd import numpy as np from scipy import stats from scipy.stats import chi2_contingency # In[2]: df=pd.read_csv("C:/Users/Dibish Babu/Downloads/CostomerOrderForm.csv") # In[3]: df # In[4]: df.Phillippines.value_counts() # In[5]: df.Indone...
C
UTF-8
11
3.015625
3
[]
no_license
../decode.c
C#
UTF-8
3,103
2.65625
3
[ "MIT" ]
permissive
using System; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using pigeon.gameobject; namespace pigeon.gfx.drawable.sprite { public class SpriteRenderer : Component, IRenderable, IFlippable { public Sprite Sprite; public SpriteRenderer() { } public SpriteRenderer(...
Java
UTF-8
278
3.0625
3
[]
no_license
import java.util.*; class Hello{ public Hello(){ } public static void main(String args[]){ ArrayList<Integer> list = new ArrayList<Integer>(); list.add(5); list.add(6); list.add(54); System.out.println(list.toString()); System.out.println("hello world\n"); } }
Java
UTF-8
5,300
2.421875
2
[ "LicenseRef-scancode-unknown-license-reference", "Apache-2.0" ]
permissive
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.search.federation.vespa; import java.util.Iterator; import com.yahoo.prelude.query.*; /** * Marshal a query stack into an advanced query string suitable for * passing to another ...
JavaScript
UTF-8
466
2.609375
3
[]
no_license
const fetch = require('node-fetch'); const https = require('https'); const obtenerDatosService = async(url) => { return new Promise((resolve, reject) => { const httpsAgent = new https.Agent({ rejectUnauthorized: false, }); fetch(url, { agent: httpsAgent }) .then(res ...
PHP
UTF-8
2,880
2.734375
3
[]
no_license
<?php /** * Class file for EbayTradingTypeShipmentDeliveryStatusCodeType * @date 04/07/2012 */ /** * Class EbayTradingTypeShipmentDeliveryStatusCodeType * @date 04/07/2012 */ class EbayTradingTypeShipmentDeliveryStatusCodeType extends EbayTradingWsdlClass { /** * Constant for value 'Created' * Meta informati...
Shell
UTF-8
29,705
2.546875
3
[]
no_license
#!/bin/bash #### This script is copyright Tadd Torborg KA2DEW 2014, 2015, 2016, 2017, 2018 ##### Please leave this copyright notice in the document and if changes are made, ##### indicate at the copyright notice as to what the intent of the changes was. ##### Thanks. - Tadd Raleigh NC ##### SCRIPT to use local config...
Python
UTF-8
4,942
2.734375
3
[]
no_license
from shallot.middlewares.cookies import CookieSerializer, make_morsel_from_description, wrap_cookies from shallot.middlewares import apply_middleware from shallot.ring import serialize_headers import pytest cookie_values = { "session": { "value": 12, "secure": True, "path": "/zuze", ...
C#
UTF-8
434
2.890625
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace GenericsAdvance { class Swapper { public static void Swap<T>(ref T a, ref T b) //davam ref aby kazda premenna bola odovzdana odkazom // aby napln funkcie ovplyvnil povodne prem...
C++
UTF-8
5,113
2.734375
3
[ "MIT" ]
permissive
#include "ImageTracker.hpp" using namespace cv; using namespace std; ImageTracker::ImageTracker(const String templatePath, const int detectionMethod_, const int minRectArea_, const int maxRectArea_) { setTemplateImage(templatePath); setMethod(detectionMethod_); setMinRectArea(minRectArea_); setMaxRect...
JavaScript
UTF-8
3,033
2.84375
3
[]
no_license
console.log('hello from Node'); const http = require('http'); const express = require('express'); const app = express(); //Object constructor for teh mongo schema let Item; //Config Sections enable for CORS for testing app.use(function (req, res, next) { res.header("Access-Control-Allow-Origin", "*"); res.header...
Ruby
UTF-8
2,754
2.703125
3
[ "BSD-2-Clause" ]
permissive
require "twitter_cldr" require "bigdecimal" module IsoDoc class PresentationXMLConvert < ::IsoDoc::Convert MATHML = { "m" => "http://www.w3.org/1998/Math/MathML" }.freeze def mathml(docxml) locale = twitter_cldr_localiser docxml.xpath("//m:math", MATHML).each do |f| mathml1(f, locale) ...
Java
UTF-8
608
2.953125
3
[]
no_license
package observer_forum; public class ForumUser implements Observer { private final String userName; private int updatesCount; public ForumUser(String userName) { this.userName = userName; } public String getUserName() { return userName; } public int getUpdatesCount() { ...
Java
UTF-8
477
1.765625
2
[]
no_license
package com.guoke.cloud.wechat.controller; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import com.guoke.cloud.wechat.domain.WechatConfig; @RestController public class Wech...
JavaScript
UTF-8
2,337
4.46875
4
[]
no_license
1. let fullName = 'Dominic ' + 'Parker' console.log(fullName) // > Dominic Parker 2. // > let number = 4936 // undefined // > let ones = 4936 % 10 // undefined // > ones // 6 // > number = (4936 - ones) /10 // 493 // > let tens = number % 10 // undefined // > tens // 3 // > number = (4936 - tens) /10 // 493.3 // > ...
Java
UTF-8
5,151
3.453125
3
[]
no_license
package com.java8.lambda; import java.util.*; import java.util.function.BiConsumer; import java.util.function.BinaryOperator; import java.util.function.Function; import java.util.function.Supplier; import java.util.stream.Collector; /** * 自定义实现Collector * @author wanchongyang * @date 2018/6/27 下午2:11 */ public cl...
Java
UTF-8
1,613
2.765625
3
[]
no_license
package com.kodilla.mockito.homework; import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Set; public class WeatherService { private Map<ServiceUser,Set<Location>> allUsers = new HashMap<>(); public void addServiceUser(ServiceUser user, Location location){ Set<L...
PHP
UTF-8
5,643
2.515625
3
[]
no_license
<?php require __DIR__ .'/SQLActions.php'; $get = new Actions; date_default_timezone_set('Europe/Istanbul'); function darkMode($value){ if (date("H") > 18) { $mode = array( "background" => "bg-dark", "color" => "text-secondary", "border" => "secondary" ); } else { $mode ...
Java
UTF-8
2,562
3.203125
3
[]
no_license
package com.wl.rxjava; import java.util.ArrayList; import java.util.List; /** * Created by Administrator on 2017/6/19. */ public class Producer implements Runnable{ public List<Product> mProducts; private Consumer mConsumer; public void setmConsumer(Consumer mConsumer) { this.mConsumer = mCons...
JavaScript
UTF-8
2,228
2.859375
3
[ "MIT" ]
permissive
const perfButton = document.querySelector('.perf-button'); // const algoResults = document.querySelector('#algo-results'); // Map : {n -> seq} perfButton.onclick = getSequences; myWorker = new Worker('js/worker.js'); function getSequences() { const progression = document.querySelector('.progression'); progres...
Java
UTF-8
256
1.835938
2
[]
no_license
package site.flyframe.http.server.parser; /** * @author zeng * @Classname HttpParser * @Description TODO * @Date 2019/9/22 14:12 */ public interface HttpParser { /** * 解析数据 * @return 解析 */ public Object parser(); }
TypeScript
UTF-8
1,805
2.625
3
[]
no_license
import { Request, Response } from "express"; import { LikeDislikeService } from "../services/likeDislike.service"; import { SUCCESS, CREATED, UPDATED, DELETED, INTERNAL_SERVER_ERROR } from "../statuscode/statuscode"; import { LikeDislikeModel } from "../models/likeDislike"; export class LikeDislikeController...
C++
UTF-8
20,914
3.140625
3
[]
no_license
/* Text Maze 3D * by Neil Roy * * Created in January, 2016, for old time sake. :) * * I tried to keep this cross platform compatible, but certain commands are more windows, this can't be helped. * If you wish to compile this on a non-windows system, just replace the system() call (to clear the screen) as * well ...
Markdown
UTF-8
1,287
2.640625
3
[]
no_license
# PokéDex A simple Pokémon catalogue, built with [React](https://reactjs.org/), [Material-UI](https://material-ui.com/) and [PokéAPI](https://pokeapi.co/). # Experimental Code! ## Links Watch it in action [here](https://pokedex-react-mui.netlify.app/) ## Features - View basic details of each Pokémon - Filter P...
JavaScript
UTF-8
517
2.921875
3
[]
no_license
import React from 'react' import ReactDOM from 'react-dom' let style = { color: 'red', fontSize: '30px' } let name = 'xfz' let flag = false; let names = ['Rose', 'xfz'] let jsx = ( <div style={style}> {/* 变量使用 */} <p>I am {name}</p> {/* 条件判断 */} { flag ? <p>I am {name}</p> : <p>I not ...
Java
UTF-8
1,687
1.929688
2
[ "Apache-2.0" ]
permissive
package com.andaily.service.impl; import com.andaily.domain.developer.loader.ProjectFormDtoLoader; import com.andaily.domain.developer.operation.ProjectFormDtoPersister; import com.andaily.domain.developer.operation.ProjectOverviewDtoLoader; import com.andaily.domain.developer.project.Project; import com.andaily.domai...
JavaScript
UTF-8
656
3.53125
4
[]
no_license
var input = require('fs').readFileSync('/dev/stdin', 'utf8'); var lines = input.split('\n'); let linha1 = lines.shift(); let numeros = linha1.split(" "); let hInicio = parseInt(numeros[0]); let mInicio = parseInt(numeros[1]); let hFim = parseInt(numeros[2]); let mFim = parseInt(numeros[3]); let totalH = hFim - hInicio...
Python
UTF-8
479
2.984375
3
[]
no_license
from selenium import webdriver import time from selenium.webdriver.support.ui import Select link = "http://suninjuly.github.io/selects1.html" browser = webdriver.Chrome() browser.get(link) sum = int(browser.find_element_by_id("num1").text) + int(browser.find_element_by_id("num2").text) select = Select(browser.find...
Python
UTF-8
6,444
2.71875
3
[ "MIT" ]
permissive
""" Teleport can be used to teleport an agent. """ from abc import ABC, abstractmethod from enum import Enum from math import pi from typing import Union, Optional, Tuple from pymunk import Vec2d from .basic import Traversable from ..element import SceneElement from ...agents.agent import Agent from ...common.definit...
C++
UTF-8
470
2.5625
3
[]
no_license
#include<iostream> using namespace std; int main(){ int t; cin>>t; while(t--){ int a,b,c,x,y,z,maxm=0; cin>>a>>b>>c>>x>>y>>z; for (int i=0;i<21;i++){ for (int j=0;j<21;j++){ for (int k=0;k<21;k++){ if (a*i+b*j+c*k<=240){ ...
Markdown
UTF-8
957
3.515625
4
[ "MIT" ]
permissive
--- published: true title: '[프로그래머스] Level 1 - 자릿수 더하기' layout: post subtitle: 'Programmers, Level 1' categories: algorithm tags: programmers problems comments: true use_math: true --- # **문제** > [`[프로그래머스] level 1 - 자릿수 더하기`](https://school.programmers.co.kr/learn/courses/30/lessons/12931) --- ## **문제 설명 및 풀이** 일일...
JavaScript
UTF-8
1,532
3.703125
4
[]
no_license
function validEntry () { var letters = document.getElementById("avail_letters") var word_len = document.getElementById("word_size") var pattern = document.getElementById("pattern") var message = document.getElementById("message") if(letters.value.length > 0 && word_len.value !== "any" && pars...
TypeScript
UTF-8
967
3.015625
3
[]
no_license
class EventCollection { private _totalEvents = 0; private _activeEvents = 0; private _onComplete : () => void; private _onEventComplete : () => void; constructor(onComplete : () => void, onEventComplete? : () => void) { this._onComplete = onComplete; this._onEventComplete = onEvent...
Markdown
UTF-8
752
2.703125
3
[]
no_license
# lesson8 Getting Started with GUIs ###### Complete the two projects from Raspberrypi.org and then complete the discussion questions on the readme ### Discussion Questions 1) Why might a programmer choose a group of checkboxes over a buttongroup widget? Compare and Contrast. 2) When a user clicks the book seats butt...
Java
UTF-8
2,304
2.09375
2
[]
no_license
package pl.idzikpro.xcom.tools; import lombok.Getter; import java.util.Arrays; import java.util.List; public class ImageList { @Getter private static List<String> alienList = Arrays.asList( "celatid", "chryssalid", "cyberdisc", "ethereal", "floater"...
Markdown
UTF-8
4,295
2.71875
3
[]
no_license
# Web Assembly Standalone The commands to run this code. ``` emcc standalone.c -s EXPORTED_FUNCTIONS='["_doubler"]' -Os -s WASM=1 -s SIDE_MODULE=1 -o standalone.wasm emrun --port 8080 . ``` ## The Details When compiling to WebAssembly, `emcc` emits both a JavaScript file and a WebAssembly file. The JavaScript loads ...
Java
UTF-8
13,353
1.75
2
[]
no_license
package com.example.credit.Activitys; import android.app.Activity; import android.app.ProgressDialog; import android.content.DialogInterface; import android.content.Intent; import android.net.Uri; import android.os.Build; import android.os.Bundle; import android.os.CountDownTimer; import android.os.Handler; import a...
PHP
UTF-8
1,164
2.78125
3
[ "Apache-2.0" ]
permissive
<?php namespace Its123Miguel321\BuildProtect\provider; use Its123Miguel321\BuildProtect\Area; use Its123Miguel321\BuildProtect\BuildProtect; abstract class DataProvider { public $plugin; public function __construct(BuildProtect $plugin) { $this->plugin = $plugin; } public abstract function areaExists(Area...
JavaScript
UTF-8
205
2.78125
3
[]
no_license
"use strict"; let base = {}; function FuncWrong() { this.name = "Wrong"; } FuncWrong.prototype = base; let objWrong = new FuncWrong(); let objWrong2 = new objWrong.constructor(); alert(objWrong2.name);
SQL
UTF-8
31,239
3.515625
4
[ "MIT" ]
permissive
select sum(zaduzenje) zad, sum(razduzenje) razd, sum(zaduzenje - razduzenje) stanje from( select dodatni_tip,broj_dok,god_dok,vrsta_dok, -------------------------------------------------------------------------------------------- TRUNC((MOD(ROWNUM-1,&BrRedNaStranici)-ROWNUM)*...
Python
UTF-8
920
2.828125
3
[ "Apache-2.0" ]
permissive
from typing import runtime_checkable, Protocol @runtime_checkable class Closable1(Protocol): def close(self): pass class Closable2(Protocol): def close(self): pass class ClosableImpl: def close(self): pass assert isinstance(ClosableImpl(), Closable1) assert issubclass(Closabl...
JavaScript
UTF-8
4,814
3.90625
4
[]
no_license
class Converter { constructor() { // Add this code inside the constructor this.conversionHistory; this.historyShown = false; // At first, it's set to false } static FtoC(f) { return (f - 32) * 5 / 9; } static CtoF(c) { return c * 9 / 5 + 32; } static ...
Markdown
UTF-8
5,207
2.8125
3
[ "BSD-3-Clause" ]
permissive
# Web Programming with Go by Kamesh Balasubramanian This is the official source code repository for the Web Programming with Go video series published by Packt. The video series teaches you how to develop full stack web applications using the Go programming language. <a href="https://www.packtpub.com/web-development/...
Markdown
UTF-8
60,571
2.703125
3
[]
no_license
# BlueRain.ID4i.Api.CollectionsApi All URIs are relative to *https://backend.id4i.de* Method | HTTP request | Description ------------- | ------------- | ------------- [**AddElementsToCollection**](CollectionsApi.md#addelementstocollection) | **POST** /api/v1/collections/{id4n}/elements | Add elements to collection [...
Go
UTF-8
4,043
3.140625
3
[]
no_license
package authentication import ( "errors" "fmt" "github.com/go-redis/redis" "go-spend/log" "go-spend/util" "net/http" "time" ) const ( justValue = "1" ) var ( ErrTooManyRequests = errors.New("too many requests from the same user") ) // RateLimiter checks if limit for a particular context was reached type Ra...
PHP
UTF-8
1,067
3.46875
3
[]
no_license
<?php namespace UserLogin; use UserLogin\Entity; class User implements Entity { /** * @var string */ private string $name = ''; /** * @var integer */ private int $age = 0; /** * @return string */ public function __toString():string{ $string = "Utilis...
Java
UTF-8
1,355
1.953125
2
[ "MIT" ]
permissive
package com.shc.gwtal.client.webaudio.nodes; import com.google.gwt.typedarrays.shared.Float32Array; import com.shc.gwtal.client.webaudio.AudioParam; import com.shc.gwtal.client.webaudio.enums.BiquadFilterType; /** * @author Sri Harsha Chilakapati */ public class BiquadFilterNode extends AudioNode { protected Bi...
JavaScript
UTF-8
2,457
2.8125
3
[]
no_license
const express = require('express') const path = require('path') // const bodyParser = require('body-parser') // const calcQueue = require('./js/calculateQueue') var fs = require('fs'); const server = express() const port = (process.env.PORT || 3000) server.use(express.json()) server.use(express.urlencoded({extended: ...
Python
UTF-8
467
3.140625
3
[]
no_license
import math import copy as cp def shell_sort(array): n=len(array) gap=n//2 while gap>0: i=gap while i<n: if array[i]<array[i-gap]: j=i-gap while j>=0: if array[j]>array[j+gap]: # swap operation array[j],array[j+gap]=array[j+gap],array[j] j=j-gap else: break i=i...
C#
UTF-8
2,718
2.828125
3
[]
no_license
using Microsoft.AspNetCore.Mvc; using ServiceAPI.Dal; using System; using System.Collections.Generic; using System.Text; using System.Threading.Tasks; using System.Linq; using Microsoft.EntityFrameworkCore; using System.Threading; namespace ServiceAPI { [Route("api")] public class ServiceApiMenu : Controller ...
Markdown
UTF-8
985
3.1875
3
[]
no_license
# Using Markov Chains to guess Trump's next tweet. ## What are Markov Chains? They basically allow us to use probability to determine what the next state of something will be. We can use all of Trump's old tweets to roughly determine what the next word he will say is. Unfortunately it isn't super accurate and doesn't...
Python
UTF-8
2,540
3.65625
4
[]
no_license
#!/usr/bin/env python # -*- coding: utf-8 -*- try: from tkinter import * # python 3. except: from Tkinter import * # python 2.7 def main(): #Crear y configurar ventana principal window = Tk() window.title("Entry") #window.geometry('500x150') # ...
C
UTF-8
312
2.65625
3
[ "MIT" ]
permissive
void bubble_a(long *data, long count) { long *i, *last; for (last = data + count - 1; last > data; last--) { for (i = data; i < last; i++) { if (*(i + 1) < *i) { long t = *(i + 1); *(i + 1) = *i; *i = t; } } } }
C++
UTF-8
4,174
2.609375
3
[]
no_license
/* Serial Data Aquisition for Pressure Sensors & Fan Control Included Sensors: - Huba */ //Libraries----------------------------------------------------------------------------------------- #include <Wire.h> #include <OneWire.h> #include <LiquidCrystal_I2C.h> #include <FreqCount.h> //Constants-----------------...
JavaScript
UTF-8
1,810
2.84375
3
[]
no_license
import React, { Component } from 'react'; // TODO: https://developer.mozilla.org/en-US/docs/Web/API/SpeechRecognition // TODO: http://blog.embian.com/120 스마트 미러 window.SpeechRecognition = window.SpeechRecognition || window.webkitSpeechRecognition; // const data = this.refs.datas; // // function log(message) { // d...
C++
UTF-8
417
2.578125
3
[]
no_license
#include "rAlignedBoxBoundingVolume.hpp" void rAlignedBoxBoundingVolume::SetBox(rAlignedBox3& box){ m_box = box; } bool rAlignedBoxBoundingVolume::IntersectsRay(const rRay3& ray, rPickResult& pickResult) const{ pickResult.hit = rIntersection::RayIntersectsAlignedBox(ray, m_box, &pickResult.point); return...
TypeScript
UTF-8
1,736
2.984375
3
[ "MIT" ]
permissive
import StockData from "../StockData"; import CandlestickFinder from "./CandlestickFinder"; import Doji from "./Doji"; export default class AbandonedBaby extends CandlestickFinder { constructor() { super(); this.name = "AbandonedBaby"; this.requiredCount = 3; } public logic(data: St...
Markdown
UTF-8
773
2.703125
3
[ "MIT" ]
permissive
PHP Exception Interfaces ======================== Exception interfaces for PHP inspired by * Ralph Schindler's [Exception Best Practices in PHP 5.3](http://ralphschindler.com/2010/09/15/exception-best-practices-in-php-5-3) blog post * John Barton's [RFC for the 7XX Range of HTTP Status codes - Developer Errors](...
C++
UTF-8
507
3.140625
3
[]
no_license
// Source: https://leetcode.com/problems/xor-queries-of-a-subarray/ // Author: Miao Zhang // Date: 2021-04-22 class Solution { public: vector<int> xorQueries(vector<int>& arr, vector<vector<int>>& queries) { vector<int> xors(arr.size() + 1); for (int i = 0; i < arr.size(); i++) { xors...
C++
UTF-8
1,167
2.84375
3
[]
no_license
// ** angular.module(name, [requires], [configFn]); /** name:字符串类型,代表模块的名称; requires:字符串的数组,代表该模块依赖的其他模块列表,如果不依赖其他模块,用空数组即可; // 也就是可以被注入到模块中的对象列表 // 字符串数组,每个元素都是一个模块名称, // 如果本模块要要用到其他模块的东西,需要提前用注入器加载 configFn:用来对该模块进行一些配置。 */ // Create a new module var myModule = angular.module('myModule', []); angular.mo...
C#
UTF-8
1,668
3.734375
4
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Mendoza_Vega { class Program { static void Main(string[] args) { int[] num = new int[10]; int i = 0; int par = 0; int im...
Python
UTF-8
453
3.28125
3
[]
no_license
class Solution(object): def findPeakElement(self, nums): """ :type nums: List[int] :rtype: int """ length = len(nums) index = 0 while index < length-1: if nums[index] > nums[index+1]: return index else: ...
Go
UTF-8
3,739
3.0625
3
[]
no_license
package p2 import ( "encoding/hex" "errors" "fmt" "golang.org/x/crypto/sha3" "sort" "strings" ) type BlockChain struct { Chain map[int32][]Block Height int32 } func (bChain *BlockChain) Get(height int32) []Block { return bChain.Chain[height] //is it really that simple? What if empty? what if not initialize...
C++
UTF-8
367
3.140625
3
[]
no_license
#include "queue.h" #include <iostream> #define SIZE 10 int main() { auto queue = new Queue<int>(); for (int i = 0; i < SIZE; i++) { queue->push(i); } std::cout << "queue size: " << queue->count() << std::endl; auto count = queue->count(); for (int i = 0; i < count; i++) { st...
Markdown
UTF-8
21,317
2.75
3
[]
no_license
# Call supervision, monitoring and streaming [RingCentral Call Monitoring](https://www.ringcentral.com/office/features/call-monitoring/overview) allows a person to receive a real-time audio stream so they can listen in on a call. The primary use case is a supervisor wishing to monitor and provide feedback on an agent'...
Java
UTF-8
350
1.859375
2
[]
no_license
package inventory.repository; import inventory.domain.StoreSku; import org.springframework.stereotype.Repository; import org.springframework.data.jpa.repository.*; /** * Spring Data JPA repository for the StoreSku entity. */ @SuppressWarnings("unused") @Repository public interface StoreSkuRepository extends JpaRe...
TypeScript
UTF-8
1,835
2.515625
3
[ "MIT" ]
permissive
import { Injectable } from '@nestjs/common' import * as path from 'path' import * as dotenv from 'dotenv' import * as fs from 'fs' @Injectable() export class ConfigService { private readonly envConfig: EnvConfig constructor() { this.envConfig = getEnvConfig() } get port(): number { return Number(this...
TypeScript
UTF-8
1,598
2.796875
3
[ "Apache-2.0" ]
permissive
// Copyright 2017-2023 @polkadot/dev authors & contributors // SPDX-License-Identifier: Apache-2.0 /** This should appear as-is in the output with: 1. extension added, 2. augmented.d.ts correct */ import './augmented.js'; /** This import should appear as-in in the ouput (cjs without asserts) */ import testJson from '...
Java
UTF-8
2,343
2.375
2
[ "MIT" ]
permissive
package com.auth0.client.mgmt; import com.auth0.json.mgmt.blacklists.Token; import com.auth0.net.BaseRequest; import com.auth0.net.Request; import com.auth0.net.VoidRequest; import com.auth0.net.client.Auth0HttpClient; import com.auth0.net.client.HttpMethod; import com.auth0.utils.Asserts; import com.fasterxml.jackson...
Java
UTF-8
3,630
2.75
3
[]
no_license
package servlet; import java.io.IOException; import java.sql.SQLException; import javax.servlet.RequestDispatcher; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http...
Java
UTF-8
335
2.21875
2
[]
no_license
package io.cybertech.pd.sensor.handler; import io.cybertech.pd.sensor.model.HeatResult; /** * Handler of {@link HeatResult} model objects. Typically, these are built from a buffer. */ public interface HeatResultHandler { /** * Handles the model object (argument). */ void handleHeatResult(HeatResu...
Java
UTF-8
4,115
3.0625
3
[]
no_license
package testmorpion.plateau; import java.util.Arrays; import testmorpion.personne.Personne; public class Grille { private CaseGrille[] cases; public Grille() { this.cases = new CaseGrille[9]; this.clean(); } public Personne getJoueurGrilleChoisie(int id) { return this.cases[id].getcase...
C++
UTF-8
2,292
2.53125
3
[]
no_license
//____________________________________________________________________________ /* Copyright (c) 2003-2023, The GENIE Collaboration For the full text of the license visit http://copyright.genie-mc.org Costas Andreopoulos <constantinos.andreopoulos \at cern.ch> University of Liverpool & STFC Rutherford Appleton Labo...
Markdown
UTF-8
1,876
2.75
3
[]
no_license
# CUCKOO 🐦 ## Cuckoo the twitter bot ### Web Console 💻 Ever wished about a bot which can save a twitter thread for you after having an interesting debate on twitter?🤔 Well, cuckoo can help you.😉 Mention her in the thread which you want to save, comeback and log in to the cuckoo console with your twi...
JavaScript
UTF-8
1,869
2.734375
3
[]
no_license
var utils = {}; utils.posAdd = function(pos){ return cc.p(pos.x+game.tileWidth, pos.y+game.tileHeight); } utils.posCount = function(pos, num){ return cc.p(pos.x+num, pos.y+num); } utils.tile2Pos = function(pos){ return utils.posCount(cc.p((pos.x)*game.tileWidth, game.height - (pos.y+1)*game.tileHeight), 16); } u...
TypeScript
UTF-8
795
2.53125
3
[]
no_license
import { Request, Response } from "express"; import { CreateAdministratorService } from '../../services/Administrator/CreateAdministratorService' import { AdministratorsType } from '../../dto/Administrator/AdministratorsType' class CreateAdministratorController{ async handle(request:Request, response:Response){ ...
Java
UTF-8
245
1.84375
2
[]
no_license
package com.fcproject.service; import com.fcproject.model.News; /** * Created by ozlemakbas on 15/05/16. */ public interface NewsService { Iterable<News> listAllNews(); News getNewsById(Integer id); News saveNews(News news); }
Python
UTF-8
395
2.671875
3
[]
no_license
import cv2 import numpy as np import matplotlib.pyplot as plt img = cv2.imread("000020_001.jpg", 1) cv2.imshow("src", img) # 彩色图像均衡化,需要分解通道 对每一个通道均衡化 (b, g, r) = cv2.split(img) bH = cv2.equalizeHist(b) gH = cv2.equalizeHist(g) rH = cv2.equalizeHist(r) # 合并每一个通道 result = cv2.merge((bH, gH, rH)) cv2.imshow("dst", result...
Python
UTF-8
375
3.59375
4
[]
no_license
def is_consecutive(s, start=None, d=0): if start is None: for i in range(1, len(s)): t = int(s[:i]) if is_consecutive(s[i:], t + 1, 1) or is_consecutive(s[i:], t - 1, -1): return True else: if s == "": return True t = str(start) if s[:len(t)] == t and is_consecutive(s[len(...
Java
UTF-8
592
2.578125
3
[]
no_license
package it.polito.tdp.spellchecker.model; import java.io.BufferedReader; import java.io.FileReader; import java.io.IOException; public class ItalianDictionary extends Dictionary{ @Override public void loadDictionary() { try { FileReader fr=new FileReader("rsc/Italian.txt"); BufferedReader ...