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
Java
UTF-8
2,842
3.109375
3
[]
no_license
import java.io.IOException; import java.text.ParseException; public class Parser { private Lexeme current; private Lexer lexer; Parser(Lexer lexer) throws ParseException, IOException { this.lexer = lexer; current = lexer.getLexeme(); } int calculate() throws ParseException, IOExce...
Java
UTF-8
1,109
2.578125
3
[]
no_license
package model; import javax.persistence.*; import java.io.Serializable; import java.time.LocalDate; @Entity @Table(name = "news", schema = "polyclinic") public class News implements Serializable { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Column(name = "news_id") private Integer id; ...
Python
UTF-8
1,019
3.65625
4
[]
no_license
import pytest class TestDictRestrictions: def test_dict_get_not_existing(self): dictionary = {'alice': 10} with pytest.raises(KeyError): print(dictionary['bob']) def test_dict_only_hashable_keys(self): dictionary = {} with pytest.raises(TypeError): dic...
Java
UTF-8
516
1.796875
2
[]
no_license
package com.smile.backend.service; import com.smile.backend.model.PaysEntity; import com.smile.backend.repository.PaysRepository; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.util.List; @Service public class PaysService { @Autowired ...
C++
UTF-8
713
2.9375
3
[ "MIT" ]
permissive
// Created by Eko Hardiyanto (ehardi19) #include <bits/stdc++.h> using namespace std; #define MAX 1000001 bool prime[MAX + 1]; void SieveOfEratosthenes() { memset(prime, true, sizeof(prime)); prime[1] = false; for (int p = 2; p * p <= MAX; p++) { if (prime[p] == true) { for (int i = p * 2; i <= MA...
Java
UTF-8
803
2.015625
2
[]
no_license
package com.hanyu.project.controller; import com.hanyu.project.response.ReturnResult; import com.hanyu.project.service.PromoService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org...
Python
UTF-8
1,207
3.78125
4
[ "Apache-2.0" ]
permissive
# Задача 5. Вариант 34 # Напишите программу, которая бы при запуске случайным образом отображала имя # одного из шести генеральных секретарей ЦК КПСС. # Korsakov A.A. # 13.04.2016 print ('Программа случайным образом отображает имя одного из шести генеральных секретарей ЦК КПСС') import random Perviy = 'Иосиф Сталин' ...
PHP
UTF-8
5,105
2.796875
3
[]
no_license
<?php namespace app\models; use app\core\DBModel; class TicketingModel extends DBModel { public $ticket_id; public $title; public $content; public $user_id; public $created_at; public $updated_at; public $status_id; public $priority_id; public $solution; public $category_id;...
Markdown
UTF-8
1,696
2.53125
3
[ "MIT" ]
permissive
# SelectLayersByString English / [Japanese](README_jp.md) Lightwave Modeler Python Script ## Overview ![SelectLayersByString](SelectLayersByString.png) Search the layer name as a character string and select the layer that matches the condition. The search condition you entered remains as history. You can select a ...
Java
UTF-8
2,065
1.960938
2
[]
no_license
package com.politechnika.lukasz.dagger; import com.politechnika.lukasz.services.WeatherService; import com.politechnika.lukasz.views.activities.AstroInfoActivity; import com.politechnika.lukasz.views.activities.EditFavLocationsActivity; import com.politechnika.lukasz.views.activities.MainActivity; import com.politechn...
Python
UTF-8
1,507
2.984375
3
[]
no_license
import re import json import urllib2 import simplejson class Request(object): def __init__(self, textS): self.text = textS self.create_list() self.create_request() self.get_results() def create_list(self): re.sub(' +', ' ', self.text) if self.text[0] == ' ': ...
Markdown
UTF-8
2,099
2.78125
3
[]
no_license
# GoMN Meetup - httpexpect ## Folders Description * `1_gotesting`: Golang tests (no server involved) of an Add function using table driven data and subtests * `2_go_web_servers`: Different approaches of serving HTTP requests using the Golang builtin `net/http` package * server1: Define a HTTP Handler and use Serve...
JavaScript
UTF-8
1,287
2.875
3
[ "MIT" ]
permissive
function ScheduledSession (parsedObject) { this.room = isNaN(parsedObject.room) ? "" : parseInt(parsedObject.room); this.day = parsedObject.day; this.hour = parsedObject.hour; this.minutes = parsedObject.minutes || "00"; this.roomspan = parsedObject.roomspan || 1; this.timespan = parsedObject.timespan || howManyH...
Python
UTF-8
290
3.03125
3
[]
no_license
from decoder import get_id with open("data.txt", "r") as f: codes = [code.replace('\n', '') for code in f.readlines()] seats = sorted([get_id(code) for code in codes]) my_id = [ seats[i] + 1 for i in range(len(seats) - 1) if seats[i + 1] - seats[i] == 2 ] print(my_id)
Markdown
UTF-8
2,414
3.796875
4
[]
no_license
# Writing generators The first thing the generator does should be calling `gen_init()`, storing the returned value (generator handle). Return type of the function should be declared as `gen_t *`. To actually return, do `gen_return(handle, val); return handle;`. Never exit the generator without calling `gen_return()`,...
JavaScript
UTF-8
788
2.515625
3
[ "MIT" ]
permissive
const express = require('express'); const cors = require('cors') const {fetchArticle,fetchArticleWithQuery} = require('./scrape'); const app = express(); app.use(express.static('public')); app.use(express.urlencoded({extended:true})); app.use(express.json()); app.use(cors()); app.post('/articles',(req,res)=>{ co...
JavaScript
UTF-8
1,465
3.078125
3
[]
no_license
var Space, SpaceImg, Asteroid, AsteroidImg, Spaceship, SpaceshipImg var gameState = "PLAY"; function preload(){ SpaceImg = loadImage("Space.png") AsteroidImg = loadImage("Asteroid.png") SpaceshipImg = loadImage("SpaceShip.png") } function setup(){ createCanvas(1000,650); edges = createEdgeSprites() //Back...
Markdown
UTF-8
66,830
3.171875
3
[]
no_license
# Module 6: Implementing Server-Side Operations - [Module 6: Implementing Server-Side Operations](#module-6-implementing-server-side-operations) - [Lab: Querying and analyzing big data with Cosmos DB](#lab-querying-and-analyzing-big-data-with-cosmos-db) - [Lab Scenario](#lab-scenario) - [Objec...
Java
UTF-8
298
2.015625
2
[ "Beerware" ]
permissive
package io.mateu.mdd.tester.app.simpleCase; import io.mateu.mdd.core.annotations.Action; public class SubMenu { @Action public String option1() { return "Returned from option 1"; } @Action public String option2() { return "Returned from option 2"; } }
Java
UTF-8
12,188
2.078125
2
[ "Apache-2.0" ]
permissive
package de.wackernagel.android.sidekick.annotations.processor.generators; import com.squareup.javapoet.ClassName; import com.squareup.javapoet.CodeBlock; import com.squareup.javapoet.FieldSpec; import com.squareup.javapoet.MethodSpec; import com.squareup.javapoet.TypeName; import com.squareup.javapoet.TypeSpec; impor...
PHP
UTF-8
2,866
2.84375
3
[ "MIT" ]
permissive
<?php // +---------------------------------------------------------------------- // | // +---------------------------------------------------------------------- // | Copyright (c) 2015 bookfuns.com All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www...
JavaScript
UTF-8
2,986
2.9375
3
[]
no_license
var express = require('express'); var router = express.Router(); router.get('/hello', function(req, res){ res.send('GET route on things.'); }); router.post('/', function(req, res){ res.send('POST route on things.'); }); router.all('/test', function(req, res){ res.send("HTTP method doesn't have ...
Java
UTF-8
816
1.796875
2
[]
no_license
package com.gmsj.model.bo; import lombok.Data; import java.io.Serializable; import java.util.List; /** * @author baojieren * @date 2020/4/24 14:52 */ @Data public class PolicyProfileBo implements Serializable { public Integer id; /** * 文章标题 */ public String title; /** * 文章内容 ...
Java
UTF-8
2,480
2.46875
2
[ "Apache-2.0" ]
permissive
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may...
Java
UTF-8
7,570
2.765625
3
[]
no_license
package ryanguru; import java.awt.BasicStroke; import java.awt.Color; import java.awt.Dimension; import java.awt.Font; import java.awt.FontMetrics; import java.awt.Graphics; import java.awt.Graphics2D; import javax.swing.JComponent; import javax.swing.JFrame; public class ColorDisplay { private static JFrame window...
Markdown
UTF-8
2,024
3.1875
3
[]
no_license
# Assignment 3: Adding tabs Continue building on what you have made in Assignment 2 ## Reading materials - User interface and & navigation - Layouts --> create a list with recyclerview (usage of adapters) - Look and feel - In depth: styles and themes, floating action button buttons - Quickly checkout: ch...
Java
UTF-8
2,343
2.234375
2
[]
no_license
package cl.awake.psegurito.model; import java.util.Date; 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 javax.persistence.SequenceGenerator; ...
C++
UHC
7,198
2.796875
3
[]
no_license
#include"CollisionManager.h" #include"Obj.h" #include"Input.h" DEFINITION_SINGLE(CCollisionManager) CCollisionManager::CCollisionManager() { } CCollisionManager::~CCollisionManager() { Safe_Delete_Map(m_mapGroup); } bool CCollisionManager::CreateCollisionGroup(const string& strGroup) { PCOLLISIONGROUP pGroup = Fi...
C++
UTF-8
3,289
2.71875
3
[]
no_license
#include "algorithms.h" Algorithms::Algorithms() { shortPrimes = new unsigned long[PRIMELIMITS]; Eratosthen(); } void Algorithms::Eratosthen() { unsigned long i, j, k; bool *prime = new bool[PRIMELIMITS]; for(i = 0; i < PRIMELIMITS; i++) prime[i] = true; prime[0] = prime[1] = false; ...
PHP
UTF-8
909
2.859375
3
[ "LicenseRef-scancode-unknown-license-reference", "BSD-3-Clause" ]
permissive
<?php namespace Telegram\Bot\Methods; use Telegram\Bot\Objects\ChatMember; /** * Class GetChatAdministrators * * Get a list of administrators in a chat. * * <code> * $params = [ * 'chat_id' => '', * ]; * </code> * * @link https://core.telegram.org/bots/api#getchatadministrators * * @method GetChatAdmi...
TypeScript
UTF-8
464
2.609375
3
[ "MIT", "CC-BY-3.0", "CC-BY-4.0" ]
permissive
import { vec4 } from "gl-matrix" export class Vec4 { static set(x: number, y: number, z: number, w: number, out = new Float32Array(4)) { return <Float32Array>vec4.set(out, x, y, z, w) } static transformMat4(a: Float32Array, m: Float32Array, out = new Float32Array(4)) { return <Float32Array>vec4.transform...
TypeScript
UTF-8
2,396
2.578125
3
[]
no_license
import { Injectable } from '@angular/core'; import { HttpRequest, HttpEventType ,HttpEvent,HttpHandler,HttpInterceptor,HttpErrorResponse } from '@angular/common/http'; import { Observable,ReplaySubject } from 'rxjs'; import 'rxjs/add/operator/do'; import { Subject } from 'rxjs/Subject'; import {} from 'rxjs/add/opera...
C#
UTF-8
1,216
2.8125
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Runtime.Serialization; namespace zVirtualClient { public class Credential { public bool Default { get; set; } public string Name { get; set; } public string Host { get; set; } pu...
Java
UTF-8
358
3.328125
3
[]
no_license
class Layout { static int s = 343; int x; { x = 7; int x2 = 5; } Layout() { x += 8; int x3 = 6; } void doStuff() { int y = 0; for (int z = 0; z < 4; z++) { y += z + x; System.out.println(y); } } public static void main(String[] args) { Layout l = new Layout(); System.out.println(...
Markdown
UTF-8
2,485
2.953125
3
[ "MIT" ]
permissive
# ![logo](https://raw.githubusercontent.com/Lughus/e-pigeon/master/ressources/logo.png) e-pigeon Implementation of an handmade application protocol for messaging Be careful this is an alpha version of the software and many bugs can be found in it. If you use it and found some, please create an issue, it can be helpfu...
C++
UTF-8
237
2.890625
3
[ "MIT" ]
permissive
#include<iostream> using namespace std; int main() { int n, s=0, sum=0; cin>>n; for(int i=1; i<=n; i++){ s = s*10 + i; sum += s; cout<<s<<" "; } cout<<endl<<"Sum is => "<<sum; return 0; }
Java
UTF-8
528
3.453125
3
[]
no_license
package recursion; public class RodCuttingRecursion { static int max = Integer.MIN_VALUE; public static void main(String[] args) { int a[] = new int[] {1, 5, 8, 9, 10, 17, 17, 20}; System.out.println(rodCutting(a, a.length)); } private static int rodCutting(int[] a, int n) { i...
Java
UTF-8
917
2.5625
3
[]
no_license
/** * */ package org.finki.auction.common.datastructures; import java.util.HashMap; import java.util.Map; import java.util.Objects; /** * @author chemicalangel * */ public class ServiceRegistery { private Map<String, String> services = new HashMap<>(); public static class ServiceEntry { private String se...
Markdown
UTF-8
2,122
2.859375
3
[]
no_license
--- title: "How to Setup a Cronjob for a Tool Installed via pipx" date: 2021-08-02T10:54:16+02:00 tags: - pipx - cronjob --- The company I work for finally says good-bye to [Subversion](https://subversion.apache.org/), and while migrating to git, we also decided to move to GitHub and no longer host the repositories in...
Markdown
UTF-8
2,936
3.53125
4
[]
no_license
# Object Oriented Programming in JavaScript This is a discussion on: - object oriented programming - reasons to use it - applications that would benefit from OOP ## Table of contents - [Overview](#overview) - [What is OOP?](#what-is-oop) - [Why would you use it?](#why-would-you-use-it) - [When would...
Java
UTF-8
1,442
3.390625
3
[]
no_license
package com.xue.oj; public class Atoi { public static void main(String[] args) { Atoi main = new Atoi(); /* System.out.println(main.myAtoi("1")); System.out.println(main.myAtoi("2147483648")); System.out.println(main.myAtoi("-")); System.out.println(main.myAtoi("+-2")); ...
Java
UTF-8
3,646
2.84375
3
[]
no_license
/** * */ package org.yelong.core.cache; import java.util.Map; import java.util.Set; import java.util.function.Function; import org.yelong.core.annotation.Nullable; /** * 缓存管理器 * * @since 1.3 */ public interface CacheManager { /** * 添加一个缓存,如果缓存管理器中已经存在该缓存的键值,将替换原来的值 * * @param <T...
Java
UTF-8
3,317
2.046875
2
[ "Apache-2.0", "GPL-1.0-or-later", "MIT", "GPL-2.0-only", "BSD-3-Clause" ]
permissive
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you ...
SQL
UTF-8
2,111
2.578125
3
[]
no_license
INSERT INTO `Bonuses` (`CreateDate`, `ExpirationDate`, `UserID`, `ServiceID`, `SchemeID`, `DaysReserved`, `DaysRemainded`, `Discont`, `Comment`) SELECT `CreateDate`, (UNIX_TIMESTAMP() + 365*24*3600), `UserID`,'10000',`SchemeID`,`DaysReserved`,`DaysRemainded`,`Discont`,`Comment` FROM `HostingBonuses`; -- SEPARATOR ...
Python
UTF-8
1,700
2.96875
3
[]
no_license
# #listdir stat # import os # print(os.listdir('d:')) # files = os.listdir('d:') # for file in files: # print(file) # print(os.stat("D:/345.jpg")) #返回文件的相关系统信息 # print(os.stat('d:/345.jpg').st_atime) #查看最后访问文件的时间 # print(os.stat('d:/345.jpg').st_mtime) #查看文件的最后修改时间 # print(os.stat('d:/345.jpg').st_ctime) #文...
PHP
UTF-8
2,059
2.53125
3
[ "BSD-3-Clause" ]
permissive
<?php namespace app\models; use Yii; /** * This is the model class for table "intclient". * * @property integer $id * @property string $intclient_desc * @property string $intclient_remarks * @property integer $dep_id * @property integer $intclient_xinterger1 * @property boolean $intclient_xboolean1 * @prope...
Java
UTF-8
350
2
2
[]
no_license
package com.dto; import javax.validation.constraints.Min; import org.springframework.stereotype.Component; import lombok.Data; @Component @Data public class SongSystemDTO { @Min(value = 0, message = "{songsystem.positive}") private int positionInPlaylist; @Min(value = 0, message = "{songsystem.positive}") priv...
Java
UTF-8
892
2.09375
2
[]
no_license
package com.example.bazadedateexplo; public class ParinteClass { int idParinte; String nume; String prenume; String gen; String nrDeTelefon; public int getIdParinte() { return idParinte; } public void setIdParinte(int idParinte) { this.idParinte = idParinte; } ...
Python
UTF-8
8,162
3.921875
4
[]
no_license
# # MNIST via Multilayer Convolution Network # This script is baed on the [MNIST for Deep Learning Experts using TensorFlow](https://github.com/tensorflow/tensorflow/blob/r1.2/tensorflow/examples/tutorials/mnist/mnist_deep.py) # # Setup # - Ensure TensorFlow is installed via PyPi # - Note this is a demo script a...
Java
UTF-8
701
2.671875
3
[]
no_license
package validator; import entity.Choices; import exceptions.ChoicesException; public class ChoicesValidator { public boolean validChoices(Choices choices) throws ChoicesException { boolean res = validAnswer(choices.getAnswers()); res &= validA(choices.getOptionA()); res &= validB(choices.g...
Python
UTF-8
3,004
2.875
3
[]
no_license
import sqlite3 import os FILE = input("Enter File Name") File_Loc = os.path.join(os.path.dirname(__file__), (FILE + ".db")) def table_print(): con = sqlite3.connect(File_Loc) cur = con.cursor() cur.execute( f"Select name from sqlite_master where type='table'") table_name = [i[0] for i in cur....
PHP
UTF-8
647
2.59375
3
[]
no_license
<?php namespace Database\Seeders; use Illuminate\Database\Seeder; use App\Models\User; class DatabaseSeeder extends Seeder { /** * Seed the application's database. * * @return void */ public function run() { // \App\Models\User::factory(10)->create(); $faker = Faker\Fa...
JavaScript
UTF-8
276
3.171875
3
[]
no_license
function getMin() { if (arguments.length === 0) { console.log("empty arguments"); return; } var min = arguments[0]; for (let i = 1; i < arguments.length; i++) { if (arguments[i] < min) { min = arguments[i]; } } return console.log(min); } getMin(1, 5,4,-1,-5);
C#
UTF-8
837
2.6875
3
[]
no_license
using System; namespace Ivony.Http.Pipeline { /// <summary> /// a jointer to join two pipeline /// </summary> internal sealed class HttpPipelineJointer : IHttpPipeline { private readonly IHttpPipeline _upstream; private readonly IHttpPipeline _downstream; public HttpPipelineJointer( IHttpPipel...
PHP
UTF-8
1,837
2.53125
3
[ "MIT" ]
permissive
<?php /* * This file is part of the API Platform project. * * (c) Kévin Dunglas <dunglas@gmail.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ declare(strict_types=1); namespace ApiPlatform\JsonLd\Serializer; use ApiPlatfo...
Python
UTF-8
2,436
4.4375
4
[]
no_license
# 写法一: class Rectangle: "正方形" def __init__(self, width, height): # ① self.width = width self.height = height def __setattr__(self, key, value): if key == "square": self.width = value self.height = value else: # ② print...
C#
UTF-8
1,450
3.15625
3
[ "MIT" ]
permissive
using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Threading.Tasks; using XmlValidation.FileTypes; namespace XmlValidation { public class XsdCache { /// <summary> /// Cache that Holds all the loaded XSDs /// </summary> private Dicti...
TypeScript
UTF-8
3,297
2.875
3
[]
no_license
import axios from 'axios'; import { injectable } from 'tsyringe'; import { HttpInterceptor, HttpRequestInterceptor } from '../../../models/httpClient'; @injectable() export class ArianeeHttpClient { private httpRequestInterceptor:HttpRequestInterceptor; private httpFetch=(url, config) => axios(url, config).the...
Swift
UTF-8
1,628
2.765625
3
[ "MIT" ]
permissive
// // ViewController.swift // 191203_Segue // // Created by Demian on 2019/12/03. // Copyright © 2019 Demian. All rights reserved. // import UIKit class FirstViewController: UIViewController { var count = 0 override func viewDidLoad() { super.viewDidLoad() } override fu...
Python
UTF-8
4,178
3.21875
3
[ "MIT" ]
permissive
##I'm still working on a new tests import spaghetti_sort import unittest class O: def __init__(self, x): self.x = x def __repr__(self): return str(self.x) class Autotests(unittest.TestCase): def test_simple_list(self): self.assertEqual(spaghetti_sort.spaghetti([-3, 3, 1...
C++
UTF-8
457
2.671875
3
[ "BSD-3-Clause", "Apache-2.0" ]
permissive
#ifndef NUMPY_H #define NUMPY_H namespace TSnap { /// Converts TIntV to Numpy array. void TIntVToNumpy(TIntV& IntV, int* IntNumpyVecOut, int n); /// Converts TFltV to Numpy array. void TFltVToNumpy(TFltV& FltV, float* FltNumpyVecOut, int n); /// Converts NumpyArray to TIntV void NumpyToTIntV(TIntV& IntV, int* In...
Markdown
UTF-8
8,529
2.515625
3
[ "LicenseRef-scancode-unknown-license-reference", "Apache-2.0" ]
permissive
## Hotspot A human-friendly HTML landing page for users resolving URLs within their browser that point to resources on a FHIR server. This is a pure client-side app that is configured to point to a FHIR endpoint. #### Configuration The Docker image can be configured using the following environment variables: * `HO...
Python
UTF-8
3,224
2.953125
3
[]
no_license
from board import main def test_pawn_takes_pawn(): b = main.Board() b.add_piece('p', 'd4', is_white=True) b.add_piece('p', 'e5', is_white=False) moves = b.get_naive_moves(from_white=True) takes = [m for m in moves if m.is_take] assert len(moves) == 2 assert len(takes) == 1 moves_san = [...
Java
UTF-8
6,565
1.515625
2
[]
no_license
package com.example.smlightwai; import java.net.MalformedURLException; import java.net.URL; import java.util.LinkedHashMap; import java.util.Map; import org.json.JSONException; import org.json.JSONObject; import com.example.smlightwai.R; import com.example.smlightwai.shebei_page1.sblxThread; import and...
Java
UTF-8
379
2.140625
2
[]
no_license
package Ticket; import ticketingsystem.Date; public class SolvedTicket { protected Date TimeTakenToBeSolved; public Date getTimeTakenToBeSolved() { return TimeTakenToBeSolved; } public void setTimeTakenToBeSolved(Date TimeTakenToBeSolved) { this.TimeTakenToBeSolved = TimeTake...
Markdown
UTF-8
1,188
2.734375
3
[]
no_license
## Table of content * [General info](#general-info) * [Technologies](#technologies) * [Setup](#setup) * [To-Do](#to-do) * [Images](#images) ## General info Simple script which gathers a few informations (Windows version, host name, IP and MAC adress) and saves into the .xlsx file (Excel format). ## Technologies ``` E...
C++
GB18030
14,294
2.828125
3
[]
no_license
#ifndef __LIDARBASETOOLS__ #define __LIDARBASETOOLS__ #include <iostream> #include <deque> #include <vector> #include <string> #include <fstream> #include <iomanip> namespace LiDARBaseTools{ const float NODATA = -999.99; const float eps = 0.001; struct LasPoint{ float x; float y; float z; short classi...
Java
WINDOWS-1252
1,145
2.71875
3
[]
no_license
package org.crazyit.app.oneNentityId; import java.util.Date; import org.crazyit.app.util.HibernateUtil; import org.hibernate.Session; import org.hibernate.Transaction; /** * Description: * <br/>վ: <a href="http://www.crazyit.org">Java</a> * <br/>Copyright (C), 2001-2016, Yeeku.H.Lee * <br/>This program is protect...
PHP
UTF-8
682
2.765625
3
[ "MIT" ]
permissive
<?php //--> namespace Journal\Repositories\Tag; /** * Interface TagRepositoryInterface * @package Journal\Repositories\Tag */ interface TagRepositoryInterface { /** * @param $tag * @return \Journal\Tag */ public function create($tag); /** * @return \Journal\Tag */ public fu...
Java
UTF-8
9,775
2.109375
2
[]
no_license
package im.goody.android.screens.main; import android.databinding.DataBindingUtil; import android.databinding.ViewDataBinding; import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.ViewGroup; import java.util.List; import im.goody.android.BR; import im.goody.android.R...
Python
UTF-8
873
2.90625
3
[]
no_license
# pip install openpyxl import openpyxl from openpyxl.styles import Font print(openpyxl.__version__) # wb = openpyxl.load_workbook("wb.xlsx") wb = openpyxl.Workbook() print(type(wb)) # sheet = wb.create_sheet("Sheet1") sheet = wb.active sheet.cell(row=1, column=1).value = 22 sheet.cell(row=1, colum...
JavaScript
UTF-8
439
3.9375
4
[]
no_license
function countStringOccurences(text, word) { let count = 0; let matcher = ` ${word} `; let index = text.indexOf(matcher); while (index !== -1) { index = text.indexOf(matcher, index + 1); count++; } if (text.startsWith(word)) { count++ } if(text.endsWith(word)) { ...
Java
UTF-8
4,163
2.359375
2
[]
no_license
package com.example.bookapp.domain; import com.fasterxml.jackson.annotation.JsonIgnore; import org.hibernate.annotations.CacheConcurrencyStrategy; import org.hibernate.annotations.Cache; import javax.persistence.CascadeType; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.Ge...
JavaScript
UTF-8
1,588
2.765625
3
[]
no_license
const mongoose = require('mongoose'); mongoose.connect( 'mongodb://54.219.128.69/SDC', { useNewUrlParser: true, useUnifiedTopology: true } ); const listingSchema = mongoose.Schema({ listingId: Number, price: Number, address: { street: String, city: String, state: String, zip: Number }, t...
Java
UTF-8
318
2.921875
3
[]
no_license
package java8.functionalinterface; interface sayable1{ void say(String msg); // abstract method } @FunctionalInterface interface Doable extends sayable1{ // Invalid '@FunctionalInterface' annotation; Doable is not a functional interface // void doIt(); //remove this comment. it shows error }
C#
UTF-8
1,358
3.6875
4
[]
no_license
using System; namespace Lesson_01_3EmployeeTest { class Employee { public string name; public Employee(string name) { this.name = name; } public virtual void Mark() { Console.WriteLine("9点打卡,{0}",name); } } class H...
C++
UTF-8
2,511
2.828125
3
[ "BSL-1.0", "Zlib", "MIT" ]
permissive
#include <algorithm> #include <iostream> #include "Pathfinding.h" #include "RoadNode.h" #include "MstNode.h" #include "V2.h" namespace Pathfinding { std::vector<RoadNode*> PathFind(std::vector<std::vector<RoadNode*>> grid, int startX, int startY, int endX, int endY, int offsetPerRoadNode) { // Start, End RoadNo...
PHP
UTF-8
4,710
3.125
3
[]
no_license
<?php namespace lib; /** * Configuration representation * * @throws \DomainException|\LengthException * @package Moss Core * @author Michal Wachowski <wachowski.michal@gmail.com> */ class Config { protected $cache; protected $debug; protected $namespaces = array(); protected $components = arr...
Java
UTF-8
1,659
1.890625
2
[ "MIT" ]
permissive
/* * Copyright (c) Microsoft. All rights reserved. * Licensed under the MIT license. See LICENSE file in the project root for full license information. */ package com.microsoft.azure.sdk.iot.android.helper; import com.microsoft.appcenter.espresso.Factory; import com.microsoft.appcenter.espresso.ReportHelper; imp...
Java
UTF-8
6,740
3.765625
4
[ "MIT" ]
permissive
package datastructures; /** * This class implements bilinear interpolation methods for 3d points and scalars. * * f(x,y) = f(0,0)(1-x)*(1-y) + f(1,0)*(1-x)*y + f(0,1)*x*(1-y) + f(1,1)*x*y * f(x,y) = [1-x, x] * [f(0,0) f(0,1); f(1,0) f(1,1)] * [1-y, y]' * * Reason of why do we multiply f0 by 1-x (instead of x): G...
PHP
UTF-8
10,488
2.8125
3
[]
no_license
<?php /** * Class for handling Do Not Loan actions * * @author Matthew Jump <matthew.jump@sellingsource.com> */ class Do_Not_Loan { /** * Database connection * * @var DB_Database_1 */ protected $db; /** * Holds information retrieved by Get_DNL_Info * * @var array */ protected $dnl_info; /...
Python
UTF-8
788
2.75
3
[]
no_license
import numpy as np import pandas as pd l= np.random.randint(low=0,high=10,size=(5,5)) df1=pd.DataFrame(data=l) df2=pd.DataFrame(data=l,columns=['punt1','punt2','punt3','punt4','punt5']) df3=pd.DataFrame(data=l,columns=['punt1','punt2','punt3','punt4','punt5'],index=['est1','est2','est3','est4','est5']) df1.rename(index...
Java
UTF-8
8,126
1.570313
2
[ "Apache-2.0" ]
permissive
/* * Copyright (c) 2015, Nordic Semiconductor * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, this list of conditi...
C++
UTF-8
948
3.390625
3
[]
no_license
#include <ctime> #include <iostream> using namespace std; int p[] = {1, 2, 3, 5, 7, 11, 13, 17}; bool ispand(long long n) { int b, d, m = 0; while (n > 0) { d = n % 10; // Get last digit of n b = 1 << d; if ((m & b) == b) // if d has been encountered before return false; m |= b; n...
Python
UTF-8
1,497
3.953125
4
[]
no_license
a = [1, 5, 6, 3, 6, 9, 11, 20, 12, 4] b = [7, 4, 5, 6, 7, 1, 12, 5, 9, 8] print('a = ', a) print('b = ', b) # Menyisipkan nilai ke dalam indeks print('\nMeyisipkan nilai 10 ke dalam indeks ke 3 dari a, dan 15 ke dalam indeks 2 dari b') a.insert(3, 10) b.insert(2, 15) print('a = ', a) print('b = ', b) # Menyisipkan ni...
Java
UTF-8
562
2.9375
3
[]
no_license
package com.war.game.entities; import com.war.util.BattleGameUtil; class Location { private int row; private int column; private String location; public Location(String location) { this.location=location; String[] locationArr = location.split(""); row = BattleGameUtil.getNumericValueString(locationArr[0]);...
Shell
UTF-8
900
3.375
3
[ "MIT" ]
permissive
#!/bin/bash set -e USER_ID=${LOCAL_USER_ID:-9001} if [[ -z $(grep -E "pyfunceble:x:${USER_ID}" /etc/passwd) ]] then if [[ ! -d /home/pyfunceble ]] then useradd --shell /bin/bash -u $USER_ID -o -c "PyFunceble user" -m pyfunceble else useradd --shell /bin/bash -u $USER_ID -o -c "PyFunceble ...
Ruby
UTF-8
934
3.21875
3
[]
no_license
require 'csv' class Cookbook attr_accessor :recipes, :csv_file_path def initialize(csv_file_path) @recipes = [] @csv_file_path = csv_file_path @csv_options = { col_sep: ',', force_quotes: true, quote_char: '"' } CSV.foreach(@csv_file_path) do |row| @recipes << Recipe.new(name: row[0], descrip...
PHP
UTF-8
1,960
2.53125
3
[ "MIT" ]
permissive
<?php use Illuminate\Database\Seeder; class AnswerTableSeeder extends Seeder { /** * Run the database seeds. * * @return void */ public function run() { App\Models\Answer::create( ['text' => 'Николай', 'question_id' => 1] ); App\Model...
JavaScript
UTF-8
661
2.59375
3
[ "MIT" ]
permissive
/*jshint unused:false */ /** * Dynamic grid with Masonry */ var Masonry = function() {}; Masonry.prototype = { $container: $('#Masonry'), init: function() { // add els needed by masonry for better fluid calculations this.$container.prepend('<div class="Masonry-gridSizer"></div><div class="Masonry-gutterSiz...
Markdown
UTF-8
9,101
2.875
3
[]
no_license
--- layout: post title: 第二百五十五节 秋赋(二十) category: 3 path: 2011-1-4-3-25500.md tag: [normal] --- 二用晋和王兆敏面面相觑,纹事情汛真没法“就众么公当下王兆敏道:“这个”办案侦辑拿人都要出签子火牌,诸位不是大明人士,又无功名、差遣在身” “此事当然还是以县里为主了”熊卜佑道,“我等不过从旁协助。” 王兆敏想所谓“从旁协助”其实竟贼还是想要掌握此事的处理权一这倒也好。这个烫手的山芋干脆就丢给原主去处理好了。他也想看看。澳洲人的葫芦里到底卖得是什么药。 吴明晋咳嗽了一声,推辞自己身体不适要先回去休憩片刻。熊卜估知道这是当官的表示“此事你们只...
C++
UTF-8
1,396
2.6875
3
[]
no_license
#pragma once #include "Game/Entity.hpp" #include "Game/ActorDefinition.hpp" #include "Game/RaycastResult.hpp" #include "Game/Item.hpp" class Actor : public Entity { public: Actor(ActorDefinition* actorDef); ~Actor(){}; void Update(float timeDelta); void Render(); void UpdatePlayerInput(float timeDelta); void Upd...
Markdown
UTF-8
729
2.71875
3
[]
no_license
<div dir = "rtl"> # تمرين مسار الأندرويد الأول 💚 ## التمرين سهل و بسيط نشوف فيه قوة تركيز طلبة الأندرويد في الشرح اليوم 💪🏻 ### الخطوات <br> &#x202b; 1. ➕ أجمع رقمين و أظهر الناتج <br> &#x202b; 2. ✖ أضرب رقمين وأظهر الناتج <br> &#x202b; 3. 🤔 قارن رقمين وأظهر النتيجة ## بونص! عرف إسمك الأول في متغير و أسم...
Java
UTF-8
2,783
1.820313
2
[]
no_license
package org.zdesk.config; import javax.servlet.Filter; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.autoconfigure.security.oauth2.resource.ResourceServerProperties; import org.springframework.boot.autoconfigure.security.oauth2.resource.UserInfoTokenServices; im...
Markdown
UTF-8
4,272
2.953125
3
[ "MIT" ]
permissive
## [自定义View 一: attr 详解](https://blog.csdn.net/qq_30552993/article/details/55258076) ### 1 res/values/attrs.xml ```xml <?xml version="1.0" encoding="utf-8"?> <resources> <declare-styleable name="View名称"> <attr name="textColor" format="color"/> <attr name="textSize" format="dimension"/> ...
Markdown
UTF-8
640
2.65625
3
[]
no_license
# Algoritmos de entrevistas Hola amigo desarrollador web, estos son algunos ejercicios que a lo largo de mi carrera me han pedido resolver, no estoy en contra de las pruebas, pero si estoy en contra de las pruebas que no se apegan a la realidad ¿cuando en tu vida has necesitado el código para obtener números primos? e...
Java
UTF-8
15,338
1.90625
2
[]
no_license
package com.example.mohan.bbms; import android.app.ProgressDialog; import android.content.Context; import android.content.Intent; import android.content.SharedPreferences; import android.graphics.Color; import android.graphics.Typeface; import android.graphics.drawable.ColorDrawable; import android.os.Bundle; import a...
C++
UTF-8
543
2.953125
3
[]
no_license
// Lab 0b, The "Hello, World" Program, part b // Programmer: Kevin Wong // Editor(s) used: Codeblocks // Compiler(s) used: GNU GCC Compiler #include <iostream> using namespace std; int main() { // print student and program information cout << "Lab 0b, The Hello, World Program, part b\n"; cout << "Programmer...
Python
UTF-8
1,650
3.234375
3
[]
no_license
import sys from collections import deque '''CONSTANTS''' '''VARIABLES''' N, M = 0, 0 numbers = [] left, right = 0, 0 count = 0 '''UTILS''' class SegmentTree: def __init__(self, arr) -> None: self.n = len(arr) self.tree = [0] * self.n * 2 self.build(arr) def build(self, arr...
Java
UTF-8
1,970
2.875
3
[]
no_license
package org.petehering.txtadv.core; import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.Set; import java.util.TreeMap; import org.petehering.txtadv.Command; import org.petehering.txtadv.Door; import org.petehering.txtadv.Item; import org.petehering.txtadv.Model; import org.peteher...