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
Python
UTF-8
839
3.171875
3
[]
no_license
import matplotlib.pyplot as plt import random import CentroidClassification as cc def run(): # filename = input("Enter filename: ") filename = "HandWrittenLetters.txt" class_ids = [1,2,3,4,5,6,7,8,9,10] # class_ids = random.sample(range(1, 27), 10) # class_ids = [x for x in range(11, 21)] pr...
Markdown
UTF-8
7,492
2.515625
3
[]
no_license
一二九 “本人业已准备三上沉鱼岛手刃‘五魔’,成功之后我一定请白蕙来与诸位见面,安排各人的去处。” 八女侍虽然还不十分满意,但他们相信季灵芷必能成功,也相信白蕙必然作妥善的处理,于是依依不舍地看着季灵芷相辞而去。 十六只充满期待的明眸,目送对方英俊背影消失于视线之外。 茫茫沧海。 一叶孤帆,在四月的阳光中,蓝天似洗,白浪如银,分外使人心境开郎,油然而生‘乘长风破万里浪”的雄心壮志。 季灵芷凝立船首,怅望天云,心中充满了兴奋与惘然。 他不久就可以与海宫蛟女、白蕙,以及师叔“神通一指”相见,久别重逢自然是值得兴奋喜悦。 可是—— 这次他们将同返故乡“水云村...
Shell
UTF-8
1,396
3.90625
4
[ "Apache-2.0" ]
permissive
#!/bin/bash output=$(lpass ls SSH | tail -n +2) #echo "$output" pat='SSH\/(.*?) \[id: (.*?)\]' lpass_ssh_keys=() while read -r line; do [[ "$line" =~ $pat ]] #echo "$line" #echo "${BASH_REMATCH[0]}" # echo "${BASH_REMATCH[1]}" lpass_ssh_keys+=( $(echo "$line" | sed -E 's/^SSH\/(.*) \[.*/\1/') ) #echo "${B...
Markdown
UTF-8
2,829
3.765625
4
[ "BSD-3-Clause", "CC-BY-3.0" ]
permissive
# PWM [PWM](https://en.wikipedia.org/wiki/Pulse-width_modulation) (Pulse-Width Modulation) is a programmable interface that allows you to, for example, control motor speed or change light brightness. Peripherals that support PWM are controlled by the current strength. To modulate the current, the voltage needs to be ...
Java
UTF-8
230
1.78125
2
[]
no_license
import com.FrameController; public final class Main { FrameController controller; public Main(){ this.controller = new FrameController(); } public static void main(String[] args) { new Main(); } }
Java
UTF-8
414
3.46875
3
[]
no_license
public class Buble { public static void exch(int[]a, int i, int j) { int temp=a[i]; a[i]=a[j]; a[j]=temp; } public static void sort(int[] a, int size) { for(int i=0; i<size; i++) { for(int j=0; j<size-1-i; j++) { ...
Java
UTF-8
2,179
1.96875
2
[]
no_license
import core.AllureUtils; import core.BrowserFactory; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.support.ui.ExpectedConditions; import org.openqa.selenium.support.ui.WebDriverWait; import org.testng.Assert; import org.testng.anno...
Java
UTF-8
3,595
2.390625
2
[]
no_license
package Client.com.nasri.restjersy.Service; import javax.persistence.EntityManager; import javax.ws.rs.Consumes; import javax.ws.rs.DELETE; import javax.ws.rs.FormParam; import javax.ws.rs.GET; import javax.ws.rs.POST; import javax.ws.rs.Path; import javax.ws.rs.PathParam; import javax.ws.rs.Produces; import javax.ws....
C
UTF-8
3,084
2.9375
3
[]
no_license
#include <stdio.h> #include "voice.h" #include "mainfunction.h" static int attitude; static int scndattitude; static int relance; //Presentation : Determine l'attitude de l'user. void presentation(void){ printf("Bienvenue dans le premier logiciel de tchatbot realise par slargo\n"); printf("C'est un honneur ...
Python
UTF-8
3,808
2.640625
3
[]
no_license
# # file and data management methods import ROOT as rt import numpy as np import datetime import calendar import sys import os from array import array class FileSaver(): ''' ''' def __init__(self, filename, treepath, *args): # args: # 0: text plotted # 1: self.filename = filename # self.treep...
Shell
UTF-8
8,943
3.328125
3
[]
no_license
#!/bin/bash n=0 function get_disk_num { printf -v num "%03d" $n n=$((n+1)) } function roundup_disk_num { x=$1 n=$((((n+$x-1)/$x)*$x)) } function add_ssd { ssd=$1 title=$2 if [ -z "$title" ] then tmp1=${ssd%.*} title=${tmp1##*/} fi echo " Adding SSD ${ssd} w...
Markdown
UTF-8
310
2.515625
3
[ "MIT" ]
permissive
--- title: Goods type position_number: 1 content_markdown: |- List of goods type | Code | Description | | --- | --- | | ABNORMAL | Abnormal | | CONTAINER | Container | | LIQUID_BULK | Liquid bulk cargo | | GENERAL_MERCHANDISE | General Merchandise | | SOLID_BULK | Solid bulk cargo | ---
Python
UTF-8
554
3.90625
4
[]
no_license
print("Hello World") print('O----') print(' |||') print('*' * 10) # variables price = 10 rating = 4.9 my_name = "Nirjhor" is_published = False print(price, rating) # Exercise name = "John Smith" age = 20 is_new = True print(name, age, is_new) # 3rd class y_name = input('what is your name? ') print('Hi '+y_name) # Ex...
Markdown
UTF-8
14,257
2.5625
3
[]
no_license
--- layout: default title: "3644.工人阶级必须领导一切" weight: 3644 --- 姚文元1968-8-25 工人阶级必须领导一切 姚文元 1968.08.25 一个伟大的斗、批、改的高潮正在到来。毛主席最新指示的发表,浩浩荡荡的产业工人大军有领导、有步骤地开进学校和其他一切还没有搞好斗、批、改的单位,是这个高潮到来的信号。这个高潮,是经过成立各省、市、自治区革命委员会、大批判、清理阶级队伍等等一系列工作之后出现的,它将在各个领域中引起深刻的变革,猛烈地冲击一切不适应社会主义经济基础的上层建筑,教育广大人民,粉碎暗藏的反动派,引向无产阶级文化大革命的全面胜利,大大促进社会生产力的发展...
JavaScript
UTF-8
258
2.671875
3
[]
no_license
var rolls_royce = "Okoro Ikechi"; var genesis = "HNG-03711"; var bently = "ofoikechi@gmail.com"; var tesla = "JavaScript"; console.log("Hello World, this is " + rolls_royce + " with HNGi7 ID " + genesis + " and email " + bently + " using " + tesla + " for stage 2 task.");
SQL
UTF-8
2,544
3.40625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Anamakine: 127.0.0.1 -- Üretim Zamanı: 10 Eyl 2021, 17:34:40 -- Sunucu sürümü: 10.4.13-MariaDB -- PHP Sürümü: 7.2.31 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT...
Python
UTF-8
297
3
3
[]
no_license
def outPutTree(DtreeObj,vertexidSet): vertexid=DtreeObj.getVertexId() vertexidSet.append(vertexid) # print("I am :",vertexid ,"I am following children:") child=DtreeObj.getChild() for childId in child: outPutTree(childId,vertexidSet) return vertexidSet
C++
UTF-8
429
2.90625
3
[]
no_license
/******************* * ts_split.cpp * ****************/ #include <iostream> #include <fstream> #include <string> #include <string.h> #include <vector> int main() { char* str; strcpy(str, "abc|efg;ic; q"); // char str[] = "abc|efg;ic; q"; const char* delim = "|"; char* tmp = strtok(str, delim); ...
C++
UTF-8
761
2.5625
3
[]
no_license
#pragma once #include "Transform.h" namespace CameraSwitchMethod { enum Enum : uint8_t { JumpCut, Ease, Fade, Count }; } class Camera { public: Camera(); ~Camera(); Vector3 GetPosition() const; Vector3 GetRotation() const; Vector3 GetZoom() const; void SetPosition(const Vector3& cam...
Java
UTF-8
1,683
3.078125
3
[]
no_license
public class MyFileName { private String input; public MyFileName(){ } public MyFileName(String input) { this.input = input; } public String getPath(){ if (input == null || "".equals(input)) { return ""; } int lastIndex = input.lastIndexOf('\\'); ...
Java
UTF-8
3,531
2.515625
3
[]
no_license
package com.example.report4; import androidx.annotation.Nullable; import androidx.appcompat.app.AppCompatActivity; import android.content.Intent; import android.os.Bundle; import android.view.View; import android.widget.EditText; import android.widget.TextView; public class MainActivity extends AppCompatActivity { ...
Ruby
UTF-8
78
3
3
[]
no_license
(1..gets.to_i).each {|| puts gets.chomp.split().map{|i|i.reverse}.join(" ") }
Java
UTF-8
241
1.570313
2
[]
no_license
package com.danilo.diplomski.repositories; import org.springframework.data.repository.CrudRepository; import com.danilo.diplomski.models.Obligation; public interface ObligationRepository extends CrudRepository<Obligation, Integer> { }
Java
UTF-8
3,208
2.109375
2
[]
no_license
package com.denghb.zuiyou.crawler.client; import com.denghb.zuiyou.common.Constants; import com.denghb.zuiyou.business.data.UserRuleVoData; import org.springframework.messaging.converter.StringMessageConverter; import org.springframework.messaging.simp.stomp.*; import org.springframework.stereotype.Component; import ...
TypeScript
UTF-8
6,720
2.5625
3
[ "MIT" ]
permissive
// Type definitions for non-npm package Wechat Mini Program - wechat-miniprogram 3.4 // Project: https://developers.weixin.qq.com/miniprogram/dev/api/ // Definitions by: Wechat Miniprogram <https://github.com/wechat-miniprogram>, // SgLy <https://github.com/SgLy>, // TtTRz <https://github....
Java
UTF-8
2,071
2.125
2
[]
no_license
package com.kabum.adapter.http; import java.io.IOException; import java.math.BigDecimal; import java.util.ArrayList; import java.util.Iterator; import java.util.List; import org.jsoup.Jsoup; import org.jsoup.nodes.Document; import org.springframework.stereotype.Component; import com.fasterxml.jackson.core.JsonProces...
C#
UTF-8
1,803
2.71875
3
[]
no_license
using Pendvlo.Models; using System; using System.Collections.Generic; using System.Linq; using System.Web; using Pendvlo.DAL; namespace Pendvlo.Repository { public class SucursalesRepository : Repository { public SucursalesRepository(DBContext dBContext) : base(dBContext) { } ...
PHP
UTF-8
5,585
2.578125
3
[]
no_license
<?php /** * Autor: Luis Albizures * fecha: 06/07/2015 * Hora: 10:00 AM * server CRUD para la tabla de opciones de menu. * Entidades de DB que se utilizan: * fn_tipo() pg_tipo seg_opcion` pg_estado sp_sel_seg_opcion( ) fn_ins_seg_opcion( ? , ? ...) sp_upd_seg_opcion(?,?,?,?,?,?,?) s...
Markdown
UTF-8
4,144
2.890625
3
[]
no_license
# ShareCuttly Application réductrice de liens avec l'API cutt.ly, permettant d'obtenir un lien raccourci redirigeant vers le lien voulu tout en permettant d'en retirer les statistiques de trafics au travers du lien raccourci. Fonctionnalités: * Raccourcir des liens en utilisant l'API cutt.ly * Permettre la requête de ...
PHP
UTF-8
339
2.578125
3
[]
no_license
<?php require_once "../autoload/autoload-psr4.php"; $prod = new App\Classes\Produto("Refrigerante"); $prod->detalhes(); $geladeira = new App\Classes\Eletrodomestico("Geladeira", 110); $geladeira->detalhes(); $microonda = new App\Classes\Microondas("Micro", 110, 600); $microonda->detalhes(); var_dump($prod, $gelad...
Java
UTF-8
2,468
3.21875
3
[]
no_license
package greedy; import org.junit.jupiter.api.Test; import supplementary.structures.graph.Graph; import supplementary.structures.graph.Vertex; import static org.junit.Assert.assertArrayEquals; import static org.junit.jupiter.api.Assertions.assertEquals; public class DijkstraTest { Dijkstra dijk = new Dijkstra(); ...
Markdown
UTF-8
436
2.578125
3
[]
no_license
# Virtual piano online A free virtual piano that you can find on this website is a wonderful opportunity for you to try your compositional skills. You can play it on your computer keyboard, or using your mouse. Each keyboard button corresponds to one key on the piano and plays the respective sound. Sounds are the sampl...
C++
GB18030
1,125
3.5625
4
[]
no_license
/*** 1002. д (20) ʱ 400 ms ڴ 65536 kB 볤 8000 B Standard CHEN, Yue һȻnλ֮ͣúƴд͵ÿһλ֡ ʽÿ1Ȼnֵﱣ֤nС10100 ʽһnĸλ֮͵ÿһλƴּ1 ո񣬵һһƴֺûпո 1234567890987654321123456789 yi san wu ***/ #include<cstdio> #include<string> #include<iostream> using namespace std; int main() { char k; string piny...
Markdown
UTF-8
4,987
3.109375
3
[ "BSL-1.0" ]
permissive
# Utilities SOCI provides a portable abstraction for selection of database queries. ## DDL SOCI supports some basic methods to construct portable DDL queries. That is, instead of writing explicit SQL statement for creating or modifying tables, it is possible to use dedicated SOCI functions, which prepare appropriate...
Python
UTF-8
475
2.609375
3
[]
no_license
def dfs(i, p, seq): global N, M ret = 0 if i == N: ret = check(seq) else: for x in range(p, M + 1): ret = max(ret, dfs(i + 1, x, tuple(list(seq) + [x]))) return ret def check(seq): cnt = 0 for a, b, c, d in query: if seq[b - 1] - seq[a - 1] == c: ...
Java
UTF-8
431
1.882813
2
[]
no_license
package org.livinggoods.myapp.data.model; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; public class AttendanceFields { @SerializedName("CHP details") @Expose private CHPDetails cHPDetails; public CHPDetails getCHPDetails() { return cHPDetails;...
Python
UTF-8
622
3.890625
4
[]
no_license
# -*- coding: utf-8 -*- # 给定一颗二叉搜索树,请找出其中的第k大的结点。例如, 5 / \ 3 7 /\ /\ 2 4 6 8 中,按结点数值大小顺序第三个结点的值为4。 class Solution: def KthNode(self, pRoot, k): # 遍历顺序为左根右 global result result = [] self.midnode(pRoot) if k <= 0 or len(result) < k: return None else: ...
JavaScript
UTF-8
3,613
3.21875
3
[]
no_license
// https://pokeapi.co/api/v2/pokemon/?limit=949 'use strict'; var searchForm = $('#searchForm'); start(); function start(){ fetch(`https://pokeapi.co/api/v2/pokemon/?limit=718`) .then(function(response) { //Turns the the JSON into a JS object return response.json(); }) .then(function(data) { data....
Rust
UTF-8
1,235
3.78125
4
[]
no_license
use crate::containers::shape::EntityShape; use std::f64::consts::PI; #[derive(Copy, Clone, Debug, PartialEq)] pub struct Circle { pub entity_type: EntityShape, radius: f64, } impl Circle { pub fn new(radius: f64) -> Circle { Circle { entity_type: EntityShape::Circle, radius...
Markdown
UTF-8
2,649
2.8125
3
[]
no_license
#### chess.py chess.py is small, text-based chess game implementing all known rules of chess (including the oft-forgotten "[en passant](https://en.wikipedia.org/wiki/En_passant)" special capture rule :-) ![Unicode characters are pretty cool](docs/images/chesspyTerminalScreenshot.png "chess.py screenshot") ### Requir...
Markdown
UTF-8
6,243
2.953125
3
[ "MIT" ]
permissive
# Git Pull Dirigent Git Pull Dirigent is a bash script which aims to automate the whole process of updating a Git repository in an advanced manner and one shot. #### Main Features - Updates a Git repository - Installs or Updates php dependencies **if composer.json is affected** after pull - Installs or Updates...
Python
UTF-8
11,028
2.65625
3
[]
no_license
# -*- coding: utf-8 -*- """ Created on Tue Mar 06 13:25:56 2018 @author: Pablo """ from __future__ import division import numpy as np import cv2 import os from matplotlib.patches import Wedge import matplotlib.pyplot as plt import utils def compute_minimum_distances(num_fishers): """ num_...
C++
UTF-8
422
2.796875
3
[]
no_license
#include "http.h" void HTTP::parser(string url){ string::size_type idx = url.find(':'); if( idx != string::npos){ url = url.substr(idx+3); } idx = url.find('/'); m_host = url.substr(0,idx); m_url = url.substr(idx+1); } void HTTP::connect(){ } #ifdef DEBUG void HTT...
Python
UTF-8
9,120
2.734375
3
[ "MIT" ]
permissive
import cv2 import os import imageio import numpy as np DIR_PATH = os.path.dirname(os.path.realpath(__file__)) def resize_frame(frame, new_side_len): # min_height_chamber2 = 506 # min_width_chamber2 = 416 # # max_height_chamber2 = 708 # max_width_chamber2 = 1036 # # min_height_ch...
Swift
UTF-8
3,509
3.015625
3
[]
no_license
// // PlanningCalculator.swift // BabyGenderPlanning // // Created by Dmitriy Petrov on 01.07.2020. // Copyright © 2020 BytePace. All rights reserved. // import Foundation class PlanningCalculator { let bloodCalculator: BloodCalculator let freymanDobrotinCalculator: FreymanDobrotinCalculator let conce...
Python
UTF-8
823
3
3
[]
no_license
def kmp(pat, txt): plen = len(pat) tlen = len(txt) lps = [0] * plen ti = 0 pindex = 0 lps1(pat, plen, lps) for i in range(tlen): if pat[pindex] == txt[ti]: pindex += 1 ti += 1 if pindex == plen: print("pattern found at" + str(ti - pindex...
C#
UTF-8
2,132
3.78125
4
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Pattern.Decorator { #region Create an interface. public interface Shape { void Draw(); } #endregion #region Create concrete classes implementing the same interface. public class Rectang...
JavaScript
UTF-8
11,774
2.6875
3
[]
no_license
$(document).ready(function() { var moveForce = 30; // max popup movement in pixels var rotateForce = 20; // max popup rotation in deg var watson_word_count_message; var userName; $(document).mousemove(function(e) { var docX = $(document).width(); var docY = $(document).height(); ...
Markdown
UTF-8
1,246
2.71875
3
[]
no_license
# PackGen Go based Packet Generator # Help bash# ./PackGen --help Usage of ./PackGen: -c int Number of connections to be generated with auto-generated MAC and IP (default 10) -di string destination ip (default "127.0.0.1") -dm string destination MAC address (default "FF:F...
Markdown
UTF-8
11,964
2.765625
3
[ "MIT" ]
permissive
# 0x16. C - Simple Shell ![Build Status](https://travis-ci.org/joemccann/dillinger.svg?branch=master) ## Resources **Read or watch**: * [Unix shell](https://intranet.hbtn.io/rltoken/RsZhUQ_26du3YUYKXO3gXA "Unix shell") * [Thompson shell](https://intranet.hbtn.io/rltoken/CNhUqQ5TFpdvFGsd1Meyig "Thompson shell") * [...
C++
UHC
1,838
3.109375
3
[]
no_license
#include<iostream> using namespace std; int length, visit[102][102], visit1[102][102], dirX[4] = { 0,1,0,-1 }, dirY[4] = { 1,0,-1,0 }; char arr[102][102], arr1[102][102]; void input(); void init(); void dfs(int x, int y, int color); int main() { int count = 0, count1 = 0; input(); /* ƴҶ*/ for (int i = 0...
Java
UTF-8
3,261
2.328125
2
[ "GPL-1.0-or-later", "GPL-3.0-only", "Apache-2.0", "LicenseRef-scancode-public-domain", "LGPL-2.1-only", "LicenseRef-scancode-unknown-license-reference" ]
permissive
/* ### * IP: GHIDRA * * 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 agreed to in writin...
C
UTF-8
7,036
2.671875
3
[]
no_license
// Translation table for common custom characters. #define CUSTOM_CHAR_MAP_LEN 38 const uint16_t customCharMapChars[CUSTOM_CHAR_MAP_LEN] = { 0x120, // 0 - all blank (match). 0x1F8, // 1 - all filled (match). 0x1F0, // 2 - one pixel bar, left (match). 0x1F1, // 3 - two pixel bar, left (match). 0x1F2...
Python
UTF-8
1,449
3.15625
3
[]
no_license
import csv import datetime, time import random import calendar import holidays rows = [] csvfile = '../original_data/test.csv' training_data = list() holidays = holidays.UnitedStates() with open(csvfile, 'r') as original: reader = csv.reader(original) cnt = 1 for row in reader: if cnt == 1: ...
C
UTF-8
6,120
2.71875
3
[]
no_license
#include <stdio.h> #include <stdlib.h> #include <math.h> #include <mpi.h> #include "stack.h" #define EPSILON 1e-3 #define F(arg) cosh(arg)*cosh(arg)*cosh(arg)*cosh(arg) #define A 0.0 #define B 5.0 #define SLEEPTIME 1 int *tasks_per_process; double farmer(int); void worker(int); int main(int argc, char **argv ) {...
Python
UTF-8
411
4.3125
4
[]
no_license
# The usage of function "range()" for i in range(5): print(f'{i:<3}*') print() # create a list with range from 3 to 7 (8 not included) nums_1 = list(range(3,8)) print(nums_1) print() # create a list with range from 1 to 9 with a gap of 2 nums_2 = list(range(1,10,2)) print(nums_2) print() # create a list with r...
Python
UTF-8
4,830
2.65625
3
[]
no_license
import numpy as np import pandas as pd import scipy.stats as stats import matplotlib as plt import sklearn import matplotlib.pyplot as plt from sklearn import preprocessing from sklearn.linear_model import LinearRegression from sklearn.model_selection import train_test_split from sklearn.naive_bayes import G...
Go
UTF-8
1,961
3.09375
3
[]
no_license
package main import ( "bufio" "os" "strconv" "strings" ) func main() { part1() part2() } func part1() { file, _ := os.Open("input/day13.txt") defer file.Close() scanner := bufio.NewScanner(file) scanner.Scan() departureTime64, _ := strconv.ParseInt(scanner.Text(), 10, 64) scanner.Scan() departureTime :...
Java
UTF-8
2,384
2.46875
2
[]
no_license
package com.wochstudios.InfiniteSoundboards.adapters; import android.content.Context; import android.database.Cursor; import android.net.Uri; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.CursorAdapter; import android.widget.TextView; import com.woc...
C++
UTF-8
2,016
3.3125
3
[]
no_license
#include <iostream> using namespace std; #include "queue.h" template <class T> queue<T>::queue() { front=NULL; rear=NULL; } template <class T> int queue<T>::isempty() { if(front==NULL) return 1; else return 0; } template <class T> void queue<T>::enqueue(T t,int priority) { node *temp=ne...
Go
UTF-8
2,688
2.640625
3
[]
no_license
package databaseOperator import ( "fmt" _ "github.com/Go-SQL-Driver/MySQL" "github.com/go-xorm/xorm" "log" "math/rand" "os" "tidb_yace/common" "time" ) func StartDabaseOperation(tomlConfig *common.TomlConfigStruct, logger *log.Logger) { // 初始化dbConfig dbParamet := initDbConfig(tomlConfig) // 初始化压测参数 yaceP...
PHP
UTF-8
1,463
2.625
3
[]
no_license
<?php session_start(); include '../../MyDb.php'; date_default_timezone_set('PRC'); $name = $_POST['name']; $invite = $_POST['invite']; $code = $_POST['code']; $passWord = $_POST['password']; $phone = $_POST['phone']; $registTime = $loginTime = date("Y-m-d H:i:s"); //先判断验证码是否相等 if(isset($_SESSION['sms_code'])){ if...
Java
UTF-8
5,291
2.125
2
[]
no_license
package de.sfgmbh.comlayer.organisation.views; import java.awt.Dimension; import java.awt.Font; import java.awt.SystemColor; import javax.swing.ImageIcon; import javax.swing.JButton; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JScrollPane; import javax.swing.JTable; import jav...
Markdown
UTF-8
242
2.78125
3
[]
no_license
--- title: 将char转化为整数 date: 2019-08-11 23:31:53 tags: [charToInt] --- - b-a的值+10 结果11(注意等于12就会返回-1) `Character.digit('b',12)` - 如char[] 里面存的是数字则,结果是2 `Character.digit('2',10)`
Markdown
UTF-8
7,627
3.265625
3
[]
no_license
四十 司马青笑道:“那你又何必去理会他们呢,你应相信我能胜过铁钵和尚的,只要我不死,他们就没有指望了。” 上官红这才现出了忧急道:“青哥!你对这一战究竟有多少把握?” 司马青笑笑道:“我说有十分的把握你会不会相信?我说毫无把握你又会不会相信?” “我不知道,这一战本来已经可以取消了,但是你又把它给挑起来,大概是有几分把握,因为你并不是那种拿性命当儿戏的人,可是………我看周围的人,似乎没有一个人看好你的。” 司马青微笑道:“所以你又担心起来了。” “难道我不该担心吗,你是我的丈夫,对于你的生死安危,我比任何一个人都关心。” “原先你不是对我很有信心的吗?” “是...
Python
UTF-8
373
4.4375
4
[]
no_license
""" 5- Receba um número inteiro e mostre se ele á par ou ímpar. """ number = int(input('Digite um número inteiro: ')) if number == 0: print('Você digitou o número zero.' '\nEle não é par nem ímpar,' '\napesar de possuir propriedades de par.') elif number % 2 == 0: print(f'{number} é par.')...
Java
UTF-8
613
3.453125
3
[]
no_license
package com.study02; import java.util.Scanner; public class Lotto { public static void main(String[] args) { // 1에서 20 사이의 숫자 중 5개를 뽑는 로또 게임 만들어보자. Scanner sc = new Scanner(System.in); System.out.println("1에서 20사이 숫자 5개를 입력하세요."); int i = sc.nextInt(); System.out.println("당첨 번호는 바로....!"); random...
PHP
UTF-8
921
2.6875
3
[ "MIT" ]
permissive
<?php namespace FrontendBridge\Lib; use Cake\Network\Response; use Cake\Utility\Hash; /** * Custom CakeResponse for Service calls * * @package default */ class ServiceResponse extends Response { /** * Constructor * * @param string|array $code One of Types::CODE_*, or an array containing 'code...
SQL
UTF-8
3,396
3.59375
4
[]
no_license
DROP DATABASE IF EXISTS `doozy`; CREATE DATABASE `doozy`; USE `doozy`; CREATE TABLE `users` ( `user_id` int(11) NOT NULL AUTO_INCREMENT, `email` varchar(50) NOT NULL, `first_name` varchar(50) NOT NULL, `last_name` varchar(50) NOT NULL, `password` varchar(50) NOT NULL, PRIMARY KEY (`user_id`) ) ENGINE=Inn...
C
UTF-8
1,848
2.8125
3
[ "Apache-2.0" ]
permissive
/* * Test D-Bus Message Abstraction */ #undef NDEBUG #include <c-stdaux.h> #include <stdlib.h> #include "dbus/message.h" static void test_setup(void) { _c_cleanup_(message_unrefp) Message *m1 = NULL, *m2, *m3; MessageHeader hdr = { .endian = 'l' }; int r; /* verify constructors / de...
Java
UTF-8
1,295
2.359375
2
[]
no_license
package it.uniroma3.commands; import it.uniroma3.OrderState; import it.uniroma3.domain.OrderLineItem; import java.util.List; public class NewOrderCommand extends BaseCommand1<String> { private String consumerId; private String restaurantId; private List<OrderLineItem> lineItems; private OrderState st...
Java
UTF-8
963
2.5
2
[]
no_license
import java.awt.BorderLayout; import java.awt.Dimension; import java.awt.FlowLayout; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.util.ArrayList; import javax.swing.DefaultListModel; import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.JLabel; import javax.s...
C++
UTF-8
914
3.1875
3
[]
no_license
/* You can use the preprocessor to control what code is even compiled, allowing you easily switch between different builds. This way you can change from a debug build to a release build without manually removing every instance of a printout. */ #include <stdio.h> // this macro doesn't replace DE...
C#
UTF-8
336
2.78125
3
[]
no_license
namespace _07_InfernoInfinity.Models.Weapons { public class Axe : Weapon { private const int MIN_DAMAGE = 5; private const int MAX_DAMAGE = 10; public Axe(string name, string weaponType, string rarity) : base(name, weaponType, MAX_DAMAGE, MIN_DAMAGE, rarity) { ...
Python
UTF-8
1,418
2.515625
3
[]
no_license
# -*- coding: utf-8 -*- import datetime from django.contrib.contenttypes.models import ContentType from django.utils import timezone from .models import Action def create_action(user, verb, target=None): """ 一个用户给某张图片打上书签 一个用户喜欢或不喜欢某张图片 一个用户创建一个账户 一个用户关注或不关注某个用户 上述事物都会调用该方法来创建一条feed流 """...
C#
UTF-8
751
2.671875
3
[ "MIT" ]
permissive
using System; using System.Text; using CsRex; using CsRex.Parsing; using CsRex.Parsing.Nodes; namespace CsRex.Parsing.Nodes { internal class Word : Node { private string _word; internal Word (string word) { if (word.Length > 255) { throw new ArgumentException("Length of word must be at most 25...
C++
UTF-8
527
2.78125
3
[]
no_license
#include <boost/asio.hpp> #include <string> #include <thread> #include <atomic> namespace mdv { class MessageHandler; class Uart { public: Uart(std::string port, unsigned int baud_rate, MessageHandler &msg_handler); void writeString(std::string msg); std::string readLine(); void receiveThread(); ...
Java
UTF-8
23,537
1.625
2
[]
no_license
package app.mycity.mycity.views.fragments; import android.content.Context; import android.content.DialogInterface; import android.os.Bundle; import android.support.annotation.Nullable; import android.support.constraint.ConstraintLayout; import android.support.v7.app.AlertDialog; import android.support.v7.widget.Linear...
TypeScript
UTF-8
520
2.78125
3
[]
no_license
import { Movie } from './movie'; describe('Movie', () => { it('should create an instance of Movie',() => { expect(new Movie()).toBeTruthy(); }); it('should accept values', () => { let movie = new Movie(); movie = { id: "111", title: "Rangasthalam", director: "Rajamouli"...
C
UTF-8
2,015
2.53125
3
[]
no_license
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ifpercentage.c :+: :+: :+: ...
Python
UTF-8
2,215
3.296875
3
[ "MIT" ]
permissive
from typing import List, Dict import torch def calculate_batch_statistics( original_tokens: torch.Tensor, predicted_tokens: torch.Tensor, skipping_tokens: List ) -> Dict: """Calculate The TP, FP, and FN for given tensors with original and predicted tokens. Each tensor is a 2d matrix, where each row c...
PHP
UTF-8
3,691
2.515625
3
[]
no_license
<?php namespace App\Http\Controllers; use Illuminate\Http\Request; use Redirect; use App\Http\Requests; use App\Http\Requests\CategoryCreateRequest; use App\Http\Controllers\Controller; use App\Category;//Se agrega para no tener que estar escribiendo \App\Category cada vez que se utilice class CategoriesController...
Python
UTF-8
866
4.4375
4
[]
no_license
//Square Every Digit //Welcome. In this kata, you are asked to square every digit of a number. //For example, if we run 9119 through the function, 811181 will come out, because 92 is 81 and 12 is 1. //Note: The function accepts an integer and returns an integer function squareDigits(num){ return parseInt(num.toStrin...
PHP
UTF-8
2,066
2.59375
3
[]
no_license
<?php use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class InitialMigration extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('users', function($table) { $table->increments('id'); $ta...
Java
UTF-8
7,088
2.296875
2
[]
no_license
/* Copyright 2012 - iSencia Belgium N 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 agreed to i...
Markdown
UTF-8
552
3
3
[]
no_license
--- layout: post title: mysqlでGROUP BYした際に同じカラム名の値も表示したい date: 2018-02-08 03:19:25 categories: mysql sql --- <p>下記のようなテーブルとレコードがあります。</p> <p>id | user_id | amount | type<br> 1 | 1 | 100 | a<br> 2 | 1 | 200 | b<br> 3 | 1 | 300 | c<br> 4 | 2 | 1000 | a<br> 5 | 2 | 1500 | b<br> 6 | 2 | 2000 | c</p> <p>これを下記のように取得したいのですが...
JavaScript
UTF-8
1,170
3.53125
4
[]
no_license
var convertNumberToHex = function( num ) { var hexDigits = ['0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F']; var current = ['0','0']; var hexCounter = 1; var placeValue = 1; for ( var i = 1; i <= num; i++ ) { // if number is not at F if( hexCounter !== 16 ) { // replace it with...
JavaScript
UTF-8
2,475
2.53125
3
[]
no_license
import React, { Component } from "react"; import "./UserSettings.scss"; import {getToken} from "../../../Utils/Common"; import { NavLink } from 'react-router-dom'; class UserSettings extends Component { constructor() { super(); this.state = { email: "", password: "", oldPassword: "", ...
Java
UTF-8
4,631
3.40625
3
[]
no_license
import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo) import java.awt.Color; import java.awt.Font; /** * @author Vasilis Bilbilis * @version 1.0 Version */ public class Clock extends Actor { private int startingTime; private int seconds; private int clockType = 0; privat...
C++
UTF-8
1,152
2.890625
3
[]
no_license
#include<iostream> #include<queue> #include<numeric> using namespace std; const int n = 5; double avg_waiting_time(int at[], int bt[]) { int rem_bt[n], wt[n] = {0}; copy(bt, bt+n, rem_bt); queue<int> processes; int curr_t = 0, time_quantum = 2, i = 0; while(at[i]<=curr_t) processes.push(i...
Java
UTF-8
719
2.0625
2
[]
no_license
package com.am.trendo.repo; import android.arch.lifecycle.LiveData; import android.content.Context; import android.location.Location; import com.am.trendo.model.Sale; import java.util.List; import io.reactivex.Completable; import io.reactivex.Single; public interface DataRepo { Single<List<Sale>> getTopSales();...
C#
UTF-8
7,037
2.640625
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Dominio; using System.Data.SqlClient; using AccesoDatos; namespace Negocio { public class ArticuloNegocio { public List<Articulo> listarArticulos() { SqlConnect...
C++
UTF-8
4,534
2.796875
3
[]
no_license
#include "Game\Public\Factory.h" Factory* Singleton<Factory>::mSingleton = nullptr; int Factory::mMissiliesAvailable = 25; std::hash<std::string> s_hash; GameObject* Factory::CreateCity(Hash hash, exEngineInterface* pEngine, exVector2 startPosition) { const float CITY_WIDTH = 50.0f; const float CITY_HEIGHT = 10.0f;...
C#
UTF-8
6,500
2.59375
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using AutoMapper; using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.Logging; using StapeleyDigital.AthleticsData.Data; using StapeleyDigital.AthleticsData.Dto; namespace StapeleyDigital.AthleticsData.Api.Controll...
Java
UTF-8
742
2.796875
3
[]
no_license
package br.com.thegabrielfalcao.designpatterns.chainofresponsability.alura.calculadora.desconto.impl; import br.com.thegabrielfalcao.designpatterns.chainofresponsability.alura.calculadora.model.Orcamento; import br.com.thegabrielfalcao.designpatterns.chainofresponsability.alura.calculadora.desconto.Desconto; public c...
Java
UTF-8
2,992
2.140625
2
[]
no_license
package com.lvsint.abp.server.managers; import java.math.BigDecimal; import java.util.HashMap; import java.util.List; import java.util.Map; import uk.co.abp.SessionException; import uk.co.abp.Workspace; import com.lvsint.abp.promotion.beans.CampaignPromotionReward; import com.lvsint.abp.server.stores.Camp...
Markdown
UTF-8
3,749
3.140625
3
[]
no_license
--- layout: post title: "Migrate blog from Wordpress to Orchard CMS" description: How to migrate the content of a Wordpress blog to an Orchard CMS website using XML and XSL. tags: Orchard, Wordpress, CMS, xml, xsd, import, export date: 2011-05-28 14:15:39 assets: assets/posts/2011-05-28-migrate-blog-from-wordpress-to-o...
Swift
UTF-8
789
2.65625
3
[]
no_license
// // newRecipeTableViewCell.swift // SimpleTable // // Created by Fang Liu Frank on 5/3/17. // Copyright © 2017 Fang Liu Frank. All rights reserved. // import UIKit class newRecipeTableViewCell: UITableViewCell { @IBOutlet weak var recipeTitle: UILabel! func configureCell(task:NewRecipe){ ...
PHP
UTF-8
971
2.796875
3
[]
no_license
<?php function dbconnect($host,$id,$pass,$db){ // 데이터베이스 연결 $connect = mysqli_connect($host,$id,$pass,$db); if($connect == false){ die('Database Not Connected :'.mysqli_error()); } return $connect; } function msg($msg){ // 경고 메세지 출력 후 이전 페이지로 이동 echo " <meta http-equiv=\"Conten...
Java
UTF-8
83
2.0625
2
[]
no_license
package oop; public abstract class Controller { public abstract void update(); }