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
JavaScript
UTF-8
2,392
2.859375
3
[]
no_license
document.addEventListener("DOMContentLoaded", start) let menuliste = []; let filter = "alle"; function start() { const filtrerknapper = document.querySelectorAll("nav button"); filtrerknapper.forEach(knap => knap.addEventListener("click", filtrerMenu)); document.querySelector("#detalje").style.display = ...
Markdown
UTF-8
1,899
3.390625
3
[]
no_license
# 知识点整理 ## 1.怎样快速寻找符合自己需求的组件思路整理 - 以下拉刷新上拉加载组件为例 - step 1:明确需求是什么 - 可以下拉刷新 - 可以上拉加载 - step 2:有哪些渠道可以找到满足需求的组件 - 官方提供 - 官方插件市场 - github - step 3:根据 step2 中的渠道,找到大概可能满足需要的若干个插件,插件必须满足以下几个条件 - 稳定,使用的开发者较多 - 组件一直在被维护更新 - 使用起来不能过于复杂,API 易懂,并且接入项目容易 - step 4:选出的插件,逐个仔细看说明文档,挨个写 Demo 测试比较 ## 2.父子组件间的互相通信与方法...
TypeScript
UTF-8
4,350
2.65625
3
[]
no_license
/** * 下注排行 */ module main { export class BetRankView extends GYLite.GYUIComponent { private static _instance: BetRankView public static getInstance(): BetRankView { return BetRankView._instance || (BetRankView._instance = new BetRankView) } private tabBtn: TabButto...
Python
UTF-8
1,402
2.875
3
[]
no_license
import sys class TreeCounter: def __init__(self): self.prev_end = '' self.tree_found = 0 self.tree_size = 0 self.nodes = set() self.act_fp = '' self.outfile = sys.stdout def finishTree(self): self.tree_found += 1 self.tree_size += len(self.nodes) self.nodes.clear() def finis...
C
UTF-8
540
2.859375
3
[]
no_license
/* ** msl.c for 42sh in /home/benki/Epitech/PSU_2016_42sh/lib/others ** ** Made by Lucas Benkemoun ** Login <lucas.benkemoun@epitech.eu> ** ** Started on Mon May 15 17:34:01 2017 Lucas Benkemoun ** Last update Mon May 15 17:34:02 2017 Lucas Benkemoun */ short int msl(short int nb) { short int i; i = 0;...
Ruby
UTF-8
640
3.46875
3
[ "Apache-2.0" ]
permissive
class Cipher ALPHABET = [*'a'..'z'].freeze attr_reader :key def initialize(key = Key.generate) raise ArgumentError unless Key.valid?(key) @key = key end def encode(plaintext) = shift(plaintext, :+) def decode(ciphertext) = shift(ciphertext, :-) private def shift(str, op) str.chars.map.w...
Java
UTF-8
1,927
2.28125
2
[]
no_license
package ru.haqon.layout.activities; import android.os.Bundle; import androidx.appcompat.app.AppCompatActivity; import android.view.LayoutInflater; import android.view.View; import android.widget.TableLayout; import android.widget.TableRow; import android.widget.TextView; import java.text.SimpleDateFormat; ...
C#
UTF-8
1,101
2.96875
3
[]
no_license
using System; using MathNet.Numerics.Distributions; using MathNet.Numerics.LinearAlgebra; namespace ABMath.IridiumExtensions { public static class TDistributionExtensions { /// <summary> /// returns max. likelihood estimator of scale factor for t-dn, assuming mean of data is zero ...
Markdown
UTF-8
397
2.59375
3
[]
no_license
# Flutter Dashboard A standalone dashboard which shows your day at a glance. This program will be running 24/7 on a monitor and works similar to how smart mirrors have been implemented. ![Dashboard UI](/Dashboard_Layout_7-27-2020.png) With a modular design, different elements of the dashboard can be added/removed an...
PHP
UTF-8
4,834
2.671875
3
[]
no_license
<?php namespace HtmlForm\tests; use HtmlForm\Form; class FormTest extends Base { /** * @var Form */ protected $testClass; /** * @var array[] */ private $mocks; /** * Set up before every test */ public function setUp() { $this->testClass = new Form(); parent...
Java
UTF-8
778
2.9375
3
[]
no_license
package atividade; import java.io.Serializable; /** * * @author davi * */ public class Resultado implements Serializable { /** * */ private String resultado; /** * */ private int id; public Resultado(String resultado, int id) { this.resultado = resultado; this.id = id; } @Override publi...
Python
UTF-8
202
2.78125
3
[ "MIT" ]
permissive
import random # this line is needed for us to check the results, don't modify it please random.seed(int(input())) # use a function from the random module in the next line print(random.randint(1, 6))
JavaScript
UTF-8
741
2.671875
3
[]
no_license
(function () { 'use strict'; angular.module('LunchCheck', []) .controller('LunchCheckController', LunchCheckController); LunchCheckController.$inject = ['$scope','$filter']; function LunchCheckController($scope, $filter) { $scope.arrayFood = ""; $scope.message=""; $scope.sayMessage = function () { var array...
C++
GB18030
848
4.125
4
[]
no_license
/* һ numsдһ 0 ƶĩβͬʱַԪص˳ ʾ: : [0,1,0,3,12] : [1,3,12,0,0] ˵: ԭϲܿ顣 ٲ */ #include <iostream> #include <vector> using namespace std; //0Ԫǰ void moveZeroes(vector<int>& nums) { int len = nums.size(); if (!len || len == 1) return; int k = 0; for (int i = 0; i < len; i++) { if (nums[i] != 0) nums[k++] = nums[...
Java
UHC
499
3.859375
4
[]
no_license
package msa01; /* * logical operator : * && (and - T϶ T)& * || (or - ϳ T̸ T)| * ! (not - T̸ F, F̸ T)~ * ^ (XOR - ̸ F, ٸ̸ T)^ * */ public class OpTest4 { public static void main(String[] args) { boolean r1 = 10>=10; //T boolean r2 = 100==10; //F System.out.println(r1 && r2); //F System.o...
Python
UTF-8
1,776
2.5625
3
[]
no_license
# encoding:utf-8 from winreg import * import sys usb_name = [] uid_flag = [] usb_path = [] #连接注册表根键 以HKEY_LOCAL_MACHINE为例 regRoot = ConnectRegistry(None, HKEY_LOCAL_MACHINE) #检索子项 subDir = r"SYSTEM\CurrentControlSet\Enum\USBSTOR" #获取指定目录下所有键的控制 keyHandle = OpenKey(regRoot, subDir) #获取该目录下所有键的个数(0-...
Java
UTF-8
266
2.5625
3
[]
no_license
package com.itvdn.homework.javaessential.lesson3.task3; public class Car extends Vehicle { public Car(double latitude, double longitude, int price, int speed, int yearOfProduction) { super(latitude, longitude, price, speed, yearOfProduction); } }
Java
UTF-8
372
2.21875
2
[]
no_license
/* ***************************************************************************** * @Author: phd * @Date: 2018/9/8 * @Site: github.com/phdsky * @Description: NULL **************************************************************************** */ public class HelloWorld { public static void main(String[] args) { ...
C#
UTF-8
14,089
2.59375
3
[]
no_license
using Dragnet.Constants; using Dragnet.DataObjects; using Dragnet.IRepository; using Dragnet.Models; using System; using System.Collections.Generic; using System.Data; using System.Text; namespace Dragnet.Repository { public class PersonManagement : CommonMethods, IPerson { IDBManager dbManager = null...
C
ISO-8859-10
4,789
2.59375
3
[]
no_license
#include "tipos.h" #include "color.h" #include "clientes.h" #ifndef BICICLETAS_H_INCLUDED #define BICICLETAS_H_INCLUDED typedef struct { int id; char marca[20]; int idTipo; int idColor; int idCliente; float rodado; int isEmpty; bClientes clientes; }bBicicleta; #endif // BICICLETAS_H_IN...
C++
UTF-8
1,395
3.546875
4
[]
no_license
// https://leetcode.com/problems/construct-binary-tree-from-preorder-and-inorder-traversal #include <algorithm> #include<vector> using namespace std; /** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode() : val(0), left(nullptr), ...
Java
UTF-8
588
2.015625
2
[]
no_license
package com.del.command; import lombok.Data; @Data public class Contact { private Integer cid; private String name; private String email; private String phno; public Integer getCid() { return cid; } public void setCid(Integer cid) { this.cid = cid; } public String getName() { return name; } public ...
Java
UTF-8
3,172
3.265625
3
[]
no_license
package com.example.jiteshvartak.onlinetestalgorithmspractice;/* IMPORTANT: Multiple classes and nested static classes are supported */ /* * uncomment this if you want to read input. //imports for BufferedReader import java.io.BufferedReader; import java.io.InputStreamReader; */ //import for Scanner and other utility...
Markdown
UTF-8
4,003
3.40625
3
[ "MIT" ]
permissive
# Step 0: Install tools For both macOS and Windows - follow the instructions [here](https://github.com/Codexpanse/workshops/blob/master/level_1/steps.md). # Step 1: Internet vs Web - The Internet is the network of networks ([wiki](https://en.wikipedia.org/wiki/Internet) - The web is the est of apps that use the Inte...
JavaScript
UTF-8
1,134
2.78125
3
[]
no_license
import React, { Component } from 'react'; class NewTask extends Component { constructor(props) { super(props); this.state = { userInput: "" } this.handleChange = this.handleChange.bind(this); this.handleButton = this.handleButton.bind(this); } handleChange( ...
Java
UTF-8
1,341
2.890625
3
[]
no_license
package me.lemon.timer.util; import java.awt.*; import java.awt.image.BufferedImage; public class ScreenUtil { private static Robot robot; public static BufferedImage captureFullScreen(int screenNumber) { try { Rectangle screenRect = new Rectangle(0, 0, 0, 0); if(screenNumber == -1) { for (GraphicsDev...
JavaScript
UTF-8
1,662
2.828125
3
[ "MIT" ]
permissive
import {NEW_QUOTE} from './actions' const QUOTES = [ {quote: 'You can’t turn back the clock. But you can wind it up again.', author:'Bonnie Prudden'}, {quote: 'The bad news is time flies. The good news is you’re the pilot.', author: 'Michael Altshuler'}, {quote: 'I will always choose a lazy person to do a ...
Markdown
UTF-8
731
2.609375
3
[ "MIT" ]
permissive
--- title: Chủ nghĩa Hư vô UID: 210831220447 created: Dec 28, 2020 9:48 PM tags: - '#created/2020/Dec/28' - '#seed🥜' - '#permanent/concept' aliases: - Nihilism --- # Chủ nghĩa Hư vô ## Notes: Chủ nghĩa hư vô (Nihilism) là chủ nghĩa phủ nhận giá trị, ý nghĩa của cuộc sống. Thế giới này là vô nghĩa, hư vô vì n...
Go
UTF-8
2,850
2.515625
3
[ "BSD-3-Clause" ]
permissive
// Simon is an implementation of the memory game for children. package main import ( "image" "log" "math/rand" "time" "golang.org/x/exp/shiny/driver" "golang.org/x/exp/shiny/imageutil" "golang.org/x/exp/shiny/materialdesign/colornames" "golang.org/x/exp/shiny/screen" "golang.org/x/mobile/event/key" "golang....
Markdown
UTF-8
3,409
3.578125
4
[]
no_license
# 二叉树的最近公共祖先 ### 信息卡片 - 时间: 2020-1-13 - 题目链接:https://leetcode-cn.com/problems/lowest-common-ancestor-of-a-binary-tree/solution/er-cha-shu-de-zui-jin-gong-gong-zu-xian-by-leetcod/ - 难度:中等 - 题目描述: ``` 给定一个二叉树, 找到该树中两个指定节点的最近公共祖先。 百度百科中最近公共祖先的定义为:“对于有根树 T 的两个结点 p、q,最近公共祖先表示为一个结点 x,满足 x 是 p、q 的祖先且 x 的深度尽可能大...
C
UTF-8
3,423
2.765625
3
[]
no_license
#include "../../src/usb1352.h" #include <time.h> #include <errno.h> typedef struct test_frame { uint8_t type; uint16_t seq; uint8_t tx_addr; uint8_t rx_addr; uint8_t length; char payload[190]; } test_frame; pthread_cond_t transfer_cond; pthread_mutex_t transfer_mutex; void* tx_thread(void* dev) { usb1352_dev...
JavaScript
UTF-8
11,586
3.65625
4
[]
no_license
'use strict'; ///////////////////////////////////////////////// ///////////////////////////////////////////////// // LECTURES const account1 = { owner: 'Jonas Schmedtmann', movements: [200, 450, -400, 3000, -650, -130, 70, 1300], interestRate: 1.2, // % pin: 1111, }; const account2 = { owner: 'Jessica Davi...
Python
UTF-8
1,356
2.90625
3
[ "MIT" ]
permissive
#!/usr/bin/env python import time import argparse from pmw3901 import PMW3901, PAA5100, BG_CS_FRONT_BCM, BG_CS_BACK_BCM print("""motion.py - Detect flow/motion in front of the PMW3901 sensor. Press Ctrl+C to exit! """) parser = argparse.ArgumentParser() parser.add_argument('--board', type=str, ch...
C#
UTF-8
1,955
2.796875
3
[]
no_license
using EnvDTE; using System.CodeDom; namespace Pretorianie.Tytan.Core.Data.Refactoring { /// <summary> /// Class describing named <c>CodeVariable</c> element. /// </summary> public class CodeVariableNamedElement : CodeNamedElement { private readonly CodeVariable variable; ...
Python
UTF-8
3,493
3.1875
3
[]
no_license
import re from officialComm import convertScrapedtoSent #identifying individual date patterns def dateInfo(articleBody): #regex pattern to recognize various date patterns #examples of what the below pattern recognizes: "04-04-2004; 04/04/04; 4/04/04; 4/4/05; April 04, 2004; March 24, 2004; April. 24, 2004; Apr...
TypeScript
UTF-8
171
2.703125
3
[]
no_license
var heroeslist:Array<string> = ["Dead Pool", "Flash", "Ant Man", "Aqua Man", "Wonder Women"] for(let hero of heroeslist){ console.log( hero+" says hello !!! " ); }
C++
UTF-8
1,193
3.140625
3
[]
no_license
#include "Castle.h" #include<cstdlib> bool Castle::isDestroyed() { if (Health < 0) return true; else return false; } int Castle::GetNumberOfEnemies() { return NumberOfEnemies; } void Castle::SetNumberOfEnemies(int N) { if (N > 0) NumberOfEnemies = N; else NumberOfEnemies = 10; //Set the number ...
Java
UTF-8
307
2.3125
2
[]
no_license
package Utils.Comparator; import Egyedek.Partner; import java.util.Comparator; public class PartnerNevComparator implements Comparator<Partner>{ @Override public int compare(Partner p1, Partner p2) { return p1.getNev().compareTo(p2.getNev()); } }
Markdown
UTF-8
11,911
3.484375
3
[ "MIT" ]
permissive
# Transitions de liste Jusqu'à présent, nous avons géré les transitions pour: - Des noeuds individuels - Plusieurs nœuds où un seul est rendu à la fois Alors qu'en est-il lorsque nous avons toute une liste d'éléments que nous voulons rendre simultanément, par exemple avec `v-for`? Dans ce cas, nous utiliserons le co...
Java
UTF-8
633
1.898438
2
[]
no_license
package dk.fitfit.remotetexting.business.service; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Service; // Inspired by http://tuhrig.de/why-using-springs-value-annotation-is-bad/ @Service public class ConfigurationService { @Value("${security.oauth2.client.clientI...
Markdown
UTF-8
3,691
2.53125
3
[]
no_license
# Introduce This is a template for react-native project [react-native: 0.61.5]() [typescript: ts, tsx](https://reactnative.dev/docs/typescript) [redux-saga](https://redux-saga.js.org/docs/introduction/BeginnerTutorial.html) [reactnavigation 5x](https://reactnavigation.org/docs/navigating/) [react-native-conf...
Java
UTF-8
973
2.140625
2
[]
no_license
package Day4NG; import org.testng.annotations.Test; import util.StartBrowser; import org.testng.annotations.BeforeTest; import org.junit.Assert; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.testng.annotations.AfterTest; public class FirstNG {...
C#
UTF-8
402
3.328125
3
[]
no_license
using System; class Compare { static void Main() { float a = 5.55f; float b = 6.35f; Boolean Compare = (a == b); Console.WriteLine("The result is {0}", Compare); Boolean Compare1 = (a > b); Console.WriteLine("The result is {0}", Compare1); Boolean Compare...
Python
UTF-8
1,214
2.6875
3
[]
no_license
# -*- coding: utf-8 -*- """ Created on Tue May 19 22:13:11 2020 ANN example @author: user1 """ import numpy as np import pandas as pd import tensorflow as tf dataset = pd.read_csv('Churn_Modelling.csv') X = dataset.iloc[:, 3 : 13].values y = dataset.iloc[:, -1].values from sklearn.compose import ColumnTransformer f...
Python
UTF-8
132
3.203125
3
[]
no_license
ano = int(input()) while(True): ano += 1 t = set(str(ano)) if len(t) == len(str(ano)): print(ano) break
Java
UTF-8
1,420
2.140625
2
[]
no_license
package com.ofnicon.luizahei101.activities; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.view.View; import android.widget.TextView; import com.ofnicon.luizahei101.R; import com.ofnicon.luizahei101.core.Core; public class NotificationActivity extends AppCompatActivity { ...
Shell
UTF-8
676
3.59375
4
[]
no_license
#!/bin/sh set -e # export PGHOST # export PGPORT # export PGDATABASE # export PGUSER # export PGPASSWORD # export GCS_BUCKET # export GCS_PROJECT # export SLEEP_SECONDS backup(){ echo "Starting backup..." pg_dump -v -w -c | gzip -9 > $PGDATABASE.sql.gz FILE_NAME="$PGDATABASE-$(date +"%Y%m%d%H%M").sql...
Java
UTF-8
4,006
2.84375
3
[]
no_license
package components.tables; import database.Query; import utils.CustomTableFormat; import windows.MainWindow; import javax.swing.event.ListSelectionEvent; import java.sql.Connection; import java.sql.SQLException; /** * Tabla que muestra las categorías, extiendo de una clase para tener funciones en común con las demá...
Swift
UTF-8
758
2.625
3
[]
no_license
// // SettingsOverlayView.swift // AMillionMaps // // Created by Malte Klemm on 17.07.20. // Copyright © 2020 Malte Klemm. All rights reserved. // import SwiftUI struct SettingsOverlayView<Content: View>: View { @Environment(\.colorTheme) var colorTheme: ColorTheme let viewBuilder: () -> Content init(_ vi...
Markdown
UTF-8
2,205
3.03125
3
[]
no_license
# CS426-Assignment-6,7 and 8 CS 426 Assignment 7 added features: For this assignment, we added several improvements to the physics and lighting. For the physics, we improved the jump and double jump while also adding a dash. Since this game is centered around climbing, it's appropriate to have multiple movement based...
Swift
UTF-8
7,026
2.65625
3
[]
no_license
// // TransmissionConnector.swift // TorrentConnect // // Created by Turchenko Alexander on 26.08.15. // Copyright © 2015 Turchenko Alexander. All rights reserved. // import Foundation enum RequestError { case authorizationError case parseError case fileError(String) } struct TransmissionAdapter { ...
Java
UTF-8
5,771
3.671875
4
[]
no_license
/** * Demonstrate the StockManager and Product classes. * The demonstration becomes properly functional as * the StockManager class is completed. * * @author David J. Barnes and Michael Kölling. * @version 2016.02.29 */ public class StockDemo { // The stock manager. private StockManager manager; /*...
Markdown
UTF-8
3,656
2.765625
3
[]
no_license
# Git 常用命令(Git Bash) 取得项目的 git 仓库 ```shell $ git clone xxx ``` 查看仓库状态 ```shell $ git status ``` 列出仓库的所有分支,包括远程分支 ```shell $ git branch -a ``` 基于 master 分支创建并切换到新的分支 master_hotfix ```shell $ git checkout master $ git checkout -b master_hotfix ``` 删除本地 master_hotfix 分支 ```shell $ git branch -d master_hotfix ``` 删除远...
Python
UTF-8
5,180
2.65625
3
[]
no_license
#!/usr/bin/env python # -*- coding: utf-8 -*- # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # @file: railgun/website/hw.py # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # This file is released under BSD 2-clause license. """This module contains the pr...
Java
UTF-8
407
1.539063
2
[]
no_license
package com.puzzle; import org.mybatis.spring.annotation.MapperScan; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @SpringBootApplication @MapperScan(value="com.puzzle.mapper") public class ApplyJobApplication { public static void main(Str...
Python
UTF-8
504
3.421875
3
[ "LicenseRef-scancode-public-domain" ]
permissive
import os def count_lines(filename, comment): """ Count lines in a file excluding the comment :param filename: Path to the file to count :param comment: Comment char or string at the beginning of the line to exclude :return: """ count = 0 if os.path.exists(filename) and os.path.getsize...
Java
UTF-8
290
2.09375
2
[]
no_license
package array; import java.util.ArrayList; import java.util.List; /** * @author Baitao Zou * date 2021/02/08 */ public class Skyline218 { public List<List<Integer>> getSkyline(int[][] buildings) { List<List<Integer>> result = new ArrayList<>(); return result; } }
C#
UTF-8
419
3.046875
3
[]
no_license
using System; namespace CourseLibrary.API.Helpers { public static class DateTimeExtensions { public static int GetAge(this DateTimeOffset dateTime) { var currentDate = DateTime.Today; var age = currentDate.Year - dateTime.Year; if(currentDate < dateTime.Dat...
JavaScript
UTF-8
474
3.109375
3
[]
no_license
/** * Created by yuzhou on 15/8/20. */ var obj_txt = '{"firstname": "terry", "lastname": "lee", "addr":{' + '"street": "中国村创业大街氪空间", "city": "北京"}}'; var obj = JSON.parse(obj_txt); var str = "<h4>解析后的JSON对象数据结构:</h4><hr/>"; str += "姓: " + obj.firstname + "<br/>"; str += "名: " + obj.lastname + "<br/>"; str += "...
C++
UTF-8
3,486
3.171875
3
[]
no_license
// // Created by yh on 17-6-22. // #include "machine.h" #include <stdlib.h> #include <vector> #include "ctime" #include <sys/timeb.h> Machine::Machine() { initilized_ = false; top_index_ = 0; } Machine::~Machine() {} /* 初始化牌组 对于花色:0代表黑桃、1代表红桃、2代表梅花、3代表方块 对于值:0代表two,1代表three ... 12代表A */ void Machine::init(co...
C#
UTF-8
1,806
2.515625
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 MySql.Data.MySqlClient; using System.Data; using System.Security.Cryptography; using System.Text; public partial class login : System.Web.UI.Page { //Mysql bağlantısı ...
Python
UTF-8
157
2.6875
3
[]
no_license
n=int(input()) m=int(input()) t=int(input()) mx,my=n,m for _ in range(t): l=eval('[' + input()+ ']') mx=min(mx,l[0]) my=min(my,l[1]) print(mx*my)
Java
UTF-8
387
1.882813
2
[]
no_license
package com.samuel.vitorio.workshopmongo.repository; import java.util.List; import org.springframework.data.mongodb.repository.MongoRepository; import org.springframework.stereotype.Repository; import com.samuel.vitorio.workshopmongo.domain.Post; @Repository public interface PostRepository extends MongoRepository<P...
Java
UTF-8
964
2.65625
3
[]
no_license
package intermediateModelHelper.indexing.structure; import intermediateModel.interfaces.IASTVar; import intermediateModelHelper.envirorment.Env; import java.util.ArrayList; import java.util.List; /** * @author Giovanni Liva (@thisthatDC) * @version %I%, %G% */ public class IndexEnv { List<IndexParameter> vars = ...
Java
UTF-8
1,831
1.875
2
[]
no_license
package com.example.mysql; //import com.mantri.budgetbuddy.R; //import android.support.v7.app.ActionBarActivity; import android.app.Activity; import android.content.Intent; import android.os.Bundle; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; import android.widget...
Python
UTF-8
5,210
2.5625
3
[]
no_license
from __future__ import (absolute_import, division, print_function, unicode_literals) import backtrader as bt import os import sys import datetime from DayCSVData import DayCSVData class TestStrategy(bt.Strategy): params = ( ('maperiod', 15), ('printlog', False) ) ...
Python
UTF-8
800
3.21875
3
[]
no_license
""" ID: warwick2 LANG: PYTHON3 TASK: friday """ with open('friday.in', 'r') as fin: in_text = fin.read() start_year = 1900 years = int(in_text) hits = [0, 0, 0, 0, 0, 0, 0] months = [31, 0, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31] day = 2 for i in range(start_year, start_year+years): leap = i % 4==0 and (i%10...
Python
UTF-8
1,414
3.03125
3
[ "MIT" ]
permissive
# SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries # SPDX-License-Identifier: MIT """ This test will initialize the display using displayio and draw a solid white background, a smaller black rectangle, and some white text. """ import board import displayio import terminalio from adafruit_display_text impo...
PHP
UTF-8
341
2.546875
3
[ "Apache-2.0" ]
permissive
<?php namespace blog; require_once __DIR__ . '/BlogView.php'; class StaticView extends BlogView { public function __construct($model) { parent::__construct($model); } protected function viewName() { return $this->model['content']; } protected function isActiveCaption($subUrl = null) { r...
PHP
UTF-8
923
2.515625
3
[ "BSD-3-Clause", "MIT" ]
permissive
<?php namespace app\models; use Yii; /** * This is the model class for table "t_prodi". * * @property integer $id_prodi * @property string $nama_prodi * * @property TKelas[] $tKelas */ class Prodi extends \yii\db\ActiveRecord { /** * @inheritdoc */ public static function tableName() { ...
Python
UTF-8
743
3.125
3
[]
no_license
# -*- coding: utf-8 -*- # LeetCode 883-三维形体投影面积 """ Created on Tues Apr 26 09:33 2022 @author: _Mumu Environment: py38 """ from typing import List class Solution: def projectionArea(self, grid: List[List[int]]) -> int: ans = 0 m = len(grid) n = len(grid[0]) col_max = [0] * n ...
PHP
UTF-8
688
2.71875
3
[]
no_license
<?php class Controller { protected $urlParameters; protected $urlKeys; public function __construct($urlParameters = null) { if($urlParameters) $this->urlParameters = explode ('/', $urlParameters); else $this->urlParameters = array(); } protected function...
Python
UTF-8
910
2.8125
3
[]
no_license
from gmail import GMail, Message import random # sickness = ["mệt", "đau đầu", "đau lưng", "đau bụng"] # sickness_list = ["sốt xuất huyết", "kiết lỵ", "đau tim", "hắc lào"] sickness_list = ["thương hàn", "kiết lị", "ebola", "sốt xuất huyết", "hiv"] gmail = GMail("Co Bau<codaubo@gmail.com>", "ngotungduongbn1997") html_t...
Java
UTF-8
1,006
2.125
2
[]
no_license
package helloworld.example.com.jingdong.user.presenter; import helloworld.example.com.jingdong.net.OnNetLisenter; import helloworld.example.com.jingdong.user.UserBean; import helloworld.example.com.jingdong.user.model.IUserModel; import helloworld.example.com.jingdong.user.model.UserModel; import helloworld.example.co...
Markdown
UTF-8
5,355
3.421875
3
[]
no_license
--- layout: post title: 乐理知识 categories: - Music tags: - ukulele - 乐理 - 和弦 --- 觉得ukulele很有意思,特意买了一个来玩,很漂亮很小巧,既然买了就要好好学\~ 和弦一直弄不明白,从头找了点理论来便于理解,但是要背的和弦还是要背,要练的指法还是要练,玩一样东西就要玩得像个样子\~(虽然小时候学过小提琴,但似乎都还给老师了\>\<我真的没有音乐天赋么= =) ### 音 音的产生是一种物理现象,是由物体的振动而产生。物体振动产生音波,并通过空气传播。我们人耳能听到的声音,大致在每秒振动11-20000次的范围内。而音乐中所使用的音,一般每秒振动27-...
Java
UTF-8
1,942
2.96875
3
[]
no_license
package com.aliaj; import java.io.BufferedReader; import java.io.FileReader; import java.io.IOException; import java.io.PrintWriter; import static java.lang.Math.sqrt; /** * Created by alitsiya.yusupova on 10/24/16. */ public class Fourth { public static void main(String[] args) throws IOException { B...
C++
UTF-8
397
2.984375
3
[]
no_license
#include <iostream> #include <vector> #include <limits.h> using namespace std; int dfs(int n, int m) { if(m == n) return 0; if(n <= 0) return INT_MAX; cout << n << " " << m << endl; int a = dfs(n - 1, m), b = dfs(2 * n, m); return 1 + min(a, b); } int main() { int...
C++
UTF-8
311
2.671875
3
[]
no_license
#include "Thread.h" static DWORD CALLBACK ThreadProc (LPVOID pf) { Proc* f = (Proc*)pf; (*f)(); delete f; return 0; } void Thread::init (Proc* f) { handle = CreateThread(NULL, 0, ThreadProc, (LPVOID)f, 0, NULL); } bool Thread::join (DWORD time) { return WaitForSingleObject(handle, time) == WAIT_OBJECT_0; }
JavaScript
UTF-8
2,808
2.609375
3
[]
no_license
// Load Dependencies import React from 'react' import {fetchMaps} from './../actions/apiCalls' // Main dashoard export default class AddressTable extends React.Component { constructor(props){ super(props); fetchMaps(); } addAddress = (newAddress) => { this.setState((prevState)...
Java
UTF-8
1,742
3.109375
3
[]
no_license
import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Nested; import org.junit.jupiter.api.Test; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertTrue; class DateUtilsTest { ...
Java
UTF-8
3,064
1.914063
2
[]
no_license
package com.pixectra.app; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.support.v7.widget.Toolbar; import android.view.View; import com.google.firebase.database.DataSnapshot...
Java
UTF-8
1,250
2.390625
2
[]
no_license
package com.gw.das.service; import org.junit.Before; import org.junit.Test; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.data.redis.core.ListOperations; import org.springframework.data.redis.core.RedisTemplate; public class RedisTest { private static final Logger lo...
Java
UTF-8
10,016
2.984375
3
[]
no_license
package falstad; import falstad.MazeController.UserInput; import generation.CardinalDirection; import generation.Cells; import generation.MazeConfiguration; /** * The BasicRobot Class implements the Robot interface, the BasicRobot object called inside the MazeApplication.java file after the * ManualDriver.java ob...
C
UTF-8
1,110
3.5625
4
[]
no_license
#include <pthread.h> #include <stdio.h> #include <stdlib.h> #include <sys/types.h> //Mingyuan Li //Computer system //HW3 //2/17/2016 //User give a number, program use one thread to find out all prime numbers and list int *list; int prime; int count; int N; void *calculate_prime(void *param); int main(int argc, char...
C#
UTF-8
2,730
2.8125
3
[ "MIT" ]
permissive
using System; using System.IO; using EnvDTE; using Jfevia.ProductivityShell.Vsix.Helpers; namespace Jfevia.ProductivityShell.Vsix.Extensions { internal static class ProjectExtensions { /// <summary> /// Gets the output folder. /// </summary> /// <param name="project">The pr...
Python
UTF-8
4,179
3.828125
4
[]
no_license
import numpy as np from utils import manhattanDistance from random import randrange # all four possible dir of given cell dirs = [[1, 0],[0, -1],[-1, 0],[0, 1]] class MazeGenerator(): # Provided cell, list of current walls, get the walls around the cells def getWalls(self, cell,walls): wallSet = set(w...
SQL
UTF-8
5,429
2.796875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.5 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1:3306 -- Generation Time: Aug 19, 2019 at 03:41 AM -- Server version: 5.7.26 -- PHP Version: 7.2.18 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CH...
Shell
UTF-8
4,619
3.734375
4
[ "Apache-2.0" ]
permissive
#! /bin/bash -norc set -u NAME=${0##*/}; DIRE=${0%/*}; if [[ -z "${DIRE}" ]]; then DIRE="."; fi; if [[ "${DIRE}" = "${NAME}" ]]; then DIRE="."; fi; DIRE="$(cd ${DIRE}; echo ${PWD})"; TAB=" "; # must be a TAB not a run of spaces unset CDPATH; # because when bash (I love it!) is involved, CDPATH can hose up...
Python
UTF-8
607
3.234375
3
[]
no_license
import requests def get_commit(ID): result = {} r = requests.get("https://api.github.com/users/" + ID +"/repos") repos = r.json() for repo in repos: repo_name = repo["name"] r = requests.get("https://api.github.com/repos/" + ID + "/" + repo_name + "/commits") commits = r.json(...
JavaScript
UTF-8
1,588
2.5625
3
[]
no_license
/* Card List Scripts */ $(document).ready(function () { // Cards SETS and TAFFY loaded in prior includes _cards = TAFFY(CARDS); write_sets(); run_search($('#search-input').val()); function write_sets() { var outp = ''; $.each(SETS, function(key, set) { outp += '<div><a class="cardset" href=...
C#
UTF-8
2,087
2.734375
3
[ "MIT" ]
permissive
using ModernWpf; using System.Threading; using System.Windows; using System.Windows.Threading; namespace MultiThreadingSample { public partial class MainWindow : Window { public MainWindow() { InitializeComponent(); Title = "Thread ID: " + Thread.CurrentThread.ManagedT...
JavaScript
UTF-8
1,350
2.515625
3
[]
no_license
import { Component } from "react"; import { Button, Form } from "semantic-ui-react"; class WishlistForm extends Component { state = { name: "", description: ""}; componentDidMount() { if (this.props.id) { const { id, name, description } = this.props; this.setState({ id, name, description }); ...
C++
UTF-8
1,473
2.8125
3
[]
no_license
#ifndef CONNECTED_CLIENT_H #define CONNECTED_CLIENT_H #include "Communication_server.h" #include <iostream> #include <string.h> #include <vector> #include <pthread.h> using namespace std; class Connected_client{ public: void init(string username, int sockfd, int num_connections, int port, int header_size, int m...
TypeScript
UTF-8
6,342
2.546875
3
[]
no_license
import { expect } from 'chai'; import { Request, Response } from 'express'; import * as admin from 'firebase-admin'; import 'mocha'; import * as sinon from 'sinon'; import { isAuthorized } from './authorized'; import { Roles, UserManagerRoles } from './roles'; describe('authorized.ts', () => { let req: Partial<Requ...
Markdown
UTF-8
14,575
3.25
3
[ "MIT" ]
permissive
# 尚观科技H5课程 ## web前端简单介绍 web前端包含:pc端页面 和移动端页面(web端当前的就业形势) 认识网页 ​ 网页主要由文字、图片、超链接、输入框、表格、表单等元素构成,除了这些常见的元素之外,还有音频、视频、以及falsh等 **web标准** 1.w3c万维网联盟组织,用来指定web标准的机构。 2.web标准:制作网页要遵循的规范。 3.web标准规范的分类:结构标准 表现标准 行为标准 4.结构:html 表现:css 行为:javascript **结构标准:**相当于人的身体 **表现标准:**相当于人的衣服 **行为标准:**相当于人的动作 **浏览器** 浏览器是网...
TypeScript
UTF-8
479
2.9375
3
[ "Apache-2.0" ]
permissive
export default class SimpleUser { id: number; firstName: string; familyName: string; groupIds: number[]; constructor (id: number, firstName: string, familyName: string, groupIds: number[]) { this.id = id this.groupIds = groupIds this.firstName = firstName this.familyName = familyName } ...
Java
UTF-8
9,023
2.03125
2
[ "MIT" ]
permissive
package com.appwoodoo.sdk.dialogs; import android.app.AlertDialog; import android.app.Dialog; import android.content.DialogInterface; import android.content.Intent; import android.content.SharedPreferences; import android.graphics.Color; import android.graphics.PorterDuff; import android.graphics.Typeface; import andr...
C++
UTF-8
485
2.6875
3
[]
no_license
#ifndef GGP_SCENE_H #define GGP_SCENE_H #include <string> #include "GameObject.h" class Camera; class Scene : public GameObject { protected: Camera * activeCamera; float totalTime; public: Scene(std::string _uniqueID); //Extra init method that runs before start. Useful to create objects and set up the scene vir...
Swift
UTF-8
1,204
2.609375
3
[]
no_license
// // ConfigurationManager.swift // ZRahman_TV_Remote_Phone // // Created by Zak on 3/1/16. // Copyright © 2016 csc471.depaul.edu. All rights reserved. // import UIKit class ConfigurationManager: NSObject { private var id: Int private var channelNumber: Int private var channelLabel:String ...
Markdown
UTF-8
1,099
2.875
3
[ "CC-BY-4.0" ]
permissive
--- layout: default title: "pdftk" date: 2021-06-25 18:12:13 +02:00 --- {% raw %} <h2 id="pdftk"> <a href="/en/common/pdftk.html">pdftk</a> <a href="#pdftk"><svg class="icon"> <use href="/assets/images/unicode_sprite.svg#link" /> </svg></a> </h2> > PDF toolkit. > More information: <https://www.pdflabs.com/tools...