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
Go
UTF-8
891
3.546875
4
[]
no_license
package main import ( "fmt" "time" ) func main() { defer timeTrack(time.Now()) endYear := 2000 result := 0 dayOfWeek := 1 year := 1901 month := 0 day := 0 for year <= endYear { for month < 12 { for day < getDaysMonth(month, year) { if dayOfWeek == 6 && day == 0 { result ++ } dayOfWe...
Java
UTF-8
1,258
2.515625
3
[]
no_license
package com.java.filter; import java.io.IOException; import javax.servlet.Filter; import javax.servlet.FilterChain; import javax.servlet.RequestDispatcher; import javax.servlet.ServletException; import javax.servlet.ServletRequest; import javax.servlet.ServletResponse; import javax.servlet.annotation.WebFil...
JavaScript
UTF-8
860
3.71875
4
[ "MIT" ]
permissive
/** * @param preferences - an array of integers. Indices of people, whom they love * @returns number of love triangles */ module.exports = function getLoveTrianglesCount(preferences = []) { // your implementation if(preferences === null || !Array.isArray(preferences) || preferences.length < 3){ return ...
Java
UTF-8
2,883
2.421875
2
[]
no_license
package com.predictivemovement.route.optimization; import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; import org.json.JSONObject; /** * Try out manually some performance measures. */ public class TryPerformanceMeasure { private JSONObject response; ...
Java
UTF-8
1,976
2.015625
2
[ "EPL-1.0", "Classpath-exception-2.0", "LicenseRef-scancode-unicode", "LicenseRef-scancode-warranty-disclaimer", "BSD-3-Clause", "LicenseRef-scancode-free-unknown", "LicenseRef-scancode-protobuf", "CDDL-1.1", "W3C", "APSL-1.0", "GPL-2.0-only", "Apache-2.0", "LicenseRef-scancode-public-domain"...
permissive
/* * Copyright (c) 2000, 2022, Oracle and/or its affiliates. * * Licensed under the Universal Permissive License v 1.0 as shown at * https://oss.oracle.com/licenses/upl. */ package com.tangosol.coherence.rest; import com.oracle.coherence.common.base.Logger; import com.tangosol.coherence.rest.config.DirectQuery; ...
C#
UTF-8
1,111
2.78125
3
[]
no_license
using eNotification.Domain; using System; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; using System.Web.Mvc; namespace NotificationService.Models { public static class CustomExtensions { public static IEnumerable<SelectListItem> ToSelectListItem...
Java
UTF-8
1,458
3.5
4
[]
no_license
package Graphs; import java.util.Iterator; import java.util.LinkedList; import java.util.Queue; public class BFSAdjacencyList { private int V; private LinkedList<Integer>[] adjacencyList; public BFSAdjacencyList(int v){ V = v; adjacencyList = new LinkedList[v]; for(int i=0; i<v;i++){ adjacencyList[i] = ...
TypeScript
UTF-8
1,308
3.046875
3
[ "MIT" ]
permissive
import { ApiProperty } from '@nestjs/swagger'; import { IsEmail, Matches, MaxLength, MinLength } from 'class-validator'; export class RegisterDto { @ApiProperty() @IsEmail( {}, { message: 'Please enter a valid email address, for example your-email@domain.com', }, ) readonly email: string; @ApiProperty()...
Markdown
UTF-8
1,051
2.515625
3
[]
no_license
CacheInvalidationTester ======================= Tool to Test Cache Invalidation scenarios To run the tests: ```bash python server.py [portnumber] ``` portnumber defaults to 8000, if you don't specify it. Open a browser to http://localhost:8000 #Test 0 This test checks to make sure that two back to back GET...
Java
UTF-8
3,371
2.390625
2
[]
no_license
package com.admin.core.net; import com.admin.core.app.ConfigType; import com.admin.core.app.Latte; import com.admin.core.net.rx.RxRestService; import java.util.ArrayList; import java.util.WeakHashMap; import java.util.concurrent.TimeUnit; import okhttp3.Interceptor; import okhttp3.OkHttpClient; import retrofit2.Retr...
JavaScript
UTF-8
6,343
2.734375
3
[]
no_license
//----KONFIGURACIJA----// //----React/React Native----// import React, { useState, useEffect } from 'react'; import { Button, StyleSheet, Text, TextInput, View } from 'react-native'; //---Expo paketi----// import * as Permissions from 'expo-permissions'; import * as Location from 'expo-location'; //----Komponente---...
Markdown
UTF-8
6,463
3.953125
4
[]
no_license
# PHP-Function PHP 函数 ### 1. 用户自定义函数 1. 函数名以字母或下划线开头,后面跟字母、数字或下划线 2. 函数无需在调用之前被定义,除非以下两种情况 - 当一个函数是有条件被定义时,必须在调用函数之前定义 示例: ``` $makefoo = true; // foo(); // 报错 致命错误,函数未定义 if ($makefoo) { // 函数是否定义是有条件的 function foo() { echo "H...
Markdown
UTF-8
8,038
2.578125
3
[ "LicenseRef-scancode-unknown-license-reference", "MIT", "ICU" ]
permissive
--- layout: post title: "Richard Stallman on Free Software and your Freedom (lecture)" author: Amir Chaudhry tags: [cambridge, lecture, notes] description: shorturl: http://bit.ly/IineFM --- {% include JB/setup %} Lecture at Cambridge Computer Lab on 1 March 2011 - Sponsored by Software East (@markdalgarno) \[pls exc...
Java
UTF-8
3,748
2.296875
2
[]
no_license
package com.jyw.classinfo.controller; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; import com.jyw.classinfo.service.SyllabusInfoService; import com.jyw.model.SyllabusInfo; import com.jyw.model.SyllabusInfoCriteria; import org.springframework.stereotype.Controller; import org.springfr...
SQL
WINDOWS-1251
1,761
3.34375
3
[]
no_license
PROMPT ===================================================================================== PROMPT *** Run *** ========== Scripts /Sql/BARS/function/f_acc_branch.sql =========*** Run * PROMPT ===================================================================================== CREATE OR REPLACE FUNCTION BA...
PHP
UTF-8
21,694
3.078125
3
[]
no_license
<?php /** * Created by PhpStorm. * User: Laura 4 * Date: 12/7/2015 * Time: 2:16 PM */ /** * @param $connection object the mysql connection object from db-functions.php * @param $email * @return mixed */ function getUserInfo($connection, $studentID) { $firstname = ""; $lastname = ""; $country = "";...
C
UTF-8
332
3.375
3
[]
no_license
#include "headers.h" void stenv(char** arg, int noa) { if(noa==2) setenv(arg[1]," ",2); else if(noa==3) setenv(arg[1],arg[2],2); else printf("Number of arguments must be 2 or 3\n"); } void unstenv(char** arg, int noa) { if(noa==1) printf("No arguments given"); else for(int i=0;i<noa-1;i++) unsetenv(...
Java
UTF-8
35,559
2.1875
2
[ "MIT", "LicenseRef-scancode-warranty-disclaimer", "LicenseRef-scancode-unknown-license-reference", "LGPL-2.1-or-later", "CC0-1.0", "BSD-3-Clause", "UPL-1.0", "Apache-2.0", "LicenseRef-scancode-public-domain", "BSD-2-Clause", "LicenseRef-scancode-generic-cla" ]
permissive
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. package com.azure.resourcemanager.resources.fluentcore.dag; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.resources.fluentcore.model.Indexable; import com.azure.resourcemanager.resources...
Java
UTF-8
324
1.664063
2
[]
no_license
package life.hrx.weibo.dto; import lombok.Data; /** * 点赞对象 */ @Data public class LikeCountDTO { private Long userId; private Boolean isLike;//是否已经点过赞 private Long likeCount; //点赞数量 private Long likeId;//被点赞对象的id private String likeType;//点赞的类型 }
Python
UTF-8
439
3.59375
4
[]
no_license
#!/usr/bin/python3 sandwich_orders = ['sub', 'pb&j', 'knuckle', 'pastrami'] finished_sandwiches = [] while sandwich_orders: temp = sandwich_orders.pop() if temp == 'pastrami': print("We're out of pastrami. Skipping...") else: print("Making a " + temp + ".") finished_sandwiches.a...
Java
UTF-8
635
2.40625
2
[]
no_license
/** * */ package com.jason.stock.http.core; /** * @author lenovo * */ public class DataAccessException extends RuntimeException { /** * */ private static final long serialVersionUID = 452684673511911522L; /** * Constructor for DataAccessException. * @param msg the detail message */ public DataAc...
JavaScript
UTF-8
832
2.515625
3
[]
no_license
const expectations = (function() { const asciiStart = "test123"; const asciiExpect = [ 116, 101, 115, 116, "1", "2", "3" ]; const asciiSingleStart = asciiExpect; const asciiSingleExpect = [1,1,6,1,0,1,1,1,5,1,1,6,1,2,3]; const spliceAndFillStart = asciiSingleExpect; const spliceAndFi...
C
UTF-8
236
2.765625
3
[]
no_license
#include <stdio.h> int main(int argc, const char** argv, const char** envp) { // loops from 100 to 999 for (int i = 100; i < 999; i++) { // i know it goes from 100 to 999 // but i cannot figure out exactly what it is doing } }
Markdown
UTF-8
596
2.78125
3
[]
no_license
# Bot, Don King Bot, Don King is an automatic Reddit promoter that posts to the specified sub-reddits at the sub-reddits' optimal time. ```python urls_subreddits = { 'http://www.yourblog.com/your-article': { # URL 'title': 'Check out this article', # title of the article 'subreddits': ['python', 'r...
Go
UTF-8
871
3.0625
3
[]
no_license
package main import ( "fmt" "html/template" "net/http" ) var tpl *template.Template func init() { tpl = template.Must(template.ParseFiles("index.gohtml")) } func main() { http.HandleFunc("/", foo) http.HandleFunc("/bar", bar) http.HandleFunc("/barform", barform) http.Handle("/favicon.ico", http.NotFoundHan...
Python
UTF-8
44,610
2.96875
3
[]
no_license
from Game import Game import constants import skfuzzy as fuzz from skfuzzy import control as ctrl import numpy as np import math as m #To Calculate the angle between 2 points #myradians = math.atan2(targetY-gunY, targetX-gunX) class FuzzyRulesController: def __init__(self, max_moves=2000): self.max_mo...
Shell
UTF-8
2,032
3.171875
3
[ "Apache-2.0" ]
permissive
#!/bin/bash # -*- coding: utf-8 -*- # # Copyright 2015 eNovance SAS <licensing@enovance.com> # # 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....
Python
UTF-8
1,192
3.296875
3
[]
no_license
#!/usr/bin/env python3 #-*- coding:utf-8 -*- __author__ = "tongzi" from sqlalchemy import Column, String, create_engine from sqlalchemy.orm import sessionmaker from sqlalchemy.ext.declarative import declarative_base #创建对象的基类 Base = declarative_base() class Student(Base): __tablename__ = 'student' #表名 #表的结构 id ...
Java
UTF-8
1,687
2.375
2
[ "MIT" ]
permissive
package org.se.lab.data; import org.junit.Assert; import org.junit.Before; import org.junit.Test; import java.util.List; public class UserContactDAOTest extends AbstractDAOTest { private User u = new User("Fantom", "***"); private UserContact uc = new UserContact(u,2); private UserContact uc2 = new User...
Java
UTF-8
183
2.4375
2
[]
no_license
package DesignPattern; public class Parent { Parent(){ System.out.println("Parent()"); } public void test(){ System.out.println("Parent test()"); } }
Java
UTF-8
3,661
2.421875
2
[]
no_license
package com.oscgc.securevideo.server.multitenancy.impl; import java.util.concurrent.ConcurrentHashMap; import com.oscgc.securevideo.server.multitenancy.*; import org.springframework.util.StringUtils; public class DefaultTenancyContext implements TenancyContext, ...
Java
UTF-8
2,764
2.5625
3
[ "Apache-2.0" ]
permissive
package de.fau.cs.mad.fly.HttpClient; import com.badlogic.gdx.scenes.scene2d.ui.Button; import de.fau.cs.mad.fly.profile.PlayerProfileManager; import de.fau.cs.mad.fly.profile.ScoreManager; import de.fau.cs.mad.fly.ui.DialogWithOneButton; import de.fau.cs.mad.fly.ui.screens.LevelGroupHighscoreScreen.UploadScoreClickL...
Markdown
UTF-8
7,864
2.765625
3
[]
no_license
--- title: Overview of Share extension points --- An extension point is an interface that a developer can use to customize the Share web application in a supported way. There are a number of extension points that can be used to do things like adding custom pages, hiding content on existing pages, display custom meta...
PHP
UTF-8
8,033
2.515625
3
[]
no_license
<?php namespace App\Model; use Doctrine\ORM\Mapping as ORM; /** * Model\Certificado * * @ORM\Entity() * @ORM\Table(name="certificado") */ class Certificado { /** * Tipos */ const PART_PALESTRA = 0; const PART_MINICURSO = 1; const PART_MARATONA = 2; const APRE_MINICURSO = 3; co...
Java
UTF-8
8,781
2.3125
2
[ "MIT", "BSD-3-Clause", "EPL-2.0", "CDDL-1.0", "JSON", "EPL-1.0", "Apache-2.0" ]
permissive
package com.exasol.adapter.dialects; import static org.junit.Assert.assertTrue; import java.io.File; import java.lang.reflect.InvocationTargetException; import java.nio.file.Files; import java.sql.Connection; import java.util.*; import java.util.stream.Stream; import javax.json.JsonObject; import org.junit.jupiter....
Java
UTF-8
7,439
2.34375
2
[]
no_license
import com.cedarsoftware.util.io.JsonWriter; import com.sun.net.httpserver.*; import java.io.IOException; import java.io.OutputStream; import java.net.InetSocketAddress; import java.net.URI; import java.nio.charset.StandardCharsets; import java.nio.file.Files; import java.nio.file.Paths; import java.util.Arr...
C++
UTF-8
810
3.390625
3
[]
no_license
// func-operator.cpp by Bill Weinman <http://bw.org/> // updated for C++EssT 2014-10-24 #include <cstdio> using namespace std; class A { int a; public: A ( const int &a ) : a(a) {} const int & value() const { return a; } }; // operator here indicates operator overload function // // lhs, rhs is a typical r...
TypeScript
UTF-8
416
2.515625
3
[ "MIT" ]
permissive
import * as React from 'react'; declare type mapper<TInner, TOutter> = (input: TInner) => TOutter; export interface StateAndUpdater<TState> { state: TState; setState: (newState: TState) => TState; } declare type StateProviderType = <TState, TExtOuter = {}>(initialState: TState | mapper<TExtOuter, TState>) => Re...
Markdown
UTF-8
31,724
3.1875
3
[]
no_license
# How to Eat a Peach *by Diana Henry* Source: [https://www.blinkist.com/books/how-to-eat-a-peach-en](https://www.blinkist.com/books/how-to-eat-a-peach-en) ![How to Eat a Peach](https://images.blinkist.com/images/books/5ec44ee26cee070006b2fc80/1_1/470.jpg) (2018) is part cookbook, part autobiography and part travelo...
C#
UTF-8
9,260
2.65625
3
[ "MIT" ]
permissive
namespace BotBits { public static class Morph { public enum Id { } public static BotBits.Team ToTeam(this Id morph) { return (BotBits.Team) morph; } public static class Portal { public const Id Down = 0, ...
Python
UTF-8
2,511
3.203125
3
[]
no_license
#!/usr/bin/python3 import time import subprocess import os import multiprocessing import sys import argparse def main(): # Argparser description desc = 'Ping sweeping script designed to perform slow pings to the network to capture the active hosts' parser = argparse.ArgumentParser(description = desc) ...
Markdown
UTF-8
3,246
3.59375
4
[]
no_license
# Stock-Management-Software Offline software used to keep track of the current stock in the factories or stores. It also provides a feature to generate and print bills right through the desktop app while selling the product. # Features The features include: 1. Registration of new Product ( Master ) 2. Purchase 3. Sell...
C++
UTF-8
639
2.609375
3
[]
no_license
// // Peon.cpp for in /home/baptiste/rendu/piscine_cpp_d10/ex00 // // Made by Bertrand-Rapello Baptiste // Login <bertra_l@epitech.net> // // Started on Fri Jan 16 12:01:48 2015 Bertrand-Rapello Baptiste // Last update Fri Jan 16 12:14:34 2015 Bertrand-Rapello Baptiste // #include "Peon.hh" Peon::Peon(std::stri...
C#
UTF-8
1,485
4.09375
4
[]
no_license
using System; namespace LeetCode { public class RomanToIntSolution { public int RomanToInt(string s) { var result = 0; for (int i = 0, j = 1; i < s.Length;) { var intI = GetIntValue(s[i]); j = i + 1; if (j < ...
Markdown
UTF-8
11,960
3.03125
3
[]
no_license
# Laravel Advanced Nova Media Library Manage images of [spatie's media library package](https://github.com/spatie/laravel-medialibrary). Upload multiple images and order them by drag and drop. ##### Table of Contents * [Examples](#examples) * [Install](#install) * [Model media configuration](#model-media-config...
Java
UTF-8
449
2
2
[]
no_license
package com.wedo.OMS.repository; import com.wedo.OMS.entity.Resource; import com.wedo.OMS.entity.Task; import com.wedo.OMS.entity.TaskResource; import org.springframework.data.jpa.repository.JpaRepository; import java.util.List; public interface TaskResourceRepository extends JpaRepository<TaskResource, Long> { ...
Java
UTF-8
1,060
3.28125
3
[]
no_license
package e2; import java.util.HashSet; import java.util.Set; public class BasicBackpackApplication { public static void main (String[] args) { Set<String>backpack= new HashSet<>(); System.out.println("Backpack: " + backpack); String item1 = "toothpaste"; String item2 = "towel"; ...
Java
UTF-8
275
1.726563
2
[ "Apache-2.0" ]
permissive
package keisuke.count.xmldefine; /** * 言語ルール定義でScriptletブロック定義を保持するクラス */ public class ScriptBlockDefine extends AbstractBlockDefine { /** * デフォルトコンストラクター */ protected ScriptBlockDefine() { } }
Python
UTF-8
416
3.015625
3
[ "MIT" ]
permissive
from coordinates_named import geohash, Coordinate, display def test_geohash_max_precision() -> None: sao_paulo = -23.5505, -46.6339 result = geohash(Coordinate(*sao_paulo)) assert '6gyf4bf0r' == result def test_display() -> None: sao_paulo = -23.5505, -46.6339 assert display(sao_paulo) == '23.6°S,...
C++
UTF-8
1,188
3.34375
3
[]
no_license
#include<cstdio> #include<algorithm> #include<string> using namespace std; bool cmp(int a, int b){ return a > b; } int main(){ int x = 1, y = 2; //max() min() printf("%d %d\n", max(x, y), min(x, y)); //swap() swap(x,y); printf("x=%d y=%d\n", x, y); int a[10]={10, 12, 13, 14, 15}; s...
Go
UTF-8
6,701
2.84375
3
[ "MIT" ]
permissive
package gorpc import ( "fmt" "os" "reflect" "sync" ) // ServerCodec ... type ServerCodec interface { ReadHeader(Header) error ReadRequestBody(header Header, args interface{}) error WriteResponse(header Header, reply interface{}) error } type ServerContextHandler interface { GetServerContext(Header) interface...
Go
UTF-8
2,450
3.375
3
[ "MIT" ]
permissive
package snippet import ( "bytes" "errors" "testing" "github.com/stretchr/testify/assert" ) const ( snippetText = ` snippet foo alias f abbr foo ... foobar # comment snippet multiline alias m abbr multiline ... bar fuzzbuzz ` ) func TestTestShouldStringOK(t *testing.T) { const given = ` snippet fo...
C++
UTF-8
1,795
3.390625
3
[]
no_license
#include <iostream> #include <fstream> #include "Maltsev_Container.h" using namespace std; void menu() { cout << endl; cout << "1. добавить элемент" << endl; cout << "2. вывести список" << endl; cout << "3. вывести список из файла" << endl; cout << "4. вывести список в файл" << endl; cout << "...
C#
UTF-8
2,988
3.1875
3
[]
no_license
using System; using Mono.Cecil.Cil; using System.Collections.Generic; namespace LinearIr { /// <summary> /// Static Extension class for Cecil Instruction Objects. /// </summary> public static class InstructionExtensions { /// <summary> /// Checks if an instruction changes control flow. //...
Java
UTF-8
3,182
3.140625
3
[]
no_license
package com.example.demo.java8.steam.comparator; import com.google.common.base.Function; import org.apache.tomcat.jni.Address; import org.junit.Test; import java.util.*; import java.util.stream.Collectors; /** * created by zhenzhong on 2020/4/6 * https://blog.csdn.net/aitangyong/article/details/54880228 */ public...
Java
UTF-8
2,426
2.109375
2
[]
no_license
package g3dtest; import g3dtest.game.GamePanel; import g3dtest.simple.SimplePanel; import org.mini.gui.*; import org.mini.gui.event.GSizeChangeListener; import org.mini.layout.UITemplate; import org.mini.layout.XContainer; import org.mini.layout.XForm; /** * @author gust */ public class G3d extends GApplication { ...
Markdown
UTF-8
330
3.390625
3
[ "MIT" ]
permissive
# 78. Subsets > Medium ------ Given an integer array `nums`, return all possible subsets (the power set). Note that the solution set must not contain duplicate subsets. **Example 1:** ``` Input: nums = [1,2,3] Output: [[],[1],[2],[1,2],[3],[1,3],[2,3],[1,2,3]] ``` **Example 2:** ``` Input: nums = [0] Output: [[...
Java
UTF-8
1,382
2.5625
3
[ "MIT" ]
permissive
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package com.dmdirc.util.annotations.observable; import static org.junit.Assert.assertEquals; import org.junit.Test; public class Obs...
Java
UTF-8
5,738
2.515625
3
[]
no_license
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package jcanpoll; import java.sql.*; import java.util.ArrayList; import java.util.Collections; import java.io.BufferedReader; import j...
C++
UTF-8
1,539
2.65625
3
[ "BSD-3-Clause" ]
permissive
#include "Enemy.h" #include "Player.h" #include <cmath> Enemy::Enemy(Level* level, const std::string& mediaPath, irr::core::vector3df position, irr::core::vector3df rotation, int id, EnemyInfo info): Entity(level, mediaPath, position, rotation, id), Damageable(info.health, info.damage), aggroRange(info.aggroRange), sta...
Java
UTF-8
4,301
2.546875
3
[ "MIT" ]
permissive
package il.org.spartan.spartanizer.engine; import static il.org.spartan.azzert.*; import static il.org.spartan.spartanizer.engine.into.*; import org.junit.*; import org.junit.runners.*; import il.org.spartan.*; @FixMethodOrder(MethodSorters.NAME_ASCENDING) @SuppressWarnings({ "javadoc", "static-method" }) public fi...
PHP
UTF-8
2,700
3.015625
3
[ "BSD-3-Clause" ]
permissive
<?php /* * OPEN POWER LIBS <http://www.invenzzia.org> * * This file is subject to the new BSD license that is bundled * with this package in the file LICENSE. It is also available through * WWW at this URL: <http://www.invenzzia.org/license/new-bsd> * * Copyright (c) Invenzzia Group <http://www.invenzzia.org> ...
Markdown
UTF-8
629
2.859375
3
[]
no_license
# Human-Activity-Classification Using a variety of supervised learning algorithms to classify user activity based on smartphone gyroscope and accelerometer data. ## Data [Dataset from Kaggle](https://www.kaggle.com/uciml/human-activity-recognition-with-smartphones) ### Activity Categories: #### Moving: - Walking ...
Markdown
UTF-8
2,236
3.921875
4
[]
no_license
## Why Python emoji length is different than Java? ### Background Recently I built a text processing API for a working project. The API is called in Java and runs on Python. Later, I encountered a bug that caused by offset difference that processed text in Python and used the result on Java. 💩 ### Reproduce the Pr...
Java
UTF-8
705
3.09375
3
[]
no_license
package com.udemy.injection.annotations.java_based.qualifier; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; public class Student { private String name; @Autowired @Qualifier(value = "2") private Address address; pub...
Java
UTF-8
4,812
2.328125
2
[]
no_license
package com.example.android.chaoshi.adapter; import android.content.Context; import android.content.Intent; import android.view.LayoutInflater; import android.view.View; import android.view.View.OnClickListener; import android.view.ViewGroup; import android.widget.BaseAdapter; import android.widget.CompoundButton; imp...
C
UTF-8
1,118
2.984375
3
[]
no_license
/* ID: jitenmt1 LANG: C PROG: milk2 */ #include <stdio.h> int main() { FILE* in=fopen("milk2.in", "r"); FILE* out=fopen("milk2.out", "w"); unsigned int time[1000000]={0}; int N,i,very_start,very_end; fscanf(in, "%d", &N); int start, end; for(i=0; i<N; i++) { fscanf(in, "%d %d", &start, &en...
Markdown
UTF-8
6,069
2.9375
3
[ "CC-BY-4.0", "MIT" ]
permissive
--- title: 將 V2 Azure IoT Central 應用程式遷移至 V3 |Microsoft Docs description: 以系統管理員身分,瞭解如何將 V2 Azure IoT Central 應用程式遷移至 V3 author: troyhopwood ms.author: troyhop ms.date: 01/18/2021 ms.topic: conceptual ms.service: iot-central services: iot-central ms.openlocfilehash: 3f81ae72af48ec934d1c2c2567ebdd212d8e0499 ms.sourcegit...
Markdown
UTF-8
768
2.625
3
[]
no_license
--- title: nuxt中每个页面引入sass全局变量和mxins date: 2019-07-03 14:13:34 tags: nuxt --- 在页面中经常用到一些常用的变量和mixins,避免每个页面都要导入,可以使用@nuxtjs/style-resources > 可参考nuxt官方文档 https://zh.nuxtjs.org/api/configuration-build/#styleresources ## 配置 - 安装@nuxtjs/style-resources模块 ```bash npm install @nuxtjs/style-resources --save-dev ``` - 修改nu...
JavaScript
UTF-8
7,434
2.671875
3
[]
no_license
const menus = [ {id: 1, name: 'USERS', icon:'./public/img/icon1.png'}, {id: 2, name: 'LINKS', icon:'./public/img/icon2.png'}, {id: 3, name: 'COLLECTIONS', icon:'./public/img/icon3.png'}, ]; class User extends React.Component { render() { ret...
Java
UTF-8
575
1.96875
2
[]
no_license
package com.eight.group.vo; import com.eight.group.pojo.Order; import lombok.Getter; import lombok.Setter; import lombok.ToString; import java.sql.Date; /** * @author:xingquanxiang createTime:2019/11/13 20:27 * description: */ @Setter @Getter @ToString public class OrderVO extends Order { private String memb...
Java
UTF-8
659
2.71875
3
[]
no_license
package com.gToons.api.game.effects; import com.gToons.api.model.Card; import com.gToons.api.game.Location; import java.util.ArrayList; public class LastCardPlayed extends Effect { LastCardPlayed(int v, boolean m, String attr[]){ super(v,m,attr); } public Effect copy(){ LastCardPlayed ef...
Python
UTF-8
1,700
2.984375
3
[]
no_license
# -*- coding: utf-8 -*- """ Created on Sat Sep 19 13:00:48 2020 Task 2 - textCNN Model @author: apple """ import torch import torch.nn as nn import torch.nn.functional as F class textCNN(nn.Module): def __init__(self,vocab_size,vocab_dim,kernel_num,kernel_list,class_num,dropout_rate,embedding_matrix): ...
Java
UTF-8
1,210
2.265625
2
[]
no_license
package be.haexnet.fusio.processor; import be.haexnet.fusio.data.simplechilorigintargetnullable.OriginData; import be.haexnet.fusio.data.simplechilorigintargetnullable.TargetData; import be.haexnet.fusio.data.simplechilorigintargetnullable.TargetDataElement; import org.junit.Test; import static org.fest.assertions.ap...
Java
UTF-8
1,124
2.0625
2
[]
no_license
package org.macula.cloud.gateway.route; import org.macula.cloud.core.domain.GatewayRoute; import org.macula.cloud.gateway.event.GatewayRouteChangeEvent; import org.macula.cloud.gateway.util.GatewayRouteUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.ApplicationL...
Java
UTF-8
380
2.046875
2
[]
no_license
package testrenicredit.pages; import org.openqa.selenium.WebElement; import org.openqa.selenium.support.FindBy; public class MainPage extends BasePage { @FindBy(xpath = "//div[@class='service__title']//a[@href='/contributions/']") private WebElement contributionsElement; public void goToContributionsPage...
JavaScript
UTF-8
843
2.984375
3
[]
no_license
import React, { Component } from 'react' class Counter extends Component { render () { return ( <p> Clicked: {this.props.counter} times <button onClick={ e => this.eventAdd(e) } >+</button> <button on...
Go
UTF-8
1,154
4.125
4
[]
no_license
package main import "fmt" /** 题目: 给定一个数组,它的第 i 个元素是一支给定股票第 i 天的价格。 如果你最多只允许完成一笔交易(即买入和卖出一支股票),设计一个算法来计算你所能获取的最大利润。 注意你不能在买入股票前卖出股票。 示例 1: 输入: [7,1,5,3,6,4] 输出: 5 解释: 在第 2 天(股票价格 = 1)的时候买入,在第 5 天(股票价格 = 6)的时候卖出,最大利润 = 6-1 = 5 。 注意利润不能是 7-1 = 6, 因为卖出价格需要大于买入价格。 示例 2: 输入: [7,6,4,3,1] 输出: 0 解释: 在这种情况下, 没有交易完成, 所...
JavaScript
UTF-8
6,166
2.546875
3
[]
no_license
// ------------------------------------------------- // CJKnob V0.1.1 // STARTED DATE 19-06-2013 || END DATE 00-07-2013 // UPDATED DATE 30-06-2022 - Fixed bug // https://github.com/tanghoong/cj-knob // ------------------------------------------------- (function ($) { $.fn.extend({ cjknob: function (obj) { var d...
Swift
UTF-8
845
2.65625
3
[]
no_license
// // RNDemoView.swift // RNBridgeDemo // // Created by admin on 2018/10/23. // Copyright © 2018年 paradise. All rights reserved. // import Foundation import UIKit @objc(RNView) class RNView: UIView { @objc var txt: String = "嘿嘿" @objc(someAction) var someAction: (([String: Any])->Void)? { ...
JavaScript
UTF-8
805
2.546875
3
[ "LGPL-2.1-or-later", "MIT", "BSD-3-Clause", "Apache-2.0" ]
permissive
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. // The input binding executes the `select * from Products where Cost = @Cost` query, returning the result as json object in the body. // The *parameters* argument...
C#
UTF-8
851
2.640625
3
[]
no_license
public static class IgnoreReadOnlyExtensions { public static IMappingExpression<TSource, TDestination> IgnoreReadOnly<TSource, TDestination>( this IMappingExpression<TSource, TDestination> expression) { var destType = typeof(TDestination); ...
Java
UTF-8
9,418
2.390625
2
[]
no_license
package com.bot.KaworiSpring.web.controller; import java.util.ArrayList; import java.util.Date; import java.util.List; import com.bot.KaworiSpring.model.Guilda; import com.bot.KaworiSpring.model.Membro; import com.bot.KaworiSpring.service.GuildaService; import com.bot.KaworiSpring.service.MembroService; import org.s...
Markdown
UTF-8
6,190
2.515625
3
[ "Unlicense" ]
permissive
# Color-space [![test](https://github.com/colorjs/color-space/actions/workflows/test.yml/badge.svg)](https://github.com/colorjs/color-space/actions/workflows/test.yml) [![stable](https://img.shields.io/badge/stability-stable-brightgreen.svg)](http://github.com/badges/stability-badges) [![npm](https://img.shields.io/npm...
PHP
UTF-8
820
2.609375
3
[]
no_license
<?php namespace App\Models\Admin; use Core\Model; class Slider extends Model { protected $table = 'sliders'; public function create($data) { return $this->insertArray($data, $this->table); } public function get() { $sql = "SELECT * FROM $this->table "; return $this->...
Java
UTF-8
710
2.96875
3
[]
no_license
package com.src; import java.util.Scanner; public class Main { public static void main(String[] args) { // TODO Auto-generated method stub Scanner sc=new Scanner(System.in); int choice; System.out.println("enter your choice: "); do { StudentSampleData.doList(); choice=sc.nextI...
Markdown
UTF-8
696
2.765625
3
[]
no_license
# Learning Objectives At the end of this project, you are expected to be able to explain to anyone, without the help of Google: - Immutable objects. Who, what, when, where, and why? - How to use the Immutable.js library to bring immutability to Javascript - The differences between List and Map - How to use Merge, Conca...
SQL
UTF-8
1,372
3.078125
3
[ "CC0-1.0" ]
permissive
-- TransactionObligatedAmount required on rows that do not include values for USSGL accounts balances or subtotals SELECT row_number, transaction_obligated_amou FROM award_financial WHERE submission_id = {0} AND transaction_obligated_amou IS NULL AND COALESCE(ussgl480100_undelivered_or_cpe, 0) = 0 AND COALE...
Python
UTF-8
783
2.53125
3
[]
no_license
# this is a test file, to test how spacy tokeniser performs import json,ndjson, spacy with open(r'C:\Users\spenc\OneDrive - The University of Auckland\Study\UoA\Project\OCR - Sample of the Sample\OCR - Sample of the Sample\ocr-metadata.ndjson') as f: data = ndjson.load(f) jsonFormat = json.loads(json.dumps(dat...
Markdown
UTF-8
5,214
2.703125
3
[ "MIT" ]
permissive
# chronic *adjective*: from Greek *khronikos* ‘of time,’ from *khronos* ‘time.’ [![NPM](https://nodei.co/npm/chronic.png)](https://nodei.co/npm/chronic/) [![Build Status](https://travis-ci.org/RnbWd/chronic.svg?branch=master)](https://travis-ci.org/RnbWd/chronic) [![Dependency Status](https://img.shields.io/david/rn...
C++
UTF-8
4,912
2.75
3
[ "BSD-3-Clause" ]
permissive
#include <QJsonObject> #include <QJsonArray> #include <QJsonValue> #include "wirenet.h" #include "wire.h" #include "label.h" #include "itemfactory.h" using namespace QSchematic; WireNet::WireNet(QObject* parent) : QObject(parent) { // Label _label = std::make_shared<Label>(); _label->setPos(0, 0); ...
Python
UTF-8
2,713
2.984375
3
[]
no_license
class Client: def __init__(self, id_client, nume, cnp, inchirieri): self.__id_client = id_client self.__nume = nume self.__cnp = cnp self.__inchirieri = inchirieri def get_id(self): return self.__id_client def get_nume(self): return self.__nume ...
Java
UTF-8
238
1.710938
2
[ "Apache-2.0" ]
permissive
package commons.boot.upload; import lombok.Data; import java.io.Serializable; @Data public class ChangeUploadFileMaxSize implements Serializable { private Long maxFileSize = 500L; private Long maxRequestSize = 500L; }
Java
UTF-8
479
1.882813
2
[]
no_license
package app.lucidalarm2; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.util.Log; public class FinalAlarmBroadcastReceiver extends BroadcastReceiver { @Override public void onReceive(Context context, Intent arg1) { Log.d("graw", "Fin...
C
UTF-8
273
3.21875
3
[]
no_license
#include <stdio.h> //Факториал. Для целого числа k(0≤k≤12) посчитать k!. int main() { int k, counter=1; scanf("%d", &k); for (int i = 1; i <= k; i++) { counter = counter * i; } printf("%d\n", counter); return 0; }
JavaScript
UTF-8
449
3.015625
3
[]
no_license
export function objectSize(obj) { var size = 0, key; for (key in obj) { if (obj.hasOwnProperty(key)) size++; } return size; } export function objectHasValue(obj, value) { if (Object.values(obj).indexOf(value) > -1) { return true; } else return false; } export function cleanObject(obj) { for ...
Python
UTF-8
1,350
2.640625
3
[]
no_license
import numpy as np import pandas as pd import matplotlib.pyplot as plt # Importing Dataset dataset = pd.read_csv('dataset2.csv') X = dataset.iloc[:, 1:27].values y = dataset.iloc[:, 27].values # Splitting the dataset into Training Set and Testing Set from sklearn.model_selection import train_test_split X_train, X_test,...
TypeScript
UTF-8
3,328
2.8125
3
[ "MIT" ]
permissive
import { Context, Middleware } from '@curveball/core'; import highlight from 'highlight.js'; /** * Options that may be passed to the middleware. */ type Options = { title?: string stylesheets?: string[] }; /** * Options after clean-up. * * Basically the same but nothing is optional. */ type SureOptions = { ...
TypeScript
UTF-8
3,047
2.515625
3
[]
no_license
import { Monster } from './monster'; export const MONSTERS: Monster[] = [ { id: 11, name: "Goblin", ac: 12, size: "Medium", type: "humonoid", alignment: "choatic evil", hitPointAvg: 7, hitDice: "1d6 +2", speed: 30, str: 20, dex: 10, con: 10, int: 5, wis: 6, cha: 4, cr: 0.25, xp: 100 }, { id: 12, name: "Goblin ...
Markdown
UTF-8
2,082
3.015625
3
[]
no_license
## Activity API This API uses Google DataStore as storage, there is not local storage on Heroku or Postgress. We need Google DataStore because we plan to store hugh amounts of activities that the user can do inside breathecode. Possible activities (so far): ``` "breathecode_login" //every time it logs in "online_pla...