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
Python
UTF-8
992
3.5
4
[ "MIT" ]
permissive
import math from decimal import Decimal class Cargo(object): def __init__(self, row): self.product = row[0] self.origin_city = row[1] self.origin_state = row[2] self.origin_lat = Decimal(row[3]) self.origin_lng = Decimal(row[4]) self.destination_city = row[5] ...
Java
UTF-8
4,657
1.742188
2
[ "Apache-2.0" ]
permissive
package com.angkorteam.ecommerce.page.discount; import com.angkorteam.framework.wicket.extensions.markup.html.repeater.data.table.DataTable; import com.angkorteam.framework.wicket.extensions.markup.html.repeater.data.table.DefaultDataTable; import com.angkorteam.framework.wicket.extensions.markup.html.repeater.data.ta...
C++
UTF-8
6,450
2.5625
3
[]
no_license
// TMsgDirGetNumDirEntries.cpp // Directory Get Number of Directory Entries message class. Sends a list of // directory paths to the Directory Server. // Directory Get Number of Directory Entries Reply Message class. Contains data // from the Directory Server as a response to a GetNumDirEntries request. ...
C
UTF-8
981
3.78125
4
[]
no_license
#include <stdio.h> #include <string.h> int get_line(char *msg, char *buf, int cap) { fprintf(stdout, "%s", msg); if (!fgets(buf, cap, stdin)) { return -1; } buf[strlen(buf) - 1] = '\0'; return 0; } // Pseudo-terminals are a solution to the problems outlined in the code below // See also https://unix.st...
Markdown
UTF-8
458
2.703125
3
[]
no_license
# getDocCount Display the number of documents in a folder for EvolutionCMS. --------- Sampling by DocLister parameters. ### SNIPPET PARAMETERS * **&parents** - The ID of the folder you wish to count the containts of. * **&round** - Number of decimals to round up to (ex.: your count is 4 and round is set to 1, your r...
SQL
UTF-8
1,640
4.0625
4
[ "Apache-2.0" ]
permissive
/* * Copyright (c) 2010-2012 LabKey Corporation * * Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0 */ SELECT d.species, d.viralstatus, d.assignmentstatus, count(*) as total FROM ( SELECT a.Id, coalesce(a.id.viralstatus.viralstatus, 'Unknown') as viralstatus,...
Markdown
UTF-8
1,249
2.90625
3
[ "MIT" ]
permissive
## locked-atomic-ws A combination of [fs-write-stream-atomic](https://github.com/npm/fs-write-stream-atomic) and [node-proper-lockfile](https://github.com/IndigoUnited/node-proper-lockfile) to ensure that no more than one (atomic) write stream can be used at a time for a certain file. Since atomically streaming to a f...
C
UTF-8
1,128
4.65625
5
[]
no_license
/* * Task #2: * WAP in C to input the name, roll, marks and address of n students entered by the user and display the * entered details using the concept of structure. */ #include <stdio.h> struct Student { char name[20]; char address[20]; int roll; float marks; }; int main() { struct Student...
PHP
UTF-8
3,048
2.65625
3
[]
no_license
<?php function exportcsv($table, $statusCode = "", $selected = "", $connection = "", $research = ""){ require_once('../../db/adminConnection.php'); require_once('../../db/memberConnection.php'); require_once('../../db/storeConnection.php'); $filename = $table .'-Export.csv'; header('Content-Type: text/csv; ...
Go
UTF-8
1,047
2.671875
3
[]
no_license
package main import ( "fmt" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/endpoints" "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-go/service/dynamodb" "github.com/aws/aws-sdk-go/service/dynamodb/dynamodbattribute" ) type Record struct { Artist string `dynamodbav:"artist"...
C#
UTF-8
6,733
3.140625
3
[]
no_license
using System.Collections; using System.Collections.Generic; using UnityEngine; public class Lesson4_Naomi : MonoBehaviour { //1.定义一个学校结构体,包含上述所有数据 struct SchoolInfo { public string name; public int boy; public int girl; public int total; } //2.输入参数为学校结构体,...
Python
UTF-8
589
3
3
[]
no_license
import sys input = sys.stdin.readline HP = 0 MP = 1 ATTACK = 2 SHILED = 3 for _ in range(int(input())): nums = list(map(int, input().split())) power_sum = 0 if nums[HP] + nums[HP + 4] < 1: power_sum += 1 else: power_sum += nums[HP] + nums[HP + 4] if nums[MP] + nums[MP + 4] < 1: ...
Java
UTF-8
1,933
3.796875
4
[]
no_license
package com.aneonoir.dsalgo.practise.linkedlist; /** * link: https://practice.geeksforgeeks.org/problems/pairwise-swap-elements-of-a-linked-list-by-swapping-data/1 * <p> * approach: messed up , took a lot of time and still could not solve it. iterative is solved. * <p> * TODO: * tags: list, linkedlist, pairwise ...
Swift
UTF-8
1,141
2.875
3
[]
no_license
// // TvShowSearchAPI.swift // Pursuit-Core-iOS-Episodes-from-Online // // Created by Jaheed Haynes on 12/12/19. // Copyright © 2019 Benjamin Stone. All rights reserved. // import Foundation struct TVShowSearchAPI { static func fetchShows(for searchQuery: String, completion: @escaping (Result<[Show], AppError...
C++
GB18030
2,112
2.546875
3
[]
no_license
#include<windows.h> #include<stdio.h> #include<string.h> #include<time.h> #include<iostream> using namespace std; #pragma comment(lib, "winmm.lib") //ر׼ľ HANDLE hConsoleOutput = GetStdHandle(STD_OUTPUT_HANDLE); typedef int (WINAPI* SETCONSOLEFONT)(HANDLE, DWORD); SETCONSOLEFONT SetConsoleFont; void goto_xy(int x, ...
Python
UTF-8
167
3.375
3
[]
no_license
print("안녕하세요? 여러분") print("저는","파이썬을","무척","좋아합니다.",sep="*") print("9*8은",9*8,"입니다") print("안녕히","계세요.")
PHP
UTF-8
6,729
2.546875
3
[]
no_license
<?php // to run, use devel/php to call this : // include_once('/usr/local/src/islandora_tools/process_bags/process.php'); define('HOPKINS_COLLECTION', 'pitt:hopkins'); /* * This script will ingest the files related to bagIt objects that were exported from Gamera. * The tgz files have already been expanded manua...
PHP
UTF-8
848
2.59375
3
[]
no_license
<?php if(isset($_POST['email'])) { $name =$_POST["name"]; $companyName =$_POST["companyName"]; $phone =$_POST["phoneNumber"]; $from =$_POST["email"]; $date=$_POST["date"]; $hour=$_POST["hour"]; // Email Receiver Address $receiver="lisbona107@gmail.com"; $receiver2="clash.israel9@gmail.com"; $subject...
Swift
UTF-8
1,739
2.578125
3
[]
no_license
// // SummonerViewController.swift // MyLeague // // Created by bechir kaddech on 10/1/17. // Copyright © 2017 bechir kaddech. All rights reserved. // import UIKit class SummonerViewController: UIViewController { @IBOutlet weak var summoneriINPUT: UITextField! override func viewDidLoad() { super....
Java
UTF-8
521
2.3125
2
[]
no_license
package test; import vm.VMTest; public class TestAload { private static class A { } /** * @param args */ public static void main(String[] args) { VMTest.markResult(test()); } @SuppressWarnings("unused") public static boolean test() { int...
Java
UTF-8
445
2.859375
3
[]
no_license
package com.kodilla.stream.array; import org.junit.Assert; import org.junit.Test; public class ArrayOperationsTestSuite { @Test public void testGetAverage(){ //Given int numbers [] = {2,2,2,2,2,5,5,5,5,5,1,1,1,1,1,10,10,10,10,10}; //When double result = 4.5; double ex...
Python
UTF-8
581
3.6875
4
[]
no_license
#!/usr/bin/python --- where python is installed #Creating variables in python FIRSTNAME = 'GUIDO' middlename = "van" LastName = '''Rossum''' _lang = """python""" #Accessing or calling variables in python print (FIRSTNAME) #calling variable print("calling variable using prefix as string",FIRSTNAME) print(FIRSTNAM...
Python
UTF-8
2,212
2.5625
3
[]
no_license
import requests import requests.exceptions import json class NoFlightDataException(Exception): pass class InvalidFormattingException(NoFlightDataException): REASON = 'invalid_formatting' class ConnectionException(NoFlightDataException): REASON = 'could_not_connect' class FlightInfo(object): # go...
C++
UTF-8
633
2.640625
3
[]
no_license
#include<iostream> #pragma warning (disable:4996) using namespace std; // 2661 좋은수열 int answer[80]; int n; bool solve(int m) { if (m == n) { for (int i = 0; i < n;i++){ cout << answer[i]; } return 1; } for (int k = 1; k <= 3;k++) { bool tf = true; answer[m] = k; for (int i = 1; i <= (m + 1)/2; i++) { ...
Ruby
UTF-8
620
3
3
[]
no_license
require_relative "journey.rb" class JourneyLog attr_accessor :journey attr_reader :journeys def initialize @journey @journeys = [] end def start(station, journey_klass = Journey) self.journey = journey_klass.new journey.save_entry(station) end def finish(exit_station) current_journey(e...
Java
UTF-8
309
1.765625
2
[]
no_license
package ar.com.softtek.action; import ar.com.softtek.dto.PacienteDto; public class BajaPacienteAction extends PacienteAction { private static final long serialVersionUID = 1L; @Override public void action(PacienteDto pacienteDto) { this.pacienteBo.deletePaciente(pacienteDto); } }
Markdown
UTF-8
579
2.875
3
[ "MIT" ]
permissive
# forklift Plugin for ForkLift, an FTP application for OS X. To use it, add `forklift` to the plugins array in your zshrc file: ```zsh plugins=(... forklift) ``` ## Requirements * [ForkLift](https://binarynights.com/) ## Usage `fl [<file_or_folder>]` * If `fl` is called without arguments then the current folder...
C++
UTF-8
1,003
3.640625
4
[]
no_license
#include <iostream> class IntStack { public: IntStack (int len) : taille(len), top(0) { if (len>0) { tab = new int [taille]; } else { throw("taille nulle"); } } IntStack (const IntStack& rst): taille(rst.taille), top(rst.top), tab(new int[taille]) { for (int i = 0; i < top; i...
Markdown
UTF-8
498
2.625
3
[]
no_license
# notepad You can add new tiles, you can see the progress over the bar and you can remove the notes by clicking on them. Just a simple project i created to practise components in Vue js. > A Vue.js project ## Build Setup ``` bash # install dependencies npm install # serve with hot reload at localhost:8080 npm run de...
Java
UTF-8
219
2.21875
2
[]
no_license
package org.ljk.state; /** * @DESCRIPTION: * @AUTHOR: Lijiankanglc * @DATE: 2020/8/11 20:36 */ public class HappyState extends State { @Override void doWork() { System.out.println("happy"); } }
C++
ISO-8859-1
3,133
2.59375
3
[]
no_license
// 1993 by M. Roth #include "shape.h" #include "view.h" #include "zbuffer.h" struct ShapePoint { float x; float y; float z; float h; }; int shapeMin; int shapeMax; int shapeStart; ShapePoint shapeFirst; ShapePoint shapeFrom; ShapePoint shapeTo; int shapeLine; int shapePoint; struct ShapeTab { struct { ...
PHP
UTF-8
6,455
2.75
3
[ "MIT" ]
permissive
<?php namespace HS; use HS\Component\Comparison; use HS\Component\Filter; use HS\Exception\InvalidArgumentException; use HS\Query\AuthQuery; use HS\Query\OpenIndexQuery; use HS\Query\SelectQuery; use HS\Query\TextQuery; /** * @author KonstantinKuklin <konstantin.kuklin@gmail.com> */ class Reader extends CommonClie...
JavaScript
UTF-8
5,281
2.859375
3
[ "Apache-2.0" ]
permissive
import ConvexPolygon from "../dist/es/ConvexPolygon"; /** * 同一三角形同士の交差 */ test('same_triangle', () => { for ( let i = 0; i < 100; ++i ) { let cp = create_random_triangle(); // 同一なら交差するはず expect(cp.getIntersection( cp )).not.toBeNull() // 同一なら交差するはず expect(cp.hasIntersecti...
C++
UTF-8
4,866
2.59375
3
[ "MIT" ]
permissive
#ifndef FJ_PARSING_STRUCTURES_H #define FJ_PARSING_STRUCTURES_H #include "lexer/structures.h" namespace fj { struct ClassState { std::shared_ptr< ClassDeclaration > classDeclaration = std::make_shared< ClassDeclaration >(); void success(ParsedContext & context); }; struct Con...
Java
UTF-8
1,328
3.0625
3
[]
no_license
package formas; import java.awt.*; public class Ponto2D extends Ponto { Color _cor; String _str; Color _corStr; int larg = 3; Ponto2D(int x, int y){ super((double)x, (double)y); setCor(Color.black); setCorStr(Color.black); setStr(""); } Ponto2D(int x, int y...
SQL
UTF-8
284
2.796875
3
[]
no_license
/* Drop Tables */ DROP TABLE FILM; /* Create Tables */ CREATE TABLE FILM ( ID_FILM INT NOT NULL, TITLE VARCHAR(100), IMAGE BLOB(5000), LOCATION VARCHAR(3000), FILENAME VARCHAR(100), MD5 VARCHAR(5000), LAST_CHANGE DATE, PRIMARY KEY (ID_FILM) );
Java
UTF-8
6,624
2.015625
2
[]
no_license
package org.jmu.multiinfo.service.mean; import java.io.File; import java.io.IOException; import java.util.ArrayList; import java.util.List; import org.jmu.multiinfo.base.util.MyJUnit4ClassRunner; import org.jmu.multiinfo.core.dto.DataVariety; import org.jmu.multiinfo.dto.basestatistics.DataDTO; import org.j...
Markdown
UTF-8
430
2.921875
3
[]
no_license
# Connect 4 : JavaScript Game > By HTML, CSS, Bootstrap 3, JavaScript, and JQuery 3.4.1 - The program is made to use JQuery for interacting with the DOM easier. > Game Logic: - The purpose of the game "CONNECT 4" is to connect four chips in a row for a player to win. - Players will put their chips in one by o...
Java
UTF-8
1,181
2.375
2
[ "MIT" ]
permissive
package unq.ar.edu.dessap.grupol.model; import com.fasterxml.jackson.annotation.JsonIgnore; import lombok.*; import unq.ar.edu.dessap.grupol.model.offer.Offer; import javax.persistence.*; @Entity @Table(name = "products") @Getter @Setter @AllArgsConstructor @NoArgsConstructor @Builder public class Product { @Id ...
Python
UTF-8
7,603
2.828125
3
[]
no_license
# coding: utf-8 # Deep Learning Programming Assignment 2 # -------------------------------------- # Name: Srinidhi Goud # Roll No.: 13EC10042 # # Submission Instructions: # 1. Fill your name and roll no in the space provided above. # 2. Name your folder in format <Roll No>_<First Name>. # For example 12CS10001_R...
Java
UTF-8
169
1.640625
2
[]
no_license
package com.example.tagsapp.tagservice.domain.repo; import com.example.tagsapp.tagservice.domain.model.Tag; public interface TagRepository extends Repository<Tag> { }
Python
UTF-8
3,843
3.53125
4
[]
no_license
""" • Suppose that the input z has at most s errors (i.e., |{i ∈ {1,...,n}|zi = yi}| ≤ s -thus, |{i ∈ {1,...,n}|zi = yi}| ≥ k + s); • Generate A ⊂ {1,...,n}, with |A| = k, and compute the free coefficient. If the free coefficient is 0, compute P(x). """ from encoding import n, y, s, p, k, modulo_p import ran...
Java
UTF-8
2,298
2.21875
2
[ "MIT" ]
permissive
package cn.com.pyc.pbbonline.adapter; import java.util.List; import android.content.Context; import android.view.View; import android.view.ViewGroup; import android.widget.BaseAdapter; import android.widget.TextView; import cn.com.pyc.pbb.reader.R; import cn.com.pyc.pbbonline.common.K; import com.artifex.mupdfdemo.O...
Markdown
UTF-8
8,559
3.21875
3
[]
no_license
How to properly request to start collection =========================================== #Collecting Terms in Tweets (track) - For us to start a collection we need two things to collect TERMS in tweets: ##1. We need the terms you want collected from twitter. Here's how the logic works for getting raw tweets from twi...
Java
UTF-8
1,127
2.25
2
[]
no_license
package com.hr.zConfig; import javax.servlet.MultipartConfigElement; import org.springframework.beans.factory.annotation.Value; import org.springframework.boot.web.servlet.MultipartConfigFactory; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; /...
C#
UTF-8
484
2.5625
3
[]
no_license
using System.Collections.Generic; namespace Bio2 { public class BilletCatalog { private List<Billet> billeter; public BilletCatalog() { billeter = new List<Billet>(); billeter.Add(new Billet("Voksen", 100)); billeter.Add(new Billet("Barn", 70)); ...
Shell
UTF-8
557
3.59375
4
[ "MIT" ]
permissive
#!/bin/bash # Should called by tar.sh and build-images.sh # Should under the folder $BUILD_TMP_DIR npm config get registry if [ -n "$NPM_REGISTRY" ]; then # echo -e "\$NPM_REGISTRY: $NPM_REGISTRY" # must rm node_modules npm config set registry $NPM_REGISTRY npm config get registry fi pwd npmPkg="$1" npmPkgFil...
Python
UTF-8
1,146
3.84375
4
[]
no_license
''' Given a sorted integer array without duplicates, return the summary of its ranges. Example 1: Input: [0,1,2,4,5,7] Output: ["0->2","4->5","7"] Explanation: 0,1,2 form a continuous range; 4,5 form a continuous range. Example 2: Input: [0,2,3,4,6,8,9] Output: ["0","2->4","6","8->9"] Explanation: 2,3,4 form a con...
JavaScript
UTF-8
136
2.859375
3
[]
no_license
function echo(str, x) { for (var i = 1; i <= x; i++){ console.log(str) }; } echo("Echo!!!", 10); echo("Tater Tots", 3);
Markdown
UTF-8
6,951
2.875
3
[]
no_license
--- copyright: years: 2016, 2018 lastupdated: "2018-01-09" --- {:shortdesc: .shortdesc} {:codeblock: .codeblock} {:screen: .screen} {:pre: .pre} # Criar acionadores e regras {: #openwhisk_triggers} Os acionadores e regras do {{site.data.keyword.openwhisk_short}} trazem recursos acionados por eventos para a plata...
PHP
UTF-8
17,495
2.765625
3
[]
no_license
<?php namespace Daytalytics\Module; use Daytalytics\DataGetter; use Daytalytics\RequestException; use DateTime; use DateTimeZone; use Exception; use SimpleXMLElement; class EbayFindingApi extends EbayApi { protected $endpoint = 'http://svcs.ebay.com/services/search/FindingService/v1'; public function define_serv...
Java
UTF-8
4,277
2.078125
2
[]
no_license
package com.black.bim.handler; import com.black.bim.config.BimConfigFactory; import com.black.bim.config.configPojo.BimServerConfig; import com.black.bim.im.handler.AbstractDefaultMsgHandler; import com.black.bim.im.protobuf.DefaultProtoMsg; import com.black.bim.session.SessionManager; import com.black.bim.session.ses...
Java
UTF-8
2,897
2.625
3
[ "Apache-2.0" ]
permissive
/*- * #%L * utils-commons * %% * Copyright (C) 2016 - 2017 Gilandel * %% * Authors: Gilles Landel * URL: https://github.com/Gilandel * * This file is under Apache License, version 2.0 (2004). * #L% */ package fr.landel.utils.commons.function; import static org.junit.Assert.assertFalse; import static org.ju...
Java
UTF-8
1,114
2.5625
3
[]
no_license
package com.nirvana.urlmap.dto; import java.io.Serializable; /** * A tweet with an url. */ public class UrlTweetDTO implements Serializable{ /** * The tweet with URL. */ private String urlTweet; /** * The tweet with URL. */ private String screenName; /** * The tweet with URL. */ private Str...
Java
UTF-8
208
1.664063
2
[]
no_license
package com.example.finaluri1.Repository; import com.example.finaluri1.Entity.Tag; import org.springframework.data.jpa.repository.JpaRepository; public interface Tagrepo extends JpaRepository<Tag,Long> { }
C++
UTF-8
713
2.53125
3
[]
no_license
// // Created by hudong on 7/17/15. // #ifndef FIXEDOBJECTPOOL_FIXED_OBJECT_POOL_DELEGATE_H_H_ #define FIXEDOBJECTPOOL_FIXED_OBJECT_POOL_DELEGATE_H_H_ #include "fixed_object_pool.h" template <typename T> class FixedObjectPoolDelegate { public: FixedObjectPoolDelegate(size_t size) : pool_(FixedObjectPool<T>:...
Swift
UTF-8
1,115
2.65625
3
[]
no_license
// // CATransition+ZLExtension.swift // GGSJ // // Created by 赵雷 on 2017/10/9. // Copyright © 2017年 com.channelsoft. All rights reserved. // import UIKit extension ZLExtension where Base: CATransition { class func startTransitionAniamtion(on view: UIView, type: String, subType: String?, duration: TimeInterva...
Java
UTF-8
795
2.4375
2
[]
no_license
package com.miaoshaproject.tools; import org.joda.time.DateTime; import org.springframework.stereotype.Component; import java.io.File; import java.io.FileWriter; import java.io.IOException; @Component public class Logges { public static String dir = System.getProperty("user.dir")+"/logs/"; public static voi...
Java
UTF-8
1,254
2.390625
2
[]
no_license
package hsl.devspace.app.corelogic.domain; /** * Created by hsenid on 9/23/16. */ public class ShoppingCart { private double netCost; private String customerUsername; private String guestMobile; public double getNetCost() { return netCost; } public void setNetCost(double netCost) { ...
C++
SHIFT_JIS
2,208
3.03125
3
[]
no_license
/// <summary> /// CfbNXobt@ /// </summary> /// <remarks> /// HHCfbNXobt@HH /// ԂĂ钸_ƂȂ̂ŖʂȂĂobt@ /// </remarks> #pragma once namespace myEngine { class IndexBuffer { public: /// <summary> /// CfbNX̌^ /// </summary> /// <remarks> /// 񋓌^ /// </remarks> enum EnIndexType { enIndexType_16, //16rbg̃CfbN...
Java
UTF-8
17,221
1.71875
2
[]
no_license
package com.lvguanwei.emall.product.dao; import static org.apache.ibatis.jdbc.SqlBuilder.BEGIN; import static org.apache.ibatis.jdbc.SqlBuilder.DELETE_FROM; import static org.apache.ibatis.jdbc.SqlBuilder.FROM; import static org.apache.ibatis.jdbc.SqlBuilder.INSERT_INTO; import static org.apache.ibatis.jdbc.SqlBuilder...
C
UTF-8
216
3.21875
3
[]
no_license
#include<stdio.h> int main(void) { int x,y,z,i; for(i=100;i<=999;i++){ x=i/100; y=i/10-x*10; z=i%10; if(i==x*x*x+y*y*y+z*z*z) printf("i=%d\n",i); } return 0; }
Python
UTF-8
1,100
3.3125
3
[]
no_license
# 二分查找 import sys import fileinput import time def rank(key, a): # if not isinstance(a, list): # print('rank input error!') # return -1 lo = 0 hi = len(a) - 1 while lo <= hi: mid = lo + (hi-lo)//2 if key < a[mid]: hi = mid - 1 elif key > a[mid]: ...
Markdown
UTF-8
2,228
2.78125
3
[]
no_license
# Project-User-Stories ``` Description: Display time series charts of 3rd party historical stock prices along with several technical analysis indicators (TA). TA indicators will be calculated from price data and stored for display when requested. User Stories: • UI - Provide lists of Index components, Index Sectors, ...
C
UTF-8
1,203
2.6875
3
[]
no_license
#include<stdio.h> #include<string.h> int main() { char a[50],b[50],c[50]; scanf("%s",&a); scanf("%s",&b); scanf("%s",&c); if(a=='vertebrado') { if(b=='ave') { if(c=='carnivoro') { printf("aguia\n"); } else if(c=='on...
Java
UTF-8
1,984
3.03125
3
[]
no_license
package test; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; import java.io.FileInputStream; import org.junit.Before; import org.junit.Test; import game.Game; import game.arrow.Arrow; import game.commands.Commands; import game.map.Cavern; import game.map.Map; import game.pla...
Python
UTF-8
2,922
3.40625
3
[]
no_license
import random as rnd from mashine.Car import Car class Car_Type(Car): """Класс Пассажирская(Машина) P.s.в англ. языке слово Пасажирская пишется как Passenger`s но называть класс так нельзя поэтому Passengers""" def __init__(self, car_name, class_name="Passengers", body="passengers", engine="gasoline"...
Markdown
UTF-8
1,415
4.03125
4
[]
no_license
## 586. Sqrt\(x\) II \[LintCode\] > Implement`double sqrt(double x)`and`x >= 0`. > > Compute and return the square root of x. > > ##### Notice > > You do not care about the accuracy of the result, we will help you to output results. > > **Example** > > Given`n`=`2`return`1.41421356` ```java public class Solution { ...
Shell
UTF-8
1,288
3.859375
4
[]
no_license
#!/bin/bash source "$(dirname "$0")/../lib/utility.sh" readonly POGOMAP_ROOT="${ROOT_DIR}/PokemonGo-Map" function install_pogomap() { local NEEDS_BUILD=false local -r REPOSITORY="PokemonGoMap/PokemonGo-Map" if ! test -d "${POGOMAP_ROOT}"; then echo "Cloning ${REPOSITORY}..." git clone "https://github.c...
Markdown
UTF-8
904
2.890625
3
[ "LicenseRef-scancode-generic-cla" ]
no_license
--- api_name: rollup() excerpt: Combine multiple MaxN aggregates topics: [hyperfunctions] tags: [hyperfunctions, toolkit, maximum] api: license: community type: function toolkit: true version: experimental: 1.12.0 stable: 1.16.0 hyperfunction: family: minimum and maximum type: rollup aggregates: ...
Python
UTF-8
4,706
2.578125
3
[]
no_license
import numpy as np import pandas as pd from sklearn.model_selection import train_test_split from sklearn.preprocessing import LabelEncoder from sklearn.impute import SimpleImputer encoder = LabelEncoder() mean_imputer = SimpleImputer(missing_values=np.nan,strategy='mean',fill_value=None) lending = pd.read_csv('Demo_L...
C#
UTF-8
4,950
2.53125
3
[ "MIT" ]
permissive
namespace HCMS.Services.Data.Trainings { using System; using System.Linq; using System.Threading.Tasks; using System.Collections.Generic; using Microsoft.EntityFrameworkCore; using HCMS.Data.Models; using HCMS.Services.Mapping; using HCMS.Data.Common.Repositories; using HCMS.W...
PHP
UTF-8
1,136
3.15625
3
[]
no_license
<?php class Config { // Declaracao de Atributos var $file; var $configArray; // Construtor function Config ($configFile) { $this->file = $configFile; } // Realiza o parse da configuracao function parseConfig($processaSessoes = true){ $this->configArray = parse_ini_file($this->file, $processaSessoes); }...
Java
UTF-8
6,441
2.1875
2
[]
no_license
package com.sharifpro.eurb.builder.dao.impl; import com.sharifpro.eurb.DaoFactory; import com.sharifpro.eurb.builder.dao.UserMessageDao; import com.sharifpro.eurb.builder.exception.UserMessageDaoException; import com.sharifpro.eurb.builder.model.UserMessage; import com.sharifpro.eurb.builder.model.UserMessagePk; impor...
C++
UTF-8
335
2.65625
3
[ "MIT" ]
permissive
#ifndef INCLUDED_GOLD_HPP #define INCLUDED_GOLD_HPP #include <ostream> #include <item/item.hpp> // '*' class Gold : public Item { public: Gold(std::size_t amount = 100); std::string to_string() const; std::size_t get_amount() const noexcept; private: const std::size_t amount_; }; #endif // INC...
C++
UTF-8
5,755
2.84375
3
[]
no_license
/* * user entity, 2015.04 */ #include "rct_user.h" #include "rct_global.h" #include "rct_project.h" #include "rct_task.h" #include <iostream> using namespace std; rct_user::rct_user(string i, string n, string p, int t) { id = i; name = n; password = p; type = t; } /* get propertity method */ string rct_user...
C++
UTF-8
735
3.90625
4
[]
no_license
/* IMP : Learn to join one vector at the end of another vector 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)). Example 1: nums1 = [1, 3] nums2 = [2] The median is 2.0 Example 2: nums1 = [1, 2]...
C
GB18030
2,211
3.65625
4
[]
no_license
#define _CRT_SECURE_NO_WARNINGS #include<stdio.h> #include<string.h> #include<assert.h> #include<ctype.h> //1,һַҪͳСдĸֵĴճִĶ //ͬĸʱĸȺ˳磺룺mike.lee@ChinaBeijing" //aghjklm : 1 // n : 2 // ei : 4 //һֱɸѡСдĸ // // //void calc_charnum(char* p) //{ // int count[26] = { 0 }; // int i, j,max=0; // assert(p); // for (i = 0...
Java
UTF-8
833
2.03125
2
[]
no_license
package com.qr.dataobject.param; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import lombok.EqualsAndHashCode; import javax.validation.constraints.NotNull; /** * 字段校验规则参数 * @Author wd * @since 10:53 2020/9/25 **/ @Data @EqualsAndHashCode @ApiModel(de...
C#
UTF-8
777
2.59375
3
[ "MIT" ]
permissive
using System.IO; using System.IO.Compression; namespace HybridDb.Migrations.Documents { public class ZipBackupDecorator : IBackupWriter { readonly IBackupWriter writer; public ZipBackupDecorator(IBackupWriter writer) { this.writer = writer; } ...
Markdown
UTF-8
3,035
2.6875
3
[]
no_license
--- archetype: bookmark categories: - patient engagement - telemedicine date: 2019-02-08T10:24:57Z description: "" featuredImage_error: LECTIORES-50 TargetURL is blank featuredImage_error_url: "" link: http://geekdoctor.blogspot.com/2019/02/remote-patient-monitoring-and-self.html linkBrand: geekdoctor.blogspot.com link...
Python
UTF-8
3,445
3.890625
4
[]
no_license
''' keys: Solutions: Similar: T: S: ''' from typing import List from heapq import * class Solution: # binary search, official # T: O(N*log(max - min)), max and min of the matrix, for each iteration we # take O(N) for counting # https://leetcode.com/problems/kth-smallest-element-in-a-sorted-matri...
C++
UTF-8
591
3.140625
3
[ "MIT" ]
permissive
#pragma once #include <iostream> #include <glm/glm.hpp> #include <string> class Triangle { public: Triangle(); ~Triangle(); void setPointA(glm::vec3 inPoint) { pointA = inPoint; } void setPointB(glm::vec3 inPoint) { pointB = inPoint; } void setPointC(glm::vec3 inPoint) { pointC = inPoint; } glm::vec3 getPoint...
Java
UTF-8
1,014
1.945313
2
[]
no_license
package Pages.Portal; import org.openqa.selenium.By; import org.openqa.selenium.WebElement; import org.openqa.selenium.support.FindBy; import org.openqa.selenium.support.How; import Pages.GenericPage; public class BlockPage extends GenericPage { private static final String trustwaveImageID1 = "backGrdImg_Id"; p...
C++
UTF-8
8,764
2.53125
3
[ "MIT" ]
permissive
/* * Manager.h * * Created on: 23 oct. 2017 * Author: eliord */ #pragma once #include <cstdlib> #include <functional> #include <tuple> #include <vector> #include <cassert> #include "el/remove_cv.hpp" #include "el/types/type_c.hpp" #include "el/types/map.hpp" #include "el/type_list/type_list.hpp" #include "S...
Rust
UTF-8
12,631
2.734375
3
[ "Apache-2.0" ]
permissive
//! Low level CRC-128 functions. use crate::imp_crc; imp_crc!(u128); #[inline] #[allow(clippy::missing_const_for_fn)] fn update_slice_by_4<'a>( crc: u128, bytes: &'a [u8], _lut: &[[u128; 256]], _reflect: bool, ) -> (u128, &'a [u8]) { (crc, bytes) } #[inline] #[allow(clippy::missing_const_for_fn)] fn update_s...
C#
UTF-8
1,327
3.0625
3
[]
no_license
using System.Drawing; using System.Drawing.Imaging; using System.IO; using System.Windows.Media.Imaging; namespace WPFClient { public static class BitmapConverter { public static BitmapImage ToBitmapImage(Image bitmap) { var bitmapImage = new BitmapImage(); using (var me...
Java
UTF-8
644
2.984375
3
[]
no_license
package data; public class NodeMetric implements Comparable<NodeMetric>{ String nodeName; double metricValue; public NodeMetric(String nodeName, double metricValue) { super(); this.nodeName = nodeName; this.metricValue = metricValue; } @Override public int compareTo(NodeMetric arg0) { if (this.met...
Java
UTF-8
6,766
2.203125
2
[]
no_license
package net.mineguild.Builder; import java.awt.BorderLayout; import java.awt.FlowLayout; import javax.swing.JButton; import javax.swing.JDialog; import javax.swing.JOptionPane; import javax.swing.JPanel; import javax.swing.border.EmptyBorder; import com.jgoodies.forms.layout.FormLayout; import com.jgoodies.forms.lay...
JavaScript
UTF-8
446
2.6875
3
[]
no_license
const ENERMY_HEIGHT = 50; export default class Stratege { constructor() { let s1 = { height: 3, s: [{ x: 1, y: 1 }, { x: 0, y: 1 }, { x: 0, y: 1 }, { x: 2, y: 1 }, { x: 1, y: 2 }] } let s2 = { height: 3, s: [{ x: 3, y: 0 }, { x: 2, y: 1 }, { x: 3, y: 1 }, { x: 4, y: 1 }, { x: 3, y:...
C#
UTF-8
4,132
2.71875
3
[]
no_license
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; using TG.Model; using Npgsql; namespace TG { public partial class Login : Form { public ...
Python
UTF-8
630
4.53125
5
[]
no_license
''' Rearrange array such that even positioned are greater than odd Given an array A of n elements, sort the array according to the following relations : A[i] >= A[i-1] , if i is even. A[i] <= A[i-1] , if i is odd. ''' ''' Strategy: Sort arr, then fill up all even position (n/2) with (n/2) maximum nos. ''...
PHP
UTF-8
1,903
2.734375
3
[]
no_license
<?php require 'function.php'; $get = "SELECT * FROM tb_buku"; $books = query($get); if(isset($_POST['submit'])){ $books=cari($_POST['cari']); } ?> <!DOCTYPE html> <html> <head> <title>Daftar Buku</title> <style type="text/css"> .text-center{ text-align: center; } .text-left{ display: inline-flex...
JavaScript
UTF-8
8,044
2.953125
3
[ "MIT" ]
permissive
import { characters } from "../data/ultimatedata.js"; const mainContainer = document.createElement("div"); mainContainer.className = "container"; const allCars = characters.map(myCar => { let carsYeah = characters.find(CAR => { return CAR.name === myCar.name; }); return { // this is how the script find...
Java
UTF-8
879
2.234375
2
[]
no_license
package pl.com.wyszkolmniewjedenksiezyc.domain.service.impl; import lombok.RequiredArgsConstructor; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import pl.com.wyszkolmniewjedenksiezyc.domain.entity.EmbeddedList; import pl.com.wyszkolmniewjedenksiezyc.dom...
Markdown
UTF-8
5,408
3
3
[ "Apache-2.0" ]
permissive
# Free-Range App Utils ([Frau](http://en.wiktionary.org/wiki/Frau)) [![NPM version][npm-image]][npm-url] [![Build status][ci-image]][ci-url] [![Coverage Status][coverage-image]][coverage-url] [![Dependency Status][dependencies-image]][dependencies-url] Utilities for building free-range apps. ## Usage Install `free-r...
Go
UTF-8
528
2.609375
3
[ "Unlicense" ]
permissive
package hw2_test import ( "p4l/hw2" "testing" ) type relPrimeTest struct { a, b int res bool } var relPrimeTests = []relPrimeTest{ {2, 4, false}, {5, 6, true}, {9, 12, false}, {11, 13, true}} func TestIsRelativePrime(t *testing.T) { if LOG_ON { t.Log("Run IsRelativePrime tests") } for _, trial := rang...
Java
UTF-8
791
2.25
2
[ "CC-BY-4.0" ]
permissive
package de.dynamicfiles.projects.testproject.cucumberglue.german; import cucumber.api.java.de.Angenommen; import cucumber.api.java.de.Dann; import org.arquillian.extension.recorder.screenshooter.Screenshooter; import org.jboss.arquillian.drone.api.annotation.Drone; import org.jboss.arquillian.test.api.ArquillianResour...
Python
UTF-8
1,305
4.15625
4
[ "Apache-2.0" ]
permissive
import random print(random.randint(5, 15)) # рандомное число в интервале # вывести нечетные числа numbers = [1, 3, 5] print(random.choice(numbers)) # напечатать рандомное число из списка for number in numbers: print(number) for i in range(1, 11): # задаем цикл с 10 кратным повторением folder_name = f"fo...
C++
UTF-8
2,524
3.3125
3
[]
no_license
#ifndef __FUNC__ #define __FUNC__ #include <iostream> #include <string> #include <vector> #include <map> #include <sstream> #include <utility> #include <queue> #include <set> #include <cmath> class Compare { public: bool operator() (std::pair<std::string, int> &a, std::pair<std::string, int> &b) { return a.second ...