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
PHP
UTF-8
818
2.984375
3
[]
no_license
<?php declare(strict_types = 1); namespace Service\Discount; class PromoCode implements IDiscount { /** * @var string */ private string $promoCode; /** * @param string $promoCode */ public function __construct(string $promoCode) { $this->promoCode = $promoCode; } ...
C++
UTF-8
1,097
2.703125
3
[]
no_license
#include <iostream> #include <iomanip> // #include <memory> // #include <algorithm> // #include <vector> // #include <list> // #include <unordered_map> #include <chrono> // for high_resolution_clock #include <eigen3/Eigen/Core> #include <eigen3/Eigen/Eigen> using namespace std; using namespace std::chrono; using ...
Python
UTF-8
554
3.609375
4
[ "Apache-2.0" ]
permissive
""" ATM machines allow 4 or 6 digit PIN codes and PIN codes cannot contain anything but exactly 4 digits or exactly 6 digits. If the function is passed a valid PIN string, return true, else return false """ def pin_validate(pin): if not isinstance(pin, int): result = 'false' print(result) ...
Java
UTF-8
16,105
3.046875
3
[]
no_license
package uno; import java.awt.Color; import java.awt.Font; import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.RenderingHints; import java.awt.image.BufferedImage; import java.util.ArrayList; import java.util.Comparator; import java.util.Collections; import java.util.Scanner; public clas...
Java
UTF-8
676
2.015625
2
[]
no_license
package com.springclass.boot.domain; import org.springframework.data.repository.CrudRepository; import org.springframework.data.rest.core.annotation.RepositoryRestResource; @RepositoryRestResource public interface UserRepository extends CrudRepository<User, Long> { // Select u from User u WHERE u.firstName == '...
Markdown
UTF-8
767
2.90625
3
[]
no_license
# API Documentation ## Create `Post /classroom/create` ## Delete `Post /classroom/:id/delete` ** Note: Should only archive classroom. ## Graduate Classroom `Post /classroom/:id/graduate Parameters (JSON): * `grade: <int>` Where, grade can be `1-6`. If `6` is specificed, the classroom is archived and removed...
Python
UTF-8
7,144
2.953125
3
[]
no_license
import nltk from nltk.corpus import brown from nltk.corpus import gutenberg import re class PredictorModel: def __init__(self): 'void constructor' self.initialization() def initialization(self): 'initialize the model' corpusName = 'emma' genr...
PHP
UTF-8
1,695
2.765625
3
[]
no_license
<?php /** * The declaration of MCL_TEMPLATE_IMAGE class. * */ class MCL_TEMPLATE_IMAGE extends MCL_TEMPLATE { /** * Class data members. */ /** * @see MCL_TEMPLATE::__construct() */ public function __construct($details = array()) { $details['template_type'] = 'IMAGE'; parent::__construct($det...
Java
UTF-8
7,705
2.265625
2
[ "Apache-2.0" ]
permissive
/** * $Id: MappedFileQueueTest.java 1831 2013-05-16 01:39:51Z shijia.wxr $ */ package com.alibaba.rocketmq.store; import org.junit.*; import static org.junit.Assert.*; public class MappedFileQueueTest { // private static final String StoreMessage = // "Once, there was a chance for me! but I did not treas...
C#
UTF-8
556
2.546875
3
[]
no_license
using System.Collections; using System.Collections.Generic; using UnityEngine; public class Questionnaire : ScriptableObject { public List<AskItem> items; public Dictionary<int, AskItem> dicItem = new Dictionary<int, AskItem>(); public Dictionary<int, AskItem> GetItems() { dicItem.Clear(); ...
C++
UTF-8
1,461
3.078125
3
[]
no_license
// Copyright (c) 2017 Recluse Project. All rights reserved. #pragma once #include "Core/Types.hpp" #include "Core/Exception.hpp" namespace Recluse { // Smart pointer, with the minimal needed features. // TODO(): Will need to add additional alloc component later. // Objects must have a defined move constructor for t...
Java
UTF-8
5,062
1.726563
2
[]
no_license
package com.example.renewseviceqq; import android.content.Context; import android.content.Intent; import android.text.format.DateFormat; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; import android.widget.TextView; import androidx.annotat...
Java
UTF-8
282
1.789063
2
[]
no_license
package org.oporaua.localelections.tvk; import java.util.List; import retrofit2.http.GET; import retrofit2.http.Query; import rx.Observable; public interface TvkService { @GET("/search/index.json") Observable<List<TvkMember>> loadTvkMembers(@Query("q") String name); }
Markdown
UTF-8
2,859
2.84375
3
[]
no_license
### 常用命令: 1.mkdir -p /test/one,递归创建目录 2.\cp 或者 /bin/cp,复制,且同名文件不提示覆盖 cp,mv,rm,这三个命令,~/.bashrc将其命名了别名:alias cp=cp -i,-i表示同名文件覆盖时,提示。 因此如果不想提示,则不要调用别名就行:、\屏蔽别名,/bin/cp全路径,不调用别名 3.alias:查看所有别名,alias mv = 'mv -i',设置别名,unalias mv:删除别名, 永久设置别名:全局修改/etc/bashrc,用户级修改:~/bashrc 4.环境变量:$LANG,可设置语...
C#
UTF-8
447
2.65625
3
[]
no_license
using System; using System.Collections.Generic; using System.Text; namespace SudokuQuickSolver1_5 { class Assignment { public Assignment(int inCellColumn, int inCellRow, int inValueToAssign) { CellColumn = inCellColumn; CellRow = inCellRow; ValueToAssign = in...
Python
UTF-8
275
3.046875
3
[]
no_license
class Solution(object): def isAnagram(self, s, t): arr=[0]*256 for i in s: arr[ord(i)]+=1 for j in t: arr[ord(j)]-=1 for i in range(0,256): if arr[i]!=0: return False return True
Python
UTF-8
1,273
4.15625
4
[]
no_license
# -*- coding: utf-8 -*- # (if/elif/else) # По номеру месяца вывести кол-во дней в нем (без указания названия месяца, в феврале 28 дней) # Результат проверки вывести на консоль # Если номер месяца некорректен - сообщить об этом # Номер месяца получать от пользователя следующим образом user_input = input('Введите, пож...
Java
UTF-8
3,827
2.03125
2
[ "MIT" ]
permissive
package com.qxcmp.message; import com.aliyun.mns.client.CloudAccount; import com.aliyun.mns.client.CloudTopic; import com.aliyun.mns.common.ServiceException; import com.aliyun.mns.model.BatchSmsAttributes; import com.aliyun.mns.model.MessageAttributes; import com.aliyun.mns.model.RawTopicMessage; import com.google.com...
Python
UTF-8
1,862
4.78125
5
[]
no_license
# - - - List comprehension - - - # Väldigt ofta vill man ta en lista och göra något med alla element i listan # Så som vi lärt oss hittils skulle detta se ut som values = [1, 2, 3, 4, 5, 6, 7, 8, 9] newValues = [] for value in values: newValues.append(value * 2) # Python erbjuder dock något som heter list comp...
C
UTF-8
327
3.171875
3
[]
no_license
#include <stdio.h> #include <stdlib.h> /* for uintptr_t */ #include <inttypes.h> int func(char c, int *i) { printf("pointer: %p, value=%d\n", i, i ? *i : -1); return (int)c; } int main(int argc, char **argv) { uintptr_t v = func; int c = ( (int (*)(char, int*)) v )('a', &argc); printf("Ret: %d\n", c); return...
C
UTF-8
200
2.5625
3
[]
no_license
#include"my_string.h" //#include<stdio.h> int main() { char text [] = "Hello"; char copy_text [ sizeof(char) ]; Strcpy( copy_text, text ); printf("%s", copy_text); return 0; }
Python
UTF-8
1,218
2.765625
3
[ "MIT" ]
permissive
import sys import xml.etree.ElementTree as ET from lxml import html import requests import spacy if len(sys.argv) >2: Genus = sys.argv[1] Species = sys.argv[2] else: print("usage: "+sys.argv[0]+" <Genus_name> <Species_name>") print("running with default options") Genus = 'Phyllobates' Species = 'b...
Java
UTF-8
662
2.09375
2
[]
no_license
package com.example.android.notification.models; /** * Created by sakshi on 16/4/18. */ public class To_Items { String to_item_name; String to_name; public To_Items() { } public To_Items(String to_item_name, String to_name) { this.to_item_name = to_item_name; this.to_name = t...
Python
UTF-8
187
3
3
[]
no_license
#!/usr/bin/python3 """ Sorts integers""" def find_peak(list_of_integers): """Sorts integers""" new = list_of_integers[:] maximo = max(new, default=None) return (maximo)
Java
UTF-8
1,704
2.21875
2
[]
no_license
package br.com.iperonprev.controller.pericia; import java.io.Serializable; import java.util.List; import javax.faces.bean.ManagedBean; import org.primefaces.event.SelectEvent; import br.com.iperonprev.dao.GenericPersistence; import br.com.iperonprev.interfaces.GenericBean; import br.com.iperonprev.models...
Java
UTF-8
977
3.1875
3
[]
no_license
package com.hcl; import java.io.*; public class Main { public static void main(String[] args) throws IOException { // TODO Auto-generated method stub String name; double deposit,costPerDay; BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); itemType i=new itemType(); ...
Markdown
UTF-8
1,544
3.015625
3
[ "CC-BY-4.0" ]
permissive
# 第一部分:数据系统的基石 本书前四章介绍了数据系统底层的基础概念,无论是在单台机器上运行的单点数据系统,还是分布在多台机器上的分布式数据系统都适用。 1. [第一章](ch1.md)将介绍本书使用的术语和方法。**可靠性,可扩展性和可维护性** ,这些词汇到底意味着什么?如何实现这些目标? 2. [第二章](ch2.md)将对几种不同的**数据模型和查询语言**进行比较。从程序员的角度看,这是数据库之间最明显的区别。不同的数据模型适用于不同的应用场景。 3. [第三章](ch3.md)将深入**存储引擎**内部,研究数据库如何在磁盘上摆放数据。不同的存储引擎针对不同的负载进行优化,选择合适的存储引擎对系统性能有巨大影响。 4...
Markdown
UTF-8
551
2.703125
3
[]
no_license
# Tutorial 2 - Inversion of an interval (I) // date: 2020-11-24 // http://recherche.ircam.fr/equipes/repmus/OpenMusic/user-doc/DocFiles/Tutorial/tut002/Index.html ```csharp var originalLine = new List<int>() { 6000, 7100 }; Console.WriteLine(string.Join(", ", originalLine)); // 6000, 7100 var invertedLine = B...
C#
UTF-8
16,857
2.546875
3
[ "MIT" ]
permissive
using System; using System.IO; using System.Text.RegularExpressions; namespace FitsEdit { /// <summary> /// Summary description for FitsFile. /// </summary> public class FitsFile { public string Simple; public int BitPix; public int Naxis; public int XSize; public int YSize; public string Object; p...
Python
UTF-8
142
3.453125
3
[]
no_license
first = 'John' last = 'Smith' message = first +' [' + last + '] is a coder.' msg = f'{first} [{last}] is a coder.' print(message) print(msg)
Markdown
UTF-8
237
3.234375
3
[ "MIT" ]
permissive
# Use custom money string (k, m, b) Format money string value in thousands, millions or billions. _Using Vega's method._ | Format | Value | | - | - | | 1k | 1.000 | | 100kk | 100.000.000 | | 100m | 100.000.000 | | 1b | 1.000.000.000 |
PHP
UTF-8
2,915
2.734375
3
[ "MIT" ]
permissive
<?php namespace BlackScorp\ORM\Entity; use Doctrine\Common\Collections\Collection; use Doctrine\ORM\Mapping as ORM; /** * Class User * @package BlackScorp\ORM\Entity * @ORM\Entity */ class User { use IdTrait; /** * @var string * @ORM\Column(type="string",nullable=false) */ protected ...
Python
UTF-8
7,372
3.40625
3
[]
no_license
# Projet : RedBallBot # Auteur : Quentin Forestier # Fichier : RedBallBot/api/image_analyser.py __author__ = "Quentin Forestier" __copyright__ = "Copyright 2019, RedBallBot2" __version__ = "1.0.0" from skimage import color from skimage.transform import hough_circle, hough_circle_peaks, rescale from skimage.feature im...
Java
UTF-8
15,892
2.125
2
[]
no_license
package nu.johanw123.squaremanboy; import java.util.ArrayList; import com.badlogic.gdx.Gdx; import com.badlogic.gdx.Input.Keys; import com.badlogic.gdx.controllers.Controller; import com.badlogic.gdx.controllers.PovDirection; import com.badlogic.gdx.controllers.mappings.Ouya; import com.badlogic.gdx.graphics.Color; i...
JavaScript
UTF-8
1,500
4.3125
4
[]
no_license
/* QUESTION: Working from left-to-right if no digit is exceeded by the digit to its left it is called an increasing number; for example, 134468. Similarly if no digit is exceeded by the digit to its right it is called a decreasing number; for example, 66420. We shall call a positive integer that is neither increasing...
C
UTF-8
2,697
2.671875
3
[]
no_license
/* ** EPITECH PROJECT, 2019 ** MUL_my_hunter_2019 ** File description: ** my_huter.c */ #include "../my_tower.h" void display_nb_tow(sfRenderWindow *window, sprite_t *sprite) { char *text = cat(int_to_string(sprite->tow_alive), "/99"); sfText_setString(sprite->text_nb_tow, text); sfText_setFont(sprite->t...
Markdown
UTF-8
2,811
2.578125
3
[]
no_license
--- titre: "Prédictions en temps réel de l'épidémie de maladie à virus Ebola 2018-2019 en République démocratique du Congo à l'aide de modèles de processus ponctuels de Hawkes." auteurs: "Kelly et al." journal: "Epidemics" année: "2019" lien: https://doi.org/10.1016/j.epidem.2019.100354 image: /images/publications/3139...
Swift
UTF-8
4,362
3.171875
3
[ "MIT" ]
permissive
// // ColorPaletteTests.swift // UIKitSwagger // // Created by Sam Odom on 12/13/14. // Copyright (c) 2014 Swagger Soft. All rights reserved. // import UIKit import XCTest @testable import UIKitSwagger class ColorPaletteTests: XCTestCase { var palette = ColorPalette() var colors: [String:UIColor]! o...
Python
UTF-8
741
3.671875
4
[]
no_license
# def imprimir_mensaje(): # print("mensaje espécial :") # print("estoy aprendiendo funciones") # imprimir_mensaje() # imprimir_mensaje() # imprimir_mensaje() # def impresion_datos(opcion): # print("hola") # print("hola como estas") # print(opcion) # print('adios') # opcion = input("Elig...
Markdown
UTF-8
1,638
2.8125
3
[]
no_license
# Visualizing Deep Similarity Networks ## 1.Abstract 对于优化图像嵌入的卷积神经网络模型,我们提出了一种方法来突出显示成对相似性最强的图像区域。 这项工作是为分类网络开发的可视化工具的必然结果,但适用于更适合于相似性学习的问题域。 可视化效果显示了经过微调的相似性网络如何学习专注于不同的功能。 我们还概括了使用不同池化策略嵌入网络的方法,并提供了一种简单的机制来支持对查询图像中的对象或子区域进行图像相似性搜索。 ## 2.Conclusion 我们提出一种方法来可视化负责嵌入网络中成对相似性的图像区域。尽管先前的一些工作可视化了其中的一些组件,但我们发现最上面的几个组件并不...
Ruby
UTF-8
380
3.25
3
[ "MIT" ]
permissive
(1..25).each do |d| require_relative "day#{d}/main" end loop do print 'Choose day to run (any non-number to exit): ' day = gets.to_i break unless day.between? 1, 25 puts puts "== DAY #{day} ==" ref = Object.const_get("Day#{day}")::Main.new(File.read("day#{day}/input.txt")) puts "PART 1: #{ref.part1}" ...
Python
UTF-8
1,959
2.578125
3
[]
no_license
import numpy as np from pypost.dynamicalSystem import DynamicalSystem from pypost.planarKinematics.PlanarForwardKinematics import PlanarForwardKinematics class Pendulum(DynamicalSystem, PlanarForwardKinematics): def __init__(self, dataManager): PlanarForwardKinematics.__init__(self, dataManager, 1) ...
Python
UTF-8
181
3.375
3
[]
no_license
terus_tanya = True while terus_tanya : temp = raw_input('masukkan angka kurang dari 10 !! : ') angka = int(temp) if angka < 10: terus_tanya = False else: terus_tanya = True
TypeScript
UTF-8
904
2.71875
3
[]
no_license
import sql from 'mysql'; class Database { private connection: sql.Connection; constructor() { this.connection = sql.createConnection({ host: process.env.DB_HOST, user: process.env.DB_USERNAME, password: process.env.DB_PASSWORD, database: process.env.DB_DATABASE, }); } db(): sq...
Ruby
UTF-8
4,082
3.5
4
[]
no_license
# 四則演算が1つのパターン def check1(target_ar, check_target) for i in 1...4 do t1 = target_ar.values_at(0).join("").to_i t2 = target_ar.values_at(1,2,3).join("").to_i tmp = cal([t1, t2], i) p "answer![0] --> #{tmp}" if tmp == check_target t1 = target_ar.values_at(0,1).join(""...
Java
UTF-8
1,155
2.609375
3
[]
no_license
package com.gaoxi.facade.redis; import java.io.Serializable; import java.util.Map; public interface RedisService { /** * 批量删除 * * @param keys key数组 */ void remove(final String... keys); /** * 批量删除指定key */ void removePattern(final String pattern); /** * 删除指定key...
Markdown
UTF-8
2,323
2.765625
3
[ "BSD-3-Clause" ]
permissive
# GrapesJS MJML This plugin enables the usage of [MJML](https://mjml.io/) components inside the GrapesJS environment. MJML components are rendered in real-time using the official compiler, therefore the result is, almost, the same as using the [MJML Live Editor](https://mjml.io/try-it-live). [Demo](http://grapesjs.c...
C#
UTF-8
2,113
2.953125
3
[ "MIT" ]
permissive
using System.Collections.Generic; using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; using Microsoft.EntityFrameworkCore; using AnimalShelter.Models; using System.Linq; namespace AnimalShelter.Controllers { [Route("api/[controller]")] [ApiController] public class AnimalsController : ControllerBase {...
Java
UTF-8
6,990
2.03125
2
[]
no_license
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package fxml; import Entities.personne; import java.io.IOException; import java.net.URL; import java.util.ResourceBundle; i...
Python
UTF-8
3,967
3.234375
3
[]
no_license
#!/usr/bin/env python from math import ceil import logging class NewImageDimensions(object): symbol_height = None symbol_width = None _epsilon = 0 def __init__(self, wh_ratio, data_len, symbol_shape, fixed_width = None): self.wh_ratio = wh_ratio self.data_len = data_len self.symbol_shape = symbol_...
C++
BIG5
492
2.875
3
[]
no_license
#include <stdio.h> #include <string.h> char line[5000]; int main() { while(1){ int x; scanf("%d", &x);///1 fgets(line, 5000, stdin);///eƦr᭱\nŪ fgets(line, 5000, stdin);///o~Ou2 char * next = strtok(line, " \t"); while(next!=NULL){ int now; ssca...
PHP
UTF-8
2,019
2.640625
3
[]
no_license
<?php include_once 'conection.php'; //métodos usados em diversos formulários function selecionaUsuario($id){ $conn = conecta(); $query= "SELECT id, nome FROM usuario WHERE login NOT LIKE 'admin' ORDER BY nome"; $requisicao = mysqli_query($conn, $query); $select = "<select id='selectUsuario' name=...
Markdown
UTF-8
641
2.578125
3
[]
no_license
--- title: "HTML and CSS - part1" date: 2020-06-03 18:00:00 categories: programming --- #1. Bootstrap https://getbootstrap.com/ #2. Bootstrap Grid System https://www.w3schools.com/bootstrap/bootstrap_grid_system.asp #3. CSS Class vs. ID https://www.developintelligence.com/blog/2016/04/css-class-vs-id-which-one-to-us...
Java
UTF-8
2,072
2.578125
3
[ "Apache-2.0" ]
permissive
package org.apache.hadoop.contrib.ftp; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hdfs.DistributedFileSystem; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.io.IOException; import java.net.URI; import java.net.URISyntaxException; /** * Class to store DFS connection ...
JavaScript
UTF-8
1,556
3.84375
4
[]
no_license
var qualificationDistance = 200; var attempts = [120, 150, 160, 201, 203, 180, 202]; var qualified = false; var averageBest = 0; // Sorting in for loop of array for (var currentIndex = 0; currentIndex <= attempts.length - 2; currentIndex++) { var minValue = attempts[currentIndex]; for (var j = currentIndex + 1; j ...
Markdown
UTF-8
1,802
2.8125
3
[]
no_license
--- title: 2016-03-01-english-comedy-night-w-chris-martin-david-morgan event-title: English Comedy Night w/ Chris Martin &amp; David Morgan layout: post ticket-url: https://www.weezevent.com/mar2016show1 fb-url: https://www.facebook.com/events/797724280354606/ image-url: https://www.weezevent.com/cache/images/affiche_1...
C#
UTF-8
1,176
3.703125
4
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Exceptions2_Try_Catch_p165 { class Program { static void Main(string[] args) { try { Console.WriteLine("How old are you?"); //AS...
C#
UTF-8
3,592
2.78125
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Yurchuk._2sem.laba._4 { class Point3DF : IComparable { public double X; public double Y; public double Z; public MyList<Line> Lines = new MyList<Line>()...
Java
UTF-8
907
2.609375
3
[]
no_license
package mopaqlib; public class HashTableEntry { static final short INDEX_EMPTY=0xffffffff; static final short INDEX_DELETED=0xfffffffe; public int filePathHashA; public int filePathHashB; public long filePathHash; public short language; public short platform; public int fileBlockIndex; public ...
Python
UTF-8
4,137
2.984375
3
[]
no_license
import requests import argparse from datetime import date from time import sleep from playsound import playsound def initialize_parser(): parser = argparse.ArgumentParser() parser.add_argument("-p", "--pin_code", type=str, help="PIN_CODE to look in") parser.add_argument("-a", "--ag...
TypeScript
UTF-8
8,306
2.78125
3
[ "MIT" ]
permissive
// // Shared microservices framework. // import { MicroService, IMicroServiceConfig, IMicroService, retry } from "@artlife/micro"; const inProduction = process.env.NODE_ENV === "production"; const JOB_QUEUE_HOST = process.env.JOB_QUEUE as string || "job-queue"; // // Arguments to the register-jobs REST API. // expo...
JavaScript
UTF-8
679
3.546875
4
[]
no_license
import React, { useState } from 'react'; // short-circuit evaluation // ternary operator const ShortCircuit = () => { const [text, setText] = useState(''); // const [text, setText] = useState('aaaa'); const firstValue = text || 'hello world'; const secondValue = text && 'hello world'; return ( <> ...
C
UTF-8
9,354
2.890625
3
[ "MIT" ]
permissive
#include <stdio.h> #include <string.h> #include <stdbool.h> #include "../c-head/board.h" #include "../c-head/gameNoUI.h" #include "../c-head/find.h" #include "../c-head/getLine.h" /** * Play a game func */ int playAGame(){ /* code */ printf("Hello Sir. \nSo you want to play Hasami Shogi.\nHere are the rules...
Markdown
UTF-8
3,197
3.140625
3
[ "MIT" ]
permissive
--- layout: post title: "(캡스톤) 캡스톤[5.1]" category: PYTHON --- ### 오늘 할일(5월 1일) > 오늘의 목표다. * seed를 만들자. * seed를 만드는 이유? mysql data를 뽑아서 mongodb collection에 넣어줘야 하는 코드 까지 만들어야함. * 가공하는 부분까지 코드를 만들어야 하니 어떤형태가 나올지 지금은 모른다. * 그러니까 일단 해서 직접 뽑아서 내가 원하는 모양대로 만들어보자 ### 시드를 만들어서 mysql에 넣어보자 <img src = '/post_img...
C++
UTF-8
5,118
2.84375
3
[]
no_license
/* MicroKey. Physical keyboard shortcuts based on Arduino Micro, a keypad and an oled display. * * [Microkey ] * [ ] * [ ] * [ ] * * [ 1 ][ 2 ][ 3 ][ A ] * [ 4 ][ 5 ][ 6 ][ B ] * [ 7 ][ 8 ][ 8 ][ C ] * [ * ][ 0 ][ # ][ D ] * * * Spe...
Markdown
UTF-8
3,464
2.90625
3
[ "MIT" ]
permissive
--- layout: page title: "Pwn2Win 2017 Writeup: Baby Regex" --- >Baby Regex > >Our team has gotten hands on this text and we know that it has been used by BloodSuckers Corp. as an admittance test for their applicants in the Counter Intelligence(CI) team, since these guys have an eye for pattern recognition! Get this ac...
Java
UTF-8
2,364
2.65625
3
[ "Apache-2.0" ]
permissive
package ch.ethz.bhepp.hybridstochasticsimulation.graphs; import java.util.List; import java.util.Set; import org.jgrapht.alg.ConnectivityInspector; import org.jgrapht.alg.StrongConnectivityInspector; import org.jgrapht.graph.DefaultDirectedGraph; import ch.ethz.bhepp.hybridstochasticsimulation.networks.MassActionRea...
Java
UTF-8
428
2.09375
2
[ "Apache-2.0" ]
permissive
package irvine.oeis.a196; // Generated by gen_seq4.pl triprod at 2023-06-05 17:58 import irvine.oeis.a007.A007318; import irvine.oeis.a136.A136572; import irvine.oeis.triangle.Product; /** * A196347 Triangle T(n, k) read by rows, T(n, k) = n!*binomial(n, k). * @author Georg Fischer */ public class A196347 extends ...
Java
UTF-8
2,227
2.671875
3
[]
no_license
import java.sql.Connection; import java.sql.DriverManager; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; import java.util.logging.Level; import java.util.logging.Logger; public class MyTest { public static void main(String[] args)throws Throw...
Python
UTF-8
4,478
2.703125
3
[]
no_license
import json import dateutil.parser import requests from bs4 import BeautifulSoup from bson import json_util # execute a request, if it fails then print and exit, other return souped text def get_bs_request(url): request_response = requests.get(url) if not request_response.ok: raise Exception(request_...
Java
UTF-8
1,505
2.578125
3
[ "MIT" ]
permissive
package fr.umlv.valuetype; import static org.junit.jupiter.api.Assertions.assertAll; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertThrows; import static org.junit.jupiter.api.Assertions.asser...
JavaScript
UTF-8
3,322
2.796875
3
[]
no_license
import React, { Component } from 'react'; import './Form.css'; import DadosPessoais from './DadosPessoais'; import FormErrors from './FormErrors'; class Form extends Component { constructor (props) { super(props); this.state = { name: '', email: '', cpf: '', address: '', city:...
Java
ISO-8859-1
1,063
2.328125
2
[]
no_license
package page; import appium.core.BasePage; public class AccordionPage extends BasePage { public void clicarOpcao1() { selecionarPorTexto("Opo 1"); } public void clicarOpcao2() { selecionarPorTexto("Opo 2"); } public void clicarOpcao3() { selecionarPorTexto("Opo 3"); } public void clicarOpcao4() ...
TypeScript
UTF-8
475
2.546875
3
[]
no_license
import { Guest } from './guest'; export class Scrum { id: string; meetingTitle: string; totalTime: Date; minutesPerGuest: number; isCountdown: boolean; started: boolean; guests: Guest[]; constructor(meetTitle: string, minPerGuest: number, countDown: boolean, guestList: Guest[]) { this.meetingTitle...
Python
UTF-8
3,064
3
3
[ "MIT" ]
permissive
import numpy as np from scipy.optimize import linear_sum_assignment from collections import deque from object_tracking.kalman_filter import KalmanFilter from object_tracking.association import compute_association class Tracklet: def __init__(self, track_id, x1, y1, x2, y2, class_id=1): self.x1 = x1 ...
Shell
UTF-8
4,009
3.453125
3
[]
no_license
#!/bin/sh ############################################################## # Add the NCDC GIF processing to the end of the gempak_gif job # There is no timing issue with the NCDC GIF, so it is # okay to just add it here. If timing becomes a problem # in the future, we should move it above somewhere else. ################...
Python
UTF-8
2,464
4.875
5
[]
no_license
""" This program requires creating a function using def , return, print, input, if, in keywords, .append(), .pop(), .remove() list methods, As well as other standard Python This program takes string input and checks if that string is in a list of strings 1) if string is in the list, it removes the first instance from ...
C++
UTF-8
2,282
2.703125
3
[]
no_license
#include "PaintHelper.h" #include <QRectF> #include <QLine> #include <math.h> PaintHelper::PaintHelper() { QLinearGradient gradient(QPointF(50, -20), QPointF(80,20)); gradient.setColorAt(0.0,Qt::white); gradient.setColorAt(1.0,QColor(0xa6,0xce,0x39)); background = QBrush(QColor(0,0,0)); circleBrush = QBrus...
C
UTF-8
843
3.625
4
[]
no_license
// Purpose: Make an address book // File Name: Ch15_17 // Completion Date: 20210625 #include <stdio.h> #include <stdlib.h> struct addrbook { char name[15]; int areacode; int phone; char city[10]; char street[12]; int number; // house number } book[3] = {"Undertaker", 02, 529527, "TPC", "Hell ro...
Markdown
UTF-8
4,477
2.703125
3
[]
no_license
--- title: ReactNative 原生与JS交互 date: 2017-12-12 19:22:08 tags: --- ReactNative中原生与JS的交互大致可以有两种形式,一种是原生主动发送事件给JS,一种是JS主动调用原生暴露的方法。要实现这两种交互需要编写一个原生模块,该模块继承了`ReactContextBaseJavaModule` 。 以下是原生模块代码示例: ``` java package com.bundletest.modules; import com.facebook.react.bridge.Arguments; import com.facebook.react.bridge.R...
Java
UTF-8
1,648
2.421875
2
[ "Apache-2.0" ]
permissive
/** * Copyright 2015 Netflix, Inc. * * 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 ...
Python
UTF-8
946
3.125
3
[]
no_license
import sys sys.setrecursionlimit(10000) r, c = map(int, input().split()) board = [input() for _ in range(r)] directions = [(1,0), (-1,0), (0, 1), (0, -1)] result = 0 def promising(x, y, route): if x<0 or x>=r or y<0 or y>=c: return False if board[x][y] in route: return False return True d...
C#
UTF-8
1,628
2.546875
3
[]
no_license
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace UI_Notepad { public partial class frmHome : Form { public frmHome() { ...
PHP
UTF-8
467
2.578125
3
[]
no_license
<?php //自动加载类 function __autoload($class_name){ require "./{$class_name}.class.php"; } $c = isset($_GET['c'])?$_GET['c']:'Products'; //获取控制器 $a = isset($_GET['a'])?$_GET['a']:'list'; //获取方法 $controller_name = $c.'Controller'; //拼接控制器名 $action_name = $a.'Action'; //拼接方法名 $controller = new $cl...
Java
UTF-8
924
3.09375
3
[]
no_license
package com.repeatednumber; import java.util.ArrayList; import java.util.Arrays; import java.util.HashSet; import java.util.List; import java.util.Set; public class ReapetedElement { Object obj; @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((obj == n...
C#
UTF-8
6,763
2.921875
3
[]
no_license
using System; using System.Collections; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; namespace AlgoritmoGeneticoDP1 { class Program { private const int MAX_ITERACIONES = 1000; private const int MAX_REPETIDOS = 25; ...
Java
UTF-8
4,568
2.046875
2
[ "Apache-2.0" ]
permissive
/** * Copyright 2016, KyoSherlock * <p/> * 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 * <p/> * http://www.apache.org/licenses/LICENSE-2.0 * <p/> * Unless required by applicable law ...
Swift
UTF-8
910
3.109375
3
[]
no_license
// // ImagePreviewViewModel.swift // image-browser // // Created by Shivam Jaiswal on 22/05/20. // Copyright © 2020 Shivam Jaiswal. All rights reserved. // import Foundation protocol ImagePreviewViewModelProtocol { func numberOfItems(inSection section: Int) -> Int func item(at indexPath: IndexPath) -> Ima...
PHP
UTF-8
202
2.75
3
[]
no_license
<?php class Venta { public $usuario; public $producto; public function __construct($usuario, $producto) { $this->usuario = $usuario; $this->producto = $producto; } }
Java
UTF-8
2,771
3.8125
4
[]
no_license
package Utils; public class utils { /** * Méthode pour vérifier si la réponse du joueur est un Integer * @param reponse String saisie par le joueur * @return temp integer saisie par le joueur ou -1 valeur incohérente */ private static int VerificationInt(String reponse){ int temp; ...
Java
UTF-8
312
2.125
2
[ "MIT" ]
permissive
package se.lnu.domain.error; /** * Created by Jakob on 2016-03-11. */ public class E4IllegalTFTPOperation extends TFTPError { private static byte[] errcode = new byte[]{0, 4}; public E4IllegalTFTPOperation() { super(errcode, "The operation code is not allowed according to TFTP"); } }
TypeScript
UTF-8
665
2.796875
3
[]
no_license
const mainButtonOptions: string[] = [ "I'm bored!", "I have nothing to do!", "Help!", "Cure my boredom", ]; const waitingMessageOptions: string[] = [ "Really... again?", "Ya know, Only boring people can be bored", "Please wait...", "Scanning your brain... hold still", "Consulting the wizard... please...
Java
UTF-8
4,059
4.15625
4
[]
no_license
/* Add and Search Word Design a data structure that supports the following two operations: addWord(word) and search(word) search(word) can search a literal word or a regular expression string containing only letters a-z or .. A . means it can represent any one letter. Example addWord("bad") addWord("dad") addWord("m...
Java
UTF-8
283
1.984375
2
[]
no_license
package com.butterknife; import android.app.Activity; import android.view.View; /** * Created by zz on 2018/5/9. */ public class Utils { public static <T extends View> T findViewById(Activity activity, int viewId){ return (T)activity.findViewById(viewId); } }
Markdown
UTF-8
3,502
3.09375
3
[]
no_license
--- layout: post title: .Net not recognising regional settings wordpress_id: 3 wordpress_url: http://blog.emson.co.uk/?p=3 --- #.Net not recognising regional settings The other day I had the following problem. One of my test servers had been setup with US regional settings and should have been setup with UK se...
Java
UTF-8
907
3.5625
4
[]
no_license
package Leetcode.third; /** * 合并两个排序的链表 */ public class jianzhi25 { public class ListNode{ private int val; private ListNode next; public ListNode(int x){ this.val = x; } } public ListNode mergeTwoLists(ListNode l1,ListNode l2){ //这里有一个伪节点的思想,需要搞清楚 ...
Python
UTF-8
151
2.75
3
[]
no_license
ra=int(input()) ea=[int(q) for q in input().split()] ww=0 for q in range(ra): for m in range(q): if ea[m]<ea[q]: ww+=ea[m] print(ww)
PHP
UTF-8
2,907
2.6875
3
[]
no_license
<?php namespace Pok\Application\Console; use Symfony\Component\DependencyInjection\Container, Symfony\Component\Console\Output\OutputInterface, Symfony\Component\Console\Input\InputInterface; class Application extends \Symfony\Component\Console\Application { protected $container; public function __co...
Java
UTF-8
4,472
1.929688
2
[]
no_license
package com.easy.infra.util.mybatis.mapper; import com.easy.infra.util.mybatis.method.EasyDeleteByIdMethodGenerator; import com.easy.infra.util.mybatis.method.EasyInsertMethodGenerator; import com.easy.infra.util.mybatis.method.EasySelectByIdMethodGenerator; import com.easy.infra.util.mybatis.method.EasySelectMethodGe...
Ruby
UTF-8
439
3.53125
4
[]
no_license
require 'euler' include Euler # Each new term in the Fibonacci sequence is generated by adding the previous two terms.By starting with 1 and 2, # the first 10 terms will be: # # 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, ... # # By considering the terms in the Fibonacci sequence whose values do # not exceed four million, find...