language
stringclasses
15 values
src_encoding
stringclasses
34 values
length_bytes
int64
6
7.85M
score
float64
1.5
5.69
int_score
int64
2
5
detected_licenses
listlengths
0
160
license_type
stringclasses
2 values
text
stringlengths
9
7.85M
Java
UTF-8
2,950
2.921875
3
[]
no_license
package com.example.demo.config; import java.text.DateFormat; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.Date; import java.util.TimeZone; public class Helper { //private String startDate = "2019-03-15 02:00:00"; //private String endDate = "2...
C++
UTF-8
5,381
3.265625
3
[ "BSD-3-Clause" ]
permissive
// Copyright 2017 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef COMPONENTS_ZUCCHINI_ALGORITHM_H_ #define COMPONENTS_ZUCCHINI_ALGORITHM_H_ #include <stddef.h> #include <algorithm> #include <deque> #include <type_traits> #include <v...
Markdown
UTF-8
5,976
2.59375
3
[]
no_license
--- title: 'New Year: What does 2013 have in store?' date: Tue, 01 Jan 2013 23:30:46 +0000 draft: false tags: [2013, Life, Year In Review] --- ![Ganesh 2013](http://gerard.interwebworld.co.uk/files/2013/01/ganesh.jpg) There are some folks who believe that January 1st is "just another day". What's the big deal? It's th...
Java
UTF-8
678
2.921875
3
[]
no_license
package com.dmpj.utils; import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.Date; /** * 时间工具类 * * @Author: Jeremy * @Date: 2018/9/6 10:05 */ public class TimeUtil { public static Date yearMonthDay(int year, int month, int day) { Calendar calendar = Calendar.getInstance(); ...
Java
UTF-8
2,310
2.09375
2
[ "Apache-2.0" ]
permissive
package it.finsiel.siged.mvc.presentation.tag; import it.finsiel.siged.constant.Constants; import it.finsiel.siged.model.organizzazione.Menu; import it.finsiel.siged.model.organizzazione.Utente; import it.finsiel.siged.mvc.business.MenuDelegate; import it.finsiel.siged.mvc.vo.organizzazione.MenuVO; import java.io.IOE...
Java
UTF-8
1,329
1.9375
2
[]
no_license
package com.cash.flow.activity.base; import android.content.Intent; import android.os.Bundle; import android.view.Window; import com.cash.flow.MyActivity; import com.cash.flow.R; import com.cash.flow.anotation.InitActivity; @InitActivity(withActionBar=false) public abstract class BaseCashFlowNoActionBarAc...
C++
UTF-8
889
3.265625
3
[]
no_license
// // Created by andrews on 01.07.21. // #include "PTriple.h" #include "gcd.h" PTriple::PTriple(long m, long n) { a = 2*m*n; b = m*m - n*n; c = m*m + n*n; reduce(); } void PTriple::reduce() { // Nothing to do if a=b=c=0 if ((a==0) && (b==0) && (c==0)) return; // Make sure a,b are nonnegative (c mus...
Python
UTF-8
3,064
3.296875
3
[ "MIT" ]
permissive
# -*- coding: utf-8 -*- import numpy as np import re def dict_merge(dct, merge_dct): """ Recursive dict merge. Inspired by :meth:``dict.update()``, instead of updating only top-level keys, dict_merge recurses down into dicts nested to an arbitrary depth, updating keys. The ``merge_dct`` is merged into ...
PHP
UTF-8
9,355
2.53125
3
[ "MIT" ]
permissive
<?php defined('__ROOT__') OR define('__ROOT__', dirname(dirname(__FILE__))); require_once(__ROOT__.'/models/BaseTable_model.php'); require_once(__ROOT__.'/models/Property_JsonModel.php'); require_once(__ROOT__.'/models/Gallery_model.php'); require_once(__ROOT__.'/models/PropertyFeature_model.php'); require_once(_...
Python
UTF-8
1,175
2.5625
3
[ "MIT" ]
permissive
from aiosparql.client import SPARQLClient from typing import Union from models.types import sparql_bindings class QueryService(): """ Base class used for querying SPARQL endpoints. Uses the aiosparql SPARQLClient to support sending async requests. """ _user_agent = "KG-Enricher" _headers = {'...
C#
UTF-8
1,034
2.65625
3
[]
no_license
using System; using System.IO; using System.Threading.Tasks; using McMaster.Extensions.CommandLineUtils; using Microsoft.Extensions.Logging; using Steamworks; namespace KP_Steam_Uploader.Command { public abstract class AbstractKpSteamCommand { protected ILogger Logger; protected IConsole Consol...
Shell
UTF-8
277
2.5625
3
[ "BSD-3-Clause" ]
permissive
#!/bin/bash set -e # Note that these run on Browsersrtack and so need the BROWSERSTACK* # credentials in the ENV. pushd $HOME git clone https://github.com/hotosm/oam-browser.git cd oam-browser git checkout $FRONTEND_VERSION npm install ./test/integration/run.sh chrome popd
JavaScript
UTF-8
232
2.84375
3
[]
no_license
// var dic={ // name:"Shikha", // age:23, // course:"Python", // friend:"Mhi" // } // for (n in dic){ // console.log(n+":"+dic[n]) // } var dic=["name","shikha","singh"] for (i in dic){ console.log(dic[i]) }
Markdown
UTF-8
18,468
3.421875
3
[]
no_license
# 11 | 程序中的错误处理:错误返回码和异常捕捉 陈皓 2017-11-07 ![img](https://static001.geekbang.org/resource/image/eb/0b/eb55c870fed9876dc5f25ecc20c37d0b.jpg) ![img](data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAABCAYAAACc0f2yAAAAJElEQVQYV2N89+7dfwYoEBQUBLPev3/PgItNilpkM0jRR45aAIuKKsuWZYEJAAAAAElFTkSuQmCC) 今天,我们来讨论一下程序中的错误处理。也许你会...
Markdown
UTF-8
6,048
3.375
3
[]
no_license
# koa简介 koa是Express的下一代基于Node.js的web框架,目前有1.x和2.0两个版本。 ## 历史 ## 1. Express Express是第一代最流行的web框架,它对Node.js的http进行了封装,用起来如下: ```js var express = require('express'); var app = express(); app.get('/', function (req, res) { res.send('Hello World!'); }); app.listen(3000, function () { console.log('Example app ...
Python
UTF-8
415
2.734375
3
[]
no_license
''' @Author: Rashmi @Date: 2021-09-26 3:35 @Last Modified by: Rashmi @Last Modified time: 2021-09-26 3:37 @Title : Write a Python program to get the current value of the recursion limit ''' import sys if __name__ == '__main__': '''Description :to get current value of the recursion limit using getrecursionlimi...
Python
UTF-8
1,852
2.71875
3
[]
no_license
from unittest import TestCase from unittest.mock import MagicMock from redis import Redis from winzig.utils import RedisCache class RedisCacheTestCase(TestCase): def setUp(self): redis = Redis('redis.local') redis.flushdb() def get_conn_config(self, cache, key): return cache.redis.c...
Python
UTF-8
3,363
4.21875
4
[]
no_license
## 파이썬 심화형 연습문제 # Q1 다음은 Calculator 클래스이다. class Calculator: def __init__(self): self.value = 0 def add(self, val): self.value += val # 위 클래스를 상속하는 UpgradeCalculator를 만들고 값을 뺄 수 있는 minus 메서드를 추가해보자. # 즉 다음과 같이 동작 하는 클래스를 만들어야 한다. class UpgradeCalculator(Calculator): def minus(self, val):...
Java
UTF-8
681
2.671875
3
[]
no_license
package DesignPattern.FacadePattern; public class ConfigManager { private ConfigDao configDao; private ConfigModel configModel; public ConfigManager(){ init(); } /** * 加载 */ public void init(){ configDao = new ConfigStuDao(); configModel = new ConfigStuModel();...
Python
UTF-8
270
3.09375
3
[]
no_license
import numpy as np from sklearn.metrics.pairwise import pairwise_distances values = range(1, 11) n_array = np.array((1, 10)) for index in values: n_array[0][index - 1] = index distance_result = pairwise_distances(n_array, metric='cosine') print(distance_result)
Markdown
UTF-8
647
2.515625
3
[ "MIT" ]
permissive
# osgi-minimal-bundle-test A test project for trying to create a osgi bundle so that I can learn to use the OSGI framework This repository was made in order to recieve help on [this Stack Overflow question](https://stackoverflow.com/questions/56009782/why-am-i-getting-a-bundleexception-when-starting-my-minimal-example...
Markdown
UTF-8
634
3.421875
3
[]
no_license
# Anagram An anagram is a word or phrase that is formed when two words or phrases, when rearranged, are found to contain the same letters. For example, "Astronaut" and "Unto a star" are anagrams of each other. I took this on as a programming challenge using simple code. ### Here is a snippet of the code ![AnagramCod...
Markdown
UTF-8
2,049
2.84375
3
[]
no_license
# DrupalTutor Development Environment ## Installing 1. [Install VirtualBox](https://www.virtualbox.org/). 2. [Install Vagrant](https://www.vagrantup.com/). 3. [Download this repository](https://github.com/drupaltutor/devstack/archive/master.zip), and unpack it on your computer. 4. From the command line, change direct...
C#
UTF-8
1,314
3.84375
4
[]
no_license
using System; using System.Collections.Generic; using System.Linq; public class GraphConnectedComponents { private static new List<int>[] graph; private static bool[] visited; public static void Main() { graph = ReadGraph(); FindAllConnectedComponents(); } static void DFS(i...
SQL
UTF-8
2,950
3.90625
4
[ "MIT" ]
permissive
-- ----------------------------------------------------- -- Schema AGENDAMLGR -- ----------------------------------------------------- -- ----------------------------------------------------- -- Table AGENDAMLGR.Evento -- ----------------------------------------------------- CREATE TABLE Evento ( id INT NOT NULL GENE...
Markdown
UTF-8
11,419
2.8125
3
[ "Apache-2.0" ]
permissive
# Swagger\Client\GroupServiceApi All URIs are relative to *http://localhost:5080/openmeetings/services* Method | HTTP request | Description ------------- | ------------- | ------------- [**add1**](GroupServiceApi.md#add1) | **POST** /group | [**addRoom**](GroupServiceApi.md#addroom) | **POST** /group/{id}/rooms/add/...
Java
UTF-8
7,461
2.25
2
[]
no_license
package org.labkey.test.components.ui; import org.labkey.test.Locator; import org.labkey.test.components.Component; import org.labkey.test.components.WebDriverComponent; import org.labkey.test.components.glassLibrary.components.ReactSelect; import org.labkey.test.components.glassLibrary.grids.EditableGrid; import org....
Markdown
UTF-8
3,982
3.9375
4
[]
no_license
# 正则表达式 正则表达式用于定义一些字符串的规则。 - 创建一个正则表达式的对象,语法: ```js var 变量 = new RegExp('正则表达式','匹配模式') ``` - 第二个参数可以是: 1. `i`:忽略大小写 2. `g`:全局匹配模式 - `test()`:用来检查一个字符串是否复合正则表达式的规则,如果符合返回`true`,否则返回`false` ```js var reg = new RegExp('a') //检测字符串中是否含有a var str = 'a' var res = reg.test(str) //true ``` ## ...
C#
UTF-8
1,033
2.84375
3
[ "MIT" ]
permissive
using System; namespace CSharpMongoMigrations { /// <summary> /// Mark specified class as a migration. Used to discover migrations in the target assembly. /// </summary> public class MigrationAttribute : Attribute { public MigrationAttribute(long version, string description = null) ...
TypeScript
UTF-8
1,768
4.5
4
[ "Apache-2.0" ]
permissive
//boolean let isDone: boolean = false; //Numbers let decimal: number = 6; let hex: number = 0xf00d; let binary: number = 0b1010; let octal: number = 0o744; //String let color: string = "blue"; color = 'red'; //template strings let fullName: string = `Bob Bobbington`; let age: number = 37; let sentence: string = `Hel...
PHP
UTF-8
1,140
2.984375
3
[]
no_license
<?php declare(strict_types=1); namespace App; final class Config { private static $instance = null; public static $data; /** * gets the instance via lazy initialization (created on first usage) */ public static function getInstance() { if (static::$instance === null) { ...
Java
UTF-8
17,461
1.929688
2
[]
no_license
package com.example.projetotrinsheira; import android.content.Context; import android.content.Intent; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.util.Base64; import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; ...
Shell
UTF-8
393
2.53125
3
[]
no_license
#!/bin/bash #This is a placeholder script that will be uploaded to the /opt/mapr/ directory of the VM. #This is where you may place functionality that needs to be executed each time the VM boots. #This script won't be called by default. You choose whether and how this script gets called #by modifying /scripts/partn...
Python
UTF-8
1,224
2.609375
3
[ "Apache-2.0" ]
permissive
# -*- coding: utf-8 -*- import scrapy from crawl_engine.items import CrawlEngineItem class ManeuverspiderSpider(scrapy.Spider): name = 'ManeuverSpider' allowed_domains = ['amazon.com'] start_urls = ['http://amazon.com/'] # Use working product URL below start_urls = [ "http://www.amazon.co...
C++
UTF-8
545
2.65625
3
[]
no_license
#pragma once class Unit; class Building; class Tower; class Fence; struct GameObject { virtual ~GameObject() = default; virtual bool Collide( const GameObject& that ) const = 0; virtual bool CollideWith( const Unit& that ) const = 0; virtual bool CollideWith( const Building...
Java
UTF-8
950
3.546875
4
[]
no_license
approach 1: Iterative public List<Integer> preorder(Node root) { Deque<Node> stk = new ArrayDeque<Node>(); List<Integer> preorder = new LinkedList<Integer>(); if(root == null) { return preorder; } stk.push(root); while(!stk.isEmpty()) { ...
Java
UTF-8
2,168
2.265625
2
[]
no_license
package com.nus.iss.model; import java.util.Date; import javax.persistence.Entity; import javax.persistence.Id; import javax.persistence.Table; import javax.persistence.Temporal; import javax.persistence.TemporalType; import org.springframework.format.annotation.DateTimeFormat; @Entity @Table(name = "l...
Java
UTF-8
4,482
2.5
2
[]
no_license
package org.scub.foundation.incubator.framework.base.test; import java.util.ArrayList; import java.util.List; import org.junit.Before; import org.junit.Test; import org.scub.foundation.incubator.framework.base.test.dto.Contact; import org.scub.foundation.incubator.framework.base.test.dto.Person; import org.scub.found...
Python
UTF-8
660
2.78125
3
[]
no_license
import sys, itertools, re print(sys.version_info) print(sys.version) a = ["manish", "kiran", "devang", "garbage"] b = ["jain", "jain", "jain"] for fn, ln in itertools.zip_longest(a, b): if ln is None: print(f'{fn} does not have last name') else: print(fn, ln) file = 'C:\cygwin64\home\MANISHK...
C++
UTF-8
1,034
2.6875
3
[]
no_license
#include "OdiebotnetClient.h" #include "OdiebotnetConfig.h" // Used to give meaningful serial output // Serial MUST be initialized before odieBotnet is connected or used #define DEBUGGING true OdiebotnetClient odieBotnetDevice( WIFI_SSID, WIFI_PASSWORD ); WebSocketsClient socket; void eventHandler(WStype_t type, uin...
SQL
UTF-8
353
3.84375
4
[ "MIT" ]
permissive
SELECT FirstName, Age, PhoneNumber FROM Customers WHERE Id IN (SELECT c.Id FROM Customers AS c WHERE c.FirstName LIKE '%an%' AND c.Age >= 21) OR Id IN (SELECT coc.Id FROM Customers AS coc JOIN Countries AS cc ON cc.Id = coc.CountryId WHERE coc.PhoneNumber LIKE '%38' AND cc.[Name] <> 'Greec...
Java
UTF-8
2,781
2.453125
2
[]
no_license
package com.exel.apiserver.api; import com.exel.apiserver.data.db.Row; import com.exel.apiserver.data.db.RowRepository; import com.exel.apiserver.data.db.Spreadsheet; import com.exel.apiserver.data.db.SpreadsheetRepository; import com.exel.apiserver.exceptions.ApiInternalException; import org.springframework.beans.fac...
Python
UTF-8
3,613
3.109375
3
[]
no_license
# [Theme of analysis] # Does wOBA reflect the level of salary? import numpy as np import pandas as pd import matplotlib.pyplot as plt master = pd.read_csv('./lahman-csv_2015-01-24/Master.csv') batting = pd.read_csv('./lahman-csv_2015-01-24/Batting.csv') pitching = pd.read_csv('./lahman-csv_2015-01-24/Pitching.csv') sa...
Java
UTF-8
3,617
1.992188
2
[]
no_license
package storm.commonlib.common.base; import android.app.Activity; import android.content.Intent; import android.os.Bundle; import android.support.v4.app.Fragment; import android.util.Log; import android.view.View; import android.widget.AdapterView; import android.widget.ListView; import com.umeng.analytics.MobclickA...
Java
UTF-8
1,042
2.234375
2
[]
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 ec.edu.espe.services; import ec.edu.espe.dao.PadreDAO; import ec.edu.espe.model.Padre; import java.util.ArrayList; import java...
PHP
UTF-8
3,531
2.75
3
[]
no_license
<?php declare(strict_types=1); namespace Pulse\Controllers; use Pulse\Models\AccountSession\Account; use Pulse\Models\AccountSession\AccountFactory; use Pulse\Models\Doctor\Doctor; use Pulse\Models\Exceptions\AccountNotExistException; use Pulse\Models\Exceptions\AccountRejectedException; use Pulse\Models\Exceptions\I...
Markdown
UTF-8
1,054
2.8125
3
[]
no_license
- Autenticación - GET /auth (va a recibir email y password) - /auth?email=pepe@pepo.com&password=test - los querystring llegan en req.query - va a buscar en la base si coinciden y va a generar un token, lo va a guardar en la base y lo va a devolver - npm install token-generator - npm install random-token - Al...
Java
UTF-8
3,960
1.9375
2
[]
no_license
package com.sjzl.york.intercepter; import com.alibaba.fastjson.JSON; import com.sjzl.york.core.model.AppSysErrorCode; import com.sjzl.york.core.model.RequestResult; import com.sjzl.york.context.UserContext; import com.sjzl.york.model.user.PcUser; import com.sjzl.york.service.user.IUserService; import com.sjzl.york.uti...
JavaScript
UTF-8
2,062
3.484375
3
[]
no_license
let btnEpisodios = document.getElementById('btn-episodios'); btnEpisodios.addEventListener("click", mostrarEpisodios, false); function mostrarEpisodios() { getEpisodios("https://rickandmortyapi.com/api/episode", episodios) } /* Episodios -----------------------*/ function getEpisodios(url, callback) { var xh...
C++
UTF-8
1,704
3.84375
4
[]
no_license
// Imani White // //1. Open the file // Make sure the file can open //2. Read the file and fill the array // Use a for loop to do both //3. Get rid of the vowels in the middle of the word // Isolate the vowels at the beginning of words to make sure those dont go too. I decided to make the uppercase //4. Outp...
Java
WINDOWS-1250
3,772
2.953125
3
[]
no_license
package diagnostico; import java.awt.BorderLayout; import java.awt.Color; import java.awt.Component; import java.awt.Font; import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.GridLayout; import java.awt.Image; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax.swi...
C++
UTF-8
2,812
2.5625
3
[]
no_license
#include "Ajedrez.h" Ajedrez::Ciclo::Ciclo() { _finalizo = false; _manejadorClick = new Grafica::ManejadorClick(); // Creo pantalla _pantalla = new Grafica::Pantalla("Ajedrez - Grupo 6", 800, 600); // Creo menu _menu = new Ajedrez::Menu(580, 0); // Creo tablero _tablero = new Ajedrez::Tablero(30, 40); //...
C#
UTF-8
5,012
2.5625
3
[]
no_license
using System; using Microsoft.Extensions.DependencyInjection; using Microsoft.EntityFrameworkCore; using events_planner.Models; using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Authorization; using System.Linq; using events_planner.Services; using System.Threading.Tasks; namespace events_planner.Controllers...
C++
UTF-8
2,165
3.53125
4
[ "MIT" ]
permissive
/* #面试刷题# 第0051期 #Leetcode# Q1296 将数组划分为K个连续数的集合 难度:中 给定整数nums和正整数k的数组,请确定是否有可能将此数组划分为k个连续数字的集合 如果可能返回True,否则返回False。 约束条件: (a) 1 <= nums.length <= 10^5 (b) 1 <= nums[i] <= 10^9 (c) 1 <= k <= nums.length 例1: Input: nums = [1,2,3,3,4,4,5,6], k = 4 Output: true Explanation: Array can be divided into [1,2,3,4] and [3,4,5...
Python
UTF-8
122
2.65625
3
[]
no_license
import re x="email address are abc@gmail.com,qyx@hotmail.com,mnc@yahoo.com" res=re.findall(r"[\w\.-]+@[\w\.-]+",x) #for i in res: print(res)
JavaScript
UTF-8
623
3.015625
3
[]
no_license
import react from 'react' import reactDOM from 'react-dom' import { union as junction, uniq as single } from 'ramda' import sum, { subtraction, multiplication, div as division } from './utils' const firstArray = [1, 1, 1, 2, 2, 3, 4, 5, 6, 6] const secondArray = [5, 6, 6, 6, 7, 7, 8, 9, 10, 1] const thirdArray = junct...
PHP
UTF-8
917
2.671875
3
[]
no_license
<?php class Blackbox_Models_Reference_RuleClass extends Blackbox_Models_Reference_Model { public static function getBy(array $where_args, array $override_dbs = NULL) { $query = "SELECT * FROM rule_class " . self::buildWhere($where_args) . " LIMIT 1"; $base = new self(); if (($row = $base->getDatabaseInstance(...
Java
UTF-8
174
2.359375
2
[]
no_license
package testForEach; public class TestOne { public static void main(String[] args) { int a = 10; int b = 3; int c = 4; System.out.println(a/b + " " + a/c); } }
Shell
UTF-8
436
2.90625
3
[]
no_license
#!/bin/sh ### BEGIN INIT INFO # Provides: auto_shutdown # Required-Start: $remote_fs $syslog # Required-Stop: $remote_fs $syslog # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Auto shutdown # Description: Automatically poweroff VM after certain period of idle ### END ...
Java
UTF-8
703
1.820313
2
[]
no_license
package com.offcn.order.service; import com.offcn.order.pojo.TReturn; import com.offcn.order.service.impl.ProjectServiceFeignImpl; import com.offcn.response.AppResponse; import org.springframework.cloud.openfeign.FeignClient; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bin...
JavaScript
UTF-8
328
2.734375
3
[]
no_license
let sendBtn= document.querySelector(".sendBtn"); let cardShow =document.querySelector(".cardShow"); sendBtn.addEventListener("click",function(){ cardShow.classList.toggle("d-none"); if(cardShow.classList.contains("d-none")){ sendBtn.innerText="GÖSTƏR" }else{ sendBtn.innerText="GİZLƏT" ...
Java
UTF-8
2,673
2.46875
2
[]
no_license
package com.example.ServiceDemo.activity.BindServiceDemo; import com.example.ServiceDemo.R; import android.app.Activity; import android.content.ComponentName; import android.content.Context; import android.content.Intent; import android.content.ServiceConnection; import android.os.Bundle; import android.os.IBinder; i...
Java
UTF-8
4,978
2.75
3
[]
no_license
package com.brohoof.brohoofwarps; import java.sql.Connection; import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.SQLException; import java.util.Optional; import java.util.UUID; public class Data { /** * Our {@link java.sql.Connection}. */ private Connection connection; /** * Our copy o...
Java
UTF-8
735
3.25
3
[]
no_license
import java.util.Arrays; class Solution04 { static public void main(String args[]){ int result[] = new int[2]; int brown = 24; int red = 24; result = new Solution04().solution(brown,red); System.out.println(Arrays.toString(result)); } public int[] solution(int ...
Java
UTF-8
1,439
1.867188
2
[]
no_license
package com.zjezyy.mapper.b2b; import java.util.List; import org.apache.ibatis.annotations.Insert; import org.apache.ibatis.annotations.Options; import org.apache.ibatis.annotations.Select; import com.zjezyy.entity.b2b.MccTbSalesNotice; public interface MccTbSalesNoticeMapper { String SELECT_FIELDS="...
Markdown
UTF-8
633
2.859375
3
[]
no_license
##静心,阅读代码大全--重新起航程序员之路 ####2015-03-28 ###第二章 <p> 对于软件的整体开发过程,可以通过不同的隐喻来进行理解。我认为现在最适合我的理解就是:软件开发的过程是建筑一栋摩天高楼的过程,不可能仅仅一两天就可以建成,要耐心的每天的完成一定的任务量。先将整体骨架,搭建好,然后再进行内部的模块添加。各个功能要充分进行设计,不一定要一次性将一部分的所有功能都完成,可以先进行,简单的测试性填充。后期再进行认真完整的代码编写。 </p>
SQL
UTF-8
2,414
2.703125
3
[]
no_license
-- MySQL Script generated by MySQL Workbench -- 01/28/20 15:11:47 -- Model: New Model Version: 1.0 -- MySQL Workbench Forward Engineering -- ----------------------------------------------------- -- Data for table `skoule`.`teacher` -- ----------------------------------------------------- START TRANSACTION; USE `sk...
Java
UTF-8
6,284
1.851563
2
[]
no_license
/** * */ package com.ctc.credit.bairong.controller; import javax.annotation.Resource; import org.apache.commons.lang.StringUtils; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.s...
JavaScript
UTF-8
4,388
2.625
3
[]
no_license
import React from 'react'; import {MDBDataTable} from "mdbreact"; export default class App extends React.Component { constructor(props) { super(props); this.handleUserChange = this.handleUserChange.bind(this); this.state = { userList: [], selectedUsers: [] }; } componentDidMount() {...
C
WINDOWS-1250
740
2.8125
3
[]
no_license
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <stdbool.h> #include <math.h> long long smallnumber(long long a, long long b){ if(a<b){ return(a); } else { return(b); } } int main(void){ long long q,h,s,d,n; scanf("%lld%lld%lld%lld%lld",&q,&h,&s...
Java
UTF-8
1,923
2.046875
2
[]
no_license
package interface_test_framework_testng_maven; import interface_test_framework_testng_maven.annotation.IgnoreNamedParam; import interface_test_framework_testng_maven.annotation.NamedParam; import interface_test_framework_testng_maven.annotation.Scenario; import interface_test_framework_testng_maven.data.annotation.Byt...
C++
UTF-8
995
3.75
4
[]
no_license
// FunctionPointer.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include <iostream> using namespace std; int addition( int a, int b ) { return ( a + b ); } int subtraction( int a, int b ) { return ( a - b ); } // As 3rd input parameter, write output (int) and inputs (int, in...
C#
UTF-8
994
2.890625
3
[]
no_license
using Newtonsoft.Json.Linq; using Shopify_DB_WriterAPI.Models; using System; using System.Collections.Generic; using System.Linq; using System.Web; namespace Shopify_DB_WriterAPI.LineItems { // Take the full order payload object and parse the line_items object out for use in inventory tracking. public class L...
TypeScript
UTF-8
876
3.078125
3
[ "MIT" ]
permissive
import {Key} from '../Iteration/Key' import {Pos} from '../Iteration/Pos' import {Numbers, KnownIterationMapKeys} from './_Internal' import {NumberMap} from '../Iteration/Maps/Number' import {Map} from '../Iteration/Map' /** @hidden */ export type _NumberOf<N extends number, IMap extends Map> = { [K in keyof IMap[...
Python
UTF-8
3,554
2.84375
3
[]
no_license
#!/usr/bin/python #-*-coding:utf-8-*- '''@author:duncan''' # 测试分类器分类精度 import os import pickle from sklearn import datasets from sklearn.feature_extraction.text import CountVectorizer from sklearn.feature_extraction.text import TfidfTransformer from sklearn.naive_bayes import MultinomialNB import numpy as np ''' 装载...
Markdown
UTF-8
14,555
3.359375
3
[ "MIT" ]
permissive
--- layout: single title: "OverTheWire: 'Natas' Solutions 1-10" header: teaser: oth.png overlay_image: ZenBGG.png caption: "[__OverTheWire__](http://overthewire.org/wargames/)" --- Web Hacking; one of the most dangerous attack vectors out on the internet in today's world. Web Hackers have gotten away with millio...
PHP
UTF-8
626
3
3
[]
no_license
<?php require_once(__DIR__ . '/../../../../src/w203/example/decoupling/untestable.php'); class untestableTest extends PHPUnit_Framework_TestCase { /** * @test */ public function shouldFormatPrice() { // Fixture // Test $actual = formatPrice(17); // Assert ...
Markdown
UTF-8
1,334
2.796875
3
[]
no_license
--- author: admin comments: true date: 2009-04-16 21:39:53+00:00 layout: note slug: '%e5%9c%a8%e5%8d%a7%e5%ae%a4%e9%87%8c%e4%b8%8a%e7%bd%91' title: 在卧室里上网 wordpress_id: 2027 categories: - notes - 不好归类 tags: - 不好归类 --- 坚持了一年又8个月之后,我终于在住处安装了宽带。之所以一直挺着,是因为我有一个奇怪的说服自己的理论。卧室乃静休、读书、欢愉的所在,岂能把网络这个怪物再放进来。让恺撒的归恺撒,上帝的归上帝,工作的归工作,...
Java
UTF-8
962
2.53125
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 net.thevpc.diagram4j.render.elements; import java.awt.Color; import java.awt.Graphics2D; import net.thevpc.diagram4j.model.JDi...
Python
UTF-8
1,109
3.3125
3
[]
no_license
from typing import Tuple import pygame from constants import MARGIN, SQUARE_SIZE from controller import GameController def get_square_from_mouse(pos: Tuple, sq_size=SQUARE_SIZE, margin=MARGIN) -> Tuple: x, y = pos row, col = (y - margin) // sq_size, (x - margin) // sq_size if row % 2 != col % 2: ...
Python
UTF-8
263
3.375
3
[]
no_license
a0,a1,a2 = raw_input().strip().split(' ') A = a0,a1,a2 = [int(a0),int(a1),int(a2)] b0,b1,b2 = raw_input().strip().split(' ') B = b0,b1,b2 = [int(b0),int(b1),int(b2)] alice = bob = 0 for x,y in zip(A,B): if x>y: alice += 1 if x<y: bob += 1 print alice,bob
Java
UTF-8
868
1.882813
2
[]
no_license
package com.ljd.helper.fitscreenlib; import android.view.View; import android.view.ViewGroup; /** * 版权:XXX公司 版权所有 * 作者:lijinduo * 版本:2.0 * 创建日期:2018/4/12 * 描述:(重构) * 修订历史: * 参考链接: */ public interface ScaleScreenHelper { View loadViewMinMax(View var1, int var2, int var3, int var4, int var5); View load...
Java
UTF-8
6,384
2.421875
2
[]
no_license
/** * StackWrap4J - A Java wrapper for the Stack Exchange API. * * Copyright (c) 2010 Bill Cruise and Justin Nelson. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restrict...
Markdown
UTF-8
1,142
3.296875
3
[]
no_license
# links_scraper Webscraper that gathers all links and all those links' links on any pages you tell it to ## Setup 1) Ensure your go environment path variables are set 2) run `go get github.com/mgsterling11/links_scraper` 3) cd into src/github.com/mgsterling11/links_scraper 4) run `go build` 5) run `go run main.go http...
Java
UTF-8
2,380
2.09375
2
[]
no_license
package com.jjsoluciones.segundosprint.animales; import android.content.Intent; import android.media.AudioManager; import android.media.MediaPlayer; import android.media.SoundPool; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.View; import android.widget.ImageB...
SQL
UTF-8
45,410
3.203125
3
[]
no_license
# ************************************************************ # Sequel Pro SQL dump # Version 4135 # # http://www.sequelpro.com/ # http://code.google.com/p/sequel-pro/ # # Host: sql5.freemysqlhosting.net (MySQL 5.5.40-0ubuntu0.14.04.1) # Database: sql562209 # Generation Time: 2015-05-05 16:35:19 +0000 # **************...
JavaScript
UTF-8
3,640
2.546875
3
[]
no_license
window.onload = function () { totalPic = document.getElementById("nbpicture").textContent; gallery = document.getElementById("thegallery"); nodes = gallery.children node_nb = 0; max_pic = 6; for (displayedPic = 0; displayedPic < max_pic * 2; displayedPic+=2) { if (displayedPic <= nodes.length - 1) nodes[disp...
C#
UTF-8
2,179
3.546875
4
[]
no_license
using System; using System.Text.RegularExpressions; public abstract class Persona { private string surname = ""; private int age = 0; private string id = ""; private Regex reg = new Regex("\\d{ 8}[A-HJ-NP-TV-Z]"); public Persona() : this("a", "a", 0, "a") { } public Persona(string ...
Java
UTF-8
2,423
2.375
2
[]
no_license
package com.example.vlad.todolist; import android.app.DatePickerDialog; import android.content.Intent; import android.support.v4.app.DialogFragment; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.util.Log; import android.view.View; import android.widget.DatePicker; import and...
Rust
UTF-8
1,655
3.546875
4
[ "MIT" ]
permissive
use std::env::{args, Args}; use rand::Rng; use std::collections::BTreeMap; use std::collections::HashMap; use commutil::add_one as addOne; fn main(){ println!("Hi, Rico@2022"); let mut args: Args = args(); println!("{:?}", args); let first: String = args.nth(1).unwrap(); println!("{}", first);...
Java
UTF-8
695
2.484375
2
[]
no_license
package com.forever.zhb.common.vo; import lombok.Getter; import lombok.Setter; @Getter @Setter public class KeyValueVO<T,V> { private T key; private V value; public KeyValueVO() { } public KeyValueVO(T key,V value){ this.key = key; this.value = value;...
Python
UTF-8
599
4.5
4
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
# -*- coding: utf-8 -*- """ Created on Thu May 14 23:37:15 2020 @author: Dilay Ercelik """ # Practice # Given an int n, return True if it is within 10 of 100 or 200. # Examples: ## near_hundred(93) → True ## near_hundred(90) → True ## near_hundred(89) → False # Answer def near_hundred(n...
Java
UTF-8
4,709
2.140625
2
[ "MIT" ]
permissive
/* * MIT License * * Copyright (c) 2018. JUAN CALVOPINA M * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to u...
Java
UTF-8
3,962
2.515625
3
[]
no_license
package com.jumpbuttonstudio.puckslide; import com.badlogic.gdx.graphics.Color; import com.badlogic.gdx.graphics.OrthographicCamera; import com.badlogic.gdx.graphics.Texture; import com.badlogic.gdx.graphics.g2d.Batch; import com.badlogic.gdx.graphics.g2d.TextureRegion; import com.badlogic.gdx.math.MathUtils; import c...
Ruby
UTF-8
1,598
4.25
4
[]
no_license
=begin *Definition: radix sort or bucket sort Time complexity => O(d*(n+b)) - d => number of digits (ex: no of digits 3, repeated no of digits present) - n => total numbers present - b => base, buckets taken based on bucket (ex: in this array base is 10) *Output: ruby radix_sort.rb [5, 9, 10...
TypeScript
UTF-8
1,234
4.25
4
[]
no_license
var log = function (value){ console.log(value); }; log('teste'); var sum = function(a, b){ return a + b; }; console.log(sum(5,5)); // Arrow functions var sumArrow = (a, b) => { return a + b; } console.log(sumArrow(5,15)); var soma = (a, b) => a + b; console.log(soma(1,2)); var s = (a) => a + ...
PHP
UTF-8
540
2.84375
3
[ "MIT" ]
permissive
<?php namespace Port1HybridAuth\Service; use Shopware\Models\Customer\Customer; /** * Interface AccountServiceInterface * * @package Port1HybridAuth\Service */ interface AccountServiceInterface { /** * Checks if user is correctly logged in. Also checks session timeout * * @return bool */ ...
Markdown
UTF-8
1,769
2.75
3
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
--- permalink: / title: "About Me" excerpt: "About Me" author_profile: true redirect_from: - /about/ - /about.html --- <!---![mypic](https://ivanrazu.github.io/images/profile_pic.png)---> I am a postdoctoral fellow at [University of Tennessee Health Science Center](https://www.uthsc.edu/) in the Department of Ped...
Java
UTF-8
424
1.703125
2
[]
no_license
package com.course.springboot.swagger.controllers.api; import com.course.springboot.swagger.commons.Constants; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import java.util.Map; @RequestMappin...
Java
UTF-8
11,482
2.125
2
[]
no_license
/* * Copyright (C) 2017 Edward F Sowell * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This prog...