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
Markdown
UTF-8
12,297
2.84375
3
[]
no_license
# URL Shortener This web app was written over a few days in a couple of several-hour marathons. This was an academic exercise to demonstrate a few of my technology choices for rapidly prototyping a basic but functioning (and hopefully useful) web app. ## Technology Solutions - [Django 1.9](https://docs.djangoproject...
Ruby
UTF-8
3,217
2.515625
3
[ "MIT" ]
permissive
require 'bilibili_sunday/downloader' require 'webrick' module BilibiliSunday require 'base64' require 'json' class RequestHandler def initialize(downloader) @downloader = downloader end def handle_request(method, params) begin result = /^bilibili_sunday.(.*?)$/.match(method) return handle_e...
Python
UTF-8
5,825
2.984375
3
[ "MIT" ]
permissive
# Autora: Sabrina Eloise Nawcki # Curso: BCC - Inteligencia artificial import Pilha class torres: def __init__(torre): torre.A = Pilha.pilha() torre.B = Pilha.pilha() torre.C = Pilha.pilha() torre.pilhas = [torre.A, torre.B, torre.C] torre.acoes = ( (0,1), #m...
Markdown
UTF-8
1,029
2.875
3
[]
no_license
# responsive-portfolio One of the latest major trends across the web industry is the increase in responsive web design – where websites were designed to respond to the size of the browser and change their layout accordingly. Responsive design requires designers to write code that inspects the physical characters of wha...
C#
UTF-8
1,691
3.640625
4
[ "MIT" ]
permissive
using System; using System.Collections.Generic; using System.Linq; namespace OrderedBankingSystem { public class Program { public static void Main() { var input = Console.ReadLine(); var banks = new Dictionary<string, Dictionary<string, decimal>>(); while (...
JavaScript
UTF-8
3,561
2.96875
3
[ "MIT" ]
permissive
(function () { 'use strict'; define( [ 'chai', 'util/safelyParseJson' ], function (chai, safelyParseJson) { var expect = chai.expect; describe('The `safelyParseJson` module', function () { it('Defines a function', function...
Java
UTF-8
286
2.09375
2
[]
no_license
package exceptions; public class NoSuchMessage extends Exception { private static final long serialVersionUID = 1L; private String message = "پیامی با مشخصات وارد شده موجود نمی باشد"; @Override public String getMessage() { return message; } }
Java
UTF-8
770
2.640625
3
[ "Apache-2.0" ]
permissive
package com.github.relucent.base.common.regex; import java.util.regex.Pattern; import org.junit.Assert; import org.junit.Test; public class RegexUtilTest { @Test public void testReplaceAll() { String actual = RegexUtil.replaceAll("A1B2C3D4", Pattern.compile("\\d+"), matcher -> Integer...
Rust
UTF-8
2,490
3.28125
3
[]
no_license
use rand; use matrix_bot_api::{Message, ActiveBot, MatrixBot, MessageType}; use matrix_bot_api::handlers::{HandleResult, StatelessHandler}; use matrix_bot_api::handlers::HandleResult::{ContinueHandling, StopHandling}; use crate::languages::*; use crate::tr; pub fn help_str_short() -> String { tr!("!roll X [X ..] ...
Java
UTF-8
479
1.84375
2
[]
no_license
package org.learn.store.web.model; import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; @JsonTypeInfo( use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "productType") @JsonSubTypes({ @JsonSubTypes.Type(value =...
C++
UTF-8
3,075
2.984375
3
[]
no_license
#pragma once #include "SDL.h" #include <vector> namespace DungeonGame { const float WINDOW_WIDTH = 1280.0f; const float WINDOW_HEIGHT = 720.0f; const float TILE_SIZE_W = 96.0f; const float TILE_SIZE_H = 96.0f; struct BulletData; struct Vector2d { float X; float Y; Vector2d() : X(0.0f), Y(0.0f) ...
Shell
UTF-8
1,114
3.390625
3
[ "BSD-3-Clause" ]
permissive
#!/bin/bash set -e # rabbitmq if [ "$RABBITMQ_URI" == "" ]; then # configure RABBITMQ_URI if started using docker-compose or --link flag if [ -n "$RABBITMQ_PORT_5672_TCP_ADDR" ]; then RABBITMQ_URI="amqp://guest:guest@${RABBITMQ_PORT_5672_TCP_ADDR}:${RABBITMQ_PORT_5672_TCP_PORT}/${RABBITMQ_VHOST}" e...
Java
UTF-8
196
2.109375
2
[]
no_license
package model.domein; public class EnqueteException extends Exception { public EnqueteException() { super(); } public EnqueteException(String s) { super(s); } }
Go
UTF-8
1,519
3.296875
3
[]
no_license
/** @Author: majm@ushareit.com @date: 2021/1/25 @note: **/ package common import "container/list" type Cache struct { MaxEntries int // 保存 lru的 顺序,进行lru的操作 ll *list.List cache map[interface{}]*list.Element // callback on ele remove OnEvicted func(key Key, value interface{}) } type Key interface{} typ...
Java
UTF-8
1,895
2.171875
2
[ "MIT" ]
permissive
package com.example.aoc.project_arnold.Adapters; import android.content.Context; import android.content.res.Resources; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.BaseAdapter; import android.widget.GridView; import android.widget.ImageView; import ...
Java
UTF-8
1,444
2.3125
2
[]
no_license
package com.example.oasis.vo; import java.util.ArrayList; import java.util.List; public class SearchResult { private int paperid; private String title; private List<String> author=new ArrayList<>(); private List<Integer> authorid=new ArrayList<>(); private int time; private String publication...
Markdown
UTF-8
520,028
2.65625
3
[ "MIT" ]
permissive
<style> table { border-collapse: collapse; } tr, td{ border: 1px solid #000000; } </style> # 零 基础知识 ## 1. 单词 <table> <tr> <td>abort</td> <td>终止</td> </tr> <tr> <td>interceptor</td> <td>拦截器</td> </tr> <tr> <td>pending</td> <td>未确定的</td> </tr> <tr> <td>resolved</...
Java
UTF-8
264
1.507813
2
[]
no_license
package com.otto.sdk.interfaces; import com.otto.sdk.model.api.response.TransactionHistoryResponse; import app.beelabs.com.codebase.base.IView; public interface IHistoryView extends IView { void handleTransacionHistory(TransactionHistoryResponse model); }
Shell
UTF-8
302
2.5625
3
[]
no_license
#!/bin/zsh let "out_num = $1" let "simple_time = $2" for outlet_num in {1..${out_num}} do postProcess -func "flowRatePatch(name=outlet${outlet_num})" -time ${simple_time} | sed -n "40p" >> result done postProcess -func "flowRatePatch(name=inlet)" -time ${simple_time} | sed -n "40p" >> result
PHP
UTF-8
806
2.625
3
[]
no_license
<?php namespace Relaxsd\ICalendar\Properties\Recurrence\Traits; use Relaxsd\ICalendar\Properties\Recurrence\RecurrenceDate; /** * Trait HasRecurrenceDates * * @see \Relaxsd\ICalendar\Properties\Recurrence\RecurrenceDate * * @package Relaxsd\ICalendar\Traits */ trait HasRecurrenceDateProperties { /** ...
C
UTF-8
1,120
3.09375
3
[]
no_license
#include <stdint.h> /* pour uint32_t */ /* * Définition de type incomplète : la struct KV est définie avec * l'implémentation des fonctions kv_*(), mais ça n'empêche pas * les programmes utilisateurs de ces fonctions de "transporter" * des pointeurs sur ces structures. */ typedef struct KV KV ; /* * Avec des ...
Markdown
UTF-8
605
3.75
4
[]
no_license
## Loops For-loop, regular: ```go for i := 0; i < 5; i++ { fmt.Println(i) } ``` For-loop, range: ```go for i, element := range array { fmt.Println(array[i]) fmt.Println(element) } ``` While-like-loop: ```go j := 0 isLessThanFive := true { for isLessThanFive { if j >= 5 { isLessThanFive = false } ...
C#
UTF-8
2,161
2.796875
3
[ "Apache-2.0" ]
permissive
using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; namespace PetaPocoEfCoreMvc.BogusResp { using Models; using Bogus; public interface ISampleCustomerRepository { IEnumerable<Customer> GetCustomers(); IEnumerable<User> GetUs...
C#
UTF-8
1,086
2.9375
3
[ "MIT" ]
permissive
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Input; using Windows.UI.Xaml.Input; namespace TalkAbout.ViewModel { public class RelayCommand<T> : ICommand { public event EventHandler CanExecuteChanged; p...
Java
UTF-8
751
1.953125
2
[ "CC-BY-3.0" ]
permissive
package org.smash.network; public final class GameNetwork { public static final String FILE_START_SKIN = "$FSS"; public static final String FILE_START_MAP = "$FSM"; public static final String USERNAME = "$U="; public static final String PLAYER_NUM = "$PL"; public static final String READY = "&OK"; ...
SQL
UTF-8
4,080
3.40625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.0.4 -- http://www.phpmyadmin.net -- -- Client: localhost -- Généré le: Mer 26 Mars 2014 à 22:32 -- Version du serveur: 5.5.20-log -- Version de PHP: 5.3.10 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIE...
Java
UTF-8
11,005
2.84375
3
[]
no_license
package watermelon.player4threaded; import java.util.ArrayList; import watermelon.sim.Pair; import watermelon.sim.Point; import watermelon.sim.seed; public class SeedGraph { static double distowall = 1.00; static double distotree = 2.00; static double distoseed = 2.00; static double epsilon = .000001; double ...
Java
UTF-8
861
2.40625
2
[]
no_license
package pluslearning.bailiwick.rajesh.com.pluslearning.util; import android.app.ProgressDialog; import android.content.Context; /** * Created by Deswal on 30-01-2018. */ public class ProDilog { private ProgressDialog dialog; private static ProDilog mInstance; public static synchronized ProDilog getIns...
Java
UTF-8
569
3.9375
4
[]
no_license
public class LargestElement { public static void main(String[] args) { double[] v = {1, 2, 99, 1, 34, 44}; System.out.println(max(v)); } /* * Check all elements of an array and returns the largest item * of that array, return type is a double. */ public static double ma...
PHP
UTF-8
2,681
3.140625
3
[ "MIT" ]
permissive
<?php namespace Script; abstract class CompiledScript { /** * Executes the program stored in this <code>CompiledScript</code> object. * * @param context A <code>ScriptContext</code> that is used in the same way as * the <code>ScriptContext</code> passed to the <code>eval</code> methods of ...
Python
UTF-8
1,838
3.4375
3
[]
no_license
import pandas as pd import numpy as np import time #read the data train = pd.read_csv('train.csv', delimiter='\t') train.Date=pd.to_datetime(train.Date,unit='s') test = pd.read_csv('test.csv', delimiter='\t') test.Date=pd.to_datetime(test.Date,unit='s') #Change the header train.rename(columns={'Unnamed: ...
Python
UTF-8
10,401
2.671875
3
[]
no_license
from django.shortcuts import render from django.http import JsonResponse import pandas as pd import numpy as np from numpy.polynomial.polynomial import polyfit from math import sqrt import sklearn from sklearn.metrics import mean_squared_error from sklearn.metrics import r2_score from sklearn.cross_validation impo...
JavaScript
UTF-8
1,219
2.59375
3
[]
no_license
//GET ALL EVENTS //GET /events?e=xxxx&p=xxxxxxxx //GET EVENT FOR ID: //GET /events/101?e=xxxx&p=xxxxxxxx [ { "id_event": 38, "name": "First event ", "description": "Descibing it. 7 days, 3 ppl with creator included", "created": "2013-06-27T11:04:22.153Z", "creator_email": "user1real...
PHP
UTF-8
10,748
2.515625
3
[]
no_license
<?php class Bug_Model extends Model { function __construct() { parent::__construct(); } function sendEmail($user, $name, $submittedBy) { $sth = $this->db->prepare('SELECT email FROM employee WHERE id = :assignedTo'); $sth->execute(array(':assignedTo' => $user));...
Java
UTF-8
1,027
1.78125
2
[]
no_license
final class cis extends ckn { private final cim b; cis(cim paramcim, chn paramchn) { super(chj.o(), paramchn); b = paramcim; } public final int a(long paramLong) { return b.c(paramLong); } public final int c(long paramLong) { int i = b.b(paramLong); return b.a(i); } ...
Java
UTF-8
24,671
1.6875
2
[]
no_license
package com.konka.videoplayer.engine.views; import android.annotation.SuppressLint; import android.content.Context; import android.content.pm.ActivityInfo; import android.graphics.Color; import android.media.AudioManager; import android.support.v7.app.ActionBar; import android.support.v7.app.AppCompatActivity; import ...
Markdown
UTF-8
4,971
2.859375
3
[]
no_license
Formats: [HTML](/news/2018/01/11/two-16-year-old-palestinians-are-shot-and-killed-in-separate-clashes-with-the-israeli-army.html) [JSON](/news/2018/01/11/two-16-year-old-palestinians-are-shot-and-killed-in-separate-clashes-with-the-israeli-army.json) [XML](/news/2018/01/11/two-16-year-old-palestinians-are-shot-and-k...
Java
UTF-8
1,640
3.640625
4
[]
no_license
package com.company.lesson7; import java.util.Arrays; public class DoubleArrayCalc { private int[][] array; private int row, col; public DoubleArrayCalc(int[][] array) { this.array = array; this.row = array.length; this.col = array[0].length; } public static void main(St...
Java
UTF-8
776
1.992188
2
[]
no_license
package tool.compiler.java.table; import java.util.List; import polyglot.ext.jl5.types.TypeVariable; import polyglot.types.ReferenceType; import polyglot.types.Type; public interface TypingOps { /** * get Delta * @return */ public List<TypeVariable> getBoundVariables(); public List<TypeVariabl...
Python
UTF-8
883
3.34375
3
[ "MIT" ]
permissive
""" The exceptions module. """ class ExpectationException(Exception): """ An Exception that is thrown when an expectation fails in the Expect class. """ def __init__(self, actual, expected, operator): """ Initialize this ExpectationException object. :param actual: The actual d...
C#
UTF-8
4,931
2.5625
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Collections; using System.Net; using System.IO; using System.Threading; namespace Nodes.Net { public class HttpContext { #region 变量 private const char PARAM_SIGN = '&'; private string _ho...
PHP
UTF-8
14,143
2.96875
3
[]
no_license
<?php /** * User_model class is model of User controller it performs * basic CRUD operations * Methods: insert_user * update_user * delete_user * get_user_by_id * get_attachments * record_count * fetch_users */ cla...
JavaScript
UTF-8
686
2.921875
3
[]
no_license
let frankie = { name: 'Frankie', age: 1, interests: ['cuddling','chasing strings','catnip'], }; let jumper = { name: 'Jumper', age: 2, interests: ['jumping','bounding','leaping'], }; let serena = { name: 'Serena', age: 6, interests: ['domination','holding grudges','being aloof'], }...
Java
UTF-8
881
2.25
2
[]
no_license
package com.bolivarSoftware.apolo.domain; import javax.persistence.*; import java.time.LocalDateTime; /** * Created by Fede Beron on 14/7/2017. */ @Entity @Table(name = "ETAPAS") public class Etapa { @Id @Column(name = "ETA_ID") @GeneratedValue(strategy=GenerationType.AUTO) private Integer id; ...
Java
UTF-8
2,016
2.375
2
[]
no_license
package br.com.eng.handson2.service; import static org.junit.Assert.assertEquals; import static org.mockito.BDDMockito.given; import java.util.Optional; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; import org.junit.runner.RunWith; import org.springframework.boot.test.mock.m...
PHP
UTF-8
1,521
2.59375
3
[]
no_license
<?php include("../include/connect.php"); if ($conn->connect_error) { die("Connection failed: " . $conn->connect_error); } $id1=$_REQUEST['id']; $id = 0; $id2 = 0; $query1 = "SELECT count FROM training_detail WHERE t_id=$id1 "; $msg='Already added'; function alert($msg) { echo "<script type='text/javascript'>aler...
Python
UTF-8
10,476
4
4
[]
no_license
#Escenario #Tu tarea es escribir un simple programa que simule jugar a tic-tac-toe (nombre en inglés) con el usuario. #Para hacerlo más fácil, Hemos decidido simplificar el juego. Aquí están nuestras reglas: #La maquina (por ejemplo, el programa) jugará utilizando las 'X's. #El usuario (por ejemplo, tu) jugará utiliz...
Markdown
UTF-8
2,999
2.84375
3
[ "MIT", "LicenseRef-scancode-unknown-license-reference", "CC-BY-4.0", "LicenseRef-scancode-public-domain", "LicenseRef-scancode-generic-cla" ]
permissive
--- title: Error when you use Outlook for Mac to send a large email through Exchange Server description: Describes an issue that triggers an error or an NDR when you try to send an email with a large attachment in Outlook for Mac. Provides a resolution. author: cloud-writer ms.author: meerak manager: dcscontentpm audie...
Java
UTF-8
539
1.796875
2
[]
no_license
package com.qdh.spring.control; import com.qdh.spring.bean.User; import org.springframework.stereotype.Controller; import org.springframework.test.annotation.Repeat; import org.springframework.web.bind.annotation.RequestMapping; /** * Created by lyqdhgo on 2016/4/28. * * result json data test */ @Controller publi...
C
UTF-8
2,322
2.96875
3
[]
no_license
#ifdef __ARM_NEON__ #include <arm_neon.h> #include "Allocation.h" #include "algorithm/Argb8888_To_Gray.h" #include "algorithm/Argb8888_To_Gray_Neon.h" /** * @brief Grayscale 변환 함수 - NEON 명령어 * * @param in_pixels 원본 이미지에 대한 ARGB8888 형식의 배열 * @param out_pixels 결과 이미지를 저장할 배열 * @param size 계산하고자 하는 픽셀 길이 (메모리는 4배) ...
C++
UTF-8
163
2.625
3
[]
no_license
#include<stdio.h> int f8() { printf("1+2+3+...+99+100="); int a=1, sum=0; while (a <= 100) { sum = sum + a; a = a + 1; } printf("%d\n",sum); return 0; }
Java
UTF-8
2,377
2.984375
3
[]
no_license
package com.segi.javase.locate.bundle; import java.io.BufferedInputStream; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; import java.util.Locale; import java.util.PropertyResourceBundle; import java.util.ResourceBundle; /** * @author chenzx * @date 2019-07-18 下午 3...
JavaScript
UTF-8
819
3.171875
3
[]
no_license
//we cannot use stroke, line in webgl function setup() { createCanvas(500,600, WEBGL); } function draw() { background(0); stroke(255,0,0); strokeWeight(5); // rotateY(frameCount * 0.01); // rotateZ(frameCount * 0.01); /*see the function drawBox() push(); translate(100,0,0); box(100); //cann...
JavaScript
UTF-8
489
2.8125
3
[]
no_license
var request = require('request'); var moment = require('moment'); exports.sortResults = function(arr, prop, asc, type) { if(type == 'string'){ return arr = arr.sort(function(a, b) { if (asc == 'asc') return (a[prop] > b[prop]); else return (b[prop] > a[prop]); }); } else{ return arr = arr.so...
C#
UTF-8
127,038
3.09375
3
[]
no_license
using System; using System.Collections; namespace GraphicsModule.Geometry.MatrixEvalution { /// <summary> /// Класс операций с элементами массива размерностью (N, M), где N - количество строк, M - количество столбцов /// Расширяет класс ArrayNxM_Operation для работы с массивами As Double(,) /// </su...
Swift
UTF-8
1,701
2.515625
3
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
// // ViewControllerConfigurable.swift // UIKitBase // // Created by Brian Strobach on 11/29/18. // import DarkMagic import UIKitMixinable import UIKitTheme public protocol ViewControllerConfigurable: OrientationLockable, StatusBarConfigurable, NavigationBarStyleable { var viewControllerConfiguration: ViewCont...
Java
UTF-8
1,337
1.648438
2
[]
no_license
package AltEVV_generic.restassured.sandata.Indiana.Client; import java.io.IOException; import java.sql.SQLException; import org.json.simple.JSONArray; import org.json.simple.JSONObject; import org.json.simple.parser.ParseException; import org.testng.annotations.Test; import com.globalMethods.core.Assertion_DbVerifier;...
Java
UTF-8
1,444
2.984375
3
[]
no_license
package LeetCode; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import javax.security.auth.kerberos.KerberosKey; public class Le18 { public List<List<Integer>> fourSum(int[] nums, int target) { List<List<Integer>> list = new ArrayList<>(); List<Integer> res...
C++
UTF-8
338
3.109375
3
[]
no_license
#include<iostream> using namespace std; void swap(int *a,int *b) { int t; t=*a; *a=*b; *b=t; } int main() { int i,a[5],j; for(i=0;i<5;i++) { cout<<"enter elements: "; cin>>a[i]; } for(i=0;i<5;i++) { for(j=0;j<4;j++) { if(a[j]>a[j+1]) { swap(a[j],a[j+1]); } } } for(i=0;i<5;i++) { cout<<"sequence is...
C#
UTF-8
1,432
2.796875
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Management; using System.Text; using System.Threading.Tasks; namespace WMIAppRefactoring.DLL { public class Service { public string Name { get; set; } public string Value { get; set; } /// <summary> ...
C#
UTF-8
2,612
2.640625
3
[]
no_license
using UnityEngine; using UnityEditor; /* Class Name: EditorWindowObject.cs Author: Michael Christensen-Calvin <mchristensencalvin@zynga.com> Description: Base class for EditorWindowObjects, so that an array of them can be used to draw a series of them in a custom window. */ public class EditorWindowObject { [S...
PHP
UTF-8
9,606
2.703125
3
[ "BSD-2-Clause" ]
permissive
<?php /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */ /** * Maple - PHP Web Application Framework * * PHP versions 4 and 5 * * LICENSE: This source file is subject to version 3.0 of the PHP license * that is available through the world-wide-web at the following URI: * http://www.php.net/license/3...
Python
UTF-8
270
3.640625
4
[]
no_license
import random import string def random_password(length): password = string.ascii_letters + string.digits + string.punctuation result_str = ''.join(random.choice(password) for i in range(length)) print("Random String is: ", result_str) random_password(10)
Java
UTF-8
2,093
1.789063
2
[ "Apache-2.0" ]
permissive
/* * Copyright 2019 EPAM Systems * * 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 ...
Java
UTF-8
6,437
2.875
3
[]
no_license
package model.car; import java.sql.*; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import db.ConnectionConfiguration; public class CarDaoImpl implements CarDao { @Override public boolean insertCar(Car car) { Connection connection = null; Statement statement = n...
Java
UTF-8
658
1.695313
2
[]
no_license
package telnet.service; import java.util.List; import java.util.Map; import java.util.Set; public interface TelnetService { public List<List<String>> getNewVersion(); public List<List<String>> getOldVersion(); public Map<String, String> getTargetMap(); public void setTargetMap(Map<String, String> ...
C++
UTF-8
1,901
3.59375
4
[]
no_license
/** * Definition of Interval: * classs Interval { * int start, end; * Interval(int start, int end) { * this->start = start; * this->end = end; * } */ class MinTreeNode { public: int start, end; int min; MinTreeNode *left, *right; MinTreeNode(int start, int end) { ...
Java
UTF-8
392
2.140625
2
[]
no_license
package bt.pre.algo.problems.easy; import static org.junit.jupiter.api.Assertions.assertEquals; import org.junit.jupiter.api.Test; public class MaximumSubarray53Test { MaximumSubarray53 maximumSubarray53 = new MaximumSubarray53(); @Test public void example1Test() { assertEquals(6, maximumSubarr...
C#
UTF-8
1,887
2.703125
3
[ "MIT" ]
permissive
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Units.CodeGeneration.Models; namespace System.Units.CodeGeneration.Generators { internal class UnitConverterGenerator : GeneratorBase { private readonly Quantity[] _quantiti...
Java
UTF-8
257
2.796875
3
[]
no_license
/* 5 4 3 2 1 5 4 3 2 5 4 3 5 4 5 */ class Assignment2P15 { public static void main(String args[]) { for(int i=1;i<=5;i++) { for(int k=5;k>=i;k--) { System.out.print(k+" "); } System.out.println(); } } }
Java
UTF-8
211
2.015625
2
[]
no_license
package ola.com.booking.service; import ola.com.booking.model.User; public interface UserService { public void saveUser(User user); public boolean validateUser(String username, String password); }
Java
UTF-8
292
1.773438
2
[]
no_license
package com.wnw.lovebabyadmin.view; import java.util.ArrayList; /** * Created by wnw on 2017/5/27. */ public interface IFindSumPriceView { //显示进度条 void showDialog(); //展示用户数据 void showSumPrice(ArrayList<Integer> days, ArrayList<Integer> months); }
Markdown
UTF-8
1,951
3.21875
3
[]
no_license
##Mark 以点或图片的形式添加标记。 ###Methods ####IGis.Mark.add(pointOptions,billboardOptions) 鼠标左键点击添加标记。 名称|类型|默认值|介绍 -|-|-|- <a herf="#pointOptions">pointOptions</a>| object| |点的样式属性。 <a herf="#billboardOptions">billboardOptions</a>| object ||图片的样式属性。 <a herf="#markOptions">markOptions</a>| object ||标记的属性...
Java
UTF-8
1,494
3.53125
4
[]
no_license
import java.util.Scanner; public class ex64v1 { static void Solve(int arr[], int size){ if(size<=2){ System.out.println("No Triplet exists since the array has less than 3 elements"); } int m1=0, m2=-1, m3=-1; for(int i=1; i<size; i++){ if(arr[i]>arr[...
Python
UTF-8
5,465
2.953125
3
[]
no_license
import django.dispatch from utils.operations import OperationBase from operation_parser import gobbler from moderation.models import * from django.utils.translation import ugettext_noop as _ # Regular Expressions for parsing the stock code and level STOCK_CODE = "[A-z]+" STOCK_LEVEL = "[0-9]+" NOT_ALPHA_NUM = "[^A-z0-...
C++
UTF-8
1,730
3.515625
4
[]
no_license
#include <iostream> #include <vector> using namespace std; class Solution { public: int swap(vector<int> &a, int index_a, vector<int> &b, int index_b){ if(index_a > (int)a.size() - 1 || index_b > (int)b.size() - 1){ return 0; } cout << "Going to swap " << a[index_a] << " and " <...
Markdown
UTF-8
8,326
2.5625
3
[]
no_license
--- last_modified_at: 2021-08-21 16:02 title: 《宝可梦 白金》文本 357 --- | 编号 | 中文 | 日文 | | ---- | ---- | ---- | | 0 | 确认Eーmail的地址 | eメールアドレスを かくにん | | 1 | Eーmail的地址 | eメールアドレスの せってい | | 2 | 决定接受Eーmail吗? | eメールをうけとるか きめる | | 3 | 消除Eーmail设定 | eメールせっていを けす | | 4 | 返回 | もどる | | 5 | 登录密码的输入 | とうろくコードの にゅうりょく | | 6 | 暗证号码的输入 | あんしょ...
Python
UTF-8
3,353
3.578125
4
[]
no_license
# 실습 train_test_splite 를 슬라이싱으로 바꿀것 #1. 데이터 #1부터 100 import numpy as np x = np.array([range(1, 101), range(311, 411), range(100)]) y = np.array([range(101, 201), range(711, 811), range(100)]) from sklearn.model_selection import train_test_split # print(x[1][10]) # print(x.shape) #(3, 100) # prin...
Markdown
UTF-8
1,081
2.71875
3
[]
no_license
# Rust Rcon Discord Bot Features ======= * Chat log sent to Discord. * In Game reports sent to Discord. * Ability to run Rcon commands in Discord. * Bots status lists current player count. `200/200(50 queued)` * Basic permissions system. Configuration ============= Configs are loaded from a file called ...
JavaScript
UTF-8
3,454
3.671875
4
[]
no_license
b = new Array(1,2,3,4); document.write("配列の値は、a[1]のように「配列名[数字]」で書くことで1つの値だけを出すことができる。","<br>"); document.write(b[1],"<br>","ただし、「配列名[1]」のように「1」で指定すると、上の結果のように2番目の値を出すので注意。","<br>"); document.write("そう。「配列」は「0」始まりなのだ!!"); a = new Array(); a[0] = "りんご"; a[1] = "ごまだんご"; a[2] = "ごだいご"; // a[] = "ごるご"; document.write("<br>...
Markdown
UTF-8
2,168
2.78125
3
[]
no_license
最近关于四川会理县“悬浮领导”的消息充斥着网络,最初在天涯,后来微博,甚至到了某些门户网站的头条。起初只是觉得很搞笑讽刺,但随着事情的发展,事情的本身于我已经不那么重要,对于此次事件领导的回应很机智。 事情的发展按时间顺序如下: 1. 2011年6月26日,天涯社区一则名为《太假了,我县的宣传图片》的灌水贴文被众多网友通过微博转载,图中领导被P到公路上,就像悬浮在公路上面,很短的时间这张图片在网络上疯传,并且这三位领导还被网友P到无数多其他的地方,世界各地甚至是外星,配合着三位领导严肃的表情,颇具讽刺味道,让人忍俊不禁。 2. 2011年6月27日下午,四川会理县在官方微博上道歉,承认照片是PS过,并在政府网站上贴...
Java
UTF-8
7,491
2.890625
3
[]
no_license
package main; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Program { private static boolean loggedIn = false; private static String savedLibraryNumber = ""; public static final String PASSWORD = "bhaisahab"; public static final int LIST_BOOK...
C++
UTF-8
3,452
3.453125
3
[]
no_license
#include <iostream> using namespace std; template<class T> void buble_sort(T a[], int n){ for (int i=0; i<n-1; ++i) // (n-1) times... for (int j=1; j<n; ++j) // for each neighbour... if (a[j]<a[j-1]) swap(a[j], a[j-1]); // direct } template<class T> void insert_sort(T a[], int n){ for (int i=1; ...
Java
UTF-8
2,031
2.703125
3
[]
no_license
package com.cisco.dvbu.ps.deploytool.gui.core.module.privilege; /* * (c) 2014 Cisco and/or its affiliates. All rights reserved. */ import java.util.List; /** * <p> * Bean object for privilege module records. Intended to be serialized/deserialized by Jackson into/from JSON. * </p> * * @author Calvin Goodrich ...
Python
UTF-8
768
2.515625
3
[]
no_license
import distro, math, numpy def _solver(stats): (mu,) = distro.extractStats(stats, [distro.Stat.Mu]) tau = mu / math.sqrt(math.pi/2) return (tau,) distro.register( name = 'Rayleigh', domain = distro.Domain.Continuous, params = ('tau',), paramSolver = _solver, cdf ...
PHP
UTF-8
1,549
3
3
[]
no_license
<?php //получи входные данные $userPhone=$_REQUEST["userPhone"]; $sql="SELECT `person`.*, `product-version`.version FROM `person`, `product-version` WHERE phone='".$userPhone."';"; include 'dbConnectionSettings.php';//параметры доступа к БД //коннект к БД $conn = new mysqli($host,$user,$password,$database); //код...
Java
UTF-8
2,461
2.125
2
[ "Apache-2.0" ]
permissive
package com.quinny898.library.persistentsearch; import android.content.Context; import android.content.res.TypedArray; import android.os.Build; import android.support.annotation.DrawableRes; import android.support.v7.view.ContextThemeWrapper; import android.view.View; import android.widget.ImageButton; /** * Created...
Python
UTF-8
50
2.5625
3
[]
no_license
c=int(input()) k=int(c+273.15) print(abs(int(k)))
Python
UTF-8
4,839
3.171875
3
[ "MIT" ]
permissive
import sys import getopt class Node(object): def __init__(self, parent=None, left=None, right=None, weight=0, symbol=''): # super(Node, self).__init__() self.parent = parent self.left = left self.right = right self.weight = weight self.symbol = symbol # @propert...
C++
UTF-8
447
2.84375
3
[]
no_license
#include<bits/stdc++.h> using namespace std; int min_coin(int *coin, int n, int value) { if(value==0) return 0; int res = INT_MAX; for (int i = 0; i < n; i++) { if(coin[i]<=value) { int sres = min_coin(coin,n,value-coin[i]); if(sres!=INT_MAX) res=min(res,sre...
C#
UTF-8
3,873
2.953125
3
[ "MIT" ]
permissive
using System.Collections.Generic; using System.Linq; using Newtonsoft.Json.Linq; namespace WebIOPiClient { public sealed class GPIOState { /// <summary> /// Gets a value indicating whether UART0 is enabled on the device /// </summary> public bool UART0_Enabled { get; internal s...
Python
UTF-8
7,031
3.796875
4
[]
no_license
#from ... imprort... (as ...) #datetime #random -> random.choice() which takes a list as an argument and returns a number from the list # random.randint() which takes two numbers as arguments and generates a random number between the two numbers you passed in #import module_name as name_you_pick_for_the_mod...
Java
UTF-8
1,242
2.125
2
[]
no_license
package redmine.ui.pages; import lombok.Getter; import org.openqa.selenium.WebElement; import org.openqa.selenium.support.FindBy; import redmine.model.dto.UserDto; @Getter public class NewUserPage extends AbstractPage { @FindBy(xpath = "//input[@id='user_login']") private WebElement userLogin; @FindBy(xpa...
C#
UTF-8
25,009
2.921875
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Text.RegularExpressions; namespace ZentCloud.Common { /// <summary> /// 格式验证助手 /// </summary> public class ValidatorHelper { /// <summary> /// 创建HTML标签内容正则表达式 /// </summary> ...
C++
UTF-8
447
2.53125
3
[ "MIT" ]
permissive
class ServerUnixPolledListener; class ServerUnixPolled : public IServer { public: ServerUnixPolled(const std::string &path); ServerUnixPolled(const std::string &path, mode_t perm); ~ServerUnixPolled(); void Start(ServerManager *Manager); void Stop(); void CreateNewConnection(int m_fd); private: Ser...
Java
UTF-8
1,334
2.0625
2
[]
no_license
package com.github.charleslzq.loghub.binder.config; import com.github.charleslzq.loghub.config.LogHubProjectConfig; import lombok.Data; import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.cloud.stream.binder.ExtendedBindingProperties; import org.springframework.util.A...
C
UTF-8
7,583
2.640625
3
[ "BSD-2-Clause", "BSD-3-Clause" ]
permissive
#include <stdio.h> #include <string.h> #include <stdlib.h> #include <unistd.h> #ifdef __linux__ # include <malloc.h> #endif #include <clib.h> //============================================================================== typedef struct { char *buff; u32 index; } sockData; sockData *sockDataCreat...
PHP
UTF-8
780
2.671875
3
[]
no_license
<?php $servername = "sql111.epizy.com"; $username = "epiz_26425290"; $password = "FXi7dxUYxg"; $dbname = "epiz_26425290_operatorgamedb"; // Create connection //$conn = new mysqli($servername, $username, $password); $conn = mysqli_connect($servername, $username, $password, $dbname); // Select database //m...
Markdown
UTF-8
2,215
2.640625
3
[]
no_license
# Efkt. First Google Play Store app. <a href='https://play.google.com/store/apps/details?id=io.github.omievee.dlfect_alpha&pcampaignid=MKT-Other-global-all-co-prtnr-py-PartBadge-Mar2515-1'><img alt='Get it on Google Play' src='https://play.google.com/intl/en_us/badges/images/generic/en_badge_web_generic.png'/></a> T...
TypeScript
UTF-8
4,286
2.578125
3
[]
no_license
import { IAjaxSettings } from 'jupyter-js-utils'; import { ISignal, Signal } from 'phosphor-signaling'; import { ISession } from './isession'; import { IKernel, KernelMessage } from './ikernel'; import { MockKernel } from './mockkernel'; /** * A mock session object that uses a mock kernel by default. ...