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
Markdown
UTF-8
904
2.609375
3
[]
no_license
amber-java-joystick =================== Requirements ------------ * `jre` * `amber` mediator with `roboclaw` driver * `joystick` Tested on *Windows XP*. How to use (java) ----------------- * Download `*.jar` from this repository, from `target` (direct [link](https://github.com/dev-amber/amber-java-joystick/raw/ma...
PHP
UTF-8
1,080
2.59375
3
[]
no_license
<?php include "includes/miclase.php"; $link=conectarse("nomina"); $result=mysql_query('select * from constantes',$link); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equ...
Java
UTF-8
4,420
2.65625
3
[ "MIT" ]
permissive
package util; import java.util.Arrays; import java.io.PrintWriter; import javax.servlet.GenericServlet; import javax.servlet.ServletContext; /** * HTMLTemplates provide a very simple html template. * * @author Rod Byrne * @author Matthew Newell */ public class HTMLTemplates { private String contextPath; priva...
Java
UTF-8
3,919
3.25
3
[]
no_license
import java.sql.*; import java.util.Scanner; public class TableOperations { String username = "root"; String password = "123"; String connectorURL = "jdbc:mysql://localhost:3306/test"; Connection connection; TableOperations() throws SQLException { connection = DriverManager.getConnection(co...
Python
UTF-8
8,319
2.546875
3
[ "Apache-2.0" ]
permissive
"""Test admin flows.""" import unittest import flask import json from selenium.common.exceptions import NoSuchElementException from selenium.common.exceptions import TimeoutException from admin_flow import AdminFlow from base_test import BaseTest from login_page import LoginPage class AdminFlowTest(BaseTest): ""...
Rust
UTF-8
1,754
2.734375
3
[ "MIT", "Apache-2.0" ]
permissive
use proc_macro2::TokenStream; use quote::quote; use syn::{Data, Fields}; use super::field::Field; use super::checker::Checker; pub struct Container<'a> { struct_name: &'a syn::Ident, struct_generics: &'a syn::Generics, fields: Vec<Field<'a>> } impl<'a> Container<'a> { pub fn from_ast(chk: &Checker, i...
Rust
UTF-8
796
2.703125
3
[ "MIT" ]
permissive
#![warn(rust_2018_idioms)] #![cfg(all(feature = "full", not(target_os = "wasi")))] // WASI does not support all fs operations use tempfile::tempdir; use tokio::fs; #[tokio::test] async fn rename_file() { let temp_dir = tempdir().unwrap(); let file_path = temp_dir.path().join("a.txt"); fs::write(&file_pa...
Java
UTF-8
4,677
2.5625
3
[ "MIT" ]
permissive
package com.weibo.model.dao; import java.sql.ResultSet; import java.sql.SQLException; import java.util.ArrayList; import java.util.List; import com.weibo.DB.DB; import com.weibo.model.entity.UserInfo; import com.weibo.util.WeiboLogger; public class FriendsDao { /** * new following * @param uid : current user ...
Java
UTF-8
1,200
3.515625
4
[]
no_license
import java.awt.*; public class Paddle extends Rectangle { private static final double GRAVITY = 0.94; private int yVelocity; private boolean upAcceleration, downAcceleration; public Paddle(int x, int y, int PADDLE_WIDTH, int PADDLE_HEIGHT){ super(x,y,PADDLE_WIDTH,PADDLE_HEIGHT); ...
Python
UTF-8
6,687
2.921875
3
[]
no_license
import numpy as np import pandas as pd def preprocess_timestamp_cols(data): """ Parameters ---------- data : pd.DataFrame данные с действиями пользователя """ data['date'] = pd.to_datetime(data.timestamp, unit='s') data['day'] = data.date.dt.date return data def create_inter...
Java
UTF-8
2,135
2.90625
3
[]
no_license
public class EncryptText { private final String SECRET_TEXT = "baamx2maeaacxbmc"; private final String CIPHERTYPE = "AES/CBC/PKCS5Padding"; private final String ALGORITHM = "AES"; private final String ENCODING = "UTF-8"; private final byte[] SECRET; private final SecretKeySpec key; private ...
Java
UTF-8
1,178
2.46875
2
[]
no_license
package test.java; import static org.junit.Assert.assertEquals; import java.util.ArrayList; import java.util.Collection; import java.util.List; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; import org.junit.runner.RunWith; import org.junit.runners.Parameterized; import org.ju...
Python
UTF-8
2,089
3.078125
3
[]
no_license
num_comparisons = 0 def _non_random_quick_sort(array, start, end): global num_comparisons if end <= start: return num_comparisons += (end-start) pivot_idx = start pivot_item = array[pivot_idx] i, j = start + 1, start + 1 has_moved = False while j <= end: if array[j] <...
C++
UTF-8
2,829
3.203125
3
[]
no_license
#include <boost/test/auto_unit_test.hpp> #include "matrix.hpp" #include "rectangle.hpp" #include "circle.hpp" #include "composite-shape.hpp" BOOST_AUTO_TEST_SUITE(MatrixTestSuite) BOOST_AUTO_TEST_CASE(MatrixCopyConstructor) { lukina::Rectangle rec({10.0, 3.0}, 4.0, 2.0); lukina::Circle cir({4.0, 4.0}...
C++
UTF-8
1,388
2.65625
3
[]
no_license
// // test-blockdevice.cpp // testing // // Created by Oliver Waldhorst on 15.12.17. // Copyright © 2017 Oliver Waldhorst. All rights reserved. // #include "catch.hpp" #include <stdio.h> #include <string.h> #include "helper.hpp" #include "blockdevice.h" #define BD_PATH "/tmp/bd.bin" #define NUM_TESTBLOCKS 1024...
Markdown
UTF-8
2,946
2.703125
3
[]
no_license
# Article 110.10 Catégories de navigation. En application du paragraphe II.14 de l'article 1er du décret n° 84-810 modifié du 30 août 1984, les catégories de navigation sont définies comme suit : 1. A l'exception des navires de plaisance à utilisation commerciale, les navires de plaisance sont exclus des disposition...
Markdown
UTF-8
966
3.375
3
[]
no_license
# Prepositions time ## On - days - (the) weekend ## At - time (o'clock) - AM/PM - night - noon - the weekend (British English) ## In - months - seasons - morning - evening - afternoon - periods of time (minutes, hours, years) ## None this + - weekend - morning - evening - month Examples - I have to leave in ...
C++
UTF-8
356
2.859375
3
[]
no_license
#include "transferCommand.h" using namespace std; void TransferCommand::execute() { int from, to; double money; cout << "Enter fromIban:\n"; cin >> from; cout << "Enter toIban:\n"; cin >> to; cout << "Enter money to transfer:\n"; cin >> money; bank->transfer(from, to, money); } TransferCommand::TransferCom...
Markdown
UTF-8
11,056
2.625
3
[]
no_license
+++ categories = ["キャリア"] date = "2019-11-12T22:06:54+09:00" description = "IT好きの好きのふたりが結婚式でやってよかったことを振り返ってまとめました。お祝儀のデジタル化やTwitterの活用など現代的でおもしろいことにも挑戦してみました。" draft = false image = "" tags = ["Tech"] title = "結婚式を楽に円満に行う!やって本当によかった7つのこと" author = "mosuke5" archive = ["2019"] +++ こんにちは。@mosuke5です。 私ごとですが、先日結婚式をあげました...
C++
UTF-8
651
3.015625
3
[]
no_license
#include "PeriodicSampler.hpp" PeriodicSampler::PeriodicSampler(std::string id, size_t period) : Subscriber(id), period(period) {} // allow for message to be signaled after a certain period, when counter % // period == 0, send this message void PeriodicSampler::signal(Message message) { if (counter % period == ...
PHP
UTF-8
783
2.921875
3
[]
no_license
<?php class Gempa{ public $lokasi; public $skala; public function __construct($lokasi,$skala){ $this->lokasi = $lokasi; $this->skala = $skala; } public function dampak(){ if ($this->skala < 2) $hasil = 'Tidak Terasa'; else if ($this->skala >= 2 && $this->skala < 3) $...
Java
UTF-8
5,430
1.882813
2
[]
no_license
package com.sherwinyu.parkifi; import java.text.DecimalFormat; import java.util.List; import com.google.android.maps.MapActivity; import com.google.android.maps.MapView; import com.google.android.maps.MyLocationOverlay; import com.google.android.maps.Overlay; import android.app.Activity; import android.app.Dialog; i...
Markdown
UTF-8
1,305
3.609375
4
[]
no_license
# 415. 字符串相加 ```c++ 给定两个字符串形式的非负整数 num1 和num2 ,计算它们的和。 注意: num1 和num2 的长度都小于 5100. num1 和num2 都只包含数字 0-9. num1 和num2 都不包含任何前导零。 你不能使用任何內建 BigInteger 库, 也不能直接将输入的字符串转换为整数形式。 来源:力扣(LeetCode) 链接:https://leetcode-cn.com/problems/add-strings 著作权归领扣网络所有。商业转载请联系官方授权,非商业转载请注明出处。 ``` --- 记得2015秋天做NOJ-100题的时候,一个大数加法和大数乘法我写...
JavaScript
UTF-8
1,636
3.5
4
[]
no_license
const createError = require('http-errors'); function createTicket() { let ticket = new Array(3); for (let i = 0; i < ticket.length; i++) { fillRow(ticket, i); } return ticket; } function fillRow(ticket, rowIndex) { let row = new Array(9); let count = 0; while (count < 5) { ...
JavaScript
UTF-8
418
2.625
3
[]
no_license
import { ADD_SPINNER, REMOVE_SPINNER } from "../actions"; const spinnerActive = false; export const spinnerReducer = (state = spinnerActive, action) => { switch (action.type) { case ADD_SPINNER: return (state = action.spinnerActive); case REMOVE_SPINNER: return (state = action.spinnerActive); ...
Java
UTF-8
77
1.617188
2
[]
no_license
package pl.klimas7.spring.core.xml; interface Worker { void doWork(); }
Java
UTF-8
7,095
2.578125
3
[]
no_license
package kr.green.springwebproject.controller; import java.util.ArrayList; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpSession; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import o...
C++
UTF-8
1,185
3.765625
4
[]
no_license
/* Stack: push, peek, pop 1. LIFO, last in first out 2. add in stack and del stack, and only work in top of stack */ #ifndef ARRAY_STACK_HPP #define ARRAY_STACK_HPP #include <iostream> #include "ArrayStack.h" using namespace std; template<class T>class ArrayStack { public: ArrayStack(); ~ArrayStack(...
C#
UTF-8
1,697
2.921875
3
[]
no_license
using System.Collections; using System.Collections.Generic; using UnityEngine; namespace LIMB { /// <summary> /// Uses a Combatant, Skill, and expected Combatant targets to build an Action that may or may not succeed. /// </summary> /// When Actions are performed, all buffs should have already been ap...
Java
UTF-8
6,274
2.125
2
[]
no_license
package com.spartan.karanbir.restorecommender; import android.content.Intent; import android.net.Uri; import android.os.AsyncTask; import android.os.Bundle; import android.support.annotation.Nullable; import android.support.v7.app.AppCompatActivity; import android.util.Log; import android.view.View; import android.wid...
JavaScript
UTF-8
7,237
3.109375
3
[]
no_license
import React, { useState, useEffect } from 'react'; const TicTac=()=>{ const [section, setSection]= useState({name1:"",name2:"",name3:"",name4:"",name5:"",name6:"",name7:"",name8:"",name9:""}) const [flag,setFlag]= useState(true) const solution=[[1,2,3],[1,5,9],[1,4,7],[2,5,8],[3,5,7],[3,6,9],[4,5,6],[7,8...
Java
UTF-8
2,075
1.664063
2
[]
no_license
package com.cmcm.p074a.p075a.p114c; import android.bluetooth.BluetoothAdapter; import android.bluetooth.BluetoothDevice; import android.content.IntentFilter; import android.os.Build.VERSION; import java.util.HashMap; import java.util.Map; import org.json.JSONException; import org.json.JSONObject; /* renamed from: com...
Markdown
UTF-8
3,274
3.0625
3
[]
no_license
--- layout: blog categories: reading title: Modern Operating Systems 笔记 - Threads tags: OS thread pthread user-space --- ## Thread Usage 1. Multiple activities going on at once with the ability to share an address space 2. Lighter weight than processes, easy to create and destroy. 3. Overlap activities with substant...
C++
UTF-8
1,061
2.5625
3
[]
no_license
#pragma once #include <string> #include <vector> #include <memory> #include <exception> #include "export.h" #include "XmlBase.h"; #include "../xmlutils/NameMangler.h" class XMLCONVERTER_API EnumType : public XmlBase { public: EnumType() : XmlBase() { } void putEnumvalues(const std::string & va...
Swift
UTF-8
10,795
3.03125
3
[]
no_license
// // SYPolygonButton.swift // App-Swift // // Created by 谷胜亚 on 2017/9/7. // Copyright © 2017年 谷胜亚. All rights reserved. // 正多边形按钮 import Foundation /// 六边形按钮的风格 class SYPolygonStyle { /// 是否可以圆角 var roundedCornersEnable: Bool = false /// 圆角程度 - 值越大,角越平滑 var filletDegree: Double = 5.0 ...
Java
UTF-8
3,067
1.914063
2
[]
no_license
package com.google.android.gms.d; import java.io.IOException; public final class l extends ee<l> { private static volatile l[] d; public String a; public o b; public g c; public l() { c(); } public static l[] a() { if (d == null) {} synchronized (ei.a) { if (d == null) ...
Markdown
UTF-8
2,707
3.640625
4
[ "MIT" ]
permissive
--- layout: post title: "java clone(java深浅克隆)分析" date: 2016-05-06 categories: JAVA --- java clone(java深浅克隆)分析 --- - 目录 {:toc} #### 引用变量与普通变量的区别 Java语言的一个优点就是取消了指针的概念。但是,复制时,存在引用变量与普通变量的区别。 其中引用变量,容易出现深复制,与浅复制的问题。 1> 浅复制:是指复制只复制变量的引用,即clone的两个变量指向同一个区域。 2> 深复制:指的是复制时,将原来的变量所指的区域复制,即clone出来的变量,与原来各自指向了不同内存区。 由于浅...
Rust
UTF-8
1,494
2.90625
3
[]
no_license
extern crate image; use image::{GenericImageView, DynamicImage, Pixel}; fn main() { // Use the open function to load an image from a Path. // `open` returns a `DynamicImage` on success. let img = image::open("C:/Users/Owner/Desktop/Photomosaic_Pics/water.JPG").unwrap(); // The dimensions method ret...
JavaScript
UTF-8
7,399
2.859375
3
[]
no_license
$(document).ready(function () { var dates=[{id:"1",date:"27/03/2019"},{id:"2",date:"28/03/2019"},{id:"3",date:"01/04/2019"}]; S1={slotid:"1",dateid:"1",date:"27/03/2019",time:"10 to 11",num:"1"}; S2={slotid:"2",dateid:"1",date:"27/03/2019",time:"11 to 12",num:"2"}; S3={slotid:"3",dateid:"2",date:"28/03/2019",time...
Markdown
UTF-8
2,625
2.609375
3
[]
no_license
# docker-gateway This repository contains some of my labs and tests using the Broadcom Layer7 API Gateway docker form factor. ## Getting Started As of this version, you're going to find 4 docker-compose files as follows: * **gateway-derby.yml** - deployment of a database-less gateway and not use the hazelcast clust...
JavaScript
UTF-8
2,339
2.515625
3
[]
no_license
const assert = require("assert"); const { $root_, $parent_, $luncle_, $runcle_, $gen_ance, $ance, $some_ances, $ances_, $plance, $some_plances, $plances_, $depth_, $ance_dist, } = require("../../edge"); var max_size= 4096 var vertexes = new Set([1,2,3,4,5,6,7,8,9,10...
Shell
UTF-8
207
3.375
3
[]
no_license
#!/bin/bash -x read -p "Enter the date: " date read -p "Enter the month: " month if (( ($month <=6 && $date >=20) && (($month >=3 && $date>=20) && ($date<31 )) )) then echo "true"; else echo "false"; fi
C++
UTF-8
2,075
2.609375
3
[]
no_license
//------------------------------------------------------------------- // Author........: Ewa Makosa // Date..........: // Description...: // Revisions.....: //=================================================================== #ifndef __GENERALRULEEXPORTER_H__ #define __GENERALRULEEXPORTER_H__ #include <copyright.h> ...
JavaScript
UTF-8
2,309
2.640625
3
[]
no_license
import { FETCH_EVENTS, FETCH_ACCOUNTS, FETCH_GROUPS, FETCH_FILTERS, ADD_FILTER, REMOVE_FILTER, FETCH_LOCATIONS, FETCH_SINGLE_ACCOUNT, FETCH_SINGLE_GROUP, FETCH_SINGLE_LOCATION, SET_DATE } from '../actions'; let defaultState = { events: [], filters: [], accounts: ...
C#
UTF-8
1,049
3.15625
3
[]
no_license
using System.Collections.Generic; public class Startup { public static void Main() { var firstBook = new Book { name = "Pod Igoto", pages = 500, price = 20.00m, description = "Voina" }; var secondBook = new Book(); secondBook.name = "St...
Markdown
UTF-8
2,378
2.6875
3
[]
no_license
<properties pageTitle="如何在 Azure API 管理中创建 API、操作和产品" metaKeywords="" description="了解如何在 API 管理中创建 API、操作和产品。" metaCanonical="" services="" documentationCenter="API Management" title="如何在 Azure API 管理中创建 API、操作和产品" authors="sdanie" solutions="" manager="" editor="" /> <tags ms.service="" ms.date="02/24/2015" wa...
JavaScript
UTF-8
1,592
3.859375
4
[]
no_license
const fs = require('fs') /* const file1 = fs.readFileSync(__dirname + '/file/1.txt', 'utf8') console.log(file1) const file2 = fs.readFileSync(__dirname + '/file/2.txt', 'utf8') console.log(file2) const file3 = fs.readFileSync(__dirname + '/file/3.txt', 'utf8') console.log(file3) console.log("a...
Swift
UTF-8
599
2.671875
3
[ "Apache-2.0" ]
permissive
// // UIKit+Localized.swift // hackernews-stories // // Created by Alexander Tereshkov on 4/14/19. // Copyright © 2019 Alexander Tereshkov. All rights reserved. // import Foundation import UIKit extension UIButton { @IBInspectable var localizedTitle: String? { set { setTitle(newValue?...
C#
UTF-8
1,216
2.65625
3
[]
no_license
using System.Linq; using System.Threading.Tasks; using Microsoft.EntityFrameworkCore; using TravelAgency.Models; namespace TravelAgency.Initializers { public class MigrationInitializer { private readonly ApplicationDbContext _applicationDbContext; public MigrationInitializer(Applicat...
JavaScript
UTF-8
4,093
3.453125
3
[]
no_license
//game logic $(document).ready(function() { var audioElement = document.createElement("audio"); audioElement.setAttribute("src", "./assets/GoTtheme.mp3"); // Theme Button $(".theme-button").on("click", function() { audioElement.play(); }); $(".pause-button").on("click", function() { ...
Java
UTF-8
6,168
2.03125
2
[]
no_license
package com.example.laptop88.Fragment; import android.app.AlertDialog; import android.content.DialogInterface; import android.os.Bundle; import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import androidx.annotation.NonNull; import androidx.annotation....
Python
UTF-8
1,239
3.1875
3
[]
no_license
import xml.etree.ElementTree as ET class TagRemove: def __init__(self, xmlTree, removeDir): self.tree = xmlTree self.root = self.tree.getroot() self.removeSet = self.loadRemoveSet(removeDir) #Loads set of tags to be filtered out from settings def loadRemoveSet(self, removeDir): ...
C
UTF-8
590
3.328125
3
[]
no_license
#include <stdio.h> #include <stdlib.h> #include <string.h> void rotate(int n, int k, char *str) { char cp[n+1]; strcpy(cp, str); for(int i=0; i<k; i++) { char tmp[2]; tmp[0] = cp[0]; tmp[1] = '\0'; strcpy(cp, str+1); strcat(cp, tmp); strcpy(str, cp); } } ...
C#
UTF-8
2,142
2.546875
3
[]
no_license
using System; using System.Collections.Generic; using System.Text; using HWInterface; using Globals; namespace MccCounter { public class CounterWrapper : ICounter { private MccDAQCounter _counter; private int _count, _prev; private bool _isOK; public bool IsOK { ...
PHP
UTF-8
1,334
3.453125
3
[]
no_license
<!doctype html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"> <meta http-equiv="X-UA-Compatible" content="ie=edge"> <title>Lập trình PHP</title> </head> <body> <?php...
C++
UTF-8
564
2.75
3
[]
no_license
#ifndef INODE_H #define INODE_H #include <iostream> #include <string> #include <vector> #include <string> #include <cstring> typedef struct { char filename[32]; int filesize; int dataPointers[128]; } INodeInfo; class INode { public: ~INode(); INodeInfo info; INode(const std::s...
Java
UTF-8
537
3.265625
3
[]
no_license
package lesson3; // you can also use imports, for example: // import java.util.*; // you can write to stdout for debugging purposes, e.g. // System.out.println("this is a debug message"); public class FrogJmp { public static int solution(int X, int Y, int D) { // write your code in Java SE 8 in...
C++
UTF-8
883
3.671875
4
[]
no_license
#include "Animal.hpp" Animal::Animal() { std::cout << "Default Animal constructor has been called.\n"; _Type = ""; } Animal::Animal(std::string newType) { std::cout << "Overloaded Animal constructor has been called.\n"; _Type = newType; } Animal::Animal(Animal const &copy) { std::cout << "Copy An...
Swift
UTF-8
750
2.953125
3
[ "Apache-2.0" ]
permissive
// // TextFieldNumericalNode.swift // UsbongKit // // Created by Chris Amanse on 26/05/2016. // Copyright © 2016 Usbong Social Systems, Inc. All rights reserved. // import UIKit /// Displays text and a text field below that accepts numbers only open class TextFieldNumericalNode: Node, TextInputTypeNode { publ...
Markdown
UTF-8
878
3.109375
3
[]
no_license
# Coding-in-Hindi Imagine what if Hindi become coding language? Here u can experience coding in Hindi. # How to use Translator.c is program that translat Hindi code to its equivalant C code. Example.c is example input to this program. Because of some limitition of identifiers in C, we can write only keywords & well kn...
Java
UTF-8
1,941
2.53125
3
[]
no_license
/* * Copyright (C) 2014 TESIS DYNAware GmbH. * All rights reserved. Use is subject to license terms. * * This file is licensed under the Eclipse Public License v1.0, which accompanies this * distribution and is available at http://www.eclipse.org/legal/epl-v10.html. */ package com.data.formats; import java.util...
Shell
UTF-8
656
3.265625
3
[ "MIT" ]
permissive
# -*- mode: shell-script -*- function makeBuildDirectory { mkdir -p _build/Release mkdir -p _build/Debug mkdir -p _build/clang+Release mkdir -p _build/clang+Debug COMMON_FLAGS="-DCMAKE_INSTALL_PREFIX=$piu" d=`pwd` cd $d/_build/Debug cmake -DCMAKE_BUILD_TYPE=Debug $COMMON_FLAGS ../.. ...
Shell
UTF-8
2,556
3.484375
3
[ "MIT" ]
permissive
#!/bin/bash # Dataproc Image IMAGE="1.4-ubuntu18" # Cluster Name read -p "What cluster to run this job on [enter for default]? " -i "preprocess" -e CLUSTER # check if $CLUSTER variable is empty; if it is, make it default [[ -z "$CLUSTER" ]] && CLUSTER=preprocess # Scala Class read -p "What class is the main method f...
Python
UTF-8
1,474
2.921875
3
[]
no_license
import xml.etree.ElementTree as ET import re import json files = [] while True: nxt = input(">") if nxt == "": break else: with open(nxt.strip(), "r") as file: files.append(file.read()) all_items = [] for file in files: match = re.search("Info for (.+)</title>", file) ...
Python
UTF-8
1,484
2.5625
3
[]
no_license
import numpy as np from skimage.feature import hog import glob import pdb import cv2 img_list = glob.glob('/Users/titas/Desktop/labelled_videos/images/*.jpg') txt_list = glob.glob('/Users/titas/Desktop/labelled_videos/labels_3class/*.txt') N_data = len(img_list) x_feat = [] y_feat = [] for ctr in range(N_data): #...
Python
UTF-8
976
4.3125
4
[]
no_license
''' Implementation of Greedy algorithm to find the least waiting time at a clinic ''' def get_minimum_time(array): ''' Get index of minimum element in array in parameter ''' minimum = array[0] minimum_index = 0 for index, value in enumerate(array): if value < minimum: min...
JavaScript
UTF-8
307
2.53125
3
[]
no_license
const bcrypt = require('bcrypt') const salt = 10 const generatePassword = (password) => { return bcrypt.hashSync(password, salt) } const verifyPassword = (password, encryptedPassword) => { return bcrypt.compareSync(password, encryptedPassword) } module.exports = { generatePassword, verifyPassword }
Markdown
UTF-8
878
4.1875
4
[ "Apache-2.0" ]
permissive
## Objective Today, we're working with binary numbers. Check out the Tutorial tab for learning materials and an instructional video! ## Task Given a base-10 integer, n, convert it to binary (base-2). Then find and print the base-10 integer denoting the maximum number of consecutive 1's in n's binary representation. #...
Java
UTF-8
1,023
2.078125
2
[]
no_license
package com.gestionusuario.app.service.impl; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.gestionusuario.app.repository.PermisoDAO; import com.gestionusuario.app.service.PermisoService; @Service("permisoservice") public class Perm...
Java
UTF-8
1,965
2.25
2
[]
no_license
package com.example.demo.controller; import java.util.List; import java.util.Map; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.*; import com.exa...
C
UTF-8
2,368
3.0625
3
[]
no_license
#ifndef _CONVERT_H_ #define _CONVERT_H_ #include <stdio.h> #include <string.h> #define BUFF_SIZE (4096) #define VALUE_SIZE (16) #define KEY_SIZE (24) #define ERROR_WRONG_HEADER (1) /** \brief convert hhr file to tsv file * Converts hhr (hhblits-result) file to tsv (tab separated values) file. * Following columns ...
Java
UTF-8
3,268
2.125
2
[]
no_license
/* * SatelliteInfoEvent.java * Copyright (C) 2012 Kimmo Tuukkanen * * This file is part of Java Marine API. * <http://ktuukkan.github.io/marine-api/> * * Java Marine API is free software: you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published by the ...
Markdown
UTF-8
2,022
3.359375
3
[]
no_license
# web框架概述 **学习目标** * 能够知道web框架和web服务器的关系 --- ### 1. web框架和web服务器的关系介绍 前面已经学习过web服务器, 我们知道web服务器主要是接收用户的http请求,根据用户的请求返回不同的资源数据,但是之前我们开发的是静态web服务器,返回的都是静态资源数据,假如我们想要web服务器返回动态资源那么该如何进行处理呢? 这里我们给大家介绍一个web框架,**使用web框架专门负责处理用户的动态资源请求,这个web框架其实就是一个为web服务器提供服务的应用程序**,简称web框架。 ![web框架和web服务器的关系](/miniweb/imgs/web框架和we...
C
UTF-8
3,822
3.46875
3
[]
no_license
#include<string.h> #include<stdio.h> #include<stdint.h> #include<stdbool.h> #include<ctype.h> #include<stdlib.h> char arrange1(char *str) { for(uint16_t i=0; i<200; i++) { if(str[i]==' ') { for(uint16_t j=i; j<200; j++) { str[j]=str[j+1]; } } if(str[i]==' ') i--; } return 0; } bool availabil...
Java
UTF-8
1,478
2.375
2
[]
no_license
package com.dfn.watchdog.handlers; import com.dfn.watchdog.WatchdogServer; import com.dfn.watchdog.commons.Node; import com.dfn.watchdog.commons.messages.cluster.Heartbeat; import com.dfn.watchdog.commons.messages.cluster.HeartbeatAck; import com.dfn.watchdog.commons.messages.cluster.HeartbeatMessage; import io.netty....
Java
UTF-8
885
2.34375
2
[]
no_license
package com.spring.example.pojo; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; import java.util.List; @JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({ "name", "elemen...
Swift
UTF-8
1,974
2.671875
3
[ "MIT" ]
permissive
// // UserRolesResponse.swift // FanapPodChatSDK // // Created by Mahyar Zhiani on 4/2/1398 AP. // Copyright © 1398 Mahyar Zhiani. All rights reserved. // import Foundation import SwiftyJSON open class UserRolesModel: ResponseModel, ResponseModelDelegates { public var threadId: Int public var user...
Java
UTF-8
7,033
2.28125
2
[]
no_license
package shop.philoarte.api.artist.controller; import shop.philoarte.api.artist.domain.Artist; import shop.philoarte.api.artist.domain.dto.ArtistDto; import shop.philoarte.api.artist.domain.dto.ArtistFileDto; import shop.philoarte.api.artist.service.fileService.ArtistFileServiceImpl; import shop.philoarte.api.art...
Markdown
UTF-8
1,094
3.09375
3
[ "MIT" ]
permissive
### JsonParseException 1. Quote around key and value must be double quotes not single quotes 2. No tralling comma Like below, the comma after 22 is trailing comma. ``` { "Name": "John", "Age": "22", } ``` ### Traverse key/value in JsonNode ``` for(Iterator<Map.Entry<String, JsonNode>> i = rootJsonNode.fiel...
Markdown
UTF-8
1,081
2.59375
3
[]
no_license
# YouTube Downloader Versão atual: 0.1.1 ### Dependências: - Para uso em CLI: **Pytube** - Para uso em GUI: **Pytube** e **PySimpleGUI** ### Descrição: 📝 Seja bem vindo ao meu projeto 'YouTube Donwloader', que tem por objetivo baxar vídeos, playlists de vídeos, áudios e playlists de áudios do YouTube. Nesta ...
Python
UTF-8
1,360
3.1875
3
[]
no_license
import pandas as pd from sklearn import preprocessing from sklearn import neighbors from sklearn.model_selection import train_test_split from sklearn.metrics import f1_score MAX_NUM_NEIGHBORS = 20 # von 1-20 in Schleife erhöhen WEIGHTS = 'uniform' # wem langweilig ist: diesen Hyperparameter ebenfalls optimieren in w...
C#
UTF-8
2,856
2.875
3
[]
no_license
using System; using System.ComponentModel.DataAnnotations; using Domain.Common; using Domain.Errors; using Domain.Exceptions; namespace Domain.Entities { public class Account : AuditableEntity { public string Email {get; protected set;} public string Name {get; protected set;} public st...
Java
UTF-8
1,094
3.65625
4
[]
no_license
package solution_ez; /** * @Author Fisher * @Date 2020/2/28 22:01 **/ /** * 给定一个整数 (32 位有符号整数),请编写一个函数来判断它是否是 4 的幂次方。 * * 示例 1: * * 输入: 16 * 输出: true * 示例 2: * * 输入: 5 * 输出: false * 进阶: * 你能不使用循环或者递归来完成本题吗? * * 来源:力扣(LeetCode) * 链接:https://leetcode-cn.com/problems/power-of-four * 著作权归领扣网络所有。商业转载请联系...
Java
UTF-8
2,194
2.40625
2
[]
no_license
package com.example.Taitokysely; /* import org.springframework.context.annotation.Configuration; import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity; import org.springframework.security.config.annotation.web.builders.HttpSecurity; import org.springframework.security.con...
C++
UTF-8
1,775
2.703125
3
[]
no_license
#include<stdio.h> #include<string.h> void rev(char *from, char *to) { int i; int len=strlen(from); for(i=0;i<len;i++) to[i]=from[len-1-i]; to[len]='\0'; } void bigSum(char *fir, char *sec,char *res) { char F[110],S[110],R[110]; int f,s,sum,i,j,carry; f=strlen(fir); s=strlen(sec);...
Java
UTF-8
2,189
2.703125
3
[]
no_license
/** * */ package ac.biu.nlp.nlp.lexical_resource.impl.geo; import java.util.List; import ac.biu.nlp.nlp.lexical_resource.EmptyRuleInfo; import ac.biu.nlp.nlp.lexical_resource.LexicalResourceException; import ac.biu.nlp.nlp.lexical_resource.LexicalRule; import ac.biu.nlp.nlp.representation.CanonicalPosTag...
Python
UTF-8
2,201
2.734375
3
[]
no_license
from sys import argv import os, re, bisect class Argument: def __init__(self, name, adr): self.name = name self.adr = int(adr[2:], 16) if adr == "0x" else int(adr, 16) def usage(): print("%-7s %s %s" % ("usage:", argv[0], "<name> <address> <name> <address> ...")) print("%-7s %s %s" % ("", argv[0]...
Java
UTF-8
2,777
3.4375
3
[]
no_license
package Level3.섬연결하기.prim; import java.util.Collections; import java.util.Comparator; import java.util.LinkedList; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scr = new Scanner(System.in); int n = scr.nextInt(); int[][] costs; int costLen = scr.nextInt(); ...
Ruby
UTF-8
1,195
3.9375
4
[ "MIT" ]
permissive
# https://leetcode.com/problems/super-ugly-number/ # # Write a program to find the nth super ugly number. # # Super ugly numbers are positive numbers whose all prime factors are in the given prime list primes of size k. # For example, [1, 2, 4, 7, 8, 13, 14, 16, 19, 26, 28, 32] is the sequence of the first 1...
C++
ISO-8859-1
2,856
2.984375
3
[ "MIT", "CC-BY-3.0", "CC-BY-NC-4.0" ]
permissive
/******************************************************************** created: 2011/12/06 created: 6:12:2011 16:56 filename: C:\Users\Bruno\Documents\Mestrado\2011.2\Dissertao\AdaptiveShooter\src\AdaptiveShooter\Entity.h file path: C:\Users\Bruno\Documents\Mestrado\2011.2\Dissertao\AdaptiveShooter\src\Adapti...
SQL
UTF-8
14,774
3.28125
3
[]
no_license
/* SQLyog Enterprise - MySQL GUI v8.12 MySQL - 5.5.5-10.1.21-MariaDB : Database - order_coffee ********************************************************************* */ /*!40101 SET NAMES utf8 */; /*!40101 SET SQL_MODE=''*/; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 *...
Java
UTF-8
3,122
1.632813
2
[]
no_license
package com.google.android.material.transformation; import android.content.Context; import android.os.Build; import android.util.AttributeSet; import android.view.View; import android.view.ViewParent; import androidx.coordinatorlayout.widget.CoordinatorLayout; import androidx.core.view.ViewCompat; import com.google.an...
JavaScript
UTF-8
309
2.609375
3
[ "MIT" ]
permissive
"use strict"; module.exports = function ( args ) { var event = document.createEvent( "Event" ); event.keyCode = args.keyCode; if ( args.ctrl === true ) { event.ctrlKey = true; } if ( args.shift === true ) { event.shiftKey = true; } event.initEvent( "keyup" ); document.dispatchEvent( event ); };
Java
UTF-8
1,205
2.125
2
[]
no_license
package application.com.service; import application.com.dao.IAuthrizationDao; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import java.util.ArrayList; import java.util.List; import java.ut...
Java
UTF-8
1,787
1.601563
2
[ "Apache-2.0" ]
permissive
/* * Copyright 2014-present Open Networking Foundation * * 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 appli...
Java
UTF-8
5,725
2.328125
2
[ "MIT" ]
permissive
package cn.edu.xmut.izhihu.pojo.entity; import javax.persistence.*; import java.util.Date; @Table(name = "question") public class Question { /** * 问题id */ @Id @Column(name = "ques_id") @GeneratedValue(strategy = GenerationType.IDENTITY, generator = "SELECT LAST_INSERT_ID()") private Stri...
PHP
UTF-8
511
2.625
3
[]
no_license
<?php $serverneme="121.200.55.60:3307"; $username="2019UIT1018"; $password=" 21-10-2001"; $database="2019UIT1018"; //create connection $conn= mysqli_connect($servername,$username,$password,$database); //check connection if(!$conn){ die("connection failed:".mysqli_connect_error()); } echo "connected sucessfully"; $sql="...
JavaScript
UTF-8
409
2.984375
3
[ "MIT" ]
permissive
'use strict' const { evaluate, compile } = require('./compile') // checking command flags for backend choice const inputStr = process.argv[2] const evalFlag = process.argv[3] === 'eval' // choose which function to use const transform = evalFlag ? evaluate : compile // the only side effect in all of the solution cod...
Java
UTF-8
1,668
2.46875
2
[]
no_license
package Objetos; public class Reserva { int idReserva, numhabitacion, clavehabita, claveHotel; String nombreHotel, checkIn, checkOut; public Reserva(int idReserva, String nombreHotel, int numhabitacion, String checkIn,String checkOut, int claveHotel, int claveHabitacion) { this.idReserva = idReserva; this.n...
C++
UTF-8
572
3.078125
3
[]
no_license
class Solution { public: bool isIsomorphic(string s, string t) { map<char, char> mapS; map<char, int> mapT; int i=0, j=0; while(i<s.size() && j<t.size()){ mapS[s[i]] = t[j]; mapT[t[j]] = s[i]; j++; i++; } i = 0; j = 0; ...