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
C++
GB18030
4,863
2.859375
3
[]
no_license
#include "include\LRContext.h" void LRContext::produc_analyze( const string& line, const string& arrow, const string& delim, const vector<string>& terminators, const vector<string>& non_terminators, vector<Produc>& producs, map<string, set<size_t>>& produc_map) { if (non_terminators.empty() || terminators.empty())...
PHP
UTF-8
609
2.703125
3
[ "MIT" ]
permissive
<?php use Illuminate\Database\Seeder; use Illuminate\Support\Facades\DB; class TeacherExperienceTableSeeder extends Seeder { /** * Run the database seeds. * * @return void */ public function run() { $values = [ 'меньше года', 'от 1 до 5 лет', ...
Python
UTF-8
3,344
2.578125
3
[]
no_license
import abc import quantities as pq import numpy as np from contextlib import contextmanager from .simplify import simplify class HemeLbParameters(object): __metaclass__ = abc.ABCMeta ReferencePressure = 0.0 * pq.mmHg Density = 1e3 * pq.kilogram / pq.metre**3 DynamicViscosity = 0.004 * pq.pas...
Java
UTF-8
2,838
3.234375
3
[]
no_license
public class GetSetTest{ public static void main(String[] args){ ProjectManager e1 = new ProjectManager("alpha", "201912", 4000); Project p1 = new Project("lta", 100000, true); Project p2 = new Project("dummy"); e1.addProject(p2); int num = ...
PHP
UTF-8
3,278
2.515625
3
[ "BSD-3-Clause", "MIT", "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
<?php /** * This file is part of the OpenPNE package. * (c) OpenPNE Project (http://www.openpne.jp/) * * For the full copyright and license information, please view the LICENSE * file and the NOTICE file that were distributed with this source code. */ /** * opGDataDocumentEntry * * @package opWebAPIPlugin...
Python
UTF-8
482
3.703125
4
[]
no_license
evenNumber = [2,4,6,8,10] oddNumber = [1,3,5,7,9] print(evenNumber) evenNumber.extend(oddNumber) print(evenNumber) #sorting evenNumber.sort() print(evenNumber) #sorting in reverse evenNumber.sort(reverse = True) print(evenNumber) #sum of all elements print(sum(evenNumber)) print(min(evenNumber)) print(max(evenNumber)) ...
Go
UTF-8
578
2.9375
3
[]
no_license
package dcp025 import ( "fmt" "testing" ) func TestMatch(t *testing.T) { var tests = []struct { pattern string input string match bool }{ {".*at", "chat", true}, {".*at", "chats", false}, {"a*b*c*", "aaabbc", true}, {"a*b*c*", "aaabb", true}, {"a*b*c*", "aaa", true}, {"a*b*c*", "", true}, ...
Java
UTF-8
2,885
2.140625
2
[]
no_license
package com.apress.controller; import java.net.URI; import java.util.Collection; import java.util.Optional; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpHeaders; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org...
Java
UTF-8
1,403
3.234375
3
[]
no_license
package com.minhnhat.element.sorting; import java.util.ArrayList; import java.util.Collections; import java.util.List; public class RenderCalendar { public static class Event { public int start, finish; public Event(int start, int finish) { this.start = start; this.finish = finish; } } ...
Python
UTF-8
1,231
3.484375
3
[]
no_license
import csv, os votes_total = 0 candidates = dict() proportion = dict() file = open("election_data.csv", 'r') poll_reader = csv.reader(file) next(poll_reader) #skip header row file.close #fills candidates dictionary with names as keys, votes counted as values for row in poll_reader: votes_total += 1 #counts to...
JavaScript
UTF-8
3,892
2.84375
3
[]
no_license
'use strict'; import React from 'react'; import { AppRegistry, StyleSheet, Text, View, Platform, Switch, } from 'react-native'; class BasicSwitchExample extends React.Component { state = { trueSwitchIsOn: true, falseSwitchIsOn: false, }; render() { return ( <View> <Switch ...
C++
UTF-8
1,495
2.625
3
[]
no_license
// https://codeforces.com/problemset/problem/731/A #include <bits/stdc++.h> using namespace std; #define int long long #define fast ios_base::sync_with_stdio(false) ; cin.tie(0) ; cout.tie(0) ; #define endl '\n' void solve() { // string abc = "abcdefghijklmnopqrstuvwxyz" ; string str ; cin >> ...
C++
UTF-8
2,686
3.1875
3
[]
no_license
/* * https://leetcode.com/problems/pancake-sorting/ * (c) Mohammad Hasanzadeh Mofrad, 2020 * (e) m.hasanzadeh.mofrad@gmail.com */ class Solution { public: bool isSorted(std::vector<int> arr) { bool sorted = true; int m = arr.size(); for(int i = 0; i < m-1; i++) { ...
C++
UTF-8
7,451
4.1875
4
[]
no_license
#include <cmath> #include <iostream> #include <unordered_map> using namespace std; /* One Away: There are three types of edits that can be performed on strings: insert a character, remove a character, or replace a character. Given two strings, write a function to check if they are one edit (or zero edits) away. */ /*...
C#
UTF-8
2,760
3.015625
3
[]
no_license
using System; using System.Collections.Generic; using System.IO.Ports; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ModbusSurvey { class NodeCOM:Node { /// <summary> /// Список устройств узла /// </summary> //public List<Device> Devices...
Python
UTF-8
2,045
2.71875
3
[]
no_license
import psycopg2 import matplotlib.pyplot as plt from inserts import * def show_rating_graphic(player_id, control_type, conn): with conn.cursor() as cursor: query = """select distinct t2.game_date, sum(t1.rating_delta) over(order by t2.game_date) from playerinrealgame t1 inner join realgame t2 ...
Java
UTF-8
4,268
2.234375
2
[ "MIT" ]
permissive
package org.xwiki4.test; import static org.junit.Assert.assertEquals; import java.io.File; import java.io.IOException; import org.apache.log4j.Logger; import org.junit.FixMethodOrder; import org.junit.Test; import org.junit.runners.MethodSorters; import org.xwiki4.BadLinks; @FixMethodOrder(MethodSorters.NAME_ASCEND...
Markdown
UTF-8
559
2.515625
3
[]
no_license
# Software Debouncing ## Purpose To change the PWM of an LED with a button press on all boards. ## Theory The pulse width modulation (PWM) is caused by changing the width of the signal sent by altering when the Timer interrupt. Since the timer interrupts when the value of the CRR# register is reached. That value of t...
Java
UTF-8
303
1.679688
2
[]
no_license
package UnitTests; import alg.ZeroOne; public class Examples_1 { public ZeroOne zeroOneArray_1[] = { new ZeroOne(1), new ZeroOne(1), new ZeroOne(0), new ZeroOne(1) }; public ZeroOne zeroOneArray_2[] = { new ZeroOne(1), new ZeroOne(1), new ZeroOne(0), new ZeroOne(1) }; }
C++
UTF-8
2,042
3.5
4
[]
no_license
/// find_first_not_of /// /// Searches through first range for the first element that does not belong the second input range. /// This is very much like the C++ string find_first_not_of function. /// /// Returns: The first iterator i in the range [first1, last1) such that for some /// integer j in the ran...
Java
UTF-8
370
2.609375
3
[]
no_license
import java.io.IOException; import java.nio.file.Files; import java.nio.file.Paths; class Main { public static void main(String[] args) throws IOException { long result = Files.lines(Paths.get("D:\\Downloads\\dataset_91065.txt")).mapToInt(Integer::parseInt).takeWhile(x -> x > 0).filter(x -> x % 2 == 0).cou...
Java
UTF-8
3,544
2.390625
2
[]
no_license
package it.unicam.cs.pa.jbudget105181.Model.Transaction; import it.unicam.cs.pa.jbudget105181.Model.Account.AccountType; import it.unicam.cs.pa.jbudget105181.Model.Account.IAccount; import it.unicam.cs.pa.jbudget105181.Model.IFactory; import it.unicam.cs.pa.jbudget105181.Model.Movement.IMovement; import it.unicam.cs.p...
C++
SHIFT_JIS
3,616
2.625
3
[]
no_license
//======================================================== // // [Gl~[̏]: // // //======================================================== #include "enemy.h" #include "manager.h" #include "renderer.h" #include "scene.h" #include "bullet.h" //ÓIoϐ LPDIRECT3DTEXTURE9 CEnemy::m_apTexture[MAX_TEX] = {}; CEnemy::ENEMYTYPE...
Python
UTF-8
5,105
2.5625
3
[]
no_license
import unittest from iogen.constraints import verify_types from iogen.dsl.simple import get_list_dsl from iogen.io import test_io, generate_interesting def generate_examples(*args, **kwargs): kwargs.update( { "num_examples": kwargs.get("num_examples", 10), "timeout": kwargs.get("t...
Python
UTF-8
1,431
2.578125
3
[]
no_license
import datetime as dt from functools import wraps from flask_restful import abort, request import jwt from config import Config def validate_token(token: str): if not token: abort(401, detail="Token is missing", status=401, ok=False) try: token_data = jwt.decode( token, key=Confi...
Shell
UTF-8
2,475
2.90625
3
[]
no_license
# Lines configured by zsh-newuser-install HISTFILE=~/.histfile HISTSIZE=10000 SAVEHIST=1000 X=$(which most 2> /dev/null) [[ $? = 1 ]] && PAGER=less || PAGER=most export PAGER export EDITOR=vim export JAVA_HOME=/usr/lib/jvm/default-java alias tmux="TERM=xterm-256color tmux" setopt appendhistory autocd nomatch unsetop...
C++
UTF-8
689
3.59375
4
[]
no_license
#include <iostream> struct base { virtual ~base() = default; virtual void print() const = 0; }; struct derived : public base { virtual void print() const { std::cout << "hello world\n"; } }; struct test { void print() const { std::cout << "testing\n"; } }; struct stuff { ...
Java
UTF-8
27,848
2.21875
2
[ "BSD-2-Clause" ]
permissive
// // FilePattern.java // /* OME Bio-Formats package for reading and converting biological file formats. Copyright (C) 2005-@year@ UW-Madison LOCI and Glencoe Software, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Fr...
Markdown
UTF-8
6,751
3.609375
4
[]
no_license
--- { "title": "Vue render", "lang": "zH", "description": "此篇主要介紹 vue 組件的render", "meta": [{"name":"keywords", "content":"vue component, vue, vue render"}], "tags": ['Vue'], "sidebarDepth": "2" } --- # render ## 1. render 函數是什麼? 一般來說,在Vue中我們使用模板HTML來組建頁面,使用render function 我們可以使用js來構建DOM<br> 因為vue是 virtual...
Python
UTF-8
1,769
2.65625
3
[]
no_license
import sys import time # group with 9 group1 = 'p.Leu858Arg' # group with 15 group2 = 'p.Gly' mutName = "EGFR" inExpressFile = open("/fslhome/srp33/fsl_groups/fslg_piccololab/PANCAN20/GSM1536837_TCGA_20.Illumina.tumor_Rsubread_TPM.txt", "r") outFile = open("GSM1536837_TCGA_20.Illumina.tumor_Rsubread_TPM_outfile.txt",...
Java
UTF-8
2,702
2.25
2
[]
no_license
package de.se.common.tiles.capacitor; import javax.annotation.Nonnull; import de.se.api.energy.starflux.StarFluxStorage; import de.se.common.config.ConfigValues; import de.se.common.tiles.TileSEBase; import de.se.common.utils.helper.EnergyHelper; import de.se.common.utils.helper.EnergyHelper.ISEInternalEnergy...
C++
UTF-8
1,156
2.609375
3
[]
no_license
#ifndef DOCINDEX_H #define DOCINDEX_H /** @brief DocIndex\n @file docindex.h @author ShadowIterator @email ShadowIterator@hotmail.com @version 0.1 @date 2017.12.24 */ #include"si_global.h" #include"linklist.h" #include"sistring.h" #include"pageinfo.h" #include"indexlistnode.h" namespace SI { /* @brief 用于描述一条索引信息\...
SQL
UTF-8
15,501
3.1875
3
[]
no_license
-- MySQL Script generated by MySQL Workbench -- utorak, 12. decembar 2017. 15:22:52 cet -- Model: New Model version: 1.0 -- MySQL Workbench Forward Engineering set @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0; set @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0; set @OLD_SQL_MODE=@@SQL_MOD...
Python
UTF-8
524
3.8125
4
[ "MIT" ]
permissive
# Code Listing #15 """ Factorial of numbers using concurrent futures. """ from concurrent.futures import ThreadPoolExecutor, as_completed import functools import operator def factorial(n): return functools.reduce(operator.mul, [i for i in range(1, n+1)]) with ThreadPoolExecutor(max_workers=2) as executor: ...
Java
UTF-8
2,118
2.03125
2
[]
no_license
package com.p118pd.sdk; import java.util.Enumeration; import java.util.Hashtable; import org.bouncycastle.util.Strings; /* renamed from: com.pd.sdk.丨1丨LI reason: invalid class name and case insensitive filesystem */ public class C93191LI { public static final Hashtable OooO00o = new Hashtable(); public stati...
JavaScript
UTF-8
4,822
3.15625
3
[]
no_license
var canvas_data; //данные из канвас var width; //ширина канвас var height; //высота канвас var squares = []; //массив областей self.addEventListener('message', function(e) { var data = e.data; switch (data.cmd) { case 'calc_colors': canvas_data = data.data_calc.canvas_data; width = data.data_...
Java
UTF-8
4,035
1.96875
2
[ "Apache-2.0", "LicenseRef-scancode-generic-cla", "LicenseRef-scancode-unknown-license-reference" ]
permissive
/* * * Copyright (c) 2006-2020, Speedment, Inc. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); You may not * use this file except in compliance with the License. You may obtain a copy of * the License at: * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless requi...
Markdown
UTF-8
2,137
2.765625
3
[]
no_license
# Comentario "Multi-Armed Recommender System Bandit Ensembles" [![hackmd-github-sync-badge](https://hackmd.io/GpbMI625Th2oUaDNJkCfPA/badge)](https://hackmd.io/GpbMI625Th2oUaDNJkCfPA) El *paper* se sitúa en un contexto en el que combinar distintos sistemas recomendadores para lograr un mejor *performance* ya es algo ...
Java
UTF-8
2,435
3.546875
4
[]
no_license
class Solution2 { public ListNode sortList(ListNode head) { if(head == null || head.next == null) return head; ListNode node = head; int length = 0; // 计算链表长度 while(node != null){ length++; node = node.next; } // 分治法对子链表排序 ListN...
SQL
UTF-8
2,549
4.0625
4
[ "MIT" ]
permissive
/* Creates a database for mothy's work */ /* Creates the database if it doesn not exist */ CREATE DATABASE IF NOT EXISTS mothy; /* Selects database */ USE mothy; /* Creates the tables. */ /* Creates the Users table. */ CREATE TABLE Users( uname CHAR(20) UNIQUE NOT NULL, passwd CHAR(20) NOT NULL, ulevel IN...
C#
UTF-8
887
2.875
3
[]
no_license
using System; using System.Threading; namespace CalcuApplication { class NullShow { public static void XianCheng1() { for (int i = 0; i < 100000; i++) { Console.WriteLine("线程1"); Console.WriteLine(i.ToString()); } ...
Java
UTF-8
1,899
2.15625
2
[]
no_license
/** * */ package build.pluto.buildc.compiler; import java.io.File; import java.util.ArrayList; import java.util.Collection; import java.util.List; import java.util.Map; import org.sugarj.common.Exec; import org.sugarj.common.Exec.ExecutionError; import org.sugarj.common.Exec.ExecutionResult; import org.sugarj.comm...
Markdown
UTF-8
6,888
3.640625
4
[ "BSD-3-Clause" ]
permissive
# pyfmt ![Build Status](https://github.com/slongfield/pyfmt/actions/workflows/go.yml/badge.svg) pyfmt implements Python's advanced string formatting in Golang. This is an alternative to the `fmt` package's Sprintf-style string formatting and mimics the .format() style formatting available in Python >2.6. Under the ho...
Java
UTF-8
1,170
3.03125
3
[]
no_license
package Interface; public abstract class Empregado implements APagar { private String primeiroNome; private String sobrenome; private String numeroSegurancaSocial; public Empregado(String primeiroNome, String sobrenome, String numeroSegurancaSocial) { this.primeiroNome = primeiroNome; ...
Ruby
UTF-8
2,023
3.65625
4
[]
no_license
# USAGE: # ./markov_generator file1 [file2 file3] [seed_word] class MarkovEntry attr_accessor :total_words def initialize preceding_word @words = Hash.new @preceding_word = preceding_word @total_words = 0 @cumulative = Array.new end def add_word word # access internal entry for word # ...
C++
UTF-8
1,480
3.453125
3
[]
no_license
#ifndef __CIRCLE_H__ #define __CIRCLE_H__ #include "shape.h" #include <iostream> #define PI 3.1415926 class Circle:public Shape{ protected: double r; public: Circle():Shape(0,0),r(1.0){ cout<<"in circle():"<<endl; this->r = r; }; Circle(double r):Shape(0,0){ cout<<"in Circle(double)"<<endl; this-...
Markdown
UTF-8
31,577
3.109375
3
[]
no_license
--- title: '[转载] 技术大牛养成指南,一篇不鸡汤的成功学实践' date: 2017-07-20 13:39:55 tags: categories: 技术提升 --- 本文转载自[李运华 InfoQ](https://mp.weixin.qq.com/s/5PfaaWBFCw5-MuAnR7ABiQ) >有的人想成为大牛,却不曾为此努力。有的人辛苦耕耘,却收获寥寥。很多时候,你跟成功的差距并不是能力,也不是运气,或许只是正确的方法?这是一篇不鸡汤的成功学指南,如果你相信且愿意坚持尝试,未必帮不到你! ### 1. 一碗有勺子的鸡汤 我工作已经将近12年了(其实12年才混到这个地步,天资实在是一般),在华为做了5...
Python
UTF-8
239
4.0625
4
[]
no_license
n=int(input("Enter a number: ")) a=[] for i in range(1,n+1): print(i,sep=" ",end=" ") if(i<n): print("+",sep=" ",end=" ") a.append(i) print("=",sum(a)) print() # output: # Enter a number: 5 # 1 + 2 + 3 + 4 + 5 = 15
C++
UTF-8
3,386
2.546875
3
[ "BSD-2-Clause" ]
permissive
/* * Copyright (c) 2020, Alex McGrath <amk@amk.ie> * Copyright (c) 2022, the SerenityOS developers. * * SPDX-License-Identifier: BSD-2-Clause */ #include <LibGUI/Action.h> #include <LibGUI/Clipboard.h> #include <LibGUI/Event.h> #include <LibGUI/LinkLabel.h> #include <LibGUI/Menu.h> #include <LibGUI/Painter.h> #in...
Java
UTF-8
4,588
2.625
3
[ "Apache-2.0" ]
permissive
package umontreal.iro.lecuyer.contactcenters.msk.model; import umontreal.iro.lecuyer.contactcenters.contact.Contact; import umontreal.iro.lecuyer.contactcenters.msk.conditions.Condition; import umontreal.iro.lecuyer.contactcenters.msk.params.RoutingStageParams; import umontreal.iro.lecuyer.contactcenters.router.Overfl...
Java
UTF-8
1,102
3.671875
4
[]
no_license
/** * Given a list of words and two words word1 and word2, * return the shortest distance between these two words in the list. * word1 and word2 may be the same and they represent two individual words in the list. */ class Solution { public int shortestWordDistance(String[] words, String word1, String word2) { ...
JavaScript
UTF-8
3,072
2.609375
3
[ "MIT" ]
permissive
import React from 'react'; import {Button, Modal, FormGroup, FormControl, Checkbox} from 'react-bootstrap'; import ReactDOM from 'react-dom'; class NewClass extends React.Component { static propTypes() { return { create: this.propTypes.func.required, error: this.propTypes.string, showModal: thi...
Python
UTF-8
326
3.625
4
[]
no_license
def city_country(city, country): """Returns a city and the country it is in.""" return city.title() + ", " + country.title() city_info = city_country("santiago", "chile") print(city_info) city_info = city_country("new delhi", "india") print(city_info) city_info = city_country("barcelona", "spain") print(city_...
Java
UTF-8
462
2.21875
2
[]
no_license
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package demointerface; /** * * @author Admin */ public interface INhanVien { void nhap(); void hien(); default float...
Python
UTF-8
897
2.828125
3
[ "Apache-2.0" ]
permissive
#!/usr/bin/python3 import time import os import signal import RPi.GPIO as GPIO from mfrc522 import SimpleMFRC522 #signal.signal(signal.SIGINT, signal.SIG_IGN) #Meant to Disable CTRL + C Loop = True print("Scan RFID") reader = SimpleMFRC522() id ,text = reader.read() print(id) #Prints the id of the RFID Chip pri...
Java
UTF-8
897
2.40625
2
[]
no_license
package com.lj.crawler.bean; import java.util.Date; /** * Added at version 1.1 * The base bean of crawl task. * * @author Lijing * */ public class Task { protected String tid; protected String url; protected int finished; protected Date start; protected Date end; public Task() { } public Task(...
C
UTF-8
2,005
3.109375
3
[ "BSD-3-Clause" ]
permissive
#include <lib.h> #include <stdint.h> #include <timeDriver.h> #include <keyboardDriver.h> #include <videoDriver.h> #include <font.h> void * memset(void * destination, int32_t c, uint64_t length) { uint8_t chr = (uint8_t)c; char * dst = (char*)destination; while(length--) dst[length] = chr; return destination; }...
JavaScript
UTF-8
1,078
3.15625
3
[]
no_license
function NetworkableState(x, y) { this.x = x; this.y = y; } NetworkableState.prototype.copy = function(another) { this.x = another.x; this.y = another.y; } function Networkable(tex_path, x, y) { /* FIXME we are creating one new texture image every time, they should be stored in a map*/ this.texture = PIXI.Text...
Python
UTF-8
2,782
3.4375
3
[]
no_license
''' Created on 2017年12月26日 @author: Shaw Joe ''' import nltk from nltk.corpus import brown #带有历史的特征提取器 def pos_features(sentence,i,history):#选取标签 features = {'suffix(1)':sentence[i][-1:],\ 'suffix(2)':sentence[i][-2:],\ 'suffix(3)':sentence[i][-3:]} if i==0:#当它在分界线的时候,...
Python
UTF-8
2,338
3.375
3
[]
no_license
class Node: """A graph node.""" def __init__(self, data, adjacent=None): self.data = data self.adjacent = adjacent or set() def __repr__(self): return f'<Node {self.data}>' class Graph: """A graph.""" def __init__(self): self.nodes = set() def add_node(self,...
Markdown
UTF-8
2,487
2.671875
3
[]
no_license
--- layout: post title: Pumpkin Curry Recipe to Fall For img: PumpkinCurry3.jpg excerpt: It’s that time of year… PUMPKIN season! style: | img[alt=PumpkinCurry] { width: 40em; } img[alt=PumpkinCurry2] { width: 40em; } img[alt=PumpkinCurry3] { width: 40em; } --- It’s that time o...
Markdown
UTF-8
2,986
2.6875
3
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference", "MIT", "SunPro", "BSD-3-Clause", "BSL-1.0", "LicenseRef-scancode-public-domain" ]
permissive
<!-- @license Apache-2.0 Copyright (c) 2018 The Stdlib Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or...
JavaScript
UTF-8
3,033
3.25
3
[]
no_license
/** * 白屏监控 * * @usage * * const bs = new BlankScreen({ * element: '#selector', * rule: { * text: 6, // 有效文本少于 6 个则被判定为处于白屏状态; * element: 2, // 或元素个数少于 2 个则被判定为处于白屏状态。 * }, * onError: err => console.error(err), * onSuccess: time => console.log('first paint:', time), * }); * bs.start(); *...
Java
UTF-8
894
1.875
2
[]
no_license
package com.oracle.intelagr.mapper; import com.oracle.intelagr.entity.YySyncLog; import com.oracle.intelagr.entity.YySyncLogExample; import org.apache.ibatis.annotations.Param; import java.util.List; public interface YySyncLogMapper { int countByExample(YySyncLogExample example); int deleteByExample(YySyncL...
TypeScript
UTF-8
3,757
2.6875
3
[]
no_license
console.log(` ------------------------------ 施工中 てへぺろ☆(・ω<) ------------------------------ `) const SPEED = 150; const NAME = "YUKI. N>"; function sleep(time: number): Promise<void> { return new Promise((res) => { setTimeout(() => { res(); }, time); }) } const $commandline = document.getElementByI...
Java
UTF-8
652
2.046875
2
[]
no_license
package com.example.multi_theme_ui; import android.app.Application; import android.content.Context; import android.util.Log; import com.example.multi_theme_ui.utils.BaseUtils; import nl.bravobit.ffmpeg.FFmpeg; /** * Created by sandeepsaini on 04,July,2019 */ public class MultiThemeUiApp extends Application { ...
TypeScript
UTF-8
804
3
3
[]
no_license
import { Event } from "../../common/interfaces"; import { EventAction, EventActionType } from "./eventActions"; export interface EventState { data: Event | null; loading: boolean; error: Error | null; } export const initialState: EventState = { data: null, loading: false, error: null, }; export default f...
Java
UTF-8
29,317
1.867188
2
[]
no_license
package com.hq.elva.entity.generate; import java.io.Serializable; import java.util.ArrayList; import java.util.Date; import java.util.List; public class TBasConfigExample implements Serializable { /** * This field was generated by MyBatis Generator. This field corresponds to the database table t_bas_config * ...
Shell
UTF-8
1,798
3.640625
4
[ "MIT" ]
permissive
#!/bin/bash ## Config file source ./config.conf ## Install packages pacman -S gzip --noconfirm ## Download backup files echo "Remote server IP ?" read CONFIG_REMOTE_IP echo "Remote server SSH username ?" read CONFIG_REMOTE_USERNAME mkdir -p /home/backup scp -r $CONFIG_REMOTE_USERNAME@$CONFIG_REMOTE_IP:/home/backup...
Java
UTF-8
665
2.171875
2
[]
no_license
package org.trails.test.functional; import com.gargoylesoftware.htmlunit.html.HtmlAnchor; import com.gargoylesoftware.htmlunit.html.HtmlPage; import com.gargoylesoftware.htmlunit.html.xpath.HtmlUnitXPath; public class LocalizationTest extends FunctionalTest { public void testLocale() throws Exception { ...
TypeScript
UTF-8
457
2.625
3
[ "MIT" ]
permissive
import * as jwt from 'jsonwebtoken' import * as dotenv from 'dotenv' dotenv.config() const secret = process.env.SECRET class Plugin { /** * * @param params Retorna o token decodificado com validade * @param validade Validade do token, ex: 7d */ public async generateToken (params: string | object, valida...
Python
UTF-8
333
3.546875
4
[]
no_license
### first 100 primal digits def is_prim(a): l = [] for i in range(2, a): calc = a / i if (calc == int(calc)): l.append(i) is_prim = (len(l) < 1) return is_prim while len(p_elements) < 100: if(is_prim(i)): p_elements.append(i) i = i + 1 print(p_...
Python
UTF-8
461
3.796875
4
[ "BSD-3-Clause" ]
permissive
def string(a): return ''.join(a) def permutation(s, l, r): # Base case if l == r: print(string(s), end=' ') else: # Permutation made for i in range(l, r): s[l], s[i] = s[i], s[l] #recursion called permutation(s, l+1, r) #backtrack s[l], s[i] = s[i], s[l] def main(): n_case = int(inpu...
C++
UTF-8
1,490
3.453125
3
[ "MIT" ]
permissive
#include "pint.hpp" #include <vector> #include <iostream> using namespace std; //retornar o indice (começando em 0) da embalagem mais leve int solution(const vector<Pint> & input) { int in = 0; int size = input.size(); int fi = size - 1; int size3, cmp; Pint soma1, soma2; while (size >= 3) { ...
Java
UTF-8
1,704
3.140625
3
[]
no_license
package methodEmbedding.Counting_Sheep.S.LYD1464; import java.io.BufferedReader; import java.io.InputStreamReader; import java.util.Scanner; public class CountingSheep { public static void main(String[] args) { Scanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in))); int t...
C++
UTF-8
2,791
2.921875
3
[ "MIT" ]
permissive
#include <iostream> #include <vector> #include <memory> #include "QuadTree.h" int main(int argc, char* argv[]) { QuadTree qTree(0, Rectangle(0, 0, 600, 600)); std::vector<std::shared_ptr<Entity>> entities; //QUAD 1 entities.push_back(std::shared_ptr<Entity>(new Entity({325, 0, 32, 32}))); entities....
Java
UTF-8
665
1.835938
2
[]
no_license
package com.dataweb; import com.fasterxml.jackson.annotation.JsonProperty; /** * Created by user on 29.08.2016. */ public class ParticleboardsMenuParametrs extends MenuParametrs { @JsonProperty("minLaminated") private Long minLaminated; @JsonProperty("maxLaminated") private Long maxLaminated; ...
JavaScript
UTF-8
600
3.625
4
[]
no_license
[] + {}; // "[object Object]" /* Explanation: When JavaScript needs to add "stuff" together it will covert the types to primitives. That usually means calling the `toString()` function. In this case: [].toString() produces an empty string {}.toString() produces "[object Object]" Which results in: ""...
PHP
UTF-8
88
2.671875
3
[]
no_license
<?php $feetInMile =9033; function sayHello($name) { echo "Hello $name <br>"; } ?>
Java
UTF-8
3,120
2.828125
3
[]
no_license
package com.sitech.prm.subject.cells; import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; import com.aspose.cells.ICellsDataTable; public class AsposeMap implements ICellsDataTable{ //数据集合 @SuppressWarnings("rawtypes") private List<...
JavaScript
UTF-8
7,319
3.203125
3
[]
no_license
/* gameId: ... schema: [] size: 19 capCount: { black: 0, white: 0 }, turn: WGo.B createdAt: new Date() */ Positions = new Mongo.Collection('positions'); // create new Position but don't save it Positions.new = function(gameId, posAttributes) { var game = Games.findOne(gameId); if (!game) throw new Meteor.Error("G...
C#
UTF-8
4,873
2.53125
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Data.SqlClient; using System.Data; using System.Collections; using System.Collections.Generic; public partial class Display : System.Web.UI.Page { public static ...
Markdown
UTF-8
7,116
2.640625
3
[ "MIT" ]
permissive
# @dreamnet/deploy [![Version](https://img.shields.io/npm/v/@dreamnet/deploy.svg)](https://npmjs.org/package/@dreamnet/deploy) [![Downloads/week](https://img.shields.io/npm/dw/@dreamnet/deploy.svg)](https://npmjs.org/package/@dreamnet/deploy) ![License](https://img.shields.io/npm/l/@dreamnet/deploy.svg) Deploy files ...
Java
UTF-8
2,350
2.453125
2
[ "MIT" ]
permissive
/** * This file is part of RawAntTasks - a collection of Ant tasks. * * Copyright (c) 2014 Tom Kaczocha * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, ...
Java
GB18030
1,985
2.8125
3
[]
no_license
package cn.itcast.servlet_refactory.servlet; import java.io.IOException; import java.lang.reflect.Method; import java.util.Map; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import ...
Go
UTF-8
1,381
2.796875
3
[ "MIT", "LicenseRef-scancode-public-domain" ]
permissive
package serviceparamvaluelookups import ( "fmt" "strconv" "github.com/transcom/mymove/pkg/appcontext" "github.com/transcom/mymove/pkg/models" ) // DistanceZipSITDestLookup does the lookup of distance for SIT at destination type DistanceZipSITDestLookup struct { DestinationAddress models.Address FinalDesti...
Java
UTF-8
3,664
2.59375
3
[]
no_license
package com.example.lab7; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.View; import android.widget.Button; import android.widget.EditText; import android.widget.Toast; import java.io.FileInputStream; import java.io.FileOutputStream; public class EditActivity extends ...
Ruby
UTF-8
993
2.984375
3
[]
no_license
# frozen_string_literal: true require 'thor' require './client/api_client' # Subcommands to do with the books endpoints. class Authors < Thor include API desc 'list', 'List all authors' def list puts api.authors.get.map(&:name).join("\n") end desc 'add NAME', 'Add an author' def add(name) author ...
C++
UTF-8
1,147
2.703125
3
[]
no_license
// // Created by hp on 22/07/2020. // #ifndef BOMBERMAN_CONTROLADORLADRILLOEXPLOSIVO_H #define BOMBERMAN_CONTROLADORLADRILLOEXPLOSIVO_H #include <SFML/Graphics/Drawable.hpp> #include <SFML/Graphics/Texture.hpp> #include <SFML/System/Time.hpp> //<list> nos permite ... #include <list> #include "ControladorTiempo.h" ...
C++
ISO-8859-1
2,222
2.859375
3
[]
no_license
#include <iostream> #include <opencv2/highgui.hpp> #include <opencv2/imgproc.hpp> #include <opencv2/highgui/highgui_c.h> #include <stdio.h> using namespace std; using namespace cv; Mat img; //Imagem de entrada Mat_<uchar> gray(194, 259, CV_8UC3); //Imagem em tons de cinza Mat_<uchar> equalized(194, 259, CV_8UC3); //I...
Markdown
UTF-8
2,015
2.609375
3
[]
no_license
# Currency-Converter-TRY-to-USD-EUR-GBP-CNY ### QT Project - Currency Converter TRY to USD/EUR/GBP/CNY ## Project Details That's a project I've created as a university homework for the course, CMPE 230 - Systems Programming on Dec 20th, 2017. Basically, that's a QT project that fetches data from fixer.io and shows co...
C#
UTF-8
350
2.953125
3
[]
no_license
public bool ChangeColor {get; set;} private double _Bid; public double Bid { get { return _Bid; } set { If (_Bid < value)//, change fore color ChangeColor = True; _Bid = value; DisplayCurrentPrice = String.Format("{0} / {1}",...
C++
UTF-8
2,433
2.8125
3
[]
no_license
// // main.cpp // 107A-Dorm Water Supply // // Created by 양종열 on 2018. 4. 14.. // Copyright © 2018년 양종열. All rights reserved. // #include<iostream> #include<vector> using namespace std; vector<vector<int>> vc(1001); int visited[1001]; int map[1001][1001]; vector<int> startVc, endVc, diameterVc; int n,p,minDia=1000...
JavaScript
UTF-8
2,075
2.828125
3
[ "MIT" ]
permissive
function isElementInViewport (el) { //special bonus for those using jQuery if (typeof jQuery === "function" && el instanceof jQuery) { el = el[0]; } var rect = el.getBoundingClientRect(); return ( rect.top >= 0 && rect.left >= 0 && rect.bottom <= (window....
Markdown
UTF-8
1,906
2.953125
3
[]
no_license
- I try to keep an even keel. - I’m a polyatheist – there are many gods I don’t believe in. - I’m over it. You strive to win a Super Bowl and you do everything you can to get there. But being in the Hall of Fame, you never play for that honor. It’s incredible. - I remember Terry being exhausted from his latest Supe...
Markdown
UTF-8
932
3.375
3
[]
no_license
## MongoDB相关概念与基本操作 #### 三个概念 - 数据库(database) - 数据库是一个仓库,在仓库中可以存放集合。 - 集合(collection) - 集合类似于数组,在集合中可以存放文档。 - 文档(document) - 文档数据库中的最小单位,我们存储和操作的内容都是文档。 在MongoDB中用户只需要操作`document`即可,数据库与集合则由系统自动生成。 基本指令: - show dbs 显示所有数据库 - show collections 显示数据库中所有集合 - use [数据库名] 进入到指定数据库中 - db 显示目前所在的数据库名 基本插入文档语句: ...
JavaScript
UTF-8
1,312
2.609375
3
[]
no_license
function fetch_search_word(){ var keyword = $("#SearchInput").val(); $.ajax({ url: "http://<?=$_SERVER['HTTP_HOST']?>/wp-content/dbdbdb/dictionary/byKeyword.php", type: "POST", data: { keyword:keyword, }, success: function(data) { $("#item_data").html(data); ...
Markdown
UTF-8
1,064
3.3125
3
[ "BSD-2-Clause" ]
permissive
# github-labels Get repositories' labels for specific github user or organization. Scripts require github token to run. To generate it, please follow steps described [here](https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line/#creating-a-token). ## Usage Repository contains three s...
Markdown
UTF-8
4,102
2.84375
3
[ "MIT" ]
permissive
--- date: 2020-12-31 18:25:42 layout: post title: "National Parks Mania" subtitle: "ft. Death Valley, Sequoia, and Kings Canyon" description: image: ../assets/img/travel/feature_img/sand_dunes.jpg optimized_image: ../assets/img/travel/feature_img/opt_sand_dunes.jpg category: travel tags: - travel - 1hikeaweek autho...
Python
UTF-8
308
3.140625
3
[]
no_license
# CSV must be in of the form [Key,Value] # E.g.: # # img_1.jpg,0 # img_2.jpg,1 # img_3.jpg,0 # img_4.jpg,0 # ... import csv def csvToDict(csvIn): with open(csvIn, mode='r') as infile: reader = csv.reader(infile) mydict = dict((rows[0],rows[1]) for rows in reader) return mydict