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
689
3.625
4
[]
no_license
import java.util.Scanner; class Main { public static void main(String[] args) { Scanner myScanner = new Scanner(System.in); int[] myArray = new int[6]; int firstHalf = 0; int secondHalf = 0; String[] numbers = myScanner.next().split(""); for (int i = 0; i < 6; i++) ...
SQL
UTF-8
881
3.4375
3
[]
no_license
create or replace procedure update_pembelian_by_id( p_id in pembelian.id%type, p_id_produk in pembelian.id_produk%type, p_banyak_produk in pembelian.banyak_produk%type, p_harga_produk in pembelian.harga_produk%type, p_id_pemasok pembelian.id_pemasok%type ) as v_kode pembelian.kode%type; v_created_at pembe...
C#
UTF-8
756
3.25
3
[]
no_license
using System; namespace Part1_2 { class Program { static void Main(string[] args) { var startPosition = Console.ReadLine(); var finishPosition = Console.ReadLine(); int stNum = int.Parse(startPosition[1].ToString()); int fshNum = int.Parse(finish...
C++
UTF-8
1,160
2.765625
3
[ "MIT" ]
permissive
#ifndef __SCOPE_H #define __SCOPE_H #include "abstract.h" // --------------------------------------------------------------------------------------------------------------------- // Struct definitions /// a scope is the context in which the compiler and runtime environment resolve references /// and add new ref...
Markdown
UTF-8
1,323
2.734375
3
[ "CC-BY-4.0", "MIT" ]
permissive
--- description: "Learn more about: Compiler Error C3408" title: "Compiler Error C3408" ms.date: "11/04/2016" f1_keywords: ["C3408"] helpviewer_keywords: ["C3408"] ms.assetid: 1f5ea979-fb1e-4214-b310-6fd6ca8249b1 --- # Compiler Error C3408 'attribute': attribute is not allowed on template definitions Attributes canno...
Java
UTF-8
1,924
2.296875
2
[]
no_license
package br.edu.ifsp.spo.bulls.users.api.domain; import javax.persistence.*; import javax.validation.constraints.Email; import javax.validation.constraints.NotBlank; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import java.io.Serializable; import java.time....
Markdown
UTF-8
2,514
3.703125
4
[]
no_license
#### 第三章 函数 把简单的事情做到极致,功到自然成,最终“止于至善”。 ——秋山利辉《匠人精神》 ### 1 什么是函数 - 函数(function)作为数学概念,最早由我国清朝数学家李善兰翻译,出自其著作《代数学》。 - 之所以这么翻译,他给出的理由是“**凡此变数中函彼变数者,则此为彼之函数**”,即函数指一个量随着另一个量的变化而变化,或者说一个量中包含另一个量。 ### 2 软件中的函数 #### 2.1 计算机中函数的定义 在计算机编程中,函数的作用和数学中的定义类似。函数是**一组代码的集合**,是程序中**最小的功能模块**,一次函数调用包括接收参数输入、数据处理、返回结果。 #### 2.2 函数参数 ...
Python
UTF-8
2,105
2.84375
3
[]
no_license
class DeliveryDTO(object): user_email = "" courier_name = "" product_type = "" product = "" city = "" region = "" street = "" marketing_source = "" home = 1 building = 1 delivery_order_date_time = "" delivery_complete_date_time = "" total_sum = 0 # The class "co...
C++
UTF-8
886
2.796875
3
[ "MIT" ]
permissive
/* ------------------------------------------------------------------------------ This software is in the public domain, furnished "as is", without technical support, and with no warranty, express or implied, as to its usefulness for any purpose. File: Player.h Author: Joshua Churning Date: January 28, 2016 ----...
JavaScript
UTF-8
1,203
2.59375
3
[]
no_license
const Cohort = require('../models/cohort.model'); const router = require('express').Router(); // Middle ware const auth = require('./middleware/auth'); // @route GET /cohorts/ // @desc Returns all coherts // @access Public router.route('/').get((req, res) => { Cohort.find({}) .then(coherts => res.send(coh...
Rust
UTF-8
5,060
3.203125
3
[]
no_license
use tetra::graphics::{self, Color, DrawParams, Texture, Rectangle, Camera}; use tetra::math::Vec2; use tetra::{Context, ContextBuilder, State, Event}; use std::collections::HashMap; use serde::{Serialize, Deserialize}; use std::fs::File; use std::io::Read; #[derive(Serialize, Deserialize)] struct MapData { image:...
C++
UTF-8
51,485
2.65625
3
[]
no_license
#include "common.h" #include <numeric> #include <future> #include <stack> #include <unordered_map> #include <unordered_set> #include <bitset> #include <set> #include <queue> #include <assert.h> #include <iostream> #include <vector> #include <map> #include <algorithm> #include <thread> #include <functional> #include <mu...
Python
UTF-8
3,315
2.90625
3
[]
no_license
#!/usr/bin/env python3 # coding: utf-8 from __future__ import print_function import pandas as pd from seq2seq_model import Embedding_Seq2SeqSummarizer import numpy as np import pickle from nltk.translate.bleu_score import sentence_bleu from nltk import word_tokenize import numpy as np from nltk.translate.bleu_score im...
Java
UTF-8
292
2.390625
2
[]
no_license
package com.approxinfinity.retrofitexample.exceptions; import retrofit.RetrofitError; public class NotFoundException extends BaseException { public NotFoundException(RetrofitError error) { super(error); } public NotFoundException() { super(); } }
Markdown
UTF-8
1,305
3.609375
4
[]
no_license
# Baymax's Shopping Trip Baymax has a problem, it is Hiro's birthday and he would like to get him his favorite candy bar. The local store is having a sale, where for every `n` candybars that Baymax buys he gets one free. This sale is especially good in that each free candybar he gets counts as another candybar purchas...
PHP
UTF-8
1,693
2.53125
3
[]
no_license
<?php namespace App\Models; use Illuminate\Notifications\Notifiable; use Illuminate\Foundation\Auth\User as Authenticatable; use Illuminate\Contracts\Auth\MustVerifyEmail; class User extends Authenticatable implements MustVerifyEmail { use Notifiable; /** * The attributes that are mass assignable. ...
Python
UTF-8
2,010
3.671875
4
[]
no_license
# Step 1. Import the necessary libraries import pandas as pd import numpy as np # Step 2. Create the DataFrame with the following values: raw_data = {'regiment': ['Nighthawks', 'Nighthawks', 'Nighthawks', 'Nighthawks', 'Dragoons', 'Dragoons', 'Dragoons', 'Dragoons', 'Scouts', 'Scouts', 'Scouts', 'Scouts'], 'c...
Python
UTF-8
763
4.59375
5
[ "CC-BY-4.0" ]
permissive
#!/usr/bin/python3 simple_array = [1,2,3] my_array = [] my_array.append(1) # Should log: [1,2,3] print(simple_array) # Should log: [1] print(my_array) # Should log: 1 print(len(my_array)) # Basic for in statement. Following : you need a new line with 4 spaces # In this case, there are 4 spaces ahead of print() for ...
Python
UTF-8
155
2.9375
3
[]
no_license
id="ilovepython" s=input("아이디를 입력하시오:") if s==id: print("환영합니다.") else: print("아이디를 찾을 수 없습니다.")
Java
UTF-8
1,397
3.3125
3
[]
no_license
/** * */ package maps; import java.util.HashMap; import java.util.Iterator; import java.util.Map; import sets.Pays; /** * @author fla * */ public class MapPays { /** * @param args */ public static void main(String[] args) { // creez une map permettant de stocker les instances de...
C
UTF-8
200
3.0625
3
[]
no_license
#include<stdio.h> #include<conio.h> void main() { char k,ascii; clrscr(); printf("\nEnter a key from keyboard:"); scanf("%c",&k); printf("ASCII value of %c = %d",k,k); getch(); }
Java
UTF-8
347
1.703125
2
[]
no_license
package cn.edu.sdut.comm; public class CommonUtils { public interface UserInfo{ String USERDAO = "sdut.userdao"; } public interface BillInfo{ String BILLDAO = "sdut.billdao"; } public interface GoodsInfo{ String GOODSDAO = "sdut.goodsdao"; } public interface GoodsTypeInfo{ String TYPEDAO...
Python
UTF-8
3,211
2.53125
3
[ "LicenseRef-scancode-public-domain" ]
permissive
#!/usr/bin/env python3 MASTER_COMMIT = "8fd8f49595389c9198d206fbbb3c06b09e9fbd00" SECRET_PART = "dd02c" FILES_TO_CHANGE = ["main.py"] import pygit2 import sys import os from gitcourselib import check_commit, _logprint # Initialize Repository object repo_path = pygit2.discover_repository(os.getcwd()) repo = pygit2.R...
JavaScript
UTF-8
2,178
2.65625
3
[]
no_license
var assert = require('assert'); function arry2buffer (arry) { var ret = new Buffer(arry.length); for (var i=0; i<arry.length; i++) { ret[i] = arry[i]; } return ret; } function testBuffer () { return arry2buffer([1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3,...
Java
UTF-8
159
1.75
2
[ "Apache-2.0" ]
permissive
package com.example.blockcoverage; public class HasExceptionsTestee { public static void foo(){ String x = null; int y =x.length(); y++; } }
Python
UTF-8
1,459
2.53125
3
[]
no_license
import keras from keras.models import Sequential from keras.layers import Dense, Dropout, Flatten, Conv2D, MaxPooling2D, BatchNormalization, Input def get_cnn_model(input_shape): print("input_shape: " + str(input_shape)) model = Sequential() model.add(Conv2D(64, kernel_size=(3, 3), activation='relu', inp...
Markdown
UTF-8
3,964
2.546875
3
[]
permissive
--- layout: post title: "CKEditor 5 in Nuxt(Vue.js)" subtitle: "Nuxt 에서 ckeditor 적용하기" author: "코마" date: 2019-02-25 01:00:00 +0900 categories: [ "vue", "ckeditor" ] excerpt_separator: <!--more--> --- 안녕하세요 코마입니다. 오늘은 CKEditor 를 Vue.js 에 적용하도록 하겠습니다. CKEditor 는 널리 사용되는 에디터 중에 하나입니다. CKEditor 를 통해 사용자는 게시글을 쉽게 꾸밀 수 ...
Java
UTF-8
174
1.53125
2
[]
no_license
package com.legaoyi.platform.service; import java.util.Map; public interface SecurityService { public Map<?, ?> getUserAccount(String userAccount) throws Exception; }
Java
UTF-8
93
1.765625
2
[]
no_license
package cl.test.todolist.defaultModel; public interface DefaultModel<T> { T create(); }
Java
UTF-8
261
1.875
2
[ "MIT" ]
permissive
package com.jaigo.agfxengine.view.listeners; // OnDragListener // // Created by Jeff Gosling on 08/01/2015 import com.jaigo.agfxengine.view.BaseView; public interface OnDragListener { public boolean onDrag(BaseView view, float dragPercentX, float dragPercentY); }
C++
UTF-8
485
2.765625
3
[ "MIT" ]
permissive
#ifndef UI_MENU_H #define UI_MENU_H #pragma once #include <string> #include <vector> #include "ui_component.h" #include "menu_item.h" namespace ui { class Menu { public: Menu(std::string name, const std::vector<MenuItem>& items) : _name(name), _child(items) {} ~Menu() {} void set_name(const std::string name) ...
Python
UTF-8
12,034
2.859375
3
[ "MIT" ]
permissive
import copy import json import os import sys import warnings from typing import Any, Dict, IO, Iterator, List, Optional, Union from jsonschema import Draft4Validator, RefResolver, ValidationError from pkg_resources import resource_filename package_name = 'starfish' class SpaceTxValidator: def __init__(self, sc...
JavaScript
UTF-8
5,981
2.921875
3
[ "MIT" ]
permissive
window.onload = initialize; //Espera a que se cargué la página para llamar a la función ==> function initialize(){} var formBookings; var refBookings; var tbodyTableBookings; var CREATE = "DONE"; var UPDATE = "MODIFY"; var modo = CREATE; var refBookingToEdit; function initialize() { formBookings = document.getElem...
JavaScript
UTF-8
1,245
2.8125
3
[]
no_license
const request = require('request'); const cheerio = require('cheerio'); /** * функция парcинга сайта, возвращает промисс * @param {string} url * @param {number} count */ function getNews(category, count) { const URL = 'https://habrahabr.ru/flows/' + category; return new Promise((resolve, reject) => { ...
C#
UTF-8
1,761
2.578125
3
[]
no_license
namespace Project2020 { using System.Collections; using UnityEngine; public class Door : MonoBehaviour, IInteractable { [SerializeField] private Animator m_Animator = null; [SerializeField] private GameObject m_Player = null; // Depending from which direction you open the door...
Markdown
UTF-8
11,198
2.8125
3
[]
no_license
--- title: MySQL · 引擎特性 · Group Replication内核解析 category: default tags: - mysql.taobao.org created_at: 2020-09-14 16:18:18 original_url: http://mysql.taobao.org/monthly/2017/08/01/ --- [ # 数据库内核月报 - 2017 / 08 ](http://mysql.taobao.org/monthly/2017/08) [›](http://mysql.taobao.org/monthly/2017/08/02/) * [当期文章](...
Python
UTF-8
2,663
2.9375
3
[]
no_license
# Yokeder.py # -*- coding:utf-8 -*- import socket import random import sys import threading from scapy.all import * print('...Yok eder Scriptini kullandığınız için teşekkürler web sitemizi ziyaret etmeyi unutmayın!!! :bilgisayaradair.ml') usage ="""############# HELP ################# python ...
PHP
UTF-8
354
2.59375
3
[]
no_license
<?php declare(strict_types=1); namespace GuldenWallet\Backend\Application\Settings; use RuntimeException; class SettingNotFoundException extends RuntimeException { /** * @param string $key * @return self */ public static function forKey(string $key): self { return new static("Setti...
Shell
UTF-8
4,771
3.4375
3
[ "MIT" ]
permissive
#!/usr/bin/env bash set -o noclobber set -o errexit set -o pipefail set -o nounset ambit_db_user="${AMBIT_DB_USER:-ambit}" ambit_db_pass="${AMBIT_DB_PASS:-ambit}" ambit_users_db="${AMBIT_USERS_DB:-ambit_users}" ambit_databases="${AMBIT_DATABASES:-ambit}" ambit_base='/opt/ambit' ambit_tmp="${ambit_base}/tmp" ambit_sq...
Markdown
UTF-8
7,527
3.1875
3
[]
no_license
## 1. 逻辑回归 ### Q1 LR与线性回归的区别与联系 逻辑回归是一种广义线性模型,它引入了Sigmoid函数,是非线性模型,但本质上还是一个线性回归模型,因为除去Sigmoid函数映射关系,其他的算法都是线性回归的。 逻辑回归和线性回归首先都是广义的线性回归,在本质上没多大区别,区别在于逻辑回归多了个Sigmoid函数,使样本映射到[0,1]之间的数值,从而来处理分类问题。另外逻辑回归是假设变量服从伯努利分布,线性回归假设变量服从高斯分布。逻辑回归输出的是离散型变量,用于分类,线性回归输出的是连续性的,用于预测。逻辑回归是用最大似然法去计算预测函数中的最优参数值,而线性回归是用最小二乘法去对自变量量关系进行拟合。 ###...
Java
UTF-8
817
3.34375
3
[]
no_license
package classworks.march2018.mar062018.homework.task2; public class DepositAccountRunner { public static void main(String[] args) { DepositAccount.setYearInterest(4); DepositAccount saver1 = new DepositAccount(2000); DepositAccount saver2 = new DepositAccount(3000); printInformation...
JavaScript
UTF-8
1,115
3.046875
3
[]
no_license
var count = 0; function AddItemToList() { var Item = document.getElementById('input').value; var CreateList = document.createElement("li"); var checkBox = document.createElement("input"); var deleteBtn = document.createElement("input"); var listId = "list" + count; var Task = document.c...
Markdown
UTF-8
395
3.40625
3
[ "MIT" ]
permissive
# repeat Repeats the given element by the given count of times. ## Type signature <!-- prettier-ignore-start --> ```typescript (count: number) => (value: any) => any[] ``` <!-- prettier-ignore-end --> ## Examples <!-- prettier-ignore-start --> ```javascript repeat(3)("test"); // ⇒ ["test", "test", "test"] ``` <!--...
C#
UTF-8
3,088
3.1875
3
[]
no_license
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; //CS8ex - Juan Marquez- CIS162AD /* This project uses classes to calculate gross and net pay. Shared (static) variables are used in class to accum...
Python
UTF-8
426
3.109375
3
[]
no_license
class Solution(object): def lengthOfLongestSubstring(self, s): """ :type s: str :rtype: int """ start = max_length = 0 hash = {} for i, v in enumerate(s): if v in hash and start <= hash[v]: start = hash[v] + 1 else: ...
C++
UTF-8
5,503
2.890625
3
[]
no_license
/* * File: DHT11.cpp * Author: natalia * * Created on 4 de Dezembro de 2019, 09:05 */ #include "DHT11.h" #include "GPIO.h" //----- Auxiliary data ----------// enum DHT_Status_t __DHT_STATUS; #define __DHT_Temperature_Min 0 #define __DHT_Temperature_Max 50 #define __DHT_Humidity_Min 20 #define __DHT_Humidit...
Java
UTF-8
381
2.34375
2
[]
no_license
package graphics.font; import org.eclipse.swt.widgets.Display; public class Bug271024_DeviceLoadFont { public static void main(String[] args) { Display display = new Display(); if(display.loadFont("garbage.ttf")) { System.out.println("Should not have got here!"); } else { System.out.println("OK, this gr...
C++
UTF-8
1,646
2.65625
3
[]
no_license
#include "BallCushionCollision.h" #include "Cushion.h" #include "R3.h" #include "SnooCommons.h" BallCushionCollision::BallCushionCollision( double t, BallPosition & _ball, Cushion & _cushion): Collision(t), ball(_ball), cushion(_cushion) { } void BallCushionCollision::apply(void) { #define CUSHION_LOSS 0....
C++
UTF-8
902
3.359375
3
[]
no_license
#include "binary_search_deluxe.hpp" int binary_search_deluxe::first_index_of(const std::vector<term> &a, const term &key, const term::Func &comparator) { int leftBound = -1; int rightBound = a.size(); while (leftBound + 1 != rightBound) { int middle = (leftBound + rightBound) / 2; if (!com...
Go
UTF-8
3,993
3.078125
3
[ "MIT" ]
permissive
package library import ( "reflect" "testing" ) func Test_replaceByKey(t *testing.T) { type args struct { msg *FluentMsg v string } msgOrig := &FluentMsg{ Message: map[string]interface{}{ "a": "aaaa", "b": "bbbb", "LA": "AAAA", "LB": "BBBB", "int": 123, "float": 1.21, ...
Swift
UTF-8
4,051
2.75
3
[ "Apache-2.0" ]
permissive
// // FilePersistentStorage.swift // DigiMeSDK // // Created on 23/02/2022. // Copyright © 2022 digi.me Limited. All rights reserved. // import Foundation public class FilePersistentStorage { private var location: FileManager.SearchPathDirectory = .documentDirectory public required init(with loc...
Java
UTF-8
4,882
2.609375
3
[]
no_license
package fr.ensimag.deca.tree; import fr.ensimag.deca.DecacCompiler; import fr.ensimag.deca.context.ContextualError; import fr.ensimag.deca.tools.IndentPrintStream; import fr.ensimag.ima.pseudocode.Line; import fr.ensimag.ima.pseudocode.Label; import fr.ensimag.ima.pseudocode.instructions.WSTR; import fr.ensimag.ima.ps...
Shell
UTF-8
2,518
4.21875
4
[ "Apache-2.0" ]
permissive
#!/bin/bash # # # Usage: Test execdir srcdir file1 ... filen # # Like regression testing, except we display the CPU time. # if [ $# -lt 1 ]; then echo "Usage: $0 <exec> test1 test2 ..." echo "Runs executable on each test file and compares execution times." exit fi btotal="0" utotal="0" current=`pwd` prefix=`m...
Python
UTF-8
6,488
2.84375
3
[]
no_license
from helper import build_corpus, process import glob, nltk, os import matplotlib.pyplot as plt # Gather corpora base_dir = '/Users/jtim/Dropbox/Academic/sources/corpora/' bahaullah = build_corpus('{}bahai-works/data/'.format(base_dir), ['bahaullah'], ['ar']) abdulbaha = build_corpus('{}bahai-works/data/'.format(base_d...
Python
UTF-8
762
3.75
4
[]
no_license
name= input("Enter a name: ") place= input("Enter a place: ") adjective1= input("Enter an adjective: ") food1= input("Enter a food: ") food2= input("Enter another food: ") verb= input ("Enter a verv: ") adverb= input("Enter an adverb: ") noun= input("Enter a noun: ") adjective2= input("Enter an adjective: ") print ("L...
Java
UTF-8
23,062
1.523438
2
[]
no_license
package com.c323proj10.jillpena; import com.c323proj10.jillpena.R; import android.Manifest; import android.annotation.SuppressLint; import android.annotation.TargetApi; import android.app.AlertDialog; import android.app.ProgressDialog; import android.content.Context; import android.content.DialogInterface; i...
Java
UTF-8
3,116
2.171875
2
[]
no_license
package com.notepoint.stackoverflowmvc.screens.questionDetails; /* Created by Suman on 5/13/2020. */ import android.text.Html; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ProgressBar; import android.widget.TextView; import androidx.appcompat....
Java
UTF-8
3,212
2.296875
2
[]
no_license
package br.gov.deputados; import java.util.HashMap; import java.util.Map; import com.gargoylesoftware.htmlunit.WebClient; import com.gargoylesoftware.htmlunit.html.HtmlElement; import com.gargoylesoftware.htmlunit.html.HtmlPage; public class LerSiteTerraEleicoes2010 { public Map<String, String> mapEstados = new Ha...
Java
UTF-8
1,754
2.234375
2
[]
no_license
package edu.poly.controller; import java.util.List; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PostMapping; import org.springframew...
C++
UTF-8
5,467
3
3
[ "MIT" ]
permissive
/** * @file MPIWrapper.h * @author Argishti Ayvazyan (ayvazyan.argishti@gmail.com) * @brief Declaration for MPIWrapper. * @date 12-11-2020 * @copyright Copyright (c) 2020 */ #pragma once #include <string> #include <vector> #include <map> #include <optional> #include <span> namespace...
SQL
UTF-8
4,864
4.09375
4
[ "MIT" ]
permissive
DB::select('cod_services.cod as codigo','cod_services.description as descricao','services.id','services.active','services.requirer')->from('services')->join('cod_services', function($join) {$join->on('services.cod_service_id', '=', 'cod_services.id');})->where('services.requirer', '=', 'nailson')->get(); DB::table('se...
C++
UTF-8
1,124
2.796875
3
[]
no_license
#pragma once #include <glm/gtc/matrix_transform.hpp> #include <glm/mat4x4.hpp> #include <vector> #include "ev_math.h" namespace ev { using std::tuple; class Body; class Shape { public: Vec2 m_pos{}; Vec2 m_velocity{}; }; class Polygon : public Shape { private: real m_rotation{}; void compute_face_normals(...
C++
UTF-8
705
2.640625
3
[ "Unlicense", "LicenseRef-scancode-public-domain" ]
permissive
#include <cstdio> const int numbers[10][2] = { { 6, 8 }, { 35, 49 }, { 204, 288 }, { 1189, 1681 }, { 6930, 9800 }, { 40391, 57121 }, { 235416, 332928 }, { 1372105, 1940449 }, { 7997214, 11309768 }, { 46611179, 65918161 } }; int main() { for (int i = 0; i < 10; ++i) ...
Python
UTF-8
756
4.34375
4
[ "MIT" ]
permissive
# Powerful digit counts; problem 63 from ProjectEuler # =Problem Description= # The 5-digit number, 16807=7^5, is also a fifth power. Similarly, the 9-digit # number, 134217728=8^9, is a ninth power. # How many n-digit positive integers exist which are also an nth power? # import sys # sys.setrecursionlimit(1001) ...
Java
UTF-8
7,647
2.078125
2
[]
no_license
package cn.com.deepdata.streamflume.interceptor; import java.io.UnsupportedEncodingException; import java.lang.reflect.Type; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import org.apache.flume.Context; import org.apache.flume.Event; import org.apache.flume.event....
Java
UTF-8
1,011
2.015625
2
[ "Apache-2.0" ]
permissive
package com.example.imetu.imet.Activity; import android.graphics.Bitmap; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.View; import android.widget.ImageView; import com.example.imetu.imet.Image.ResultHolder; import com.example.imetu.imet.R; public class ImagePreview e...
JavaScript
UTF-8
1,065
2.859375
3
[ "MIT" ]
permissive
const fs = require("fs"); var fetch = require("node-fetch"); import { loadingFile, missingSession, inputFetching } from "../constants"; async function fetchInput( year = 2019, day = 1, session = "", path = "./input.txt" ) { const data = await fetch( `https://adventofcode.com/${year}/day/${day}/input`, ...
Python
UTF-8
4,916
3.328125
3
[]
no_license
from copy import deepcopy from box import Box class Sudoku: def __init__(self, initial_grid): self.initial_grid = initial_grid # une grille de box def solve(self): print("Starting sudoku resolution") res = self.backtracking_search(deepcopy(self.initial_grid)) if res: ...
Markdown
UTF-8
4,607
3.5
4
[ "MIT" ]
permissive
# Jest Axios ## Introduction Jest Axios is a [Jest](https://jestjs.io/) plugin that simplifies the process of mocking [axios](https://github.com/axios/axios) requests during testing. It fully utilizes Jest's built-in capabilities for mocking functions, and will automatically override requests made using axios through...
PHP
UTF-8
762
2.984375
3
[]
no_license
<?php include 'credentials.php'; // Create connection $conn = new mysqli($servername, $username, $password, $dbname); // Check connection if ($conn->connect_error) { die("Connection failed: " . $conn->connect_error); } $input = json_decode(file_get_contents('php://input'), true); foreach ($input as $tank) { //S...
Java
UTF-8
2,328
2.875
3
[]
no_license
package com.tong.test; import java.util.List; import java.util.Scanner; import com.tong.biz.EmpBiz; import com.tong.biz.impl.EmpBizImpl; import com.tong.entity.Emp; public class Test { public static void main(String[] args) { Scanner scan = new Scanner(System.in); EmpBiz empbiz = new EmpBizImpl(); ...
C++
UTF-8
1,476
3.6875
4
[]
no_license
#include <iostream> // the dimension must be a constant expression unsigned cnt = 42; // not a constant expression constexpr unsigned sz = 42; // constant expression // constexpr see § 2.4.4 (p. 66) int arr[10]; // array of ten ints int *parr[sz]; // array of 42 pointers to int string bad[cnt]; // error: cnt is not a ...
PHP
UTF-8
444
2.609375
3
[]
no_license
<?php /** * File was created 08.10.2015 19:11 */ namespace PeekAndPoke\Component\Slumber\Data\Addon\PublicReference; /** * @author Karsten J. Gerber <kontakt@karsten-gerber.de> */ interface PublicReferenceGenerator { public const SERVICE_ID = 'slumber.data.addon.public_reference.generator'; /** * @p...
Markdown
UTF-8
1,725
3.921875
4
[ "BSD-3-Clause", "CC-BY-SA-4.0", "CC-BY-4.0" ]
permissive
--- title: Basic Syntax --- # Basic Syntax A PHP script can be placed anywhere in the document. A PHP script starts with `<?php` and ends with `?>` Below, we have an example of a simple PHP file, with a PHP script that uses a built-in PHP function "echo" to output the text "Hello World!" on a web page ````<!DOCTYPE...
C++
UTF-8
1,333
2.640625
3
[]
no_license
#include "gameCube.hpp" GameCube::GameCube(const std::string &name,GLuint programm,double size, glm::vec3 color,std::vector<glm::vec3> offset,const std::string &t): GameObject(name,programm,offset) { this->textureName = t; this->colorValue = color; } void GameCube::makeObject() { std::cout << "make Cube" <<std::e...
Markdown
UTF-8
1,398
3.046875
3
[]
no_license
--- layout: post title: The importance of hand gestures in the communication --- In a recent [paper](https://royalsocietypublishing.org/doi/10.1098/rspb.2020.2419) researchers evaluated the effects of hand gestures on the effectiveness of communication. And apparently, people remember better if gestures are used w...
PHP
UTF-8
3,809
2.90625
3
[ "X11", "MIT" ]
permissive
<?php /** * @file Session.php * @brief The SessionManager class * @details This file contains the SessionManager class * @author Thibaud Canaud * @date 11-10-2016 * @par License * * * Copyright © 2016, Thibaud CANAUD * Permission is hereby granted, free of charge, to any person obtaining * ...
Markdown
UTF-8
16,860
2.703125
3
[]
no_license
###### Dethroning the dollar # America is weaponising its currency and financial system ##### Its use of sanctions could endanger the dollar in the long term ![image](images/20200118_BBD001_0.jpg) > Jan 18th 2020 EVER SINCE the dollar cemented its role as the world’s dominant currency in the 1950s, it has been...
Markdown
UTF-8
1,063
2.671875
3
[]
no_license
# Projeto Estoque Básico Descrição ------- ``` Este programa permite cadastrar, editar e excluir itens, a fim de criar um banco de dados conforme a necessidade do usuário. *O cadastro conta com os seguintes campos: - Nome - N° de Itens em Estoque - Preço Unitário - Categorias *Por padrão, estão cadastr...
Shell
UTF-8
1,935
3.28125
3
[]
no_license
DATE="$(date +"%Y.%b.%d_%H.%M")" echo "running: flow_prepare_for_development.sh" echo "--------- dropbox status" dropbox status echo " " echo "1. Cleaning" echo -n " 1.1 delete logs to obtain space (rm -rf ~/Dropbox/my_code/RoR/code/aptana/flow/log/*)..." rm -rf ~/Dropbox/my_code/RoR/code/aptana/flow/log/* echo ...
Python
UTF-8
1,510
4.25
4
[ "MIT" ]
permissive
upper=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"] upper_new=[] lower=["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"] lower_new=[] number=["0","1","2","3","4","5","6","7","8","9"] number_new=[] char...
PHP
UTF-8
744
2.71875
3
[]
no_license
<?php namespace MyString\View\Helper; use Zend\View\Helper\AbstractHelper; class FormHelper extends AbstractHelper { /** * @var string */ private $action; /** * @var string */ private $submit; public function __invoke($action, $submit) { $this->action = $action; ...
C++
UTF-8
3,380
2.875
3
[]
no_license
#include "FragTrap.hpp" #include "ClapTrap.hpp" #include <ctime> FragTrap::FragTrap(void) : ClapTrap(100, 100, 100, 100, 1, "default name", 30, 20, 5) { std::cout << "FR4G-TP : Booting sequence complete. Hello! I am your new steward bot. Designation: " << this->_name << "." << std::endl; } FragTrap::FragTrap(std::st...
Java
UTF-8
2,630
2.203125
2
[ "AFL-3.0" ]
permissive
// // Copyright (c) 2007, Brian Frank and Andy Frank // Licensed under the Academic Free License version 3.0 // // History: // 26 Dec 07 Brian Frank Creation // package fan.std; import java.util.regex.*; import fan.sys.*; import fanx.main.Sys; import fanx.main.Type; /** * RegexMatcher */ public final class Rege...
Python
UTF-8
363
3.0625
3
[ "WTFPL", "MIT" ]
permissive
w, h = 4, 100 list_of_gedung = [[0 for x in range(w)] for y in range(h)] def load_gedung(filename): x = 0 with open(filename) as file: for line in file: titik = [int(n) for n in line.strip().split(',')] list_of_gedung[x//4][x%4] = titik x = x + 1 print(x//4) loa...
SQL
UTF-8
4,063
3.296875
3
[]
no_license
-- PRE: You are running APEX 5.0 or higher. -- Oracle Express 11gR2 comes with APEX 4.0.2. The apex_json stuff DNE here. -- https://www.oracle.com/technetwork/developer-tools/apex/learnmore/upgrade-apex-for-xe-154969.html -- Yup, I was able to upgrade to APEX 5.0.4. -- -- The API reference for apex_json is here: -- ht...
Markdown
UTF-8
951
2.609375
3
[]
no_license
# Three.js Blender Import/Export Imports and exports Three.js' ASCII JSON format. ## Installation Copy the io_mesh_threejs folder to the scripts/addons folder. If it doesn't exist, create it. The full path is OS-dependent (see below). Once that is done, you need to activate the plugin. Open Blender preferen...
Python
UTF-8
92
2.890625
3
[]
no_license
import copy a = [1,2,[3, 4]] b = copy.deepcopy(a) b[2][0] = -100 print('a:',a) print('b:',b)
JavaScript
UTF-8
697
3.609375
4
[]
no_license
//Lista de Compras let listaDeCompras = ["redbull", "uva", "leite", "carne", "batata"]; console.log("O método pop"); console.log(listaDeCompras.pop()); console.log(listaDeCompras); console.log("\n"); console.log("O método push"); console.log(listaDeCompras.push("milho", "sabão em pó")); console.log(listaDeCompras);...
JavaScript
UTF-8
582
3.703125
4
[]
no_license
let arr = ['a', 'o', 'e', 'u', 'i']; let arr1 = []; let count = 0; let a = prompt("nhập ký tự"); function checkSoKyTu(string) { for (let i = 0; i < string.length; i++) { for (let j = 0; j < arr.length; j++) { if (string[i] === arr[j]) { arr1.push(string[i]); coun...
Java
UTF-8
2,361
2.53125
3
[]
no_license
package my.chat.logging; import my.chat.commons.FilePaths; import my.chat.commons.Helper; import org.apache.log4j.Logger; import org.apache.log4j.PropertyConfigurator; public class Log { private static final Logger LOGGER; static { PropertyConfigurator.configure(FilePaths.LOG_PROPERT...
JavaScript
UTF-8
1,592
3.109375
3
[]
no_license
//Class WaveShaper export default class WaveShaper{ //DISTORTION BRO constructor(audioCtx){ this.audioCtx=audioCtx this.distortion = audioCtx.createWaveShaper(); this.distortion.curve = this.makeDistortionCurve(400); //check how it sounds and map the value from 0 to maybe something this.distortion.o...
Java
UTF-8
322
1.804688
2
[]
no_license
package cn.wolfcode.crm.mapper; import cn.wolfcode.crm.domain.CustomerTransferHistory; import cn.wolfcode.crm.query.QueryObject; import java.util.List; public interface CustomerTransferHistoryMapper { int insert(CustomerTransferHistory record); List<CustomerTransferHistory> selectForList(QueryObject qo); ...
JavaScript
UTF-8
486
3.0625
3
[ "MIT" ]
permissive
var MODERN_ACTIVITY= 15; var HALF_LIFE_PERIOD= 5730; var k = 0.693 / HALF_LIFE_PERIOD; module.exports = function dateSample(sampleActivity) { var b = parseFloat(sampleActivity) if (/[a-zA-z]/.test(sampleActivity) == true){ return false } if (sampleActivity > MODERN_ACTIVITY) return false; if (sampleAc...
JavaScript
UTF-8
610
2.53125
3
[]
no_license
/* eslint-disable no-console */ import { status, json, endPoint, options, } from './api'; import createList from './data'; const loadingApi = () => { const content = document.getElementById('content'); content.innerHTML = '<img src="./images/additional/loading-api.gif" alt="loading" class="loading">'; content....
C++
UTF-8
1,217
3.890625
4
[]
no_license
#include<iostream> using namespace std; //Program which declares whether or not a meeting may go ahead //If it's legal, it tells you how many additional people are allowed //If it contravenes fire regulations, it tells you how many need to be excluded //This program allows the user to enter the calculation as many...
Python
UTF-8
681
3.953125
4
[]
no_license
# 1. В диапазоне натуральных чисел от 2 до 99 определить, сколько из них кратны каждому из чисел в диапазоне от 2 до 9. # Примечание: 8 разных ответов. # Создадим словарь, где ключами будут цифры, кратность которым мы проверяем, а значениями - счетчики. divs = dict.fromkeys(range(2, 10), 0) for key, value in di...
Java
UTF-8
4,629
3.046875
3
[]
no_license
package com.dzidzoiev.opencv; import java.awt.image.BufferedImage; import java.awt.image.DataBufferByte; import org.opencv.core.Mat; import javafx.application.Platform; import javafx.beans.property.ObjectProperty; import javafx.embed.swing.SwingFXUtils; import javafx.scene.image.Image; import javafx.scene.*; import ...
JavaScript
UTF-8
2,271
3.203125
3
[]
no_license
class Board extends React.Component { constructor() { super(); this.state = { items: [ { text: "focus", state: 1 }, { text: "learn react", state: 2 }, { text: "clean up", state: 0 }, { text: "take break", state: 0 } ...
C#
UTF-8
5,911
3.3125
3
[ "MIT" ]
permissive
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.IO; using TressFXLib.Numerics; namespace TressFXLib { class Utilities { private static Random rand = new Random(); //-----------------------------------------------------------------------------...