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
261
1.640625
2
[]
no_license
package com.blabz.repository; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.stereotype.Repository; import com.blabz.model.LMSModel; @Repository public interface LMSRepo extends JpaRepository<LMSModel, Integer> { }
Java
UTF-8
1,881
2.484375
2
[]
no_license
package br.com.drogaria.teste; import java.math.BigDecimal; import java.util.Date; import java.util.List; import org.junit.Ignore; import org.junit.Test; import br.com.drogaria.dao.FuncionarioDAO; import br.com.drogaria.dao.VendaDAO; import br.com.drogaria.domain.Funcionario; import br.com.drogaria.domain.Venda; pu...
C++
UTF-8
997
3.796875
4
[]
no_license
/* Programmer: Oberon Ilano Assignment: 7 Description: Program to compute the other side of the triangle. Date: June 11, 2018 Course: CS155 - Computer Science I */ #include <iostream> #include <iomanip> #include <cmath> using namespace std; int main() { // Initiate Variables double side1=0.0, side2=...
Markdown
UTF-8
3,519
3.15625
3
[]
no_license
### Table of Contents [Home](README.md) [Reading Day 2](day2.md) [Read04](read04.md) [Read05](read05.md) [Read06a](read06a.md) [Read06b](read06b.md) [Read07](read07.md) [Read08](read08.md) # Reading Notes Day 1 #### Choosing a Text Editor - We'll be writing a lot of code, a good text editor will be invaluable...
PHP
UTF-8
131
2.796875
3
[ "MIT" ]
permissive
<?php namespace App\Core\Pattern\Singleton; class Singleton { public function say() { var_dump('hello'); } }
Markdown
UTF-8
931
3.765625
4
[ "BSD-3-Clause", "CC-BY-SA-4.0", "CC-BY-4.0" ]
permissive
--- title: Access Multi-Dimensional Arrays With Indexes localeTitle: Acessar matrizes multi-dimensionais com índices --- ## Acessar matrizes multi-dimensionais com índices Considere o seguinte array multidimensional: ```javascript var arr = [[1, 2, 3], [4, 5, 6], [7, 8, 9], [10, 11, 12]]; ``` Isto é o que parece em...
JavaScript
UTF-8
3,554
3.171875
3
[]
no_license
"use strict"; // ---- canvas ---- const canvas = document.createElement("canvas"); const ctx = canvas.getContext("2d"); document.body.appendChild(canvas); const dpr = window.devicePixelRatio || 1; canvas.width = canvas.offsetWidth * dpr; canvas.height = canvas.offsetHeight * dpr; // ---- source image ---- let img = { ...
Markdown
UTF-8
14,744
3
3
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
--- title: Import pre-annotated data into Label Studio short: Import pre-annotations type: guide order: 301 meta_title: Import pre-annotated data into Label Studio meta_description: Import predicted labels, predictions, pre-annotations, or pre-labels into Label Studio for your data labeling, machine learning, and data ...
Python
UTF-8
11,455
2.53125
3
[]
no_license
"""Extra admin commands to manage the DomiNode database server This script adds some functions to perform DomiNode related tasks in a more expedite manner than using the bare `psql` client ricardosilva lsduser1 ppduser1 INSERT INTO lsd_topomaps.qgis_projects SELECT * FROM lsd_staging.qgis_projects WHERE name = 'thi...
Python
UTF-8
1,367
2.828125
3
[]
no_license
t = int(input()) t_i = 1 while t_i<=t: n = input() digits = list(n) #print(digits) prev = '0' index = 0 dict = {0:'0'} for digit in digits: if digit>=prev: prev = digit else: #print('defaulter'+digit) break index+=1 dic...
Go
UTF-8
547
2.59375
3
[]
no_license
package web_models import ( "github.com/gorilla/websocket" ) // TODO: Implement date.. func NewStatusMessage(msg string) *StatusMessage { return &StatusMessage{Message: msg} } // TODO: Implement date.. func NewConnStatusMessage(conn *websocket.Conn, msg string, t string) *ConnStatusMessage { csm := ConnStatusMess...
Java
UTF-8
1,826
2.21875
2
[ "Apache-2.0" ]
permissive
/* * Copyright 2019, 2020, 2021, 2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless re...
PHP
UTF-8
4,565
2.671875
3
[ "MIT" ]
permissive
<?php namespace ZanPHP\SPI; use ZanPHP\SPI\Exception\ClassNotFoundException; use ZanPHP\SPI\Exception\RedeclareException; class AliasLoader extends MetaInfoLoader { const SUFFIX = "alias.php"; /** * @var static */ private static $instance = null; private $aliasOriginMap ; /** ...
C++
UTF-8
1,226
2.59375
3
[]
no_license
#include <stdio.h> #include <cmath> #include <algorithm> #define MAX 500010 #define MAX2 524288 int n,p; //int a[MAX]; int b[2*MAX2]; using namespace std; void Build(){ /*for(int i=0; i<n; ++i) b[p+i]=a[i+1];*/ for(int i=p+n; i<p<<1; ++i) b[i]=0; for(int i=p-1; i>0; --i) b[i]=b[2*i]+b[...
Java
UTF-8
3,434
2.953125
3
[]
no_license
package com.mohamadamin.persianmaterialdatetimepicker; import com.mohamadamin.persianmaterialdatetimepicker.utils.PersianCalendar; import java.util.Calendar; import java.util.Locale; public class XPersianCalendar extends PersianCalendar { public XPersianCalendar() { super(); } public XPersianC...
Java
UTF-8
663
2.9375
3
[]
no_license
import java.util.*; import java.lang.*; public class InvalidBrokenAppliances extends Exception{ //fields private int no_of_broken_fans; private int no_of_broken_tables; private int no_of_broken_lights; //constructor public InvalidBrokenAppliances(int broken_lights, int broken_fans, int broken_tables){ this...
Java
UTF-8
1,307
2.21875
2
[]
no_license
package com.epam.goalTracker.repositories.entities; import com.epam.goalTracker.repositories.entities.enums.PersonalGoalStatus; import lombok.Data; import lombok.ToString; import javax.persistence.*; import java.util.Date; import java.util.List; /** * Personal Goal Entity * * @author Yevhenii Kravtsov * @version...
Python
UTF-8
3,412
2.765625
3
[ "MIT" ]
permissive
import tensorflow as tf from tensorflow.keras import Input, Model from tensorflow.keras.models import Sequential from tensorflow.keras.layers import Activation, Lambda, SpatialDropout1D from tensorflow.keras.layers import Conv1D, LSTM, Multiply, Add, Dense, Dropout from python.tcn import TCN def model_LSTM(n_feat): ...
Shell
UTF-8
415
3.171875
3
[]
no_license
#!/bin/bash echo Please Enter External IP: read natIP echo 1.Wordcount echo 2.Inverted Index echo Please enter your choice: read choice if [ $choice -eq 1 ] then curl -v http://$natIP:7001/ -F datafile=@wordConfig.json -o word_count.txt elif [ $choice -eq 2 ] then curl -v http://$natIP:7001/ -F datafile=@i...
Java
UTF-8
960
2.578125
3
[]
no_license
package easy; import org.junit.Assert; import org.junit.Test; import support.tree.TreeGenerator; import support.tree.TreeNode; public class MinimumAbsoluteDifferenceInBstTest { private MinimumAbsoluteDifferenceInBst solution = new MinimumAbsoluteDifferenceInBst(); @Test public void test0() { Tree...
Markdown
UTF-8
2,354
2.609375
3
[]
no_license
# PRACTICA 3: WIFI Y BLUETOOTH ##INFORME PART B ####codigo ``` #include <Arduino.h> //This example code is in the Public Domain (or CC0 licensed, at your option.) //By Evandro Copercini - 2018 // //This example creates a bridge between Serial and Classical Bluetooth (SPP) //and also demonstrate that Seri...
Ruby
UTF-8
333
3.53125
4
[]
no_license
class FileIO def fileio @str1 = "Aman Gautam" puts " The entered string is #{@str1}" puts "Enter a string" @str2 = gets puts "The entered string is #{@str2}" putc "The first character of the string is #{@str2} " print "Finally string 1 is : #{@str1}" print "and string 2 is : #{@str2}" end end ob = Fi...
C++
UTF-8
509
2.515625
3
[ "Apache-2.0" ]
permissive
// 2-parameter registered things #include "2.sub.class.h" #include "sugiyama/exception-registry.h" #include <catch2/catch_test_macros.hpp> #include <catch2/matchers/catch_matchers_string.hpp> using Catch::Matchers::Equals; SCENARIO("2-parameter registry", "[reg]") { const auto& reg = RegSubject2::obj(); GIVEN("On...
Java
UTF-8
383
1.742188
2
[]
no_license
package com.wt.spring.cloud.config; import lombok.Data; import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.stereotype.Component; /** * @author WuTian * @date 2018-11-01 17:04 * @description */ @Component @Data @ConfigurationProperties("address") public class Add...
Python
UTF-8
1,285
3.828125
4
[]
no_license
# Definition for singly-linked list. class ListNode(object): def __init__(self, x): self.val = x self.next = None class Solution(object): def removeElements(self, head, val): """ :type head: ListNode :type val: int :rtype: ListNode """ while head ...
Python
UTF-8
241
2.59375
3
[]
no_license
# coding: utf-8 # In[ ]: import numpy as np def showInfo(Var,VarName = "UnKnown"): print("Name ", VarName) print("type: ", type(Var)) print("Dtype: ", Var.dtype) print("shape: ", Var.shape) # print("flags: ", Var.flags)
SQL
UTF-8
4,366
2.765625
3
[]
no_license
CREATE DATABASE IF NOT EXISTS `adminsolzul` /*!40100 DEFAULT CHARACTER SET utf8 */; USE `adminsolzul`; -- MySQL dump 10.13 Distrib 5.6.17, for Win32 (x86) -- -- Host: soporte2 Database: adminsolzul -- ------------------------------------------------------ -- Server version 5.1.42-community /*!40101 SET @OLD_CHARA...
Ruby
UTF-8
1,175
2.59375
3
[ "Apache-2.0" ]
permissive
### # The Bookplate class deserializes a solr field representing a Bookplate # The expected format of that field is "FUND-NAME -|- DRUID -|- FILE-ID -|- BOOKPLATE-TEXT" # Example: "SHARPS -|- druid:rq470hm8269 -|- rq470hm8269_00_0001.jp2 -|- Susan and Ruth Sharp Fund" ### class Bookplate attr_reader :bookplate_dat...
C
UTF-8
6,953
2.703125
3
[ "ISC", "MIT", "LicenseRef-scancode-public-domain" ]
permissive
#ifndef COSMOPOLITAN_THIRD_PARTY_SQLITE3_SQLITE3EXPERT_H_ #define COSMOPOLITAN_THIRD_PARTY_SQLITE3_SQLITE3EXPERT_H_ #include "third_party/sqlite3/sqlite3.h" #if !(__ASSEMBLER__ + __LINKER__ + 0) COSMOPOLITAN_C_START_ typedef struct sqlite3expert sqlite3expert; /* ** Create a new sqlite3expert object. ** ** If success...
C#
UTF-8
6,366
2.765625
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows; using System.Windows.Controls; using System.Windows.Data; using System.Windows.Documents; using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Imaging;...
Markdown
UTF-8
7,419
3.0625
3
[]
no_license
# Java 使用 Graphql , 搭建查询服务 - z69183787的专栏 - CSDN博客 2018年04月20日 15:23:55[OkidoGreen](https://me.csdn.net/z69183787)阅读数:373 [https://blog.csdn.net/qq362228416/article/details/50854980](https://blog.csdn.net/qq362228416/article/details/50854980) #### 背景 随着react的开源,facebook相继开源了很多相关的项目,这些项目在他们内部已经使用了多年,其中引起我注意的就是本次讨论的是grap...
Java
UTF-8
301
2.25
2
[]
no_license
package br.newtonpaiva.poo.junit_demo; import static org.junit.jupiter.api.Assertions.assertEquals; import org.junit.jupiter.api.Test; public class CalculadoraTest { @Test public void test_Somar() { var calc = new Calculadora(); assertEquals(5, calc.somar(2, 3)); } }
Ruby
UTF-8
2,503
2.671875
3
[ "Apache-2.0", "MIT", "CC-BY-4.0", "CC-BY-SA-4.0" ]
permissive
# == Schema Information # # Table name: licenses # # id :integer not null, primary key # display_description :text not null # license_type :text not null # url :text # created_at :datetime not null # updated_at :dat...
JavaScript
UTF-8
1,555
2.609375
3
[]
no_license
import React, { Component } from 'react'; import CanvasJSReact from './assets/canvasjs.react'; var CanvasJSChart = CanvasJSReact.CanvasJSChart; /* class CandlestickChart extends Component { render() { /!*const options = { theme: "dark1", // "light1", "light2", "dark1", "dark2" anima...
Markdown
UTF-8
416
2.890625
3
[]
no_license
# finance-ipsum Generate filler text for your fin-tech web app mockup. --- Visit the live website [Finance Ipsum](https://finance-ipsum.herokuapp.com/finance-ipsum) There is also an API endpoint you can use to get up to 10 paragraphs of finance ipsum. https://finance-ipsum.herokuapp.com/ipsum/# Where # is between 1 ...
C
UTF-8
8,822
3.359375
3
[]
no_license
#include <stdio.h> #include <stdlib.h> #include <sys/mman.h> size_t HEAP_SIZE = 1028; // in bytes (e.g. 1kb of memory) int WORD_SIZE = sizeof(int); void* heap_ptr = NULL; void* current_free_list = NULL; void setup_heap() { // The mmap system call asks the operating system to please put // HEAP_SIZE // memory in...
Java
UTF-8
10,664
3.65625
4
[]
no_license
package correcter; public class StringProcessor { /* * Converts a normal string to a hex Array */ public String[] stringToHex(String stringToHex) { char[] hexArray = stringToHex.toCharArray(); String[] hexStringArray = new String[stringToHex.length()]; for (int i = 0; i < ...
Ruby
UTF-8
7,161
2.546875
3
[]
no_license
require "test_helper" class TeamMemberTest < MiniTest::Unit::TestCase def setup DatabaseCleaner.start end def teardown DatabaseCleaner.clean end def test skip 'Not implemented' end def test_good_construction_and_save a_person = Person.sample_person_alfred_with_email a_person.save! ...
C++
UTF-8
1,545
2.546875
3
[]
no_license
#ifndef __SELECT_AND_TEST_HPP__ #define __SELECT_AND_TEST_HPP__ #include "gtest/gtest.h" #include "select_and.hpp" #include "spreadsheet.hpp" #include "select_mock.hpp" #include <string> //Spreadsheet sheet; //// sheet.set_column_names({"First","Last","Age","Major"}); //// sheet.add_row({"","","",""}); //empty ...
JavaScript
UTF-8
1,087
2.59375
3
[]
no_license
#pragma strict var cam1 : Camera; var cam2 : Camera; var cockpit : GameObject; function Start () { Screen.showCursor = false; cam1.enabled = true; cam2.enabled = false; cockpit.active = false; } function Update () { //get the SCREEN position of the mouse var mousePos = Input.mousePosition; //create...
Java
UTF-8
699
1.773438
2
[]
no_license
package com.jwell.classifiedProtection.service; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.service.IService; import com.jwell.classifiedProtection.entry.Organization; import com.jwell.classifiedProtection.entry.vo.OrganizationPagingVo; /** * <p> * 单位组织 服务类 * </p>...
PHP
UTF-8
976
2.8125
3
[]
no_license
<?php /* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ $qty_course="[5, 3, 1, 4, 5]"; $len_course=5; echo "qty_course: ".$qty_course[0]; echo "<br...
Java
UTF-8
2,158
2.703125
3
[]
no_license
package eav.dao; import eav.manager.ObjectManager; import eav.model.Object; import eav.names.AttributeName; import eav.names.ObjectTypeName; import java.sql.Connection; import java.sql.SQLException; import java.util.List; public class UserDao { private ObjectManager objectManager; public UserDao(Connection...
PHP
UTF-8
585
2.875
3
[]
no_license
/*Ratiorg got statues of different sizes as a present from CodeMaster for his birthday, each statue having an non-negative integer size. Since he likes to make things perfect, he wants to arrange them from smallest to largest so that each statue will be bigger than the previous one exactly by 1. He may need some additi...
Swift
UTF-8
1,133
3.3125
3
[]
no_license
// // PrimitiveButton.swift // The Gram // // Created by Tommy Goossens on 14/03/2020. // Copyright © 2020 Tommy Goossens. All rights reserved. // import SwiftUI struct PrimitiveButton: ButtonStyle { let isCancelButton: Bool let colorCancel: Color = Color.red let colorConfirm: Color = Color.green...
Java
UTF-8
615
1.703125
2
[]
no_license
package com.tencent.mm.plugin.backup.b; import com.tencent.mm.lan_cs.Client.a; import java.io.IOException; class a$2 implements a { final /* synthetic */ a gRT; a$2(a aVar) { this.gRT = aVar; } public final void onRecv(String str, int i, byte[] bArr) { a.a(this.gRT, str); a.a...
C#
UTF-8
1,067
3.40625
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace GuiaEjercicios { class Ejercicio38 { public void Main() { Ejercicio38 obj1; obj1 = new Ejercicio38(); obj1.Ejer38(); ...
Markdown
UTF-8
5,002
2.953125
3
[ "Apache-2.0" ]
permissive
+++ title = "Configuring Timeouts" description = "Configure Linkerd to automatically fail requests that take too long." +++ To limit how long Linkerd will wait before failing an outgoing request to another service, you can configure timeouts. Timeouts specify the maximum amount of time to wait for a response from a re...
C++
UTF-8
5,994
2.59375
3
[ "Zlib" ]
permissive
#include "../include/core.hpp" #include "../include/parser.hpp" #include "../include/ast/astidentifier.hpp" using namespace numbat::lexer; using namespace numbat::parser; void addOperator (ParsingContext * context, int precidence, bool ltr, const string & pattern, OperatorDecleration::OperatorParser parser, OperatorD...
Java
UTF-8
308
2.828125
3
[]
no_license
package com.gbn.thread; public class Printer { synchronized public static void print() { for (int i = 0; i < 10; i++) { try { Thread.sleep(1000); } catch (InterruptedException e) { // TODO Auto-generated catch block e.printStackTrace(); } System.out.println(i); } } }
C++
UTF-8
401
3.203125
3
[]
no_license
class Solution { public: int maxProfit(vector<int> &prices) { int n = prices.size(); if(n == 0)return 0; int ans = 0; for(int i = 1, temp; i < n; i++) { temp = prices[i] - prices[i - 1]; if...
C#
UTF-8
2,734
2.65625
3
[]
no_license
using System; using System.Collections.Generic; using System.Data; using System.Data.SqlClient; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Sample32.Reports { public class SalesReport : ReportBase { string fileName = ""; public SalesReport(int batchNumber, st...
Java
UTF-8
5,905
3.859375
4
[]
no_license
import java.util.*; import java.util.stream.Stream; /** * @ClassName: ProcessOperation * @Author Paulson * @Date 2020/7/18 * @Description: 流式编程的中间操作 */ public class ProcessOperation { /** * 学生类 * 存储于集合中数据类型 */ private static class Student implements Comparable<Student> { private St...
Java
UTF-8
1,326
2.078125
2
[]
no_license
package com.cuebiq.cuebiqsdk.model.wrapper; import com.cuebiq.cuebiqsdk.CuebiqSDKImpl; import com.cuebiq.cuebiqsdk.utils.InformationList; import java.util.List; public class TrackRequest { private Auth auth; private Device device; private InformationList information; private List<BluetoothDevice> pair...
Java
UTF-8
2,972
2.65625
3
[ "Apache-2.0" ]
permissive
package eu.dnetlib.iis.core.examples.spark.rdd; import eu.dnetlib.iis.common.utils.AvroGsonFactory; import org.apache.avro.generic.GenericRecord; import org.apache.avro.mapred.AvroKey; import org.apache.hadoop.io.NullWritable; import org.apache.spark.SparkFiles; import org.apache.spark.api.java.JavaPairRDD; import org...
JavaScript
UTF-8
2,555
3.25
3
[]
no_license
var board = [[0,0,0],[0,0,0],[0,0,0]]; var gameOver = false; var players = [ {name:'&nbsp;', nick:'&nbsp;'}, {name:'Player 1', nick:'1'}, {name:'Player 2', nick:'2'} ]; var setPlayers = function setPlayers(p1, p2){ players[1] = p1; players[2] = p2; document.getElementById('matchup').innerHTML = p1.na...
C#
UTF-8
1,451
3.15625
3
[]
no_license
// <copyright file="MinimumAgeAttribute.cs" company="Luxury Travel Deals"> // Copyright (c) Luxury Travel Deals All rights reserved. // </copyright> namespace HiTours.TBO.Models { using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Linq; using ...
Java
UTF-8
1,223
1.75
2
[]
no_license
package com.softlab.okr.service; import com.github.pagehelper.PageInfo; import com.softlab.okr.exception.ServiceException; import com.softlab.okr.model.bo.RoleResourceBo; import com.softlab.okr.model.dto.ResourceDTO; import com.softlab.okr.model.entity.Resource; import com.softlab.okr.model.vo.ResourceVO; impo...
Java
UTF-8
1,542
2.234375
2
[]
no_license
package com.bawei.wangyi20200402.model; import com.bawei.wangyi20200402.bean.Loginbean; import com.bawei.wangyi20200402.contract.LoginContract; import com.bawei.wangyi20200402.utils.NetUtils; import io.reactivex.Observer; import io.reactivex.android.schedulers.AndroidSchedulers; import io.reactivex.disposables.Dispos...
Java
UTF-8
2,482
3.390625
3
[]
no_license
package itSovy.carConsumption.detail; public class Car { public double fuelCapacity; public double fuelConsumption; public String brand; public int year; public String type; public String horsePower; private Engine engine; public Color color; public Car(double fuelCapacity, double...
Python
UTF-8
2,576
3.84375
4
[]
no_license
class Vehicle(): class_name='' vehicles={} #constructor def __init__(self, kind, speed, material, substance): #THE MATERIAL PARAMETER WILL NOT BE ASSIGNED WHEN AN OBJECT OF THE CLASS IS CREATED (APPARENTLY PYTHON 3.0 AND ABOVE) self.kind = kind self.speed = speed self.material = material #BECAU...
C
UTF-8
187
2.671875
3
[]
no_license
#include <time.h> #include <stdio.h> #include <sys/time.h> int main(void){ time_t t,t1; t = time(NULL); sleep(10); t1 = time(NULL); printf("end = %ld\n",t1-t); }
Java
UTF-8
157
1.960938
2
[]
no_license
package com.irisida.lang.part03.chapter10.interfaces.interfaceinheritance; public interface DefaultRunnable extends Runnable { void displayDetails(); }
Rust
UTF-8
5,045
2.53125
3
[]
no_license
use super::terrain::TerrainGeometry; use super::utils::*; use cell_traits::*; use color::Color; use commons::barycentric::triangle_interpolate_any; use commons::grid::Grid; use commons::*; use graphics::Drawing; use Command; pub const HOUSE_FLOATS: usize = 252; pub struct House<'a> { pub position: &'a V2<usize>, ...
Markdown
UTF-8
45,467
3.484375
3
[]
no_license
# Go语言学习笔记 ### 1. Go语言简介 **Go语言特色** - 简洁、快速、安全 - 并行、有趣、开源 - 内存管理、数组安全、编译迅速 **Go语言用途** - Go语言被设计成一门应用于搭载Web服务器,存储集群或类似用途的巨型中央服务器的系统编程语言 - 对于高性能分布式系统领域而言,Go语言比大多数其他语言有更高开发效率 - 提供了海量并行的支持,对于游戏服务端的开发很好 **Go语言开发工具** GoLand、LiteIDE、Eclipse ### 2. Go语言结构 **Hello World实例** ```go package main import "fmt" func main...
PHP
UTF-8
2,386
2.515625
3
[]
no_license
<?php namespace RessourceBundle\Entity; use Doctrine\Common\Collections\ArrayCollection; use Doctrine\Common\Collections\Collection; use Doctrine\ORM\Mapping as ORM; /** * groupe * * @ORM\Table(name="groupe") * @ORM\Entity(repositoryClass="RessourceBundle\Repository\groupeRepository") */ class Groupe { /** ...
Java
UTF-8
1,499
2.109375
2
[]
no_license
package uk.co.thomasc.codmw.killstreaks; import org.bukkit.entity.Player; import org.bukkit.event.player.PlayerInteractEvent; import org.bukkit.event.player.PlayerMoveEvent; import uk.co.thomasc.codmw.Main; import uk.co.thomasc.codmw.objects.MineCodListener; import uk.co.thomasc.codmw.objects.Reason; import ...
Java
UTF-8
9,800
2.09375
2
[]
no_license
package com.eclipsesource.v8; import com.tencent.matrix.trace.core.AppMethodBeat; import java.io.Closeable; import java.io.File; import java.io.IOException; public class PlatformDetector$Vendor { private static final String LINUX_ID_PREFIX = "ID="; private static final String[] LINUX_OS_RELEASE_FILES = ...
Python
UTF-8
315
3.515625
4
[]
no_license
N = int(input()) ans = set() for i in range(1, N+1): for j in range(i+1, N+1): ans.add((i, j)) if N % 2 == 1: # 奇数 for i in range(1, N+1): j = N - i ans.discard((i, j)) else: # 偶数 for i in range(1, N+1): j = N + 1 - i ans.discard((i, j)) print(len(ans)) for a in ans: print(*a)
Shell
UTF-8
3,239
4.1875
4
[]
no_license
#!/bin/bash source_dir=$1 destination_dir=$2 # max_copies_count=10 check_paths() { src_path=$1 dest_path=$2 if [ $src_path = $dest_path ]; then echo 'bad' elif [ $(dirname $src_path) = $dest_path ] || [ $(dirname $dest_path) = $src_path ]; then echo 'bad' else ec...
Java
UTF-8
3,027
1.765625
2
[ "BSD-3-Clause" ]
permissive
package bio.terra.service.snapshot.flight.create; import bio.terra.common.iam.AuthenticatedUserRequest; import bio.terra.model.BillingProfileModel; import bio.terra.service.common.CommonMapKeys; import bio.terra.service.dataset.flight.ingest.IngestUtils; import bio.terra.service.filedata.azure.AzureSynapsePdao; import...
Shell
UTF-8
560
2.90625
3
[ "Apache-2.0" ]
permissive
#!/usr/bin/env bash source config.sh DATE=`date +%Y_%m_%d` SUITES="engine heat_equation numpy_vs_bohrium" #SUITES="heat_equation leibnitz_pi rosenbrock numpy_vs_bohrium" #SUITES="engine heat_equation leibnitz_pi rosenbrock" #SUITES="leibnitz_pi heat_equation rosenbrock" for SUITE in $SUITES do echo "** Adding $...
JavaScript
UTF-8
5,378
3.03125
3
[]
no_license
//适合pc端关闭网页或者跳转网页,移动端不知是否兼容 /* *2016 12 26 *autor guangweiguo *version 1.0.0 * *----必须 *@wrapper 外层的包裹wrapper需要是唯一的变量名(不可重复)最好是id名 ----必须 * -----一下为非必须 *@expire为储存时间,单位日 *@selectClass 为所有要储存信息元素的class名, 默认wrapper里所有input *@deletBtn 为删除存储所有,提交后若果先删除村粗,可以用这个btn *@savaData 缓存的数据 *@isonbeforeunload 是否离开页面储存数据 默认是...
C++
UTF-8
304
2.6875
3
[]
no_license
#include <bits/stdc++.h> using namespace std; int func(int n) { int count = 0; if(n && n&(n-1)) { while(n>0) { n = n>>1; count++; } n = 1<<count; return n; } else if(n==0) return 1; else if(!(n&(n-1))) return n; } int main() { int i,n; cin>>n; cout<<func(n)<<'\n'; return 0; }
Java
UTF-8
605
3.1875
3
[]
no_license
package Learn.Day216.demo03; import java.util.Random; import java.util.Scanner; public class Random02 { public static void main(String[] args) { Random r = new Random(); System.out.println("请输入数字"); Scanner sc = new Scanner(System.in); int x=sc.nextInt(); Boolean is=true; ...
Python
UTF-8
336
2.859375
3
[]
no_license
def data_loader(data_path): print("loading data ...") import pandas as pd import os """Just take a data path as input and render original datasets""" load = lambda x: pd.read_csv(x,compression="zip") data_files = os.listdir(data_path) test, train = [load(os.path.join(data_path,i)) for i in data_files] retur...
Java
UTF-8
536
2.15625
2
[]
no_license
package com.mac.bry.kurs1024kb.api; import java.io.IOException; import java.util.List; import com.mac.bry.kurs1024kb.entity.Product; public interface ProductService { List<Product> getAllProducts() throws IOException; int getNumberOfProductsOnList(); Product getProductByProductName(String productName) throws...
Java
UTF-8
4,290
2.328125
2
[]
no_license
package com.devotion.dao.route.support; import java.util.HashMap; import java.util.Map; import javax.sql.DataSource; import com.devotion.dao.route.support.bean.VirtualNodeLocator; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.InitializingBean; import com.devotion....
TypeScript
UTF-8
4,352
3.171875
3
[]
no_license
import {FileWriter} from './FileWriter'; import {GqlToTSConfig, Mapper} from "./types"; import {getTypeOptions} from "./gqlNodeTools"; const path = require('path'); export class TypescriptFileWriter { private fw: FileWriter; private readonly fullFilePath: string; constructor(private options: GqlToTSConfi...
PHP
UTF-8
411
2.78125
3
[]
no_license
<?php namespace App\Exceptions; class ViewNotFoundException extends FileNotFoundException { /** * Constructor call FileNotFoundException by code * * @param string $message * @param integer $code * @param Exception $previous */ public function __construct($class, $code = 0, $pre...
Python
UTF-8
3,192
3.21875
3
[]
no_license
# -*- coding: utf-8 -*- """ Created on Mon Jul 6 09:56:56 2020 @author: Ali Barkın Kara """ #Ödev1 #from datetime import datetime, date #print("tarih giriniz") #gun=int(input("tarih gün degeri: ")) #ay=int(input("tarih ay degeri: ")) #yıl=int(input("tarih yıl degeri: ")) #tarih2 = date(day = gun, mo...
C
UTF-8
1,056
3.65625
4
[]
no_license
/** * CS 2261 - Linked List Lab * * list.h **/ #ifndef LIST_H #define LIST_H /* The node struct. Has a prev pointer, next pointer, and data. */ typedef struct lnode { struct lnode* prev; /* Pointer to previous node */ struct lnode* next; /* Pointer to next node */ int data; /* User data */ } node; /* The...
Go
UTF-8
590
3.125
3
[]
no_license
package main import ( "fmt" "log" "time" "github.com/zabawaba99/firego" ) type chat struct { Message string Name string } func main() { // create a reference to data in Firebase and authorize it with a JWT token f := firego.New("https://radiant-heat-5110.firebaseio.com/chat", nil) f.Unauth() tick := t...
PHP
UTF-8
248
2.625
3
[]
no_license
<?php namespace App\Infrastructure\Interfaces; interface IResource { public function setOpenedResource($resource); public function getOpenedResource(); public function getFirstLine(); public function loopByLine(): \Generator; }
C++
UTF-8
340
3.40625
3
[]
no_license
// two pointer approach one fast pointer and one slow pointer class Solution { public: bool hasCycle(ListNode *head) { if (!head) return false; ListNode* slow = head; ListNode* fast = head->next; while (fast && fast->next) { if (slow == fast) return true; slow = slow->next; fast = fast->next->next; }...
Python
UTF-8
1,081
3.6875
4
[]
no_license
#!usr/bin/python import cmath from math import * #Objetivo: devuelve en un arhivo una lista de puntos para graficar con gnuplot. #ecuacion: Z = az + bz/ |z| #donde a= exp(pi*i/4) = (1/sqr(2)(1 + i) y b = Conjugado(a) def Z( z_before, def_of_a, def_of_b): a = def_of_a b = def_of_b z = z_before abs_of_z...
Java
UTF-8
2,684
2.28125
2
[]
no_license
package com.concrete.poletime.db; import com.concrete.poletime.seasonticket.SeasonTicket; import com.concrete.poletime.user.PoleUser; import com.concrete.poletime.user.PoleUserRepository; import com.concrete.poletime.utils.Role; import org.springframework.beans.factory.annotation.Autowired; import org.springframework....
Java
UTF-8
797
2.09375
2
[]
no_license
/* * Created on June 29, 2006 * * To change the template for this generated file go to * Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments */ package com.bituos.lca.Beans; /** * @author cirm */ public class BeanDoctorRepresentative{ private int id; private BeanDoctor id_doctor; private...
JavaScript
UTF-8
427
2.828125
3
[]
no_license
// 1. Create .on("click", function() {} ) handlers for each of the thumbnails: #first, #second, #third, #fourth // 2. Use .attr() to change the `src` attribute of #bigimage to correspond to image that was clicked $('.thumbnails .zoom').click(function(e){ e.preventDefault(); var photo_fullsize = $(t...
C
UTF-8
270
3.078125
3
[]
no_license
#include<stdio.h> int main() { int vetorX[10]; int k=0; for (k=0;k<10;k++){ scanf("%d",&vetorX[k]); if(vetorX[k] <= 0){ vetorX[k] = 1; } printf("X[%d] = %d\n",k,vetorX[k]); } return 0; }
Java
UTF-8
3,795
3.28125
3
[]
no_license
import java.util.*; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.*; import java.io.*; import java.io.FileWriter; import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.File; import java.io.FileOutputStream; import java.io.FileWriter...
SQL
UTF-8
170
3.828125
4
[]
no_license
SELECT a.score AS Score, COUNT(DISTINCT b.score) AS Rank FROM scores a JOIN scores b WHERE b.score >= a.score GROUP BY a.id ORDER BY a.score DESC
C#
UTF-8
1,997
2.71875
3
[]
no_license
using Microsoft.Extensions.Configuration; using System.Collections.Concurrent; using System.Reflection; namespace BeckmanCoulter.BookStore.Extensions { /// <summary> /// Cache Configurations for <see cref="IConfigurationRoot"/>. /// </summary> public static class AppConfiguration { private...
C++
UTF-8
2,549
3.984375
4
[]
no_license
#include <climits> #include <iostream> // Brute force approach- Recursive int minStepTo1_bf(int n) { // base case if (n == 1) return 0; int x = minStepTo1_bf(n - 1); int y = INT_MAX; if (n % 2 == 0) y = minStepTo1_bf(n / 2); int z = INT_MAX; if (n % 3 == 0) z = minStepTo1_bf(n / 3); ret...
Java
UTF-8
187
1.53125
2
[]
no_license
package timaxa007.rotating_block.r4upside; import net.minecraft.tileentity.TileEntity; public class TileEntityRotatingObj extends TileEntity { public TileEntityRotatingObj() { } }
Java
UTF-8
10,869
2.125
2
[]
no_license
package com.ssm.dao; import java.sql.Timestamp; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import org.apache.ibatis.annotations.Delete; import org.apache.ibatis.annotations.Select; import org.apache.ibatis.annotations.SelectProvider; import org.apache.ibatis.ses...
Swift
UTF-8
1,445
3.53125
4
[]
no_license
//: [Previous](@previous) import UIKit @testable import Constraints // Example code let painting = UILabel(frame: CGRect(x: 0, y: 0, width: 10, height: 10)) var n = 0 (() |-* 5).produceConstraints(view_index: &n).formatString (() |-* 1.23).produceConstraints(view_index: &n).formatString (() |-* painting).produceCon...
C#
UTF-8
672
2.515625
3
[]
no_license
using System.Collections; using System.Collections.Generic; using UnityEngine; public class platformMover : MonoBehaviour { Vector3 startPos; public Transform endPosition; public float speed; Vector3 targetPos; void Start () { startPos = transform.position; targetPos = endPosition.position; } // Up...
JavaScript
UTF-8
1,593
2.984375
3
[ "MIT" ]
permissive
import generateUID from "@akwaba/object-extensions/src/generate-uuid"; const model = {}; /** * Retrieves the storage entry for the given element. The element's "_storageId" property is used as the * key for its entries * * @param {Node} element the element for which to retrieve the storage * @return {Obje...
JavaScript
UTF-8
548
3.671875
4
[]
no_license
// 기본 매개변수 (객체) const defaultHuman = { name : { last : "조", first : "구함" }, sports: "유도", ranking : 2 } function olympicSports(human = defaultHuman){ console.log(`${human.name.last}${human.name.first}은 ${human.sports} 선수입니다`) console.log(`${human.sports}에서 ${human.ranking}등 했습니다...