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
PHP
UTF-8
1,466
2.609375
3
[]
no_license
<?php namespace LwcBlog\Form; use Zend\Form\Element\Submit; use Zend\Form\Element\Textarea; use Zend\Form\Element\Text; use Zend\Form\Element\Hidden; use Zend\Form\Form; class EntryForm extends Form { public function __construct($name = null) { // we want to ignore the name passed parent::_...
Java
UTF-8
1,308
3.0625
3
[]
no_license
package com.javarush.task.task19.task1921; import java.io.BufferedReader; import java.io.FileReader; import java.io.IOException; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Date; import java.util.List; import java.util.regex.Pattern; /* Хуан Хуанов...
Java
UTF-8
242
1.554688
2
[]
no_license
package com.controlechamada.chamada.repositories; import com.controlechamada.chamada.domain.entities.Aula; import org.springframework.data.jpa.repository.JpaRepository; public interface AulaRepository extends JpaRepository<Aula, Long> { }
Python
UTF-8
5,395
3.5625
4
[]
no_license
account_details = {} def user_verification(email): if email in account_details.keys(): return email return False def check_password(password,confirm_password): if len(password) > 5: if password == confirm_password: return password else: return False def create_acco...
Java
UTF-8
174
1.984375
2
[]
no_license
package com.javamaster.service; import com.javamaster.model.OrderRequest; public interface OrderCalculator { Integer calculateTotalOrderPrice(OrderRequest request); }
SQL
UTF-8
254
3.53125
4
[]
no_license
SELECT distinct movieId, title FROM movies M1 NATURAL JOIN playsin P1 NATURAL JOIN actors WHERE 60 + byear < any (SELECT distinct byear FROM movies M2 NATURAL JOIN playsin NATURAL JOIN actors WHERE M1.movieId = M2.movieId) ORDER BY movieId, title;
Markdown
UTF-8
1,222
2.765625
3
[]
no_license
--- cycle: 2022 layout: daily2022 title: "8/3 第31週 第3天 艾城之役" date: 2022-08-03 categories: daily permalink: /daily/2022/wk31-day3-daily.html weekNum: 31 dayNum: 3 --- ### 問題:神如何藉著約書亞的智慧幫助以色列奪取艾城? {%- include BibleLinks2022.html -%} ### 默想:神的故事 + 神幫助約書亞,通過一個機智的軍事戰略來擊敗和摧毀艾城。 + 對比耶利哥和艾城戰役,都是神的作為,一個是通過神跡,一個是藉著人的謀略成就...
Markdown
UTF-8
8,804
2.84375
3
[ "LicenseRef-scancode-public-domain", "MIT" ]
permissive
--- layout: post title: "我亲历的瓜菜代生活" date: 2002-07-15 author: 杨金声 from: http://www.yhcqw.com/ tags: [ 炎黄春秋 ] categories: [ 炎黄春秋 ] --- [ 2002年第7期 我亲历的瓜菜代生活 作者:杨金声 ] 三年困难时期,我在安徽省无为县当教师。那时粮食极其紧缺,比黄金还贵重,有钱能买到黄金,而无粮票或粮本,持钱去粮站根本买不到粮食。1958年大炼钢铁时,曾要我们“放开肚皮吃饭,鼓足干劲生产”,可是不到两个月,口粮月供应标准又恢复到28市斤。从1959年春季起,再降为24市斤(内含不能吃的杂糠,两个月后取消杂...
JavaScript
UTF-8
78
2.984375
3
[]
no_license
var output = ""; for(var i =0; i<10; i++){ console.log(output += "*"); }
C++
UTF-8
1,054
2.921875
3
[ "CC0-1.0" ]
permissive
/* Kahan - Kahan summation Written in 2015 by <Ahmet Inan> <xdsopl@googlemail.com> To the extent possible under law, the author(s) have dedicated all copyright and related and neighboring rights to this software to the public domain worldwide. This software is distributed without any warranty. You should have received ...
C++
UTF-8
404
3.046875
3
[]
no_license
#ifndef _BADSTRING_H_ #define _BADSTRING_H_ #include <iostream> #include <string> using namespace std; class BadString { private: string _reason; size_t _index; public: BadString(string reason = "", size_t index = 0) : _reason(reason), _index(index) {} ~BadString() {}; void show() const { ...
Java
UTF-8
1,595
2.890625
3
[]
no_license
package alerts; import javafx.geometry.HPos; import javafx.geometry.Insets; import javafx.geometry.Pos; import javafx.scene.Cursor; import javafx.scene.Scene; import javafx.scene.control.Button; import javafx.scene.control.Label; import javafx.scene.image.Image; import javafx.scene.layout.GridPane; import javafx.scene...
Java
UTF-8
1,434
2.859375
3
[]
no_license
import java.io.*; public class Main{ public static void main(String[] args) throws IOException{ BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String line; int testCases; int n, m; int k,l; //int table[][]; //int denominations[]; StringBuffer b = new StringBuffer(); if((li...
Java
UTF-8
308
1.820313
2
[ "Apache-2.0" ]
permissive
package io.github.rcarlosdasilva.weixin.core.exception; /** * 名字就是搞笑用的 * * @author Dean Zhao (rcarlosdasilva@qq.com) */ public class MaydayMaydaySaveMeBecauseAccessTokenSetMeFuckUpException extends RuntimeException { private static final long serialVersionUID = -8535962890149581715L; }
Java
UTF-8
2,298
3.078125
3
[]
no_license
package message; import price.Price; public class CancelMessage implements Comparable<CancelMessage> { private String user; private String product; private Price price; private int volume; private String details; private String side; public String id; public CancelMessage(String u, String prd,...
Python
UTF-8
2,185
2.734375
3
[]
no_license
import logging LOG = logging.getLogger(__name__) import requests import time import json import numpy as np def _test_adaptive_question_backend(): """ 测试出题接口 """ unit_list = ["5.1.02", "1.1.05", "5.2.01", "1.1.04", "4.2.01", "4.2.03"] url = f"http://127.0.0.1:{PORT}/api/realTimeCompute/createNextQ...
Python
UTF-8
6,036
2.671875
3
[]
no_license
''' n_estimators = 100 learning_rate = 0.5 max_depth = 5 : log loss = 0.687561242769 n_estimators = 100 learning_rate = 0.48 max_depth = 1 log loss = 0.651815005376 n_estimators = 100 learning_rate = 0.45 max_depth = 3: log loss = 0.623512266363 n_estimators = 100 learning_rate = 0.5 max_depth = 2 : log loss = 0.614801...
Java
UTF-8
233
1.953125
2
[]
no_license
package com.meishe.yangquan.inter; public interface OnResponseListener { void onSuccess(Object object); void onSuccess(int type,Object object); void onError(Object obj); void onError(int type,Object obj); }
Java
UTF-8
252
2.09375
2
[]
no_license
/* * Created on 10/10/2006 */ package japa.parser.ast.expr; import japa.parser.ast.Node; /** * @author Julio Vilmar Gesser */ public abstract class Expression extends Node { public Expression(int line, int column) { super(line, column); } }
Java
UTF-8
920
3.125
3
[]
no_license
package aoop.asteroids.database; import java.awt.Color; import java.awt.Graphics2D; public class DBState { /** The x and y coordinate of the drawing to the screen */ private int X = 350, Y; protected Database dbManager; public void render(Graphics2D g) { g.setColor(Color.WHITE); g...
Java
UTF-8
5,739
1.703125
2
[]
no_license
package irvine.oeis.a106; import junit.framework.Test; import junit.framework.TestSuite; /** * Test class for all tests in this directory. * * @author Sean A. Irvine */ public class AllTests extends TestSuite { public static Test suite() { final TestSuite suite = new TestSuite(); suite.addTestSuite(A10...
Java
UTF-8
7,290
2.40625
2
[]
no_license
package ch.epfl.scrumtool.gui.utils.test; import java.util.ArrayList; import java.util.Calendar; import java.util.List; import ch.epfl.scrumtool.entity.Issue; import ch.epfl.scrumtool.entity.MainTask; import ch.epfl.scrumtool.entity.Player; import ch.epfl.scrumtool.entity.Priority; import ch.epfl.scrumtool.entity.Pro...
C#
UTF-8
734
2.875
3
[]
no_license
using Entities.Post; using System.Collections.Generic; using System.Linq; namespace Services.Recommend { public class PostRatingPrediction { public float Label; public float Score; } public static class Posts { public static List<Post> All = new List<Post>(); /// ...
Java
UTF-8
2,176
2.421875
2
[]
no_license
package services; /** * Created by Admin on 3/9/2017. */ public class ClassRoomQueries { public static String INSERT = "INSERT INTO `classroom`" + "(`id`,\n" + "`subject_id`,\n" + "`professor_id`,\n" + "`assistant`,\n" + "`roomNumber`)\n" + ...
Java
UTF-8
505
1.742188
2
[]
no_license
package com.example.demo; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; //import org.springframework.beans.factory.annotation.Value; @RestController public class HelloWorldController { //@Value("${app.smtp.name}") //privat...
Markdown
UTF-8
11,441
3.84375
4
[ "MIT" ]
permissive
--- title: Web Frontend Development (10) - JavaScript 06 key: C20190910 tags: JavaScript; String; String方法; 正则表达式 layout: article --- # Week Ten: Web Frontend Development(10)---JavaScript 06 <!--more--> # 10.1 字符串方法(String) - ## 包装类 - 在JS中提供了3个包装类。通过3个包装类可以将基本数据类型的数据转换为对象。 - `String()`可以将基本数据类型**字符串**转换...
Java
UTF-8
882
3.546875
4
[]
no_license
package array_assignment; import java.util.Scanner; public class Ex2 { public static void main(String[] args) { int n = new Scanner(System.in).nextInt(); int[] a = new int [n]; inputArray(a,n); sortArrayA(a,n); } private static void inputArray(int[] a, int n) { for...
Markdown
UTF-8
1,647
2.65625
3
[ "MIT" ]
permissive
Managing Attachments --- When you login and edit a page, you'll find the "Attachments" interface below the text editing area. To add a new attachment to the page click the **+** icon. If you need to you can upload multiple attachments at once by clicking the **+** icon once for each attachment you'll be adding. Att...
Java
UTF-8
541
2.75
3
[]
no_license
package zelfstudieopdrachten.zelfstudie1; import java.util.ArrayList; public class Main { public static void main(String[] args){ Zelfstudie1 test = new Zelfstudie1(); System.out.println("Opdracht 1:"); test.forLoop(); System.out.println("\nOpdracht 2:"); test.whileLoop()...
C++
UTF-8
1,789
2.828125
3
[]
no_license
//Robotkol Desktop Application #include "axis.h" #include <iostream> #include <sstream> #include <utility> namespace rk { void axis_handler::set_deactive() { _robot_inf.send_data<char>('<'); _robot_inf.send_data<char>('\n'); } void axis_handler::set_active() { _robot_inf.send_data<char>('>'); _robot_inf.s...
C++
UTF-8
871
3.1875
3
[]
no_license
#include <iostream> using namespace std; void Heapify(int a[],int n,int index) { int largest = index; int left = 2*index+1; int right = 2*index+2; if(left<n && a[left]>a[largest]) largest = left; if(right<n &&a[right]>a[largest]) largest = right; if(largest!=index) { ...
Java
UTF-8
3,030
2.328125
2
[]
no_license
package com.fred.ecoxp; import java.io.File; import java.io.IOException; import org.bukkit.Bukkit; import org.bukkit.configuration.file.FileConfiguration; import org.bukkit.configuration.file.YamlConfiguration; import org.bukkit.plugin.Plugin; import org.bukkit.plugin.RegisteredServiceProvider; import org.bukkit.plug...
C++
UTF-8
9,216
2.578125
3
[]
no_license
/* * MRawEventList.cxx * * * Copyright (C) by Andreas Zoglauer. * All rights reserved. * * * This code implementation is the intellectual property of * Andreas Zoglauer. * * By copying, distributing or modifying the Program (or any work * based on the Program) you indicate your acceptance of this statement,...
C++
UTF-8
4,316
2.875
3
[]
no_license
#pragma once #include "gdl/base/exception.h" #include "gdl/math/serial/sparseMatCLLSerial.h" #include <iostream> namespace GDL { // -------------------------------------------------------------------------------------------------------------------- template <typename _type> SparseMatCLLSerial<_type>::Node::Node(U3...
PHP
UTF-8
583
2.5625
3
[]
no_license
<?php use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; class CreateTicketClassTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('ticket_class', function(Blueprint $table) { $table->integer('tid', true...
Markdown
UTF-8
946
3.296875
3
[ "MIT" ]
permissive
--- name: Remove user as a collaborator example: octokit.rest.projects.removeCollaborator({ project_id, username }) route: DELETE /projects/{project_id}/collaborators/{username} scope: projects type: API method --- # Remove user as a collaborator Removes a collaborator from an organization project. You must be an org...
Java
UTF-8
2,891
2.078125
2
[]
no_license
package com.tw.shoppify.inventory.api; import com.tw.shoppify.inventory.ApiTest; import com.tw.shoppify.inventory.appservice.Product; import com.tw.shoppify.inventory.domain.Inventory; import com.tw.shoppify.inventory.domain.InventoryRepo; import org.junit.Test; import org.springframework.beans.factory.annotation.Auto...
JavaScript
UTF-8
13,400
3.5625
4
[]
no_license
(function(goma){ "use strict"; /** * クラス宣言はfunction式と同様に巻き上げされないので * 宣言前に参照するとエラーになる。 */ //let pt = new Point(1, 1); class Point{ constructor(x = 0, y = 0){ this.x = x; this.y = y; } get coords(){ return [this....
PHP
UTF-8
4,903
3.15625
3
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
<?php namespace League\Glide\Manipulators; use Intervention\Image\Image; use League\Glide\Manipulators\Helpers\Color; use League\Glide\Manipulators\Helpers\Dimension; /** * @property string $border * @property string $dpr */ class Border extends BaseManipulator { /** * Perform border image manipulation. ...
PHP
UTF-8
2,872
3.046875
3
[]
no_license
<?php /** * This file is part of the Asar Web Framework * * (c) Wayne Duran <asartalo@projectweb.ph> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Asar\Content; use Asar\Http\Message\Response; use Asar\Http\Message\Re...
C#
UTF-8
1,383
2.765625
3
[]
no_license
using UnityEngine; public abstract class Controller : MonoBehaviour { [Header("Pawn")] [SerializeField] protected Pawn _controlledPawn; private bool _controlsEnabled = true; protected Inputs NoControlInputs = new Inputs(); protected virtual void Start() { if (!SetControlledPawn(...
Java
UTF-8
1,267
2.375
2
[]
no_license
package com.example.customviews; import android.databinding.DataBindingUtil; import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import com.example.customviews.databinding.NameItemBinding; import java.util.List; public class Na...
Ruby
UTF-8
949
2.875
3
[]
no_license
require 'twitter' class DepressedUnicornBot def tweet composed_tweet end def composed_tweet [subject, action, object, location, closing_remark].join(' ') end def subject random_phrase_from('subjects.txt') end def action random_phrase_from('actions.txt') end def object random_p...
Java
UTF-8
5,139
1.992188
2
[ "Apache-2.0" ]
permissive
package com.colin; import static org.mockito.Mockito.when; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.delete; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.p...
Java
UTF-8
1,863
2.734375
3
[ "MIT" ]
permissive
package nullblade.craftanddeath.items; import nullblade.craftanddeath.items.alloys.AlloyManager; import nullblade.craftanddeath.items.alloys.OreAlloy; import nullblade.craftanddeath.main.DamageManager; import org.bukkit.inventory.ItemStack; import java.util.HashMap; import java.util.Map; public class ItemManager { ...
Java
UTF-8
6,423
2.421875
2
[]
no_license
package com.example.accesoconcorreo; import android.content.Intent; import android.os.Bundle; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.fragment.app.DialogFragment; import androidx.fragment.app.Fragment; import androidx.fragment.app.FragmentManager; import androidx.fragm...
C#
UTF-8
20,976
3.15625
3
[ "MIT" ]
permissive
using System; using System.Threading; using System.Threading.Tasks; namespace Sophos.Commands { /// <summary> /// This Command encapsulates a Task. The static Create() methods might suffice for simple Task wrappers. /// Concrete classes must implement the abstract method that creates the Task. If your imp...
Python
UTF-8
5,467
2.71875
3
[ "Apache-2.0" ]
permissive
import json import os import re from asyncio import tasks from contextlib import contextmanager from datetime import datetime from threading import Thread import jscaller from requests.cookies import RequestsCookieJar, create_cookie from config import get_config, SECTION_WORKER NoneType = type(None) def current_ti...
Markdown
UTF-8
6,496
3.015625
3
[ "Apache-2.0" ]
permissive
# Release process ## Explanation of the process sequence The assumption that the current state of *master* will constitute the release... #### 1. Pre-release checks Make the following checks before performing a release: * Do all unit tests pass? * Do all examples work? * Does documentation build? * Have...
Java
UTF-8
236
2.4375
2
[ "MIT" ]
permissive
package ninja.egg82.primitive.doubles; import it.unimi.dsi.fastutil.Stack; public interface DoubleStack extends Stack<Double> { //functions void push(double k); double popDouble(); double topDouble(); double peekDouble(int i); }
TypeScript
UTF-8
1,201
2.671875
3
[]
no_license
import { Component, OnInit } from '@angular/core'; import { FormGroup, FormBuilder, Validators, AbstractControl} from '@angular/forms'; import { Persona } from '../models/persona'; import { PersonaService } from 'src/app/services/persona.service'; @Component({ selector: 'app-modal', templateUrl: './modal.component...
Markdown
UTF-8
1,127
3.515625
4
[]
no_license
[217. 存在重复元素](https://leetcode-cn.com/problems/contains-duplicate/) 给定一个整数数组,判断是否存在重复元素。 如果存在一值在数组中出现至少两次,函数返回 true 。如果数组中每个元素都不相同,则返回 false 。 示例 1: 输入: [1,2,3,1] 输出: true 示例 2: 输入: [1,2,3,4] 输出: false 示例 3: 输入: [1,1,1,3,3,4,3,2,4,2] 输出: true 通过次数234,282提交次数425,210 217. Contains Duplicate Given an array o...
Python
UTF-8
1,301
2.65625
3
[]
no_license
#!/bin/python import requests, smtplib from pathlib import Path import json import hashlib from bs4 import BeautifulSoup import os dirname = os.path.dirname(__file__) CONFIG_FILE = os.path.join(dirname, 'config.json') def send_mail(body): email_address = 'xxxxx@gmail.com' s = smtplib.SMTP(host='smtp.gmail.com...
Markdown
UTF-8
12,027
3.15625
3
[]
no_license
# myisamchk 是用来做什么的? 它用来压缩 MyISAM 表,这减少了磁盘或内存使用。 MyISAM Static 和 MyISAM Dynamic 有什么区别? 在 MyISAM Static 上的所有字段有固定宽度。动态 MyISAM 表将具有像 TEXT, BLOB 等字段,以适应不同长度的数据类型。 MyISAM Static 在受损情况下更容易恢复。 # 如果一个表有一列定义为 TIMESTAMP,将发生什么? 每当行被更改时,时间戳字段将获取当前时间戳。 **列设置为 AUTO INCREMENT 时,如果在表中达到最大值,会发生什么情况?** 它会停止递增,任何进一步的插入都将产生错误,因为...
Java
UTF-8
576
2.765625
3
[]
no_license
import org.junit.Before; import org.junit.Test; import static junit.framework.TestCase.assertEquals; public class TestInheritence { private Dog aDog; @Before public void before() { aDog = new Dog("Woof", 4); } @Test public void testDogHasHasNoise() { assertEquals("I make Woo...
Markdown
UTF-8
3,332
3.8125
4
[ "MIT" ]
permissive
--- layout: default title: Operators nav_order: 6 --- # Operators {: .no_toc } ## Table of contents {: .no_toc .text-delta } 1. TOC {:toc} --- ## Operators | Operator | Description | Example | |:-------------|:-------------------------------...
PHP
UTF-8
5,839
2.78125
3
[ "MIT" ]
permissive
<?php namespace SignatureTech\ResponseBuilder; use Illuminate\Http\Response; use Illuminate\Pagination\LengthAwarePaginator; use Illuminate\Support\Collection; class ResponseBuilder { /** @var bool */ private bool $status; /** @var string|null */ private string|null $message = null; /** @var in...
PHP
UTF-8
3,001
2.59375
3
[ "MIT" ]
permissive
<?php // Make sure SimplePie is included. You may need to change this to match the location of autoloader.php // For 1.0-1.2: #require_once('../simplepie.inc'); // For 1.3+: require_once('../autoloader.php'); $url = 'http://bbc.co.uk'; $url = 'http://dailymail.co.uk'; // We'll process this feed with all of the d...
Python
UTF-8
1,714
2.921875
3
[ "MIT" ]
permissive
#!/usr/bin/env python import sys import click from koolsla import ( __version__, recommender, data ) help_message = ''' Food recommendation tool with Machine learning. Usage $ python koolsla.py [<options> ...] Options --help, -h Display help message --dish, -d <int> ...
JavaScript
UTF-8
390
2.59375
3
[]
no_license
const axios = require('axios'); const bakeTimeCalc = () => { var bakeTime = new Date(); bakeTime.setHours(bakeTime.getHours() + 8); return bakeTime.toLocaleTimeString().replace(/(.*)\D\d+/, '$1'); }; const getPastLoafData = (cb) => { axios.get('http://localhost:3001/pastLoafData') .then(loafs => { cb(lo...
Java
UTF-8
2,116
2.546875
3
[ "MIT" ]
permissive
package edu.hm.hafner.analysis.parser; import java.io.IOException; import java.util.Iterator; import org.junit.jupiter.api.Test; import edu.hm.hafner.analysis.Issue; import edu.hm.hafner.analysis.Issues; import edu.hm.hafner.analysis.Priority; import static edu.hm.hafner.analysis.assertj.Assertions.*; import static ...
Java
UTF-8
4,371
1.726563
2
[]
no_license
package ice_pbru.aupan.jutarat.travelsouth; import android.content.Intent; import android.net.Uri; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.View; import android.widget.AdapterView; import android.widget.Button; import android.widget.ListView; public class MainActi...
C++
UTF-8
6,599
2.703125
3
[]
no_license
#include "Utils.h" #include <string> #include <vector> #include <iostream> #include <getopt.h> #include <sstream> #include <TipoFlor/TipoFlor.h> #include <dirent.h> #include <cstring> #include <sys/stat.h> #include <TipoPedido/TipoPedido.h> #include <dirent.h> void Utils::join(const std::vector<std::string>& v, char c...
Markdown
UTF-8
670
3.015625
3
[]
no_license
## Html File Read html file and return the code. `read_html(html_path, full=False)` ### Type * :type html_path: str * :type full: bool ### Description * :param html_path: html file path. * :param full: True to get full code, otherwise code in body tag. (optional) ### Return * :rtype: str * :return: html code of the...
Java
UTF-8
771
3.359375
3
[]
no_license
package com.frostmaster.algorithms.implementation.FindDigits; import java.util.Scanner; public class Solution { public static void main(String[] args) { Scanner in = new Scanner(System.in); int n = in.nextInt(); int c[] = new int[n]; for(int c_i=0; c_i < n; c_i++){ c[c...
Java
UTF-8
1,960
1.929688
2
[]
no_license
package br.com.etecia.appmenutwo; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.Menu; import android.view.MenuInflater; import android.view.MenuItem; import android.widget.Toast; import android.widget.Toolbar; public class MainActivity extends AppCompatActivity { ...
Java
UTF-8
474
3.0625
3
[]
no_license
public class l1624 { public int maxLengthBetweenEqualCharacters(String s) { int count = 0; int ans = -1; for (int i = 0; i < s.length()-1; i++) { for (int j = i+1; j < s.length(); j++) { if(s.charAt(i)==s.charAt(j)) { count = j-i-1; ...
Java
UTF-8
2,274
2.484375
2
[]
no_license
package devin.spittr.config; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.Configuration; import org.springframework.web.servlet.ViewResolver; import org.springframework.web.servlet.config.annotation.Defaul...
JavaScript
UTF-8
2,955
3.046875
3
[]
no_license
"use strict"; const LOCAL_STORAGE_KEY_TBRS = "tbrs"; let readBooks2021 = document.querySelector("#read-books-2021"); let readBooks2020 = document.querySelector("#read-books-2020"); let button2020 = document.querySelector("#btn-2020"); let button2021 = document.querySelector("#btn-2021"); let tbrs = JSON.parse(localS...
Shell
UTF-8
1,867
2.859375
3
[]
no_license
#!/bin/bash source /cvmfs/dune.opensciencegrid.org/products/dune/setup_dune.sh setup geant4 v4_10_6_p01 -q e19:prof setup cmake v3_14_3 setup root v6_18_04d -q e19:prof #Added by Marcos -> CRY library of Geant4 #export G4INSTALL=/cvmfs/larsoft.opensciencegrid.org/products/geant4/v4_10_6_p01/Linux64bit+3.10-2.17-e19-p...
Java
UTF-8
1,398
3.484375
3
[]
no_license
/*Краткое описание * * Игра предусматривает один игровой объект и три объекта-игрока. Генерируются случайные числа от 0 до 9, а три объекта-игрока пытаются их угадать * * Классы: GuessGame.class Player.class Main.class * * Логика: * 1) Класс Main - это точка, из которой стартует прилоджение. Содержит класс main. * 2) В...
Java
UTF-8
290
2.390625
2
[ "Apache-2.0" ]
permissive
package tech.mhuang.core.clone; /** * 拷贝接口 * * @param T 拷贝后的对象 * @author mhuang * @since 1.0.0 */ public interface BaseCloneable<T> extends java.lang.Cloneable { /** * 拷贝接口 * * @return 拷贝后得到的数据 */ T clone(); }
Java
UTF-8
4,747
2.078125
2
[]
no_license
package com.jy.modules.externalplatform.application.extinterfaceparamsref.service; import java.io.Serializable; import java.util.HashMap; import java.util.List; import java.util.Map; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.s...
C#
UTF-8
2,335
2.734375
3
[]
no_license
using System.Collections; using System.Collections.Generic; using UnityEngine; public class Route : MonoBehaviour { //https://en.wikipedia.org/wiki/B%C3%A9zier_curve //https://www.youtube.com/watch?v=11ofnLOE8pw&list=WL [SerializeField] Transform[] controlPoints = new Transform[0]; [SerializeField...
Python
UTF-8
254
3.125
3
[]
no_license
a = int(input()) array = [int(i) for i in input().split()] maxi1 = -10000 maxi2 = -10001 for i in range(len(array)): if array[i] > maxi1: maxi2 = maxi1 maxi1 = array[i] elif array[i] > maxi2: maxi2 = array[i] print(maxi2)
Python
UTF-8
4,645
2.8125
3
[]
no_license
import numpy as np from sklearn.feature_extraction.image import extract_patches_2d from process_images import get_Y from sklearn.linear_model import orthogonal_mp import matplotlib.pyplot as plt from scipy.sparse.linalg import svds class KSVDDenoiser(): def __init__(self, patch_size = 8, iterations = 10, lambd = ...
JavaScript
UTF-8
1,947
2.53125
3
[ "MIT" ]
permissive
import findIndex from 'lodash/findIndex' import { initialState } from './selectors' import { RESOURCE_CREATE_SUCCESS, RESOURCE_LIST_READ_REQUEST, RESOURCE_LIST_READ_SUCCESS, RESOURCE_DETAIL_READ_REQUEST, RESOURCE_DETAIL_READ_SUCCESS, RESOURCE_UPDATE_SUCCESS, RESOURCE_DELETE_SUCCESS, } from './actions' c...
Java
UTF-8
5,443
2.375
2
[]
no_license
package com.springapp.mvc; import org.hibernate.StatelessSession; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Scope; import org.springframework.stereotype.Component; import org.springframework.transaction.annotation.Transactional; import javax.servlet.h...
Markdown
UTF-8
3,995
3
3
[ "MIT" ]
permissive
# Recast Recast helps make your old extensions compatible with Kodular Creator version 1.5.0 or above. ## Prerequisites To use Recast, you need to have Java Runtime Environment (JRE) installed on your system. To check if you have it pre-installed, open your favorite terminal app and run the following: ```.sh java -...
Java
UTF-8
353
2.84375
3
[]
no_license
package theFactory.method; public class ChemicalWarehouse extends Warehouse { @Override public Entity createEntity(EntityType entityType) { switch(entityType) { //some DB logic is possible case LARGE: return new Tank(); case MASSIVE: return new LargeTank(); case SMALL: return new SteelBox(); def...
Python
UTF-8
105
3.203125
3
[]
no_license
d,t,s = input().split() gool = int(d) / int(s) if gool <= int(t): print('Yes') else: print('No')
TypeScript
UTF-8
4,173
2.90625
3
[ "MIT" ]
permissive
declare namespace ccui { /** * The button controls of Cocos UI. * @class * @extends ccui.Widget * * @property {String} titleText - The content string of the button title * @property {String} titleFont - The content string font of the button title *...
Markdown
UTF-8
1,390
2.890625
3
[]
no_license
# Iframes I've always heard iframes are dangerous and should be avoided from both a security and usability point-of-view. So what I'm interested in is, of course. what vectors does the iframe offer? Get document's iframes var frames = document.getElementByTagName('iframe'); for (var frame in frames)    ...
Swift
UTF-8
2,135
2.59375
3
[ "MIT" ]
permissive
// // SimpleGeometryRenderer.swift // Alloy // // Created by Andrey Volodin on 15/05/2019. // import Metal import simd public class SimpleGeometryRenderer { public let pipelineState: MTLRenderPipelineState public init(library: MTLLibrary, pixelFormat: MTLPixelFormat, blendi...
Python
UTF-8
1,300
2.84375
3
[]
no_license
# First Arg: path to directory with video files # Second Arg: output path # python imgToVideo.py ~/Devel/data_link/FZI_crossing/beginning/ ~/Devel/data_link/FZI_crossing/FZI_Video.avi from os import listdir from os.path import isfile, join import cv2 import sys import os def imgToVideo(inputPath, outputPath): prin...
C++
UTF-8
815
3.4375
3
[]
no_license
#include "Complex.h" Complex::Complex() { this->real = 0; this->img = 0; } Complex::Complex(int real, int img) { this->real = real; this->img = img; } Complex Complex::Add(Complex c){ Complex res; res.real = this->real + c.real; res.img = this->img + c.img; return res; } /* Complex Co...
Python
UTF-8
445
3.84375
4
[]
no_license
nums = [1, 2, 3, 4, 5] for e in nums: if e == 3: print('Found it!') break print(e) for e in nums: if e == 3: print('Found it!') continue #skips to the next iteration print(e) for i in range(1, 11): print(i) x = 0 while x < 10: print(x) x +...
C
UTF-8
419
3
3
[]
no_license
#include <stdio.h> #include <unistd.h> #include <wait.h> #include <sys/errno.h> int main() { int status; pid_t pid; printf("Hello\n"); pid = fork(); printf("%d\n",!pid); if(pid != 0){ if(waitpid(-1,&status,0) > 0){ if(WIFEXITED(status) != 0){ printf("parent...
SQL
UTF-8
218
2.71875
3
[]
no_license
create table IF NOT EXISTS student ( id bigint primary key AUTO_INCREMENT, name varchar(255) not null, passport_number varchar(255) not null, modified TIMESTAMP AS CURRENT_TIMESTAMP, primary key(id) );
Markdown
UTF-8
10,948
3.078125
3
[]
no_license
--- layout: post title: "Physics" description: "Collision Demo" date: 2019-2-18 categories: image: /assets/Collision/Screenshot_1.png --- All references links are still pending to add. <iframe width="100%" height="315" src="https://www.youtube.com/embed/EDhVRpYAZzA" frameborder="0" allow="accelerometer; autopla...
Java
UTF-8
14,157
1.875
2
[]
no_license
package lx.gs.leaderboard; import cfg.CfgMgr; import cfg.Const; import cfg.bonus.RankType; import common.RefObject; import gnet.link.Onlines; import gs.FixedPriorityQueue; import lx.gs.event.EventModule; import lx.gs.event.RankingRefreshEvent; import lx.gs.family.FFamilyModule; import lx.gs.leaderboard.msg....
C#
UTF-8
1,365
2.703125
3
[]
no_license
using GoogleEarthConversions.Core.KML.Geometry.Attributes; using Xunit; namespace GoogleEarthConventions.Tests.KML.Geometry.Attributes { public class AltitudeModeTests { [Fact] public void AltitudeMode_CanInstantiate() { var sut = new AltitudeMode(); Assert.Not...
Shell
UTF-8
453
3.265625
3
[ "MIT", "Apache-2.0" ]
permissive
#!/usr/bin/env bash # Stop script on NZEC set -e # Stop script if unbound variable found (use ${var:-} if intentional) set -u channel=$1 curl -SLo dotnet-monitor.nupkg.version https://aka.ms/dotnet/diagnostics/monitor$channel/dotnet-monitor.nupkg.version # Read version file and remove newlines monitorVer=$(tr -d '\...
Markdown
UTF-8
1,500
2.625
3
[]
no_license
# Unsupervised Learning Investigation - Clustering - for discrete problems - Used more than it should be because people assume an underlying domain has discrete classes in it. In reality data is continuous. - **K-means Clustering:** NP-hard problem, based on Euclidean distance. Algorithm Steps: a) Find the cl...
Python
UTF-8
2,669
2.84375
3
[]
no_license
import os import sys import time def rw_single(input_path, output_path, results_file): input_file=open(input_path, 'rb') output_file=open(output_path, 'wb') #READ start=time.clock_gettime(time.CLOCK_REALTIME) data=input_file.read() os.fsync(input_file) input_file.close() end=time.clock_gettime(time.CLOCK_REALT...
Java
UTF-8
2,974
3.0625
3
[]
no_license
import java.util.ArrayList; import java.util.List; import java.util.Random; import java.util.function.IntToDoubleFunction; import java.util.function.LongToDoubleFunction; import java.util.stream.Collectors; import java.util.stream.IntStream; import java.util.stream.LongStream; public class Chromosome implements Compar...
C++
UTF-8
5,162
2.5625
3
[]
no_license
// Server side C/C++ program to demonstrate Socket programming #include <unistd.h> #include <stdio.h> #include <sys/socket.h> #include <stdlib.h> #include <netinet/in.h> #include <string.h> #include <iostream> #include <arpa/inet.h> #include <unordered_map> #include <sstream> #include <vector> #include <thread> ...
Java
UTF-8
383
3.03125
3
[]
no_license
package com.javacore; public class MySecondClass { public static void main(String[] args) { MyClass myClass = new MyClass("Neelam"); String name = myClass.getName(); System.out.println("Hi "+name+". How are you?"); MyClass myClass2 = new MyClass(); String returnValue = myClass2.testAndProvi...
JavaScript
UTF-8
6,029
2.5625
3
[]
no_license
var watson = require('watson-developer-cloud'); var fs = require('fs'); var mic = require('mic'); var Forecast = require('forecast'); var wav = require('wav'); var Speaker = require('speaker'); var Sound = require('node-aplay'); var Q = require('q'); var moment = require('moment'); var forecastKey = process.env.FORECA...
C#
UTF-8
976
2.875
3
[ "MIT" ]
permissive
using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Linq; using System.Text; using System.Threading.Tasks; namespace MoviesSite.Models { public class Actor { private ICollection<Movie> maleMovies; private ICollection<Movie> femaleMovies; ...