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
Shell
UTF-8
559
3.328125
3
[]
no_license
#!/bin/bash ls -1 /home/dean/Music > /tmp/artists while read artist; do echo "----------------------------------------------------" echo ${artist} echo "----------------------------------------------------" cd "/home/dean/Music/${artist}" ls -1 . > /tmp/albums while read album; do cd "/h...
Java
UTF-8
1,422
2.09375
2
[]
no_license
package com.xsd.jx.bean; /** * Date: 2020/10/12 * author: SmallCake */ public class VersionResponse { /** * desc : string * id : 0 * is_must : 0 * platform : 0 * url : string * version : 0 * version_name : string */ private String desc; private int id; priva...
C#
UTF-8
458
3.078125
3
[]
no_license
using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; namespace LineNumbers { class Program { static void Main(string[] args) { string[] input = File.ReadAllLines("input.txt"); var output = ...
C#
UTF-8
1,063
3.359375
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Batman.store { public abstract class Article { public Guid Id { get; private set; } public string Manufacturer { get; set; } public string Model { get; set; } public decimal Price ...
C#
UTF-8
535
2.953125
3
[ "MIT" ]
permissive
using System; using System.Collections.Generic; using System.Text; namespace A7 { public class Tarea { public string name { get; set; } public string encargado { get; set; } public int horas { get; set; } public Tarea(string name, string encargado, int horas) { ...
C#
UTF-8
6,367
2.59375
3
[]
no_license
using AmazonsGameLib; using Microsoft.Win32; using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text; using System.Threading; using System.Threading.Tasks; using System.Windows; using System.Windows.Controls; using System.Windows.Data; using System.Windows.Documents; using...
Java
UTF-8
3,468
2.265625
2
[]
no_license
package train; import java.io.BufferedReader; import java.io.FileReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.net.URI; import java.util.HashMap; import java.util.List; import java.util.Map; import org.apache.hadoop.conf.Configuration; import org.apache....
PHP
UTF-8
696
3.140625
3
[ "MIT" ]
permissive
<?php /* * Client-side Request * * This script will make a request to google.com and output the response. */ // Include the autoload script. require_once('../vendor/autoload.php'); use pjdietz\WellRESTed\Request; // Make a requst to Google in one line: $rqst = new Request(); $rqst->uri = 'https://www.google.com...
PHP
UTF-8
2,353
2.546875
3
[]
no_license
<?php /** * Import Links from csv-file. */ class MaintenanceShell extends Shell { var $uses = array('Hit', 'User', 'Link'); function startup() { $this->out(str_repeat("-", 72)); $this->out(Configure::read('Site.Title').'-Maintenance'); $this->out(str_repeat("-", 72)...
C#
UTF-8
802
2.90625
3
[]
no_license
using System; using System.Collections.Generic; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; namespace BS_CS_Challenge_Game { class CECS105 : CardInterface { string thisImage; public CECS105() { thisImage = "CECS 105"; } ...
C++
UTF-8
905
2.875
3
[]
no_license
#include"Snake.h" #include<algorithm> #include<iostream> #include<FL/Fl.H> #include<FL/Fl_Box.H> #include<FL/fl_draw.H> using namespace std; static const int CELL_SIZE = 8; Snake::Snake(int x, int y): Fl_Box(x, y, 300,300, "my snake"){ x0_ = x; y0_ = y; for(int i = 0; i < 5; i++){ s_.push_back(Point(15+...
Java
UTF-8
710
1.6875
2
[]
no_license
package defpackage; /* renamed from: cfx reason: default package */ final /* synthetic */ class cfx implements android.view.View.OnClickListener { private final com.google.android.libraries.onegoogle.accountmenu.internal.SelectedAccountHeaderView a; cfx(com.google.android.libraries.onegoogle.accountmenu.inter...
Python
UTF-8
583
3.921875
4
[]
no_license
import math def f(x): return x**3 + 4 * x**2 - 10 def g(x): return math.sqrt(10/(x+4)) def fixedPoint(xa, iter, tol): fx = f(xa) cont = 0 error = tol + 1 xn = 0 while((fx != 0) and error > tol and cont < iter): xn = g(xa) fx = f(xn) error = abs(xn - xa) xa...
Markdown
UTF-8
1,485
2.515625
3
[ "MulanPSL-2.0", "LicenseRef-scancode-mulanpsl-2.0-en", "LicenseRef-scancode-unknown-license-reference" ]
permissive
--- --- --- title: 一九三二年 --- 无题[447] 血沃中原肥劲草,寒凝大地发春华。 英雄多故谋夫病,泪洒崇陵噪暮鸦。[448] 一月 偶成[449] 文章如土欲何之,翘首东云惹梦思。 所恨芳林寥落甚,春兰秋菊不同时。 三月 赠蓬子[450] 蓦地飞仙降碧空,云车双辆挈灵童。 可怜蓬子非天子,逃去逃来吸北风。[451] 三月三十一日 一·二八战后作[452] 战云暂敛残春在,重炮清歌两寂然。 我亦无诗送归棹,但从心底祝平安。 七月十一日 教授杂咏[453] 作法不自毙,悠然过四十。 何妨赌肥头,抵当辩证法。[454] 其二 ...
PHP
UTF-8
855
2.890625
3
[ "MIT-0", "MIT" ]
permissive
<?php /* * This file is part of PHPExifTool. * * (c) 2012 Romain Neutron <imprec@gmail.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace PHPExiftool\Driver\Metadata; use PHPExiftool\Driver\TagInterface; use PHPExift...
Java
UTF-8
2,509
2.828125
3
[]
no_license
package org.kotemaru.android.filemanager.model; import android.net.Uri; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.util.ArrayList; import java.util.Iterator; import java.util.List; public abstract class LinkedFolderNode extends BaseNode { protected List<Node>...
PHP
UTF-8
952
3.015625
3
[ "MIT" ]
permissive
<?php namespace Hexarchium\CoreDomain\UseCase\CreateUseCase; use Hexarchium\CoreDomain\Model\Domain\DomainId; use Hexarchium\CoreDomain\Model\Domain\UseCase\UseCaseId; class Command { /** @var UseCaseId */ private $useCaseId; /** @var DomainId */ private $domainId; /** @var string */ priv...
C#
UTF-8
981
3.53125
4
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace LeetCode.Solutions.Solutions.Easy.RemoveElement { /// <summary> /// https://leetcode.com/problems/remove-element/ /// </summary> public class RemoveElementSolution { ...
PHP
UTF-8
1,064
2.546875
3
[]
no_license
<?php namespace CsrDelft\repository\groepen\leden; use CsrDelft\entity\groepen\AbstractGroep; use CsrDelft\entity\groepen\Lichting; use CsrDelft\entity\groepen\LichtingsLid; use CsrDelft\repository\AbstractGroepLedenRepository; use CsrDelft\repository\ProfielRepository; use Doctrine\Persistence\ManagerRegistry; /** ...
Java
UTF-8
209
2.015625
2
[]
no_license
package docxToPdf; public class DocxToPdfApplication { public static void main(String[] args) { } public void converter(String origem, String destino) { DocToPDF.ConvertToPDF(origem, destino); } }
Python
UTF-8
5,424
2.703125
3
[]
no_license
class LFM_topN: def __init__(self,classcount=10,itercount=30,alpha=0.01,lamda=0.03,ratio=1): self.classcount = classcount self.itercount = itercount self.alpha = alpha self.lamda = lamda self.ratio = ratio def getUserNegativeItem(self,userId,positiveItemList): ...
Ruby
UTF-8
256
2.75
3
[]
no_license
class CraneMover9001 def apply(state, move_values) qty, src, dest = move_values crate = state[src].pop(qty) # pp "DEBUG: crate #{crate}, state[#{src}]: #{state[src]}" state[dest] << crate state[dest].flatten! state end end
Java
UTF-8
8,472
2.375
2
[]
no_license
package com.aneedo.util; import java.util.ArrayList; import java.util.Arrays; import java.util.HashSet; import java.util.List; import java.util.Set; public class StopwordRecognizer { private static final String DEFAULT_STOP_WORDS = "a,a's,able,about,above,according,accordingly,across,actually,after," + "afterward...
Java
UTF-8
231
1.664063
2
[]
no_license
package fi.bizhop.kiekkohamsteri.dto.v2.in; import lombok.Builder; import lombok.Value; import lombok.extern.jackson.Jacksonized; @Value @Builder @Jacksonized public class PlasticCreateDto { Long manufacturerId; String name; }
JavaScript
UTF-8
1,369
2.84375
3
[]
no_license
'use strict'; class MongoModel { constructor(schema) { this.schema = schema; } get(id) { console.log('Using mongo GET') return this.schema.find().then(result => { let data = { rows: result, rowCount: result.length }; return new Promise(resolve => resolve([data])); }); } post(bo...
JavaScript
UTF-8
640
3.25
3
[]
no_license
const fetch = require('node-fetch'); async function sunsetTime(date) { const resp = await fetch(`http://api.sunrise-sunset.org/json?lat=32.095&lng=34.847&formatted=0&date=${date}`) const result = await resp.json(); return new Date(result.results.sunset); } async function *getSunsets() { for (let day =...
Java
UTF-8
295
2.078125
2
[]
no_license
package com.cmstop.jstt.event; public class PayResultEvent { private int resultCode; public PayResultEvent(int code){ this.resultCode = code; } public int getResultCode() { return resultCode; } public void setResultCode(int resultCode) { this.resultCode = resultCode; } }
Python
UTF-8
514
3.609375
4
[]
no_license
#!/usr/bin/python3 # Bullet point adder # Adds markdown bullet points to start of each line of text in clipboard import pyperclip text = pyperclip.paste() # Separate lines and add stars lines = text.split('\n') for i in range(len(lines)): # loop through all indexes in the 'lines' list lines[i] = '* ' + lines[i] #...
Java
UTF-8
9,840
1.835938
2
[ "Apache-2.0", "MIT", "LicenseRef-scancode-unknown-license-reference", "BSD-3-Clause", "Python-2.0", "BSD-2-Clause" ]
permissive
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
Python
UTF-8
1,613
4.0625
4
[]
no_license
"""Min Groups Module""" def min_groups(points, max_segment_length): """Minimum Groups Divides a set of points of segments of MaxSegmentLength returns the count of minimum groups Uses Greedy Approach """ group_count = 0 # the count of groups segments = [] # The map of segments ...
Java
UTF-8
7,722
1.859375
2
[]
no_license
/** * Project Name:iotgp-common-db * File Name:CdSoftWareInfoDaoImpl.java * Package Name:cn.inovance.iotgp.common.domain * Date:2014-7-22下午4:24:02 * Copyright (c) 2014, Shenzhen Inovance technology Co., Ltd All Rights Reserved. * */ package cn.inovance.iotgp.common.dao.impl; import java.math.BigInteger; import...
C
GB18030
825
3.640625
4
[]
no_license
#define _CRT_SECURE_NO_WARNINGS 1 #include<stdio.h> int MissingNumber(int nums[], int sz) //ⷨ1֮ͼȥһĺͣӶ1-nǾn { int i = 0; int j = 0; int sum1 = 0; int sum2 = 0; int newlen = sz + 1; for (i = 0; i < newlen; i++) { sum1 = sum1 + i; //0nĺ } for (j = 0; j < sz; j++) { sum2 = sum2 + nums[j]; //ĺ } return s...
Java
UTF-8
4,773
2.65625
3
[]
no_license
package com.greenlabs.crudsample.dao.impl; import com.greenlabs.crudsample.DbConnection; import com.greenlabs.crudsample.dao.MahasiswaDao; import com.greenlabs.crudsample.entity.Mahasiswa; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; import jav...
Java
UTF-8
426
2.265625
2
[]
no_license
package com.bit.reflect.VO; import java.lang.reflect.InvocationTargetException; /** * @Author: yd * @Date: 2019/4/9 16:54 * @Version 1.0 */ public class EmpAction { private Emp emp=new Emp(); public void setValue(String value) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException...
JavaScript
UTF-8
5,205
2.625
3
[]
no_license
import React, { Component } from 'react'; import CurriculumElement from './CurriculumElement'; import fire from './../../fire'; import LoginRequired from '../Login/LoginRequired'; class Curriculums extends Component { constructor(props) { super(props); this.state = { origCurriculums: [], updatedCurriculum...
Python
UTF-8
433
2.625
3
[]
no_license
from estimators.moyenne import Moyenne as M from estimators.ecart_type import Ecart_type as E class Normalisation(): def normalisation(self,data): new_data = [] for liste in data[1:]: l = [] for i in range(len(liste)): l.append((float(liste[i]) - M().moyenne...
PHP
UTF-8
2,892
3
3
[]
no_license
<?php /** * @param array $tableau */ function debug($tableau) { echo '<pre style="height:200px;overflow-y: scroll;font-size: .7em;padding:10px;font-family: Consolas, Monospace; background-color: #000;color:#fff;">'; print_r($tableau); echo '</pre>'; } function imageMovie($movie) { return '<img src="...
JavaScript
UTF-8
315
2.640625
3
[ "MIT" ]
permissive
import moment from 'moment' export default (events) => { let monthEvents = {} events.forEach(item => { let startDate = moment(item.start).format('YYYY-MM-DD') if (monthEvents[startDate]) monthEvents[startDate].push(item) else monthEvents[startDate] = [item] }) return monthEvents }
JavaScript
UTF-8
483
4.53125
5
[]
no_license
//O(N) // Given an array of strings, capitalize the first letter of ecah string in the array function capitalizeFirst(array) { if (array.length === 1) { return [ array[0][0].toUpperCase() + array[0].substr(1) ]; } const res = capitalizeFirst(array.slice(0, -1)); const string = array.slice(array.length - 1)...
Python
UTF-8
2,407
4.125
4
[]
no_license
#!/usr/bin/python # Greedy Algorithm for minimizing the weighted sum of completion times # This file describes a set of jobs with positive and integral weights and lengths. It has the format # # [number_of_jobs] # [job_1_weight] [job_1_length] # [job_2_weight] [job_2_length] # # For example, the third line of the fil...
Markdown
UTF-8
601
2.59375
3
[]
no_license
## Lame 库PCM转成mp3函数 ``` public byte[] getMp3(byte[] pcm){ byte[] _mp3OutputBuf = new byte[1024 * 10]; int mp3BufLen = Lame.encode(pcm, pcm, pcm.length / 2, _mp3OutputBuf, _mp3OutputBuf.length); if(mp3BufLen < 0){ LogBuffer.ONE.e(TAG, "mp3 encoder error:" + mp3BufLen); re...
JavaScript
UTF-8
219
3.359375
3
[]
no_license
const meowFunction = function() { let hey = 8; let meow = ["peaas", "cars"]; } console.log("yes"); var someArray = [1, 4, 6, 2, 17]; someArray.forEach(/* pass in function here*/); document.querySelector();
SQL
UTF-8
919
2.875
3
[]
no_license
delimiter $ create Trigger Check_Cap before insert on room for each row begin if(new.capacity<0||new.capacity>30) then signal sqlstate '10101' set message_text='Capacity ranges from 0 to 30'; end if; end;$ delimiter ; *******************************************************...
Shell
UTF-8
2,193
3.90625
4
[]
no_license
#!/bin/bash VERSION=2.0.0 export HVM="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" export PATH=$PATH:$HVM/bin PATH_PREFIX=$HVM/bin source $HVM/config.sh hvm_get_haxe_versions() { HAXE_VERSIONS=() local VERSIONS=`curl --silent https://haxe.org/download/list/ 2>&1 | grep -oE 'version\/[^/]+' | cut -d / -f 2 ...
Python
UTF-8
910
2.765625
3
[]
no_license
import unittest import l457 class testSolution(unittest.TestCase): def setUp( self ): self.s = l457.Solution() def test_solution( self ): got = self.s.firstMissingPositive([1,2,0]) self.assertEqual(got, 3) got = self.s.firstMissingPositive([3,4,-1,1]) self.assert...
Java
UTF-8
777
2.328125
2
[]
no_license
package com.project.polishedlms.util; import android.content.Context; import android.net.ConnectivityManager; import android.net.NetworkInfo; import android.os.Handler; import android.widget.Toast; public class Utility { public static boolean checkNetwork(Context context) { ConnectivityManager Connection...
C++
UTF-8
799
3.84375
4
[ "Apache-2.0" ]
permissive
#include <iostream> #include "stack.h" /* stack.h namespace Stack { void push(char) ; char pop() ; } */ namespace Stack { const int MAX_SIZE = 10 ; char v[MAX_SIZE] ; int top = 0 ; class Overflow {} ; void push( char c ) { cout << "Push " << c << "\n" ; if (top==MAX_SIZE) thr...
Java
UTF-8
429
3.15625
3
[]
no_license
package com.lrh.mediation; public class Colleague2 { private AbstractMediator abstractMediator; public Colleague2(AbstractMediator abstractMediator) { this.abstractMediator = abstractMediator; } public void doSomeThing2(){ System.out.println("同事2完成事2"); } public void doSomeThingNeedAssist(){ System.out...
C#
UTF-8
2,119
2.65625
3
[ "Apache-2.0" ]
permissive
using nValid.Utilities.Formatting; namespace nValid.Framework { public class BrokenRule { private readonly IRule rule; private readonly object validatedInstance; private readonly string propertyName; private readonly object invalidValue; private readonly string...
TypeScript
UTF-8
13,607
2.53125
3
[ "MIT" ]
permissive
import { LitElement, html, css, property, customElement, CSSResult, TemplateResult, query, internalProperty, } from 'lit-element'; import {classMap} from 'lit-html/directives/class-map'; import {styleMap} from 'lit-html/directives/style-map'; import {ifDefined} from 'lit-html/directives/if-defined'; i...
Java
UTF-8
1,918
2.5625
3
[]
no_license
package com.example.android.taskdo; import androidx.annotation.Nullable; import androidx.fragment.app.Fragment; import androidx.fragment.app.FragmentManager; import androidx.fragment.app.FragmentPagerAdapter; import com.example.android.taskdo.Tabs.FridayFragment; import com.example.android.taskdo.Tabs.MondayFragment;...
Java
UTF-8
586
1.648438
2
[ "LicenseRef-scancode-warranty-disclaimer", "Apache-2.0" ]
permissive
package org.inbloom.portal; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.EnableAutoConfiguration; import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.Configuration; import org.springframework.web.servlet.config.a...
Python
UTF-8
1,286
2.8125
3
[]
no_license
__import__('pkg_resources').declare_namespace(__name__) from meta import DictValidatorMeta from exceptions import * class DictValidator(object): __metaclass__ = DictValidatorMeta def __init__(self, dictionary): validation_errors = [] if not isinstance(dictionary, dict): validati...
Java
UTF-8
7,290
2.375
2
[]
no_license
package com.flipkart.billsharing.service; import com.flipkart.billsharing.common.BillStatus; import com.flipkart.billsharing.common.MemberBillStatus; import com.flipkart.billsharing.common.SplitMethod; import com.flipkart.billsharing.dao.BillDao; import com.flipkart.billsharing.dao.GroupDao; import com.flipkart.billsh...
C++
UTF-8
380
2.5625
3
[]
no_license
#include<bits/stdc++.h> using namespace std; int n, m; int a = 1000, b = 1000; int main() { cin >> n >> m; for(int i = 0; i < m; i++) { int x, y; cin >> x >> y; a = min(x, a); b = min(y, b); } if(a > (6 * b)) { a = 6 * b; } if((n % 6) * b > a) { cout << ((n / 6) * a) + a << endl; } ...
Java
UTF-8
1,352
3.234375
3
[]
no_license
package Przyklad2_JDBC; import java.sql.*; public class Person { public Person(String imie, String nazwisko, String pesel, int wiek, Date dataZapisu) { super(); this.imie = imie; this.nazwisko = nazwisko; this.pesel = pesel; this.wiek = wiek; this.dataZapisu = dataZapisu; } private String imie; priva...
Java
UTF-8
3,103
3.265625
3
[]
no_license
package com.company; import java.io.*; import java.util.Arrays; import java.util.Scanner; import static com.company.IOModule.teacherList; public class Teacher { String number; String name; String academy; String major; Course[] courses = new Course[5]; //Default length of score array...
C
UTF-8
1,109
3.703125
4
[]
no_license
#include <stdio.h> #include <math.h> #define PI 3.1415 // Check for built in C99 stuff instead of this struct typedef struct ComplexNum { double real; double imag; } ComplexNum; void dft(ComplexNum* in, ComplexNum* out, int insize, int outsize) { int i; for (i = 0; i < outsize; i++) { ...
Java
UTF-8
950
2.359375
2
[]
no_license
package com.simoncherry.cookbook.mvp.presenter; import com.simoncherry.cookbook.ui.BaseView; import io.reactivex.disposables.CompositeDisposable; import io.reactivex.disposables.Disposable; /** * Created by Simon on 2017/4/23. */ public class RxPresenter<T extends BaseView> implements BasePresenter<T> { prot...
Markdown
UTF-8
4,951
2.6875
3
[ "MIT" ]
permissive
--- type: scenario acronym: pschmitz title: Aufgabe zu DevOps persona: pschmitz scenarioTypes: - main - alternative - negative responsible: - jlü source: - [interview, nnProf3] history: v1: date: 2021-06-17 comment: initially created v2: date: 2021-07-12 co...
C#
UTF-8
2,505
2.890625
3
[]
no_license
using Library.Entities; using System; using System.Collections.Generic; using System.Data.SqlClient; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Library.DataAccess { public class MemberBookListDAL { DbHelper helper; public MemberBookListDAL() { ...
C++
UTF-8
1,927
3.625
4
[ "MIT" ]
permissive
#include <iostream> using namespace std; template<typename T> struct Node { int info; Node *right; Node *left; }; template <typename T> class Create { protected: Node<T> *first,*last; public: Create() { first=NULL; last=NULL; } template <typename S> friend ostream& operator << (ostream &myout,Create<S> m...
Python
UTF-8
2,949
3.125
3
[]
no_license
import sys sys.path.append('../') from lstore.query import * from lstore.table import * from lstore.db import * database = Database() database.create_table("Students", 6, 0) table = database.get_table("Students") query = Query(table) def test(test_name, expression, expected_result): print('\n\n++++TEST RESULT+++...
Java
UTF-8
1,478
2.15625
2
[]
no_license
package invenio.wf.items.vis.query; import invenio.visual.LabelRenderer; import invenio.visual.VisualGraphSession; import prefuse.action.assignment.ColorAction; import prefuse.util.ColorLib; import prefuse.visual.VisualItem; public class QueryGraphSession extends VisualGraphSession { // color private ColorActi...
Java
UTF-8
473
2.0625
2
[]
no_license
package br.com.customerapi.customer.dto; import br.com.customerapi.customer.predicate.CustomerPredicate; import lombok.*; @Getter @Setter @NoArgsConstructor @AllArgsConstructor public class CustomerFilters { private Integer id; private String name; private String document; public CustomerPredicate t...
TypeScript
UTF-8
7,399
2.671875
3
[ "MIT", "CC-BY-4.0" ]
permissive
import path from "path"; import slug from "slug"; import { Octokit } from "@octokit/rest" import { createKoreFile, createGitHubAdaptor, KoreFile } from "korefile" const normalizeNewLine = (input: string): string => { return input.replace(/\r\n/g, '\n'); }; const slugTitle = (title: string) => { const tenTitle...
PHP
UTF-8
656
2.515625
3
[]
no_license
<?php $quanLiDanhSachSV = array( array( 'tensanpham' => 'kem', 'ngayban' => '20/4/2018', 'giaban' => '5,000', ), array( 'tensanpham' => 'kem', 'ngayban' => '20/4/2018', 'giaban' => '5,000', ), array( 'tensanpham' => 'kem', 'ngayban' => ...
Python
UTF-8
462
3.296875
3
[]
no_license
import os import glob os.chdir('c:/webDev/pyworks') # webDev 폴더로 이동 dir = os.popen('dir') # 'dir' 명령 실행 #print(dir.read()) #glob 모듈로 file_io의 파일 이름 알아내기 - txt파일 읽어오기 data=glob.glob('c:/webDev/pyworks/day28/file_io/*.txt') print(data) #리스트 형태로 반환 #animal.txt 읽기 with open('c:/webDev/pyworks/day28/file_io/an...
Python
UTF-8
3,495
3.546875
4
[]
no_license
# This creates an interactive GUI for users to play with images and parameters for K-means. from tkinter import * from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg from matplotlib.figure import Figure from kmeans import * from GMM import * class App: def __init__(self, master): # C...
Shell
UTF-8
1,357
3.71875
4
[ "GPL-1.0-or-later", "GPL-2.0-only", "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
#!/bin/bash # # /etc/rc.d/init.d/calico-felix # # chkconfig: 2345 08 92 # description: Starts and stops calico-felix # ### BEGIN INIT INFO # Provides: calico-felix # Required-Start: # Required-Stop: # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: start and stop calico-felix # Description: star...
Java
UTF-8
1,157
2.4375
2
[ "MIT" ]
permissive
package startup; import jade.core.Profile; import jade.core.ProfileImpl; import jade.core.Runtime; import jade.wrapper.AgentController; import jade.wrapper.ContainerController; public class Launcher { Runtime rt; ContainerController container; public void initRemoteContainer(String host, String port){ System.o...
Markdown
UTF-8
1,871
2.796875
3
[]
no_license
## ERR_CONTENT_LENGTH_MISMATCH解决方法 ### 问题描述 前端页面加载css,和js文件的时候,经常出现`ERR_CONTENT_LENGTH_MISMATCH`的报错情况。 ### 定位问题 在单独打开`hearder`中css,js的网络地址是能打开的,所以排除了最简单的地址错误。前端项目是由nginx代理的,所以可以查看nginx的日志,看看有无线索。 进入`${NGINX_HOME}\logs`,查看`error.log`,得到如下信息: ```shell 2018/07/13 14:22:49 [crit] 275197#0: *1543 open() "/usr/local/ng...
Java
UTF-8
24,327
1.9375
2
[]
no_license
package com.clean.space; import java.lang.ref.WeakReference; import java.util.ArrayList; import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.Map.Entry; import android.content.Context; import android.graphics.Bitmap; import android.util.Log; import android...
PHP
UTF-8
519
2.703125
3
[ "BSD-4-Clause-UC", "BSD-3-Clause", "LicenseRef-scancode-other-permissive", "TCL", "ISC", "Zlib", "LicenseRef-scancode-public-domain", "BSD-2-Clause", "blessing" ]
permissive
--TEST-- IntlCalendar::get() basic test --SKIPIF-- <?php if (!extension_loaded('intl')) die('skip intl extension not enabled'); --FILE-- <?php ini_set("intl.error_level", E_WARNING); ini_set("intl.default_locale", "nl"); $intlcal = IntlCalendar::createInstance('UTC'); $intlcal->set(IntlCalendar::FIELD_DAY...
Rust
UTF-8
3,604
2.75
3
[ "CC0-1.0" ]
permissive
//! Derivation path according to //! BIP-44 <https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki> //! and EIP-3 <https://github.com/ergoplatform/eips/blob/master/eip-0003.md> use derive_more::FromStr; use ergo_lib::wallet::derivation_path::ChildIndexError; use ergo_lib::wallet::derivation_path::ChildIndexHa...
Python
UTF-8
1,771
2.8125
3
[ "Apache-2.0" ]
permissive
""" Code for "Stability Analysis of Newton-MR Under Hessian Perturbations". Authors: Yang Liu, Fred Roosta. ArXiv:1909.06224 Recover Figure 4 and 5. Stability comparison between full and sub-sampled variants of Newton-MR and Newton-CG using s = 0.1n, 0.05n, 0.01n. To seperate MR & CG plots 1, copy & paste the recordi...
Java
UTF-8
4,491
1.757813
2
[]
no_license
package com.l9e.transaction.dao.impl; import java.util.List; import java.util.Map; import org.springframework.stereotype.Repository; import com.l9e.common.BaseDao; import com.l9e.transaction.dao.CommonDao; import com.l9e.transaction.vo.Worker; @Repository("commonDao") public class CommonDaoImpl extends BaseDao impl...
C++
UTF-8
474
2.9375
3
[]
no_license
class Solution { public: ListNode *detectCycle(ListNode *head) { ListNode *slow=head,*fast=head; while(fast and fast->next){ slow=slow->next; fast=fast->next->next; if(slow==fast){ slow=head; while(slow!=fast){ s...
Python
UTF-8
91
3.109375
3
[]
no_license
a=int(raw_input("Enter val 1:")) b=int(raw_input("Enter val 2:")) z= a + b print z
Java
UTF-8
6,235
1.796875
2
[]
no_license
package com.dongwukj.weiwei.ui.fragment; import com.dongwukj.weiwei.R; import com.dongwukj.weiwei.idea.enums.HeaderActivityType; import com.dongwukj.weiwei.idea.request.AddToCartRequest; import com.dongwukj.weiwei.idea.result.PhoneAddProductResult; import com.dongwukj.weiwei.idea.result.UserResult; import com.d...
Java
UTF-8
466
2.015625
2
[]
no_license
package com.digital.wallet.repositories; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.stereotype.Repository; import com.digital.wallet.models.Customer; @Repository public interface CustomerRepository extends JpaRepository<Customer, Long> { Customer findByEmail(String st...
Go
UTF-8
1,939
2.796875
3
[]
no_license
package utils import ( "os" "path/filepath" "sync" "github.com/sirupsen/logrus" ) type User struct { Username string Key string BaseFilePath string ConfigPath string Objects map[string]FObject ClientInstances map[string]ClientInstance mux sync.Mutex } func (u *User) Up...
Java
UTF-8
4,036
2.078125
2
[ "Apache-2.0" ]
permissive
package com.gdufe.osc.scheduled; import com.gdufe.osc.utils.gson.GsonUtils; import com.gdufe.osc.utils.HttpHelper; import com.gdufe.osc.utils.WeChatNoticeUtils; import com.google.gson.JsonArray; import com.google.gson.JsonObject; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; import org...
JavaScript
UTF-8
425
3.4375
3
[]
no_license
function fishTank(arg1, arg2, arg3, arg4) { let length = Number(arg1); let width = Number(arg2); let height = Number(arg3); let percentage = Number(arg4); let totalVolume = length * width * height; // in cm3 let totalLitters = totalVolume / 1000; // in litters let volume = t...
C++
UTF-8
3,259
3.28125
3
[ "Apache-2.0" ]
permissive
#pragma once #include "../Core.h" #include "../Rendering/Drawable.h" #include "../Physics/Transformable.h" namespace Engine::Shapes { /// <summary> /// Allows to display and move a rectangle on the screen. The rectangle has a position, a color and a velocity at which it moves. /// <para> /// Represents a wrappe...
Java
UTF-8
1,900
2.28125
2
[ "MIT" ]
permissive
package com.dstym.pharmaciesondutyattica.service; import com.dstym.pharmaciesondutyattica.entity.Pharmacy; import com.dstym.pharmaciesondutyattica.repository.PharmacyRepository; import lombok.RequiredArgsConstructor; import org.springframework.cache.annotation.Cacheable; import org.springframework.data.domain.Page; im...
Python
UTF-8
1,164
3.84375
4
[]
no_license
''' 求出1~n的整数中1出现的次数? 1~13中包含1的数字有1、10、11、12、13因此共出现6次。 ''' class solution(object): def frequence(self, num): if type(num) != int or num < 1: return None num1 = num // 10 list1 = [num%10] while num1 != 0: num = num1 num1 = num1 //10 li...
Python
UTF-8
805
3.84375
4
[]
no_license
# -*- codign: itf-8 -*- def char_not_repeat(word): chars ={} for i, char in enumerate(word): if char not in chars: chars[char] = (i,1) else: chars[char] = (chars[char][0],chars[char][1]+1) final_chars = [] for key, value in chars.items(): if value[1]...
Markdown
UTF-8
2,815
3.640625
4
[]
no_license
## leetcode 91. Decode Ways A message containing letters from A-Z is being encoded to numbers using the following mapping: 'A' -> 1 'B' -> 2 ... 'Z' -> 26 Given a non-empty string containing only digits, determine the total number of ways to decode it. The answer is guaranteed to fit in a 32-bit integer. Example ...
C++
UTF-8
2,672
3.34375
3
[ "BSD-3-Clause" ]
permissive
#ifndef _VECTOR3_H_ #define _VECTOR3_H_ #include <math.h> // added by sidmishraw // #include <iostream> // using namespace std; class Vector3 { public: Vector3(){}; Vector3(float x, float y, float z) { d[0] = x; d[1] = y; d[2] = z; } Vector3(const Vector3 &v) { d[0] = v.d[0]; d[1] = v.d[...
Shell
UTF-8
6,915
3.453125
3
[]
no_license
#!/bin/bash # run.sh <corpus name> # check the number of lines in the output, in case script failed function check { if [ `wc -l ../tmp/$1/$2 | awk '{print $1}'` -ne `wc -l ../../corpora/$1/$1.token | awk '{print $1}'` ] then echo "Truncated file - $3 failed." popd > /dev/null exit fi } BASEDIR=$(dirname $...
Python
UTF-8
661
2.5625
3
[]
no_license
# -*- coding: UTF-8 -*- def generator(weibo_list,username,city,time): totalNumber = 0 relatedNumber = 0 valid_list = ['新型病毒','疫情','确诊','肺炎','隔离'] for weibo in weibo_list: totalNumber = totalNumber + 1 content = weibo['content'] for word in valid_list: if word in con...
Java
UTF-8
423
1.609375
2
[]
no_license
package com.sce.persistence.exemplar.analise.especie.repository; import org.springframework.data.repository.CrudRepository; import com.sce.persistence.exemplar.analise.especie.entity.ExemplarAnaliseEspecie; import com.sce.persistence.exemplar.analise.especie.entity.ExemplarAnaliseEspecieId; public interface Exemplar...
Java
UTF-8
778
2.09375
2
[]
no_license
package com.rainbow.gray.framework.example.service.feign; import org.springframework.cloud.openfeign.FeignClient; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; @FeignClient(valu...
Markdown
UTF-8
585
2.703125
3
[]
no_license
# ROCK-PAPER-SCISSOR-PROJECT # rock-paper-scissors An AI to play the Rock Paper Scissors game ## Requirements - Python 3 - Keras - Tensorflow - OpenCV Install the dependencies ```sh $ pip install -r versions.txt ``` Gather Images for each gesture (rock, paper and scissors and None): In this example, we gather 20...
Python
UTF-8
214
3.015625
3
[]
no_license
import numpy as np from matplotlib import pyplot as plt a = np.array([20,76,25,32,33,12,23,67,4,8,78,9,34,74,2,0]) plt.hist(a, bins = [0,20,40,60,80]) # hist = Histogram plt.title("Histogram") # Title plt.show()
C++
UTF-8
2,560
3.625
4
[]
no_license
#pragma once // This is our 2D point class. This will be used to store the UV coordinates. class CVector2 { public: float x, y; CVector2(); }; // This is our 3D point class. This will be used to store the vertices of our model. class CVector3 { public: float x, y, z; CVector3(); CVe...
JavaScript
UTF-8
279
3.15625
3
[]
no_license
const comp = (array1, array2) => array1 === null || array2 === null ? false : array2.sort((a, b) => a - b).length === array1 .map((el) => el ** 2) .sort((a, b) => a - b) .filter((el, i) => el === array2[i]).length; module.exports = comp;
C++
UTF-8
776
3.328125
3
[ "MIT" ]
permissive
/*Complete the code here. Node is as follows: struct Node { int data; Node* left; Node* right; }; */ int find(int in[], int key, int start, int end){ for(int i = start; i <= end; i++){ if(in[i] == key){ return i; } } return -1; } Node* make(int in[], int pre[], int in...
Java
UTF-8
1,510
2.546875
3
[]
no_license
package com.cdk.assignment.billcalculation; import org.springframework.boot.CommandLineRunner; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import com.cdk.assignment.billcalculation.service.DiscountService; import com.cdk.assignment.exceptions...