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
JavaScript
UTF-8
1,177
3.390625
3
[]
no_license
// Click on the cookie. clicky = function(interval) { cookie = $("#bigCookie"); setInterval(function() {cookie.click(); }, interval) } // Click on the golden cookies. goldenClicky = function(interval) { setInterval(function() {$("#goldenCookie").click(); }, interval) } // Buy products prodAndUpgradeClicky =...
C#
UTF-8
1,098
2.6875
3
[]
no_license
using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace DrunkiBoy { class Bar : GameObject { public bool choseBurgers, choseKebab, choseBottles, hasBought; public Bar(Vector2 pos, Tex...
Java
UTF-8
2,099
2.1875
2
[]
no_license
package com.example.demo.LoginSecurity; import com.example.demo.Dto.AccountDto; import com.example.demo.Entity.AccountEntity; import com.example.demo.Repository.AccountRepository; import com.example.demo.Sevice.AccountSevice; import com.example.demo.Sevice.RoleSevice; import com.example.demo.TransFrom.ConvertAccount; ...
Java
UTF-8
1,291
2.34375
2
[]
no_license
package com.tmh.entities; import java.time.LocalDateTime; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.JoinColumn; import javax.persistence.ManyToOne; import jav...
C#
UTF-8
1,800
3.3125
3
[]
no_license
using System; using System.Collections.Generic; using System.Text; using System.Linq; using HeadFirstCSharp9_1; namespace JimmyLinq { public class ComicAnalyzer { private static PriceRange CalculatePriceRange(Comic comic, IReadOnlyDictionary<int, decimal> prices) { if (prices[comic...
Java
UTF-8
490
2.546875
3
[]
no_license
package ch.epfl.moocprog; public class Positionable { private ToricPosition positionne; public Positionable() { positionne = new ToricPosition(); } public Positionable(ToricPosition pos) { positionne = pos; } public ToricPosition getPosition() { return positionne; } pr...
Markdown
UTF-8
17,886
3.359375
3
[]
no_license
In Cardstack, a user's journey through a UI is reflected in the browser's URL and the data that is fetched at each segment. For example, when someone visits `http://localhost:4200/articles/ten-reasons-love-cardstack`, it has a direct effect on which visual components are used and the information sent in a GET request....
Java
UTF-8
1,615
2.109375
2
[ "Apache-2.0" ]
permissive
/** * Copyright [2016] [Christian Loehnert] * * 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 ag...
Python
UTF-8
159
3.140625
3
[]
no_license
def write_solution_into_file(sentence, path_to_file): out_to_file = open(path_to_file, "a") out_to_file.write(sentence + "\n") out_to_file.close()
C++
UTF-8
3,535
2.625
3
[]
no_license
#ifndef __LCD_H__ #define __LCD_H__ #include <vector> #include "types.hpp" #include "i2c.hpp" #include "delay.hpp" class LCD : private I2C, private Delay { public: LCD(const std::string& i2c_bus, uint8_t i2c_addr) : I2C(i2c_bus, i2c_addr), Delay() { clearVariables(); }; enu...
C#
UTF-8
4,052
3.734375
4
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.IO; using System.Reflection; namespace ConsoleApplication2 { // Start by declaring a delegate that looks exactly like the library method you want to call, but with TRuntimeType in place of the actual type...
C++
UTF-8
4,942
3.328125
3
[]
no_license
// BirthdayManager.h // Lab 4: partydb // CIS 22C F2016: Matthew Tso #include "BirthdayManager.h" // Static members need to be instantiated at startup. BinarySearchTree<Person<BY_NAME>> BirthdayManager::tree_by_name; BinarySearchTree<Person<BY_BIRTHDAY>> BirthdayManager::tree_by_bday; ofstream BirthdayManager::stream...
Python
UTF-8
178
3.796875
4
[]
no_license
#!/usr/bin/python3 def hello(): print("Hello, world") def sqrt(n): return n ** .5 hello() m = sqrt(1234) n = sqrt(2) print("m is {0:.3f} n is {1:.3f}".format(m, n))
C
UTF-8
10,246
2.59375
3
[]
no_license
#include <stdio.h> #include <stdlib.h> #include <sys/wait.h> #include <sys/stat.h> #include <sys/types.h> #include <dirent.h> #include <unistd.h> #include <errno.h> #include <string.h> #include <sys/socket.h> #include <netinet/in.h> #include <netdb.h> #include <ctype.h> #include <arpa/inet.h> #include <fcntl.h> #includ...
C
UTF-8
3,389
3
3
[]
no_license
#include <stdio.h> #include <stdlib.h> #define N 5000 #define segments 10 void swap (int *x, int *y) { int aux; aux = *x; *x = *y; *y = aux; } void QuickSort(int a[], int l, int r) { int i,j; if (l>=r) return; i = l+1; //razvrstavanje elemenata s obzirom na stozer j = r; while ((i<=j) && (i<=r) && (j>l)) {...
C++
UTF-8
915
4.1875
4
[]
no_license
/* CPP program to demonstrate function overriding in inheritance. */ #include<bits/stdc++.h> using namespace std; class M{ // BASE Class protected: string m; public: M(){ m = "Base"; } void display(){ cout<<m<<endl; } }; class N: public M{ //...
Python
UTF-8
322
3.1875
3
[]
no_license
from sys import stdin def input(): return stdin.readline().strip() n = int(input()) a = [] for _ in range(n): a.append(int(input())) a.sort() i = 0 ans = 0 while i < n: num = 1 i += 1 while i < n and a[i] == a[i-1]: num += 1 i += 1 if num % 2 == 1: ans += 1 print(an...
Java
WINDOWS-1252
297
1.953125
2
[]
no_license
package cn.test.action; import cn.test.domain.Survey; public class SurveyAction extends BaseAction<Survey> { private static final long serialVersionUID = 1303842348519015254L; /***/ private Survey survey = new Survey(); @Override public Survey getModel() { return survey; } }
TypeScript
UTF-8
8,780
3.03125
3
[]
no_license
//地图文件 const FILE_NAME = 'FileList'; const getMapFullPath = function (name: string) { return jsb.fileUtils.getWritablePath() + 'Map/' + name + '.bmap'; } enum HasFlag { BG = 1 << 4, ITEM1 = 1 << 5, ITEM2 = 1 << 6, } class TiledData { x: number; //Int8 1Byte y: nu...
Python
UTF-8
993
4.1875
4
[]
no_license
""" Python dictionary Sorting by value references: https://blog.csdn.net/buster2014/article/details/50939892 """ def sort_by_value(mydict): """ :param mydict: :return: sorted dict by value, displaying key """ items = mydict.items() backitems = [[v[1],v[0]] for v in items] # backitems.sort...
Markdown
UTF-8
6,532
2.578125
3
[ "LicenseRef-scancode-generic-cla" ]
no_license
--- title: "使用 Azure Functions 執行排程的清除工作 | Microsoft Docs" description: "使用 Azure Functions 建立會根據事件計時器執行的 C# 函數。" services: functions documentationcenter: na author: ggailey777 manager: erikre editor: tags: ms.assetid: 076f5f95-f8d2-42c7-b7fd-6798856ba0bb ms.service: functions ms.devlang: multiple ms.topi...
JavaScript
UTF-8
776
2.671875
3
[]
no_license
let menu = document.querySelector('.header__menu'); let hamburger = document.querySelector('.hamburger'); let writeButton = document.querySelector('.footer__write'); let modal = document.querySelector('.modal__window'); let closeButton = document.querySelector('.modal__close'); hamburger.addEventListener('click', () =...
Shell
UTF-8
522
3.09375
3
[]
no_license
#!/bin/bash ################# # # Scanning script # ################# #Update clamAV database echo "***Updating clamAV databases***" sudo freshclam #Scan for rootkits echo "***RootKit scanner***" sudo chkrootkit #Scan for virus and malware, #notify user with bell when infection found #only show infeected files #tak...
Java
UTF-8
155
1.609375
2
[]
no_license
package com.edu.service; import java.util.List; import com.edu.entity.Auth; public interface IAuthService { public List<Auth> findAll(); }
Java
UTF-8
378
1.570313
2
[]
no_license
package com.analyzeme.scripts; import org.junit.Test; /** * Created by lagroffe on 20.07.2016 13:34 * not a real test (for manual testing) */ public class TestGithubDownloader { @Test public void test() throws Exception { GithubDownloader.download("r/example_anon_vector.R"); G...
SQL
UTF-8
5,040
3.203125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 3.1.1 -- http://www.phpmyadmin.net -- -- Serveur: localhost -- Généré le : Mar 11 Décembre 2012 à 11:48 -- Version du serveur: 5.1.30 -- Version de PHP: 5.2.8 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CH...
TypeScript
UTF-8
1,662
2.5625
3
[]
no_license
import { Formats } from "../../data-interface/formats"; const numberConvertor = new Map(); numberConvertor.set(Formats.positive_fixint, { convert: function(buff: Buffer) { return buff.readUInt8(0); }, } ); numberConvertor.set(Formats.negative_fixint, { convert: function(buff: Buffer) { r...
TypeScript
UTF-8
3,070
2.515625
3
[]
no_license
module egret3d { /** * @private * @class egret3d.ShadowRender * @classdesc * 阴影渲染器 */ export class ShadowRender extends RenderBase { public static frameBuffer: FrameBuffer; public static castShadowLight: LightBase; public static shadowCamera3D: Camera3D; p...
Markdown
UTF-8
2,989
3.140625
3
[]
no_license
--- title: 季末 description: 许久没来这里,再来自然不会感到陌生,前些日子积累可以有些记录的东西,有关城市,有关食粮,有关诗和远方,但也只是一闪而过的念头,以致于并没有太大的冲动写下点什么,归结于感悟不足和宁缺勿滥都好。时间点是个很好的借口,能将一些堆积的杂想稍微整理,给文章起名也简单,就像“季末”。 --- 许久没来这里,再来自然不会感到陌生,前些日子积累可以有些记录的东西,有关城市,有关食粮,有关诗和远方,但也只是一闪而过的念头,以致于并没有太大的冲动写下点什么,归结于感悟不足和宁缺勿滥都好。时间点是个很好的借口,能将一些堆积的杂想稍微整理,给文章起名也简单,就像“季末”。 想过总结在小城和大城饮食...
Markdown
UTF-8
1,899
2.75
3
[]
no_license
<p align="center"> <img src="https://github.com/whyandree/go_finances/blob/master/src/assets/logo.svg" alt="go finances" width="300px"/> </p> <p align="center"> #Ignite 🚀 Rocketseat </p> <h2> 📃 Sobre a aplicação </h2> <i>Go_finances</i> é uma aplicação para controle de rendas e gastos pessoais. Podemos adici...
JavaScript
UTF-8
764
3.9375
4
[]
no_license
/** * There are two sorted arrays nums1 and nums2 of size m and n respectively. * Find the median of the two sorted arrays. The overall run time complexity should be O(log (m+n)). * You may assume nums1 and nums2 cannot be both empty. * * example 1 * nums1 = [1, 3] * nums2 = [2] * The median is 2.0 * * exampl...
Shell
UTF-8
375
2.59375
3
[]
no_license
# usage: # ./sendlink.sh "https://cvs.test-app.link/ecQRNoAuthDeals?progname=ecQRNoAuthDeals&mxc=28c83f4635d193b3cf29a03dcda640e46122af04869854943f7364387164e212" # don't forget to wrap the url in quotes url=$1 urlWithEscapedParams="${url//&/\&}" echo Sending Link: ${urlWithEscapedParams} adb shell am start -W -a...
C
UTF-8
2,515
3.671875
4
[]
no_license
/* 给定两个二进制字符串,返回他们的和(用二进制表示)。 输入为非空字符串且只包含数字 1 和 0。 示例 1 输入 a = 11, b = 1 输出 100 示例 2 输入 a = 1010, b = 1011 输出 10101 */ #include <stdio.h> #include <stdlib.h> #include <string.h> char* addBinary(char * a, char * b){ int len_a = strlen(a) ; int len_b = strlen(b...
C++
UTF-8
3,342
2.53125
3
[ "LicenseRef-scancode-generic-cla", "BSD-2-Clause" ]
permissive
#ifndef CAFFE_LSTM_NODE_LAYER_HPP_ #define CAFFE_LSTM_NODE_LAYER_HPP_ #include <vector> #include "caffe/blob.hpp" #include "caffe/layer.hpp" #include "caffe/proto/caffe.pb.h" namespace caffe { /** * @brief Processes sequential inputs using a "Long Short-Term Memory" (LSTM) * [1] style recurrent neural netw...
Java
UTF-8
5,739
2.46875
2
[]
no_license
package com.mr2.zaiko.ui.test; import com.mr2.zaiko.useCase.TestApplicationService; public class TestPresenter implements ContractTest.Presenter { private ContractTest.View view; private TestApplicationService service; public TestPresenter(TestApplicationService testApplicationService) { this.ser...
C++
UTF-8
448
2.90625
3
[]
no_license
// // Created by Adeesh Ankaraju Gopalakrishnan on 2019-01-22. // class Solution { public: vector<vector<int>> transpose(vector<vector<int>>& A) { int inner_size = A[0].size(), outer_size = A.size(); vector<vector<int>> ret_list(inner_size, vector<int>(outer_size,0)); for(int i=0;i<outer_si...
Markdown
UTF-8
5,297
2.734375
3
[]
no_license
# spring-boot-reactive-download-file > ตัวอย่างการเขียน Spring-boot Reactive Download File # 1. เพิ่ม Dependencies และ Plugins pom.xml ``` xml ... <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>2.3.2.RELEASE</version> </parent> <depend...
Shell
UTF-8
1,018
4
4
[ "MIT" ]
permissive
#!/bin/sh # Check if backup specified. if [ "$#" -ne 1 ]; then echo "Backup dirname wasn't specified." echo "NOTE: It must be a dirname without symlinks pointing outside of the current directory." exit 1 fi # Check if backup based on root. first_char="$(printf '%s' "$1" | cut -c1)" if [ "$first_char" = "/" ]; then...
Python
UTF-8
221
2.6875
3
[]
no_license
l=int(input()) m=list(map(int,input().split(" "))) m=sorted(m) p=[] for i in range(len(m)-1): if(m[i]==m[i+1]): p.append(m[i]) if(p): for j in set(p): print(j,end=" ") break else: print("unique")
Markdown
UTF-8
5,428
3.171875
3
[]
no_license
--- title: Synchronous Publication --- xMsg supports publishing a message and receiving a response, with the following method: ```java xMsgMessage syncPublish(xMsgConnection connection, xMsgMessage msg, int timeout) throws xMsgException, TimeoutException ``` This publishes the message just like the `publish`...
Markdown
UTF-8
2,249
3.265625
3
[ "MIT" ]
permissive
# cordova-plugin-datecs-printer The first thing that you must know is that the plugin is available through this variable `window.DatecsPrinter`. So, there's a lot of functions that you can call to execute each operation and perform the printer actions, these are the most important ones (you can see all on [printer.js...
Python
UTF-8
1,784
2.75
3
[]
no_license
import pytest from Spells.remembered_spells import * from Spells.spell_book import SpellBook class TestRememberedSpells: def test_init(self): sb = SpellBook() rs = RememberedSpells(sb) rs.remembered[0] = {} def test_added_spell(self): sb = SpellBook() sb.add_spell("Fi...
Swift
UTF-8
262
2.734375
3
[]
no_license
import UIKit import RxSwift import RxCocoa /* RxSwift Operators Scan */ // Scan let disposeBag = DisposeBag() let source = Observable.of(1,2,3,5,6) source.scan(0, accumulator: +) .subscribe(onNext: { print($0) }).disposed(by: disposeBag)
C++
UTF-8
989
2.859375
3
[]
no_license
//Equilibrium point #include <iostream> using namespace std; int main() { int t; cin>>t; while(t--) { int n; cin>>n; int arr[n]; for(int i=0;i<n;i++) cin>>arr[i]; if(n==1) { cout<<1<<endl; continue; ...
PHP
UTF-8
1,650
2.75
3
[ "MIT" ]
permissive
<?php declare(strict_types=1); namespace Tale\Cache; use Psr\Cache\CacheItemInterface; abstract class AbstractPool implements PoolInterface { /** @var ItemInterface[] */ private $deferredItems = []; public function getItems(array $keys = []) { foreach ($keys as $key) { yield $th...
Markdown
UTF-8
1,050
3.09375
3
[]
no_license
# 起步 ## 起步 ### 系统要求 * PHP >= 5.3.0 如果你使用加密的cookie,`mcrypt`扩展是必要的。 ### Composer安装 安装composer在你的项目里: ``` curl -s https://getcomposer.org/installer | php ``` 在你项目的根目录创建一个`composer.json`文件: ``` { "require": { "slim/slim": "2.*" } } ``` 通过Composer安装: ``` php composer.phar inst...
Java
UTF-8
9,747
1.992188
2
[]
no_license
package collab.logic; import java.util.Date; import java.util.List; import java.util.stream.Collectors; import java.util.stream.StreamSupport; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.data.domain.PageR...
C#
UTF-8
3,506
2.71875
3
[]
no_license
using Microsoft.AspNetCore.Mvc; using Microsoft.EntityFrameworkCore; using System; using System.Collections.Generic; using System.Linq; using System.Reflection; using System.Text; using System.Threading.Tasks; using TacobellCustomerApi.Models; namespace TacobellCustomerApi.Repository { public class Customerrepo :...
C#
UTF-8
610
2.75
3
[]
no_license
using System.IO; using System.Web; namespace DataLayer { public class ProdutoImagem { private readonly int _id; public ProdutoImagem(int id) { _id = id; } public int ID => _id; public string Imagem80 => Imagem("80"); public string Imagem200 => Imagem(...
PHP
UTF-8
7,033
3.03125
3
[]
no_license
<?php namespace Tet\Database; use Tet\Common\CodeGenerator; use Tet\Filesystem\Filesystem; use Tet\Database\Table; use Tet\Database\ColumnDef; use Tet\Database\TableCollection; class DatabaseScheme { function createCode($structure, $destination = "./", $namespace = ""): bool { $dbname = $structure["n...
Python
UTF-8
2,504
2.609375
3
[]
no_license
# Successful Proton Transfer # O2 and O38 – snapshot 230 – 530 (PT at snap. 380 in centroid data) # O2 and O38 – snapshot 3310 – 3610 (PT at snap. 3460 in centroid data) # O38 and O16 – snapshot 20515 – 20815 (PT at snap. 20665 in centroid data) # O38 and O16 – snapshot 24140– 24440 (PT at snap. 24290 in centroid...
Java
UTF-8
14,976
2.25
2
[]
no_license
/* * 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 nz.co.lolnet.james137137.dezsteamingserveraccess; import com.myjeeva.digitalocean.common.ActionStatus; import com.myjeeva.digi...
JavaScript
UTF-8
214
2.859375
3
[]
no_license
/** * Created by Andre on 3/8/2018. */ module.exports = function repeatStringNumTimes(str, num) { // repeat after me if (num > 0){ return str.repeat(num); } else { return ""; } };
Shell
UTF-8
459
3
3
[ "MIT" ]
permissive
#!/bin/bash envtypes=('CTL2010' 'C285' 'AF1855') runtype='PROD' chunk='s0' if [ $runtype == 'PROD' ];then runstr='' pad='' else pad=' ' fi for envtype in ${envtypes[@]}; do echo "submitting "$envtype"_"$runstr$pad$chunk" ...." bash make_config.sh $envtype $runtype $chunk cfile="PPEn11/config...
Java
UTF-8
1,016
2.5
2
[ "Apache-2.0" ]
permissive
package model; public class InputInfo { private String hash; private Account account; private Account srcAcc; private Account firstLevel; private Account secondLevel; private Account threeLevel; public void setHash(String hash){ this.hash = hash; } public String getHash(){ return hash; ...
Python
UTF-8
1,006
3.953125
4
[]
no_license
def binary_search(array, left, right, key): if len(array) == 0: return False mid_index = (left + right) // 2 if array[mid_index] == key: return mid_index if array[mid_index] > key: # subtract one from midpoint since we've already evaluated the element that index right = mid_index - 1 retu...
TypeScript
UTF-8
1,429
2.5625
3
[ "MIT" ]
permissive
/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ import {Directive, InjectionToken, Input} from '@angular/core'; let nextUniqueId = 0; /** * Injection token that c...
C
UTF-8
2,244
2.859375
3
[]
no_license
#define _CRT_SECURE_NO_WARNINGS 1 #include"comment_convert.h" void comment_convert(FILE* pfwrite,FILE* pfread) { enum STATE state = NUL_STATE; while(state != END_STATE) { switch(state) { case NUL_STATE: DO_NULL_STATE(pfwrite,pfread,&state); break; case C_STATE: DO_C_STATE(pfwrite,pfread...
Rust
UTF-8
2,441
3.328125
3
[]
no_license
mod event; mod expr; mod marker; mod sink; mod source; use crate::lexer::{Token, Lexer, SyntaxKind}; use crate::syntax::SyntaxNode; use event::Event; use expr::expr; use marker::Marker; use rowan::GreenNode; use sink::Sink; use source::Source; pub fn parse(input: &str) -> Parse { let tokens: Vec<_> = Lexer::new(i...
C
UTF-8
498
3.359375
3
[]
no_license
// // main.c // getchar-putchar // // Created by Александр Ерыгин on 22.11.15. // Copyright © 2015 Alex Erygin. All rights reserved. // #include <stdio.h> int main(int argc, const char * argv[]) { char c; while((c = getchar()) != EOF){ if(c == '\t'){ printf("\\t"); } ...
PHP
UTF-8
5,030
2.703125
3
[ "Unlicense" ]
permissive
<?php namespace Jeely\TL\Types; use Jeely\LazyUpdates; /** * @class InlineQueryResultLocation * @description Represents a location on a map. By default, the location will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the location. * ...
Java
UTF-8
335
2.4375
2
[]
no_license
package state_pattern; /** 关机状态 * Created by Niwa on 2017/8/20. */ public class PowerOffState implements TvState{ @Override public void nextChannel() { } @Override public void prevChannel() { } @Override public void turnUp() { } @Override public void turnDown() { ...
Java
UTF-8
1,534
3.1875
3
[]
no_license
import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.Stack; public class StackQueue42586Stack { public static void main(String[] args) { StackQueue42586Stack T = new StackQueue42586Stack(); int[] progresses = {93, 30, 55}; int[] speeds = {1, 30, 5}; ...
Shell
UTF-8
642
3.90625
4
[ "Apache-2.0" ]
permissive
#!/bin/bash declare -a args for arg in "$@"; do file="${arg%:[0-9]*}" file="$(realpath "$file")" args+=("$file") case "$arg" in *:*) num="${arg##*:}" args+=("+$num") ;; esac done declare -a editors=( codeedit vim ) for editor in "${editors[@]}"; do type "$editor" >/de...
Java
UTF-8
706
1.828125
2
[]
no_license
package io.finstats; import io.finstats.api.FinStatsRestApiVerticle; import io.finstats.statistics.StatisticsService; import io.finstats.statistics.StatisticsServiceImpl; import io.finstats.storage.MetricsStorage; import io.finstats.storage.MetricsStorageImpl; import static io.finstats.utils.LoggingUtils.configureLogg...
Java
UTF-8
4,253
2.171875
2
[ "Apache-2.0" ]
permissive
package com.github.microwww.bitcoin.provider; import com.github.microwww.bitcoin.net.MessageHeader; import com.github.microwww.bitcoin.net.NetProtocol; import com.github.microwww.bitcoin.net.PeerChannelClientProtocol; import com.github.microwww.bitcoin.net.protocol.*; import com.github.microwww.bitcoin.util.ByteUtil; ...
JavaScript
UTF-8
1,521
3.921875
4
[]
no_license
/* The ShipL class is a class which represents a L-shaped ship. */ class ShipL { constructor() { this.area = []; this.type = "L Ship"; } /* The randomizeShip() function will randomize the location and determine the area of the ship given the height and width of the board. The area will be ...
Python
UTF-8
635
4.34375
4
[]
no_license
Elements = [] try: totalElements = int(input("Enter the List Size: ")) print("Enter Elements:") for elementCount in range(0, totalElements): print("Enter Number", elementCount,) item = int(input()) Elements.append(item) print("Inserted Elements are: ", Elements) ...
Python
UTF-8
1,030
3.625
4
[]
no_license
#! venv/bin/python3.7 """ There are some prime values, p, for which there exists a positive integer, n, such that the expression n^3 + n^2 * p is a perfect cube. For example, when p = 19, 8^3 + 8^2 × 19 = 12^3. What is perhaps most surprising is that for each prime with this property the value of n is unique, and th...
Markdown
UTF-8
3,109
2.828125
3
[]
no_license
<!-- Theme: "Olive Green" Color: white --> # Cryptocoin for Swift ### A modular framework for Bitcoin, Litecoin, Dogecoin, etc. written in Swift (and a bit of C) # github.com/CryptoCoinSwift #### Work in progress. Inspired by CryptoCoinJS. #### Sjors Provoost / sjors@purpledunes.com / @provoost #### August 5th, ...
Markdown
UTF-8
3,102
2.671875
3
[ "CC-BY-4.0", "CC-BY-SA-4.0" ]
permissive
<!-- loio9164ba7047b74a25a19baf9c5bb986ae --> | loio | | -----| | 9164ba7047b74a25a19baf9c5bb986ae | <div id="loio"> view on: [demo kit nightly build](https://sdk.openui5.org/nightly/#/topic/9164ba7047b74a25a19baf9c5bb986ae) | [demo kit latest release](https://sdk.openui5.org/topic/9164ba7047b74a25a19baf9c5bb986ae)<...
Python
UTF-8
3,288
2.640625
3
[ "MIT" ]
permissive
def get_php_fpm_eval(attack_type): php_code = "" if attack_type == "gopher": php_code = """ $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "%s"); curl_setopt($ch, CURLOPT_HEADER, 0); $o = curl_exec($ch); curl_close($ch); $o = end...
PHP
UTF-8
10,093
2.640625
3
[]
no_license
<?php /** * EGmap3 Yii extension * * Object oriented PHP interface to GMAP3 Javascript library for * Google Maps. * * GMAP3 was originally written by DEMONTE Jean-Baptiste. * Special permission has been granted to release under the LGPL for * this extension. * @link http://gmap3.net * * This extension has ...
Java
UTF-8
400
1.945313
2
[]
no_license
package com.newvery.web.response; import com.google.gson.annotations.Expose; import com.newvery.record.ArticleRecord; import com.newvery.web.servlet.BaseResponse; public class ArticleResponse extends BaseResponse { @Expose private ArticleRecord article; public ArticleRecord getArticle() { return article; } p...
Java
UTF-8
7,653
2.390625
2
[]
no_license
package com.wmz.common.dao; import java.io.Serializable; import java.util.List; import java.util.Map; import com.wmz.common.util.Wrapper; /** *create by yinchong * @param <T> 实体类 */ public interface BaseDao<T> { /** * 保存和更新数据 * @param bean */ void save(T bean); /...
Ruby
UTF-8
1,440
2.75
3
[]
no_license
# coding: utf-8 # frozen_string_literal: true require "models/application_record" require "services/change_maker" require "utils/counter" require "utils/currency" class Money < ApplicationRecord VALID_DENOMINATIONS = [ 2_00, 1_00, 50, 20, 10, 5, 2, 1, ].freeze validates :denomin...
C#
UTF-8
1,058
3.15625
3
[]
no_license
var input = @"<?xml version=""1.0"" encoding=""utf-8""?> <Students> <Student> <Ordinal>1</Ordinal> <Name>Student1</Name> <BirthDate>Date1</BirthDate> <ID>ID1</ID> </Student> <Student> <Ordinal>2</Ordinal> <Name>Student2</Name> <BirthDate>Date2</BirthDate> <ID>ID2</ID> </Student> </Students>"; // Parse string is equival...
Swift
UTF-8
10,127
2.75
3
[]
no_license
import UIKit protocol MosiacLayoutDelegate: AnyObject { func collectionView(_ collectionView: UICollectionView, heightForHeader indexPath: IndexPath) -> CGFloat func collectionView(heightForTabBar collectionView: UICollectionView) -> CGFloat } enum Element: String { case header case cell v...
JavaScript
UTF-8
630
2.65625
3
[ "MIT" ]
permissive
const { validationResult } = require('express-validator'); // To create middleware, need to return a function module.exports = { handleErrors (templateFunction, dataCb = null) { return async (req, res, next) => { const errors = validationResult(req); //processes the errors and returns a Result Object i...
C#
UTF-8
5,547
2.828125
3
[]
no_license
using System; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Text.Json; using System.Text.Json.Serialization; using System.IO; namespace hitboard.pipeline { /** * Represents an input setup * Which translates a...
PHP
UTF-8
1,080
3.0625
3
[]
no_license
<?php namespace src\Utils\Paginacao; class Paginate extends PaginacaoAbstract{ protected $size; protected $quantidadePorPagina; protected $quantidadeDePaginas; public $paginaAtual; public function setSize($size){ $this->size = $size; return $this; } public function setQuantidadePorPagina($qu...
C++
UTF-8
1,583
2.578125
3
[]
no_license
#include "worker.h" void Worker::UsingMMap() { this->tails.clear(); int input = ::open(this->logUri.c_str(), O_RDONLY); if (input < 0) { Napi::TypeError::New(Env(), "Could not open " + this->logUri) .ThrowAsJavaScriptException(); return; } struct ::stat infos; //st...
PHP
UTF-8
923
2.5625
3
[]
no_license
<?php namespace app\mini\service; use app\mini\service\LogService; use app\mini\http\ChuanglanSmsApi; /** * 第三方短信 * Class SmsService * @package app\mini\service */ class SmsService { //短信发送 public static function smsSend($phone,$content){ $clapi = new ChuanglanSmsApi(); //设置您要发送的内容:其中“【】...
Java
GB18030
7,323
2.703125
3
[]
no_license
package com.mobileserver.servlet; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.io.PrintWriter; import java.sql.Timestamp; import java.util.Lis...
Markdown
UTF-8
6,315
2.75
3
[]
no_license
--- author: jock --- * Full-screen and resolutions * Broken A* * Testing and Fixing * Broken pipelines * [Solas 128](https://armorgamesstudios.com/games/solas/) * [RichCast](https://www.richcast.com/) * Release Notes **A-star path-finding video** [![A-star path-finding](http://img.youtube.com/vi/obL0Qsvl1Kg/0.jpg)](ht...
Markdown
UTF-8
1,545
2.8125
3
[ "MIT" ]
permissive
# Dynamic matrix control ### Description: The control is a realization of mandatory access table using Javascript. It's absolutely standalone and it doesn't require to include additional libraries. ![example of dynamic matrix control - dymatrix](https://verych.github.io/dymatrix/example.png) ### How to use: ```html <sc...
Markdown
UTF-8
10,297
2.765625
3
[]
no_license
# 2.3 基于IDEA开发第一个MapReduce大数据程序WordCount >开源地址 https://github.com/wangxiaoleiAI/big-data [卜算子·大数据 目录](./../../README.md) >开源“卜算子·大数据”系列文章、源码,面向大数据(分布式计算)的编程、应用、架构——每周更新!Linux、Java、Hadoop、Spark、Sqoop、hive、pig、hbase、zookeeper、Oozie、flink...etc 本节主要内容: 前提:已经有了大数据集群 [2.2 Hadoop3.1.0完全分布式集群配置与部署](./2.2.Hadoop完全分布式集群配置与...
C#
UTF-8
629
2.546875
3
[]
no_license
using System.ComponentModel.DataAnnotations; namespace HappyDog.Domain.DataTransferObjects.User { public class SignInDto { [Required(ErrorMessage = "请输入用户名")] [StringLength(12, ErrorMessage = "用户名最长12位")] [Display(Name = "用户名")] public string UserName { get; set; } [Re...
C
UTF-8
1,395
2.640625
3
[]
no_license
/****************************************************************************** filename StorageRoomDoor.c author Nico Hickman DP email nicholas.hickman@digipen.edu Brief Description: This file defines the functions to create a specific item, the "SRDoor". **************************************************...
Java
UTF-8
6,529
2.328125
2
[]
no_license
package br.com.fiap.b2w.controller; import java.io.IOException; import java.sql.SQLException; import java.text.SimpleDateFormat; import java.time.DateTimeException; import java.util.ArrayList; import java.util.Calendar; import java.util.List; import br.com.fiap.b2w.bo.PerfilBO; import br.com.fiap.b2w.model...
Python
UTF-8
171
2.984375
3
[]
no_license
# -*- coding: utf-8 -*- """ Created on Sat Mar 30 22:01:49 2019 @author: peter """ def numerical_diff(f,x):#微分 h=1e-4 return (f(x+h)-f(x-h))/(2*h)
Java
UTF-8
725
2.328125
2
[]
no_license
package com.intech.testing.publisher.service; import com.intech.testing.pubsub.common.data.MessageDto; import java.util.Random; public class MessageProducer { private final Random RANDOMIZER; private final MessageDto.Action[] ACTIONS; public MessageProducer() { RANDOMIZER = new Random(); ...
TypeScript
UTF-8
1,306
2.78125
3
[ "MIT" ]
permissive
import {Card} from '../entities/card'; import {Player} from '../entities/Player'; import {CardSpace} from '../entities/CardSpace'; import {Deck} from '../entities/Deck'; import { GameElementController } from "./GameElementController"; export class DeckController extends GameElementController { public showAllCard...
Python
UTF-8
237
3.15625
3
[ "MIT" ]
permissive
""" https://www.hackerrank.com/challenges/polar-coordinates language: Python 3 Sample Input 1+2j Sample Output 2.23606797749979 1.1071487177940904 """ from cmath import phase z = complex(input()) print(abs(z)) print(phase(z))
TypeScript
UTF-8
2,546
2.78125
3
[ "MIT" ]
permissive
import { ApiProperty, ApiPropertyOptional } from "@nestjs/swagger"; import { IsNotEmpty } from "class-validator"; export class UpdateDealDto { @IsNotEmpty({ message: `Please enter id&&&subject&&&Please enter id.`, }) @ApiProperty({ description: "Enter id",...
Java
UTF-8
3,716
1.65625
2
[ "Apache-2.0", "LicenseRef-scancode-generic-cla" ]
permissive
/* * Copyright 2013-2016 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 * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by ap...
Markdown
UTF-8
1,880
2.59375
3
[]
no_license
# Projet_MDSI_LAAS Projet 4IR S1 MDSI (UML/XML) ## Rappel des commandes à utiliser ### Pour vérifier la validité d’un document : ``` > xmllint --noout doc.xml --schema XSD/schema.xsd ``` avec : doc.xml : le document XML à tester schema.xsd : le schéma qui sert à la validation ### Pour créer un fichier HTML par tra...
Java
UTF-8
6,829
3.15625
3
[]
no_license
package controller.state; import controller.Controller; import data.Graph; import view.editor.Tab; import view.editor.elements.ElementView; import view.editor.elements.VertexView; import java.awt.*; import java.awt.event.MouseEvent; import java.util.HashMap; /** * Classe SelectionState gérant le mode de Sélection d...
TypeScript
UTF-8
1,102
3.484375
3
[]
no_license
export type Handler<Args> = (args?: Args) => void; export interface IEvent<Args> { subscribe(handler: Handler<Args>): ISubscription; unsubscribe(handler: Handler<Args>): void; } export class EventDispatcher<Args> implements IEvent<Args> { private _handlers = new Array<Handler<Args>>(); subscribe(ha...
Python
UTF-8
1,108
3.796875
4
[]
no_license
import string def readlines(file): """Reads lines in a file and returns dict containing unique words and frequency of use""" word_frequency = {} for line in file: line = file.readline() words = line.strip().lower().split() for word in words: word = remove_punctuation(...